Skip to Content
API ReferenceDispatchers

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

GET/api/dispatchers

List all dispatchers for the organization.

Requireddispatchers:read

Returns a paginated list of dispatchers with their status, conditions, and assigned operations.

Query Parameters

ParameterTypeDescription
pagenumberPage number (default: 1)
limitnumberItems per page (default: 20, max: 100)
statusstringFilter by status: active, inactive
triggerstringFilter 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

GET/api/dispatchers/:id

Retrieve a single dispatcher by ID.

Requireddispatchers:read

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

POST/api/dispatchers

Create a new dispatcher rule.

Requireddispatchers:write

Creates a new dispatcher. The dispatcher starts in inactive status by default.

Request Body

FieldTypeRequiredDescription
namestringYesDisplay name
triggerstringYesTrigger event: order_created, order_updated, shipment_created
condition_set_idstringNoCondition set to evaluate (matches all if omitted)
operation_configobjectYesOperation to execute when conditions match
prioritynumberNoExecution priority (lower runs first, default: 100)
statusstringNoInitial 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

PATCH/api/dispatchers/:id

Update a dispatcher's configuration.

Requireddispatchers:write

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

DELETE/api/dispatchers/:id

Delete a dispatcher.

Requireddispatchers:write

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

POST/api/dispatchers/:id/run

Manually trigger a dispatcher against current data.

Requireddispatchers:write

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" } }