Skip to main content

Invoices

Invoices bill clients for services, products, memberships and packages. POST /v1/invoices creates a draft priced from your catalogue (variants, sale prices and taxes included); then record payments, send the PDF to the client, or void it.

Creating invoices needs the Sales add-on; reading, paying and voiding existing invoices always work.

API regionapi.whautomate.com

List invoices​

GET /v1/invoices

Lists invoices, newest first. from and to are YYYY-MM-DD in the account timezone (both included).

Headers
x-api-keystringrequired
Your Whautomate API key.
Query parameters
locationIdstring
Location (workspace) id. Get ids from GET /v1/locations.
clientIdstring
Client id.
statusstring
Status to filter by.
invoiceNumberstring
The invoice with this number.
fromstring
Start date (YYYY-MM-DD, account timezone, included).
tostring
End date (YYYY-MM-DD, account timezone, included).
pageinteger
Page number, from 1 (default 1).
limitinteger
Results per page (default 10, max 100).
Response 200
idstring
invoiceNumberstring
statusstring
DRAFT, SENT, PENDING, PAID, VOID, REFUNDED, PARTIAL REFUND or CANCELLED
datestring
dueDatestring
clientobject
locationobject
staffobject
currencystring
totalnumber
pendingnumber
orderIdstring
pdfUrlstring
createdAtstring
updatedAtstring
Request
curl -X GET "https://api.whautomate.com/v1/invoices?locationId=Le6dWjQF9K&limit=2" \
-H "x-api-key: YOUR_API_KEY"
Response 200
[
{
"id": "9xOQxDSmFS",
"invoiceNumber": "INV-0037",
"status": "DRAFT",
"date": "2026-10-29T12:40:22.596Z",
"dueDate": "2026-10-29T12:40:22.596Z",
"client": {
"id": "FLT22gHGml",
"clientId": "C90",
"name": "Priya Nair",
"phone": "+6596628413",
"email": "priya@nairdesign.example.com"
},
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"staff": {
"id": "XCRbjjnGrB",
"name": "Maya Lim"
},
"currency": "SGD",
"total": 72.7,
"pending": 72.7,
"orderId": "m3iiOretxY",
"pdfUrl": "https://app.whautomate.com/api/files/whauto-e2e/fc0d6120049fabbab1dfe870820ac0e6_INV0037.pdf",
"createdAt": "2026-10-29T12:40:25.900Z",
"updatedAt": "2026-10-29T12:40:25.976Z"
},
{
"id": "Pme9pUBwYx",
"invoiceNumber": "INV-0036",
"status": "VOID",
"date": "2026-10-29T12:39:34.659Z",
"dueDate": "2026-10-29T12:39:34.659Z",
"client": null,
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"staff": {
"id": "XCRbjjnGrB",
"name": "Maya Lim"
},
"currency": "SGD",
"total": 110,
"pending": 110,
"orderId": "RCpGEcQgjW",
"pdfUrl": "https://app.whautomate.com/api/files/whauto-e2e/ba01a3025d9b33a36fb86c47d458ae8e_INV0036.pdf",
"createdAt": "2026-10-29T12:39:36.061Z",
"updatedAt": "2026-10-29T12:39:37.411Z"
}
]

Get an invoice​

GET /v1/invoices/{invoiceId}

