Subscriptions are tied to a user and are created once a user has a plan and SIM. This allows connectivity for their device and SIM.
Type of object is always subscription.
subscription Unique identifier for the subscription.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"Time when the subscription was activated.
"2021-01-21T19:38:34Z"Time when the subscription was canceled.
"2021-01-29T13:22:51Z"Cause of subscription cancellation.
cancellationRequested deviceBlocked deviceNotSupported invoiceUnpaid paymentDisputed paymentFailed phoneNumberPortedOut portingExpired simUnusable subscriptionEnded userDeleted Comment from the user explaining the cancellation reason. It is only present when the userReason is other.
Reason for the user to cancel the subscription. It is only present when the cause is cancellationRequested
connectivityIssues customerService noDetails other tooExpensive unused Time when the subscription was created.
"2021-01-21T19:32:13Z"Sequence number of the period.
1>= 1Beginning of the period.
"2021-01-21T19:32:13Z"End of the period.
"2021-02-20T19:38:34Z"Earliest time at which the subscription can currently be ended. This depends on the minimum period of the plan. This value is present after the first period has already started, and before the subscription has ended."
"2021-02-20T19:38:34Z"Time when the subscription will end or has ended. This field is populated in different scenarios:
"2021-02-20T19:38:34Z"Time when the subscription was first used.
"2021-01-21T19:38:34Z"The phone number attached to the SIM in E.164 string_format. Only available for voice plans.
"+19591234567"Time when a restore was requested for the subscription. It is set when a restore is accepted and cleared once the restore completes.
"2021-02-21T19:38:34Z"Time when the subscription was restricted.
"2021-02-21T19:38:34Z"Determines how the subscription is restricted. It can have one of the following values:
incomingOnly: The subscription line can receive calls & SMS, but cannot make calls, send SMS, or use data.noData: The subscription line can make and receive calls & SMS, but cannot use data.throttledData: The subscription line can still make and receive calls & SMS, and use up to 1GB of data at a reduced speed."incomingOnly"incomingOnly noData throttledData Determines how the subscription is restored. It can have one of the following values:
resetPeriodAnchor: The subscription cycle is reset to the date of restoration. This means the user has a whole new period to use their plan allowance that was just restored.keepPeriodAnchor: The subscription cycle remains unchanged. The next renewal date stays the same as before the restriction."resetPeriodAnchor"keepPeriodAnchor resetPeriodAnchor Determines the cause that triggered the subscription restriction. It can have one of the following values:
invoiceOverdue: The subscription was automatically restricted due to an unpaid invoice that has become overdue.restrictionRequested: The subscription was manually restricted due to an explicit request."invoiceOverdue"invoiceOverdue restrictionRequested The current status of the subscription. Note that the initiated status
is currently only available when using the Billing API, where it implies
that the subscription's first invoice has not yet been paid.
pending initiated active restricted ended Current user address identifier (if any) related with the subscription.
"adr_0SNlurA049MEWV5ELDmnaqVXgTFT"{
"object": "subscription",
"id": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"metadata": {},
"activatedAt": "2021-01-21T19:38:34Z",
"billing": {
"discount": {
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"expiresAt": "2021-02-20T19:38:34Z"
},
"invoiceGracePeriodDays": 3,
"invoiceOverduePeriodDays": 1,
"invoiceOverdueAction": null,
"restrictBehavior": null,
"restoreBehavior": null
},
"canceledAt": "2021-01-29T13:22:51Z",
"cancellationDetails": {
"cause": "cancellationRequested",
"userComment": "",
"userReason": "connectivityIssues"
},
"createdAt": "2021-01-21T19:32:13.0Z",
"currentPeriod": {
"number": 1,
"start": "2021-01-21T19:32:13.0Z",
"end": "2021-02-20T19:38:34.0Z"
},
"earliestEndAt": "2021-02-20T19:38:34Z",
"endedAt": "2021-02-20T19:38:34Z",
"firstUsageAt": "2021-01-21T19:38:34Z",
"lastPorting": {
"object": "porting",
"id": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"accountNumber": "123456789",
"accountPinExists": true,
"accountType": "prepaidUnregistered",
"address": {
"city": "New York City",
"country": "US",
"line1": "129 West 81st Street",
"line2": "Apartment 5",
"postalCode": "10024",
"state": "NY"
},
"behavior": "portIn",
"billingPinExists": true,
"birthday": "2017-07-21",
"canceledAt": "2021-01-21T19:39:53Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28.0Z",
"declinedAttempts": 0,
"declinedCode": "portingPhoneNumberPortProtected",
"declinedMessage": "The phone number has port protection on the provider.",
"donorProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
{
"0": "p",
"1": "3"
}
]
},
"donorProviderApproval": true,
"expiredAt": "2021-01-21T19:39:53Z",
"failedAt": "2021-01-21T19:39:53Z",
"firstName": "Jerry",
"lastDeclinedAt": "2021-01-21T19:31:13Z",
"lastName": "Seinfeld",
"lastRequestedAt": "2021-01-21T19:22:31Z",
"phoneNumber": "+19591234567",
"provider": "p9",
"recipientProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
{
"0": "p",
"1": "3"
}
]
},
"required": {
"0": "accountNumber",
"1": "accountPin",
"2": "accountType",
"3": "address",
"4": "birthday",
"5": "donorProvider",
"6": "donorProviderApproval",
"7": "firstName",
"8": "lastName"
},
"scheduledOn": "2021-01-21",
"status": "draft",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
},
"phoneNumber": "+19591234567",
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"activationTrigger": "creation",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"createdAt": "2021-01-21T19:38:34.0Z",
"description": "A data plan you will love! Operates in most countries of the world.",
"firstPeriodTrigger": "creation",
"image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
"limits": {
"dataBytes": 100000000000,
"bandwidthBitsPerSecond": 100000000,
"throttling": {
"thresholdBytes": 10000000000,
"bandwidthBitsPerSecond": 512000
}
},
"name": "Gigs Global",
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"requirements": {
"address": "present",
"device": "none",
"user.birthday": "none",
"user.fullName": "present"
},
"simTypes": [
"eSIM",
"pSIM"
],
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
},
"restoreRequestedAt": "2021-02-21T19:38:34Z",
"restrictedAt": "2021-02-21T19:38:34Z",
"restrictionDetails": {
"restrictBehavior": "incomingOnly",
"restoreBehavior": "resetPeriodAnchor",
"cause": "invoiceOverdue"
},
"sim": {
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34.0Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
},
"status": "pending",
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"createdAt": "2021-01-21T19:38:34.0Z",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"status": "active"
},
"userAddress": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
"porting": {
"object": "porting",
"id": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"accountNumber": "123456789",
"accountPinExists": true,
"accountType": "prepaidUnregistered",
"address": {
"city": "New York City",
"country": "US",
"line1": "129 West 81st Street",
"line2": "Apartment 5",
"postalCode": "10024",
"state": "NY"
},
"behavior": "portIn",
"billingPinExists": true,
"birthday": "2017-07-21",
"canceledAt": "2021-01-21T19:39:53Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28.0Z",
"declinedAttempts": 0,
"declinedCode": "portingPhoneNumberPortProtected",
"declinedMessage": "The phone number has port protection on the provider.",
"donorProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
{
"0": "p",
"1": "3"
}
]
},
"donorProviderApproval": true,
"expiredAt": "2021-01-21T19:39:53Z",
"failedAt": "2021-01-21T19:39:53Z",
"firstName": "Jerry",
"lastDeclinedAt": "2021-01-21T19:31:13Z",
"lastName": "Seinfeld",
"lastRequestedAt": "2021-01-21T19:22:31Z",
"phoneNumber": "+19591234567",
"provider": "p9",
"recipientProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
{
"0": "p",
"1": "3"
}
]
},
"required": {
"0": "accountNumber",
"1": "accountPin",
"2": "accountType",
"3": "address",
"4": "birthday",
"5": "donorProvider",
"6": "donorProviderApproval",
"7": "firstName",
"8": "lastName"
},
"scheduledOn": "2021-01-21",
"status": "draft",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
}
}
Returns a list of subscriptions. The subscriptions returned are sorted by creation date, with the most recently created subscriptions appearing first.
The unique identifier for the user to be filtered by.
"usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"The unique identifier for the plan to be filtered by.
"pln_0SNlurA049MEWV3V0q7gjQbM4EVo"The unique identifier for the sim to be filtered by.
"sim_0SNlurA049MEWV1BAAmWZULA4lf6"A comma-separated list of statuses to filter the subscriptions by. Only pending and active subscriptions are returned by default.
pending,initiated,active,restrictedA cursor for use in pagination. The after parameter takes an object ID that defines the position in the list, only items immediately following the item with that ID will be returned.
A cursor for use in pagination. The before parameter takes an object ID that defines the position in the list, only items immediately preceding the item with that ID will be returned.
The limit of items to be returned in the list, between 0 and 200.
2010>= 0<= 200Returns a list of subscription objects.
Type of object is always list.
list subscription.A unique identifier to be used as after pagination parameter if more items are available sorted after the current batch of items.
A unique identifier to be used as before pagination parameter if more items are available sorted before the current batch of items.
curl https://api.gigs.com/projects/${GIGS_PROJECT}/subscriptions \
-X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json"
{
"object": "list",
"items": [
{
"object": "subscription",
"id": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"metadata": {},
"activatedAt": "2021-01-21T19:38:34Z",
"billing": {
"discount": {
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"expiresAt": "2021-02-20T19:38:34Z"
},
"invoiceGracePeriodDays": 3,
"invoiceOverduePeriodDays": 1,
"invoiceOverdueAction": null,
"restrictBehavior": null,
"restoreBehavior": null
},
"canceledAt": "2021-01-29T13:22:51Z",
"cancellationDetails": {
"cause": "cancellationRequested",
"userReason": "connectivityIssues"
},
"createdAt": "2021-01-21T19:32:13Z",
"currentPeriod": {
"number": 1,
"start": "2021-01-21T19:32:13Z",
"end": "2021-02-20T19:38:34Z"
},
"earliestEndAt": "2021-02-20T19:38:34Z",
"endedAt": "2021-02-20T19:38:34Z",
"firstUsageAt": "2021-01-21T19:38:34Z",
"lastPorting": {
"object": "porting",
"id": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"accountNumber": "123456789",
"accountPinExists": true,
"accountType": "prepaidUnregistered",
"address": {
"city": "New York City",
"country": "US",
"line1": "129 West 81st Street",
"line2": "Apartment 5",
"postalCode": "10024",
"state": "NY"
},
"behavior": "portIn",
"billingPinExists": true,
"birthday": "2017-07-21",
"canceledAt": "2021-01-21T19:39:53Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"declinedAttempts": 0,
"declinedCode": "portingPhoneNumberPortProtected",
"declinedMessage": "The phone number has port protection on the provider.",
"donorProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"donorProviderApproval": true,
"expiredAt": "2021-01-21T19:39:53Z",
"failedAt": "2021-01-21T19:39:53Z",
"firstName": "Jerry",
"lastDeclinedAt": "2021-01-21T19:31:13Z",
"lastName": "Seinfeld",
"lastRequestedAt": "2021-01-21T19:22:31Z",
"phoneNumber": "+19591234567",
"provider": "p9",
"recipientProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"required": [
"accountNumber",
"accountPin",
"accountType",
"address",
"birthday",
"donorProvider",
"donorProviderApproval",
"firstName",
"lastName"
],
"scheduledOn": "2021-01-21",
"status": "draft",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
},
"phoneNumber": "+19591234567",
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"activationTrigger": "creation",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"createdAt": "2021-01-21T19:38:34Z",
"description": "A data plan you will love! Operates in most countries of the world.",
"firstPeriodTrigger": "creation",
"image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
"limits": {
"dataBytes": 100000000000,
"bandwidthBitsPerSecond": 100000000,
"throttling": {
"thresholdBytes": 10000000000,
"bandwidthBitsPerSecond": 512000
}
},
"name": "Gigs Global",
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"requirements": {
"address": "present",
"device": "none",
"user.birthday": "none",
"user.fullName": "present"
},
"simTypes": [
"eSIM",
"pSIM"
],
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
},
"restoreRequestedAt": "2021-02-21T19:38:34Z",
"restrictedAt": "2021-02-21T19:38:34Z",
"restrictionDetails": {
"restrictBehavior": "incomingOnly",
"restoreBehavior": "resetPeriodAnchor",
"cause": "invoiceOverdue"
},
"sim": {
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
},
"status": "pending",
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"createdAt": "2021-01-21T19:38:34Z",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"status": "active"
},
"userAddress": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
"porting": {
"object": "porting",
"id": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"accountNumber": "123456789",
"accountPinExists": true,
"accountType": "prepaidUnregistered",
"address": {
"city": "New York City",
"country": "US",
"line1": "129 West 81st Street",
"line2": "Apartment 5",
"postalCode": "10024",
"state": "NY"
},
"behavior": "portIn",
"billingPinExists": true,
"birthday": "2017-07-21",
"canceledAt": "2021-01-21T19:39:53Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"declinedAttempts": 0,
"declinedCode": "portingPhoneNumberPortProtected",
"declinedMessage": "The phone number has port protection on the provider.",
"donorProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"donorProviderApproval": true,
"expiredAt": "2021-01-21T19:39:53Z",
"failedAt": "2021-01-21T19:39:53Z",
"firstName": "Jerry",
"lastDeclinedAt": "2021-01-21T19:31:13Z",
"lastName": "Seinfeld",
"lastRequestedAt": "2021-01-21T19:22:31Z",
"phoneNumber": "+19591234567",
"provider": "p9",
"recipientProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"required": [
"accountNumber",
"accountPin",
"accountType",
"address",
"birthday",
"donorProvider",
"donorProviderApproval",
"firstName",
"lastName"
],
"scheduledOn": "2021-01-21",
"status": "draft",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
}
}
],
"moreItemsAfter": null,
"moreItemsBefore": null
}
Creates a new subscription for an existing user in the specified project.
The unique identifier for the existing device to be linked with the passed SIM. Some network providers require this field (or deviceModel) for activation. If the exact IMEI of the device is known, then it is recommended to create a device and specify its ID here. See deviceModel if the device IMEI is not known. At most one of device and deviceModel may be specified. Trying to link a pSIM to a second device will cause an error.
"dev_0SNlurA049MEWV55CrA9qMvI2FVJ"The unique identifier for the device model to be linked with the passed SIM. Some network providers require this field (or device) for activation. If the device IMEI is not known, but the device model is known, this property can be used in place of device. At most one of device and deviceModel may be specified.
"dmd_0SNlurA04OUskUGfGAn3Rh"The unique identifier for an existing ended subscription to base the new subscription on. The referenced subscription must have status ended and its SIM must still be usable (not retired, not ported out, and for eSIMs, the profile must not be deleted). When provided, the user, plan, SIM, billing settings, and applicable discounts are copied from the referenced subscription. Cannot be combined with user, plan, sim, porting, device, deviceModel, userAddress, or billing.
The unique identifier for the existing SIM to be used for the subscription. In combination with an eSIM plan, it can be passed as auto to request a new eSIM, or preferLastUsed to reuse the user's most recently used SIM from an ended subscription. preferLastUsed falls back to auto if no eligible SIM is found, which only works for eSIM-capable plans; for plans requiring a physical SIM, subscription creation will fail if no eligible SIM is found.
"sim_0SNlurA049MEWV1BAAmWZULA4lf6"autoThe unique identifier for the existing user address to be used for the subscription. Only needed if the plan requires an address.
"adr_0SNlurA049MEWV5ELDmnaqVXgTFT"Returns the newly created subscription and supporting objects.
Type of object is always subscription.
subscription Unique identifier for the subscription.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"Time when the subscription was activated.
"2021-01-21T19:38:34Z"Time when the subscription was canceled.
"2021-01-29T13:22:51Z"Cause of subscription cancellation.
cancellationRequested deviceBlocked deviceNotSupported invoiceUnpaid paymentDisputed paymentFailed phoneNumberPortedOut portingExpired simUnusable subscriptionEnded userDeleted Comment from the user explaining the cancellation reason. It is only present when the userReason is other.
Reason for the user to cancel the subscription. It is only present when the cause is cancellationRequested
connectivityIssues customerService noDetails other tooExpensive unused Time when the subscription was created.
"2021-01-21T19:32:13Z"Sequence number of the period.
1>= 1Beginning of the period.
"2021-01-21T19:32:13Z"End of the period.
"2021-02-20T19:38:34Z"Earliest time at which the subscription can currently be ended. This depends on the minimum period of the plan. This value is present after the first period has already started, and before the subscription has ended."
"2021-02-20T19:38:34Z"Time when the subscription will end or has ended. This field is populated in different scenarios:
"2021-02-20T19:38:34Z"Time when the subscription was first used.
"2021-01-21T19:38:34Z"The phone number attached to the SIM in E.164 string_format. Only available for voice plans.
"+19591234567"Time when a restore was requested for the subscription. It is set when a restore is accepted and cleared once the restore completes.
"2021-02-21T19:38:34Z"Time when the subscription was restricted.
"2021-02-21T19:38:34Z"Determines how the subscription is restricted. It can have one of the following values:
incomingOnly: The subscription line can receive calls & SMS, but cannot make calls, send SMS, or use data.noData: The subscription line can make and receive calls & SMS, but cannot use data.throttledData: The subscription line can still make and receive calls & SMS, and use up to 1GB of data at a reduced speed."incomingOnly"incomingOnly noData throttledData Determines how the subscription is restored. It can have one of the following values:
resetPeriodAnchor: The subscription cycle is reset to the date of restoration. This means the user has a whole new period to use their plan allowance that was just restored.keepPeriodAnchor: The subscription cycle remains unchanged. The next renewal date stays the same as before the restriction."resetPeriodAnchor"keepPeriodAnchor resetPeriodAnchor Determines the cause that triggered the subscription restriction. It can have one of the following values:
invoiceOverdue: The subscription was automatically restricted due to an unpaid invoice that has become overdue.restrictionRequested: The subscription was manually restricted due to an explicit request."invoiceOverdue"invoiceOverdue restrictionRequested The current status of the subscription. Note that the initiated status
is currently only available when using the Billing API, where it implies
that the subscription's first invoice has not yet been paid.
pending initiated active restricted ended Current user address identifier (if any) related with the subscription.
"adr_0SNlurA049MEWV5ELDmnaqVXgTFT"curl https://api.gigs.com/projects/${GIGS_PROJECT}/subscriptions \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json" \
-d '{
"billing": {
"discount": {
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN"
},
"invoiceGracePeriodDays": 3,
"invoiceOverduePeriodDays": 1,
"invoiceOverdueAction": "end"
},
"device": "dev_0SNlurA049MEWV55CrA9qMvI2FVJ",
"deviceModel": "dmd_0SNlurA04OUskUGfGAn3Rh",
"metadata": {},
"plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"porting": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"sim": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"userAddress": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
}'
{
"object": "subscription",
"id": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"metadata": {},
"activatedAt": "2021-01-21T19:38:34Z",
"billing": {
"discount": {
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"expiresAt": "2021-02-20T19:38:34Z"
},
"invoiceGracePeriodDays": 3,
"invoiceOverduePeriodDays": 1,
"invoiceOverdueAction": null,
"restrictBehavior": null,
"restoreBehavior": null
},
"canceledAt": "2021-01-29T13:22:51Z",
"cancellationDetails": {
"cause": "cancellationRequested",
"userReason": "connectivityIssues"
},
"createdAt": "2021-01-21T19:32:13Z",
"currentPeriod": {
"number": 1,
"start": "2021-01-21T19:32:13Z",
"end": "2021-02-20T19:38:34Z"
},
"earliestEndAt": "2021-02-20T19:38:34Z",
"endedAt": "2021-02-20T19:38:34Z",
"firstUsageAt": "2021-01-21T19:38:34Z",
"lastPorting": {
"object": "porting",
"id": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"accountNumber": "123456789",
"accountPinExists": true,
"accountType": "prepaidUnregistered",
"address": {
"city": "New York City",
"country": "US",
"line1": "129 West 81st Street",
"line2": "Apartment 5",
"postalCode": "10024",
"state": "NY"
},
"behavior": "portIn",
"billingPinExists": true,
"birthday": "2017-07-21",
"canceledAt": "2021-01-21T19:39:53Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"declinedAttempts": 0,
"declinedCode": "portingPhoneNumberPortProtected",
"declinedMessage": "The phone number has port protection on the provider.",
"donorProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"donorProviderApproval": true,
"expiredAt": "2021-01-21T19:39:53Z",
"failedAt": "2021-01-21T19:39:53Z",
"firstName": "Jerry",
"lastDeclinedAt": "2021-01-21T19:31:13Z",
"lastName": "Seinfeld",
"lastRequestedAt": "2021-01-21T19:22:31Z",
"phoneNumber": "+19591234567",
"provider": "p9",
"recipientProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"required": [
"accountNumber",
"accountPin",
"accountType",
"address",
"birthday",
"donorProvider",
"donorProviderApproval",
"firstName",
"lastName"
],
"scheduledOn": "2021-01-21",
"status": "draft",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
},
"phoneNumber": "+19591234567",
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"activationTrigger": "creation",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"createdAt": "2021-01-21T19:38:34Z",
"description": "A data plan you will love! Operates in most countries of the world.",
"firstPeriodTrigger": "creation",
"image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
"limits": {
"dataBytes": 100000000000,
"bandwidthBitsPerSecond": 100000000,
"throttling": {
"thresholdBytes": 10000000000,
"bandwidthBitsPerSecond": 512000
}
},
"name": "Gigs Global",
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"requirements": {
"address": "present",
"device": "none",
"user.birthday": "none",
"user.fullName": "present"
},
"simTypes": [
"eSIM",
"pSIM"
],
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
},
"restoreRequestedAt": "2021-02-21T19:38:34Z",
"restrictedAt": "2021-02-21T19:38:34Z",
"restrictionDetails": {
"restrictBehavior": "incomingOnly",
"restoreBehavior": "resetPeriodAnchor",
"cause": "invoiceOverdue"
},
"sim": {
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
},
"status": "pending",
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"createdAt": "2021-01-21T19:38:34Z",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"status": "active"
},
"userAddress": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
"porting": {
"object": "porting",
"id": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"accountNumber": "123456789",
"accountPinExists": true,
"accountType": "prepaidUnregistered",
"address": {
"city": "New York City",
"country": "US",
"line1": "129 West 81st Street",
"line2": "Apartment 5",
"postalCode": "10024",
"state": "NY"
},
"behavior": "portIn",
"billingPinExists": true,
"birthday": "2017-07-21",
"canceledAt": "2021-01-21T19:39:53Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"declinedAttempts": 0,
"declinedCode": "portingPhoneNumberPortProtected",
"declinedMessage": "The phone number has port protection on the provider.",
"donorProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"donorProviderApproval": true,
"expiredAt": "2021-01-21T19:39:53Z",
"failedAt": "2021-01-21T19:39:53Z",
"firstName": "Jerry",
"lastDeclinedAt": "2021-01-21T19:31:13Z",
"lastName": "Seinfeld",
"lastRequestedAt": "2021-01-21T19:22:31Z",
"phoneNumber": "+19591234567",
"provider": "p9",
"recipientProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"required": [
"accountNumber",
"accountPin",
"accountType",
"address",
"birthday",
"donorProvider",
"donorProviderApproval",
"firstName",
"lastName"
],
"scheduledOn": "2021-01-21",
"status": "draft",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
}
}
Retrieves the details of an existing subscription. You need only supply the unique subscription identifier that was returned upon purchasing a plan.
The unique identifier for the subscription.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"Returns the subscription if it exists.
Type of object is always subscription.
subscription Unique identifier for the subscription.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"Time when the subscription was activated.
"2021-01-21T19:38:34Z"Time when the subscription was canceled.
"2021-01-29T13:22:51Z"Cause of subscription cancellation.
cancellationRequested deviceBlocked deviceNotSupported invoiceUnpaid paymentDisputed paymentFailed phoneNumberPortedOut portingExpired simUnusable subscriptionEnded userDeleted Comment from the user explaining the cancellation reason. It is only present when the userReason is other.
Reason for the user to cancel the subscription. It is only present when the cause is cancellationRequested
connectivityIssues customerService noDetails other tooExpensive unused Time when the subscription was created.
"2021-01-21T19:32:13Z"Sequence number of the period.
1>= 1Beginning of the period.
"2021-01-21T19:32:13Z"End of the period.
"2021-02-20T19:38:34Z"Earliest time at which the subscription can currently be ended. This depends on the minimum period of the plan. This value is present after the first period has already started, and before the subscription has ended."
"2021-02-20T19:38:34Z"Time when the subscription will end or has ended. This field is populated in different scenarios:
"2021-02-20T19:38:34Z"Time when the subscription was first used.
"2021-01-21T19:38:34Z"The phone number attached to the SIM in E.164 string_format. Only available for voice plans.
"+19591234567"Time when a restore was requested for the subscription. It is set when a restore is accepted and cleared once the restore completes.
"2021-02-21T19:38:34Z"Time when the subscription was restricted.
"2021-02-21T19:38:34Z"Determines how the subscription is restricted. It can have one of the following values:
incomingOnly: The subscription line can receive calls & SMS, but cannot make calls, send SMS, or use data.noData: The subscription line can make and receive calls & SMS, but cannot use data.throttledData: The subscription line can still make and receive calls & SMS, and use up to 1GB of data at a reduced speed."incomingOnly"incomingOnly noData throttledData Determines how the subscription is restored. It can have one of the following values:
resetPeriodAnchor: The subscription cycle is reset to the date of restoration. This means the user has a whole new period to use their plan allowance that was just restored.keepPeriodAnchor: The subscription cycle remains unchanged. The next renewal date stays the same as before the restriction."resetPeriodAnchor"keepPeriodAnchor resetPeriodAnchor Determines the cause that triggered the subscription restriction. It can have one of the following values:
invoiceOverdue: The subscription was automatically restricted due to an unpaid invoice that has become overdue.restrictionRequested: The subscription was manually restricted due to an explicit request."invoiceOverdue"invoiceOverdue restrictionRequested The current status of the subscription. Note that the initiated status
is currently only available when using the Billing API, where it implies
that the subscription's first invoice has not yet been paid.
pending initiated active restricted ended Current user address identifier (if any) related with the subscription.
"adr_0SNlurA049MEWV5ELDmnaqVXgTFT"curl https://api.gigs.com/projects/${GIGS_PROJECT}/subscriptions/{subscription} \
-X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json"
{
"object": "subscription",
"id": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"metadata": {},
"activatedAt": "2021-01-21T19:38:34Z",
"billing": {
"discount": {
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"expiresAt": "2021-02-20T19:38:34Z"
},
"invoiceGracePeriodDays": 3,
"invoiceOverduePeriodDays": 1,
"invoiceOverdueAction": null,
"restrictBehavior": null,
"restoreBehavior": null
},
"canceledAt": "2021-01-29T13:22:51Z",
"cancellationDetails": {
"cause": "cancellationRequested",
"userReason": "connectivityIssues"
},
"createdAt": "2021-01-21T19:32:13Z",
"currentPeriod": {
"number": 1,
"start": "2021-01-21T19:32:13Z",
"end": "2021-02-20T19:38:34Z"
},
"earliestEndAt": "2021-02-20T19:38:34Z",
"endedAt": "2021-02-20T19:38:34Z",
"firstUsageAt": "2021-01-21T19:38:34Z",
"lastPorting": {
"object": "porting",
"id": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"accountNumber": "123456789",
"accountPinExists": true,
"accountType": "prepaidUnregistered",
"address": {
"city": "New York City",
"country": "US",
"line1": "129 West 81st Street",
"line2": "Apartment 5",
"postalCode": "10024",
"state": "NY"
},
"behavior": "portIn",
"billingPinExists": true,
"birthday": "2017-07-21",
"canceledAt": "2021-01-21T19:39:53Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"declinedAttempts": 0,
"declinedCode": "portingPhoneNumberPortProtected",
"declinedMessage": "The phone number has port protection on the provider.",
"donorProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"donorProviderApproval": true,
"expiredAt": "2021-01-21T19:39:53Z",
"failedAt": "2021-01-21T19:39:53Z",
"firstName": "Jerry",
"lastDeclinedAt": "2021-01-21T19:31:13Z",
"lastName": "Seinfeld",
"lastRequestedAt": "2021-01-21T19:22:31Z",
"phoneNumber": "+19591234567",
"provider": "p9",
"recipientProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"required": [
"accountNumber",
"accountPin",
"accountType",
"address",
"birthday",
"donorProvider",
"donorProviderApproval",
"firstName",
"lastName"
],
"scheduledOn": "2021-01-21",
"status": "draft",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
},
"phoneNumber": "+19591234567",
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"activationTrigger": "creation",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"createdAt": "2021-01-21T19:38:34Z",
"description": "A data plan you will love! Operates in most countries of the world.",
"firstPeriodTrigger": "creation",
"image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
"limits": {
"dataBytes": 100000000000,
"bandwidthBitsPerSecond": 100000000,
"throttling": {
"thresholdBytes": 10000000000,
"bandwidthBitsPerSecond": 512000
}
},
"name": "Gigs Global",
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"requirements": {
"address": "present",
"device": "none",
"user.birthday": "none",
"user.fullName": "present"
},
"simTypes": [
"eSIM",
"pSIM"
],
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
},
"restoreRequestedAt": "2021-02-21T19:38:34Z",
"restrictedAt": "2021-02-21T19:38:34Z",
"restrictionDetails": {
"restrictBehavior": "incomingOnly",
"restoreBehavior": "resetPeriodAnchor",
"cause": "invoiceOverdue"
},
"sim": {
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
},
"status": "pending",
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"createdAt": "2021-01-21T19:38:34Z",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"status": "active"
},
"userAddress": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
"porting": {
"object": "porting",
"id": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"accountNumber": "123456789",
"accountPinExists": true,
"accountType": "prepaidUnregistered",
"address": {
"city": "New York City",
"country": "US",
"line1": "129 West 81st Street",
"line2": "Apartment 5",
"postalCode": "10024",
"state": "NY"
},
"behavior": "portIn",
"billingPinExists": true,
"birthday": "2017-07-21",
"canceledAt": "2021-01-21T19:39:53Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"declinedAttempts": 0,
"declinedCode": "portingPhoneNumberPortProtected",
"declinedMessage": "The phone number has port protection on the provider.",
"donorProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"donorProviderApproval": true,
"expiredAt": "2021-01-21T19:39:53Z",
"failedAt": "2021-01-21T19:39:53Z",
"firstName": "Jerry",
"lastDeclinedAt": "2021-01-21T19:31:13Z",
"lastName": "Seinfeld",
"lastRequestedAt": "2021-01-21T19:22:31Z",
"phoneNumber": "+19591234567",
"provider": "p9",
"recipientProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"required": [
"accountNumber",
"accountPin",
"accountType",
"address",
"birthday",
"donorProvider",
"donorProviderApproval",
"firstName",
"lastName"
],
"scheduledOn": "2021-01-21",
"status": "draft",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
}
}
Updates the specified subscription by setting the values of the parameters passed.
The unique identifier for an existing user address to be used for the subscription.
Once a subscription has a user address it cannot be removed, only updated to a different user address. Only available for active subscriptions.
"adr_0SNlurA049MEWV5ELDmnaqVXgTFT"The unique identifier for the subscription.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"Returns the updated subscription.
Type of object is always subscription.
subscription Unique identifier for the subscription.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"Time when the subscription was activated.
"2021-01-21T19:38:34Z"Time when the subscription was canceled.
"2021-01-29T13:22:51Z"Cause of subscription cancellation.
cancellationRequested deviceBlocked deviceNotSupported invoiceUnpaid paymentDisputed paymentFailed phoneNumberPortedOut portingExpired simUnusable subscriptionEnded userDeleted Comment from the user explaining the cancellation reason. It is only present when the userReason is other.
Reason for the user to cancel the subscription. It is only present when the cause is cancellationRequested
connectivityIssues customerService noDetails other tooExpensive unused Time when the subscription was created.
"2021-01-21T19:32:13Z"Sequence number of the period.
1>= 1Beginning of the period.
"2021-01-21T19:32:13Z"End of the period.
"2021-02-20T19:38:34Z"Earliest time at which the subscription can currently be ended. This depends on the minimum period of the plan. This value is present after the first period has already started, and before the subscription has ended."
"2021-02-20T19:38:34Z"Time when the subscription will end or has ended. This field is populated in different scenarios:
"2021-02-20T19:38:34Z"Time when the subscription was first used.
"2021-01-21T19:38:34Z"The phone number attached to the SIM in E.164 string_format. Only available for voice plans.
"+19591234567"Time when a restore was requested for the subscription. It is set when a restore is accepted and cleared once the restore completes.
"2021-02-21T19:38:34Z"Time when the subscription was restricted.
"2021-02-21T19:38:34Z"Determines how the subscription is restricted. It can have one of the following values:
incomingOnly: The subscription line can receive calls & SMS, but cannot make calls, send SMS, or use data.noData: The subscription line can make and receive calls & SMS, but cannot use data.throttledData: The subscription line can still make and receive calls & SMS, and use up to 1GB of data at a reduced speed."incomingOnly"incomingOnly noData throttledData Determines how the subscription is restored. It can have one of the following values:
resetPeriodAnchor: The subscription cycle is reset to the date of restoration. This means the user has a whole new period to use their plan allowance that was just restored.keepPeriodAnchor: The subscription cycle remains unchanged. The next renewal date stays the same as before the restriction."resetPeriodAnchor"keepPeriodAnchor resetPeriodAnchor Determines the cause that triggered the subscription restriction. It can have one of the following values:
invoiceOverdue: The subscription was automatically restricted due to an unpaid invoice that has become overdue.restrictionRequested: The subscription was manually restricted due to an explicit request."invoiceOverdue"invoiceOverdue restrictionRequested The current status of the subscription. Note that the initiated status
is currently only available when using the Billing API, where it implies
that the subscription's first invoice has not yet been paid.
pending initiated active restricted ended Current user address identifier (if any) related with the subscription.
"adr_0SNlurA049MEWV5ELDmnaqVXgTFT"curl https://api.gigs.com/projects/${GIGS_PROJECT}/subscriptions/{subscription} \
-X PATCH \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json" \
-d '{
"metadata": {},
"billing": {
"discount": {
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN"
},
"invoiceGracePeriodDays": 3,
"invoiceOverduePeriodDays": 1,
"invoiceOverdueAction": "end"
},
"userAddress": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT"
}'
{
"object": "subscription",
"id": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"metadata": {},
"activatedAt": "2021-01-21T19:38:34Z",
"billing": {
"discount": {
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"expiresAt": "2021-02-20T19:38:34Z"
},
"invoiceGracePeriodDays": 3,
"invoiceOverduePeriodDays": 1,
"invoiceOverdueAction": null,
"restrictBehavior": null,
"restoreBehavior": null
},
"canceledAt": "2021-01-29T13:22:51Z",
"cancellationDetails": {
"cause": "cancellationRequested",
"userReason": "connectivityIssues"
},
"createdAt": "2021-01-21T19:32:13Z",
"currentPeriod": {
"number": 1,
"start": "2021-01-21T19:32:13Z",
"end": "2021-02-20T19:38:34Z"
},
"earliestEndAt": "2021-02-20T19:38:34Z",
"endedAt": "2021-02-20T19:38:34Z",
"firstUsageAt": "2021-01-21T19:38:34Z",
"lastPorting": {
"object": "porting",
"id": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"accountNumber": "123456789",
"accountPinExists": true,
"accountType": "prepaidUnregistered",
"address": {
"city": "New York City",
"country": "US",
"line1": "129 West 81st Street",
"line2": "Apartment 5",
"postalCode": "10024",
"state": "NY"
},
"behavior": "portIn",
"billingPinExists": true,
"birthday": "2017-07-21",
"canceledAt": "2021-01-21T19:39:53Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"declinedAttempts": 0,
"declinedCode": "portingPhoneNumberPortProtected",
"declinedMessage": "The phone number has port protection on the provider.",
"donorProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"donorProviderApproval": true,
"expiredAt": "2021-01-21T19:39:53Z",
"failedAt": "2021-01-21T19:39:53Z",
"firstName": "Jerry",
"lastDeclinedAt": "2021-01-21T19:31:13Z",
"lastName": "Seinfeld",
"lastRequestedAt": "2021-01-21T19:22:31Z",
"phoneNumber": "+19591234567",
"provider": "p9",
"recipientProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"required": [
"accountNumber",
"accountPin",
"accountType",
"address",
"birthday",
"donorProvider",
"donorProviderApproval",
"firstName",
"lastName"
],
"scheduledOn": "2021-01-21",
"status": "draft",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
},
"phoneNumber": "+19591234567",
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"activationTrigger": "creation",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"createdAt": "2021-01-21T19:38:34Z",
"description": "A data plan you will love! Operates in most countries of the world.",
"firstPeriodTrigger": "creation",
"image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
"limits": {
"dataBytes": 100000000000,
"bandwidthBitsPerSecond": 100000000,
"throttling": {
"thresholdBytes": 10000000000,
"bandwidthBitsPerSecond": 512000
}
},
"name": "Gigs Global",
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"requirements": {
"address": "present",
"device": "none",
"user.birthday": "none",
"user.fullName": "present"
},
"simTypes": [
"eSIM",
"pSIM"
],
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
},
"restoreRequestedAt": "2021-02-21T19:38:34Z",
"restrictedAt": "2021-02-21T19:38:34Z",
"restrictionDetails": {
"restrictBehavior": "incomingOnly",
"restoreBehavior": "resetPeriodAnchor",
"cause": "invoiceOverdue"
},
"sim": {
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
},
"status": "pending",
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"createdAt": "2021-01-21T19:38:34Z",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"status": "active"
},
"userAddress": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
"porting": {
"object": "porting",
"id": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"accountNumber": "123456789",
"accountPinExists": true,
"accountType": "prepaidUnregistered",
"address": {
"city": "New York City",
"country": "US",
"line1": "129 West 81st Street",
"line2": "Apartment 5",
"postalCode": "10024",
"state": "NY"
},
"behavior": "portIn",
"billingPinExists": true,
"birthday": "2017-07-21",
"canceledAt": "2021-01-21T19:39:53Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"declinedAttempts": 0,
"declinedCode": "portingPhoneNumberPortProtected",
"declinedMessage": "The phone number has port protection on the provider.",
"donorProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"donorProviderApproval": true,
"expiredAt": "2021-01-21T19:39:53Z",
"failedAt": "2021-01-21T19:39:53Z",
"firstName": "Jerry",
"lastDeclinedAt": "2021-01-21T19:31:13Z",
"lastName": "Seinfeld",
"lastRequestedAt": "2021-01-21T19:22:31Z",
"phoneNumber": "+19591234567",
"provider": "p9",
"recipientProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"required": [
"accountNumber",
"accountPin",
"accountType",
"address",
"birthday",
"donorProvider",
"donorProviderApproval",
"firstName",
"lastName"
],
"scheduledOn": "2021-01-21",
"status": "draft",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
}
}
Cancels a subscription. A canceled subscription still has connectivity, but is no longer renewed.
A canceled subscription is ended at the end of its contract term (as defined by its plan) or, if it is already past the term, at the end of its current period.
Note that the status of a subscription that has been canceled will
remain active until the endedAt date is reached, at which point it
will be updated to ended.
A subscription can only be canceled up to one hour before its renewal. If it is canceled after this point, it will be ended after the following period.
A canceled subscription that hasn't yet ended can be resumed.
Note: Cancellation is rejected when the subscription might never activate on its own, e.g. the porting has not been submitted to the provider yet. Use the end endpoint instead to immediately terminate the subscription.
Comment from the user explaining the cancellation reason. It is only present when the userReason is other.
Reason for the user to cancel the subscription.
connectivityIssues customerService noDetails other tooExpensive unused The unique identifier for the subscription.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"Returns the subscription after a successful cancellation.
Type of object is always subscription.
subscription Unique identifier for the subscription.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"Time when the subscription was activated.
"2021-01-21T19:38:34Z"Time when the subscription was canceled.
"2021-01-29T13:22:51Z"Cause of subscription cancellation.
cancellationRequested deviceBlocked deviceNotSupported invoiceUnpaid paymentDisputed paymentFailed phoneNumberPortedOut portingExpired simUnusable subscriptionEnded userDeleted Comment from the user explaining the cancellation reason. It is only present when the userReason is other.
Reason for the user to cancel the subscription. It is only present when the cause is cancellationRequested
connectivityIssues customerService noDetails other tooExpensive unused Time when the subscription was created.
"2021-01-21T19:32:13Z"Sequence number of the period.
1>= 1Beginning of the period.
"2021-01-21T19:32:13Z"End of the period.
"2021-02-20T19:38:34Z"Earliest time at which the subscription can currently be ended. This depends on the minimum period of the plan. This value is present after the first period has already started, and before the subscription has ended."
"2021-02-20T19:38:34Z"Time when the subscription will end or has ended. This field is populated in different scenarios:
"2021-02-20T19:38:34Z"Time when the subscription was first used.
"2021-01-21T19:38:34Z"The phone number attached to the SIM in E.164 string_format. Only available for voice plans.
"+19591234567"Time when a restore was requested for the subscription. It is set when a restore is accepted and cleared once the restore completes.
"2021-02-21T19:38:34Z"Time when the subscription was restricted.
"2021-02-21T19:38:34Z"Determines how the subscription is restricted. It can have one of the following values:
incomingOnly: The subscription line can receive calls & SMS, but cannot make calls, send SMS, or use data.noData: The subscription line can make and receive calls & SMS, but cannot use data.throttledData: The subscription line can still make and receive calls & SMS, and use up to 1GB of data at a reduced speed."incomingOnly"incomingOnly noData throttledData Determines how the subscription is restored. It can have one of the following values:
resetPeriodAnchor: The subscription cycle is reset to the date of restoration. This means the user has a whole new period to use their plan allowance that was just restored.keepPeriodAnchor: The subscription cycle remains unchanged. The next renewal date stays the same as before the restriction."resetPeriodAnchor"keepPeriodAnchor resetPeriodAnchor Determines the cause that triggered the subscription restriction. It can have one of the following values:
invoiceOverdue: The subscription was automatically restricted due to an unpaid invoice that has become overdue.restrictionRequested: The subscription was manually restricted due to an explicit request."invoiceOverdue"invoiceOverdue restrictionRequested The current status of the subscription. Note that the initiated status
is currently only available when using the Billing API, where it implies
that the subscription's first invoice has not yet been paid.
pending initiated active restricted ended Current user address identifier (if any) related with the subscription.
"adr_0SNlurA049MEWV5ELDmnaqVXgTFT"curl https://api.gigs.com/projects/${GIGS_PROJECT}/subscriptions/{subscription}/cancel \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json" \
-d '{
"cancellationDetails": {
"userReason": "connectivityIssues"
}
}'
{
"object": "subscription",
"id": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"metadata": {},
"activatedAt": "2021-01-21T19:38:34Z",
"billing": {
"discount": {
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"expiresAt": "2021-02-20T19:38:34Z"
},
"invoiceGracePeriodDays": 3,
"invoiceOverduePeriodDays": 1,
"invoiceOverdueAction": null,
"restrictBehavior": null,
"restoreBehavior": null
},
"canceledAt": "2021-01-29T13:22:51Z",
"cancellationDetails": {
"cause": "cancellationRequested",
"userReason": "connectivityIssues"
},
"createdAt": "2021-01-21T19:32:13Z",
"currentPeriod": {
"number": 1,
"start": "2021-01-21T19:32:13Z",
"end": "2021-02-20T19:38:34Z"
},
"earliestEndAt": "2021-02-20T19:38:34Z",
"endedAt": "2021-02-20T19:38:34Z",
"firstUsageAt": "2021-01-21T19:38:34Z",
"lastPorting": {
"object": "porting",
"id": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"accountNumber": "123456789",
"accountPinExists": true,
"accountType": "prepaidUnregistered",
"address": {
"city": "New York City",
"country": "US",
"line1": "129 West 81st Street",
"line2": "Apartment 5",
"postalCode": "10024",
"state": "NY"
},
"behavior": "portIn",
"billingPinExists": true,
"birthday": "2017-07-21",
"canceledAt": "2021-01-21T19:39:53Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"declinedAttempts": 0,
"declinedCode": "portingPhoneNumberPortProtected",
"declinedMessage": "The phone number has port protection on the provider.",
"donorProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"donorProviderApproval": true,
"expiredAt": "2021-01-21T19:39:53Z",
"failedAt": "2021-01-21T19:39:53Z",
"firstName": "Jerry",
"lastDeclinedAt": "2021-01-21T19:31:13Z",
"lastName": "Seinfeld",
"lastRequestedAt": "2021-01-21T19:22:31Z",
"phoneNumber": "+19591234567",
"provider": "p9",
"recipientProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"required": [
"accountNumber",
"accountPin",
"accountType",
"address",
"birthday",
"donorProvider",
"donorProviderApproval",
"firstName",
"lastName"
],
"scheduledOn": "2021-01-21",
"status": "draft",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
},
"phoneNumber": "+19591234567",
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"activationTrigger": "creation",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"createdAt": "2021-01-21T19:38:34Z",
"description": "A data plan you will love! Operates in most countries of the world.",
"firstPeriodTrigger": "creation",
"image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
"limits": {
"dataBytes": 100000000000,
"bandwidthBitsPerSecond": 100000000,
"throttling": {
"thresholdBytes": 10000000000,
"bandwidthBitsPerSecond": 512000
}
},
"name": "Gigs Global",
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"requirements": {
"address": "present",
"device": "none",
"user.birthday": "none",
"user.fullName": "present"
},
"simTypes": [
"eSIM",
"pSIM"
],
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
},
"restoreRequestedAt": "2021-02-21T19:38:34Z",
"restrictedAt": "2021-02-21T19:38:34Z",
"restrictionDetails": {
"restrictBehavior": "incomingOnly",
"restoreBehavior": "resetPeriodAnchor",
"cause": "invoiceOverdue"
},
"sim": {
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
},
"status": "pending",
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"createdAt": "2021-01-21T19:38:34Z",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"status": "active"
},
"userAddress": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
"porting": {
"object": "porting",
"id": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"accountNumber": "123456789",
"accountPinExists": true,
"accountType": "prepaidUnregistered",
"address": {
"city": "New York City",
"country": "US",
"line1": "129 West 81st Street",
"line2": "Apartment 5",
"postalCode": "10024",
"state": "NY"
},
"behavior": "portIn",
"billingPinExists": true,
"birthday": "2017-07-21",
"canceledAt": "2021-01-21T19:39:53Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"declinedAttempts": 0,
"declinedCode": "portingPhoneNumberPortProtected",
"declinedMessage": "The phone number has port protection on the provider.",
"donorProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"donorProviderApproval": true,
"expiredAt": "2021-01-21T19:39:53Z",
"failedAt": "2021-01-21T19:39:53Z",
"firstName": "Jerry",
"lastDeclinedAt": "2021-01-21T19:31:13Z",
"lastName": "Seinfeld",
"lastRequestedAt": "2021-01-21T19:22:31Z",
"phoneNumber": "+19591234567",
"provider": "p9",
"recipientProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"required": [
"accountNumber",
"accountPin",
"accountType",
"address",
"birthday",
"donorProvider",
"donorProviderApproval",
"firstName",
"lastName"
],
"scheduledOn": "2021-01-21",
"status": "draft",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
}
}
Port a phone number into an active subscription.
The subscription remains activated and connected to the old phone number until the porting is completed. After the porting is completed, the phone number of this subscription is updated.
This endpoint is currently in preview and might change in the future.
We’re excited to hear your feedback and ideas. Please send an email to support@gigs.com to share your thoughts.
The unique identifier for the subscription.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"Returns the subscription after successfully requesting the port in.
Type of object is always subscription.
subscription Unique identifier for the subscription.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"Time when the subscription was activated.
"2021-01-21T19:38:34Z"Time when the subscription was canceled.
"2021-01-29T13:22:51Z"Cause of subscription cancellation.
cancellationRequested deviceBlocked deviceNotSupported invoiceUnpaid paymentDisputed paymentFailed phoneNumberPortedOut portingExpired simUnusable subscriptionEnded userDeleted Comment from the user explaining the cancellation reason. It is only present when the userReason is other.
Reason for the user to cancel the subscription. It is only present when the cause is cancellationRequested
connectivityIssues customerService noDetails other tooExpensive unused Time when the subscription was created.
"2021-01-21T19:32:13Z"Sequence number of the period.
1>= 1Beginning of the period.
"2021-01-21T19:32:13Z"End of the period.
"2021-02-20T19:38:34Z"Earliest time at which the subscription can currently be ended. This depends on the minimum period of the plan. This value is present after the first period has already started, and before the subscription has ended."
"2021-02-20T19:38:34Z"Time when the subscription will end or has ended. This field is populated in different scenarios:
"2021-02-20T19:38:34Z"Time when the subscription was first used.
"2021-01-21T19:38:34Z"The phone number attached to the SIM in E.164 string_format. Only available for voice plans.
"+19591234567"Time when a restore was requested for the subscription. It is set when a restore is accepted and cleared once the restore completes.
"2021-02-21T19:38:34Z"Time when the subscription was restricted.
"2021-02-21T19:38:34Z"Determines how the subscription is restricted. It can have one of the following values:
incomingOnly: The subscription line can receive calls & SMS, but cannot make calls, send SMS, or use data.noData: The subscription line can make and receive calls & SMS, but cannot use data.throttledData: The subscription line can still make and receive calls & SMS, and use up to 1GB of data at a reduced speed."incomingOnly"incomingOnly noData throttledData Determines how the subscription is restored. It can have one of the following values:
resetPeriodAnchor: The subscription cycle is reset to the date of restoration. This means the user has a whole new period to use their plan allowance that was just restored.keepPeriodAnchor: The subscription cycle remains unchanged. The next renewal date stays the same as before the restriction."resetPeriodAnchor"keepPeriodAnchor resetPeriodAnchor Determines the cause that triggered the subscription restriction. It can have one of the following values:
invoiceOverdue: The subscription was automatically restricted due to an unpaid invoice that has become overdue.restrictionRequested: The subscription was manually restricted due to an explicit request."invoiceOverdue"invoiceOverdue restrictionRequested The current status of the subscription. Note that the initiated status
is currently only available when using the Billing API, where it implies
that the subscription's first invoice has not yet been paid.
pending initiated active restricted ended Current user address identifier (if any) related with the subscription.
"adr_0SNlurA049MEWV5ELDmnaqVXgTFT"curl https://api.gigs.com/projects/${GIGS_PROJECT}/subscriptions/{subscription}/portIn \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json" \
-d '{
"porting": "prt_0SNlurA049MEWV39s2kSYqaat7ZS"
}'
{
"object": "subscription",
"id": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"metadata": {},
"activatedAt": "2021-01-21T19:38:34Z",
"billing": {
"discount": {
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"expiresAt": "2021-02-20T19:38:34Z"
},
"invoiceGracePeriodDays": 3,
"invoiceOverduePeriodDays": 1,
"invoiceOverdueAction": null,
"restrictBehavior": null,
"restoreBehavior": null
},
"canceledAt": "2021-01-29T13:22:51Z",
"cancellationDetails": {
"cause": "cancellationRequested",
"userReason": "connectivityIssues"
},
"createdAt": "2021-01-21T19:32:13Z",
"currentPeriod": {
"number": 1,
"start": "2021-01-21T19:32:13Z",
"end": "2021-02-20T19:38:34Z"
},
"earliestEndAt": "2021-02-20T19:38:34Z",
"endedAt": "2021-02-20T19:38:34Z",
"firstUsageAt": "2021-01-21T19:38:34Z",
"lastPorting": {
"object": "porting",
"id": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"accountNumber": "123456789",
"accountPinExists": true,
"accountType": "prepaidUnregistered",
"address": {
"city": "New York City",
"country": "US",
"line1": "129 West 81st Street",
"line2": "Apartment 5",
"postalCode": "10024",
"state": "NY"
},
"behavior": "portIn",
"billingPinExists": true,
"birthday": "2017-07-21",
"canceledAt": "2021-01-21T19:39:53Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"declinedAttempts": 0,
"declinedCode": "portingPhoneNumberPortProtected",
"declinedMessage": "The phone number has port protection on the provider.",
"donorProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"donorProviderApproval": true,
"expiredAt": "2021-01-21T19:39:53Z",
"failedAt": "2021-01-21T19:39:53Z",
"firstName": "Jerry",
"lastDeclinedAt": "2021-01-21T19:31:13Z",
"lastName": "Seinfeld",
"lastRequestedAt": "2021-01-21T19:22:31Z",
"phoneNumber": "+19591234567",
"provider": "p9",
"recipientProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"required": [
"accountNumber",
"accountPin",
"accountType",
"address",
"birthday",
"donorProvider",
"donorProviderApproval",
"firstName",
"lastName"
],
"scheduledOn": "2021-01-21",
"status": "draft",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
},
"phoneNumber": "+19591234567",
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"activationTrigger": "creation",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"createdAt": "2021-01-21T19:38:34Z",
"description": "A data plan you will love! Operates in most countries of the world.",
"firstPeriodTrigger": "creation",
"image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
"limits": {
"dataBytes": 100000000000,
"bandwidthBitsPerSecond": 100000000,
"throttling": {
"thresholdBytes": 10000000000,
"bandwidthBitsPerSecond": 512000
}
},
"name": "Gigs Global",
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"requirements": {
"address": "present",
"device": "none",
"user.birthday": "none",
"user.fullName": "present"
},
"simTypes": [
"eSIM",
"pSIM"
],
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
},
"restoreRequestedAt": "2021-02-21T19:38:34Z",
"restrictedAt": "2021-02-21T19:38:34Z",
"restrictionDetails": {
"restrictBehavior": "incomingOnly",
"restoreBehavior": "resetPeriodAnchor",
"cause": "invoiceOverdue"
},
"sim": {
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
},
"status": "pending",
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"createdAt": "2021-01-21T19:38:34Z",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"status": "active"
},
"userAddress": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
"porting": {
"object": "porting",
"id": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"accountNumber": "123456789",
"accountPinExists": true,
"accountType": "prepaidUnregistered",
"address": {
"city": "New York City",
"country": "US",
"line1": "129 West 81st Street",
"line2": "Apartment 5",
"postalCode": "10024",
"state": "NY"
},
"behavior": "portIn",
"billingPinExists": true,
"birthday": "2017-07-21",
"canceledAt": "2021-01-21T19:39:53Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"declinedAttempts": 0,
"declinedCode": "portingPhoneNumberPortProtected",
"declinedMessage": "The phone number has port protection on the provider.",
"donorProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"donorProviderApproval": true,
"expiredAt": "2021-01-21T19:39:53Z",
"failedAt": "2021-01-21T19:39:53Z",
"firstName": "Jerry",
"lastDeclinedAt": "2021-01-21T19:31:13Z",
"lastName": "Seinfeld",
"lastRequestedAt": "2021-01-21T19:22:31Z",
"phoneNumber": "+19591234567",
"provider": "p9",
"recipientProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"required": [
"accountNumber",
"accountPin",
"accountType",
"address",
"birthday",
"donorProvider",
"donorProviderApproval",
"firstName",
"lastName"
],
"scheduledOn": "2021-01-21",
"status": "draft",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
}
}
Ends a subscriptions immediately given its identifier.
Additionally, you can pass in optional cancellation details in the request body, which will be used to provide more context on why the subscription was ended.
Comment from the user explaining the cancellation reason. It is only present when the userReason is other.
Reason for the user to cancel the subscription.
connectivityIssues customerService noDetails other tooExpensive unused The unique identifier for the subscription.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"Returns the ended subscription after a successful termination.
Type of object is always subscription.
subscription Unique identifier for the subscription.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"Time when the subscription was activated.
"2021-01-21T19:38:34Z"Time when the subscription was canceled.
"2021-01-29T13:22:51Z"Cause of subscription cancellation.
cancellationRequested deviceBlocked deviceNotSupported invoiceUnpaid paymentDisputed paymentFailed phoneNumberPortedOut portingExpired simUnusable subscriptionEnded userDeleted Comment from the user explaining the cancellation reason. It is only present when the userReason is other.
Reason for the user to cancel the subscription. It is only present when the cause is cancellationRequested
connectivityIssues customerService noDetails other tooExpensive unused Time when the subscription was created.
"2021-01-21T19:32:13Z"Sequence number of the period.
1>= 1Beginning of the period.
"2021-01-21T19:32:13Z"End of the period.
"2021-02-20T19:38:34Z"Earliest time at which the subscription can currently be ended. This depends on the minimum period of the plan. This value is present after the first period has already started, and before the subscription has ended."
"2021-02-20T19:38:34Z"Time when the subscription will end or has ended. This field is populated in different scenarios:
"2021-02-20T19:38:34Z"Time when the subscription was first used.
"2021-01-21T19:38:34Z"The phone number attached to the SIM in E.164 string_format. Only available for voice plans.
"+19591234567"Time when a restore was requested for the subscription. It is set when a restore is accepted and cleared once the restore completes.
"2021-02-21T19:38:34Z"Time when the subscription was restricted.
"2021-02-21T19:38:34Z"Determines how the subscription is restricted. It can have one of the following values:
incomingOnly: The subscription line can receive calls & SMS, but cannot make calls, send SMS, or use data.noData: The subscription line can make and receive calls & SMS, but cannot use data.throttledData: The subscription line can still make and receive calls & SMS, and use up to 1GB of data at a reduced speed."incomingOnly"incomingOnly noData throttledData Determines how the subscription is restored. It can have one of the following values:
resetPeriodAnchor: The subscription cycle is reset to the date of restoration. This means the user has a whole new period to use their plan allowance that was just restored.keepPeriodAnchor: The subscription cycle remains unchanged. The next renewal date stays the same as before the restriction."resetPeriodAnchor"keepPeriodAnchor resetPeriodAnchor Determines the cause that triggered the subscription restriction. It can have one of the following values:
invoiceOverdue: The subscription was automatically restricted due to an unpaid invoice that has become overdue.restrictionRequested: The subscription was manually restricted due to an explicit request."invoiceOverdue"invoiceOverdue restrictionRequested The current status of the subscription. Note that the initiated status
is currently only available when using the Billing API, where it implies
that the subscription's first invoice has not yet been paid.
pending initiated active restricted ended Current user address identifier (if any) related with the subscription.
"adr_0SNlurA049MEWV5ELDmnaqVXgTFT"curl https://api.gigs.com/projects/${GIGS_PROJECT}/subscriptions/{subscription}/end \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json" \
-d '{
"cancellationDetails": {
"userReason": "connectivityIssues"
}
}'
{
"object": "subscription",
"id": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"metadata": {},
"activatedAt": "2021-01-21T19:38:34Z",
"billing": {
"discount": {
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"expiresAt": "2021-02-20T19:38:34Z"
},
"invoiceGracePeriodDays": 3,
"invoiceOverduePeriodDays": 1,
"invoiceOverdueAction": null,
"restrictBehavior": null,
"restoreBehavior": null
},
"canceledAt": "2021-01-29T13:22:51Z",
"cancellationDetails": {
"cause": "cancellationRequested",
"userReason": "connectivityIssues"
},
"createdAt": "2021-01-21T19:32:13Z",
"currentPeriod": {
"number": 1,
"start": "2021-01-21T19:32:13Z",
"end": "2021-02-20T19:38:34Z"
},
"earliestEndAt": "2021-02-20T19:38:34Z",
"endedAt": "2021-02-20T19:38:34Z",
"firstUsageAt": "2021-01-21T19:38:34Z",
"lastPorting": {
"object": "porting",
"id": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"accountNumber": "123456789",
"accountPinExists": true,
"accountType": "prepaidUnregistered",
"address": {
"city": "New York City",
"country": "US",
"line1": "129 West 81st Street",
"line2": "Apartment 5",
"postalCode": "10024",
"state": "NY"
},
"behavior": "portIn",
"billingPinExists": true,
"birthday": "2017-07-21",
"canceledAt": "2021-01-21T19:39:53Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"declinedAttempts": 0,
"declinedCode": "portingPhoneNumberPortProtected",
"declinedMessage": "The phone number has port protection on the provider.",
"donorProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"donorProviderApproval": true,
"expiredAt": "2021-01-21T19:39:53Z",
"failedAt": "2021-01-21T19:39:53Z",
"firstName": "Jerry",
"lastDeclinedAt": "2021-01-21T19:31:13Z",
"lastName": "Seinfeld",
"lastRequestedAt": "2021-01-21T19:22:31Z",
"phoneNumber": "+19591234567",
"provider": "p9",
"recipientProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"required": [
"accountNumber",
"accountPin",
"accountType",
"address",
"birthday",
"donorProvider",
"donorProviderApproval",
"firstName",
"lastName"
],
"scheduledOn": "2021-01-21",
"status": "draft",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
},
"phoneNumber": "+19591234567",
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"activationTrigger": "creation",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"createdAt": "2021-01-21T19:38:34Z",
"description": "A data plan you will love! Operates in most countries of the world.",
"firstPeriodTrigger": "creation",
"image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
"limits": {
"dataBytes": 100000000000,
"bandwidthBitsPerSecond": 100000000,
"throttling": {
"thresholdBytes": 10000000000,
"bandwidthBitsPerSecond": 512000
}
},
"name": "Gigs Global",
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"requirements": {
"address": "present",
"device": "none",
"user.birthday": "none",
"user.fullName": "present"
},
"simTypes": [
"eSIM",
"pSIM"
],
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
},
"restoreRequestedAt": "2021-02-21T19:38:34Z",
"restrictedAt": "2021-02-21T19:38:34Z",
"restrictionDetails": {
"restrictBehavior": "incomingOnly",
"restoreBehavior": "resetPeriodAnchor",
"cause": "invoiceOverdue"
},
"sim": {
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
},
"status": "pending",
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"createdAt": "2021-01-21T19:38:34Z",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"status": "active"
},
"userAddress": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
"porting": {
"object": "porting",
"id": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"accountNumber": "123456789",
"accountPinExists": true,
"accountType": "prepaidUnregistered",
"address": {
"city": "New York City",
"country": "US",
"line1": "129 West 81st Street",
"line2": "Apartment 5",
"postalCode": "10024",
"state": "NY"
},
"behavior": "portIn",
"billingPinExists": true,
"birthday": "2017-07-21",
"canceledAt": "2021-01-21T19:39:53Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"declinedAttempts": 0,
"declinedCode": "portingPhoneNumberPortProtected",
"declinedMessage": "The phone number has port protection on the provider.",
"donorProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"donorProviderApproval": true,
"expiredAt": "2021-01-21T19:39:53Z",
"failedAt": "2021-01-21T19:39:53Z",
"firstName": "Jerry",
"lastDeclinedAt": "2021-01-21T19:31:13Z",
"lastName": "Seinfeld",
"lastRequestedAt": "2021-01-21T19:22:31Z",
"phoneNumber": "+19591234567",
"provider": "p9",
"recipientProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"required": [
"accountNumber",
"accountPin",
"accountType",
"address",
"birthday",
"donorProvider",
"donorProviderApproval",
"firstName",
"lastName"
],
"scheduledOn": "2021-01-21",
"status": "draft",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
}
}
Removes the cancellation and end times of the subscription. The subscription will continue to auto-renew until canceled again.
The unique identifier for the subscription.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"Returns the resumed subscription.
Type of object is always subscription.
subscription Unique identifier for the subscription.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"Time when the subscription was activated.
"2021-01-21T19:38:34Z"Time when the subscription was canceled.
"2021-01-29T13:22:51Z"Cause of subscription cancellation.
cancellationRequested deviceBlocked deviceNotSupported invoiceUnpaid paymentDisputed paymentFailed phoneNumberPortedOut portingExpired simUnusable subscriptionEnded userDeleted Comment from the user explaining the cancellation reason. It is only present when the userReason is other.
Reason for the user to cancel the subscription. It is only present when the cause is cancellationRequested
connectivityIssues customerService noDetails other tooExpensive unused Time when the subscription was created.
"2021-01-21T19:32:13Z"Sequence number of the period.
1>= 1Beginning of the period.
"2021-01-21T19:32:13Z"End of the period.
"2021-02-20T19:38:34Z"Earliest time at which the subscription can currently be ended. This depends on the minimum period of the plan. This value is present after the first period has already started, and before the subscription has ended."
"2021-02-20T19:38:34Z"Time when the subscription will end or has ended. This field is populated in different scenarios:
"2021-02-20T19:38:34Z"Time when the subscription was first used.
"2021-01-21T19:38:34Z"The phone number attached to the SIM in E.164 string_format. Only available for voice plans.
"+19591234567"Time when a restore was requested for the subscription. It is set when a restore is accepted and cleared once the restore completes.
"2021-02-21T19:38:34Z"Time when the subscription was restricted.
"2021-02-21T19:38:34Z"Determines how the subscription is restricted. It can have one of the following values:
incomingOnly: The subscription line can receive calls & SMS, but cannot make calls, send SMS, or use data.noData: The subscription line can make and receive calls & SMS, but cannot use data.throttledData: The subscription line can still make and receive calls & SMS, and use up to 1GB of data at a reduced speed."incomingOnly"incomingOnly noData throttledData Determines how the subscription is restored. It can have one of the following values:
resetPeriodAnchor: The subscription cycle is reset to the date of restoration. This means the user has a whole new period to use their plan allowance that was just restored.keepPeriodAnchor: The subscription cycle remains unchanged. The next renewal date stays the same as before the restriction."resetPeriodAnchor"keepPeriodAnchor resetPeriodAnchor Determines the cause that triggered the subscription restriction. It can have one of the following values:
invoiceOverdue: The subscription was automatically restricted due to an unpaid invoice that has become overdue.restrictionRequested: The subscription was manually restricted due to an explicit request."invoiceOverdue"invoiceOverdue restrictionRequested The current status of the subscription. Note that the initiated status
is currently only available when using the Billing API, where it implies
that the subscription's first invoice has not yet been paid.
pending initiated active restricted ended Current user address identifier (if any) related with the subscription.
"adr_0SNlurA049MEWV5ELDmnaqVXgTFT"curl https://api.gigs.com/projects/${GIGS_PROJECT}/subscriptions/{subscription}/resume \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json"
{
"object": "subscription",
"id": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"metadata": {},
"activatedAt": "2021-01-21T19:38:34Z",
"billing": {
"discount": {
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"expiresAt": "2021-02-20T19:38:34Z"
},
"invoiceGracePeriodDays": 3,
"invoiceOverduePeriodDays": 1,
"invoiceOverdueAction": null,
"restrictBehavior": null,
"restoreBehavior": null
},
"canceledAt": "2021-01-29T13:22:51Z",
"cancellationDetails": {
"cause": "cancellationRequested",
"userReason": "connectivityIssues"
},
"createdAt": "2021-01-21T19:32:13Z",
"currentPeriod": {
"number": 1,
"start": "2021-01-21T19:32:13Z",
"end": "2021-02-20T19:38:34Z"
},
"earliestEndAt": "2021-02-20T19:38:34Z",
"endedAt": "2021-02-20T19:38:34Z",
"firstUsageAt": "2021-01-21T19:38:34Z",
"lastPorting": {
"object": "porting",
"id": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"accountNumber": "123456789",
"accountPinExists": true,
"accountType": "prepaidUnregistered",
"address": {
"city": "New York City",
"country": "US",
"line1": "129 West 81st Street",
"line2": "Apartment 5",
"postalCode": "10024",
"state": "NY"
},
"behavior": "portIn",
"billingPinExists": true,
"birthday": "2017-07-21",
"canceledAt": "2021-01-21T19:39:53Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"declinedAttempts": 0,
"declinedCode": "portingPhoneNumberPortProtected",
"declinedMessage": "The phone number has port protection on the provider.",
"donorProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"donorProviderApproval": true,
"expiredAt": "2021-01-21T19:39:53Z",
"failedAt": "2021-01-21T19:39:53Z",
"firstName": "Jerry",
"lastDeclinedAt": "2021-01-21T19:31:13Z",
"lastName": "Seinfeld",
"lastRequestedAt": "2021-01-21T19:22:31Z",
"phoneNumber": "+19591234567",
"provider": "p9",
"recipientProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"required": [
"accountNumber",
"accountPin",
"accountType",
"address",
"birthday",
"donorProvider",
"donorProviderApproval",
"firstName",
"lastName"
],
"scheduledOn": "2021-01-21",
"status": "draft",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
},
"phoneNumber": "+19591234567",
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"activationTrigger": "creation",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"createdAt": "2021-01-21T19:38:34Z",
"description": "A data plan you will love! Operates in most countries of the world.",
"firstPeriodTrigger": "creation",
"image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
"limits": {
"dataBytes": 100000000000,
"bandwidthBitsPerSecond": 100000000,
"throttling": {
"thresholdBytes": 10000000000,
"bandwidthBitsPerSecond": 512000
}
},
"name": "Gigs Global",
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"requirements": {
"address": "present",
"device": "none",
"user.birthday": "none",
"user.fullName": "present"
},
"simTypes": [
"eSIM",
"pSIM"
],
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
},
"restoreRequestedAt": "2021-02-21T19:38:34Z",
"restrictedAt": "2021-02-21T19:38:34Z",
"restrictionDetails": {
"restrictBehavior": "incomingOnly",
"restoreBehavior": "resetPeriodAnchor",
"cause": "invoiceOverdue"
},
"sim": {
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
},
"status": "pending",
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"createdAt": "2021-01-21T19:38:34Z",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"status": "active"
},
"userAddress": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
"porting": {
"object": "porting",
"id": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"accountNumber": "123456789",
"accountPinExists": true,
"accountType": "prepaidUnregistered",
"address": {
"city": "New York City",
"country": "US",
"line1": "129 West 81st Street",
"line2": "Apartment 5",
"postalCode": "10024",
"state": "NY"
},
"behavior": "portIn",
"billingPinExists": true,
"birthday": "2017-07-21",
"canceledAt": "2021-01-21T19:39:53Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"declinedAttempts": 0,
"declinedCode": "portingPhoneNumberPortProtected",
"declinedMessage": "The phone number has port protection on the provider.",
"donorProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"donorProviderApproval": true,
"expiredAt": "2021-01-21T19:39:53Z",
"failedAt": "2021-01-21T19:39:53Z",
"firstName": "Jerry",
"lastDeclinedAt": "2021-01-21T19:31:13Z",
"lastName": "Seinfeld",
"lastRequestedAt": "2021-01-21T19:22:31Z",
"phoneNumber": "+19591234567",
"provider": "p9",
"recipientProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"required": [
"accountNumber",
"accountPin",
"accountType",
"address",
"birthday",
"donorProvider",
"donorProviderApproval",
"firstName",
"lastName"
],
"scheduledOn": "2021-01-21",
"status": "draft",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
}
}
Searches for existing subscriptions matching the given parameters.
The E.164-formatted phone number associated with the subscription.
"+12065550123"Returns a list schema response with all found subscriptions.
Type of object is always list.
list subscription.A unique identifier to be used as after pagination parameter if more items are available sorted after the current batch of items.
A unique identifier to be used as before pagination parameter if more items are available sorted before the current batch of items.
curl https://api.gigs.com/projects/${GIGS_PROJECT}/subscriptions/search \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json" \
-d '{
"phoneNumber": "+12065550123"
}'
{
"object": "list",
"items": [
{
"object": "subscription",
"id": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"metadata": {},
"activatedAt": "2021-01-21T19:38:34Z",
"billing": {
"discount": {
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"expiresAt": "2021-02-20T19:38:34Z"
},
"invoiceGracePeriodDays": 3,
"invoiceOverduePeriodDays": 1,
"invoiceOverdueAction": null,
"restrictBehavior": null,
"restoreBehavior": null
},
"canceledAt": "2021-01-29T13:22:51Z",
"cancellationDetails": {
"cause": "cancellationRequested",
"userReason": "connectivityIssues"
},
"createdAt": "2021-01-21T19:32:13Z",
"currentPeriod": {
"number": 1,
"start": "2021-01-21T19:32:13Z",
"end": "2021-02-20T19:38:34Z"
},
"earliestEndAt": "2021-02-20T19:38:34Z",
"endedAt": "2021-02-20T19:38:34Z",
"firstUsageAt": "2021-01-21T19:38:34Z",
"lastPorting": {
"object": "porting",
"id": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"accountNumber": "123456789",
"accountPinExists": true,
"accountType": "prepaidUnregistered",
"address": {
"city": "New York City",
"country": "US",
"line1": "129 West 81st Street",
"line2": "Apartment 5",
"postalCode": "10024",
"state": "NY"
},
"behavior": "portIn",
"billingPinExists": true,
"birthday": "2017-07-21",
"canceledAt": "2021-01-21T19:39:53Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"declinedAttempts": 0,
"declinedCode": "portingPhoneNumberPortProtected",
"declinedMessage": "The phone number has port protection on the provider.",
"donorProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"donorProviderApproval": true,
"expiredAt": "2021-01-21T19:39:53Z",
"failedAt": "2021-01-21T19:39:53Z",
"firstName": "Jerry",
"lastDeclinedAt": "2021-01-21T19:31:13Z",
"lastName": "Seinfeld",
"lastRequestedAt": "2021-01-21T19:22:31Z",
"phoneNumber": "+19591234567",
"provider": "p9",
"recipientProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"required": [
"accountNumber",
"accountPin",
"accountType",
"address",
"birthday",
"donorProvider",
"donorProviderApproval",
"firstName",
"lastName"
],
"scheduledOn": "2021-01-21",
"status": "draft",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
},
"phoneNumber": "+19591234567",
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"activationTrigger": "creation",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"createdAt": "2021-01-21T19:38:34Z",
"description": "A data plan you will love! Operates in most countries of the world.",
"firstPeriodTrigger": "creation",
"image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
"limits": {
"dataBytes": 100000000000,
"bandwidthBitsPerSecond": 100000000,
"throttling": {
"thresholdBytes": 10000000000,
"bandwidthBitsPerSecond": 512000
}
},
"name": "Gigs Global",
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"requirements": {
"address": "present",
"device": "none",
"user.birthday": "none",
"user.fullName": "present"
},
"simTypes": [
"eSIM",
"pSIM"
],
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
},
"restoreRequestedAt": "2021-02-21T19:38:34Z",
"restrictedAt": "2021-02-21T19:38:34Z",
"restrictionDetails": {
"restrictBehavior": "incomingOnly",
"restoreBehavior": "resetPeriodAnchor",
"cause": "invoiceOverdue"
},
"sim": {
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
},
"status": "pending",
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"createdAt": "2021-01-21T19:38:34Z",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"status": "active"
},
"userAddress": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
"porting": {
"object": "porting",
"id": "prt_0SNlurA049MEWV39s2kSYqaat7ZS",
"accountNumber": "123456789",
"accountPinExists": true,
"accountType": "prepaidUnregistered",
"address": {
"city": "New York City",
"country": "US",
"line1": "129 West 81st Street",
"line2": "Apartment 5",
"postalCode": "10024",
"state": "NY"
},
"behavior": "portIn",
"billingPinExists": true,
"birthday": "2017-07-21",
"canceledAt": "2021-01-21T19:39:53Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"declinedAttempts": 0,
"declinedCode": "portingPhoneNumberPortProtected",
"declinedMessage": "The phone number has port protection on the provider.",
"donorProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"donorProviderApproval": true,
"expiredAt": "2021-01-21T19:39:53Z",
"failedAt": "2021-01-21T19:39:53Z",
"firstName": "Jerry",
"lastDeclinedAt": "2021-01-21T19:31:13Z",
"lastName": "Seinfeld",
"lastRequestedAt": "2021-01-21T19:22:31Z",
"phoneNumber": "+19591234567",
"provider": "p9",
"recipientProvider": {
"object": "serviceProvider",
"id": "svp_0SNlurA01K6GY5L0XJffY8",
"country": "US",
"name": "AT&T",
"recipientProviders": [
"p3"
]
},
"required": [
"accountNumber",
"accountPin",
"accountType",
"address",
"birthday",
"donorProvider",
"donorProviderApproval",
"firstName",
"lastName"
],
"scheduledOn": "2021-01-21",
"status": "draft",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
}
}
],
"moreItemsAfter": null,
"moreItemsBefore": null
}