Plans

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"
}

GET/projects/{project}/plans/{plan}/documents/{document}

(Deprecated) Retrieve a plan document

Retrieves the details of an existing document for a given plan.

Path Parameters

  • Name
    project
    Type
    string
    required
    Description

    The unique identifier for the project.

    Example: gigs
  • Name
    plan
    Type
    string
    required
    Description

    The unique identifier for the plan.

    Example: pln_0SNlurA049MEWV3V0q7gjQbM4EVo
  • Name
    document
    Type
    string
    required
    Description

    The unique identifier for the document.

    Example: pdc_0SNlurA049MEWV1S6e1qVqBV2xge

Response Schemas

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always planDocument.

  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the given document.

    Example: pdc_0SNlurA049MEWV1S6e1qVqBV2xge
  • Name
    language
    Type
    nullable string
    PREVIEW
    required
    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
  • Name
    name
    Type
    string
    required
    Description

    The name of the document.

    Example: My Plan Contract
  • Name
    plan
    Type
    string
    required
    Description

    Unique identifier for the plan associated to this document.

    Example: pln_0SNlurA049MEWV3V0q7gjQbM4EVo
  • Name
    type
    Type
    string
    required
    Description

    The MIME type for the given document.

    Example: application/pdf
  • Name
    url
    Type
    string
    required
    Description

    The URL at which the document can be retrieved.

    Example: https://a.gigscdn.net/p/my-project/01G74ZPB5PQTDESM4JGYR2CWB9.pdf
  • Name
    createdAt
    Type
    string
    required
    Description

    The time the document was created.

    Example: 2022-07-04T16:20:27.59Z

Request

GET
/projects/{project}/plans/{plan}/documents/{document}
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"
}

GET/projects/{project}/plans/{plan}/documents

(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.

Path Parameters

  • Name
    project
    Type
    string
    required
    Description

    The unique identifier for the project.

    Example: gigs
  • Name
    plan
    Type
    string
    required
    Description

    The unique identifier for the plan.

    Example: pln_0SNlurA049MEWV3V0q7gjQbM4EVo

Response Schemas

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always list.

  • Name
    items
    Type
    array
    required
    Description
    List of objects of type `planDocument`.
  • Name
    moreItemsAfter
    Type
    nullable string
    required
    Description

    A unique identifier to be used as after pagination parameter if more items are available sorted after the current batch of items.

  • Name
    moreItemsBefore
    Type
    nullable string
    required
    Description

    A unique identifier to be used as before pagination parameter if more items are available sorted before the current batch of items.

Request

GET
/projects/{project}/plans/{plan}/documents
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
}

POST/projects/{project}/plans/{plan}/archive

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
    required
    Description

    The unique identifier for the project.

    Example: gigs
  • Name
    plan
    Type
    string
    required
    Description

    The unique identifier for the plan.

    Example: pln_0SNlurA049MEWV3V0q7gjQbM4EVo

Response Schemas

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always plan.

  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the plan.

    Example: pln_0SNlurA049MEWV3V0q7gjQbM4EVo
  • Name
    metadata
    Type
    object
    required
    Description

    A set of key-value pairs, to store metadata related to the resource.

  • Name
    allowances
    Type
    object
    required
    Description
    The allowances included in the plan.
  • Name
    coverage
    Type
    object
    required
    Description
    The geographic coverage of the plan.
  • Name
    data
    Type
    integer
    DEPRECATED
    required
    Description

    The data allowance in bytes included in this plan. A value of -1 indicates unlimited data.

    Example: 10000000000
  • Name
    dataUnit
    Type
    string
    DEPRECATED
    required
    Description

    The unit of the data value is always byte.

  • Name
    description
    Type
    nullable string
    required
    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
    required
    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
    required
    Description
    The limitations of the plan.
  • Name
    name
    Type
    string
    required
    Description

    The plan's name, meant to be displayable to the users.

    Example: Gigs Global
  • Name
    price
    Type
    object
    required
    Description
    The price of the plan.
  • Name
    provider
    Type
    string
    required
    Description

    The ID of the network provider supported by this plan.

    Example: p5
  • Name
    requirements
    Type
    object
    required
    Description
  • Name
    simTypes
    Type
    array
    required
    Description

    List of SIM types supported by this plan. Can be eSIM, pSIM, or both.

    Example: eSIM,pSIM
  • Name
    sms
    Type
    integer
    DEPRECATED
    required
    Description

    The sms allowance included in this plan. A value of -1 indicates unlimited sms.

    Example: 100
  • Name
    smsUnit
    Type
    string
    DEPRECATED
    required
    Description

    The unit of the sms value is always message.

  • Name
    status
    Type
    string
    required
    Description
    Allowed values: available, archived, pending, draft
  • Name
    validity
    Type
    object
    required
    Description
    The validity of the plan.
  • Name
    voice
    Type
    integer
    DEPRECATED
    required
    Description

    The voice allowance included in this plan. A value of -1 indicates unlimited voice.

    Example: 30000
  • Name
    voiceUnit
    Type
    string
    DEPRECATED
    required
    Description

    The unit of the voice value is always second.

  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the plan was created.

    Example: 2021-01-21T19:38:34Z

