Skip to main content

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.

Required scope: integrations:write

Grant 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​

OK

Response Headers
    Content-Type