Plans

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.

    Allowed values: plan
  • Name
    id
    Type
    string
    Description

    Unique identifier for the plan.

    Example: "pln_0SNlurA049MEWV3V0q7gjQbM4EVo"
  • Name
    metadata
    Type
    Metadata
    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
      required
      Description

      The data allowance in bytes. A value of null indicates unlimited data.

      Example: 10000000000
    • Name
      voiceSeconds
      Type
      nullable integer
      required
      Description

      The voice call allowance in seconds. A value of null indicates unlimited calls.

      Example: 30000
    • Name
      smsMessages
      Type
      nullable integer
      required
      Description

      The SMS allowance in messages. A value of null indicates unlimited SMS.

      Example: 100
  • 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
      required
      Description

      The maximum amount of data that can be used in bytes. A value of null indicates unlimited data.

      Example: 100000000000
    • Name
      bandwidthBitsPerSecond
      Type
      nullable integer
      required
      Description

      The maximum bandwidth in bits per second. A value of null indicates unlimited bandwidth.

    • Name
      throttling
      Type
      nullable object
      required
      Description
      The throttling configuration for the plan, if any.
  • 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
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: "USD"
  • 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

    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.

    Allowed values: byte
  • 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.

    Allowed values: message
  • 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.

    Allowed values: 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"
}

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

Returns the plan if it exists and is owned by the plan.

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always planDocument.

    Allowed values: planDocument
  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the given document.

    Example: "pdc_0SNlurA049MEWV1S6e1qVqBV2xge"
  • Name
    createdAt
    Type
    string
    required
    Description

    The time the document was created.

    Example: "2022-07-04T16:20:27.59Z"
  • 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"

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

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

Returns a list of document objects.

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always list.

    Allowed values: 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",
      "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
}

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

Returns the archived plan.

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always plan.

    Allowed values: plan
  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the plan.

    Example: "pln_0SNlurA049MEWV3V0q7gjQbM4EVo"
  • Name
    metadata
    Type
    Metadata
    required
    Description

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

  • Name
    allowances
    Type
    object
    required
    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
      required
      Description

      The data allowance in bytes. A value of null indicates unlimited data.

      Example: 10000000000
    • Name
      voiceSeconds
      Type
      nullable integer
      required
      Description

      The voice call allowance in seconds. A value of null indicates unlimited calls.

      Example: 30000
    • Name
      smsMessages
      Type
      nullable integer
      required
      Description

      The SMS allowance in messages. A value of null indicates unlimited SMS.

      Example: 100
  • Name
    coverage
    Type
    object
    required
    Description
    The geographic coverage of the plan.
  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the plan was created.

    Example: "2021-01-21T19:38:34Z"
  • 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
    Usage limits for the plan - i.e. the maximum available bandwidth, fair-use data limits and throttling threshold.
    • Name
      dataBytes
      Type
      nullable integer
      required
      Description

      The maximum amount of data that can be used in bytes. A value of null indicates unlimited data.

      Example: 100000000000
    • Name
      bandwidthBitsPerSecond
      Type
      nullable integer
      required
      Description

      The maximum bandwidth in bits per second. A value of null indicates unlimited bandwidth.

    • Name
      throttling
      Type
      nullable object
      required
      Description
      The throttling configuration for the plan, if any.
  • 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
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: "USD"
  • Name
    provider
    Type
    string
    required
    Description

    The ID of the network provider supported by this plan.

    Example: "p5"
  • Name
    requirements
    Type
    object
    required
    Description
    Required information that must be collected from the user in order to create a subscription with this plan.
  • Name
    simTypes
    Type
    array
    required
    Description

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

    Example: ["eSIM","pSIM"]
  • Name
    status
    Type
    string
    required
    Description
    Allowed values: available, archived, pending, draft
  • Name
    validity
    Type
    object
    required
    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
    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.

    Allowed values: byte
  • 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.

    Allowed values: message
  • 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.

    Allowed values: second

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

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

Returns the plan if it exists and is owned by the plan.

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always planDocument.

    Allowed values: planDocument
  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the given document.

    Example: "pdc_0SNlurA049MEWV1S6e1qVqBV2xge"
  • Name
    createdAt
    Type
    string
    required
    Description

    The time the document was created.

    Example: "2022-07-04T16:20:27.59Z"
  • 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"

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

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

Returns a list of document objects.

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always list.

    Allowed values: 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",
      "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
}

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

Returns the plan if it exists.

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always plan.

    Allowed values: plan
  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the plan.

    Example: "pln_0SNlurA049MEWV3V0q7gjQbM4EVo"
  • Name
    metadata
    Type
    Metadata
    required
    Description

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

  • Name
    allowances
    Type
    object
    required
    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
      required
      Description

      The data allowance in bytes. A value of null indicates unlimited data.

      Example: 10000000000
    • Name
      voiceSeconds
      Type
      nullable integer
      required
      Description

      The voice call allowance in seconds. A value of null indicates unlimited calls.

      Example: 30000
    • Name
      smsMessages
      Type
      nullable integer
      required
      Description

      The SMS allowance in messages. A value of null indicates unlimited SMS.

      Example: 100
  • Name
    coverage
    Type
    object
    required
    Description
    The geographic coverage of the plan.
  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the plan was created.

    Example: "2021-01-21T19:38:34Z"
  • 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
    Usage limits for the plan - i.e. the maximum available bandwidth, fair-use data limits and throttling threshold.
    • Name
      dataBytes
      Type
      nullable integer
      required
      Description

      The maximum amount of data that can be used in bytes. A value of null indicates unlimited data.

      Example: 100000000000
    • Name
      bandwidthBitsPerSecond
      Type
      nullable integer
      required
      Description

      The maximum bandwidth in bits per second. A value of null indicates unlimited bandwidth.

    • Name
      throttling
      Type
      nullable object
      required
      Description
      The throttling configuration for the plan, if any.
  • 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
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: "USD"
  • Name
    provider
    Type
    string
    required
    Description

    The ID of the network provider supported by this plan.

    Example: "p5"
  • Name
    requirements
    Type
    object
    required
    Description
    Required information that must be collected from the user in order to create a subscription with this plan.
  • Name
    simTypes
    Type
    array
    required
    Description

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

    Example: ["eSIM","pSIM"]
  • Name
    status
    Type
    string
    required
    Description
    Allowed values: available, archived, pending, draft
  • Name
    validity
    Type
    object
    required
    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
    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.

    Allowed values: byte
  • 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.

    Allowed values: message
  • 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.

    Allowed values: second

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

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
    Metadata
    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

