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.whautomate.comList invoices
/v1/invoicesLists invoices, newest first. from and to are YYYY-MM-DD in the account timezone (both included).
x-api-keystringrequiredlocationIdstringclientIdstringstatusstringinvoiceNumberstringfromstringtostringpageintegerlimitintegeridstringinvoiceNumberstringstatusstringdatestringdueDatestringclientobjectlocationobjectstaffobjectcurrencystringtotalnumberpendingnumberorderIdstringpdfUrlstringcreatedAtstringupdatedAtstringcurl -X GET "https://api.whautomate.com/v1/invoices?locationId=Le6dWjQF9K&limit=2" \
-H "x-api-key: YOUR_API_KEY"
[
{
"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
/v1/invoices/{invoiceId}Gets an invoice with lines, totals and payments.
x-api-keystringrequiredinvoiceIdstringrequiredidstringinvoiceNumberstringstatusstringdatestringdueDatestringclientobjectlocationobjectstaffobjectcurrencystringtotalnumberpendingnumberorderIdstringpdfUrlstringcreatedAtstringupdatedAtstringnotesstringlinesobject[]totalsobjectpaymentsobject[]paymentLinkstringcurl -X GET "https://api.whautomate.com/v1/invoices/IKqOqLBnC6" \
-H "x-api-key: YOUR_API_KEY"
{
"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
/v1/invoicesCreates a DRAFT invoice (and its order) for a client, priced from the catalogue. Needs the Sales module.
x-api-keystringrequiredlocationIdstringrequiredclientIdstringrequiredstaffIdstringitemsobject[]requiredUp to 100; the amount must be above 0
notesstringdatestringidstringinvoiceNumberstringstatusstringdatestringdueDatestringclientobjectlocationobjectstaffobjectcurrencystringtotalnumberpendingnumberorderIdstringpdfUrlstringcreatedAtstringupdatedAtstringnotesstringlinesobject[]totalsobjectpaymentsobject[]paymentLinkstringcurl -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."
}'
{
"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
/v1/invoices/{invoiceId}/paymentsRecords a payment on an unpaid invoice.
x-api-keystringrequiredinvoiceIdstringrequiredamountnumberrequiredpaymentModestringrequiredpaidAtstringnotesstringidstringinvoiceNumberstringstatusstringdatestringdueDatestringclientobjectlocationobjectstaffobjectcurrencystringtotalnumberpendingnumberorderIdstringpdfUrlstringcreatedAtstringupdatedAtstringnotesstringlinesobject[]totalsobjectpaymentsobject[]paymentLinkstringcurl -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."
}'
{
"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
/v1/invoices/{invoiceId}/sendSends the invoice PDF to the client with the location's send invoice templates.
x-api-keystringrequiredinvoiceIdstringrequiredchannelsobjectrequiredTurn on at least one
idstringchannelsobjectcurl -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
}
}'
{
"id": "IKqOqLBnC6",
"channels": {
"whatsapp": true,
"email": true,
"sms": false
}
}
Void an invoice
/v1/invoices/{invoiceId}/voidVoids an invoice (cancels its order, returns stock). No request body.
x-api-keystringrequiredinvoiceIdstringrequiredidstringinvoiceNumberstringstatusstringdatestringdueDatestringclientobjectlocationobjectstaffobjectcurrencystringtotalnumberpendingnumberorderIdstringpdfUrlstringcreatedAtstringupdatedAtstringnotesstringlinesobject[]totalsobjectpaymentsobject[]paymentLinkstringcurl -X POST "https://api.whautomate.com/v1/invoices/eLaOz002pM/void" \
-H "x-api-key: YOUR_API_KEY"
{
"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
}