Overview /
Operations /
Open the cash day
Open the cash day
post
https://api.flactrum.com/v1/cash-records
One cash record per branch per day. If today is already open — or already closed — this returns conflict with the existing record id rather than creating a second one.
| Required scope | cash.write |
| Success status | 201 |
| Returns | One CashRecord object |
Request body
| Field | Type | Description |
|---|---|---|
| branch_id * | string | — |
| opening_balance * | number | Cash in the drawer at the start of the day. |
| note | string|null | — |
Response fields
| Field | Type | Description |
|---|---|---|
| id | string | — |
| branch_id | string | — |
| date | string | — |
| status | string | — |
| opening_balance | number | — |
| closing_balance | number|null | What was actually counted at close. |
| expected_balance | number|null | What should have been in the drawer. Frozen at close. |
| difference | number|null | counted − expected. Negative means cash is missing. |
| total_sales | number|null | — |
| cash_sales | number|null | — |
| payment_breakdown | object|null | Sales per payment method, frozen at close. |
| cash_breakdown | object|null | Note and coin counts entered at close. |
| count_code | string|null | 10-character envelope code issued at close (shown as XXXXX-XXXXX). Opens the count page behind count_url. |
| count_url | string|null | Public page encoded in the envelope QR; shows the count only after count_code is entered. |
| method_counts | object|null | Counted amounts per non-cash method. |
| note | string|null | — |
| opened_at | string|null | — |
| closed_at | string|null | — |
Examples
Recorded from the test suite — these are real requests and their real responses.
curl -X POST 'https://api.flactrum.com/v1/cash-records' \
-H 'Authorization: Bearer flk_your_key:your_secret' \
-H 'Content-Type: application/json' \
-d '{
"branch_id": "01m43mzbdnp6xze42d34dfyskp",
"opening_balance": 500
}'
HTTP 201 · application/json
{
"data": {
"id": "01m43mzbe84m2anpbf6hrwjmsf",
"branch_id": "01m43mzbdnp6xze42d34dfyskp",
"branch": {
"id": "01m43mzbdnp6xze42d34dfyskp",
"name": "Nişantaşı",
"code": "NIS",
"city": "İstanbul",
"region": "Bölge 3",
"address": null,
"phone": null,
"is_active": true,
"opened_at": null,
"monthly_rent": null,
"latitude": null,
"longitude": null,
"working_hours": [],
"created_at": "2026-10-04T14:27:04+00:00",
"updated_at": "2026-10-04T14:27:04+00:00"
},
"date": "2026-10-04",
"status": "open",
"opening_balance": 500,
"closing_balance": null,
"expected_balance": null,
"difference": null,
"total_sales": null,
"cash_sales": null,
"payment_breakdown": null,
"cash_breakdown": null,
"method_counts": null,
"note": null,
"count_code": null,
"count_url": null,
"opened_at": "2026-10-04T14:27:04+00:00",
"closed_at": null,
"created_at": "2026-10-04T14:27:04+00:00",
"updated_at": "2026-10-04T14:27:04+00:00"
}
}
curl -X POST 'https://api.flactrum.com/v1/cash-records' \
-H 'Authorization: Bearer flk_your_key:your_secret' \
-H 'Content-Type: application/json' \
-d '{
"branch_id": "01m43mzbjkbvj9yv4a68pw1jyt",
"opening_balance": 100
}'
HTTP 409 · application/json
{
"error": {
"code": "conflict",
"message": "Today's cash day is already open for this branch.",
"details": {
"cash_record_id": "01m43mzbk74anekztc1fv8cwd3",
"status": "open"
}
}
}