/v1/facilities/{facility_id}/day-closesAuthentication
Bearer API key or Facily session, subject to permissions and facility scope.
Authentication and scopeRequest example
Replace bracketed path values with real IDs from your environment. The body, where shown, is generated from the schema and uses illustrative values.
curl --request POST \
--url 'https://api.staging.facily.ai/v1/facilities/<FACILITY_ID>/day-closes' \
--header "Authorization: Bearer $FACILY_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"business_date": "2026-10-29",
"seen_expected_totals": [
{
"amount": 0,
"tender": "string"
}
],
"counted": [
{
"amount": 0,
"tender": "string"
}
],
"is_important": false,
"note": "string"
}'Parameters
facility_idpath · stringrequiredFormat: uuid
Request body
application/json · Required
business_datestringrequiredThe facility-local business date. Not after the facility's today.
Format: date
countedTenderAmountRequest[]The counted figure per tender. An omitted cash, check, money order or other tender is 0.00; an omitted card or ach tender is not counted and takes no part in the verdict.
Show counted schema
amountnumber | stringrequiredA decimal string: zero or more, at most two decimal places.
Minimum: 0 · Pattern: ^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,11}0*$)\d{0,8}\.\d{0,2}0*$)
Show amount schema
number | stringA decimal string: zero or more, at most two decimal places.
Variant 1: number
numberVariant 2: string
stringtenderstringrequiredcash, check, money_order, card or ach; other only on a day that lists an other tender.
Max length: 20
is_importantbooleanFlags the close for attention.
Default: false
notestring | nullThe closer's note, at most 2,000 characters. Required when the close is unbalanced.
Max length: 2000
Show note schema
string | nullThe closer's note, at most 2,000 characters. Required when the close is unbalanced.
Variant 1: string
stringVariant 2: null
nullseen_expected_totalsTenderAmountRequest[]requiredRequired. Each tender's Expected count (system total plus surcharge) as the page displayed it; an omitted tender is 0.00. If any differs from the server's figure the close is refused with 409 day_close_receipts_changed.
Show seen_expected_totals schema
amountnumber | stringrequiredA decimal string: zero or more, at most two decimal places.
Minimum: 0 · Pattern: ^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,11}0*$)\d{0,8}\.\d{0,2}0*$)
Show amount schema
number | stringA decimal string: zero or more, at most two decimal places.
Variant 1: number
numberVariant 2: string
stringtenderstringrequiredcash, check, money_order, card or ach; other only on a day that lists an other tender.
Max length: 20
Responses
Expand a status to inspect its schema. Generated examples show structure and synthetic values.
201Successful Response
{
"data": {
"business_date": "2026-10-29",
"closed_at": "2026-10-29T12:00:00Z",
"closed_by": "00000000-0000-4000-8000-000000000001",
"closed_by_name": "string",
"counted_total": "<VALUE_MATCHING_PATTERN>",
"facility_id": "00000000-0000-4000-8000-000000000001",
"id": "00000000-0000-4000-8000-000000000001",
"is_balanced": false,
"is_important": false,
"lines": [
{
"counted_total": "<VALUE_MATCHING_PATTERN>",
"difference": "<VALUE_MATCHING_PATTERN>",
"expected_total": "<VALUE_MATCHING_PATTERN>",
"kind": "drawer",
"payment_count": 0,
"received_total": "<VALUE_MATCHING_PATTERN>",
"status": "match",
"surcharge_total": "<VALUE_MATCHING_PATTERN>",
"system_total": "<VALUE_MATCHING_PATTERN>",
"tender": "string",
"void_count": 0,
"voided_total": "<VALUE_MATCHING_PATTERN>"
}
],
"note": "string",
"over_short": "<VALUE_MATCHING_PATTERN>",
"payment_count": 0,
"reopen_reason": "string",
"reopened_at": "2026-10-29T12:00:00Z",
"reopened_by_name": "string",
"surcharge_total": "<VALUE_MATCHING_PATTERN>",
"system_total": "<VALUE_MATCHING_PATTERN>"
},
"meta": {
"request_id": "string"
}
}application/json
dataDayCloseResponserequiredA stored day close: the live one, or a reopened one kept as history.
Show data schema
business_datestringrequiredThe facility-local business date closed.
Format: date
closed_atstringrequiredWhen the close was taken.
Format: date-time
closed_bystringrequiredThe user who took it, or an API key's service user.
Format: uuid
closed_by_namestring | nullrequiredThat user's display name.
Show closed_by_name schema
string | nullThat user's display name.
Variant 1: string
stringVariant 2: null
nullcounted_totalstringrequiredSum of the counted lines' counted_total.
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
facility_idstringrequiredThe facility closed.
Format: uuid
idstringrequiredThe close's id.
Format: uuid
is_balancedbooleanrequiredEvery counted line's difference is zero; an over and a short that cancel are not balanced.
is_importantbooleanrequiredFlagged for attention.
linesDayCloseLineResponse[]requiredOne per tender: cash, check, money_order, card, ach, then other when the day held one.
Show lines schema
counted_totalstring | nullrequiredThe counted figure; null when the tender was not counted.
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
Show counted_total schema
string | nullThe counted figure; null when the tender was not counted.
Variant 1: string
stringVariant 2: null
nulldifferencestring | nullrequiredcounted_total less expected_total; null when not counted.
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
Show difference schema
string | nullcounted_total less expected_total; null when not counted.
Variant 1: string
stringVariant 2: null
nullexpected_totalstringrequiredExpected count: system_total plus surcharge_total.
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
kindstringrequireddrawer (cash, check, money order, other) or electronic (card, ach).
Values: "drawer", "electronic"
payment_countintegerrequiredPayments received; a payment split across two ledgers counts once.
received_totalstringrequiredThe payments posted that day in this tender.
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
statusstringrequiredmatch, over, short or not_counted.
Values: "match", "over", "short", "not_counted"
surcharge_totalstringrequiredThe card surcharge of the payments received and not voided that day. Outside system_total.
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
system_totalstringrequiredreceived_total less voided_total. Receipts only.
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tenderstringrequiredcash, check, money_order, card, ach or other.
void_countintegerrequiredSame-day voids.
voided_totalstringrequiredVoids posted that day of payments posted that day.
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
notestring | nullrequiredThe closer's note.
Show note schema
string | nullThe closer's note.
Variant 1: string
stringVariant 2: null
nullover_shortstringrequiredSum of the counted lines' difference; positive is over. A tender not counted adds nothing.
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_countintegerrequiredPayments received that day.
reopen_reasonstring | nullrequiredWhy it was reopened.
Show reopen_reason schema
string | nullWhy it was reopened.
Variant 1: string
stringVariant 2: null
nullreopened_atstring | nullrequiredWhen the close was reopened; null while it is live.
Format: date-time
Show reopened_at schema
string | nullWhen the close was reopened; null while it is live.
Variant 1: string
stringVariant 2: null
nullreopened_by_namestring | nullrequiredWho reopened it.
Show reopened_by_name schema
string | nullWho reopened it.
Variant 1: string
stringVariant 2: null
nullsurcharge_totalstringrequiredSum of the lines' surcharge_total.
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
system_totalstringrequiredSum of the lines' system_total. Receipts only.
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
metaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired400Validation error
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired401Unauthenticated
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired403Permission denied
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired404Not found
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired409Business logic error
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired503Temporary failure
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired