Orders

View as MarkdownOpen in Claude

Retrieve number assignment orders. Orders track the process of assigning phone numbers to 10DLC campaigns.

Access via client.registry.orders on a RestClient instance.

1import { RestClient } from "@signalwire/sdk";
2
3const client = new RestClient();

get

Retrieve a specific number assignment order.

Path parameters

idstringRequiredformat: "uuid"
Unique ID of the order.

Response

idstringRequiredformat: "uuid"
The unique identifier of the order.
statestringOptional
The current state of the order.
processed_atdatetimeOptional
Timestamp when the order was processed.
created_atdatetimeOptional
Timestamp when the order was created.
updated_atdatetimeOptional
Timestamp when the order was last updated.
status_callback_urlstringOptional
Optional: Specify a URL to receive webhook notifications when your number assignment order and the number assignments that belong to it change state. See the [10DLC status callback](/docs/apis/rest/campaign-registry/webhooks/ten-dlc-status-callback) docs for the webhook payload.

Response Example

Response
1{
2 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
3 "state": "pending",
4 "processed_at": "2024-01-15T09:30:00Z",
5 "created_at": "2024-01-15T09:30:00Z",
6 "updated_at": "2024-01-15T09:30:00Z",
7 "status_callback_url": "https://example.com/handle_callback"
8}

Example

1import { RestClient } from "@signalwire/sdk";
2
3const client = new RestClient({
4 project: "your-project-id",
5 token: "your-api-token",
6 host: "your-space.signalwire.com"
7});
8
9const order = await client.registry.orders.get("order-id");
10console.log(order.id, order.status);