Skip to main content

Invoices

Create, manage, and send invoices to customers with line items and tax calculations.

Create Invoice​

POST https://api.invoiless.com/v1/invoices

Create a new invoice with customer information and line items.

Example 1:

{
"customer": {
"internalId": "INTERNAL_USER_ID",
"billTo": {
"company": "Invoiless"
}
},
"items": [
{
"name": "Demo product",
"quantity": 1,
"price": 42
}
]
}

Example 2:

{
"customer": "CUSTOMER_ID",
"items": [
{
"name": "Demo product",
"quantity": 1,
"price": 42
}
]
}

Header Parameters​

NameTypeDescriptionRequired
scope-idstringScope idNo

Body Parameters​

NameTypeDescriptionRequired
slugstringInvoice slug (max 50 characters)No
headerstringInvoice header text (max 20 characters)No
numberstringInvoice number (max 20 characters). For e-invoicing, set it only on a draft: issuing the invoice assigns its numberNo
datedateInvoice dateNo
dueDatedateInvoice due date (must be >= date)No
currencystringISO 4217 currency codeNo
langstringInvoice language, possible values are en, fr, de, nl, es, bg, ro, ja, mn, da, sv, lt, fi, hu, cs, it, et, lv, pt, pl, sk, zh, or viNo, default is en
statusstringInvoice status, possible values are Draft, Pending, Unpaid, Canceled, Partial, Paid, or Refunded. For e-invoicing, only Draft, Pending, or Paid can be set: other statuses are derived from payments, credit notes, and cancellationsNo, default is Draft
customerstring, objectCustomer id or customer details with your internal user idYes
shipToboolShow or hide the ship to addressNo, default is false
itemsarrayInvoice line items (min 1 item required)Yes
extraChargesobjectInvoice extra chargesNo
discountobjectInvoice discountNo
extraFieldsarrayInvoice extra fields (max 3 fields)No
taxesarrayInvoice taxes (max 3 taxes). Not supported for e-invoicing: set the tax on each item insteadNo
taxIncludedboolTax is included in pricesNo, default is false
termsstringInvoice terms (max 1000 characters, HTML sanitized)No
notesstringInvoice notes (max 1000 characters, HTML sanitized)No
tagsarray[string]Invoice tags (max 10 tags, each max 50 characters)No
isRetainerboolMark invoice as a retainerNo

Customer Parameters​

NameTypeDescriptionRequired
idstringCustomer idYes
NameTypeDescriptionRequired
internalIdstringThe internal id is used to identify an individual customer in your applicationYes
billToobjectBill to addressYes
shipToobjectShip to addressNo

Bill To / Ship To Parameters​

Either firstName and lastName, or company, is required.

NameTypeDescriptionRequired
firstNamestringFirst nameNo
lastNamestringLast nameNo
companystringCompany nameNo
emailstringEmailNo
phonestringPhoneNo
addressstringAddressNo
legalstringLegal info (e.g. Company number)No

Items Parameters​

NameTypeDescriptionRequired
itemstringItem id that refers to a global itemNo
namestringItem name (max 100 characters)Yes
urlstringItem urlNo
descriptionstringItem description (max 1000 characters, HTML sanitized)No
quantitynumberItem quantity (must be > 0)Yes
unitstringItem unit (max 20 characters)No
pricenumberItem unit price (must be >= 0)Yes
discountobjectItem discountNo
taxesarrayItem taxes (max 3 taxes). For e-invoicing, exactly 1 tax per itemNo

Item Discount Parameters​

NameTypeDescriptionRequired
namestringDiscount name (max 15 characters)No
valuenumberDiscount value (cannot exceed item total)Yes

Item Taxes Parameters​

NameTypeDescriptionRequired
namestringTax name (max 15 characters)Yes
valuenumberTax valueYes
exemptionstringVAT treatment used for e-invoices, possible values are Standard, ZeroRated, ReverseCharge, IntraCommunity, Export, Exempt, or OutsideScope. All values except Standard require a value of 0No, default is Standard when value > 0
exemptionReasonstringExemption reason shown on the e-invoice (max 1000 characters). Only kept when exemption is ExemptYes, if exemption is Exempt for e-invoicing

Extra Charges Parameters​

