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)No
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, or zhNo, default is en
statusstringInvoice status, possible values are Draft, Pending, Unpaid, Canceled, Partial, Paid, or RefundedNo, 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)No
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)No

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

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
searchnumberSearch 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

Delete Invoice

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

Permanently delete an invoice.

Path Parameters

NameTypeDescriptionRequired
idstringInvoice idYes