Admin API / Types
BuyerStats
ObjectTotals of a buyer's sold orders from the caller, and from the owners of the stores where the caller is store staff. Counts orders with payment status PAID (paid, ready to ship, shipped or delivered). Orders awaiting payment, cancelled orders and refunded orders do not count, and partial refunds are not subtracted. Counts only the orders in the current payment mode of the marketplace: live orders while its new payments move real money, else test orders. Covers every such order, whatever the list's where selects.
type BuyerStatsFields
| Field | Type | Description |
|---|---|---|
firstOrderAt | DateTime | When the buyer placed the first counted order. Null when orderCount is 0. |
lastOrderAt | DateTime | When the buyer placed the latest counted order. Null when orderCount is 0. |
orderCount | NonNegativeInt! | Number of counted orders. |
totalSpent | Money! | Sum of the counted order totals in USD: subtotal, shipping fee and sales tax, before discounts. |