Request

POST
/projects/{project}/plans/{plan}/archive
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"
}

GET/projects/{project}/planDocuments/{planDocument}

Retrieve a plan document

Retrieves the details of an existing document for a given plan.

Path Parameters

  • Name
    project
    Type
    string
    required
    Description

    The unique identifier for the project.

    Example: gigs
  • Name
    planDocument
    Type
    string
    required
    Description

    The unique identifier for the document.

    Example: pdc_0SNlurA049MEWV1S6e1qVqBV2xge

Response Schemas

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always planDocument.

  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the given document.

    Example: pdc_0SNlurA049MEWV1S6e1qVqBV2xge
  • Name
    language
    Type
    nullable string
    PREVIEW
    required
    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
  • Name
    name
    Type
    string
    required
    Description

    The name of the document.

    Example: My Plan Contract
  • Name
    plan
    Type
    string
    required
    Description

    Unique identifier for the plan associated to this document.

    Example: pln_0SNlurA049MEWV3V0q7gjQbM4EVo
  • Name
    type
    Type
    string
    required
    Description

    The MIME type for the given document.

    Example: application/pdf
  • Name
    url
    Type
    string
    required
    Description

    The URL at which the document can be retrieved.

    Example: https://a.gigscdn.net/p/my-project/01G74ZPB5PQTDESM4JGYR2CWB9.pdf
  • Name
    createdAt
    Type
    string
    required
    Description

    The time the document was created.

    Example: 2022-07-04T16:20:27.59Z

Request

GET
/projects/{project}/planDocuments/{planDocument}
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"
}

GET/projects/{project}/planDocuments

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
    required
    Description

    The unique identifier for the project.

    Example: gigs

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
    required
    Description

    Type of object is always list.

  • Name
    items
    Type
    array
    required
    Description
    List of objects of type `planDocument`.
  • Name
    moreItemsAfter
    Type
    nullable string
    required
    Description

    A unique identifier to be used as after pagination parameter if more items are available sorted after the current batch of items.

  • Name
    moreItemsBefore
    Type
    nullable string
    required
    Description

    A unique identifier to be used as before pagination parameter if more items are available sorted before the current batch of items.

Request

GET
/projects/{project}/planDocuments
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
}

GET/projects/{project}/plans/{plan}

Retrieve a plan

Retrieve the details of an existing plan.

Path Parameters

  • Name
    project
    Type
    string
    required
    Description

    The unique identifier for the project.

    Example: gigs
  • Name
    plan
    Type
    string
    required
    Description

    The unique identifier for the plan.

    Example: pln_0SNlurA049MEWV3V0q7gjQbM4EVo

