Subscription Changes

The Subscription Change resource

Any change to a user’s subscription, such as swapping a SIM, or upgrading or downgrading a subscription.

Properties

  • Name
    object
    Type
    string
    Description

    Type of object is always subscriptionChange.

  • Name
    id
    Type
    string
    Description

    Unique identifier for the subscription change.

    Example: sch_0SNlurA049MEWV3bE0SMtbIEJApp
  • Name
    failureCode
    Type
    nullable string
    Description

    An error code indicating the reason for a failed subscription change.

  • Name
    plan
    Type
    nullable object
    Description
    The plan to which the subscription should be changed.
    • Name
      object
      Type
      string
      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
      PREVIEW
      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
  • Name
    sim
    Type
    nullable object
    Description
    The SIM to which the subscription should be changed.
    • Name
      object
      Type
      string
      required
      Description

      Type of object is always sim.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the SIM.

      Example: sim_0SNlurA049MEWV1BAAmWZULA4lf6
    • Name
      metadata
      Type
      object
      PREVIEW
      required
      Description
      A set of key-value pairs, to store metadata related to the resource.
    • Name
      iccid
      Type
      string
      required
      Description

      The ICCID (integrated circuit card identifier) associated with the SIM.

      Example: 89883070000007537119
    • Name
      provider
      Type
      string
      required
      Description

      The ID of the network provider of the SIM.

      Example: p9
    • Name
      status
      Type
      string
      required
      Description

      The status of the SIM. Can be active or inactive.

      Allowed values: inactive, active, retired
    • Name
      type
      Type
      string
      required
      Description

      The type of the SIM. Can be eSIM or pSIM.

      Allowed values: eSIM, pSIM
    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the SIM was created.

      Example: 2021-01-21T19:38:34Z
  • Name
    status
    Type
    string
    Description

    The current status of the subscription change.

    Allowed values: pending, applied, failed
  • Name
    subscription
    Type
    nullable string
    Description

    Unique identifier of the subscription to be changed.

    Example: sub_0SNlurA049MEWV2gSfSxi00xlPIi
  • Name
    appliedAt
    Type
    nullable string
    Description

    Time when the subscription change was applied.

    Example: 2021-01-21T19:36:57Z
  • Name
    createdAt
    Type
    string
    Description

    Time when the subscription change was created.

    Example: 2021-01-21T19:12:28Z
  • Name
    scheduledAt
    Type
    string
    Description

    Approximate time when the change should take place.

    Example: 2021-01-21T19:12:28Z

Response

{
  "object": "subscriptionChange",
  "id": "sch_0SNlurA049MEWV3bE0SMtbIEJApp",
  "plan": {
    "object": "plan",
    "id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
    "allowances": {
      "dataBytes": 10000000000,
      "voiceSeconds": 30000,
      "smsMessages": 100
    },
    "coverage": {
      "object": "coverage",
      "id": "de",
      "countries": [
        "DE",
        "FR",
        "US"
      ],
      "name": "Europe"
    },
    "data": 10000000000,
    "dataUnit": "byte",
    "description": "A data plan you will love! Operates in most countries of the world.",
    "image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
    "limits": {
      "dataBytes": 100000000000,
      "throttling": {
        "thresholdBytes": 10000000000,
        "bandwidthBitsPerSecond": 512000
      }
    },
    "name": "Gigs Global",
    "price": {
      "amount": 999,
      "currency": "USD"
    },
    "provider": "p5",
    "requirements": {
      "address": "present",
      "device": "none",
      "user.birthday": "none",
      "user.fullName": "present"
    },
    "simTypes": [
      "eSIM",
      "pSIM"
    ],
    "sms": 100,
    "smsUnit": "message",
    "status": "available",
    "validity": {
      "minimumPeriods": 12,
      "type": "recurring",
      "unit": "day",
      "value": 7
    },
    "voice": 30000,
    "voiceUnit": "second",
    "createdAt": "2021-01-21T19:38:34Z"
  },
  "sim": {
    "object": "sim",
    "id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
    "iccid": "89883070000007537119",
    "provider": "p9",
    "status": "inactive",
    "type": "eSIM",
    "createdAt": "2021-01-21T19:38:34Z"
  },
  "status": "pending",
  "subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
  "appliedAt": "2021-01-21T19:36:57Z",
  "createdAt": "2021-01-21T19:12:28Z",
  "scheduledAt": "2021-01-21T19:12:28Z"
}

