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.

import { RestClient } from "@signalwire/sdk";
const 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/webhooks/ten-dlc-status-callback) docs for the webhook payload.

Response Example

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

Example

import { RestClient } from "@signalwire/sdk";
const client = new RestClient({
project: "your-project-id",
token: "your-api-token",
host: "your-space.signalwire.com"
});
const order = await client.registry.orders.get("order-id");
console.log(order.id, order.status);