The Plan resource
Plans define the network options and parameters offered to the end user, e.g. "Unlimited data, voice & text". Plan allowances (data, sms, voice) and limits are configurable, and Gigs will work with you to find the best balance for your users.
Properties
- Name
object
- Type
- string
- Description
Type of object is always
plan
.
- Name
id
- Type
- string
- Description
Unique identifier for the plan.
Example:pln_0SNlurA049MEWV3V0q7gjQbM4EVo
- Name
metadata
- Type
- object
- Description
A set of key-value pairs, to store metadata related to the resource.
- Name
allowances
- Type
- object
- Description
- Usage allowances included in the plan - i.e. how many bytes of data, voice minutes & sms messages the user has access to.
- Name
dataBytes
- Type
- nullable integer
- Description
The data allowance in bytes. A value of
null
indicates unlimited data.Example:10000000000
required- Name
voiceSeconds
- Type
- nullable integer
- Description
The voice call allowance in seconds. A value of
null
indicates unlimited calls.Example:30000
required- Name
smsMessages
- Type
- nullable integer
- Description
The SMS allowance in messages. A value of
null
indicates unlimited SMS.Example:100
required
- Name
coverage
- Type
- object
- Description
- The geographic coverage of the plan.
- Name
createdAt
- Type
- string
- Description
Time when the plan was created.
Example:2021-01-21T19:38:34Z
- 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.
- 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
- Name
limits
- Type
- object
- Description
- Usage limits for the plan - i.e. the maximum available bandwidth, fair-use data limits and throttling threshold.
- Name
dataBytes
- Type
- nullable integer
- Description
The maximum amount of data that can be used in bytes. A value of
null
indicates unlimited data.Example:100000000000
required- Name
bandwidthBitsPerSecond
- Type
- nullable integer
- Description
The maximum bandwidth in bits per second. A value of
null
indicates unlimited bandwidth.
required- Name
throttling
- Type
- nullable object
- Description
- The throttling configuration for the plan, if any.
required
- Name
name
- Type
- string
- Description
The plan's name, meant to be displayable to the users.
Example:Gigs Global
- Name
price
- Type
- object
- Description
- The price of the plan.
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:USD
required
- Name
provider
- Type
- string
- Description
The ID of the network provider supported by this plan.
Example:p5
- Name
requirements
- Type
- object
- Description
- Required information that must be collected from the user in order to create a subscription with this plan.
- Name
simTypes
- Type
- array
- Description
List of SIM types supported by this plan. Can be
eSIM
,pSIM
, or both.Example:eSIM,pSIM
- Name
status
- Type
- string
- Description
- Allowed values:
available, archived, pending, draft
- Name
validity
- Type
- object
- Description
- Plan validity information - i.e. subscription period length, and the minimum number of periods before the plan can be ended.
- Name
data
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The data allowance in bytes included in this plan. A value of
-1
indicates unlimited data.Example:10000000000
- Name
dataUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the data value is always
byte
.
- Name
sms
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The sms allowance included in this plan. A value of
-1
indicates unlimited sms.Example:100
- Name
smsUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the sms value is always
message
.
- Name
voice
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The voice allowance included in this plan. A value of
-1
indicates unlimited voice.Example:30000
- Name
voiceUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the voice value is always
second
.
Response
{
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"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.",
"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"
],
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
}
(Deprecated) Retrieve a plan document
Retrieves the details of an existing document for a given plan.
Deprecated
This endpoint is deprecated and will be removed in the future.
Please use the /projects/{project}/planDocuments/{id}
endpoint instead.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required- Name
plan
- Type
- string
- Description
The unique identifier for the plan.
Example:pln_0SNlurA049MEWV3V0q7gjQbM4EVo
required- Name
document
- Type
- string
- Description
The unique identifier for the document.
Example:pdc_0SNlurA049MEWV1S6e1qVqBV2xge
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
planDocument
.
required- Name
id
- Type
- string
- Description
Unique identifier for the given document.
Example:pdc_0SNlurA049MEWV1S6e1qVqBV2xge
required- Name
createdAt
- Type
- string
- Description
The time the document was created.
Example:2022-07-04T16:20:27.59Z
required- Name
language
- Type
- nullable string PREVIEW
- Description
The language of the document. The values follow the BCP 47 standard. That means, for instance, that a region can be specified in addition to the language.
Example:en-US
required- Name
name
- Type
- string
- Description
The name of the document.
Example:My Plan Contract
required- Name
plan
- Type
- string
- Description
Unique identifier for the plan associated to this document.
Example:pln_0SNlurA049MEWV3V0q7gjQbM4EVo
required- Name
type
- Type
- string
- Description
The MIME type for the given document.
Example:application/pdf
required- Name
url
- Type
- string
- Description
The URL at which the document can be retrieved.
Example:https://a.gigscdn.net/p/my-project/01G74ZPB5PQTDESM4JGYR2CWB9.pdf
required
Request
curl https://api.gigs.com/projects/{project}/plans/{plan}/documents/{document} \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "planDocument",
"id": "pdc_0SNlurA049MEWV1S6e1qVqBV2xge",
"createdAt": "2022-07-04T16:20:27.59Z",
"language": "en-US",
"name": "My Plan Contract",
"plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"type": "application/pdf",
"url": "https://a.gigscdn.net/p/my-project/01G74ZPB5PQTDESM4JGYR2CWB9.pdf"
}
(Deprecated) List all plan documents
Returns a list of documents related to the given plan. The documents returned are sorted by creation date, with the most recently created documents appearing first.
Deprecated
This endpoint is deprecated and will be removed in the future.
Please use the /projects/{project}/planDocuments
endpoint instead.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required- Name
plan
- Type
- string
- Description
The unique identifier for the plan.
Example:pln_0SNlurA049MEWV3V0q7gjQbM4EVo
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
list
.
required- Name
items
- Type
- array
- Description
- List of objects of type `planDocument`.
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}/plans/{plan}/documents \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "list",
"items": [
{
"object": "planDocument",
"id": "pdc_0SNlurA049MEWV1S6e1qVqBV2xge",
"createdAt": "2022-07-04T16:20:27.59Z",
"language": "en-US",
"name": "My Plan Contract",
"plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"type": "application/pdf",
"url": "https://a.gigscdn.net/p/my-project/01G74ZPB5PQTDESM4JGYR2CWB9.pdf"
}
],
"moreItemsAfter": null,
"moreItemsBefore": null
}
Archive a plan
Set the status of a plan to archived. An archived plan can not be used to create new subscriptions.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required- Name
plan
- Type
- string
- Description
The unique identifier for the plan.
Example:pln_0SNlurA049MEWV3V0q7gjQbM4EVo
required
Response Schemas
- 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
- Description
A set of key-value pairs, to store metadata related to the resource.
required- Name
allowances
- Type
- object
- Description
- Usage allowances included in the plan - i.e. how many bytes of data, voice minutes & sms messages the user has access to.
- Name
dataBytes
- Type
- nullable integer
- Description
The data allowance in bytes. A value of
null
indicates unlimited data.Example:10000000000
required- Name
voiceSeconds
- Type
- nullable integer
- Description
The voice call allowance in seconds. A value of
null
indicates unlimited calls.Example:30000
required- Name
smsMessages
- Type
- nullable integer
- Description
The SMS allowance in messages. A value of
null
indicates unlimited SMS.Example:100
required
required- Name
coverage
- Type
- object
- Description
- The geographic coverage of the plan.
required- Name
createdAt
- Type
- string
- Description
Time when the plan was created.
Example:2021-01-21T19:38:34Z
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
- Usage limits for the plan - i.e. the maximum available bandwidth, fair-use data limits and throttling threshold.
- Name
dataBytes
- Type
- nullable integer
- Description
The maximum amount of data that can be used in bytes. A value of
null
indicates unlimited data.Example:100000000000
required- Name
bandwidthBitsPerSecond
- Type
- nullable integer
- Description
The maximum bandwidth in bits per second. A value of
null
indicates unlimited bandwidth.
required- Name
throttling
- Type
- nullable object
- Description
- The throttling configuration for the plan, if any.
required
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.
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:USD
required
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 information that must be collected from the user in order to create a subscription with this plan.
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
status
- Type
- string
- Description
- Allowed values:
available, archived, pending, draft
required- Name
validity
- Type
- object
- Description
- Plan validity information - i.e. subscription period length, and the minimum number of periods before the plan can be ended.
required- Name
data
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.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
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the data value is always
byte
.
required- Name
sms
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The sms allowance included in this plan. A value of
-1
indicates unlimited sms.Example:100
required- Name
smsUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the sms value is always
message
.
required- Name
voice
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The voice allowance included in this plan. A value of
-1
indicates unlimited voice.Example:30000
required- Name
voiceUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the voice value is always
second
.
required
Request
curl https://api.gigs.com/projects/{project}/plans/{plan}/archive \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"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.",
"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"
],
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
}
Retrieve a plan document
Retrieves the details of an existing document for a given plan.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required- Name
planDocument
- Type
- string
- Description
The unique identifier for the document.
Example:pdc_0SNlurA049MEWV1S6e1qVqBV2xge
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
planDocument
.
required- Name
id
- Type
- string
- Description
Unique identifier for the given document.
Example:pdc_0SNlurA049MEWV1S6e1qVqBV2xge
required- Name
createdAt
- Type
- string
- Description
The time the document was created.
Example:2022-07-04T16:20:27.59Z
required- Name
language
- Type
- nullable string PREVIEW
- Description
The language of the document. The values follow the BCP 47 standard. That means, for instance, that a region can be specified in addition to the language.
Example:en-US
required- Name
name
- Type
- string
- Description
The name of the document.
Example:My Plan Contract
required- Name
plan
- Type
- string
- Description
Unique identifier for the plan associated to this document.
Example:pln_0SNlurA049MEWV3V0q7gjQbM4EVo
required- Name
type
- Type
- string
- Description
The MIME type for the given document.
Example:application/pdf
required- Name
url
- Type
- string
- Description
The URL at which the document can be retrieved.
Example:https://a.gigscdn.net/p/my-project/01G74ZPB5PQTDESM4JGYR2CWB9.pdf
required
Request
curl https://api.gigs.com/projects/{project}/planDocuments/{planDocument} \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "planDocument",
"id": "pdc_0SNlurA049MEWV1S6e1qVqBV2xge",
"createdAt": "2022-07-04T16:20:27.59Z",
"language": "en-US",
"name": "My Plan Contract",
"plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"type": "application/pdf",
"url": "https://a.gigscdn.net/p/my-project/01G74ZPB5PQTDESM4JGYR2CWB9.pdf"
}
List all plan documents
Returns a list of documents related to the given plan. The documents returned are sorted by creation date, with the most recently created documents appearing first.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required
Query Parameters
- Name
plan
- Type
- string
- Description
The unique identifier for the plan to be filtered by.
Example:pln_0SNlurA049MEWV3V0q7gjQbM4EVo
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
list
.
required- Name
items
- Type
- array
- Description
- List of objects of type `planDocument`.
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}/planDocuments \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "list",
"items": [
{
"object": "planDocument",
"id": "pdc_0SNlurA049MEWV1S6e1qVqBV2xge",
"createdAt": "2022-07-04T16:20:27.59Z",
"language": "en-US",
"name": "My Plan Contract",
"plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"type": "application/pdf",
"url": "https://a.gigscdn.net/p/my-project/01G74ZPB5PQTDESM4JGYR2CWB9.pdf"
}
],
"moreItemsAfter": null,
"moreItemsBefore": null
}
Retrieve a plan
Retrieve the details of an existing plan.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required- Name
plan
- Type
- string
- Description
The unique identifier for the plan.
Example:pln_0SNlurA049MEWV3V0q7gjQbM4EVo
required
Response Schemas
- 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
- Description
A set of key-value pairs, to store metadata related to the resource.
required- Name
allowances
- Type
- object
- Description
- Usage allowances included in the plan - i.e. how many bytes of data, voice minutes & sms messages the user has access to.
- Name
dataBytes
- Type
- nullable integer
- Description
The data allowance in bytes. A value of
null
indicates unlimited data.Example:10000000000
required- Name
voiceSeconds
- Type
- nullable integer
- Description
The voice call allowance in seconds. A value of
null
indicates unlimited calls.Example:30000
required- Name
smsMessages
- Type
- nullable integer
- Description
The SMS allowance in messages. A value of
null
indicates unlimited SMS.Example:100
required
required- Name
coverage
- Type
- object
- Description
- The geographic coverage of the plan.
required- Name
createdAt
- Type
- string
- Description
Time when the plan was created.
Example:2021-01-21T19:38:34Z
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
- Usage limits for the plan - i.e. the maximum available bandwidth, fair-use data limits and throttling threshold.
- Name
dataBytes
- Type
- nullable integer
- Description
The maximum amount of data that can be used in bytes. A value of
null
indicates unlimited data.Example:100000000000
required- Name
bandwidthBitsPerSecond
- Type
- nullable integer
- Description
The maximum bandwidth in bits per second. A value of
null
indicates unlimited bandwidth.
required- Name
throttling
- Type
- nullable object
- Description
- The throttling configuration for the plan, if any.
required
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.
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:USD
required
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 information that must be collected from the user in order to create a subscription with this plan.
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
status
- Type
- string
- Description
- Allowed values:
available, archived, pending, draft
required- Name
validity
- Type
- object
- Description
- Plan validity information - i.e. subscription period length, and the minimum number of periods before the plan can be ended.
required- Name
data
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.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
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the data value is always
byte
.
required- Name
sms
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The sms allowance included in this plan. A value of
-1
indicates unlimited sms.Example:100
required- Name
smsUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the sms value is always
message
.
required- Name
voice
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The voice allowance included in this plan. A value of
-1
indicates unlimited voice.Example:30000
required- Name
voiceUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the voice value is always
second
.
required
Request
curl https://api.gigs.com/projects/{project}/plans/{plan} \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"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.",
"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"
],
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
}
Update a plan
Updates the specified plan by setting the values of the parameters passed.
Body
- Name
name
- Type
- string
- Description
The plan's name, meant to be displayable to the user.
Example:Gigs Global
- Name
description
- Type
- nullable string
- Description
The plan's description, meant to be displayable to the user.
Example:A data plan you will love! Operates in most countries of the world.
- Name
image
- Type
- nullable string
- Description
The plan's image, meant to be displayable to the user.
Example:https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png
- Name
metadata
- Type
- object
- Description
A set of key-value pairs, to store metadata related to the resource.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required- Name
plan
- Type
- string
- Description
The unique identifier for the plan.
Example:pln_0SNlurA049MEWV3V0q7gjQbM4EVo
required
Response Schemas
- 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
- Description
A set of key-value pairs, to store metadata related to the resource.
required- Name
allowances
- Type
- object
- Description
- Usage allowances included in the plan - i.e. how many bytes of data, voice minutes & sms messages the user has access to.
- Name
dataBytes
- Type
- nullable integer
- Description
The data allowance in bytes. A value of
null
indicates unlimited data.Example:10000000000
required- Name
voiceSeconds
- Type
- nullable integer
- Description
The voice call allowance in seconds. A value of
null
indicates unlimited calls.Example:30000
required- Name
smsMessages
- Type
- nullable integer
- Description
The SMS allowance in messages. A value of
null
indicates unlimited SMS.Example:100
required
required- Name
coverage
- Type
- object
- Description
- The geographic coverage of the plan.
required- Name
createdAt
- Type
- string
- Description
Time when the plan was created.
Example:2021-01-21T19:38:34Z
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
- Usage limits for the plan - i.e. the maximum available bandwidth, fair-use data limits and throttling threshold.
- Name
dataBytes
- Type
- nullable integer
- Description
The maximum amount of data that can be used in bytes. A value of
null
indicates unlimited data.Example:100000000000
required- Name
bandwidthBitsPerSecond
- Type
- nullable integer
- Description
The maximum bandwidth in bits per second. A value of
null
indicates unlimited bandwidth.
required- Name
throttling
- Type
- nullable object
- Description
- The throttling configuration for the plan, if any.
required
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.
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:USD
required
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 information that must be collected from the user in order to create a subscription with this plan.
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
status
- Type
- string
- Description
- Allowed values:
available, archived, pending, draft
required- Name
validity
- Type
- object
- Description
- Plan validity information - i.e. subscription period length, and the minimum number of periods before the plan can be ended.
required- Name
data
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.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
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the data value is always
byte
.
required- Name
sms
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The sms allowance included in this plan. A value of
-1
indicates unlimited sms.Example:100
required- Name
smsUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the sms value is always
message
.
required- Name
voice
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The voice allowance included in this plan. A value of
-1
indicates unlimited voice.Example:30000
required- Name
voiceUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the voice value is always
second
.
required
Request
curl https://api.gigs.com/projects/{project}/plans/{plan} \
-X PATCH \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d "{\"name\":\"Gigs Global\",\"description\":\"A data plan you will love! Operates in most countries of the world.\",\"image\":\"https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png\",\"metadata\":{}}"
Response
{
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"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.",
"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"
],
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
}
Publish a plan
Set the status of a plan to available. Available plans can be used to create new subscriptions.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required- Name
plan
- Type
- string
- Description
The unique identifier for the plan.
Example:pln_0SNlurA049MEWV3V0q7gjQbM4EVo
required
Response Schemas
- 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
- Description
A set of key-value pairs, to store metadata related to the resource.
required- Name
allowances
- Type
- object
- Description
- Usage allowances included in the plan - i.e. how many bytes of data, voice minutes & sms messages the user has access to.
- Name
dataBytes
- Type
- nullable integer
- Description
The data allowance in bytes. A value of
null
indicates unlimited data.Example:10000000000
required- Name
voiceSeconds
- Type
- nullable integer
- Description
The voice call allowance in seconds. A value of
null
indicates unlimited calls.Example:30000
required- Name
smsMessages
- Type
- nullable integer
- Description
The SMS allowance in messages. A value of
null
indicates unlimited SMS.Example:100
required
required- Name
coverage
- Type
- object
- Description
- The geographic coverage of the plan.
required- Name
createdAt
- Type
- string
- Description
Time when the plan was created.
Example:2021-01-21T19:38:34Z
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
- Usage limits for the plan - i.e. the maximum available bandwidth, fair-use data limits and throttling threshold.
- Name
dataBytes
- Type
- nullable integer
- Description
The maximum amount of data that can be used in bytes. A value of
null
indicates unlimited data.Example:100000000000
required- Name
bandwidthBitsPerSecond
- Type
- nullable integer
- Description
The maximum bandwidth in bits per second. A value of
null
indicates unlimited bandwidth.
required- Name
throttling
- Type
- nullable object
- Description
- The throttling configuration for the plan, if any.
required
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.
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:USD
required
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 information that must be collected from the user in order to create a subscription with this plan.
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
status
- Type
- string
- Description
- Allowed values:
available, archived, pending, draft
required- Name
validity
- Type
- object
- Description
- Plan validity information - i.e. subscription period length, and the minimum number of periods before the plan can be ended.
required- Name
data
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.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
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the data value is always
byte
.
required- Name
sms
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The sms allowance included in this plan. A value of
-1
indicates unlimited sms.Example:100
required- Name
smsUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the sms value is always
message
.
required- Name
voice
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The voice allowance included in this plan. A value of
-1
indicates unlimited voice.Example:30000
required- Name
voiceUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the voice value is always
second
.
required
Request
curl https://api.gigs.com/projects/{project}/plans/{plan}/publish \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"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.",
"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"
],
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
}
Search for Plans
Searches for plans matching the given parameters.
Body
- Name
status
- Type
- array
- Description
The status to filter plans by.
Default:available
- Name
simType
- Type
- nullable array
- Description
The type of the SIM card to filter the plans by.
- Name
provider
- Type
- nullable array
- Description
The network provider ID to filter the plans by.
Example:p3,p9
- Name
compatibleWith
- Type
- object
- Description
- Compatibility requirements for the plans. Only plans compatible with all requirements are returned. At least one requirement must be specified.
- Name
imei
- Type
- nullable string
- Description
The IMEI (international mobile equipment identity) of the corresponding device.
Example:492388841798923
- Name
deviceModel
- Type
- nullable string
- Description
The device model identifier of the corresponding device.
Example:dmd_123
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
list
.
required- Name
items
- Type
- array
- Description
- List of objects of type `plan`.
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}/plans/search \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d "{\"status\":[\"available\"],\"simType\":[\"eSIM\"],\"provider\":[\"p3\",\"p9\"],\"compatibleWith\":{\"imei\":\"492388841798923\",\"deviceModel\":\"dmd_123\"}}"
Response
{
"object": "list",
"items": [
{
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"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.",
"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"
],
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
}
],
"moreItemsAfter": null,
"moreItemsBefore": null
}
List all plans
Returns a list of plans.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required
Query Parameters
- Name
provider
- Type
- array
- Description
The network provider ID to filter the plans by.
- Name
simType
- Type
- array
- Description
The type of SIM card to filter the plans by.
Default:eSIM,pSIM
- Name
status
- Type
- array
- Description
The status to filter the plans by. Only available plans are returned by default.
Default:available
- 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 `plan`.
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}/plans \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "list",
"items": [
{
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"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.",
"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"
],
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
}
],
"moreItemsAfter": null,
"moreItemsBefore": null
}