Refresh Orders from Faire (Tracked)
POST/api/faire/instances/:integrationInstance/orders/refresh-tracked
Dispatches a background job that walks Faire's /api/v2/orders endpoint and upserts faire_orders + faire_order_line_items. Returns immediately with a tracked job log ID — progress is visible via the tracked job log endpoints.
Any valid API token can call this endpoint — no specific scope required. Manage tokens.
Mirrors the products tracked refresh (/refresh-tracked on the products endpoint) so the same UX and progress reporting (synced_orders list, orders_fetched/saved counters) drives the orders refresh modal.
Path Parameters:
integrationInstance— The ID of the integration instance
Body:
mode(required) — One of:incremental— Resume from the persistedsync_cursors.orders.cursor_at. Recommended for routine refreshes; cursor is persisted across runs.full— Reset the cursor and walk Faire's full updated_at-min window (slow). Cursor is NOT persisted (so the next incremental run still resumes from where things left off).date_range— Fetch only orders whoseupdated_atfalls betweendate_fromanddate_to(inclusive). Cursor is NOT persisted.
date_from(required whenmode=date_range) — ISO date string (YYYY-MM-DD). Sent to Faire asupdated_at_min(start-of-day UTC).date_to(required whenmode=date_range) — ISO date string (YYYY-MM-DD). Sent to Faire asupdated_at_max(end-of-day UTC). Must be>= date_from.
Response:
data.tracked_job_log_id— ID of the dispatched tracked job. Poll/api/tracked-job-logs/:idfor progress.message— Human-readable status string.
Validation Errors (422):
modemust be one ofincremental,full,date_rangedate_fromanddate_toare required whenmode=date_rangedate_tomust be on or afterdate_from
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.