Set Shopify Order-History Start
PUT/api/shopify/:integrationInstance/setup/order-history
Record the one-time order-import horizon for this connection.
This endpoint currently requires session authentication; Personal Access Token scope support is in progress.
Writes the root-level start_date setting — the key the order backfill reads first — so the choice actually governs the next import instead of being shadowed by a legacy nested value. Without an explicit horizon the backfill falls back to a bounded default the merchant never chose and cannot see.
Body:
start_date(required, date, today or earlier) — import orders placed on or after this date. The date is a calendar day in the tenant's business timezone — the horizon anchors at midnight of that day in the tenant timezone (stored as UTC), and "today" is judged on the tenant's clock, not the server's.
Returns the recalculated setup state.
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 Content
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.