Draft orders

Draft orders — value, quantity and count by status, for the quote/invoice pipeline.

16 fields — 9 dimensions, 7 metrics. Date clauses (SINCE, UNTIL, DURING) use createdAt.

The live, authoritative list is always GET /v1/datasets — this page is regenerated from the same catalog, but the endpoint reflects exactly what is deployed.

Query it

FROM draft_orders
  SHOW draft_order_count
  GROUP BY status
  SINCE -30d

See Querying with SoloQL for the language.

Fetch records

curl -H "Authorization: Bearer esk_live_..." \
  "https://api.ecomsolo.com/v1/draft_orders?page_size=50&fields=status,name,currency"

Any field marked ✅ below can be returned, requested via fields=, and used as an equality filter (?field=value). Fields marked aggregate only exist for COUNT-style questions and have no value on a single record — ask SoloQL for those. See Fetching records.

Fields

FieldTypeRoleRecordsDescription
statusstringdimensionDraft order status (open, invoice sent, completed).
namestringdimensionDraft order name, e.g. #D1.
currencystringdimensionDraft order currency code.
emailstringdimensionCustomer email on the draft order.
readybooleandimensionWhether the draft order is ready to be completed.
visible_to_customerbooleandimensionWhether the draft order is visible to the customer.
created_atdatedimensionWhen the draft order was created.
completed_atdatedimensionWhen the draft order was completed into an order.
draft_order_countnumbermetricaggregate onlyNumber of draft orders in the group (document count — value_count on createdAt). Sums across stores.
total_pricemoneymetricTotal draft order value including taxes and shipping.
subtotalmoneymetricLine items value before shipping and taxes.
total_taxmoneymetricTotal tax on the draft order.
total_shippingmoneymetricShipping charged on the draft order.
total_discountsmoneymetricTotal discounts applied to the draft order.
total_quantitynumbermetricTotal number of line item units in the draft order.
storestringdimensionThe shop the record belongs to. Filter with WHERE store IN ('Shop name') or GROUP BY store.