The Subscription Change resource
Any change to a user’s subscription, such as swapping a SIM, or upgrading or downgrading a subscription.
Properties
- Name
object
- Type
- string
- Description
Type of object is always
subscriptionChange
.
- Name
id
- Type
- string
- Description
Unique identifier for the subscription change.
Example:sch_0SNlurA049MEWV3bE0SMtbIEJApp
- Name
failureCode
- Type
- nullable string
- Description
An error code indicating the reason for a failed subscription change.
- Name
plan
- Type
- nullable object
- Description
- The plan to which the subscription should be changed.
- Name
object
- Type
- string
- Description
Type of object is always
plan
.
required- Name
id
- Type
- string
- Description
Unique identifier for the plan.
Example:pln_0SNlurA049MEWV3V0q7gjQbM4EVo
required- Name
metadata
- Type
- object PREVIEW
- Description
- A set of key-value pairs, to store metadata related to the resource.
required- Name
allowances
- Type
- object
- Description
- The allowances included in the plan.
required- Name
coverage
- Type
- object
- Description
- The geographic coverage of the plan.
required- Name
data
- Type
- integer DEPRECATED
- Description
The data allowance in bytes included in this plan. A value of
-1
indicates unlimited data.Example:10000000000
required- Name
dataUnit
- Type
- string DEPRECATED
- Description
The unit of the data value is always
byte
.
required- Name
description
- Type
- nullable string
- Description
The plan's description, meant to be displayable to the users.
Example:A data plan you will love! Operates in most countries of the world.
required- Name
image
- Type
- nullable string
- Description
The plan's image, meant to be displayable to the users.
Example:https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png
required- Name
limits
- Type
- object
- Description
- The limitations of the plan.
required- Name
name
- Type
- string
- Description
The plan's name, meant to be displayable to the users.
Example:Gigs Global
required- Name
price
- Type
- object
- Description
- The price of the plan.
required- Name
provider
- Type
- string
- Description
The ID of the network provider supported by this plan.
Example:p5
required- Name
requirements
- Type
- object
- Description
required- Name
simTypes
- Type
- array
- Description
List of SIM types supported by this plan. Can be
eSIM
,pSIM
, or both.Example:eSIM,pSIM
required- Name
sms
- Type
- integer DEPRECATED
- Description
The sms allowance included in this plan. A value of
-1
indicates unlimited sms.Example:100
required- Name
smsUnit
- Type
- string DEPRECATED
- Description
The unit of the sms value is always
message
.
required- Name
status
- Type
- string
- Description
- Allowed values:
available, archived, pending, draft
required- Name
validity
- Type
- object
- Description
- The validity of the plan.
required- Name
voice
- Type
- integer DEPRECATED
- Description
The voice allowance included in this plan. A value of
-1
indicates unlimited voice.Example:30000
required- Name
voiceUnit
- Type
- string DEPRECATED
- Description
The unit of the voice value is always
second
.
required- Name
createdAt
- Type
- string
- Description
Time when the plan was created.
Example:2021-01-21T19:38:34Z
required
- Name
sim
- Type
- nullable object
- Description
- The SIM to which the subscription should be changed.
- Name
object
- Type
- string
- Description
Type of object is always
sim
.
required- Name
id
- Type
- string
- Description
Unique identifier for the SIM.
Example:sim_0SNlurA049MEWV1BAAmWZULA4lf6
required- Name
metadata
- Type
- object PREVIEW
- Description
- A set of key-value pairs, to store metadata related to the resource.
required- Name
iccid
- Type
- string
- Description
The ICCID (integrated circuit card identifier) associated with the SIM.
Example:89883070000007537119
required- Name
provider
- Type
- string
- Description
The ID of the network provider of the SIM.
Example:p9
required- Name
status
- Type
- string
- Description
The status of the SIM. Can be
active
orinactive
.Allowed values:inactive, active, retired
required- Name
type
- Type
- string
- Description
The type of the SIM. Can be
eSIM
orpSIM
.Allowed values:eSIM, pSIM
required- Name
createdAt
- Type
- string
- Description
Time when the SIM was created.
Example:2021-01-21T19:38:34Z
required
- Name
status
- Type
- string
- Description
The current status of the subscription change.
Allowed values:pending, applied, failed
- Name
subscription
- Type
- nullable string
- Description
Unique identifier of the subscription to be changed.
Example:sub_0SNlurA049MEWV2gSfSxi00xlPIi
- Name
appliedAt
- Type
- nullable string
- Description
Time when the subscription change was applied.
Example:2021-01-21T19:36:57Z
- Name
createdAt
- Type
- string
- Description
Time when the subscription change was created.
Example:2021-01-21T19:12:28Z
- Name
scheduledAt
- Type
- string
- Description
Approximate time when the change should take place.
Example:2021-01-21T19:12:28Z
Response
{
"object": "subscriptionChange",
"id": "sch_0SNlurA049MEWV3bE0SMtbIEJApp",
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"data": 10000000000,
"dataUnit": "byte",
"description": "A data plan you will love! Operates in most countries of the world.",
"image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
"limits": {
"dataBytes": 100000000000,
"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"
],
"sms": 100,
"smsUnit": "message",
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"voice": 30000,
"voiceUnit": "second",
"createdAt": "2021-01-21T19:38:34Z"
},
"sim": {
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM",
"createdAt": "2021-01-21T19:38:34Z"
},
"status": "pending",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"appliedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"scheduledAt": "2021-01-21T19:12:28Z"
}
Retrieve a subscription change
Retrieve the details of an existing subscription change which the authenticated user is authorized to view.
Preview
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.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required- Name
id
- Type
- string
- Description
The unique identifier for the subscription change.
Example:sch_0SNlurA049MEWV3bE0SMtbIEJApp
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
subscriptionChange
.
required- Name
id
- Type
- string
- Description
Unique identifier for the subscription change.
Example:sch_0SNlurA049MEWV3bE0SMtbIEJApp
required- Name
failureCode
- Type
- nullable string
- Description
An error code indicating the reason for a failed subscription change.
required- Name
plan
- Type
- nullable object
- Description
- The plan to which the subscription should be changed.
- Name
object
- Type
- string
- Description
Type of object is always
plan
.
required- Name
id
- Type
- string
- Description
Unique identifier for the plan.
Example:pln_0SNlurA049MEWV3V0q7gjQbM4EVo
required- Name
metadata
- Type
- object PREVIEW
- Description
- A set of key-value pairs, to store metadata related to the resource.
required- Name
allowances
- Type
- object
- Description
- The allowances included in the plan.
required- Name
coverage
- Type
- object
- Description
- The geographic coverage of the plan.
required- Name
data
- Type
- integer DEPRECATED
- Description
The data allowance in bytes included in this plan. A value of
-1
indicates unlimited data.Example:10000000000
required- Name
dataUnit
- Type
- string DEPRECATED
- Description
The unit of the data value is always
byte
.
required- Name
description
- Type
- nullable string
- Description
The plan's description, meant to be displayable to the users.
Example:A data plan you will love! Operates in most countries of the world.
required- Name
image
- Type
- nullable string
- Description
The plan's image, meant to be displayable to the users.
Example:https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png
required- Name
limits
- Type
- object
- Description
- The limitations of the plan.
required- Name
name
- Type
- string
- Description
The plan's name, meant to be displayable to the users.
Example:Gigs Global
required- Name
price
- Type
- object
- Description
- The price of the plan.
required- Name
provider
- Type
- string
- Description
The ID of the network provider supported by this plan.
Example:p5
required- Name
requirements
- Type
- object
- Description
required- Name
simTypes
- Type
- array
- Description
List of SIM types supported by this plan. Can be
eSIM
,pSIM
, or both.Example:eSIM,pSIM
required- Name
sms
- Type
- integer DEPRECATED
- Description
The sms allowance included in this plan. A value of
-1
indicates unlimited sms.Example:100
required- Name
smsUnit
- Type
- string DEPRECATED
- Description
The unit of the sms value is always
message
.
required- Name
status
- Type
- string
- Description
- Allowed values:
available, archived, pending, draft
required- Name
validity
- Type
- object
- Description
- The validity of the plan.
required- Name
voice
- Type
- integer DEPRECATED
- Description
The voice allowance included in this plan. A value of
-1
indicates unlimited voice.Example:30000
required- Name
voiceUnit
- Type
- string DEPRECATED
- Description
The unit of the voice value is always
second
.
required- Name
createdAt
- Type
- string
- Description
Time when the plan was created.
Example:2021-01-21T19:38:34Z
required
required- Name
sim
- Type
- nullable object
- Description
- The SIM to which the subscription should be changed.
- Name
object
- Type
- string
- Description
Type of object is always
sim
.
required- Name
id
- Type
- string
- Description
Unique identifier for the SIM.
Example:sim_0SNlurA049MEWV1BAAmWZULA4lf6
required- Name
metadata
- Type
- object PREVIEW
- Description
- A set of key-value pairs, to store metadata related to the resource.
required- Name
iccid
- Type
- string
- Description
The ICCID (integrated circuit card identifier) associated with the SIM.
Example:89883070000007537119
required- Name
provider
- Type
- string
- Description
The ID of the network provider of the SIM.
Example:p9
required- Name
status
- Type
- string
- Description
The status of the SIM. Can be
active
orinactive
.Allowed values:inactive, active, retired
required- Name
type
- Type
- string
- Description
The type of the SIM. Can be
eSIM
orpSIM
.Allowed values:eSIM, pSIM
required- Name
createdAt
- Type
- string
- Description
Time when the SIM was created.
Example:2021-01-21T19:38:34Z
required
required- Name
status
- Type
- string
- Description
The current status of the subscription change.
Allowed values:pending, applied, failed
required- Name
subscription
- Type
- nullable string
- Description
Unique identifier of the subscription to be changed.
Example:sub_0SNlurA049MEWV2gSfSxi00xlPIi
required- Name
appliedAt
- Type
- nullable string
- Description
Time when the subscription change was applied.
Example:2021-01-21T19:36:57Z
required- Name
createdAt
- Type
- string
- Description
Time when the subscription change was created.
Example:2021-01-21T19:12:28Z
required- Name
scheduledAt
- Type
- string
- Description
Approximate time when the change should take place.
Example:2021-01-21T19:12:28Z
required
Request
curl https://api.gigs.com/projects/{project}/subscriptionChanges/{id} \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Responses
{
"object": "subscriptionChange",
"id": "sch_0SNlurA049MEWV3bE0SMtbIEJApp",
"failureCode": null,
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"data": 10000000000,
"dataUnit": "byte",
"description": "A data plan you will love! Operates in most countries of the world.",
"image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
"limits": {
"dataBytes": 100000000000,
"bandwidthBitsPerSecond": null,
"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"
],
"sms": 100,
"smsUnit": "message",
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"voice": 30000,
"voiceUnit": "second",
"createdAt": "2021-01-21T19:38:34Z"
},
"sim": {
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM",
"createdAt": "2021-01-21T19:38:34Z"
},
"status": "pending",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"appliedAt": "2021-01-21T19:36:57Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"scheduledAt": "2021-01-21T19:12:28Z"
}
Delete a subscription change
Retrieve the details of an existing subscription change and delete it. Only subscription changes that have not been applied can be deleted.
Preview
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.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required- Name
id
- Type
- string
- Description
The unique identifier for the subscription change.
Example:sch_0SNlurA049MEWV3bE0SMtbIEJApp
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
subscriptionChange
.
required- Name
id
- Type
- string
- Description
Unique identifier for the subscription change.
Example:sch_0SNlurA049MEWV3bE0SMtbIEJApp
required- Name
failureCode
- Type
- nullable string
- Description
An error code indicating the reason for a failed subscription change.
required- Name
plan
- Type
- nullable object
- Description
- The plan to which the subscription should be changed.
- Name
object
- Type
- string
- Description
Type of object is always
plan
.
required- Name
id
- Type
- string
- Description
Unique identifier for the plan.
Example:pln_0SNlurA049MEWV3V0q7gjQbM4EVo
required- Name
metadata
- Type
- object PREVIEW
- Description
- A set of key-value pairs, to store metadata related to the resource.
required- Name
allowances
- Type
- object
- Description
- The allowances included in the plan.
required- Name
coverage
- Type
- object
- Description
- The geographic coverage of the plan.
required- Name
data
- Type
- integer DEPRECATED
- Description
The data allowance in bytes included in this plan. A value of
-1
indicates unlimited data.Example:10000000000
required- Name
dataUnit
- Type
- string DEPRECATED
- Description
The unit of the data value is always
byte
.
required- Name
description
- Type
- nullable string
- Description
The plan's description, meant to be displayable to the users.
Example:A data plan you will love! Operates in most countries of the world.
required- Name
image
- Type
- nullable string
- Description
The plan's image, meant to be displayable to the users.
Example:https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png
required- Name
limits
- Type
- object
- Description
- The limitations of the plan.
required- Name
name
- Type
- string
- Description
The plan's name, meant to be displayable to the users.
Example:Gigs Global
required- Name
price
- Type
- object
- Description
- The price of the plan.
required- Name
provider
- Type
- string
- Description
The ID of the network provider supported by this plan.
Example:p5
required- Name
requirements
- Type
- object
- Description
required- Name
simTypes
- Type
- array
- Description
List of SIM types supported by this plan. Can be
eSIM
,pSIM
, or both.Example:eSIM,pSIM
required- Name
sms
- Type
- integer DEPRECATED
- Description
The sms allowance included in this plan. A value of
-1
indicates unlimited sms.Example:100
required- Name
smsUnit
- Type
- string DEPRECATED
- Description
The unit of the sms value is always
message
.
required- Name
status
- Type
- string
- Description
- Allowed values:
available, archived, pending, draft
required- Name
validity
- Type
- object
- Description
- The validity of the plan.
required- Name
voice
- Type
- integer DEPRECATED
- Description
The voice allowance included in this plan. A value of
-1
indicates unlimited voice.Example:30000
required- Name
voiceUnit
- Type
- string DEPRECATED
- Description
The unit of the voice value is always
second
.
required- Name
createdAt
- Type
- string
- Description
Time when the plan was created.
Example:2021-01-21T19:38:34Z
required
required- Name
sim
- Type
- nullable object
- Description
- The SIM to which the subscription should be changed.
- Name
object
- Type
- string
- Description
Type of object is always
sim
.
required- Name
id
- Type
- string
- Description
Unique identifier for the SIM.
Example:sim_0SNlurA049MEWV1BAAmWZULA4lf6
required- Name
metadata
- Type
- object PREVIEW
- Description
- A set of key-value pairs, to store metadata related to the resource.
required- Name
iccid
- Type
- string
- Description
The ICCID (integrated circuit card identifier) associated with the SIM.
Example:89883070000007537119
required- Name
provider
- Type
- string
- Description
The ID of the network provider of the SIM.
Example:p9
required- Name
status
- Type
- string
- Description
The status of the SIM. Can be
active
orinactive
.Allowed values:inactive, active, retired
required- Name
type
- Type
- string
- Description
The type of the SIM. Can be
eSIM
orpSIM
.Allowed values:eSIM, pSIM
required- Name
createdAt
- Type
- string
- Description
Time when the SIM was created.
Example:2021-01-21T19:38:34Z
required
required- Name
status
- Type
- string
- Description
The current status of the subscription change.
Allowed values:pending, applied, failed
required- Name
subscription
- Type
- nullable string
- Description
Unique identifier of the subscription to be changed.
Example:sub_0SNlurA049MEWV2gSfSxi00xlPIi
required- Name
appliedAt
- Type
- nullable string
- Description
Time when the subscription change was applied.
Example:2021-01-21T19:36:57Z
required- Name
createdAt
- Type
- string
- Description
Time when the subscription change was created.
Example:2021-01-21T19:12:28Z
required- Name
scheduledAt
- Type
- string
- Description
Approximate time when the change should take place.
Example:2021-01-21T19:12:28Z
required
Request
curl https://api.gigs.com/projects/{project}/subscriptionChanges/{id} \
-X DELETE \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Responses
{
"object": "subscriptionChange",
"id": "sch_0SNlurA049MEWV3bE0SMtbIEJApp",
"failureCode": null,
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"data": 10000000000,
"dataUnit": "byte",
"description": "A data plan you will love! Operates in most countries of the world.",
"image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
"limits": {
"dataBytes": 100000000000,
"bandwidthBitsPerSecond": null,
"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"
],
"sms": 100,
"smsUnit": "message",
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"voice": 30000,
"voiceUnit": "second",
"createdAt": "2021-01-21T19:38:34Z"
},
"sim": {
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM",
"createdAt": "2021-01-21T19:38:34Z"
},
"status": "pending",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"appliedAt": "2021-01-21T19:36:57Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"scheduledAt": "2021-01-21T19:12:28Z"
}
List all subscription changes
Returns a list of subscription changes. The subscription changes returned are sorted by creation date, with the most recently created subscription changes appearing first.
Preview
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.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required
Query Parameters
- Name
status
- Type
- array
- Description
A comma-separated list of statuses to filter the subscription changes by.
Default:pending
- Name
subscription
- Type
- string
- Description
The unique identifier for the subscription to be filtered by.
Example:sub_0SNlurA049MEWV2gSfSxi00xlPIi
- Name
user
- Type
- string
- Description
The unique identifier for the user to be filtered by.
Example:usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
- Name
after
- Type
- string
- Description
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.
- Name
before
- Type
- string
- Description
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.
- Name
limit
- Type
- integer
- Description
The limit of items to be returned in the list, between 0 and 200.
Default:10
>= 0
<= 200
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
list
.
required- Name
items
- Type
- array
- Description
List of objects of type
subscriptionChange
.
required- Name
moreItemsAfter
- Type
- nullable string
- Description
A unique identifier to be used as
after
pagination parameter if more items are available sorted after the current batch of items.
required- Name
moreItemsBefore
- Type
- nullable string
- Description
A unique identifier to be used as
before
pagination parameter if more items are available sorted before the current batch of items.
required
Request
curl https://api.gigs.com/projects/{project}/subscriptionChanges \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Responses
{
"object": "list",
"items": [
{
"object": "subscriptionChange",
"id": "sch_0SNlurA049MEWV3bE0SMtbIEJApp",
"failureCode": null,
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"data": 10000000000,
"dataUnit": "byte",
"description": "A data plan you will love! Operates in most countries of the world.",
"image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
"limits": {
"dataBytes": 100000000000,
"bandwidthBitsPerSecond": null,
"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"
],
"sms": 100,
"smsUnit": "message",
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"voice": 30000,
"voiceUnit": "second",
"createdAt": "2021-01-21T19:38:34Z"
},
"sim": {
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM",
"createdAt": "2021-01-21T19:38:34Z"
},
"status": "pending",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"appliedAt": "2021-01-21T19:36:57Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"scheduledAt": "2021-01-21T19:12:28Z"
}
],
"moreItemsAfter": null,
"moreItemsBefore": null
}
Create a subscription change
Creates a new subscription change for an existing subscription in the specified project.
Preview
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.
Body
- Name
plan
- Type
- nullable string
- Description
Unique identifier of the target plan, to which the subscription should be changed.
Example:pln_0SNlurA049MEWV3V0q7gjQbM4EVo
- Name
sim
- Type
- nullable string
- Description
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.
Example:sim_0SNlurA049MEWV1BAAmWZULA4lf6
- Name
subscription
- Type
- string
- Description
Unique identifier of the subscription to be changed.
Example:sub_0SNlurA049MEWV2gSfSxi00xlPIi
required- Name
when
- Type
- string
- Description
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. Currentlyplan
changes can only happen on"renewal"
, andsim
changes can only happen"now"
.Example:renewal
Default:renewal
Allowed values:now, renewal
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
subscriptionChange
.
required- Name
id
- Type
- string
- Description
Unique identifier for the subscription change.
Example:sch_0SNlurA049MEWV3bE0SMtbIEJApp
required- Name
failureCode
- Type
- nullable string
- Description
An error code indicating the reason for a failed subscription change.
required- Name
plan
- Type
- nullable object
- Description
- The plan to which the subscription should be changed.
- Name
object
- Type
- string
- Description
Type of object is always
plan
.
required- Name
id
- Type
- string
- Description
Unique identifier for the plan.
Example:pln_0SNlurA049MEWV3V0q7gjQbM4EVo
required- Name
metadata
- Type
- object PREVIEW
- Description
- A set of key-value pairs, to store metadata related to the resource.
required- Name
allowances
- Type
- object
- Description
- The allowances included in the plan.
required- Name
coverage
- Type
- object
- Description
- The geographic coverage of the plan.
required- Name
data
- Type
- integer DEPRECATED
- Description
The data allowance in bytes included in this plan. A value of
-1
indicates unlimited data.Example:10000000000
required- Name
dataUnit
- Type
- string DEPRECATED
- Description
The unit of the data value is always
byte
.
required- Name
description
- Type
- nullable string
- Description
The plan's description, meant to be displayable to the users.
Example:A data plan you will love! Operates in most countries of the world.
required- Name
image
- Type
- nullable string
- Description
The plan's image, meant to be displayable to the users.
Example:https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png
required- Name
limits
- Type
- object
- Description
- The limitations of the plan.
required- Name
name
- Type
- string
- Description
The plan's name, meant to be displayable to the users.
Example:Gigs Global
required- Name
price
- Type
- object
- Description
- The price of the plan.
required- Name
provider
- Type
- string
- Description
The ID of the network provider supported by this plan.
Example:p5
required- Name
requirements
- Type
- object
- Description
required- Name
simTypes
- Type
- array
- Description
List of SIM types supported by this plan. Can be
eSIM
,pSIM
, or both.Example:eSIM,pSIM
required- Name
sms
- Type
- integer DEPRECATED
- Description
The sms allowance included in this plan. A value of
-1
indicates unlimited sms.Example:100
required- Name
smsUnit
- Type
- string DEPRECATED
- Description
The unit of the sms value is always
message
.
required- Name
status
- Type
- string
- Description
- Allowed values:
available, archived, pending, draft
required- Name
validity
- Type
- object
- Description
- The validity of the plan.
required- Name
voice
- Type
- integer DEPRECATED
- Description
The voice allowance included in this plan. A value of
-1
indicates unlimited voice.Example:30000
required- Name
voiceUnit
- Type
- string DEPRECATED
- Description
The unit of the voice value is always
second
.
required- Name
createdAt
- Type
- string
- Description
Time when the plan was created.
Example:2021-01-21T19:38:34Z
required
required- Name
sim
- Type
- nullable object
- Description
- The SIM to which the subscription should be changed.
- Name
object
- Type
- string
- Description
Type of object is always
sim
.
required- Name
id
- Type
- string
- Description
Unique identifier for the SIM.
Example:sim_0SNlurA049MEWV1BAAmWZULA4lf6
required- Name
metadata
- Type
- object PREVIEW
- Description
- A set of key-value pairs, to store metadata related to the resource.
required- Name
iccid
- Type
- string
- Description
The ICCID (integrated circuit card identifier) associated with the SIM.
Example:89883070000007537119
required- Name
provider
- Type
- string
- Description
The ID of the network provider of the SIM.
Example:p9
required- Name
status
- Type
- string
- Description
The status of the SIM. Can be
active
orinactive
.Allowed values:inactive, active, retired
required- Name
type
- Type
- string
- Description
The type of the SIM. Can be
eSIM
orpSIM
.Allowed values:eSIM, pSIM
required- Name
createdAt
- Type
- string
- Description
Time when the SIM was created.
Example:2021-01-21T19:38:34Z
required
required- Name
status
- Type
- string
- Description
The current status of the subscription change.
Allowed values:pending, applied, failed
required- Name
subscription
- Type
- nullable string
- Description
Unique identifier of the subscription to be changed.
Example:sub_0SNlurA049MEWV2gSfSxi00xlPIi
required- Name
appliedAt
- Type
- nullable string
- Description
Time when the subscription change was applied.
Example:2021-01-21T19:36:57Z
required- Name
createdAt
- Type
- string
- Description
Time when the subscription change was created.
Example:2021-01-21T19:12:28Z
required- Name
scheduledAt
- Type
- string
- Description
Approximate time when the change should take place.
Example:2021-01-21T19:12:28Z
required
Request
curl https://api.gigs.com/projects/{project}/subscriptionChanges \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d "{\"plan\":\"pln_0SNlurA049MEWV3V0q7gjQbM4EVo\",\"sim\":\"sim_0SNlurA049MEWV1BAAmWZULA4lf6\",\"subscription\":\"sub_0SNlurA049MEWV2gSfSxi00xlPIi\",\"when\":\"renewal\"}"
Responses
{
"object": "subscriptionChange",
"id": "sch_0SNlurA049MEWV3bE0SMtbIEJApp",
"failureCode": null,
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"data": 10000000000,
"dataUnit": "byte",
"description": "A data plan you will love! Operates in most countries of the world.",
"image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
"limits": {
"dataBytes": 100000000000,
"bandwidthBitsPerSecond": null,
"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"
],
"sms": 100,
"smsUnit": "message",
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"voice": 30000,
"voiceUnit": "second",
"createdAt": "2021-01-21T19:38:34Z"
},
"sim": {
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM",
"createdAt": "2021-01-21T19:38:34Z"
},
"status": "pending",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"appliedAt": "2021-01-21T19:36:57Z",
"completedAt": "2021-01-21T19:36:57Z",
"createdAt": "2021-01-21T19:12:28Z",
"scheduledAt": "2021-01-21T19:12:28Z"
}