Attach journal entry to invoice

POST/api/v1/invoices/{invoice_id}/journal-entry/link

Link an existing journal entry to an invoice.

Operation ID: attach_journal_entry_to_invoice_api_v1_invoices__invoice_id__journal_entry_link_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.

Parameters

Path

invoice_idstring · uuidrequired

Request body

journal_entry_idstringrequired

UUID of the journal entry to attach.

Responses

201Successful Response

idstringrequired

Invoice UUID.

business_idstringrequired

Business UUID.

created_atstring · date-timerequired

Creation timestamp.

updated_atstring · date-timerequired

Last update timestamp.

statusstringrequired

Status: draft, open, partially_paid, manual_paid, stripe_paid, void.

currencystring

Currency for the invoice (USD, CAD, AUD, EUR, or GBP).

stripe_invoice_idstring

Stripe invoice ID if synced.

totalinteger

Total amount in cents.

total_paidinteger

Running total of payments received in cents.

balance_dueinteger

Remaining balance in cents (total - total_paid).

descriptionstring

Invoice description/notes.

customer_idstringrequired

Customer UUID.

customer_namestring

Customer name (resolved).

customer_emailstring

Customer email (resolved).

due_datestring

Due date (YYYY-MM-DD).

line_itemsarray · LineItemResponse

Invoice line items.

fulfillment_location_idstring

Default warehouse used for inventory deductions.

pdf_urlstring

URL to download invoice PDF.

numberstring

Invoice number (assigned on finalize).

deliveredboolean

Whether invoice was delivered.

delivered_onstring · date-time

Delivery timestamp.

hosted_invoice_urlstring

URL for customer payment portal.

paid_onstring · date-time

Payment timestamp.

journal_entriesarray · object

Associated accounting journal entries.

paymentsarray · InvoicePaymentResponse

Payment records linking bank transactions to this invoice.

recurring_template_idstring

ID of recurring template if invoice was generated from one, or if one was created.

400Bad Request - Invalid input

401Unauthorized - Authentication required

403Forbidden - Insufficient permissions

404Not Found - Resource does not exist

409Conflict - Resource already exists

422Validation Error

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