Response Schemas

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always plan.

  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the plan.

    Example: pln_0SNlurA049MEWV3V0q7gjQbM4EVo
  • Name
    metadata
    Type
    object
    required
    Description

    A set of key-value pairs, to store metadata related to the resource.

  • Name
    allowances
    Type
    object
    required
    Description
    The allowances included in the plan.
  • Name
    coverage
    Type
    object
    required
    Description
    The geographic coverage of the plan.
  • Name
    data
    Type
    integer
    DEPRECATED
    required
    Description

    The data allowance in bytes included in this plan. A value of -1 indicates unlimited data.

    Example: 10000000000
  • Name
    dataUnit
    Type
    string
    DEPRECATED
    required
    Description

    The unit of the data value is always byte.

  • Name
    description
    Type
    nullable string
    required
    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
    required
    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
    required
    Description
    The limitations of the plan.
  • Name
    name
    Type
    string
    required
    Description

    The plan's name, meant to be displayable to the users.

    Example: Gigs Global
  • Name
    price
    Type
    object
    required
    Description
    The price of the plan.
  • Name
    provider
    Type
    string
    required
    Description

    The ID of the network provider supported by this plan.

    Example: p5
  • Name
    requirements
    Type
    object
    required
    Description
  • Name
    simTypes
    Type
    array
    required
    Description

    List of SIM types supported by this plan. Can be eSIM, pSIM, or both.

    Example: eSIM,pSIM
  • Name
    sms
    Type
    integer
    DEPRECATED
    required
    Description

    The sms allowance included in this plan. A value of -1 indicates unlimited sms.

    Example: 100
  • Name
    smsUnit
    Type
    string
    DEPRECATED
    required
    Description

    The unit of the sms value is always message.

  • Name
    status
    Type
    string
    required
    Description
    Allowed values: available, archived, pending, draft
  • Name
    validity
    Type
    object
    required
    Description
    The validity of the plan.
  • Name
    voice
    Type
    integer
    DEPRECATED
    required
    Description

    The voice allowance included in this plan. A value of -1 indicates unlimited voice.

    Example: 30000
  • Name
    voiceUnit
    Type
    string
    DEPRECATED
    required
    Description

    The unit of the voice value is always second.

  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the plan was created.

    Example: 2021-01-21T19:38:34Z

Request

GET
/projects/{project}/plans/{plan}
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"
}

PATCH/projects/{project}/plans/{plan}

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
    required
    Description

    The unique identifier for the project.

    Example: gigs
  • Name
    plan
    Type
    string
    required
    Description

    The unique identifier for the plan.

    Example: pln_0SNlurA049MEWV3V0q7gjQbM4EVo

Response Schemas

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always plan.

  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the plan.

    Example: pln_0SNlurA049MEWV3V0q7gjQbM4EVo
  • Name
    metadata
    Type
    object
    required
    Description

    A set of key-value pairs, to store metadata related to the resource.

  • Name
    allowances
    Type
    object
    required
    Description
    The allowances included in the plan.
  • Name
    coverage
    Type
    object
    required
    Description
    The geographic coverage of the plan.
  • Name
    data
    Type
    integer
    DEPRECATED
    required
    Description

    The data allowance in bytes included in this plan. A value of -1 indicates unlimited data.

    Example: 10000000000
  • Name
    dataUnit
    Type
    string
    DEPRECATED
    required
    Description

    The unit of the data value is always byte.

  • Name
    description
    Type
    nullable string
    required
    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
    required
    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
    required
    Description
    The limitations of the plan.
  • Name
    name
    Type
    string
    required
    Description

    The plan's name, meant to be displayable to the users.

    Example: Gigs Global
  • Name
    price
    Type
    object
    required
    Description
    The price of the plan.
  • Name
    provider
    Type
    string
    required
    Description

    The ID of the network provider supported by this plan.

    Example: p5
  • Name
    requirements
    Type
    object
    required
    Description
  • Name
    simTypes
    Type
    array
    required
    Description

    List of SIM types supported by this plan. Can be eSIM, pSIM, or both.

    Example: eSIM,pSIM
  • Name
    sms
    Type
    integer
    DEPRECATED
    required
    Description

    The sms allowance included in this plan. A value of -1 indicates unlimited sms.

    Example: 100
  • Name
    smsUnit
    Type
    string
    DEPRECATED
    required
    Description

    The unit of the sms value is always message.

  • Name
    status
    Type
    string
    required
    Description
    Allowed values: available, archived, pending, draft
  • Name
    validity
    Type
    object
    required
    Description
    The validity of the plan.
  • Name
    voice
    Type
    integer
    DEPRECATED
    required
    Description

    The voice allowance included in this plan. A value of -1 indicates unlimited voice.

    Example: 30000
  • Name
    voiceUnit
    Type
    string
    DEPRECATED
    required
    Description

    The unit of the voice value is always second.

  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the plan was created.

    Example: 2021-01-21T19:38:34Z

