Skip to main content

Order Lifecycle

SIM’s and connectivity plans are purchased by creating orders. Order fulfilment is asynchronous due to the nature of SIM and network provisioning. Below there is the complete list of statuses for an order and also an example request/response of an order creation and an order status requests.

StatusDescription
ACCEPTEDwaiting to be processed
FULFILLINGbeing processed at the moment
COMPLETEDprocessed with success
FAILEDfailed to be processed

Example Request

curl -X GET \
https://services.truphone.com/connect-api/v2/orders/3a6acf89-1ccf-4611-9424-453930f57ef1 \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'X-Correlation-ID: unique-id-from-requester-123'

Example Response

{
"id": "6d41c4ff-1877-4d13-82b0-7dad02c4b02a",
"status": "COMPLETED",
"created_date": "2021-02-24T09:00:00Z",
"output": {
"matching_id": "6C-DA326D-K86D",
"iccid": "8944000013283712983321",
"subscription_id": "Q-hzHc6EErZPQcgw2L02_nDdruGtr6lDrM-jmja_xuE="
},
"_metadata": {
"links": {
"_lpa": "1$rsp.truphone.com$6C-DA326D-K86D",
"_sim": "{BASE_URL}/v2/sims/8944000013283712983321",
"_qrcode": "https://services.truphone.com/connect/qrcode/v1/esim/LPA:1$rsp.truphone.com$FDSAA-ASD",
"_smdp": "rsp.truphone.com",
"_subscription": "{BASE_URL}/v2/subscriptions/Q-hzHc6EErZPQcgw2L02_nDdruGtr6lDrM-jmja_xuE=",
"_self": "{BASE_URL}/v2/orders/6d41c4ff-1877-4d13-82b0-7dad02c4b02a"
}
}
}