Get all customer purchases
Get information about all customer account purchases.
Returns all purchase transactions recorded on the customer's account. Each purchase record includes the total value, payment time, store, and purchase type. Use purchase_items_extension=true to include individual line items in the response.
Filter by store, purchase type, and payment date range to narrow results. To retrieve purchases across all customers, use GET /purchases.
Path parameters
The unique ID of the customer.
Query parameters
The number of records to return in API response.
⚠️ We recommended adjust the batch size based on processing time. Depending on the response time of the request. Default value of 100 records is used if count parameter is not set.
The number of records from a collection to skip. Default value of 0 is used when parameter offset is not set.
Name of the sorting parameter. You can sort by any of the first level parameters from the resource response. Response is sorted by the specified field.
Direction of sorting the response list.
The unique ID of the store in CareCloud. GET /stores
The unique ID of the purchase type. GET /purchase-types
Start of the time interval for filtering purchases by payment time. Accepts the format YYYY-MM-DD HH:MM:SS or ISO-8601 format (YYYY-MM-DDTHH:MM:SS). All times are in the local timezone.
End of the time interval for filtering purchases by payment time. Accepts the format YYYY-MM-DD HH:MM:SS or ISO-8601 format (YYYY-MM-DDTHH:MM:SS). All times are in the local timezone.
If true, resource returns extended response with purchase items. If false, the resource won't be extended. If the parameter is not set, the default value is false.
ID of the purchase from external (e-shop, POS) system. This ID should have unique value.
Headers
The unique ID of the language code by ISO 639-1.
Response
OK
Example response
{
"data": {
"purchases": [
{
"purchase_id": "81eaeea13b8984a169c490a325",
"customer_id": "8ea2591121e636086a4a9c0992",
"store_id": "81eaeea13b8984a169c490a325",
"external_purchase_id": "D67X202789",
"payment_time": "2021-02-24 00:00:00",
"items_count": 1,
"purchase_items": [
{
"purchase_item_id": "84b757641df03b1529c2c7f66c",
"product_id": "89b3b24b405f461c63d8fcaa0c",
"product_name": "Apple Watch Ultra 2",
"product_group_id": "82de12eb8b138791e678fd11c3",
"product_group_name": "Smart watch",
"product_brand_id": "82db62087b0f79a6e14e5747e7",
"product_brand_name": "Apple",
"purchase_item_type_id": "86e05affc7a7abefcd513ab400",
"price": 1.99,
"additional_properties": [
{
"property_record_id": "docasna_blokace_darce_do:8ea2591121e636086a4a9c0992",
"property_id": "docasna_blokace_darce_do",
"property_name": "Property #6",
"last_change": "2023-02-02 00:00:00"
}
]
}
],
"type_id": "86e05affc7a7abefcd513ab400",
"total_price": 660,
"currency_id": "8bed991c68a470e7aaeffbf048",
"card_number": "1000000000016",
"cashdesk_number": "2a",
"last_change": "2021-01-17 00:00:00",
"purchase_property_records": [
{
"property_record_id": "docasna_blokace_darce_do:8ea2591121e636086a4a9c0992",
"property_id": "docasna_blokace_darce_do",
"property_name": "Property #6",
"last_change": "2023-02-02 00:00:00"
}
]
}
],
"total_items": 1
}
}