list_orders

View as MarkdownOpen in Claude

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
1{
2 "links": {
3 "self": "string",
4 "first": "string",
5 "next": "string",
6 "prev": "string"
7 },
8 "data": [
9 {
10 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
11 "state": "pending",
12 "processed_at": "2024-01-15T09:30:00Z",
13 "created_at": "2024-01-15T09:30:00Z",
14 "updated_at": "2024-01-15T09:30:00Z",
15 "status_callback_url": "https://example.com/handle_callback"
16 }
17 ]
18}

Example

1from signalwire.rest import RestClient
2
3client = RestClient(
4 project="your-project-id",
5 token="your-api-token",
6 host="your-space.signalwire.com",
7)
8
9orders = client.registry.campaigns.list_orders("campaign-id")
10for order in orders.get("data", []):
11 print(order.get("id"), order.get("status"))