purchaseOrderSummary
Requires at least one of the permissions purchase:purchase_order:list or purchase:purchase_order:read.
Returns summary figures for purchase orders: counts and values by status (draft, pending, approved, received) and the most recent orders. Needs the purchase order read or list permission and the purchase orders feature on your plan.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query PurchaseOrderSummary {
purchaseOrderSummary {
approvedOrders
draftOrders
lastUpdated
pendingOrders
pendingValue
receivedOrders
recentOrders {
id
orderNumber
supplierCode
trackingCode
creatorName
projectName
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query PurchaseOrderSummary {\n purchaseOrderSummary {\n approvedOrders\n draftOrders\n lastUpdated\n pendingOrders\n pendingValue\n receivedOrders\n recentOrders {\n id\n orderNumber\n supplierCode\n trackingCode\n creatorName\n projectName\n }\n }\n}"
}
EOF
Response:
{
"data": {
"purchaseOrderSummary": {
"approvedOrders": 0,
"draftOrders": 0,
"lastUpdated": "2025-01-15T00:00:00Z",
"pendingOrders": 0,
"pendingValue": 0,
"receivedOrders": 0,
"recentOrders": [
{
"id": "id",
"orderNumber": "string",
"supplierCode": "string",
"trackingCode": "string",
"creatorName": "string",
"projectName": "string"
}
]
}
}
}
purchaseOrderSummary(
supplierId: ID
): PurchaseOrderSummary!
Arguments
purchaseOrderSummary.supplierId ● ID scalar
Only this supplier.
Type
PurchaseOrderSummary object
Counts and values across purchase orders, for the dashboard.