GET/projects/{project}/subscriptionChanges/{id}

Retrieve a subscription change

Retrieve the details of an existing subscription change which the authenticated user is authorized to view.

Path Parameters

  • Name
    project
    Type
    string
    required
    Description

    The unique identifier for the project.

    Example: gigs
  • Name
    id
    Type
    string
    required
    Description

    The unique identifier for the subscription change.

    Example: sch_0SNlurA049MEWV3bE0SMtbIEJApp

Response Schemas

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always subscriptionChange.

  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the subscription change.

    Example: sch_0SNlurA049MEWV3bE0SMtbIEJApp
  • Name
    failureCode
    Type
    nullable string
    required
    Description

    An error code indicating the reason for a failed subscription change.

  • Name
    plan
    Type
    nullable object
    required
    Description
    The plan to which the subscription should be changed.
    • 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
      PREVIEW
      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
  • Name
    sim
    Type
    nullable object
    required
    Description
    The SIM to which the subscription should be changed.
    • Name
      object
      Type
      string
      required
      Description

      Type of object is always sim.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the SIM.

      Example: sim_0SNlurA049MEWV1BAAmWZULA4lf6
    • Name
      metadata
      Type
      object
      PREVIEW
      required
      Description
      A set of key-value pairs, to store metadata related to the resource.
    • Name
      iccid
      Type
      string
      required
      Description

      The ICCID (integrated circuit card identifier) associated with the SIM.

      Example: 89883070000007537119
    • Name
      provider
      Type
      string
      required
      Description

      The ID of the network provider of the SIM.

      Example: p9
    • Name
      status
      Type
      string
      required
      Description

      The status of the SIM. Can be active or inactive.

      Allowed values: inactive, active, retired
    • Name
      type
      Type
      string
      required
      Description

      The type of the SIM. Can be eSIM or pSIM.

      Allowed values: eSIM, pSIM
    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the SIM was created.

      Example: 2021-01-21T19:38:34Z
  • Name
    status
    Type
    string
    required
    Description

    The current status of the subscription change.

    Allowed values: pending, applied, failed
  • Name
    subscription
    Type
    nullable string
    required
    Description

    Unique identifier of the subscription to be changed.

    Example: sub_0SNlurA049MEWV2gSfSxi00xlPIi
  • Name
    appliedAt
    Type
    nullable string
    required
    Description

    Time when the subscription change was applied.

    Example: 2021-01-21T19:36:57Z
  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the subscription change was created.

    Example: 2021-01-21T19:12:28Z
  • Name
    scheduledAt
    Type
    string
    required
    Description

    Approximate time when the change should take place.

    Example: 2021-01-21T19:12:28Z

Request

GET
/projects/{project}/subscriptionChanges/{id}
curl https://api.gigs.com/projects/{project}/subscriptionChanges/{id} \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"

Responses

