Skip to content
FacilydevelopersDashboard
Build with Facily
DocsREST APIsCreate Day Close
Search the full API reference Esc to close

Create Day Close

Billing · REST API reference

Get support
POST/v1/facilities/{facility_id}/day-closes
Close one business day at the facility: record the count per tender and sign it off.

Authentication

Bearer API key or Facily session, subject to permissions and facility scope.

Authentication and scope

Request 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
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"
}'
An example for building your request, not an executed call. Check required fields, allowed values, and environment configuration before sending.

Parameters

facility_idpath · stringrequired

Format: uuid

Request body

application/json · Required

business_datestringrequired

The 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 | stringrequired

A 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 | string

A decimal string: zero or more, at most two decimal places.

Variant 1: number
number
Variant 2: string
string
tenderstringrequired

cash, check, money_order, card or ach; other only on a day that lists an other tender.

Max length: 20

is_importantboolean

Flags the close for attention.

Default: false

notestring | null

The closer's note, at most 2,000 characters. Required when the close is unbalanced.

Max length: 2000

Show note schema
string | null

The closer's note, at most 2,000 characters. Required when the close is unbalanced.

Variant 1: string
string
Variant 2: null
null
seen_expected_totalsTenderAmountRequest[]required

Required. 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 | stringrequired

A 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 | string

A decimal string: zero or more, at most two decimal places.

Variant 1: number
number
Variant 2: string
string
tenderstringrequired

cash, 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
JSON · generated example
{
  "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

dataDayCloseResponserequired

A stored day close: the live one, or a reopened one kept as history.

Show data schema
business_datestringrequired

The facility-local business date closed.

Format: date

closed_atstringrequired

When the close was taken.

Format: date-time

closed_bystringrequired

The user who took it, or an API key's service user.

Format: uuid

closed_by_namestring | nullrequired

That user's display name.

Show closed_by_name schema
string | null

That user's display name.

Variant 1: string
string
Variant 2: null
null
counted_totalstringrequired

Sum of the counted lines' counted_total.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

facility_idstringrequired

The facility closed.

Format: uuid

idstringrequired

The close's id.

Format: uuid

is_balancedbooleanrequired

Every counted line's difference is zero; an over and a short that cancel are not balanced.

is_importantbooleanrequired

Flagged for attention.

linesDayCloseLineResponse[]required

One per tender: cash, check, money_order, card, ach, then other when the day held one.

Show lines schema
counted_totalstring | nullrequired

The counted figure; null when the tender was not counted.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

Show counted_total schema
string | null

The counted figure; null when the tender was not counted.

Variant 1: string
string
Variant 2: null
null
differencestring | nullrequired

counted_total less expected_total; null when not counted.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

Show difference schema
string | null

counted_total less expected_total; null when not counted.

Variant 1: string
string
Variant 2: null
null
expected_totalstringrequired

Expected count: system_total plus surcharge_total.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

kindstringrequired

drawer (cash, check, money order, other) or electronic (card, ach).

Values: "drawer", "electronic"

payment_countintegerrequired

Payments received; a payment split across two ledgers counts once.

received_totalstringrequired

The payments posted that day in this tender.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

statusstringrequired

match, over, short or not_counted.

Values: "match", "over", "short", "not_counted"

surcharge_totalstringrequired

The card surcharge of the payments received and not voided that day. Outside system_total.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

system_totalstringrequired

received_total less voided_total. Receipts only.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

tenderstringrequired

cash, check, money_order, card, ach or other.

void_countintegerrequired

Same-day voids.

voided_totalstringrequired

Voids posted that day of payments posted that day.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

notestring | nullrequired

The closer's note.

Show note schema
string | null

The closer's note.

Variant 1: string
string
Variant 2: null
null
over_shortstringrequired

Sum of the counted lines' difference; positive is over. A tender not counted adds nothing.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

payment_countintegerrequired

Payments received that day.

reopen_reasonstring | nullrequired

Why it was reopened.

Show reopen_reason schema
string | null

Why it was reopened.

Variant 1: string
string
Variant 2: null
null
reopened_atstring | nullrequired

When the close was reopened; null while it is live.

Format: date-time

Show reopened_at schema
string | null

When the close was reopened; null while it is live.

Variant 1: string
string
Variant 2: null
null
reopened_by_namestring | nullrequired

Who reopened it.

Show reopened_by_name schema
string | null

Who reopened it.

Variant 1: string
string
Variant 2: null
null
surcharge_totalstringrequired

Sum of the lines' surcharge_total.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

system_totalstringrequired

Sum of the lines' system_total. Receipts only.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
400Validation error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
401Unauthenticated
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
403Permission denied
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
404Not found
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
409Business logic error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
503Temporary failure
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
Continue exploringAll billing operations
Build something that works beautifully.

Facily API · Contract v1.200 · Reviewed October 29, 2026

Create Day Close | Facily Developers