Sync Shiptheory Shipments
POST/api/shiptheory/:integration_instance/shipments/sync
Starts a background reconcile that backfills carrier costs and mints any missed shipment rows for recently completed Shiptheory orders on this instance. Carrier cost data can lag booking, so this re-polls the affected orders and updates in place. 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" reconcile.
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". Limited to a 365-day window.
- reference (string, required when mode=specific): reconcile only the 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.
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.