Request

PATCH
/projects/{project}/plans/{plan}
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"
}

POST/projects/{project}/plans/{plan}/publish

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
    required
    Description

    The unique identifier for the project.

    Example: gigs
  • Name
    plan
    Type
    string
    required
    Description

    The unique identifier for the plan.

    Example: pln_0SNlurA049MEWV3V0q7gjQbM4EVo

Response Schemas

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always plan.

  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the plan.

    Example: pln_0SNlurA049MEWV3V0q7gjQbM4EVo
  • Name
    metadata
    Type
    object
    required
    Description

    A set of key-value pairs, to store metadata related to the resource.

  • Name
    allowances
    Type
    object
    required
    Description
    The allowances included in the plan.
  • Name
    coverage
    Type
    object
    required
    Description
    The geographic coverage of the plan.
  • Name
    data
    Type
    integer
    DEPRECATED
    required
    Description

    The data allowance in bytes included in this plan. A value of -1 indicates unlimited data.

    Example: 10000000000
  • Name
    dataUnit
    Type
    string
    DEPRECATED
    required
    Description

    The unit of the data value is always byte.

  • Name
    description
    Type
    nullable string
    required
    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
    required
    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
    required
    Description
    The limitations of the plan.
  • Name
    name
    Type
    string
    required
    Description

    The plan's name, meant to be displayable to the users.

    Example: Gigs Global
  • Name
    price
    Type
    object
    required
    Description
    The price of the plan.
  • Name
    provider
    Type
    string
    required
    Description

    The ID of the network provider supported by this plan.

    Example: p5
  • Name
    requirements
    Type
    object
    required
    Description
  • Name
    simTypes
    Type
    array
    required
    Description

    List of SIM types supported by this plan. Can be eSIM, pSIM, or both.

    Example: eSIM,pSIM
  • Name
    sms
    Type
    integer
    DEPRECATED
    required
    Description

    The sms allowance included in this plan. A value of -1 indicates unlimited sms.

    Example: 100
  • Name
    smsUnit
    Type
    string
    DEPRECATED
    required
    Description

    The unit of the sms value is always message.

  • Name
    status
    Type
    string
    required
    Description
    Allowed values: available, archived, pending, draft
  • Name
    validity
    Type
    object
    required
    Description
    The validity of the plan.
  • Name
    voice
    Type
    integer
    DEPRECATED
    required
    Description

    The voice allowance included in this plan. A value of -1 indicates unlimited voice.

    Example: 30000
  • Name
    voiceUnit
    Type
    string
    DEPRECATED
    required
    Description

    The unit of the voice value is always second.

  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the plan was created.

    Example: 2021-01-21T19:38:34Z

Request

POST
/projects/{project}/plans/{plan}/publish
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"
}

POST/projects/{project}/plans/search

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
    required
    Description

    The unique identifier for the project.

    Example: gigs

Response Schemas

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always list.

  • Name
    items
    Type
    array
    required
    Description
    List of objects of type `plan`.
  • Name
    moreItemsAfter
    Type
    nullable string
    required
    Description

    A unique identifier to be used as after pagination parameter if more items are available sorted after the current batch of items.

  • Name
    moreItemsBefore
    Type
    nullable string
    required
    Description

    A unique identifier to be used as before pagination parameter if more items are available sorted before the current batch of items.

Request

POST
/projects/{project}/plans/search
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
}

GET/projects/{project}/plans

List all plans

Returns a list of plans.

Path Parameters

  • Name
    project
    Type
    string
    required
    Description

    The unique identifier for the project.

    Example: gigs

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
    required
    Description

    Type of object is always list.

  • Name
    items
    Type
    array
    required
    Description
    List of objects of type `plan`.
  • Name
    moreItemsAfter
    Type
    nullable string
    required
    Description

    A unique identifier to be used as after pagination parameter if more items are available sorted after the current batch of items.

  • Name
    moreItemsBefore
    Type
    nullable string
    required
    Description

    A unique identifier to be used as before pagination parameter if more items are available sorted before the current batch of items.

Request

GET
/projects/{project}/plans
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
}