curl --request GET \
--url https://api.decodahealth.com/billing/cash-balance/timeline \
--header 'API-KEY: <api-key>' \
--header 'TENANT: <tenant>'{
"events": [
{
"id": "<string>",
"type": "balance_closure",
"date": "2023-11-07T05:31:56Z",
"cashBalance": {
"id": "<string>",
"creatorId": "<string>",
"locationId": "<string>",
"closingBalance": 123,
"balanceDiscrepancy": 123,
"createdDate": "2023-11-07T05:31:56Z",
"discrepancyAcknowledged": false,
"acknowledgedById": "<string>",
"updatedDate": "2023-11-07T05:31:56Z",
"isArchived": false,
"locationName": "<string>",
"creatorName": "<string>",
"acknowledgedByName": "<string>"
},
"adjustment": {
"id": "<string>",
"locationId": "<string>",
"amount": 123,
"reason": "<string>",
"creatorId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"isArchived": false,
"creatorName": "<string>"
},
"calculatedBalance": {
"date": "2023-11-07T05:31:56Z",
"endingBalance": 123,
"startingBalance": 123,
"cashPayments": 123,
"cashRefunds": 123,
"adjustments": 123,
"locationId": "<string>",
"locationName": "<string>"
},
"paymentSummary": {
"id": "<string>",
"amount": 123,
"payerName": "<string>",
"creatorName": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"paymentMedium": "<string>"
},
"refundSummary": {
"id": "<string>",
"amount": 123,
"payerName": "<string>",
"creatorName": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"reason": "<string>"
},
"locationName": "<string>"
}
],
"stats": {
"totalEvents": 123,
"balanceClosures": 123,
"adjustments": 123,
"discrepancies": 123
}
}Get complete cash balance timeline for a location with all events aggregated.
By default (when no start_date is provided), returns the last 7 days of data for performance. The timeline will automatically include the most recent cash balance closure before the start date to ensure accurate running balance calculations.
curl --request GET \
--url https://api.decodahealth.com/billing/cash-balance/timeline \
--header 'API-KEY: <api-key>' \
--header 'TENANT: <tenant>'{
"events": [
{
"id": "<string>",
"type": "balance_closure",
"date": "2023-11-07T05:31:56Z",
"cashBalance": {
"id": "<string>",
"creatorId": "<string>",
"locationId": "<string>",
"closingBalance": 123,
"balanceDiscrepancy": 123,
"createdDate": "2023-11-07T05:31:56Z",
"discrepancyAcknowledged": false,
"acknowledgedById": "<string>",
"updatedDate": "2023-11-07T05:31:56Z",
"isArchived": false,
"locationName": "<string>",
"creatorName": "<string>",
"acknowledgedByName": "<string>"
},
"adjustment": {
"id": "<string>",
"locationId": "<string>",
"amount": 123,
"reason": "<string>",
"creatorId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"isArchived": false,
"creatorName": "<string>"
},
"calculatedBalance": {
"date": "2023-11-07T05:31:56Z",
"endingBalance": 123,
"startingBalance": 123,
"cashPayments": 123,
"cashRefunds": 123,
"adjustments": 123,
"locationId": "<string>",
"locationName": "<string>"
},
"paymentSummary": {
"id": "<string>",
"amount": 123,
"payerName": "<string>",
"creatorName": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"paymentMedium": "<string>"
},
"refundSummary": {
"id": "<string>",
"amount": 123,
"payerName": "<string>",
"creatorName": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"reason": "<string>"
},
"locationName": "<string>"
}
],
"stats": {
"totalEvents": 123,
"balanceClosures": 123,
"adjustments": 123,
"discrepancies": 123
}
}The tenant you are making this request on behalf of
Your api key
Successful Response
Complete timeline response including events and stats.
List of timeline events
Show child attributes
Unique identifier for the event
Type of timeline event
balance_closure, adjustment, calculated_balance, discrepancy_note, cash_payment, cash_refund Date/time of the event
Cash balance details if type is balance_closure
Show child attributes
The unique identifier for the cash balance
The ID of the creator
The ID of the location
The closing balance amount in cents
The balance discrepancy amount in cents
The date and time the cash balance was created
Whether the discrepancy has been acknowledged
The ID of the user who acknowledged the discrepancy
The date and time the cash balance was last updated
Whether the cash balance record is archived/voided
The name of the location
The name of the creator
The name of the user who acknowledged the discrepancy
Adjustment details if type is adjustment
Show child attributes
The unique identifier for the adjustment
The ID of the location
The adjustment amount in cents
The reason for the adjustment
The ID of the creator
The date and time the adjustment was created
Whether the adjustment has been voided
The name of the creator
Calculated balance details if type is calculated_balance
Show child attributes
The date for this calculated balance
Ending balance in cents
Starting balance in cents
Total cash payments in cents
Total cash refunds in cents
Total adjustments in cents
The location ID
The location name
Payment details if type is cash_payment
Show child attributes
Payment ID
Payment amount in cents
Name of the payer
Name of the user who processed the payment
Payment creation date
Payment medium (e.g., CASH)
Refund details if type is cash_refund
Show child attributes
Refund ID
Refund amount in cents
Name of the original payer
Name of the user who processed the refund
Refund creation date
Reason for the refund
Name of the location