{
  "object": "subscriptionChange",
  "id": "sch_0SNlurA049MEWV3bE0SMtbIEJApp",
  "failureCode": null,
  "plan": {
    "object": "plan",
    "id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
    "metadata": {},
    "allowances": {
      "dataBytes": 10000000000,
      "voiceSeconds": 30000,
      "smsMessages": 100
    },
    "coverage": {
      "object": "coverage",
      "id": "de",
      "countries": [
        "DE",
        "FR",
        "US"
      ],
      "name": "Europe"
    },
    "data": 10000000000,
    "dataUnit": "byte",
    "description": "A data plan you will love! Operates in most countries of the world.",
    "image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
    "limits": {
      "dataBytes": 100000000000,
      "bandwidthBitsPerSecond": null,
      "throttling": {
        "thresholdBytes": 10000000000,
        "bandwidthBitsPerSecond": 512000
      }
    },
    "name": "Gigs Global",
    "price": {
      "amount": 999,
      "currency": "USD"
    },
    "provider": "p5",
    "requirements": {
      "address": "present",
      "device": "none",
      "user.birthday": "none",
      "user.fullName": "present"
    },
    "simTypes": [
      "eSIM",
      "pSIM"
    ],
    "sms": 100,
    "smsUnit": "message",
    "status": "available",
    "validity": {
      "minimumPeriods": 12,
      "type": "recurring",
      "unit": "day",
      "value": 7
    },
    "voice": 30000,
    "voiceUnit": "second",
    "createdAt": "2021-01-21T19:38:34Z"
  },
  "sim": {
    "object": "sim",
    "id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
    "metadata": {},
    "iccid": "89883070000007537119",
    "provider": "p9",
    "status": "inactive",
    "type": "eSIM",
    "createdAt": "2021-01-21T19:38:34Z"
  },
  "status": "pending",
  "subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
  "appliedAt": "2021-01-21T19:36:57Z",
  "completedAt": "2021-01-21T19:36:57Z",
  "createdAt": "2021-01-21T19:12:28Z",
  "scheduledAt": "2021-01-21T19:12:28Z"
}

DELETE/projects/{project}/subscriptionChanges/{id}

Delete a subscription change

Retrieve the details of an existing subscription change and delete it. Only subscription changes that have not been applied can be deleted.

Path Parameters

  • Name
    project
    Type
    string
    required
    Description

    The unique identifier for the project.

    Example: gigs
  • Name
    id
    Type
    string
    required
    Description

    The unique identifier for the subscription change.

    Example: sch_0SNlurA049MEWV3bE0SMtbIEJApp

Response Schemas

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always subscriptionChange.

  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the subscription change.

    Example: sch_0SNlurA049MEWV3bE0SMtbIEJApp
  • Name
    failureCode
    Type
    nullable string
    required
    Description

    An error code indicating the reason for a failed subscription change.

  • Name
    plan
    Type
    nullable object
    required
    Description
    The plan to which the subscription should be changed.
    • 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
      PREVIEW
      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
  • Name
    sim
    Type
    nullable object
    required
    Description
    The SIM to which the subscription should be changed.
    • Name
      object
      Type
      string
      required
      Description

      Type of object is always sim.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the SIM.

      Example: sim_0SNlurA049MEWV1BAAmWZULA4lf6
    • Name
      metadata
      Type
      object
      PREVIEW
      required
      Description
      A set of key-value pairs, to store metadata related to the resource.
    • Name
      iccid
      Type
      string
      required
      Description

      The ICCID (integrated circuit card identifier) associated with the SIM.

      Example: 89883070000007537119
    • Name
      provider
      Type
      string
      required
      Description

      The ID of the network provider of the SIM.

      Example: p9
    • Name
      status
      Type
      string
      required
      Description

      The status of the SIM. Can be active or inactive.

      Allowed values: inactive, active, retired
    • Name
      type
      Type
      string
      required
      Description

      The type of the SIM. Can be eSIM or pSIM.

      Allowed values: eSIM, pSIM
    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the SIM was created.

      Example: 2021-01-21T19:38:34Z
  • Name
    status
    Type
    string
    required
    Description

    The current status of the subscription change.

    Allowed values: pending, applied, failed
  • Name
    subscription
    Type
    nullable string
    required
    Description

    Unique identifier of the subscription to be changed.

    Example: sub_0SNlurA049MEWV2gSfSxi00xlPIi
  • Name
    appliedAt
    Type
    nullable string
    required
    Description

    Time when the subscription change was applied.

    Example: 2021-01-21T19:36:57Z
  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the subscription change was created.

    Example: 2021-01-21T19:12:28Z
  • Name
    scheduledAt
    Type
    string
    required
    Description

    Approximate time when the change should take place.

    Example: 2021-01-21T19:12:28Z

