Skip to main content

Create Invoice

Create a new invoice with items, charges, and customer details.

Endpoint

POST /invoices

Authentication

Bearer Token (passed in the Authorization header)

Request Headers

HeaderValueRequiredDescription
AuthorizationBearer {token}YesBearer token for authentication.
Content-Typeapplication/jsonYesThe content type of the request body.

Example Request

curl -X POST "https://api.example.com/invoices" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"currencyCodeString": "USD",
"companyIdString": "{{companyUid}}",
"customerIdString": "{{customerUid}}",
"postingDate": "2026-03-17",
"notes": "Thank you for your business",
"return": false,
"items": [
{
"itemCode": "{{itemCode}}",
"qty": {{qty}},
"unitPrice": {{unitPrice}},
"amount": {{amount}}
}
],
"charges": [
{
"amount": {{charge}}
}
]
}'

Request Schema

The request body must be a JSON object with the following structure:

Root Fields

FieldTypeRequiredDescription
currencyCodeStringstringYesThe ISO 4217 currency code (e.g., "USD", "EUR", "GBP").
companyIdStringstringYesThe unique identifier of the company issuing the invoice.
customerIdStringstringYesThe unique identifier of the customer for this invoice.
postingDatestring (date)YesThe date the invoice was posted (ISO 8601 format: YYYY-MM-DD).
notesstringNoOptional notes or comments for the invoice.
returnbooleanYesWhether this invoice is a return/credit note. Set to false for standard invoices.
itemsarrayYesAn array of line items included in the invoice.
chargesarrayNoAn array of additional charges applied to the invoice.

Items Array Fields

Each object in the items array has the following fields:

FieldTypeRequiredDescription
itemCodestringYesThe code or SKU of the item being invoiced.
qtynumberYesThe quantity of the item being invoiced.
unitPricenumberYesThe unit price of the item.
amountnumberYesThe total amount for this line item (qty × unitPrice).

Charges Array Fields

Each object in the charges array has the following fields:

FieldTypeRequiredDescription
amountnumberYesThe amount of the additional charge.
descriptionstringNoA description of the charge.
chargeTypestringNoThe type or category of the charge (e.g., "shipping", "tax", "handling").