Split one transaction across multiple bills

POST/api/v1/bills/payments/batch

Apply a single bank transaction to multiple bills and/or direct expense lines in one atomic request. Validates the total allocation against the transaction's remaining unallocated balance before creating any payments.

Operation ID: create_bill_payments_batch_api_v1_bills_payments_batch_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

transaction_idstringrequired

UUID of the bank transaction representing the payment.

allocationsarray · BillBatchPaymentAllocationBillBatchPaymentAllocation

Bill slices (0+). Each bill_id must be unique.

2 fields
bill_idstringrequired

UUID of the bill receiving this slice of the transaction.

amountintegerrequired

Amount in cents to allocate to this bill. Must be > 0.

expense_linesarray · BillBatchExpenseLineBillBatchExpenseLine

Optional expense lines for any remaining balance. Each line debits an expense ledger on the transaction's journal entry.

3 fields
ledger_idstringrequired

UUID of the expense ledger account to debit.

amountintegerrequired

Amount in cents to categorize as expense. Must be > 0.

descriptionstring

Optional memo stored on the journal-entry line.

paid_onstring · date-time

Override payment date applied to every allocation. Defaults to the transaction datetime if omitted.

Responses

201Successful Response

successboolean
messagestring
codestring
dataBillBatchPaymentResponse

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