Gets an invoice with lines, totals and payments.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
invoiceIdstringrequired
Response 200
idstring
invoiceNumberstring
statusstring
DRAFT, SENT, PENDING, PAID, VOID, REFUNDED, PARTIAL REFUND or CANCELLED
datestring
dueDatestring
clientobject
locationobject
staffobject
currencystring
totalnumber
pendingnumber
orderIdstring
pdfUrlstring
createdAtstring
updatedAtstring
notesstring
linesobject[]
totalsobject
paymentsobject[]
paymentLinkstring
Online payment link while unpaid, else null
Request
curl -X GET "https://api.whautomate.com/v1/invoices/IKqOqLBnC6" \
-H "x-api-key: YOUR_API_KEY"
Response 200
{
"id": "IKqOqLBnC6",
"invoiceNumber": "INV-0038",
"status": "DRAFT",
"date": "2026-10-29T12:40:26.250Z",
"dueDate": "2026-10-29T12:40:26.250Z",
"client": {
"id": "FLT22gHGml",
"clientId": "C90",
"name": "Priya Nair",
"phone": "+6596628413",
"email": "priya@nairdesign.example.com"
},
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"staff": {
"id": "ZxkrjyVgDE",
"name": "Aisha Rahman"
},
"currency": "SGD",
"total": 120.07,
"pending": 120.07,
"orderId": "Ht7B5tMcPF",
"pdfUrl": "https://app.whautomate.com/api/files/whauto-e2e/6f09344a5ba33640a94085c995f84cd6_INV0038.pdf",
"createdAt": "2026-10-29T12:40:27.618Z",
"updatedAt": "2026-10-29T12:40:27.618Z",
"notes": "Thank you for visiting Serene Wellness Studio.",
"lines": [
{
"itemType": "SERVICE",
"name": "Signature Facial",
"serviceId": "5z1k6h86AG",
"quantity": 1,
"price": 95,
"discount": null,
"taxes": [],
"subtotal": 95,
"tax": 0,
"total": 95
},
{
"itemType": "PRODUCT",
"name": "Eucalyptus Bath Salts",
"productId": "3yNbb3VGB6",
"quantity": 1,
"price": 23,
"discount": null,
"taxes": [
{
"id": "F8Ms1inPXy",
"name": "GST",
"percentage": 9
}
],
"subtotal": 23,
"tax": 2.07,
"total": 25.07
}
],
"totals": {
"subtotal": 118,
"itemDiscount": 0,
"discount": 0,
"tax": 2.07,
"shipping": 0,
"total": 120.07,
"received": 0,
"pending": 120.07,
"refund": 0
},
"payments": [],
"paymentLink": "https://app.whautomate.com/payment-request/Ht7B5tMcPF"
}

Create an invoice​

POST /v1/invoices

Creates a DRAFT invoice (and its order) for a client, priced from the catalogue. Needs the Sales module.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
locationIdstringrequired
clientIdstringrequired
staffIdstring
Defaults to an owner or administrator of the location
itemsobject[]required

Up to 100; the amount must be above 0

