get_orders
Retrieve the farm's sales orders (manual, connected stores and incoming dropships), newest first. Returns { totalMatches, totalMatchesIsExact, truncated, hasMore, nextCursor, orders }. For connected store orders, includes marketplaceStatus and marketplaceFulfillmentStatus raw values. To get the next page, call again with the SAME filters and cursor set to nextCursor exactly as returned; nextCursor is null on the last page (offset/page are not supported). For stale-order checks use unfulfilledOnly: true with olderThanDays (or createdBefore) instead of paging through everything. Supports startDate and endDate filters (YYYY-MM-DD = that whole day in the farm's local time zone, default America/New_York, inclusive; or ISO 8601 datetime). Each order includes shippingName (recipient name), shippingZip (ZIP/postal code), shippingState (US state/province code, e.g. TX, CA) and shippingCountry (country code, e.g. US); no street, phone or email, and salesChannel (amazon, tiktok, shopify_collective, temu, shopify, ebay, wix, squarespace, manual, dropship). Filter with salesChannel or shippingState. Requires farmId and apiKey authorization.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Optional max number of orders to return (default 50, max 100) | |
| cursor | No | Optional pagination cursor: the nextCursor string from the previous get_orders response, passed verbatim with the same filters. Not an order id or page number. | |
| farmId | Yes | The unique farm ID | |
| status | No | Optional filter: pending, partially_fulfilled, fulfilled, unfulfilled, shipped, etc. | |
| endDate | No | YYYY-MM-DD = that whole day in the farm's local time zone (default America/New_York), inclusive; or ISO 8601 datetime | |
| startDate | No | YYYY-MM-DD = that whole day in the farm's local time zone (default America/New_York), inclusive; or ISO 8601 datetime | |
| salesChannel | No | Optional. Only orders from this sales channel. amazon / tiktok / shopify_collective / temu are detected on Shopify-synced orders (precedence amazon > tiktok > shopify_collective > temu; tiktok = TikTok Shop orders); shopify = direct Shopify orders only; ebay, wix, squarespace = that connected store; manual = orders entered in QuailOS; dropship = incoming dropship requests. Use the same value on every page. | |
| createdBefore | No | Optional. Only orders placed before this date (YYYY-MM-DD = start of that day in farm time, or ISO datetime; exclusive). | |
| olderThanDays | No | Optional. Only orders placed more than N days ago (0-3650). Frozen at page 1 so paging stays consistent. | |
| shippingState | No | Optional. Filter orders by US state/province code (e.g. TX, CA, KY). Matches normalized 2-letter uppercase state code. Use the same value on every page. | |
| unfulfilledOnly | No | Optional. true = only orders that still need fulfilment (excludes fulfilled, shipped, delivered, completed, cancelled, refunded). |