Skip to main content

Get Order Filter Options (Distinct Values)

GET 

/api/faire/orders/filter-options

Tenant resolution (multi-instance safety): Both shapes are accepted, in priority order:

  • filter[integration_instance_ids] (preferred, Amazon-unified plural form; comma-separated CSV — first ID wins)
  • filter[instance_id] (legacy singular)
  • ?instance_id= query string fallback
  • body instance_id (POST/PUT only)

If none resolve to an existing FaireIntegrationInstance the endpoint returns an empty/zeroed payload — it does NOT silently fall back to the first tenant's data.

Empty-options response (when no instance can be resolved):

{
"data": {
"statuses": [],
"currencies": [],
"country_codes": [],
"tracking_carriers": [],
"tracking_submission_statuses": []
}
}

Returns distinct values for the Faire orders datatable filter dropdowns. Mirrors the Shopify pattern — only values that actually appear in the data for the given integration instance are surfaced.

Query Parameters:

  • instance_id (optional) — Faire integration instance to scope the distinct query. Defaults to the first available instance.

Response Fields (data):

  • statuses — Distinct faire_orders.status values (e.g. NEW, PROCESSING, COMPLETE, CANCELLED)
  • currencies — Distinct faire_orders.currency_code values (ISO 4217)
  • country_codes — Distinct faire_orders.retailer_country_code values
  • tracking_carriers — Distinct faire_orders.tracking_carrier values
  • tracking_submission_statuses — Distinct faire_orders.tracking_submission_status values (pending, submitted, failed)

Request

Responses

Successful response