Request

DELETE
/projects/{project}/subscriptionChanges/{id}
curl https://api.gigs.com/projects/{project}/subscriptionChanges/{id} \
-X DELETE \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"

Responses

{
  "object": "subscriptionChange",
  "id": "sch_0SNlurA049MEWV3bE0SMtbIEJApp",
  "failureCode": null,
  "plan": {
    "object": "plan",
    "id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
    "metadata": {},
    "allowances": {
      "dataBytes": 10000000000,
      "voiceSeconds": 30000,
      "smsMessages": 100
    },
    "coverage": {
      "object": "coverage",
      "id": "de",
      "countries": [
        "DE",
        "FR",
        "US"
      ],
      "name": "Europe"
    },
    "data": 10000000000,
    "dataUnit": "byte",
    "description": "A data plan you will love! Operates in most countries of the world.",
    "image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
    "limits": {
      "dataBytes": 100000000000,
      "bandwidthBitsPerSecond": null,
      "throttling": {
        "thresholdBytes": 10000000000,
        "bandwidthBitsPerSecond": 512000
      }
    },
    "name": "Gigs Global",
    "price": {
      "amount": 999,
      "currency": "USD"
    },
    "provider": "p5",
    "requirements": {
      "address": "present",
      "device": "none",
      "user.birthday": "none",
      "user.fullName": "present"
    },
    "simTypes": [
      "eSIM",
      "pSIM"
    ],
    "sms": 100,
    "smsUnit": "message",
    "status": "available",
    "validity": {
      "minimumPeriods": 12,
      "type": "recurring",
      "unit": "day",
      "value": 7
    },
    "voice": 30000,
    "voiceUnit": "second",
    "createdAt": "2021-01-21T19:38:34Z"
  },
  "sim": {
    "object": "sim",
    "id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
    "metadata": {},
    "iccid": "89883070000007537119",
    "provider": "p9",
    "status": "inactive",
    "type": "eSIM",
    "createdAt": "2021-01-21T19:38:34Z"
  },
  "status": "pending",
  "subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
  "appliedAt": "2021-01-21T19:36:57Z",
  "completedAt": "2021-01-21T19:36:57Z",
  "createdAt": "2021-01-21T19:12:28Z",
  "scheduledAt": "2021-01-21T19:12:28Z"
}

GET/projects/{project}/subscriptionChanges

List all subscription changes

Returns a list of subscription changes. The subscription changes returned are sorted by creation date, with the most recently created subscription changes appearing first.

Path Parameters

  • Name
    project
    Type
    string
    required
    Description

    The unique identifier for the project.

    Example: gigs

Query Parameters

  • Name
    status
    Type
    array
    Description

    A comma-separated list of statuses to filter the subscription changes by.

    Default: pending
  • Name
    subscription
    Type
    string
    Description

    The unique identifier for the subscription to be filtered by.

    Example: sub_0SNlurA049MEWV2gSfSxi00xlPIi
  • Name
    user
    Type
    string
    Description

    The unique identifier for the user to be filtered by.

    Example: usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
  • Name
    after
    Type
    string
    Description

    A cursor for use in pagination. The after parameter takes an object ID that defines the position in the list, only items immediately following the item with that ID will be returned.

  • Name
    before
    Type
    string
    Description

    A cursor for use in pagination. The before parameter takes an object ID that defines the position in the list, only items immediately preceding the item with that ID will be returned.

  • Name
    limit
    Type
    integer
    Description

    The limit of items to be returned in the list, between 0 and 200.

    Default: 10
    >= 0
    <= 200

Response Schemas

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always list.

  • Name
    items
    Type
    array
    required
    Description

    List of objects of type subscriptionChange.

  • 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}/subscriptionChanges
curl https://api.gigs.com/projects/{project}/subscriptionChanges \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"

Responses

