Sync Shiptheory Orders
POST/api/shiptheory/:integration_instance/orders/sync
Starts a background sweep that reconciles the current state of existing Shiptheory orders for this instance (Shiptheory has no bulk order list, so each non-terminal order is refreshed by its reference). The response returns the tracked job id, which you can poll for progress.
integrations:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
All body fields are optional — send an empty body {} to run the default "since last update" sweep.
Body fields:
- mode (string, optional): one of since_last_update, from_start_date, date_range, specific. Defaults to since_last_update.
- from (date, required when mode=date_range): start of the date window.
- to (date, required when mode=date_range): end of the window; must be on or after "from". Shiptheory limits the search to a 365-day window.
- reference (string, required when mode=specific): refresh only the single order carrying this reference. Max 255 characters.
Returns 200 with { data: { tracked_job_log_id } }. Returns 422 with field errors when the options are invalid (e.g. a date_range wider than 365 days).
Authentication: requires a Bearer token.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.