Get credit transaction history
Get a list of credit transactions of the customer.
Credit history is a chronological audit log of all credit operations on a customer account. Each record captures the operation type (deposit, reduction, or transfer), the amount, timestamp, store, partner, and an optional note.
The customer_id parameter is required. Filter by operation type using credit_operation_type, or search within notes using credit_operation_note. Use time_from and time_to to scope results to a date range.
Related: GET /credits, POST /credits/actions/deposit (enterprise interface only), POST /credits/actions/reduce (enterprise interface only)
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 customer. GET /customers
The unique ID of the store in CareCloud. GET /stores
Unique ID of the partner from the resource GET /partners.
Start of the time interval for filtering. 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. 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.
Search record by the operation type name or a part of the operation type name.
Search record by the operation note or a part of the operation note.
Headers
The unique ID of the language code by ISO 639-1.
Response
OK
Example response
{
"data": {
"credit_history": [
{
"customer_id": "8ea2591121e636086a4a9c0992",
"amount": 1000,
"credit_operation_type": "Manually added credits",
"credit_operation_note": "Addition",
"partner_id": "86e05affc7a7abefcd513ab400",
"currency_id": "86e05affc7a7abefcd513ab400",
"store_id": "81eaeea13b8984a169c490a325",
"credit_history_record_time": "2023-03-07 09:53:55"
}
],
"total_items": 1
}
}