Create sales receipt

POST/api/v1/sales-receipts

Create and post a sales receipt (or refund receipt).

Operation ID: create_sales_receipt_api_v1_sales_receipts_post·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

receipt_typestring

One of: sale, refund.

customer_idstring

Optional customer (anonymous cash sales allowed).

receipt_datestring · date

Receipt date. Defaults to today when omitted.

deposit_to_ledger_idstringrequired

Bank/cash ledger that receives (sale) or pays out (refund).

income_ledger_idstring

Revenue ledger override. Defaults to the Invoice Sales system account.

line_itemsarray · SalesReceiptLineItemrequiredSalesReceiptLineItem

At least one line item is required.

5 fields
catalog_item_idstring

Optional catalog item this line is based on.

descriptionstring

Line description.

quantitynumber

Quantity sold/refunded.

unit_priceintegerrequired

Price per unit in cents (e.g. 15000 = $150.00).

amountinteger

Line total in cents. Computed from quantity * unit_price when omitted.

tax_totalinteger

Total sales tax in cents (posted to Sales Tax Payable).

numberstring

Optional document number; auto-generated.

memostring

Optional memo / note.

currencystring

Responses

201Successful Response

successboolean
messagestring
codestring
dataSalesReceiptResponse

400Bad Request - Invalid input

401Unauthorized - Authentication required

403Forbidden - Insufficient permissions

404Not Found - Resource does not exist

422Validation Error

detailarray · ValidationErrorValidationError
5 fields
locarray · string | integerrequired
msgstringrequired
typestringrequired
inputobject
ctxobject