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
/api/v1/schedulesList all schedules for the organization.
Returns a paginated list of schedules with their cron expression, bridge, and task details.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (default: 1) |
limit | number | Items per page (default: 20, max: 100) |
bridge_id | string | Filter by bridge ID |
status | string | Filter 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
/api/v1/schedules/:idRetrieve a single schedule by ID.
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
/api/v1/schedulesCreate a new recurring schedule for a bridge task.
Creates a new schedule. The bridge must be active and support the specified task.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
bridge_id | string | Yes | Bridge to schedule |
task | string | Yes | Task to execute (e.g., grab-orders, grab-shipments) |
cron | string | Yes | Cron expression (e.g., */15 * * * * for every 15 minutes) |
status | string | No | Initial status: active or paused (default: active) |
timezone | string | No | IANA 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
/api/v1/schedules/:idUpdate a schedule's cron expression, task, or status.
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
/api/v1/schedules/:idDelete a schedule.
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
/api/v1/schedules/:id/pausePause a schedule to temporarily stop recurring execution.
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
/api/v1/schedules/:id/resumeResume a paused schedule to restart recurring execution.
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
/api/v1/schedules/:id/triggerManually trigger a scheduled task to run immediately.
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"
}
}