Orders
Routes
| Method | Route | Permission | Since |
|---|---|---|---|
| GET | /orders | Management or store | 1.3.0 |
| POST | /orders | Signed in | 1.10.0 |
| GET | /orders/{id}/status | Order owner or management | 1.10.0 |
| PUT, PATCH | /orders/{id} | Order owner or management | 1.10.0 |
| DELETE | /orders/{id} | Management or store | 1.11.0 |
| POST | /orders/{id}/minutes | Management or store | 1.11.0 |
| GET | /orders/reports | Management or store | 1.11.0 |
| GET | /order-statuses | Signed in | 1.11.0 |
There is no GET /orders/{id} in notiwoo/v1. To read a full order, use the WooCommerce API (/wp-json/wc/v3/orders/{id}). To check only its status, use /orders/{id}/status.
List orders
GET /orders
| Parameter | Default | Notes |
|---|---|---|
page, per_page | 1, 20 | Maximum 100 per page. |
search | — | A number with fewer than 10 digits searches by exact ID. Any other text searches name, city, address, postcode, phone and service mode. |
status | processing,accepting | One or more comma-separated statuses. |
orderby | date | date, id or delivery_time. |
order | desc | asc or desc. |
multistore_user users only see orders from their own store.
Each order has the WooCommerce structure, with these additions:
| Field | Content |
|---|---|
total, subtotal, discount_total | Currency-formatted text, for example "$ 25.000". |
line_items[] | Items with formatted prices and the chosen extras. |
fee_lines[] | Fees and delivery charges: {name, total, total_without_tax, tax}. |
order_type_slug, order_type | Service mode (delivery, pickup) and its name. |
status_nice | Status in the site language. |
billing_formatted, shipping_formatted | Addresses in HTML. |
date_to_deliver, time_to_deliver | Day and time requested by the customer. |
printed | Whether the order has already been printed. |
service_mode | dine_in (at a table), takeaway or empty. |
table | {id, label, zone, released_at} if the order is at a table. |
meta includes pagination and statuses, the store's full status map.
Create an order
POST /orders creates an order on behalf of the authenticated user. The server recalculates everything: prices, extras, delivery fee, hours and minimum. Any prices, totals, distances or shipping costs sent by the client are ignored.
| Field | Required | Notes |
|---|---|---|
line_items[] | Yes | product_id, variation_id, quantity, extra_selections[{category_id, extra_ids[]}] and additional_comments. |
payment_method | Yes | Must be an active offline payment method in the store (cod, bacs or cheque). Gateway payments go through the store checkout. |
order_type | Recommended | delivery or pickup. |
fulfillment_date | Depends on settings | YYYY-MM-DD. |
fulfillment_time | Depends on settings | HH:MM, now or asap. |
billing, shipping | No | Addresses with WooCommerce keys. Coverage is checked with shipping, then billing, then address. |
address | No | Free-text address. |
doorbell | No | Apartment, doorbell, directions. |
curl -X POST https://tienda.example.test/wp-json/notiwoo/v1/orders \
-H "Authorization: Bearer <token>" -H "Content-Type: application/json" \
-d '{
"order_type": "delivery",
"payment_method": "cod",
"fulfillment_time": "asap",
"shipping": { "address_1": "Calle 10 # 20-30", "city": "Bogotá", "country": "CO" },
"line_items": [
{ "product_id": 120, "quantity": 2,
"extra_selections": [ { "category_id": 18, "extra_ids": [91] } ],
"additional_comments": "Sin cebolla" }
]
}'
{
"success": true,
"data": { "id": 1234, "status": "processing", "message": "Your Order has been accepted", "minutes": "30", "total": "33000.00" }
}
Before creating the order, validate the cart with POST /cart/validate to show errors to the customer.
| Error | HTTP | Cause |
|---|---|---|
notiwoo_cutover_pending | 409 | Coexistence mode. |
notiwoo_empty_cart | 422 | No items. |
notiwoo_payment_method_required | 422 | payment_method is missing. |
notiwoo_payment_requires_checkout | 422 | The method requires an online gateway. |
notiwoo_payment_method_unavailable | 422 | The method is not active. |
notiwoo_transaction_id_required | 422 | The transaction ID of a confirmed payment is missing. |
notiwoo_cart_invalid | 422 | Validation failed; details are in details.validation. |
notiwoo_product_changed | 409 | A product changed while the order was being created. Validate again. |
notiwoo_order_create_failed | 500 | WooCommerce could not create the order. |
Check the status
GET /orders/{id}/status responds { id, status, message, minutes }. minutes is the estimated time. Use it so the customer can poll the status of their order.
Errors: 404 notiwoo_order_not_found, 403 notiwoo_order_forbidden (the order belongs to another user).
Update an order
PUT /orders/{id}
| Field | Customer (owner) | Management |
|---|---|---|
status | Only cancelled, and only if the order is not cancelled, completed or refunded. | Any status. |
minutes | — | Estimated time. |
printed | — | Printed flag. |
deliveryboy | — | Courier ID. |
transaction_id | — | Transaction ID. |
Responds { id, status, message, updated }. If the customer sends a change that is not allowed, it is ignored and updated is false.
To follow the app's status flow, see order statuses.
Change the estimated time
POST /orders/{id}/minutes with minutes (required) and notify (true by default). With notify, the customer receives an email with the new time. Responds { id, minutes, message }.
Delete an order
DELETE /orders/{id} deletes the order permanently, without going to the trash. To void a sale, change the status to cancelled.
Sales report
GET /orders/reports counts completed orders in a range:
| Parameter | Required | Notes |
|---|---|---|
date_from, date_to | Yes | Dates; / is accepted as a separator. |
deliveryboy | No | Courier ID or all. |
payment_method | No | Method ID or all. |
Responds { date_from, date_to, delivery_name, count, total, total_html }. If the dates are not valid, it responds 422 notiwoo_invalid_dates.
Available statuses
GET /order-statuses responds { all, custom }:
all: all store statuses.custom: statuses added by Notiwoo and other plugins (wc-accepted,wc-shipped,wc-finalized…).