import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const simCardOrder = await client.simCardOrders.create({ address_id: '1293384261075731499', quantity: 23 });
console.log(simCardOrder.data);{
"data": {
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "sim_card_order",
"quantity": 21,
"cost": {
"amount": "2.52",
"currency": "USD"
},
"order_address": {
"id": "1293384261075731499",
"street_address": "600 Congress Avenue",
"extended_address": "14th Floor",
"locality": "Austin",
"administrative_area": "TX",
"country_code": "US",
"postal_code": "78701"
},
"tracking_url": "http://www.example.com/",
"status": "pending",
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}Creates a new order for SIM cards.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const simCardOrder = await client.simCardOrders.create({ address_id: '1293384261075731499', quantity: 23 });
console.log(simCardOrder.data);{
"data": {
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "sim_card_order",
"quantity": 21,
"cost": {
"amount": "2.52",
"currency": "USD"
},
"order_address": {
"id": "1293384261075731499",
"street_address": "600 Congress Avenue",
"extended_address": "14th Floor",
"locality": "Austin",
"administrative_area": "TX",
"country_code": "US",
"postal_code": "78701"
},
"tracking_url": "http://www.example.com/",
"status": "pending",
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Successful Response
Show child attributes
Identifies the resource.
"6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Identifies the type of the resource.
"sim_card_order"
The amount of SIM cards requested in the SIM card order.
x >= 121
An object representing the address information from when the order was submitted.
Show child attributes
Uniquely identifies the address for the order.
"1293384261075731499"
The first name of the shipping recipient.
"John"
The last name of the shipping recipient.
"Smith"
The name of the business where the address is located.
"Telnyx LLC"
The name of the street where the address is located.
"600 Congress Avenue"
Supplemental field for address information.
"14th Floor"
The name of the city where the address is located.
"Austin"
State or province where the address is located.
"TX"
The mobile operator two-character (ISO 3166-1 alpha-2) origin country code.
"US"
Postal code for the address.
"78701"
{
"id": "1293384261075731499",
"street_address": "600 Congress Avenue",
"extended_address": "14th Floor",
"locality": "Austin",
"administrative_area": "TX",
"country_code": "US",
"postal_code": "78701"
}The URL used to get tracking information about the order.
"http://www.example.com/"
The current status of the SIM Card order.<ul> <li><code>pending</code> - the order is waiting to be processed.</li> <li><code>processing</code> - the order is currently being processed.</li> <li><code>ready_to_ship</code> - the order is ready to be shipped to the specified <b>address</b>.</li> <li><code>shipped</code> - the order was shipped and is on its way to be delivered to the specified <b>address</b>.</li> <li><code>delivered</code> - the order was delivered to the specified <b>address</b>.</li> <li><code>canceled</code> - the order was canceled.</li> </ul>
pending, processing, ready_to_ship, shipped, delivered, canceled "pending"
ISO 8601 formatted date-time indicating when the resource was last created.
"2018-02-02T22:25:27.521Z"
ISO 8601 formatted date-time indicating when the resource was last updated.
"2018-02-02T22:25:27.521Z"
Was this page helpful?