Skip to main content
Update an invoice
curl --request PATCH \
  --url https://api.salesbricks.com/api/v2/invoices/{invoice_id} \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-SALESBRICKS-KEY: <api-key>' \
  --form due_at=2023-12-25 \
  --form 'purchase_order=<string>' \
  --form 'billing_address=<string>' \
  --form 'company_name=<string>' \
  --form [email protected] \
  --form 'invoice_memo=<string>' \
  --form 'reason_for_updating=<string>' \
  --form 'line_item_overrides=<string>' \
  --form send_invoice=false \
  --form persist_memo=false \
  --form persist_purchase_order=false \
  --form show_brick_descriptions=true \
  --form 'pdf_attachments=<string>' \
  --form 'pdf_attachments_config={}' \
  --form 'tax_id=<string>'
{
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signed_pdf_url": "<string>",
"attachments": [
{
"attachment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target": "invoice",
"file_name": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}

Authorizations

X-SALESBRICKS-KEY
string
header
required

API key for authentication

Path Parameters

invoice_id
string
required

Body

Input serializer for updating an invoice.

due_at
string<date> | null

Override the due date for this invoice. Pass null for no change.

purchase_order
string | null

Purchase order with code. Pass null for no change, empty object or empty code to clear.

billing_address
string | null

Billing address. Pass null for no change. Changes will reflect in the subscription.

company_name
string | null

Company name for the invoice. Pass null for no change, empty string to clear. Changes will reflect in the subscription.

Maximum string length: 255
accounts_payable_emails
string<email>[] | null

List of accounts payable contact emails. Pass null for no change, empty array to clear. Changes will reflect in the subscription.

invoice_memo
string | null

Memo or notes to appear on the invoice. Pass empty string to clear.

Maximum string length: 2000
reason_for_updating
string

Internal reason for updating the invoice (for audit purposes)

Maximum string length: 500
line_item_overrides
string

Override descriptions for specific line items. Only affects this invoice, does not persist to future invoices.

send_invoice
boolean
default:false

Whether to send the invoice to the customer after updating. Defaults to false.

persist_memo
boolean
default:false

Whether to persist the invoice memo on all future invoices. Defaults to false.

persist_purchase_order
boolean
default:false

Whether to persist the purchase order number on all future invoices. Defaults to false. When true, the PO number will be applied to all future invoices for this subscription. When false, the PO number is only set for this specific invoice.

show_brick_descriptions
boolean

Whether to show brick descriptions on the invoice PDF. Defaults to true if not specified.

pdf_attachments
string<uri>[]

PDF files to attach to the invoice.

pdf_attachments_config
object[]

Configuration for managing attachments. Each item specifies either an existing attachment to keep (by attachment_id) or a new file to add (by new_file_index), along with a 'target' to specify where to store it ('invoice' or 'subscription'). The order in this array determines the unified order of attachments in the PDF. Existing attachments NOT in this list will be DELETED. If omitted, pdf_attachments will replace all existing invoice-level attachments.

tax_id
string | null

Tax ID for the invoice. Changes will reflect in the subscription.

Maximum string length: 255

Response

Output serializer for successful invoice update.

invoice_id
string<uuid>
required

The unique identifier of the updated invoice

signed_pdf_url
string<uri>
required

Signed URL to download the updated invoice PDF. Expires in 1 hour.

attachments
object[]

Current attachments for this invoice as a flat array. Array order reflects the PDF merge order (unified across both levels).