Orders
List and retrieve orders, update their status, record shipments, add notes and cancel orders with the Orders API.
Orders are created when customers check out. Use the Orders API to bring orders into your fulfillment, accounting or support tools.
Endpoints are under /stores/{slug}/orders and need an API key with orders:read to read and orders:write to change orders. See Authentication.
Order statuses
| Status | Meaning |
| --- | --- |
| pending | Created, waiting for payment. |
| paid | Payment received. |
| processing | Being prepared. |
| shipped | Handed to a carrier. |
| delivered | Delivered to the customer. |
| cancelled | Cancelled before completion. |
| refunded | Refunded in full. |
List orders
GET /stores/{slug}/orders
| Parameter | Description |
| --- | --- |
| page, per_page | Pagination. per_page is 1 to 200, default 50. |
| status | One of the statuses above. |
| from_ts, to_ts | Only orders created between these Unix timestamps (seconds). |
| email | Only orders for this customer email. |
| search | Free-text search. |
curl "https://wafle.click/api/v1/stores/your-store/orders?status=paid&per_page=50" \
-H "X-Wafle-Store-Key: $WAFLE_KEY"
Retrieve an order
GET /stores/{slug}/orders/{id}
Returns the order with its items, totals, customer, shipping address and payment status. A 404 response means the order does not exist in this store.
Record a shipment
POST /stores/{slug}/orders/{id}/ship
Marks the order as shipped and stores the carrier and tracking details. The customer is emailed when shipping notifications are enabled for the store.
| Field | Required | Description |
| --- | --- | --- |
| carrier | yes | The carrier name or code. |
| tracking_number | yes | The tracking number. |
| tracking_url | no | A link to the carrier's tracking page. |
| notify_customer | no | Send the shipping notification. Default true. |
curl -X POST "https://wafle.click/api/v1/stores/your-store/orders/1042/ship" \
-H "X-Wafle-Store-Key: $WAFLE_KEY" \
-H "Content-Type: application/json" \
-d '{"carrier":"UPS","tracking_number":"1Z999AA10123456784","notify_customer":true}'
Add a note
POST /stores/{slug}/orders/{id}/note
| Field | Required | Description |
| --- | --- | --- |
| text | yes | The note. |
| customer_visible | no | Show the note on the customer's order page. Default false. A visible note does not send the customer an email. |
Read notes with GET /stores/{slug}/orders/{id}/notes.
Cancel an order
POST /stores/{slug}/orders/{id}/cancel
Cancels an order that has not been shipped. Cancelling does not return a customer's payment by itself. Issue a refund separately.
Timeline
GET /stores/{slug}/orders/{id}/timeline returns the history of the order: payment, status changes, notes and shipments.
Related
Need help with an integration? Contact support.