customerPastPurchases
Requires a customer (portal or buyer app) session.
Paginated partner purchase history for the Quick order tab. screen 6.
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 CustomerPastPurchases {
customerPastPurchases {
items {
uomCode
productName
variantName
currency
lastOrderedAt
lastUnitPrice
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query CustomerPastPurchases {\n customerPastPurchases {\n items {\n uomCode\n productName\n variantName\n currency\n lastOrderedAt\n lastUnitPrice\n }\n }\n}"
}
EOF
Response:
{
"data": {
"customerPastPurchases": {
"items": [
{
"uomCode": "string",
"productName": "string",
"variantName": "string",
"currency": "string",
"lastOrderedAt": "2025-01-15T00:00:00Z",
"lastUnitPrice": 0
}
]
}
}
}
customerPastPurchases(
pagination: CustomerPaginationInput
): CustomerPastPurchaseConnection!
Arguments
customerPastPurchases.pagination ● CustomerPaginationInput input
Which page to return, and optional search text.
Type
CustomerPastPurchaseConnection object
A page of past purchases.