Returns the updated plan.

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always plan.

    Allowed values: plan
  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the plan.

    Example: "pln_0SNlurA049MEWV3V0q7gjQbM4EVo"
  • Name
    metadata
    Type
    Metadata
    required
    Description

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

  • Name
    allowances
    Type
    object
    required
    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
      required
      Description

      The data allowance in bytes. A value of null indicates unlimited data.

      Example: 10000000000
    • Name
      voiceSeconds
      Type
      nullable integer
      required
      Description

      The voice call allowance in seconds. A value of null indicates unlimited calls.

      Example: 30000
    • Name
      smsMessages
      Type
      nullable integer
      required
      Description

      The SMS allowance in messages. A value of null indicates unlimited SMS.

      Example: 100
  • Name
    coverage
    Type
    object
    required
    Description
    The geographic coverage of the plan.
  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the plan was created.

    Example: "2021-01-21T19:38:34Z"
  • 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
    Usage limits for the plan - i.e. the maximum available bandwidth, fair-use data limits and throttling threshold.
    • Name
      dataBytes
      Type
      nullable integer
      required
      Description

      The maximum amount of data that can be used in bytes. A value of null indicates unlimited data.

      Example: 100000000000
    • Name
      bandwidthBitsPerSecond
      Type
      nullable integer
      required
      Description

      The maximum bandwidth in bits per second. A value of null indicates unlimited bandwidth.

    • Name
      throttling
      Type
      nullable object
      required
      Description
      The throttling configuration for the plan, if any.
  • 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
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: "USD"
  • Name
    provider
    Type
    string
    required
    Description

    The ID of the network provider supported by this plan.

    Example: "p5"
  • Name
    requirements
    Type
    object
    required
    Description
    Required information that must be collected from the user in order to create a subscription with this plan.
  • Name
    simTypes
    Type
    array
    required
    Description

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

    Example: ["eSIM","pSIM"]
  • Name
    status
    Type
    string
    required
    Description
    Allowed values: available, archived, pending, draft
  • Name
    validity
    Type
    object
    required
    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
    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.

    Allowed values: byte
  • 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.

    Allowed values: message
  • 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.

    Allowed values: second

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

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

Returns the available plan.

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always plan.

    Allowed values: plan
  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the plan.

    Example: "pln_0SNlurA049MEWV3V0q7gjQbM4EVo"
  • Name
    metadata
    Type
    Metadata
    required
    Description

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

  • Name
    allowances
    Type
    object
    required
    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
      required
      Description

      The data allowance in bytes. A value of null indicates unlimited data.

      Example: 10000000000
    • Name
      voiceSeconds
      Type
      nullable integer
      required
      Description

      The voice call allowance in seconds. A value of null indicates unlimited calls.

      Example: 30000
    • Name
      smsMessages
      Type
      nullable integer
      required
      Description

      The SMS allowance in messages. A value of null indicates unlimited SMS.

      Example: 100
  • Name
    coverage
    Type
    object
    required
    Description
    The geographic coverage of the plan.
  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the plan was created.

    Example: "2021-01-21T19:38:34Z"
  • 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
    Usage limits for the plan - i.e. the maximum available bandwidth, fair-use data limits and throttling threshold.
    • Name
      dataBytes
      Type
      nullable integer
      required
      Description

      The maximum amount of data that can be used in bytes. A value of null indicates unlimited data.

      Example: 100000000000
    • Name
      bandwidthBitsPerSecond
      Type
      nullable integer
      required
      Description

      The maximum bandwidth in bits per second. A value of null indicates unlimited bandwidth.

    • Name
      throttling
      Type
      nullable object
      required
      Description
      The throttling configuration for the plan, if any.
  • 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
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: "USD"
  • Name
    provider
    Type
    string
    required
    Description

    The ID of the network provider supported by this plan.

    Example: "p5"
  • Name
    requirements
    Type
    object
    required
    Description
    Required information that must be collected from the user in order to create a subscription with this plan.
  • Name
    simTypes
    Type
    array
    required
    Description

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

    Example: ["eSIM","pSIM"]
  • Name
    status
    Type
    string
    required
    Description
    Allowed values: available, archived, pending, draft
  • Name
    validity
    Type
    object
    required
    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
    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.

    Allowed values: byte
  • 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.

    Allowed values: message
  • 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.

    Allowed values: second

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

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

    The unique identifier for the project.

    Example: "gigs"

Response Schemas

Returns a list schema response with all found Plans.

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always list.

    Allowed values: 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"
      },
      "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
}

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

Returns a list of plan objects.

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always list.

    Allowed values: 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"
      },
      "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
}