list_orders

Updated October 12, 20262 min read

List orders with paging, sorting, search, merchant filters, date filters, hold filters, and fulfillment-order-aware filters. For the on-hold review queue, filter with status on_hold and sort by on_hold_details.sla_timestamp; each order carries on_hold_details. Use select with json-mask syntax to trim the returned payload.

Parameters

NameTypeRequiredDescription
tenantIdstringYes—
agg_bystringNo—
assigned_to_useroneOfNoID of the user or team the latest order-level hold is assigned to. A released hold still matches, so combine with status on_hold for the open queue.
billing_countryoneOfNo—
country_accessoneOfNo—
creation_date_fromstringNo—
creation_date_tostringNo—
creation_source_typeoneOfNo—
customer_keyoneOfNoCustomer key of the order, to list the orders of one customer.
fieldsoneOfNo—
fulfillment_order_item_cancellation_reasononeOfNo—
fulfillment_order_item_statusoneOfNo—
hold_date_fromstringNoFirst day of the hold date range, yyyy-MM-dd. Used with hold_metric held; defaults to six days before today.
hold_date_tostringNoLast day of the hold date range, yyyy-MM-dd. Used with hold_metric held; defaults to today.
hold_metricstringNoAutomatic holds only. awaiting_review returns orders currently held by an order hold rule; held returns orders that an order hold rule put on hold between hold_date_from and hold_date_to. The hold can still be active, already released, or followed by another hold. Values: held, awaiting_review.
hold_rule_idstringNoNarrow hold_metric to one order hold rule. Requires hold_metric.
location_accessoneOfNo—
location_idoneOfNo—
merchantoneOfNo—
on_holdoneOfNotrue returns orders where the order or any of its fulfillment orders is on hold; false returns the rest. Status on_hold matches only orders held as a whole.
order_date_fromstringNo—
order_date_tostringNo—
order_idsoneOfNo—
order_refsoneOfNo—
pageoneOfNo—
page_sizeoneOfNo—
sales_channeloneOfNo—
search_modestringNo—
search_stringstringNo—
selectstringNojson-mask expression to filter response fields.
shipping_cityoneOfNo—
shipping_countryoneOfNo—
shipping_stateoneOfNo—
sort_bystringNoOrder field to sort by, for example creation_date or on_hold_details.sla_timestamp.
sort_directionstringNoValues: asc, desc.
statusoneOfNoOrder status: open, partially_allocated, allocated, processing, fulfilled, cancelled, closed, on_hold. on_hold returns orders held as a whole.
sub_agg_bystringNo—
total_quantity_fromoneOfNo—
total_quantity_tooneOfNo—
tzoffsetoneOfNo—
update_date_fromstringNo—
update_date_tostringNo—
update_source_typeoneOfNo—

Example agent prompt

"Show me the recent orders."

list_orders(
  tenantId="…"
)

Example: the on-hold review queue

"Which orders are on hold, most urgent first?"

list_orders(
  tenantId="…",
  status="on_hold",
  sort_by="on_hold_details.sla_timestamp",
  sort_direction="asc",
  select="orders(order_id,partner_order_reference,on_hold_details)"
)