Skip to content

Submit Daily Close

POST /daily-close

Signals that a store's business date is complete and sends the control totals HQ uses for reconciliation. Send it after all /trade-records batches of that business date.

Authentication: API key (x-functions-key)

Request

Request body

Field Type Required Description
batch_id UUID Yes Idempotency key. Use a new one when resending a correction.
store_id string Yes Store code
business_date date Yes Business date
batch_count integer Yes Number of /trade-records batches sent for this business date
trade_record_count integer Yes Number of transactions (distinct trade_record_id)
item_row_count integer Yes Total item lines, including combo child lines
payment_row_count integer Yes Total payment lines
net_sales_amount decimal string Yes Net sales — see definition below
tax_amount decimal string Yes Total tax
tip_amount decimal string Yes Total tips
payment_total_amount decimal string Yes Total payments — see definition below
currency string Yes ISO 4217; must match the store currency
closed_at timestamp Yes When the day was closed

Definitions

  • net_sales_amount — for transactions whose standard type has is_revenue = true, the sum of total_amount − tax_amount − tip_amount, using the latest version of each transaction.
  • payment_total_amount — the sum of payment amount × direction of its payment_type (see payment types). DEPOSIT_APPLIED is not counted again, because the deposit was counted when it was received.

Example

{
  "batch_id": "5d6e7f80-9a0b-4c1d-8e2f-3a4b5c6d7e8f",
  "store_id": "US001",
  "business_date": "2026-10-14",
  "batch_count": 5,
  "trade_record_count": 312,
  "item_row_count": 958,
  "payment_row_count": 330,
  "net_sales_amount": "9821.40",
  "tax_amount": "795.53",
  "tip_amount": "1402.10",
  "payment_total_amount": "11980.23",
  "currency": "USD",
  "closed_at": "2026-10-15T00:12:00-07:00"
}

Response

202 Accepted — record_count is 1.

{ "batch_id": "5d6e7f80-9a0b-4c1d-8e2f-3a4b5c6d7e8f", "status": "ACCEPTED", "record_count": 1, "warnings": [] }

Errors

HTTP code When
400 INVALID_PAYLOAD Validation failed (e.g. currency differs from the store currency)
401 UNAUTHORIZED Missing or invalid API key
403 STORE_NOT_ALLOWED Store not registered for your account

Notes

  • You may send the daily close for the same store and business date more than once (for corrections). The last one received wins.
  • HQ starts reconciliation about 15 minutes after receiving the daily close. Query the result after about 30 minutes with GET /daily-close/{store_id}/{business_date}.