NameTypeDescriptionRequired
typestringExtra charges type, possible values are Flat or PercentageNo, default is Percentage
valuenumberExtra charges value (must be >= 0)Yes

Discount Parameters​

NameTypeDescriptionRequired
typestringDiscount type, possible values are Flat or PercentageNo, default is Percentage
valuenumberDiscount value (Flat: cannot exceed subtotal, Percentage: max 100)Yes

Extra Fields Parameters​

NameTypeDescriptionRequired
namestringExtra field name (max 15 characters)Yes
typestringExtra field type, possible values are Flat or PercentageNo, default is Percentage
valuenumberExtra field valueYes

Taxes Parameters​

NameTypeDescriptionRequired
namestringTax name (max 15 characters)No
typestringTax type, possible values are Flat or PercentageNo, default is Percentage
valuenumberTax valueYes

Response HTTP/1.1 201 Created​

{
"id": "invoice_id",
"url": "https://invoiless.com/i/invoice_id"
}

Response Body​

NameTypeDescription
idstringInvoice id
urlstringInvoice preview url

Update Invoice​

PUT https://api.invoiless.com/v1/invoices/:id

PATCH https://api.invoiless.com/v1/invoices/:id

Update an existing invoice. See PUT vs PATCH for details on the differences.

Path Parameters​

NameTypeDescriptionRequired
idstringInvoice idYes

Body Parameters​

Accepts the same parameters as Create Invoice.

Get Invoice​

GET https://api.invoiless.com/v1/invoices/:id

Retrieve a specific invoice by ID.

Path Parameters​

NameTypeDescriptionRequired
idstringInvoice idYes

Get Invoices​

GET https://api.invoiless.com/v1/invoices

Retrieve a paginated list of all invoices.

Query Parameters​

NameTypeDescriptionRequired
pagenumberPage numberNo, default is 1
limitnumberPage limitNo , default is 50
searchstringSearch by invoice number, customer name, or tagsNo

Send Invoice​

POST https://api.invoiless.com/v1/invoices/:id/send

Send an invoice via email to the customer.

Path Parameters​

NameTypeDescriptionRequired
idstringInvoice idYes

Body Parameters​

NameTypeDescriptionRequired
emailstringEmail addressNo
subjectstringEmail subjectNo
bodystringEmail bodyNo
datedateSchedule sendNo

Issue Invoice​

POST https://api.invoiless.com/v1/invoices/:id/issue

Issue a draft invoice without sending it. The invoice gets its final number and becomes read-only. Calling it on an issued invoice returns it unchanged.

Only available when e-invoicing is enabled. For e-invoicing, the invoice is validated against its standard first, and the request fails with the list of errors if it isn't valid.

Path Parameters​

NameTypeDescriptionRequired
idstringInvoice idYes

Cancel Invoice​

POST https://api.invoiless.com/v1/invoices/:id/cancel

Cancel an issued invoice. This issues a cancellation credit note for the invoice's full amount and sets its status to Canceled. The invoice keeps its number.

Only issued invoices can be canceled (see E-Invoicing). Delete a draft instead. Received payments must be refunded before the invoice can be canceled.

Example:

{
"reason": "BillingError",
"notes": "Wrong billing address"
}

Path Parameters​

NameTypeDescriptionRequired
idstringInvoice idYes

Body Parameters​

NameTypeDescriptionRequired
reasonstringCancellation reason, possible values are Duplicate, CustomerRequest, Cancelled, BillingError, Fraudulent, or OtherNo, default is Cancelled
notesstringCancellation notes (max 500 characters)No

Export Invoice​

GET https://api.invoiless.com/v1/invoices/:id/export

Export an invoice as PDF. An invoice issued as an e-invoice is exported as a hybrid PDF with the e-invoice XML embedded (ZUGFeRD).

Path Parameters​

NameTypeDescriptionRequired
idstringInvoice idYes

Query Parameters​

NameTypeDescriptionRequired
tzstringIANA time zone used to render dates, e.g. Europe/ParisNo

Delete Invoice​

DELETE https://api.invoiless.com/v1/invoices/:id

Permanently delete an invoice.

Path Parameters​

NameTypeDescriptionRequired
idstringInvoice idYes