Create an Invoice for an Specific Order: /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. |
Query Parameters
No query parameter is required for this endpoint.
Request Body
{
"invoice":
{
"invoice_note": "INVOICE_NOTE"
}
}
Attribute | Type | Description |
---|---|---|
invoice_note | String | Notes or remarks for the invoice |
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.
Response Body
{
"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"
}
]
}
}
Attribute | Type | Description |
---|---|---|
status | String | Current status of the invoice (example: ACTIVE) |
id | String | Unique identifier of the invoice (human-readable code) |
type | String | Type of invoice (example: LINKED_WITH_ORDER) |
custom_form | Object | Custom form details linked to the invoice |
currency | Object | Currency information for the invoice |
customer_purchase_order_id | String | External customer purchase order reference |
issue_date | String (DateTime) | Date when invoice was issued |
alternate_issue_date | String (DateTime) | Alternate invoice issue date |
due_date | String (DateTime) | Due date for payment |
alternate_due_date | String (DateTime) | Alternate due date for payment |
subtotal | String (Decimal) | Subtotal amount before taxes/discounts |
tax | String (Decimal) | Tax applied |
tax_total | String (Decimal) | Total tax amount |
total | String (Decimal) | Final total of invoice |
paid | String (Decimal) | Amount paid |
due | String (Decimal) | Remaining amount due |
payment_status | String | Status of payment (example: PAID) |
last_payment | Object | Information about the last payment |
discount_amount | String (Decimal) | Total discount applied |
price_tax_inclusive | String (Boolean) | Whether tax is included in prices |
invoice_note | String | Additional notes for the invoice |
account_id | String | Associated account identifier |
order_id | String | Linked order identifier |
created_by | String | User who created the invoice |
created_on | String (DateTime) | Creation timestamp |
last_updated_by | String | User who last updated the invoice |
last_updated_on | String (DateTime) | Last update timestamp |
uuid | String (UUID) | Unique system identifier for invoice |
version | String | Version number of the record |
custom_attributes | Array | List of custom attributes applied |
custom_objects | Array | List of custom objects linked |
lines | Array | Line items of the invoice |
kpis | Object | Key performance indicators for invoice |
Cancel an Invoice: /invoices/{invoice_id}/cancel
Purpose
This endpoint allows canceling an existing invoice by its unique invoice identifier. When an invoice is canceled, its status changes to INACTIVE, and no further payments or modifications can be made. Canceling ensures proper financial record-keeping and prevents duplicate or unintended billing.
Use Case
- Businesses can use this API to cancel invoices that are no longer valid, such as when an order is voided, a customer cancels their request, or a billing correction is needed.
- The API is particularly useful for automating workflows where invoices must be deactivated after an order cancellation, subscription termination, or service withdrawal.
Path Parameters
Parameter | Type | Description |
---|---|---|
invoice_id |
String | Unique identifier of the invoice to be canceled. |
Query Parameters
No query parameter is required for this endpoint.
Request Body
This API does not require a request body for the cancellation.
Response
Upon successful cancellation, the API responds with detailed invoice data. The invoice status is updated to INACTIVE, and payment_status reflects the latest settlement state (example: PAID if already paid). The response includes all core invoice fields such as identifiers, billing cycle dates, financial details (subtotal, tax, total, paid, due), account and order links, KPIs (outstanding balance, overdue, credit applied and so on), audit trail (created_by, last_updated_by, timestamps), and structural components like custom_attributes, custom_objects, and lines. This ensures both financial reconciliation and operational traceability for canceled invoices.
Response Body
{
"invoice": {
"status": "STATUS",
"id": "INVOICE_ID",
"type": "INVOICE_TYPE",
"custom_form": {
"uuid": "CUSTOM_FORM_UUID",
"name": "CUSTOM_FORM_NAME"
},
"currency": {
"uuid": "CURRENCY_UUID",
"name": "CURRENCY_NAME",
"link": "CURRENCY_LINK"
},
"customer_purchase_order_id": "CUSTOMER_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",
"due": "DUE",
"shipping_cost": "SHIPPING_COST",
"payment_status": "PAYMENT_STATUS",
"last_payment": "LAST_PAYMENT",
"discount_amount": "DISCOUNT_AMOUNT",
"price_tax_inclusive": "PRICE_TAX_INCLUSIVE",
"invoice_note": "INVOICE_NOTE",
"account_id": "ACCOUNT_ID",
"account_name": "ACCOUNT_NAME",
"order_id": "ORDER_ID",
"kpis": {
"outstanding": "KPI_OUTSTANDING",
"overdue": "KPI_OVERDUE",
"last_payment_date": "KPI_LAST_PAYMENT_DATE",
"payment_applied": "KPI_PAYMENT_APPLIED",
"credit_applied": "KPI_CREDIT_APPLIED",
"credit_issued": "KPI_CREDIT_ISSUED",
"last_reactivated_on": "KPI_LAST_REACTIVATED_ON",
"last_cancelled_on": "KPI_LAST_CANCELLED_ON",
"last_amended_on": "KPI_LAST_AMENDED_ON",
"voided_on": "KPI_VOIDED_ON",
"deleted_on": "KPI_DELETED_ON"
},
"created_by": "CREATED_BY",
"created_on": "CREATED_ON",
"last_updated_by": "LAST_UPDATED_BY",
"last_updated_on": "LAST_UPDATED_ON",
"uuid": "UUID",
"version": "VERSION",
"custom_attributes": [],
"custom_objects": [],
"lines": []
}
}
Attribute | Type | Description |
---|---|---|
status | String | Current status of the invoice (example: ACTIVE, INACTIVE) |
id | String | Unique identifier of the invoice |
type | String | Type of invoice (example: LINKED_WITH_ORDER) |
custom_form | Object | Custom form details linked to invoice |
currency | Object | Currency details of the invoice |
customer_purchase_order_id | String | External customer purchase order reference |
billing_start_date | String (DateTime) | Start date of billing period |
alternate_billing_start_date | String (DateTime) | Alternate start date of billing |
billing_end_date | String (DateTime) | End date of billing period |
alternate_billing_end_date | String (DateTime) | Alternate end date of billing |
issue_date | String (DateTime) | Date when invoice was issued |
alternate_issue_date | String (DateTime) | Alternate invoice issue date |
due_date | String (DateTime) | Due date for payment |
alternate_due_date | String (DateTime) | Alternate due date |
subtotal | String (Decimal) | Subtotal before tax/discounts |
tax | String (Decimal) | Tax amount |
total | String (Decimal) | Total invoice amount |
paid | String (Decimal) | Amount paid |
due | String (Decimal) | Amount remaining due |
shipping_cost | String (Decimal) | Shipping cost applied |
payment_status | String | Status of payment (example: PAID, UNPAID) |
last_payment | Object / Null | Last payment details, or null if none |
discount_amount | String (Decimal) | Discount amount applied |
price_tax_inclusive | String (Boolean) | Whether prices include tax |
invoice_note | String | Notes or remarks for invoice |
account_id | String | Linked account identifier |
account_name | String | Name of linked account |
order_id | String | Linked order identifier |
kpis | Object | Key performance indicators |
created_by | String | User who created the invoice |
created_on | String (DateTime) | Creation timestamp |
last_updated_by | String | User who last updated the invoice |
last_updated_on | String (DateTime) | Last update timestamp |
uuid | String (UUID) | System unique identifier |
version | String | Record version number |
custom_attributes | Array | Custom attributes attached |
custom_objects | Array | Custom objects attached |
lines | Array | Invoice line items |
Reactivate an Invoice: /invoices/{invoice_id}/reactivate
Purpose
This endpoint reactivates a previously canceled invoice, changing its status back to ACTIVE. It ensures that a canceled invoice can be reused for billing, payment tracking, and further operations without having to create a new one.
Use Case
- When an invoice was canceled by mistake and needs to be reinstated.
- If a customer resumes a transaction that was previously marked as canceled.
- To restore invoice continuity in reporting and auditing systems.
Path Parameters
Parameter | Type | Description |
---|---|---|
invoice_id |
String | Unique identifier of the invoice that needs to be reactivated. |
Query Parameters
No query parameter is required for this endpoint.
Request Body
This API does not require a request body for the reactivation.
Response
On success, the API returns a full invoice object with its status updated to ACTIVE. The response contains key invoice details including its ID, type, form information, currency, issue and due dates, totals, payment status, and associated KPIs. The reactivated invoice maintains its original relationships (example: account, order, custom form) but its status changes to ACTIVE. Audit metadata (created by, created on, last updated by, last updated on, version) is also included to support traceability.
Response Body
{
"invoice": {
"status": "STATUS",
"id": "INVOICE_ID",
"type": "INVOICE_TYPE",
"custom_form": {
"uuid": "CUSTOM_FORM_UUID",
"name": "CUSTOM_FORM_NAME"
},
"currency": {
"uuid": "CURRENCY_UUID",
"name": "CURRENCY_NAME",
"link": "CURRENCY_LINK"
},
"customer_purchase_order_id": "CUSTOMER_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",
"due": "DUE",
"shipping_cost": "SHIPPING_COST",
"payment_status": "PAYMENT_STATUS",
"last_payment": "LAST_PAYMENT",
"discount_amount": "DISCOUNT_AMOUNT",
"price_tax_inclusive": "PRICE_TAX_INCLUSIVE",
"invoice_note": "INVOICE_NOTE",
"account_id": "ACCOUNT_ID",
"account_name": "ACCOUNT_NAME",
"order_id": "ORDER_ID",
"kpis": {
"outstanding": "KPI_OUTSTANDING",
"overdue": "KPI_OVERDUE",
"last_payment_date": "KPI_LAST_PAYMENT_DATE",
"payment_applied": "KPI_PAYMENT_APPLIED",
"credit_applied": "KPI_CREDIT_APPLIED",
"credit_issued": "KPI_CREDIT_ISSUED",
"last_reactivated_on": "KPI_LAST_REACTIVATED_ON",
"last_cancelled_on": "KPI_LAST_CANCELLED_ON",
"last_amended_on": "KPI_LAST_AMENDED_ON",
"voided_on": "KPI_VOIDED_ON",
"deleted_on": "KPI_DELETED_ON"
},
"created_by": "CREATED_BY",
"created_on": "CREATED_ON",
"last_updated_by": "LAST_UPDATED_BY",
"last_updated_on": "LAST_UPDATED_ON",
"uuid": "UUID",
"version": "VERSION",
"custom_attributes": [],
"custom_objects": [],
"lines": []
}
}
Attribute | Type | Description |
---|---|---|
status | String | Current status of the invoice (example: ACTIVE, INACTIVE) |
id | String | Unique identifier of the invoice |
type | String | Type of invoice (example: LINKED_WITH_ORDER) |
custom_form | Object | Custom form details linked to invoice |
currency | Object | Currency details of the invoice |
customer_purchase_order_id | String | External customer purchase order reference |
billing_start_date | String (DateTime) | Start date of billing period |
alternate_billing_start_date | String (DateTime) | Alternate start date of billing |
billing_end_date | String (DateTime) | End date of billing period |
alternate_billing_end_date | String (DateTime) | Alternate end date of billing |
issue_date | String (DateTime) | Date when invoice was issued |
alternate_issue_date | String (DateTime) | Alternate invoice issue date |
due_date | String (DateTime) | Due date for payment |
alternate_due_date | String (DateTime) | Alternate due date |
subtotal | String (Decimal) | Subtotal before tax/discounts |
tax | String (Decimal) | Tax amount |
total | String (Decimal) | Total invoice amount |
paid | String (Decimal) | Amount paid |
due | String (Decimal) | Amount remaining due |
shipping_cost | String (Decimal) | Shipping cost applied |
payment_status | String | Status of payment (example: PAID, UNPAID) |
last_payment | Object / Null | Last payment details, or null if none |
discount_amount | String (Decimal) | Discount amount applied |
price_tax_inclusive | String (Boolean) | Whether prices include tax |
invoice_note | String | Notes or remarks for invoice |
account_id | String | Linked account identifier |
account_name | String | Name of linked account |
order_id | String | Linked order identifier |
kpis | Object | Key performance indicators |
created_by | String | User who created the invoice |
created_on | String (DateTime) | Creation timestamp |
last_updated_by | String | User who last updated the invoice |
last_updated_on | String (DateTime) | Last update timestamp |
uuid | String (UUID) | System unique identifier |
version | String | Record version number |
custom_attributes | Array | Custom attributes attached |
custom_objects | Array | Custom objects attached |
lines | Array | Invoice line items |
Create a Note for an Invoice: /invoices/{invoice_id}/notes
Purpose
This endpoint allows you to create a new note for a specific invoice. You can optionally attach a file (such as a document or image) to the note.
Use Case
- Add comments or internal notes to invoices.
- Attach supporting documents (receipts, approvals, scanned copies) to invoices.
- Maintain audit and collaboration records on invoices.
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
invoice_id | string | Yes | Unique identifier of the invoice. |
Query Parameters
No query parameters required for this endpoint.
Request Body
The request must be sent as multipart/form-data.
Attribute | Type | Required | Description |
---|---|---|---|
note | string | Yes | Content of the note (HTML supported). |
file | file | No | File to attach with the note. Accepts common document and image formats. |
Response
On success, the API returns the order object containing a notes object with the UUID of the newly created note. This UUID can later be used to fetch note details, list attached files, or download specific files.
Response Body
{
"invoice": {
"notes": {
"uuid": "uuid"
}
}
}
Attribute | Type | Description |
---|---|---|
invoice | object | Container object holding invoice data. |
invoice.notes | object | Newly created note object. |
invoice.notes.uuid | string | Unique identifier (UUID) of the created note. |