Sync Orders
POST/api/faire/instances/:integrationInstance/sync-orders
Trigger an order sync from Faire for a specific integration instance.
Path Parameters:
integrationInstance- The ID of the integration instance
Behavior:
- Dispatches a background job (
SyncFaireOrdersJob) immediately - The job pulls all new/updated orders from the Faire API since the last sync cursor
- Multi-tenant safety (SKU-8024): Each order's top-level
is_fulfilled_by_faireflag is compared against the instance'sfulfillment_modesetting before persisting. FBM instances skip orders flaggedis_fulfilled_by_faire=true; FBF instances skip orders flaggedis_fulfilled_by_faire=false. This prevents a brand that shares an OAuth token across an FBM and FBF instance from cross-contaminating either side. The skipped count is recorded in the sync log. - Combined with the composite-unique constraint on
(integration_instance_id, faire_order_id), two sibling instances can safely sync the same brand simultaneously without stomping each other's rows. - Progress can be tracked via the returned
tracked_job_log_id
Response: Returns immediately with a tracked job log ID. Use the job progress tray to monitor completion.
Request
Responses
- 200
Successful response