201Successful Response
Schema: SuccessEnvelope_SalesReceiptResponse_
successbooleanmessagestringcodestringdataSalesReceiptResponse
/api/v1/sales-receiptsCreate and post a sales receipt (or refund receipt).
Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.
Schema: SalesReceiptCreateRequest
receipt_typestringOne of: sale, refund.
customer_idstringOptional customer (anonymous cash sales allowed).
receipt_datestring · dateReceipt date. Defaults to today when omitted.
deposit_to_ledger_idstringrequiredBank/cash ledger that receives (sale) or pays out (refund).
income_ledger_idstringRevenue ledger override. Defaults to the Invoice Sales system account.
line_itemsarray · SalesReceiptLineItemrequiredSalesReceiptLineItemAt least one line item is required.
catalog_item_idstringOptional catalog item this line is based on.
descriptionstringLine description.
quantitynumberQuantity sold/refunded.
unit_priceintegerrequiredPrice per unit in cents (e.g. 15000 = $150.00).
amountintegerLine total in cents. Computed from quantity * unit_price when omitted.
tax_totalintegerTotal sales tax in cents (posted to Sales Tax Payable).
numberstringOptional document number; auto-generated.
memostringOptional memo / note.
currencystringSchema: SuccessEnvelope_SalesReceiptResponse_
successbooleanmessagestringcodestringdataSalesReceiptResponseSchema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.