Skip to main content

Add new Subscription

The Orders API enables organizations to submit provisioning requests, facilitating the onboarding process. Newly provisioned eSIMs are sent directly to the specified email addresses provided in the request.

Submit an Order

To initiate the process, send an HTTP POST request to the endpoint below:

POST  https://api.1global.com/enterprise/orders

The header must contain the URL Request Access Token, and content-type as shown below:

curl -X POST \
https://api.1global.com/enterprise/orders \
-H 'Authorization: Bearer $ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d --data @body.json

Example Request Body

In the body.json file, the JSON payload should contain the following parameters:

  • type (string, required): Must be "activate_subscription" to create a subscription.
  • account_id (string, required): Identifies the account where the subscription will be provisioned.
  • template_id (string, required): Specifies the combination of plans and products. Obtainable from the Account Manager.
  • first_name (string, required): Subscriber's first name.
  • last_name (string, required): Subscriber's last name.
  • email (string, required): Subscriber's email.
  • employee_id (string, optional): The internal identification number of the subscriber.
  • group (string, optional): The organizational unit the employee belongs to.
  • sim_type (string, required): Must be "esim".
  • delivery (object, required): Details about eSIM delivery:
    • type (string, required): Delivery method. Use "email".
    • to (array, required): Recipient email(s) for the eSIM QR code.
    • cc (array, optional): Additional email(s) for the eSIM QR code.
{
"type": "activate_subscription",
"account_id": "acc_00DKABCDE12ECXW8AYBVBTT000",
"template_id": "otpl_A00ABCDRT1F00AVRPTAQ5XTEST",
"subscriber": {
"first_name": "John",
"last_name": "Jordan",
"email": "j.jordan@star-industries.com",
"employee_id": "12345",
"group": "finance"
},
"sim_profile": {
"sim_type": "esim",
"delivery": {
"type": "email",
"to": ["j.jordan@star-industries.com"],
"cc": ["a.peterson@star-industries.com"]
}
}
}

Example Response

Upon successful submission, the API returns an Order ID and the status pending, indicating that the order processing has begun.

{
"id": "order_01HZS5KETGM8XXF53WZJWDTEST",
"status": "pending",
"type": "activate_subscription",
"account_id": "acc_00DKABCDE12ECXW8AYBVBTT000",
"template_id": "otpl_A00ABCDRT1F00AVRPTAQ5XTEST",
"subscriber": {
"first_name": "John",
"last_name": "Jordan",
"email": "j.jordan@star-industries.com",
"employee_id": "12345",
"group": "finance"
},
"sim_profile": {
"sim_type": "esim",
"delivery": {
"type": "email",
"to": ["j.jordan@star-industries.com"],
"cc": ["a.peterson@star-industries.com"]
}
},
"_links": {
"self": {
"href": "https://api.staging.1global.com/ordering/orders/orders/order_01HZS5KETGM8XXF53WZJWDTEST"
}
}
}

Monitor Order Status

Due to asynchronous processing, implement periodic polling to check the order status until it reaches a final state: completed or cancelled. Send a GET request to check the current status of the order:

GET  https://api.1global.com/enterprise/orders/{order_Id}

Replace order_Id with the unique order ID received from the initial response (e.g., order_01HZS5KETGM8XXF53WZJWDTEST).

curl -X GET \
https://api.1global.com/enterprise/orders/order_01HZS5KETGM8XXF53WZJWDTEST\
-H 'Authorization: Bearer $ACCESS_TOKEN' \
-H 'Content-Type: application/json'

Continue polling the order status periodically. When the status changes to completed, provisioning is finished. The response includes eSIM details like the ICCID and subscription ID.

Example Response

{
"id": "order_01HZS5KETGM8XXF53WZJWDDV4C",
"status": "completed",
"type": "activate_subscription",
"account_id": "acc_00DKABCDE12ECXW8AYBVBTT000",
"subscription_id": "sub_01DRGT6VG8C79TX5CW1W9696X9",
"subscriber": {
"id": "sbr_01HF9SHB00WDFA5VT2JTME7YCK",
"first_name": "John",
"last_name": "Jordan",
"email": "j.jordan@star-industries.com",
"employee_id": "12345",
"group": "finance"
},
"sim_profile": {
"sim_type": "esim",
"iccid": "8944478100000700000",
"delivery": {
"type": "email",
"to": ["j.jordan@star-industries.com"],
"cc": ["a.peterson@star-industries.com"]
}
},
"phone_numbers": [
{
"msisdn": "123456789",
"is_primary": "true",
"country": "US"
},
{
"msisdn": "987654321",
"is_primary": "false",
"country": "UK"
}
],
"_links": {
"self": {
"href": "https://api.staging.1global.com/ordering/orders/orders/order_01HZS5KETGM8XXF53WZJWDDV4C"
}
}
}
note

Although not likely to happen, the status cancelled exists to accomodate any unforseen event that makes it impossible to fulfill your request. Your Account Manager will be able to provide you additional info.