notesstring
datestring
YYYY-MM-DD in the account timezone (defaults to today)
Response 200
idstring
invoiceNumberstring
statusstring
DRAFT, SENT, PENDING, PAID, VOID, REFUNDED, PARTIAL REFUND or CANCELLED
datestring
dueDatestring
clientobject
locationobject
staffobject
currencystring
totalnumber
pendingnumber
orderIdstring
pdfUrlstring
createdAtstring
updatedAtstring
notesstring
linesobject[]
totalsobject
paymentsobject[]
paymentLinkstring
Online payment link while unpaid, else null
Request
curl -X POST "https://api.whautomate.com/v1/invoices" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"locationId": "Le6dWjQF9K",
"clientId": "FLT22gHGml",
"staffId": "ZxkrjyVgDE",
"items": [
{
"serviceId": "5z1k6h86AG",
"quantity": 1
},
{
"productId": "3yNbb3VGB6",
"quantity": 1
}
],
"notes": "Thank you for visiting Serene Wellness Studio."
}'
Response 200
{
"id": "IKqOqLBnC6",
"invoiceNumber": "INV-0038",
"status": "DRAFT",
"date": "2026-10-29T12:40:26.250Z",
"dueDate": "2026-10-29T12:40:26.250Z",
"client": {
"id": "FLT22gHGml",
"clientId": "C90",
"name": "Priya Nair",
"phone": "+6596628413",
"email": "priya@nairdesign.example.com"
},
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"staff": {
"id": "ZxkrjyVgDE",
"name": "Aisha Rahman"
},
"currency": "SGD",
"total": 120.07,
"pending": 120.07,
"orderId": "Ht7B5tMcPF",
"pdfUrl": "https://app.whautomate.com/api/files/whauto-e2e/6f09344a5ba33640a94085c995f84cd6_INV0038.pdf",
"createdAt": "2026-10-29T12:40:27.618Z",
"updatedAt": "2026-10-29T12:40:27.618Z",
"notes": "Thank you for visiting Serene Wellness Studio.",
"lines": [
{
"itemType": "SERVICE",
"name": "Signature Facial",
"serviceId": "5z1k6h86AG",
"quantity": 1,
"price": 95,
"discount": null,
"taxes": [],
"subtotal": 95,
"tax": 0,
"total": 95
},
{
"itemType": "PRODUCT",
"name": "Eucalyptus Bath Salts",
"productId": "3yNbb3VGB6",
"quantity": 1,
"price": 23,
"discount": null,
"taxes": [
{
"id": "F8Ms1inPXy",
"name": "GST",
"percentage": 9
}
],
"subtotal": 23,
"tax": 2.07,
"total": 25.07
}
],
"totals": {
"subtotal": 118,
"itemDiscount": 0,
"discount": 0,
"tax": 2.07,
"shipping": 0,
"total": 120.07,
"received": 0,
"pending": 120.07,
"refund": 0
},
"payments": [],
"paymentLink": "https://app.whautomate.com/payment-request/Ht7B5tMcPF"
}

Record a payment​

POST /v1/invoices/{invoiceId}/payments

Records a payment on an unpaid invoice.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
invoiceIdstringrequired
Body
amountnumberrequired
Above 0
paymentModestringrequired
Payment mode name, e.g. Cash
paidAtstring
ISO 8601 date-time (defaults to now)
notesstring
Response 200
idstring
invoiceNumberstring
statusstring
DRAFT, SENT, PENDING, PAID, VOID, REFUNDED, PARTIAL REFUND or CANCELLED
datestring
dueDatestring
clientobject
locationobject
staffobject
currencystring
totalnumber
pendingnumber
orderIdstring
pdfUrlstring
createdAtstring
updatedAtstring
notesstring
linesobject[]
totalsobject
paymentsobject[]
paymentLinkstring
Online payment link while unpaid, else null
Request
curl -X POST "https://api.whautomate.com/v1/invoices/IKqOqLBnC6/payments" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 50,
"paymentMode": "Cash",
"notes": "Deposit paid at the front desk."
}'
Response 200
{
"id": "IKqOqLBnC6",
"invoiceNumber": "INV-0038",
"status": "PENDING",
"date": "2026-10-29T12:40:26.250Z",
"dueDate": "2026-10-29T12:40:26.250Z",
"client": {
"id": "FLT22gHGml",
"clientId": "C90",
"name": "Priya Nair",
"phone": "+6596628413",
"email": "priya@nairdesign.example.com"
},
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"staff": {
"id": "ZxkrjyVgDE",
"name": "Aisha Rahman"
},
"currency": "SGD",
"total": 120.07,
"pending": 70.07,
"orderId": "Ht7B5tMcPF",
"pdfUrl": "https://app.whautomate.com/api/files/whauto-e2e/9c4dcd6849053b5cd48c4767f4ac0979_INV0038.pdf",
"createdAt": "2026-10-29T12:40:27.618Z",
"updatedAt": "2026-10-29T12:40:29.125Z",
"notes": "Thank you for visiting Serene Wellness Studio.",
"lines": [
{
"itemType": "SERVICE",
"name": "Signature Facial",
"serviceId": "5z1k6h86AG",
"quantity": 1,
"price": 95,
"discount": null,
"taxes": [],
"subtotal": 95,
"tax": 0,
"total": 95
},
{
"itemType": "PRODUCT",
"name": "Eucalyptus Bath Salts",
"productId": "3yNbb3VGB6",
"quantity": 1,
"price": 23,
"discount": null,
"taxes": [
{
"id": "F8Ms1inPXy",
"name": "GST",
"percentage": 9
}
],
"subtotal": 23,
"tax": 2.07,
"total": 25.07
}
],
"totals": {
"subtotal": 118,
"itemDiscount": 0,
"discount": 0,
"tax": 2.07,
"shipping": 0,
"total": 120.07,
"received": 50,
"pending": 70.07,
"refund": 0
},
"payments": [
{
"id": "zdxtUFz4V7",
"amount": 50,
"paymentMode": "Cash",
"gateway": null,
"status": "PAID",
"paidAt": "2026-10-29T12:40:27.733Z",
"notes": "Deposit paid at the front desk."
}
],
"paymentLink": "https://app.whautomate.com/payment-request/Ht7B5tMcPF"
}

