Count purchase orders per stage, with what is open, on the way, arriving soon, late and owed

The same stage, ETA and late rules as the list. arrivingSoon counts the purchase orders the list answers for arrivingWithinDays=14: open, with an ETA between now and 14 days from now. balanceOwed and balanceOverdue are per currency and count only purchase orders that track payments (a purchase order starts tracking with its first recorded payment, or when it is created here) and still have something owed: an overpaid purchase order (a balance below zero) is left out, so it never takes anything off what is owed on the others; drafts and cancelled purchase orders are left out too. A purchase order that is closed short counts with what it owes for what it received, not for what it ordered; once units of it are received after that, it counts with its total again. vendorCredit is the other side, per currency too: the money vendors hold that is owed back, which is every balance below zero (counted as a positive amount) among the purchase orders that track payments and were sent or cancelled: an overpaid one, one that was paid ahead and then closed short, a cancelled one whose payments were not refunded. A draft never counts. It is an empty list when there is none, and it is never taken off balanceOwed. defaultCurrency is the currency a purchase order created without one gets.

Scope: outgoing-purchase-orders:read, outgoing-purchase-orders:write, channel:write or admin. A permission group made before the Channel API scopes existed grants it as inventory:read or supply-chain:read.

Idempotency: not keyed; the request itself is safe to repeat.

Rate limit: read class, 6,000 requests per minute per tenant by default (write class 1,200). Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; a refusal is 429 rate_limited with Retry-After.

Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json