Dispatchers
Dispatchers are automated routing rules that match orders against condition sets and trigger operations. They enable hands-off order processing by defining what should happen when specific conditions are met.
List Dispatchers
/api/dispatchersList all dispatchers for the organization.
Returns a paginated list of dispatchers with their status, conditions, and assigned operations.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (default: 1) |
limit | number | Items per page (default: 20, max: 100) |
status | string | Filter by status: active, inactive |
trigger | string | Filter by trigger type |
curl -X GET "https://api.orderly.dev/api/dispatchers?status=active" \
-H "Authorization: Bearer ord_sk_..."Response
{
"data": [
{
"id": "uuid",
"name": "Route FedEx Orders",
"status": "active",
"trigger": "order_created",
"condition_set_id": "uuid",
"operation_config": { "type": "create_shipment", "carrier": "fedex" },
"priority": 10,
"created_at": "2026-01-01T00:00:00Z"
}
],
"pagination": { "page": 1, "limit": 20, "total": 5, "totalPages": 1, "hasMore": false }
}Get Dispatcher
/api/dispatchers/:idRetrieve a single dispatcher by ID.
Returns the full dispatcher including its condition set, operation configuration, and execution history.
curl -X GET "https://api.orderly.dev/api/dispatchers/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer ord_sk_..."Create Dispatcher
/api/dispatchersCreate a new dispatcher rule.
Creates a new dispatcher. The dispatcher starts in inactive status by default.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name |
trigger | string | Yes | Trigger event: order_created, order_updated, shipment_created |
condition_set_id | string | No | Condition set to evaluate (matches all if omitted) |
operation_config | object | Yes | Operation to execute when conditions match |
priority | number | No | Execution priority (lower runs first, default: 100) |
status | string | No | Initial status: active or inactive (default: inactive) |
curl -X POST "https://api.orderly.dev/api/dispatchers" \
-H "Authorization: Bearer ord_sk_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Auto-ship domestic ground",
"trigger": "order_created",
"condition_set_id": "660e8400-e29b-41d4-a716-446655440000",
"operation_config": {
"type": "create_shipment",
"carrier_account_id": "770e8400-e29b-41d4-a716-446655440000",
"service": "GROUND_HOME_DELIVERY"
},
"priority": 10,
"status": "active"
}'Update Dispatcher
/api/dispatchers/:idUpdate a dispatcher's configuration.
Updates a dispatcher. You can change its name, conditions, operation config, priority, or toggle it active/inactive.
curl -X PATCH "https://api.orderly.dev/api/dispatchers/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer ord_sk_..." \
-H "Content-Type: application/json" \
-d '{"status": "inactive", "priority": 50}'Delete Dispatcher
/api/dispatchers/:idDelete a dispatcher.
Permanently deletes a dispatcher. In-progress operations triggered by this dispatcher will still complete.
curl -X DELETE "https://api.orderly.dev/api/dispatchers/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer ord_sk_..."Run Dispatcher
/api/dispatchers/:id/runManually trigger a dispatcher against current data.
Runs the dispatcher against all matching records. This evaluates the condition set and creates operations for all matches. Useful for backfilling or testing.
curl -X POST "https://api.orderly.dev/api/dispatchers/550e8400-e29b-41d4-a716-446655440000/run" \
-H "Authorization: Bearer ord_sk_..."Response
{
"data": {
"matched": 42,
"operations_created": 42,
"dispatcher_id": "uuid"
}
}