Sync Orders (Queue Job)
POST/api/starshipit/integration-instances/:integration_instance/orders/sync
Queue a background (tracked) job to sync orders from StarShipIt into SKU.io. Progress is reported through the tracked job log endpoints and can also be polled via Get Order Sync Progress.
Any valid API token can call this endpoint — no specific scope required. Manage tokens.
Body parameters (all optional):
mode— one ofsince_latest|date_range|all.since_latest: sync orders dated on/after the most recently synced order. Send the latest synced order date asdate_from.date_range: sync orders betweendate_fromanddate_to(inclusive). StarShipIt's API only bounds the start date, so the end date (date_to) is applied by post-filtering fetched pages.all: pull full order history;date_from/date_toare ignored.
date_from— start date (YYYY-MM-DD). Lower bound forsince_latestanddate_range.date_to— end date (YYYY-MM-DD). Upper bound fordate_rangeonly.since_date— legacy alias fordate_from, kept for backward compatibility with the previous one-click refresh. Used only whendate_fromis absent.
When mode is omitted the job falls back to the instance's configured order start date (or its sync-days-back window).
Authentication: Requires 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.
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
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.