Skip to main content

Get Orders Latest Sync Info

GET 

/api/faire/instances/:integrationInstance/orders/latest-sync-info

Aggregate stats about the Faire orders previously synced to this instance. Powers the Refresh from Faire orders modal header card and the latest-sync indicator on the orders index.

Path Parameters:

  • integrationInstance — The ID of the integration instance

Response Fields (data):

  • latest_order_display_id — Display ID of the most-recently-ordered Faire order (highest ordered_at). null when no orders are imported yet.
  • latest_order_date — ISO 8601 timestamp of that order's ordered_at.
  • total_orders — Count of all Faire orders for this instance (active + archived).
  • created_count — Faire orders that have a linked SKU.io sales order (whereHas('salesOrder')).
  • pending_count — Active Faire orders without a linked SKU.io sales order (the auto-create-SKU-orders queue).
  • archived_count — Faire orders with archived_at set.
  • last_synced_at — ISO 8601 timestamp from sync_cursors.orders.synced_at (when the cron last completed). null until the first sync runs.
  • cursor_at — The opaque rolling cursor stored at sync_cursors.orders.cursor_at. When null, the Fetch Since Latest Sync mode is unavailable in the refresh modal.

Request

Responses

Successful response