curl --request GET \
--url https://apiv2.example.com/orders/{orderId} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://apiv2.example.com/orders/{orderId}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://apiv2.example.com/orders/{orderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiv2.example.com/orders/{orderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apiv2.example.com/orders/{orderId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apiv2.example.com/orders/{orderId}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.example.com/orders/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"orderId": "order-123",
"state": "PENDING",
"lineItems": [
{
"type": "SUBSCRIPTION",
"lineItemId": "line-item-1",
"productOfferingId": "mobile-plan-basic",
"msisdn": "+15551234567",
"leaseToken": "<string>",
"tempNumber": true,
"portingRequested": true,
"porting": {
"details": {
"firstName": "<string>",
"lastName": "<string>",
"address": {
"street1": "500 S Main St",
"city": "Natick",
"zip": "01701",
"country": "US",
"street2": "Apt 1",
"state": "CA",
"region": "<string>",
"attention": "<string>"
},
"accountNumber": "<string>",
"passcode": "<string>"
}
},
"extensions": {},
"display": "<string>",
"subscriber": {
"name": "John Doe",
"email": "john.doe@example.com",
"msisdn": "+15551234567",
"address": {
"street1": "500 S Main St",
"city": "Natick",
"zip": "01701",
"country": "US",
"street2": "Apt 1",
"state": "CA",
"region": "<string>",
"attention": "<string>"
}
},
"sim": {
"esim": true,
"imei": "356938035643809",
"iccid": "8931440400000000000"
},
"scheduleActivationAt": "2024-02-01",
"metadata": {},
"status": "PENDING"
}
],
"validation": {
"isValid": false,
"missingFields": [
"customer",
"billing.address"
],
"errors": [
{
"message": "<string>",
"property": "<string>"
}
],
"lineItemValidation": [
{
"lineItemId": "line-item-1",
"isValid": false,
"missingFields": [
"subscriber.name",
"sim.iccid"
],
"errors": [
{
"message": "<string>",
"property": "<string>"
}
]
}
]
},
"requirements": {
"requiresPayment": "NOT_REQUIRED",
"requiresPaymentProfile": "NOT_REQUIRED",
"requiresSigning": "NOT_REQUIRED"
},
"expiresAt": "2024-01-22T10:30:00Z",
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
"user": {
"userId": "c47ac10b-58cc-4372-a567-0e02b2c3d479",
"newUser": true,
"name": "John Doe"
},
"customer": {
"customerType": "CONSUMER",
"name": "John Doe",
"newCustomer": true,
"customerId": "b47ac10b-58cc-4372-a567-0e02b2c3d479"
},
"billing": {
"name": "John Doe",
"email": "billing@example.com",
"address": {
"street1": "500 S Main St",
"city": "Natick",
"zip": "01701",
"country": "US",
"street2": "Apt 1",
"state": "CA",
"region": "<string>",
"attention": "<string>"
}
},
"shipping": {
"name": "John Doe",
"address": {
"street1": "500 S Main St",
"city": "Natick",
"zip": "01701",
"country": "US",
"street2": "Apt 1",
"state": "CA",
"region": "<string>",
"attention": "<string>"
},
"msisdn": "+15551234567",
"instructions": "Leave at front door"
},
"promoCode": "STUDENT2024",
"paymentSessionId": "d2e3f4a5-b6c7-8901-2345-012345678901",
"paymentProfileSessionId": "69321a62-f1fe-461f-8761-a19ae6587bb2",
"signingSessionId": "8f3b1c2d-4e5f-6789-abcd-1234567890ef",
"consents": {
"termsOfService": "true",
"marketing": "true"
},
"pricing": {
"total": 137.39,
"currency": "USD",
"calculatedAt": "2024-01-15T10:30:00Z",
"subtotal": 125.99,
"taxAmount": 10.08,
"fees": 1.32,
"taxIncluded": true,
"recurringCosts": {
"subtotal": 29.99,
"total": 32.39,
"taxAmount": 2.4,
"taxIncluded": true,
"billingCycle": {
"period": "MONTHLY",
"interval": 1
}
},
"initialInvoice": {
"subtotal": 14.5,
"total": 15.66,
"taxAmount": 123,
"taxIncluded": true,
"period": {
"start": "2024-01-15",
"end": "2024-01-31"
}
}
},
"externalPayment": {
"reference": "ext-payment-ref-123",
"receiptDescription": "Payment via external billing system",
"receiptUrl": "https://external.example.com/receipts/123",
"receivedAt": "2024-01-15T14:30:00Z"
},
"submittedAt": "2024-01-15T14:30:00Z",
"completedAt": "2024-01-15T15:00:00Z",
"createdEntities": {
"subscriptions": [
{
"subscriptionId": "<string>",
"status": "PENDING",
"type": "<string>",
"display": "<string>",
"msisdn": "<string>",
"customerId": "<string>",
"productOfferingId": "<string>",
"subscriberId": "<string>",
"activatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdByLineItem": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"cancelledAt": "2023-11-07T05:31:56Z"
}
],
"licenses": [
{
"licenseId": "<string>",
"status": "PENDING",
"type": "<string>",
"customerId": "<string>",
"productOfferingId": "<string>",
"activatedAt": "2023-11-07T05:31:56Z",
"createdByLineItem": "g47ac10b-58cc-4372-a567-0e02b2c3d479",
"assignedTo": {
"type": "SUBSCRIPTION",
"subscriptionId": "<string>"
},
"cancelledAt": "2023-11-07T05:31:56Z",
"pausedAt": "2023-12-25"
}
],
"addons": [
{
"status": "PENDING",
"createdByLineItem": "h47ac10b-58cc-4372-a567-0e02b2c3d479",
"productOfferingId": "<string>",
"referenceId": "telna-package-12345",
"productOfferingGroupId": "<string>",
"licenseId": "<string>",
"addedAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"cancelledAt": "2023-11-07T05:31:56Z",
"metadata": {}
}
],
"modifications": [
{
"type": "SUBSCRIPTION_CHANGE",
"targetId": "e8174435-6378-4be5-a9f5-8b4aaadae5d4",
"createdByLineItem": "i47ac10b-58cc-4372-a567-0e02b2c3d479",
"newProductOfferingId": "po_mobile_premium_plus",
"appliedAt": "2023-11-07T05:31:56Z"
}
]
},
"metadata": {}
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}Get order
Retrieve a specific order by ID with all line items and current status.
curl --request GET \
--url https://apiv2.example.com/orders/{orderId} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://apiv2.example.com/orders/{orderId}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://apiv2.example.com/orders/{orderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiv2.example.com/orders/{orderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apiv2.example.com/orders/{orderId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apiv2.example.com/orders/{orderId}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.example.com/orders/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"orderId": "order-123",
"state": "PENDING",
"lineItems": [
{
"type": "SUBSCRIPTION",
"lineItemId": "line-item-1",
"productOfferingId": "mobile-plan-basic",
"msisdn": "+15551234567",
"leaseToken": "<string>",
"tempNumber": true,
"portingRequested": true,
"porting": {
"details": {
"firstName": "<string>",
"lastName": "<string>",
"address": {
"street1": "500 S Main St",
"city": "Natick",
"zip": "01701",
"country": "US",
"street2": "Apt 1",
"state": "CA",
"region": "<string>",
"attention": "<string>"
},
"accountNumber": "<string>",
"passcode": "<string>"
}
},
"extensions": {},
"display": "<string>",
"subscriber": {
"name": "John Doe",
"email": "john.doe@example.com",
"msisdn": "+15551234567",
"address": {
"street1": "500 S Main St",
"city": "Natick",
"zip": "01701",
"country": "US",
"street2": "Apt 1",
"state": "CA",
"region": "<string>",
"attention": "<string>"
}
},
"sim": {
"esim": true,
"imei": "356938035643809",
"iccid": "8931440400000000000"
},
"scheduleActivationAt": "2024-02-01",
"metadata": {},
"status": "PENDING"
}
],
"validation": {
"isValid": false,
"missingFields": [
"customer",
"billing.address"
],
"errors": [
{
"message": "<string>",
"property": "<string>"
}
],
"lineItemValidation": [
{
"lineItemId": "line-item-1",
"isValid": false,
"missingFields": [
"subscriber.name",
"sim.iccid"
],
"errors": [
{
"message": "<string>",
"property": "<string>"
}
]
}
]
},
"requirements": {
"requiresPayment": "NOT_REQUIRED",
"requiresPaymentProfile": "NOT_REQUIRED",
"requiresSigning": "NOT_REQUIRED"
},
"expiresAt": "2024-01-22T10:30:00Z",
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
"user": {
"userId": "c47ac10b-58cc-4372-a567-0e02b2c3d479",
"newUser": true,
"name": "John Doe"
},
"customer": {
"customerType": "CONSUMER",
"name": "John Doe",
"newCustomer": true,
"customerId": "b47ac10b-58cc-4372-a567-0e02b2c3d479"
},
"billing": {
"name": "John Doe",
"email": "billing@example.com",
"address": {
"street1": "500 S Main St",
"city": "Natick",
"zip": "01701",
"country": "US",
"street2": "Apt 1",
"state": "CA",
"region": "<string>",
"attention": "<string>"
}
},
"shipping": {
"name": "John Doe",
"address": {
"street1": "500 S Main St",
"city": "Natick",
"zip": "01701",
"country": "US",
"street2": "Apt 1",
"state": "CA",
"region": "<string>",
"attention": "<string>"
},
"msisdn": "+15551234567",
"instructions": "Leave at front door"
},
"promoCode": "STUDENT2024",
"paymentSessionId": "d2e3f4a5-b6c7-8901-2345-012345678901",
"paymentProfileSessionId": "69321a62-f1fe-461f-8761-a19ae6587bb2",
"signingSessionId": "8f3b1c2d-4e5f-6789-abcd-1234567890ef",
"consents": {
"termsOfService": "true",
"marketing": "true"
},
"pricing": {
"total": 137.39,
"currency": "USD",
"calculatedAt": "2024-01-15T10:30:00Z",
"subtotal": 125.99,
"taxAmount": 10.08,
"fees": 1.32,
"taxIncluded": true,
"recurringCosts": {
"subtotal": 29.99,
"total": 32.39,
"taxAmount": 2.4,
"taxIncluded": true,
"billingCycle": {
"period": "MONTHLY",
"interval": 1
}
},
"initialInvoice": {
"subtotal": 14.5,
"total": 15.66,
"taxAmount": 123,
"taxIncluded": true,
"period": {
"start": "2024-01-15",
"end": "2024-01-31"
}
}
},
"externalPayment": {
"reference": "ext-payment-ref-123",
"receiptDescription": "Payment via external billing system",
"receiptUrl": "https://external.example.com/receipts/123",
"receivedAt": "2024-01-15T14:30:00Z"
},
"submittedAt": "2024-01-15T14:30:00Z",
"completedAt": "2024-01-15T15:00:00Z",
"createdEntities": {
"subscriptions": [
{
"subscriptionId": "<string>",
"status": "PENDING",
"type": "<string>",
"display": "<string>",
"msisdn": "<string>",
"customerId": "<string>",
"productOfferingId": "<string>",
"subscriberId": "<string>",
"activatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdByLineItem": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"cancelledAt": "2023-11-07T05:31:56Z"
}
],
"licenses": [
{
"licenseId": "<string>",
"status": "PENDING",
"type": "<string>",
"customerId": "<string>",
"productOfferingId": "<string>",
"activatedAt": "2023-11-07T05:31:56Z",
"createdByLineItem": "g47ac10b-58cc-4372-a567-0e02b2c3d479",
"assignedTo": {
"type": "SUBSCRIPTION",
"subscriptionId": "<string>"
},
"cancelledAt": "2023-11-07T05:31:56Z",
"pausedAt": "2023-12-25"
}
],
"addons": [
{
"status": "PENDING",
"createdByLineItem": "h47ac10b-58cc-4372-a567-0e02b2c3d479",
"productOfferingId": "<string>",
"referenceId": "telna-package-12345",
"productOfferingGroupId": "<string>",
"licenseId": "<string>",
"addedAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"cancelledAt": "2023-11-07T05:31:56Z",
"metadata": {}
}
],
"modifications": [
{
"type": "SUBSCRIPTION_CHANGE",
"targetId": "e8174435-6378-4be5-a9f5-8b4aaadae5d4",
"createdByLineItem": "i47ac10b-58cc-4372-a567-0e02b2c3d479",
"newProductOfferingId": "po_mobile_premium_plus",
"appliedAt": "2023-11-07T05:31:56Z"
}
]
},
"metadata": {}
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}Authorizations
An API key that grants access to the Connect API. You can create and manage API keys in the portal.
Path Parameters
The unique identifier of the order
Response
Order retrieved successfully
A shopping cart for telecommunications services and products. Add line items to configure services, get pricing, and submit for fulfillment. Orders track progress from creation through completion.
Unique identifier for the order.
"order-123"
The status of an order in its lifecycle.
- PENDING: Order is in cart state, can be modified
- PENDING_PAYMENT: Order is locked and awaiting payment completion
- SUBMITTED: Order has been submitted for processing
- PENDING_APPROVAL: Order is pending approval
- PROCESSING: Order is being fulfilled
- COMPLETED: Order has been successfully fulfilled
- CANCELLED: Order was cancelled before completion
- EXPIRED: Order expired due to inactivity
- FAILED: Order fulfillment failed
PENDING, PENDING_PAYMENT, SUBMITTED, PENDING_APPROVAL, PROCESSING, COMPLETED, CANCELLED, EXPIRED, FAILED Line items in the order.
A line item in an order representing a billable action or service.
- Subscription
- License
- Add-on
- External Product
- External Item
- Subscription Change
- License Change
- Add-on Change
Show child attributes
Show child attributes
Validation status of the order and its line items.
Show child attributes
Show child attributes
Requirements to submit the order. All listed requirements must be met before the order can be submitted.
What is required depends on platform configuration and the contents of the order.
For example, a prepaid order with only free items would not require payment, it could however require card capture. Postpaid orders typically either require card capture or signing.
Show child attributes
Show child attributes
When the order expires if not submitted (automatically refreshed on each order update to maintain active session).
"2024-01-22T10:30:00Z"
When the order was created.
"2024-01-15T10:00:00Z"
When the order was last updated.
"2024-01-15T10:30:00Z"
The user associated with this order. Includes minimal details about the user and creation details if the user was created during order fulfillment.
Show child attributes
Show child attributes
The customer associated with this order. Includes minimal details about the customer and creation details if the customer was created during order fulfillment.
Show child attributes
Show child attributes
Billing information for an order.
For existing customers, we suggest you pre-fill this with the customer's billing information, however it is possible to override this at the order level.
Show child attributes
Show child attributes
Shipping information for order fulfillment. Only required if the order contains shippable items.
Show child attributes
Show child attributes
Promotional code applied to this order, if any.
"STUDENT2024"
The payment session that collected payment for this order, set when the order was submitted with one.
"d2e3f4a5-b6c7-8901-2345-012345678901"
The payment profile session used to set up a payment method for this order, set when the order was submitted with one.
"69321a62-f1fe-461f-8761-a19ae6587bb2"
The signing session that captured the customer's signature for this order, set when the order was submitted with one.
"8f3b1c2d-4e5f-6789-abcd-1234567890ef"
Customer consents and acknowledgments.
Show child attributes
Show child attributes
{
"termsOfService": "true",
"marketing": "true"
}
The price of an order. In regions with complex tax rules (e.g., the US), you need to call the price calculation endpoint to get accurate tax amounts before submitting the order. In other regions, tax is dependent on customer type but typically included.
Show child attributes
Show child attributes
External payment details if the order was paid outside the system.
Show child attributes
Show child attributes
When the order was submitted for fulfillment.
"2024-01-15T14:30:00Z"
When the order was completed.
"2024-01-15T15:00:00Z"
Entities created as part of order fulfillment.
Show child attributes
Show child attributes
A set of key-value pairs that can be attached to an object for storing additional information in a semi-structured format.
Show child attributes
Show child attributes