»
Invoice POST API Documentation
Endpoint: POST /api/v3/orders/{order_id}/invoices
Purpose
This endpoint is used to create an invoice linked to a specific order, associating it with the provided order_id
.
Use Case
Useful for generating an invoice for an order to facilitate billing and payment tracking.
Path Parameters
Parameter | Type | Description |
---|---|---|
order_id | string | Unique identifier of the order to link with the invoice. |
Request
The request body must include the invoice
object containing details like the invoice ID and optional invoice note.
JSON
{
"invoice":
{
"id": "UNIQUE_INVOICE_ID",
"invoice_note": "INVOICE_NOTE"
}
}
Response
The response contains details about the created invoice, including its status, associated order ID, billing and due dates, payment status, totals, and tax information. It also provides metadata like creation time, custom attributes, and linked items.
JSON
{
"invoice": {
"status": "STATUS",
"id": "INVOICE_ID",
"type": "INVOICE_TYPE",
"custom_form": {
"uuid": "FORM_UUID",
"name": "FORM_NAME"
},
"currency": {
"uuid": "CURRENCY_UUID",
"name": "CURRENCY_NAME",
"link": "CURRENCY_LINK"
},
"customer_purchase_order_id": "PURCHASE_ORDER_ID",
"billing_start_date": "BILLING_START_DATE",
"alternate_billing_start_date": "ALTERNATE_BILLING_START_DATE",
"billing_end_date": "BILLING_END_DATE",
"alternate_billing_end_date": "ALTERNATE_BILLING_END_DATE",
"issue_date": "ISSUE_DATE",
"alternate_issue_date": "ALTERNATE_ISSUE_DATE",
"due_date": "DUE_DATE",
"alternate_due_date": "ALTERNATE_DUE_DATE",
"subtotal": "SUBTOTAL",
"tax": "TAX",
"total": "TOTAL",
"paid": "PAID_AMOUNT",
"due": "DUE_AMOUNT",
"payment_status": "PAYMENT_STATUS",
"last_payment": "LAST_PAYMENT",
"discount_amount": "DISCOUNT_AMOUNT",
"price_tax_inclusive": "TAX_INCLUSIVE",
"invoice_note": "INVOICE_NOTE",
"account_id": "ACCOUNT_ID",
"order_id": "ORDER_ID",
"kpis": {
"outstanding": "OUTSTANDING",
"overdue": "OVERDUE",
"last_payment_date": "LAST_PAYMENT_DATE",
"payment_applied": "PAYMENT_APPLIED",
"credit_applied": "CREDIT_APPLIED",
"credit_issued": "CREDIT_ISSUED",
"last_reactivated_on": "LAST_REACTIVATED_DATE",
"last_cancelled_on": "LAST_CANCELLED_DATE",
"last_amended_on": "LAST_AMENDED_DATE",
"voided_on": "VOIDED_DATE",
"deleted_on": "DELETED_DATE"
},
"created_by": "CREATED_BY",
"created_on": "CREATED_ON",
"last_updated_by": "LAST_UPDATED_BY",
"last_updated_on": "LAST_UPDATED_ON",
"uuid": "INVOICE_UUID",
"version": "VERSION",
"custom_attributes": [
{
"name": "ATTRIBUTE_NAME",
"value": "ATTRIBUTE_VALUE"
}
],
"custom_objects": [],
"lines": [
{
"subtotal": "LINE_SUBTOTAL",
"total": "LINE_TOTAL",
"tax": {
"amount": "TAX_AMOUNT",
"uuid": "TAX_UUID",
"code": "TAX_CODE",
"rate": "TAX_RATE",
"link": "TAX_LINK"
},
"accounting_code": {
"sales_revenue": "ACCOUNTING_CODE"
},
"item_uuid": "ITEM_UUID",
"item_id": "ITEM_ID",
"item_order_quantity": "ORDER_QUANTITY",
"item_uom": "UNIT_OF_MEASURE",
"item_warehouse": "WAREHOUSE_NAME",
"pricing_snapshot_uuid": "PRICING_SNAPSHOT_UUID",
"charging_start_date": "CHARGING_START_DATE",
"alternate_charging_start_date": "ALTERNATE_CHARGING_START_DATE",
"charging_end_date": "CHARGING_END_DATE",
"alternate_charging_end_date": "ALTERNATE_CHARGING_END_DATE",
"uuid": "LINE_UUID",
"version": "LINE_VERSION"
}
]
}
}