Send an invoice​

POST /v1/invoices/{invoiceId}/send

Sends the invoice PDF to the client with the location's send invoice templates.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
invoiceIdstringrequired
Body
channelsobjectrequired

Turn on at least one

Response 200
idstring
channelsobject
Request
curl -X POST "https://api.whautomate.com/v1/invoices/IKqOqLBnC6/send" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channels": {
"whatsapp": true,
"email": true
}
}'
Response 200
{
"id": "IKqOqLBnC6",
"channels": {
"whatsapp": true,
"email": true,
"sms": false
}
}

Void an invoice​

POST /v1/invoices/{invoiceId}/void

Voids an invoice (cancels its order, returns stock). No request body.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
invoiceIdstringrequired
Response 200
idstring
invoiceNumberstring
statusstring
DRAFT, SENT, PENDING, PAID, VOID, REFUNDED, PARTIAL REFUND or CANCELLED
datestring
dueDatestring
clientobject
locationobject
staffobject
currencystring
totalnumber
pendingnumber
orderIdstring
pdfUrlstring
createdAtstring
updatedAtstring
notesstring
linesobject[]
totalsobject
paymentsobject[]
paymentLinkstring
Online payment link while unpaid, else null
Request
curl -X POST "https://api.whautomate.com/v1/invoices/eLaOz002pM/void" \
-H "x-api-key: YOUR_API_KEY"
Response 200
{
"id": "eLaOz002pM",
"invoiceNumber": "INV-0039",
"status": "VOID",
"date": "2026-10-29T12:40:29.517Z",
"dueDate": "2026-10-29T12:40:29.517Z",
"client": {
"id": "FLT22gHGml",
"clientId": "C90",
"name": "Priya Nair",
"phone": "+6596628413",
"email": "priya@nairdesign.example.com"
},
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"staff": {
"id": "XCRbjjnGrB",
"name": "Maya Lim"
},
"currency": "SGD",
"total": 110,
"pending": 110,
"orderId": "XIQhAXWpNR",
"pdfUrl": "https://app.whautomate.com/api/files/whauto-e2e/d9f8ba3f5686e7c568556c15df61be79_INV0039.pdf",
"createdAt": "2026-10-29T12:40:30.912Z",
"updatedAt": "2026-10-29T12:40:32.430Z",
"notes": "",
"lines": [
{
"itemType": "SERVICE",
"name": "Aromatherapy Massage",
"serviceId": "zMTqZwoHi1",
"quantity": 1,
"price": 110,
"discount": null,
"taxes": [],
"subtotal": 110,
"tax": 0,
"total": 110
}
],
"totals": {
"subtotal": 110,
"itemDiscount": 0,
"discount": 0,
"tax": 0,
"shipping": 0,
"total": 110,
"received": 0,
"pending": 110,
"refund": 0
},
"payments": [],
"paymentLink": null
}