Skip to navigation

List number assignment orders for a campaign.

Path parameters

idstringRequiredformat: "uuid"
Unique ID of the campaign.

Query parameters

filter_statestringOptional
The state of the orders in the registration process, such as pending or processed. Will return all orders with this value.

Response

datalist of objectsOptional
List of orders.

Response Example

Response
{
"links": {
"self": "string",
"first": "string",
"next": "string",
"prev": "string"
},
"data": [
{
"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 orders = await client.registry.campaigns.listOrders("campaign-id");
for (const order of orders.data ?? []) {
console.log(order.id, order.state);
}