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
| Field | Type | Role | Records | Description |
|---|---|---|---|---|
status | string | dimension | ✅ | Draft order status (open, invoice sent, completed). |
name | string | dimension | ✅ | Draft order name, e.g. #D1. |
currency | string | dimension | ✅ | Draft order currency code. |
email | string | dimension | ✅ | Customer email on the draft order. |
ready | boolean | dimension | ✅ | Whether the draft order is ready to be completed. |
visible_to_customer | boolean | dimension | ✅ | Whether the draft order is visible to the customer. |
created_at | date | dimension | ✅ | When the draft order was created. |
completed_at | date | dimension | ✅ | When the draft order was completed into an order. |
draft_order_count | number | metric | aggregate only | Number of draft orders in the group (document count — value_count on createdAt). Sums across stores. |
total_price | money | metric | ✅ | Total draft order value including taxes and shipping. |
subtotal | money | metric | ✅ | Line items value before shipping and taxes. |
total_tax | money | metric | ✅ | Total tax on the draft order. |
total_shipping | money | metric | ✅ | Shipping charged on the draft order. |
total_discounts | money | metric | ✅ | Total discounts applied to the draft order. |
total_quantity | number | metric | ✅ | Total number of line item units in the draft order. |
store | string | dimension | ✅ | The shop the record belongs to. Filter with WHERE store IN ('Shop name') or GROUP BY store. |