Skip to Content
API ReferenceSchedules

Schedules

Schedules define recurring task execution for bridges, such as syncing orders every 15 minutes or pulling shipment updates hourly. They use cron syntax for timing.

List Schedules

GET/api/v1/schedules

List all schedules for the organization.

Requiredbridges:read

Returns a paginated list of schedules with their cron expression, bridge, and task details.

Query Parameters

ParameterTypeDescription
pagenumberPage number (default: 1)
limitnumberItems per page (default: 20, max: 100)
bridge_idstringFilter by bridge ID
statusstringFilter by status: active, paused
curl -X GET "https://api.orderly-hub.com/api/v1/schedules?status=active" \ -H "Authorization: Bearer oh_..."

Response

{ "data": [ { "id": "uuid", "bridge_id": "uuid", "bridge_name": "Production Shopify", "task": "grab-orders", "cron": "*/15 * * * *", "status": "active", "last_run_at": "2026-01-15T10:15:00Z", "next_run_at": "2026-01-15T10:30:00Z", "created_at": "2026-01-01T00:00:00Z" } ], "pagination": { "page": 1, "limit": 20, "total": 6, "totalPages": 1, "hasMore": false } }

Get Schedule

GET/api/v1/schedules/:id

Retrieve a single schedule by ID.

Requiredbridges:read

Returns the full schedule object including its bridge details, cron expression, run statistics, and last error information.

curl -X GET "https://api.orderly-hub.com/api/v1/schedules/550e8400-e29b-41d4-a716-446655440000" \ -H "Authorization: Bearer oh_..."

Response

{ "data": { "id": "uuid", "organizationId": "uuid", "bridgeId": "uuid", "taskName": "grab-orders", "cronExpression": "*/15 * * * *", "timezone": "UTC", "input": {}, "isActive": true, "lastRunAt": "2026-01-15T10:15:00Z", "nextRunAt": "2026-01-15T10:30:00Z", "runCount": 142, "errorCount": 2, "lastError": null, "createdAt": "2026-01-01T00:00:00Z", "updatedAt": "2026-01-15T10:15:00Z", "bridge": { "name": "Production Shopify", "type": "shopify" } } }

Create Schedule

POST/api/v1/schedules

Create a new recurring schedule for a bridge task.

Requiredbridges:write

Creates a new schedule. The bridge must be active and support the specified task.

Request Body

FieldTypeRequiredDescription
bridge_idstringYesBridge to schedule
taskstringYesTask to execute (e.g., grab-orders, grab-shipments)
cronstringYesCron expression (e.g., */15 * * * * for every 15 minutes)
statusstringNoInitial status: active or paused (default: active)
timezonestringNoIANA timezone (default: UTC)
curl -X POST "https://api.orderly-hub.com/api/v1/schedules" \ -H "Authorization: Bearer oh_..." \ -H "Content-Type: application/json" \ -d '{ "bridge_id": "550e8400-e29b-41d4-a716-446655440000", "task": "grab-orders", "cron": "*/15 * * * *", "timezone": "America/New_York" }'

Update Schedule

PATCH/api/v1/schedules/:id

Update a schedule's cron expression, task, or status.

Requiredbridges:write

Updates a schedule. Changing the cron expression takes effect at the next scheduled run.

curl -X PATCH "https://api.orderly-hub.com/api/v1/schedules/550e8400-e29b-41d4-a716-446655440000" \ -H "Authorization: Bearer oh_..." \ -H "Content-Type: application/json" \ -d '{"cron": "0 * * * *", "status": "paused"}'

Delete Schedule

DELETE/api/v1/schedules/:id

Delete a schedule.

Requiredbridges:write

Permanently deletes a schedule. Any currently executing task will complete, but no future runs will be triggered.

curl -X DELETE "https://api.orderly-hub.com/api/v1/schedules/550e8400-e29b-41d4-a716-446655440000" \ -H "Authorization: Bearer oh_..."

Pause Schedule

POST/api/v1/schedules/:id/pause

Pause a schedule to temporarily stop recurring execution.

Requiredbridges:write

Pauses an active schedule. The schedule remains configured but no new runs will be triggered until it is resumed. Any currently executing task will complete.

curl -X POST "https://api.orderly-hub.com/api/v1/schedules/550e8400-e29b-41d4-a716-446655440000/pause" \ -H "Authorization: Bearer oh_..."

Response

{ "data": { "id": "uuid", "organizationId": "uuid", "bridgeId": "uuid", "taskName": "grab-orders", "cronExpression": "*/15 * * * *", "timezone": "UTC", "isActive": false, "lastRunAt": "2026-01-15T10:15:00Z", "nextRunAt": null, "runCount": 142, "errorCount": 2, "createdAt": "2026-01-01T00:00:00Z", "updatedAt": "2026-01-15T11:00:00Z" } }

Resume Schedule

POST/api/v1/schedules/:id/resume

Resume a paused schedule to restart recurring execution.

Requiredbridges:write

Resumes a paused schedule. The next run will be scheduled according to the cron expression.

curl -X POST "https://api.orderly-hub.com/api/v1/schedules/550e8400-e29b-41d4-a716-446655440000/resume" \ -H "Authorization: Bearer oh_..."

Response

{ "data": { "id": "uuid", "organizationId": "uuid", "bridgeId": "uuid", "taskName": "grab-orders", "cronExpression": "*/15 * * * *", "timezone": "UTC", "isActive": true, "lastRunAt": "2026-01-15T10:15:00Z", "nextRunAt": "2026-01-15T11:15:00Z", "runCount": 142, "errorCount": 2, "createdAt": "2026-01-01T00:00:00Z", "updatedAt": "2026-01-15T11:00:00Z" } }

Trigger Schedule

POST/api/v1/schedules/:id/trigger

Manually trigger a scheduled task to run immediately.

Requiredbridges:write

Manually triggers the scheduled task to run immediately. This does not affect the regular schedule — the next automatic run will still occur at the scheduled time. Useful for testing or forcing an immediate sync.

curl -X POST "https://api.orderly-hub.com/api/v1/schedules/550e8400-e29b-41d4-a716-446655440000/trigger" \ -H "Authorization: Bearer oh_..."

Response (201 Created)

{ "data": { "id": "uuid", "organizationId": "uuid", "bridgeId": "uuid", "taskName": "grab-orders", "status": "queued", "input": {}, "createdAt": "2026-01-15T11:00:00Z" } }