{
  "object": "list",
  "items": [
    {
      "object": "subscriptionChange",
      "id": "sch_0SNlurA049MEWV3bE0SMtbIEJApp",
      "failureCode": null,
      "plan": {
        "object": "plan",
        "id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
        "metadata": {},
        "allowances": {
          "dataBytes": 10000000000,
          "voiceSeconds": 30000,
          "smsMessages": 100
        },
        "coverage": {
          "object": "coverage",
          "id": "de",
          "countries": [
            "DE",
            "FR",
            "US"
          ],
          "name": "Europe"
        },
        "data": 10000000000,
        "dataUnit": "byte",
        "description": "A data plan you will love! Operates in most countries of the world.",
        "image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
        "limits": {
          "dataBytes": 100000000000,
          "bandwidthBitsPerSecond": null,
          "throttling": {
            "thresholdBytes": 10000000000,
            "bandwidthBitsPerSecond": 512000
          }
        },
        "name": "Gigs Global",
        "price": {
          "amount": 999,
          "currency": "USD"
        },
        "provider": "p5",
        "requirements": {
          "address": "present",
          "device": "none",
          "user.birthday": "none",
          "user.fullName": "present"
        },
        "simTypes": [
          "eSIM",
          "pSIM"
        ],
        "sms": 100,
        "smsUnit": "message",
        "status": "available",
        "validity": {
          "minimumPeriods": 12,
          "type": "recurring",
          "unit": "day",
          "value": 7
        },
        "voice": 30000,
        "voiceUnit": "second",
        "createdAt": "2021-01-21T19:38:34Z"
      },
      "sim": {
        "object": "sim",
        "id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
        "metadata": {},
        "iccid": "89883070000007537119",
        "provider": "p9",
        "status": "inactive",
        "type": "eSIM",
        "createdAt": "2021-01-21T19:38:34Z"
      },
      "status": "pending",
      "subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
      "appliedAt": "2021-01-21T19:36:57Z",
      "completedAt": "2021-01-21T19:36:57Z",
      "createdAt": "2021-01-21T19:12:28Z",
      "scheduledAt": "2021-01-21T19:12:28Z"
    }
  ],
  "moreItemsAfter": null,
  "moreItemsBefore": null
}

POST/projects/{project}/subscriptionChanges

Create a subscription change

Creates a new subscription change for an existing subscription in the specified project.

Body

  • Name
    plan
    Type
    nullable string
    Description

    Unique identifier of the target plan, to which the subscription should be changed.

    Example: pln_0SNlurA049MEWV3V0q7gjQbM4EVo
  • Name
    sim
    Type
    nullable string
    Description

    Unique identifier of the target SIM, to which the subscription should be changed. Can also be set to "auto", in which case an eSIM will be automatically allocated.

    Example: sim_0SNlurA049MEWV1BAAmWZULA4lf6
  • Name
    subscription
    Type
    string
    required
    Description

    Unique identifier of the subscription to be changed.

    Example: sub_0SNlurA049MEWV2gSfSxi00xlPIi
  • Name
    when
    Type
    string
    Description

    When the change should take effect. If set to "now", the change will take effect immediately. If set to "renewal", the change will instead take effect at the next subscription renewal date. Currently plan changes can only happen on "renewal", and sim changes can only happen "now".

    Example: renewal
    Default: renewal
    Allowed values: now, renewal

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

  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the subscription change.

    Example: sch_0SNlurA049MEWV3bE0SMtbIEJApp
  • Name
    failureCode
    Type
    nullable string
    required
    Description

    An error code indicating the reason for a failed subscription change.

  • Name
    plan
    Type
    nullable object
    required
    Description
    The plan to which the subscription should be changed.
    • 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
      PREVIEW
      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
  • Name
    sim
    Type
    nullable object
    required
    Description
    The SIM to which the subscription should be changed.
    • Name
      object
      Type
      string
      required
      Description

      Type of object is always sim.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the SIM.

      Example: sim_0SNlurA049MEWV1BAAmWZULA4lf6
    • Name
      metadata
      Type
      object
      PREVIEW
      required
      Description
      A set of key-value pairs, to store metadata related to the resource.
    • Name
      iccid
      Type
      string
      required
      Description

      The ICCID (integrated circuit card identifier) associated with the SIM.

      Example: 89883070000007537119
    • Name
      provider
      Type
      string
      required
      Description

      The ID of the network provider of the SIM.

      Example: p9
    • Name
      status
      Type
      string
      required
      Description

      The status of the SIM. Can be active or inactive.

      Allowed values: inactive, active, retired
    • Name
      type
      Type
      string
      required
      Description

      The type of the SIM. Can be eSIM or pSIM.

      Allowed values: eSIM, pSIM
    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the SIM was created.

      Example: 2021-01-21T19:38:34Z
  • Name
    status
    Type
    string
    required
    Description

    The current status of the subscription change.

    Allowed values: pending, applied, failed
  • Name
    subscription
    Type
    nullable string
    required
    Description

    Unique identifier of the subscription to be changed.

    Example: sub_0SNlurA049MEWV2gSfSxi00xlPIi
  • Name
    appliedAt
    Type
    nullable string
    required
    Description

    Time when the subscription change was applied.

    Example: 2021-01-21T19:36:57Z
  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the subscription change was created.

    Example: 2021-01-21T19:12:28Z
  • Name
    scheduledAt
    Type
    string
    required
    Description

    Approximate time when the change should take place.

    Example: 2021-01-21T19:12:28Z

