Orders
Orders are customer purchases from your online store, the WhatsApp or Telegram store, or your own system. Creating an order creates its invoice, the way the store does: stock is reserved, coupons apply, and you can record a payment already taken or send a payment link.
Use the status endpoints to move orders through fulfilment (with tracking and internal notes). Creating orders needs the Sales add-on.
api.whautomate.comList orders
/v1/ordersLists orders, newest first. from and to are YYYY-MM-DD in the account timezone (both included).
x-api-keystringrequiredlocationIdstringclientIdstringstatusstringcustomerStatusstringtypestringfromstringtostringpageintegerlimitintegeridstringorderNumbernumbertypestringstatusstringcustomerStatusstringisCustomerOrderbooleansourcestringdatestringclientobjectlocationobjectamountnumberdiscountAmountnumbershippingAmountnumbercurrencystringnotesstringinternalNotesstringtrackingobjectcreatedAtstringupdatedAtstringcurl -X GET "https://api.whautomate.com/v1/orders?locationId=Le6dWjQF9K&limit=2" \
-H "x-api-key: YOUR_API_KEY"
[
{
"id": "g2wCSDafpo",
"orderNumber": null,
"type": "APPOINTMENT",
"status": "PENDING",
"customerStatus": null,
"isCustomerOrder": false,
"source": null,
"date": "2026-10-29T12:40:18.631Z",
"client": null,
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"amount": 135,
"discountAmount": 0,
"shippingAmount": 0,
"currency": "SGD",
"notes": "",
"internalNotes": "",
"tracking": {
"url": null,
"number": null,
"carrier": null
},
"createdAt": "2026-10-29T12:40:18.632Z",
"updatedAt": "2026-10-29T12:40:18.632Z"
},
{
"id": "RCpGEcQgjW",
"orderNumber": null,
"type": "INVOICE",
"status": "CANCELLED",
"customerStatus": "CANCELLED",
"isCustomerOrder": false,
"source": null,
"date": "2026-10-29T12:39:34.678Z",
"client": null,
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"amount": 110,
"discountAmount": 0,
"shippingAmount": 0,
"currency": "SGD",
"notes": "",
"internalNotes": "",
"tracking": {
"url": null,
"number": null,
"carrier": null
},
"createdAt": "2026-10-29T12:39:34.679Z",
"updatedAt": "2026-10-29T12:39:36.128Z"
}
]
Get an order
/v1/orders/{orderId}Gets an order with lines, address, invoice and payments.
x-api-keystringrequiredorderIdstringrequiredidstringorderNumbernumbertypestringstatusstringcustomerStatusstringisCustomerOrderbooleansourcestringdatestringclientobjectlocationobjectamountnumberdiscountAmountnumbershippingAmountnumbercurrencystringnotesstringinternalNotesstringtrackingobjectcreatedAtstringupdatedAtstringlinesobject[]addressobjectinvoiceobjectnull when the order has no invoice
paymentsobjectcurl -X GET "https://api.whautomate.com/v1/orders/m3iiOretxY" \
-H "x-api-key: YOUR_API_KEY"
{
"id": "m3iiOretxY",
"orderNumber": 10,
"type": "INVOICE",
"status": "PENDING",
"customerStatus": "PENDING",
"isCustomerOrder": true,
"source": "API",
"date": "2026-10-29T12:40:22.637Z",
"client": {
"id": "FLT22gHGml",
"clientId": "C90",
"name": "Priya Nair",
"phone": "+6596628413",
"email": "priya@nairdesign.example.com"
},
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"amount": 72.7,
"discountAmount": 0,
"shippingAmount": 0,
"currency": "SGD",
"notes": "Gift wrap, please.",
"internalNotes": "",
"tracking": {
"url": null,
"number": null,
"carrier": null
},
"createdAt": "2026-10-29T12:40:22.638Z",
"updatedAt": "2026-10-29T12:40:22.638Z",
"lines": [
{
"itemType": "PRODUCT",
"productId": "3yNbb3VGB6",
"name": "Eucalyptus Bath Salts",
"quantity": 1,
"pricePerItem": 23,
"discount": 2.3,
"totalTax": 1.86,
"totalPrice": 22.56
},
{
"itemType": "PRODUCT",
"productId": "3yNbb3VGB6",
"name": "Eucalyptus Bath Salts",
"quantity": 2,
"pricePerItem": 23,
"discount": 0,
"totalTax": 4.14,
"totalPrice": 50.14
}
],
"address": {
"name": "Home",
"contactName": "Priya Nair",
"contactPhone": "+6596628413",
"addressLine1": "18 Tiong Bahru Road",
"addressLine2": "#04-12",
"city": "Singapore",
"state": "",
"postalCode": "168731",
"country": "Singapore"
},
"invoice": {
"id": "9xOQxDSmFS",
"invoiceNumber": "INV-0037",
"status": "DRAFT",
"pdfUrl": "https://app.whautomate.com/api/files/whauto-e2e/fc0d6120049fabbab1dfe870820ac0e6_INV0037.pdf"
},
"payments": {
"paidAmount": 0,
"items": []
}
}
Create an order
/v1/ordersCreates a customer order with its invoice, as the online store does (payment link, coupon, stock). Optional payment already taken, or sendPaymentLink. Needs the Sales module.
x-api-keystringrequiredlocationIdstringrequiredclientIdstringrequiredstaffIdstringitemsobject[]requiredUp to 100; the amount must be above 0
notesstringdatestringaddressobjectshippingOptionIdstringsourcestring (enum)API, ADMIN, WHATSAPP.couponCodestringpaymentobjectA payment already taken. Not with sendPaymentLink.
sendPaymentLinkbooleanidstringorderNumbernumbertypestringstatusstringcustomerStatusstringisCustomerOrderbooleansourcestringdatestringclientobjectlocationobjectamountnumberdiscountAmountnumbershippingAmountnumbercurrencystringnotesstringinternalNotesstringtrackingobjectcreatedAtstringupdatedAtstringlinesobject[]addressobjectinvoiceobjectnull when the order has no invoice
paymentsobjectcurl -X POST "https://api.whautomate.com/v1/orders" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"locationId": "Le6dWjQF9K",
"clientId": "FLT22gHGml",
"staffId": "XCRbjjnGrB",
"notes": "Gift wrap, please.",
"items": [
{
"productId": "3yNbb3VGB6",
"quantity": 2
},
{
"productId": "3yNbb3VGB6",
"quantity": 1,
"discount": {
"type": "PERCENTAGE",
"value": 10
}
}
],
"address": {
"name": "Home",
"contactName": "Priya Nair",
"contactPhone": "+6596628413",
"addressLine1": "18 Tiong Bahru Road",
"addressLine2": "#04-12",
"city": "Singapore",
"postalCode": "168731",
"country": "Singapore"
}
}'
{
"id": "m3iiOretxY",
"orderNumber": 10,
"type": "INVOICE",
"status": "PENDING",
"customerStatus": "PENDING",
"isCustomerOrder": true,
"source": "API",
"date": "2026-10-29T12:40:22.637Z",
"client": {
"id": "FLT22gHGml",
"clientId": "C90",
"name": "Priya Nair",
"phone": "+6596628413",
"email": "priya@nairdesign.example.com"
},
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"amount": 72.7,
"discountAmount": 0,
"shippingAmount": 0,
"currency": "SGD",
"notes": "Gift wrap, please.",
"internalNotes": "",
"tracking": {
"url": null,
"number": null,
"carrier": null
},
"createdAt": "2026-10-29T12:40:22.638Z",
"updatedAt": "2026-10-29T12:40:22.638Z",
"lines": [
{
"itemType": "PRODUCT",
"productId": "3yNbb3VGB6",
"name": "Eucalyptus Bath Salts",
"quantity": 1,
"pricePerItem": 23,
"discount": 2.3,
"totalTax": 1.86,
"totalPrice": 22.56
},
{
"itemType": "PRODUCT",
"productId": "3yNbb3VGB6",
"name": "Eucalyptus Bath Salts",
"quantity": 2,
"pricePerItem": 23,
"discount": 0,
"totalTax": 4.14,
"totalPrice": 50.14
}
],
"address": {
"name": "Home",
"contactName": "Priya Nair",
"contactPhone": "+6596628413",
"addressLine1": "18 Tiong Bahru Road",
"addressLine2": "#04-12",
"city": "Singapore",
"state": "",
"postalCode": "168731",
"country": "Singapore"
},
"invoice": {
"id": "9xOQxDSmFS",
"invoiceNumber": "INV-0037",
"status": "DRAFT",
"pdfUrl": "https://app.whautomate.com/api/files/whauto-e2e/fc0d6120049fabbab1dfe870820ac0e6_INV0037.pdf"
},
"payments": {
"paidAmount": 0,
"items": []
}
}
Update order status
/v1/orders/{orderId}/statusUpdates fulfilment status, tracking and internal notes.
x-api-keystringrequiredorderIdstringrequiredcustomerStatusstring (enum)PENDING, PAID, PROCESSING, SHIPPING, PARTIALLY DELIVERED, DELIVERED, PARTIALLY COMPLETED, COMPLETED, CANCELLED, REFUNDED.trackingUrlstringtrackingNumberstringshippingCarrierstringinternalNotesstringidstringorderNumbernumbertypestringstatusstringcustomerStatusstringisCustomerOrderbooleansourcestringdatestringclientobjectlocationobjectamountnumberdiscountAmountnumbershippingAmountnumbercurrencystringnotesstringinternalNotesstringtrackingobjectcreatedAtstringupdatedAtstringlinesobject[]addressobjectinvoiceobjectnull when the order has no invoice
paymentsobjectcurl -X PUT "https://api.whautomate.com/v1/orders/m3iiOretxY/status" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customerStatus": "SHIPPING",
"shippingCarrier": "Ninja Van",
"trackingNumber": "NV2611804SG",
"trackingUrl": "https://track.example.com/NV2611804SG",
"internalNotes": "Left the studio at 3 PM."
}'
{
"id": "m3iiOretxY",
"orderNumber": 10,
"type": "INVOICE",
"status": "PENDING",
"customerStatus": "SHIPPING",
"isCustomerOrder": true,
"source": "API",
"date": "2026-10-29T12:40:22.637Z",
"client": {
"id": "FLT22gHGml",
"clientId": "C90",
"name": "Priya Nair",
"phone": "+6596628413",
"email": "priya@nairdesign.example.com"
},
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"amount": 72.7,
"discountAmount": 0,
"shippingAmount": 0,
"currency": "SGD",
"notes": "Gift wrap, please.",
"internalNotes": "Left the studio at 3 PM.",
"tracking": {
"url": "https://track.example.com/NV2611804SG",
"number": "NV2611804SG",
"carrier": "Ninja Van"
},
"createdAt": "2026-10-29T12:40:22.638Z",
"updatedAt": "2026-10-29T12:40:26.095Z",
"lines": [
{
"itemType": "PRODUCT",
"productId": "3yNbb3VGB6",
"name": "Eucalyptus Bath Salts",
"quantity": 1,
"pricePerItem": 23,
"discount": 2.3,
"totalTax": 1.86,
"totalPrice": 22.56
},
{
"itemType": "PRODUCT",
"productId": "3yNbb3VGB6",
"name": "Eucalyptus Bath Salts",
"quantity": 2,
"pricePerItem": 23,
"discount": 0,
"totalTax": 4.14,
"totalPrice": 50.14
}
],
"address": {
"name": "Home",
"contactName": "Priya Nair",
"contactPhone": "+6596628413",
"addressLine1": "18 Tiong Bahru Road",
"addressLine2": "#04-12",
"city": "Singapore",
"state": "",
"postalCode": "168731",
"country": "Singapore"
},
"invoice": {
"id": "9xOQxDSmFS",
"invoiceNumber": "INV-0037",
"status": "DRAFT",
"pdfUrl": "https://app.whautomate.com/api/files/whauto-e2e/fc0d6120049fabbab1dfe870820ac0e6_INV0037.pdf"
},
"payments": {
"paidAmount": 0,
"items": []
}
}
Update order status in bulk
/v1/orders/bulk/statusSets the fulfilment status (and internal notes) of up to 100 orders.
x-api-keystringrequiredorderIdsstring[]requiredcustomerStatusstring (enum)requiredPENDING, PAID, PROCESSING, SHIPPING, PARTIALLY DELIVERED, DELIVERED, PARTIALLY COMPLETED, COMPLETED, CANCELLED, REFUNDED.internalNotesstringupdatedintegerorderIdsstring[]notFoundstring[]curl -X POST "https://api.whautomate.com/v1/orders/bulk/status" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"orderIds": [
"m3iiOretxY",
"doesNotExist1"
],
"customerStatus": "DELIVERED",
"internalNotes": "Delivered by courier."
}'
{
"updated": 1,
"orderIds": [
"m3iiOretxY"
],
"notFound": [
"doesNotExist1"
]
}
Delete an order
/v1/orders/{orderId}Deletes the order with its invoice, as the app does (refused after an online payment): payments removed, client funds reversed, stock returned.
x-api-keystringrequiredorderIdstringrequiredidstringinvoiceIdstringdeletedbooleancurl -X DELETE "https://api.whautomate.com/v1/orders/m3iiOretxY" \
-H "x-api-key: YOUR_API_KEY"
{
"id": "m3iiOretxY",
"invoiceId": "9xOQxDSmFS",
"deleted": true
}