The Plan resource
Plans are the network options and parameters offered to the end user. Note that the actual plans themselves have to be set up by Gigs. These are agreed upon between the customer and Gigs.
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
- The allowances included in the plan.
- Name
coverage
- Type
- object
- Description
- The geographic coverage of the plan.
- Name
data
- Type
- integer DEPRECATED
- Description
The data allowance in bytes included in this plan. A value of
-1
indicates unlimited data.Example:10000000000
- Name
dataUnit
- Type
- string DEPRECATED
- Description
The unit of the data value is always
byte
.
- 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
- The limitations of the plan.
- 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
provider
- Type
- string
- Description
The ID of the network provider supported by this plan.
Example:p5
- Name
requirements
- Type
- object
- Description
- Name
simTypes
- Type
- array
- Description
List of SIM types supported by this plan. Can be
eSIM
,pSIM
, or both.Example:eSIM,pSIM
- Name
sms
- Type
- integer DEPRECATED
- Description
The sms allowance included in this plan. A value of
-1
indicates unlimited sms.Example:100
- Name
smsUnit
- Type
- string DEPRECATED
- Description
The unit of the sms value is always
message
.
- Name
status
- Type
- string
- Description
- Allowed values:
available, archived, pending, draft
- Name
validity
- Type
- object
- Description
- The validity of the plan.
- Name
voice
- Type
- integer DEPRECATED
- Description
The voice allowance included in this plan. A value of
-1
indicates unlimited voice.Example:30000
- Name
voiceUnit
- Type
- string DEPRECATED
- Description
The unit of the voice value is always
second
.
- Name
createdAt
- Type
- string
- Description
Time when the plan was created.
Example:2021-01-21T19:38:34Z
Response
{
"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"
}
(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
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- Name
createdAt
- Type
- string
- Description
The time the document was created.
Example:2022-07-04T16:20:27.59Z
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",
"language": "en-US",
"name": "My Plan Contract",
"plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"type": "application/pdf",
"url": "https://a.gigscdn.net/p/my-project/01G74ZPB5PQTDESM4JGYR2CWB9.pdf",
"createdAt": "2022-07-04T16:20:27.59Z"
}
(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",
"language": "en-US",
"name": "My Plan Contract",
"plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"type": "application/pdf",
"url": "https://a.gigscdn.net/p/my-project/01G74ZPB5PQTDESM4JGYR2CWB9.pdf",
"createdAt": "2022-07-04T16:20:27.59Z"
}
],
"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
- 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
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"
},
"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"
}
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
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- Name
createdAt
- Type
- string
- Description
The time the document was created.
Example:2022-07-04T16:20:27.59Z
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",
"language": "en-US",
"name": "My Plan Contract",
"plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"type": "application/pdf",
"url": "https://a.gigscdn.net/p/my-project/01G74ZPB5PQTDESM4JGYR2CWB9.pdf",
"createdAt": "2022-07-04T16:20:27.59Z"
}
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",
"language": "en-US",
"name": "My Plan Contract",
"plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"type": "application/pdf",
"url": "https://a.gigscdn.net/p/my-project/01G74ZPB5PQTDESM4JGYR2CWB9.pdf",
"createdAt": "2022-07-04T16:20:27.59Z"
}
],
"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
- 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
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"
},
"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"
}
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
- 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
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"
},
"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"
}
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
- 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
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"
},
"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"
}
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.
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"
},
"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"
}
],
"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"
},
"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"
}
],
"moreItemsAfter": null,
"moreItemsBefore": null
}