Any change to a user’s subscription, such as swapping a SIM, or upgrading or downgrading a subscription.
Type of object is always subscriptionChange.
subscriptionChange Unique identifier for the subscription change.
"sch_0SNlurA049MEWV3bE0SMtbIEJApp"Time when the subscription change was applied.
"2021-01-21T19:36:57Z"Time when the subscription change was created.
"2021-01-21T19:12:28Z"An error code indicating the reason for a failed subscription change.
"consentNotGiven"Unique identifier of the target plan, to which the subscription should be changed. The new plan must have the same type of validity as the one it's replacing. E.g. a oneTime plan cannot be replaced by a recurring one. If the new plan's validity has a different unit or value than the plan it's replacing, then the change must be scheduled for the next renewal. See property "when" for more information about scheduling options for subscription change.
"pln_0SNlurA049MEWV3V0q7gjQbM4EVo"Unique identifier of the target SIM, to which the subscription should be changed. Can also be set to "auto", in which case an eSIM will be automatically allocated.
"sim_0SNlurA049MEWV1BAAmWZULA4lf6"When the change should take effect. If set to "now", the change will take effect immediately. If set to "renewal", the change will instead take effect at the next subscription renewal date. Plan changes can always happen on "renewal", but only selected network providers allow "now" changes. SIM changes can only happen "now".
"renewal"now renewal Approximate time when the change should take place. This is typically set for changes scheduled at renewal. For changes that take effect immediately (when requestedChange.when is "now"), this may be null.
"2021-01-21T19:12:28Z"The current status of the subscription change. Note that the initiated status
is currently only available when using the Billing API, where it implies that
the subscription change invoice has not yet been paid.
pending initiated applied failed deleted Unique identifier of the subscription to be changed.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"{
"object": "subscriptionChange",
"id": "sch_0SNlurA049MEWV3bE0SMtbIEJApp",
"appliedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28.0Z",
"failureCode": "consentNotGiven",
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"activationTrigger": "creation",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": {
"0": "DE",
"1": "FR",
"2": "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": {
"0": "eSIM",
"1": "pSIM"
},
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
},
"requestedChange": {
"plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"sim": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"when": "renewal"
},
"scheduledAt": "2021-01-21T19:12:28Z",
"sim": {
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34.0Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
},
"status": "pending",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi"
}
Returns a list of subscription changes. The subscription changes returned are sorted by creation date, with the most recently created subscription changes appearing first.
A comma-separated list of statuses to filter the subscription changes by.
pending,initiatedThe unique identifier for the subscription to be filtered by.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"The unique identifier for the user to be filtered by.
"usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"A 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 dictionary with an items property that contains an array of subscription changes.
Type of object is always list.
list subscriptionChange.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}/subscriptionChanges \
-X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json"
{
"object": "list",
"items": [
{
"object": "subscriptionChange",
"id": "sch_0SNlurA049MEWV3bE0SMtbIEJApp",
"appliedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"failureCode": "consentNotGiven",
"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"
},
"requestedChange": {
"plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"sim": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"when": "renewal"
},
"scheduledAt": "2021-01-21T19:12:28Z",
"sim": {
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
},
"status": "pending",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi"
}
],
"moreItemsAfter": null,
"moreItemsBefore": null
}
Creates a new subscription change for an existing subscription in the specified project.
Note that plan changes cannot be created within the cutoff period of 1 hour before the subscription period ends. In the UK, this cutoff period is extended to 13 hours but only for changes scheduled at renewal.
Unique identifier of the target plan, to which the subscription should be changed.
"pln_0SNlurA049MEWV3V0q7gjQbM4EVo"Unique identifier of the target SIM, to which the subscription should be changed. Can also be set to "auto", in which case an eSIM will be automatically allocated.
"sim_0SNlurA049MEWV1BAAmWZULA4lf6"Unique identifier of the subscription to be changed.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"When the change should take effect. If set to "now", the change will take effect immediately. If set to "renewal", the change will instead take effect at the next subscription renewal date. Plan changes can always happen on "renewal", but only selected network providers allow "now" changes. SIM changes can only happen "now".
"renewal"renewalnow renewal Returns the newly created subscription change.
Type of object is always subscriptionChange.
subscriptionChange Unique identifier for the subscription change.
"sch_0SNlurA049MEWV3bE0SMtbIEJApp"Time when the subscription change was applied.
"2021-01-21T19:36:57Z"Time when the subscription change was created.
"2021-01-21T19:12:28Z"An error code indicating the reason for a failed subscription change.
"consentNotGiven"Unique identifier of the target plan, to which the subscription should be changed. The new plan must have the same type of validity as the one it's replacing. E.g. a oneTime plan cannot be replaced by a recurring one. If the new plan's validity has a different unit or value than the plan it's replacing, then the change must be scheduled for the next renewal. See property "when" for more information about scheduling options for subscription change.
"pln_0SNlurA049MEWV3V0q7gjQbM4EVo"Unique identifier of the target SIM, to which the subscription should be changed. Can also be set to "auto", in which case an eSIM will be automatically allocated.
"sim_0SNlurA049MEWV1BAAmWZULA4lf6"When the change should take effect. If set to "now", the change will take effect immediately. If set to "renewal", the change will instead take effect at the next subscription renewal date. Plan changes can always happen on "renewal", but only selected network providers allow "now" changes. SIM changes can only happen "now".
"renewal"now renewal Approximate time when the change should take place. This is typically set for changes scheduled at renewal. For changes that take effect immediately (when requestedChange.when is "now"), this may be null.
"2021-01-21T19:12:28Z"The current status of the subscription change. Note that the initiated status
is currently only available when using the Billing API, where it implies that
the subscription change invoice has not yet been paid.
pending initiated applied failed deleted Unique identifier of the subscription to be changed.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"curl https://api.gigs.com/projects/${GIGS_PROJECT}/subscriptionChanges \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json" \
-d '{
"plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"sim": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"when": "renewal"
}'
{
"object": "subscriptionChange",
"id": "sch_0SNlurA049MEWV3bE0SMtbIEJApp",
"appliedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"failureCode": "consentNotGiven",
"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"
},
"requestedChange": {
"plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"sim": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"when": "renewal"
},
"scheduledAt": "2021-01-21T19:12:28Z",
"sim": {
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
},
"status": "pending",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi"
}
Retrieve the details of an existing subscription change which the authenticated user is authorized to view.
The unique identifier for the subscription change.
"sch_0SNlurA049MEWV3bE0SMtbIEJApp"Returns the subscription change if it exists.
Type of object is always subscriptionChange.
subscriptionChange Unique identifier for the subscription change.
"sch_0SNlurA049MEWV3bE0SMtbIEJApp"Time when the subscription change was applied.
"2021-01-21T19:36:57Z"Time when the subscription change was created.
"2021-01-21T19:12:28Z"An error code indicating the reason for a failed subscription change.
"consentNotGiven"Unique identifier of the target plan, to which the subscription should be changed. The new plan must have the same type of validity as the one it's replacing. E.g. a oneTime plan cannot be replaced by a recurring one. If the new plan's validity has a different unit or value than the plan it's replacing, then the change must be scheduled for the next renewal. See property "when" for more information about scheduling options for subscription change.
"pln_0SNlurA049MEWV3V0q7gjQbM4EVo"Unique identifier of the target SIM, to which the subscription should be changed. Can also be set to "auto", in which case an eSIM will be automatically allocated.
"sim_0SNlurA049MEWV1BAAmWZULA4lf6"When the change should take effect. If set to "now", the change will take effect immediately. If set to "renewal", the change will instead take effect at the next subscription renewal date. Plan changes can always happen on "renewal", but only selected network providers allow "now" changes. SIM changes can only happen "now".
"renewal"now renewal Approximate time when the change should take place. This is typically set for changes scheduled at renewal. For changes that take effect immediately (when requestedChange.when is "now"), this may be null.
"2021-01-21T19:12:28Z"The current status of the subscription change. Note that the initiated status
is currently only available when using the Billing API, where it implies that
the subscription change invoice has not yet been paid.
pending initiated applied failed deleted Unique identifier of the subscription to be changed.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"curl https://api.gigs.com/projects/${GIGS_PROJECT}/subscriptionChanges/{subscriptionChange} \
-X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json"
{
"object": "subscriptionChange",
"id": "sch_0SNlurA049MEWV3bE0SMtbIEJApp",
"appliedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"failureCode": "consentNotGiven",
"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"
},
"requestedChange": {
"plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"sim": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"when": "renewal"
},
"scheduledAt": "2021-01-21T19:12:28Z",
"sim": {
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
},
"status": "pending",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi"
}
Retrieve the details of an existing subscription change and delete it. Only subscription changes that have not been applied can be deleted.
The unique identifier for the subscription change.
"sch_0SNlurA049MEWV3bE0SMtbIEJApp"Returns the subscription change after a successful deletion.
Type of object is always subscriptionChange.
subscriptionChange Unique identifier for the subscription change.
"sch_0SNlurA049MEWV3bE0SMtbIEJApp"Time when the subscription change was applied.
"2021-01-21T19:36:57Z"Time when the subscription change was created.
"2021-01-21T19:12:28Z"An error code indicating the reason for a failed subscription change.
"consentNotGiven"Unique identifier of the target plan, to which the subscription should be changed. The new plan must have the same type of validity as the one it's replacing. E.g. a oneTime plan cannot be replaced by a recurring one. If the new plan's validity has a different unit or value than the plan it's replacing, then the change must be scheduled for the next renewal. See property "when" for more information about scheduling options for subscription change.
"pln_0SNlurA049MEWV3V0q7gjQbM4EVo"Unique identifier of the target SIM, to which the subscription should be changed. Can also be set to "auto", in which case an eSIM will be automatically allocated.
"sim_0SNlurA049MEWV1BAAmWZULA4lf6"When the change should take effect. If set to "now", the change will take effect immediately. If set to "renewal", the change will instead take effect at the next subscription renewal date. Plan changes can always happen on "renewal", but only selected network providers allow "now" changes. SIM changes can only happen "now".
"renewal"now renewal Approximate time when the change should take place. This is typically set for changes scheduled at renewal. For changes that take effect immediately (when requestedChange.when is "now"), this may be null.
"2021-01-21T19:12:28Z"The current status of the subscription change. Note that the initiated status
is currently only available when using the Billing API, where it implies that
the subscription change invoice has not yet been paid.
pending initiated applied failed deleted Unique identifier of the subscription to be changed.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"curl https://api.gigs.com/projects/${GIGS_PROJECT}/subscriptionChanges/{subscriptionChange} \
-X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json"
{
"object": "subscriptionChange",
"id": "sch_0SNlurA049MEWV3bE0SMtbIEJApp",
"appliedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"failureCode": "consentNotGiven",
"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"
},
"requestedChange": {
"plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"sim": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"when": "renewal"
},
"scheduledAt": "2021-01-21T19:12:28Z",
"sim": {
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
},
"status": "pending",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi"
}