Skip to main content

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 regionapi.whautomate.com

List orders​

GET /v1/orders

Lists orders, 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.
customerStatusstring
Fulfilment status shown to the customer.
typestring
Order type.
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
orderNumbernumber
typestring
statusstring
Payment status
customerStatusstring
Fulfilment status
isCustomerOrderboolean
sourcestring
API, ADMIN, WHATSAPP or ONLINE_STORE
datestring
clientobject
locationobject
amountnumber
discountAmountnumber
shippingAmountnumber
currencystring
notesstring
internalNotesstring
trackingobject
createdAtstring
updatedAtstring
Request
curl -X GET "https://api.whautomate.com/v1/orders?locationId=Le6dWjQF9K&limit=2" \
-H "x-api-key: YOUR_API_KEY"
Response 200
[
{
"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​

GET /v1/orders/{orderId}

Gets an order with lines, address, invoice and payments.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
orderIdstringrequired
Response 200
idstring
orderNumbernumber
typestring
statusstring
Payment status
customerStatusstring
Fulfilment status
isCustomerOrderboolean
sourcestring
API, ADMIN, WHATSAPP or ONLINE_STORE
datestring
clientobject
locationobject
amountnumber
discountAmountnumber
shippingAmountnumber
currencystring
notesstring
internalNotesstring
trackingobject
createdAtstring
updatedAtstring
linesobject[]
addressobject
invoiceobject

null when the order has no invoice

paymentsobject
Request
curl -X GET "https://api.whautomate.com/v1/orders/m3iiOretxY" \
-H "x-api-key: YOUR_API_KEY"
Response 200
{
"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​

POST /v1/orders

Creates 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.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
locationIdstringrequired
clientIdstringrequired
staffIdstring
Staff on the invoice (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)
addressobject
shippingOptionIdstring
An active shipping option of the location
sourcestring (enum)
Defaults to API One of: API, ADMIN, WHATSAPP.
couponCodestring
Must be valid for the client and location
paymentobject

A payment already taken. Not with sendPaymentLink.

sendPaymentLinkboolean
Sends the payment link to the client on WhatsApp. Not with payment.
Response 200
idstring
orderNumbernumber
typestring
statusstring
Payment status
customerStatusstring
Fulfilment status
isCustomerOrderboolean
sourcestring
API, ADMIN, WHATSAPP or ONLINE_STORE
datestring
clientobject
locationobject
amountnumber
discountAmountnumber
shippingAmountnumber
currencystring
notesstring
internalNotesstring
trackingobject
createdAtstring
updatedAtstring
linesobject[]
addressobject
invoiceobject

null when the order has no invoice

paymentsobject
Request
curl -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"
}
}'
Response 200
{
"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​

PUT /v1/orders/{orderId}/status

Updates fulfilment status, tracking and internal notes.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
orderIdstringrequired
Body
customerStatusstring (enum)
One of: PENDING, PAID, PROCESSING, SHIPPING, PARTIALLY DELIVERED, DELIVERED, PARTIALLY COMPLETED, COMPLETED, CANCELLED, REFUNDED.
trackingUrlstring
trackingNumberstring
shippingCarrierstring
internalNotesstring
Response 200
idstring
orderNumbernumber
typestring
statusstring
Payment status
customerStatusstring
Fulfilment status
isCustomerOrderboolean
sourcestring
API, ADMIN, WHATSAPP or ONLINE_STORE
datestring
clientobject
locationobject
amountnumber
discountAmountnumber
shippingAmountnumber
currencystring
notesstring
internalNotesstring
trackingobject
createdAtstring
updatedAtstring
linesobject[]
addressobject
invoiceobject

null when the order has no invoice

paymentsobject
Request
curl -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."
}'
Response 200
{
"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​

POST /v1/orders/bulk/status

Sets the fulfilment status (and internal notes) of up to 100 orders.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
orderIdsstring[]required
Up to 100
customerStatusstring (enum)required
One of: PENDING, PAID, PROCESSING, SHIPPING, PARTIALLY DELIVERED, DELIVERED, PARTIALLY COMPLETED, COMPLETED, CANCELLED, REFUNDED.
internalNotesstring
Response 200
updatedinteger
orderIdsstring[]
notFoundstring[]
Request
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."
}'
Response 200
{
"updated": 1,
"orderIds": [
"m3iiOretxY"
],
"notFound": [
"doesNotExist1"
]
}

Delete an order​

DEL /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.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
orderIdstringrequired
Response 200
idstring
invoiceIdstring
deletedboolean
Request
curl -X DELETE "https://api.whautomate.com/v1/orders/m3iiOretxY" \
-H "x-api-key: YOUR_API_KEY"
Response 200
{
"id": "m3iiOretxY",
"invoiceId": "9xOQxDSmFS",
"deleted": true
}