Request

POST
/projects/{project}/subscriptionChanges
curl https://api.gigs.com/projects/{project}/subscriptionChanges \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d "{\"plan\":\"pln_0SNlurA049MEWV3V0q7gjQbM4EVo\",\"sim\":\"sim_0SNlurA049MEWV1BAAmWZULA4lf6\",\"subscription\":\"sub_0SNlurA049MEWV2gSfSxi00xlPIi\",\"when\":\"renewal\"}"

Responses

{
  "object": "subscriptionChange",
  "id": "sch_0SNlurA049MEWV3bE0SMtbIEJApp",
  "failureCode": null,
  "plan": {
    "object": "plan",
    "id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
    "metadata": {},
    "allowances": {
      "dataBytes": 10000000000,
      "voiceSeconds": 30000,
      "smsMessages": 100
    },
    "coverage": {
      "object": "coverage",
      "id": "de",
      "countries": [
        "DE",
        "FR",
        "US"
      ],
      "name": "Europe"
    },
    "data": 10000000000,
    "dataUnit": "byte",
    "description": "A data plan you will love! Operates in most countries of the world.",
    "image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
    "limits": {
      "dataBytes": 100000000000,
      "bandwidthBitsPerSecond": null,
      "throttling": {
        "thresholdBytes": 10000000000,
        "bandwidthBitsPerSecond": 512000
      }
    },
    "name": "Gigs Global",
    "price": {
      "amount": 999,
      "currency": "USD"
    },
    "provider": "p5",
    "requirements": {
      "address": "present",
      "device": "none",
      "user.birthday": "none",
      "user.fullName": "present"
    },
    "simTypes": [
      "eSIM",
      "pSIM"
    ],
    "sms": 100,
    "smsUnit": "message",
    "status": "available",
    "validity": {
      "minimumPeriods": 12,
      "type": "recurring",
      "unit": "day",
      "value": 7
    },
    "voice": 30000,
    "voiceUnit": "second",
    "createdAt": "2021-01-21T19:38:34Z"
  },
  "sim": {
    "object": "sim",
    "id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
    "metadata": {},
    "iccid": "89883070000007537119",
    "provider": "p9",
    "status": "inactive",
    "type": "eSIM",
    "createdAt": "2021-01-21T19:38:34Z"
  },
  "status": "pending",
  "subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
  "appliedAt": "2021-01-21T19:36:57Z",
  "completedAt": "2021-01-21T19:36:57Z",
  "createdAt": "2021-01-21T19:12:28Z",
  "scheduledAt": "2021-01-21T19:12:28Z"
}