- Base URLs and sign-in
- Who may do what
- The Schedule: stops and routes
- Delivery days
- The driver app
- GET /wc-sibooking/v1/driver/routes
- GET /wc-sibooking/v1/driver/routes/{id}
- GET /wc-sibooking/v1/driver/routes/{id}/version
- POST /wc-sibooking/v1/driver/routes/{id}/start and /end
- POST /wc-sibooking/v1/driver/stops/{id}
- GET /wc-sibooking/v1/driver/stops/{id}/signature and /photos
- PUT /wc-sibooking/v1/driver/routes/{id}/driver
- Delivery areas and hand-overs
- Smart Routing
- Hooks
The REST API for delivery and routing: the Schedule’s stops and routes, delivery areas and the address check, the driver app, and Smart Routing’s planner. Everything the Schedule, the driver app and the route board do on screen goes through these endpoints, so an outside system (a dispatch tool, a telematics app, your own driver app) can do the same. The setup and the conventions shared by every endpoint (keys, errors, pagination) are in REST API overview and authentication.
Base URLs and sign-in #
| Namespace | What lives there | Needs |
|---|---|---|
/wp-json/ | The Schedule, delivery areas, hand-overs and the driver app | Rentals & Bookings Regular for delivery areas and hand-overs; the Schedule’s and the driver app’s endpoints come with Smart Routing |
/wp-json/siroutes/v1/ | Smart Routing’s planner (plan, accept, send) | Smart Routing |
wc-sibooking/v1takes a WooCommerce REST API key (WooCommerce › Settings › Advanced › REST API) sent as HTTP Basic, like the other rental endpoints. The key’s user decides what it may do (below), so a key made for a driver’s account works the driver endpoints and nothing else.siroutes/v1does not start withwc-, so WooCommerce keys don’t apply there. Use a WordPress Application Password (Users › Profile › Application Passwords) as HTTP Basic (username:application password), or, inside wp-admin, the logged-in cookie with anX-WP-Nonceheader.- Send bodies as JSON (
Content-Type: application/json). Times are ISO 8601 in UTC (2026-10-20T14:24:00+00:00) unless a field saysHH:MM, which is the shop’s local time. - Errors use the WordPress shape
{"code", "message", "data": {"status"}}. The Regular codes start withsibooking_rest_; the driver and Smart Routing codes are listed with their endpoints.
STORE="https://yourstore.com/wp-json"
curl -u "ck_your_key:cs_your_secret" "$STORE/wc-sibooking/v1/schedule?day=2026-10-20"
Who may do what #
| Ability | Who has it | Opens |
|---|---|---|
sibooking_ | Shop managers and administrators, and any role given it (a reservationist who only looks) | Reading the Schedule, stops, route exports, signatures and photos; Smart Routing’s day |
sibooking_dispatch | Shop managers and administrators, and any role given it | Changing stops and routes, picking drivers; Smart Routing’s plan, accept and send |
sibooking_drive | The Driver role (Smart Routing adds it), plus everyone with sibooking_dispatch or manage_woocommerce | The driver endpoints. A driver opens only the routes given to them; dispatchers and shop managers open every route |
manage_woocommerce | Shop managers, administrators | Delivery settings, delivery areas, the address check, hand-overs |
A user without the ability gets 401 (not signed in) or 403.
The Schedule: stops and routes #
These endpoints come with Smart Routing: they answer while Smart Routing is active, on its own or beside Rentals & Bookings Regular 1.0.80 or newer. The paths are the same either way (with Regular the stops and routes are Regular’s). A stop is one visit: a delivery, collection, pick-up at the shop, return to the shop, a parcel to transport (dispatch) or a parcel due back (due). A route is one vehicle run on one day. The Schedule shows stops whose status is planned, assigned, on_the_way, done or failed.
GET /wc-sibooking/v1/schedule #
The day’s board, the same as Rentals › Schedule.
| Parameter | Notes |
|---|---|
day | Y-m-d; today when left out |
location | A location id (Multi Location Inventory); 0 = all |
view | board (default) or week: the counts per day for the week from day |
The board answers day, location, routes (each with id, name, driver, vehicle, ordered, stops, minutes, maps), unassigned (the stops not on a route), counter, toPost, dueBack, total and locations.
GET /wc-sibooking/v1/stops #
Stops as cards. Filters, all optional: day, or from and to (Y-m-d); location; area; route; order; status and kind (comma separated). Each card has:
| Field | Notes |
|---|---|
id, order, number | The stop, the WooCommerce order id and its number |
kind, kindLabel | delivery, collection, pickup, return, dispatch or due |
day, window, slot, eta | The day, the booked time slot (08:00-10:00) and the planned arrival window |
route, position | The route (0 = not on one) and the place on it |
customer, phone, email, address, postcode, city, country, lat, lng | Where to go |
items, note, setup | What to hand over, the customer’s note, set-up minutes |
status, statusLabel, sale | The state; sale is true for an order without rentals |
GET /wc-sibooking/v1/stops/{id} #
One card plus others (the order’s other stops), history (every change, each {at, atGmt, type, by, data}; the driver’s taps are driver_on_the_way, driver_arrived, driver_done and driver_failed), slots (that day’s slots with places left), days (the days a delivery can be given, below; an empty list for a rental’s stop or one already out) and pod (the proof of delivery: signature as a PNG data URL and photos as {done: [...], failed: [...]} JPEG data URLs).
PATCH /wc-sibooking/v1/stops/{id} #
Moves a stop, or gives it a day. PUT and POST work too. Send any of:
| Field | Notes |
|---|---|
route | The route to put it on; 0 takes it off its route |
position | Its place on the route, from 1; 0 = at the end |
window | Another slot that day (10:00-12:00). A full slot answers 409 slot_full unless force is true |
day | Y-m-d. Gives a delivery with no rentals (an order that only sells products) this day, or moves it to another day: see Delivery days. The stop comes off its route. With window it also takes that slot on the new day |
notify | With day: add a customer note to the order, which WooCommerce emails to the customer. Default true |
force | Book the slot, or the day, even when it is full |
Answers {"ok": true, "stop": {card}}, plus warning and message when the day or the slot changed. A driver who already has the route sees the change in the app within a few minutes.
Routes #
| Endpoint | What it does |
|---|---|
POST /wc-sibooking/ | A new route: day (required), location, name (default “Route 2” and so on). Answers 201 with the route |
PATCH /wc-sibooking/ | Renames it: name |
DELETE /wc-sibooking/ | Deletes it; its stops go back to “not on a route” |
POST /wc-sibooking/ | Puts the stops in the built-in route order (the Order routes button); answers before and after (the distance in meters) and the new order |
POST /wc-sibooking/ | Undoes the last order: {"undone": true} |
GET /wc-sibooking/ | The route for Routific or OptimoRoute: columns, rows and the csv text |
Delivery days #
An order that sells products with delivery (no rentals) can wait for a delivery day. Its stop sits in the Schedule’s “Waiting for a day” list until someone gives it a day. These endpoints do what that list and the stop’s Change day button do. A rental’s day comes from its booking dates, so a rental’s stop is refused. They need Smart Routing 1.2.0 or newer, and beside Rentals & Bookings Regular they need Regular 1.0.88 or newer. Without that, /pending and /stops/days are not registered (404 rest_no_route) and day on PATCH /stops/{id} answers 422 invalid. Reading needs sibooking_, giving a day needs sibooking_dispatch.
GET /wc-sibooking/v1/pending #
The stops waiting for a day, oldest first. Optional location (a location id, default 0 = the store). The answer has:
| Field | Notes |
|---|---|
location | The location asked for |
stops | Stop cards (as in GET /stops) with waited (whole days since the order came in) and since (when, ISO 8601) |
days | The open delivery days to offer, from today, 28 days ahead: [{day, label, full, left}]. full is true when the day’s cap is used up and left is the places left (null = no cap). Empty when nothing waits. They are worked out for the oldest stop; the cap is checked again for each stop as it is given the day |
count, old | How many stops wait (at this location), and how many of them for more than 3 days |
POST /wc-sibooking/v1/stops/days #
Gives several stops one day (the Waiting for a day list’s bulk action). Each stop is handled like PATCH /stops/{id} with day.
| Field | Notes |
|---|---|
ids | Required. An array of stop ids. An empty list is a 422 invalid |
day | Required. Y-m-d, today or later, a day with deliveries (an area’s or product’s closed days are refused) |
notify | Email each customer a note about the day. Default true |
force | Give the day even when it is full. Default false |
The answer is {"moved": [ids], "refused": [{id, code, message}], "ok": true}, with status 200 even when some stops are refused; ok is false when any stop was refused. A stop that was moved is taken off its route and set to planned. The codes in refused and on PATCH /stops/{id} with day are:
| Code | When |
|---|---|
not_found (404) | No such stop |
rental (422) | The stop belongs to a rental, or is not a delivery |
started (422) | The stop is already on the way, done or failed |
invalid (422) | Not a valid day, a day that has passed, or a slot not offered on that day |
closed (422) | No deliveries on that day |
day_full (409) | The day’s cap is used up and force is not set |
On PATCH /stops/{id} these come with the sibooking_rest_ prefix (sibooking_).
curl -u "ck_your_key:cs_your_secret" \
"$STORE/wc-sibooking/v1/pending"
curl -X POST -u "ck_your_key:cs_your_secret" \
-H "Content-Type: application/json" \
-d '{"ids": [231, 232], "day": "2026-12-04", "notify": true}' \
"$STORE/wc-sibooking/v1/stops/days"
curl -X PATCH -u "ck_your_key:cs_your_secret" \
-H "Content-Type: application/json" \
-d '{"day": "2026-12-07", "window": "10:00-12:00", "notify": false}' \
"$STORE/wc-sibooking/v1/stops/233"
The driver app #
The driver app and these endpoints come with Smart Routing: they answer while Smart Routing is active, on its own or beside Rentals & Bookings Regular 1.0.80 or newer. The paths are the same either way. The phone app at /driver/ uses these endpoints and nothing else, so they are also the way to build your own driver app or to feed a telematics system.
GET /wc-sibooking/v1/driver/routes #
The routes the signed-in user drives on a day: day (Y-m-d, today when left out). Dispatchers and shop managers get every route, can pass driver (a user id) for one driver’s routes, and also get drivers, the people who can drive.
{"day": "2026-10-20", "me": 14, "canPick": false,
"routes": [{"id": 31, "day": "2026-10-20", "location": 0, "name": "Route 1",
"vehicle": "Party van", "driver": 14, "driverName": "Alex Rivera",
"started": "", "ended": "", "stops": 5, "done": 0, "failed": 0}]}
GET /wc-sibooking/v1/driver/routes/{id} #
The whole route for the phone: the route’s fields above plus depot, stops in driving order, reasons (the Couldn’t deliver reasons), fetched and version. Each stop has id, n (its number on the route), order, number, kind, kindLabel, sale, customer, phone, address, postcode, city, lat, lng, slot, eta, items, note, setup, status, doneAt, attempts, failReason, recipient, arrived and nav (Google Maps, Apple Maps and Waze links). 403 when the route is someone else’s.
GET /wc-sibooking/v1/driver/routes/{id}/version #
{"id": 31, "version": "4f1c09a2be7d"}. The version changes when a stop is added, removed or moved, not when one is done. The app checks it every few minutes and reloads the route when it changes.
POST /wc-sibooking/v1/driver/routes/{id}/start and /end #
Start route and End route. Send client_id and at (below). Only the first start and the first end count; repeating them is harmless. Both answer the summary: stops, done, failed, open, started, ended and failures ([{id, customer, reason}]). Ending a route marks what it collected as returned.
POST /wc-sibooking/v1/driver/stops/{id} #
A tap on a stop.
| Field | Notes |
|---|---|
action | Required: on_the_way, arrived, done (delivered or collected) or failed (couldn’t deliver) |
client_id | 6 to 64 letters, digits, - or _, unique per tap. A tap sent twice with the same id is applied once; the repeat answers the stop with "replayed": true |
at | When it happened, ISO 8601. Used for taps sent late (no signal); a time ahead of the server or older than a week is replaced by now |
recipient, signature | For done: who took it, and the signature as a data:image/ URL (up to 250 KB) |
reason | For failed: no_one_home, no_access, wrong_address, refused, vehicle or other |
note | Up to 1,000 characters; needed with other |
photos | For done or failed: up to 3 data:image/ URLs, 1.5 MB each |
Answers the stop’s new state: id, status, doneAt, attempts, failReason, recipient and arrived. Each tap adds an order note, and done on a delivery marks the rental sent (see the filter sibooking_ to turn that off).
| Error | When |
|---|---|
404 not_found | No such stop |
403 not_your_stop | The stop was moved to another driver’s route (the office wins) |
409 already_done | The stop is already done |
400 bad_reason, 400 note_needed | No reason, or other without a note |
400 bad_signature, 413 signature_too_big, 400 bad_photo | The signature or a photo isn’t a PNG or JPEG, or is too large |
GET /wc-sibooking/v1/driver/stops/{id}/signature and /photos #
The proof of delivery: {"id", "signature"} (a PNG data URL; 404 no_signature when there is none) and {"id", "done": [...], "failed": [...]} (JPEG data URLs). Open to Schedule viewers, dispatchers and the driver who took them; never cached.
PUT /wc-sibooking/v1/driver/routes/{id}/driver #
Gives a route to a driver (dispatchers only): driver, a user id, or 0 for nobody. 400 not_a_driver when that user can’t drive.
Delivery areas and hand-overs #
These need manage_woocommerce.
| Endpoint | What it does |
|---|---|
GET /wc-sibooking/ | Is an address delivered to? postcode, address, country, subtotal. Answers delivered, area (id, name, by, km), fee (offered, amount, message), days and message |
GET /wc-sibooking/ | The delivery areas. POST adds one |
GET, PUT, PATCH, DELETE /wc-sibooking/ | One area; fields not sent are kept |
GET, PUT /wc-sibooking/ | The Delivery & pickup settings; PUT keeps what isn’t sent and answers settings and warnings |
GET /wc-sibooking/ | The ways a product offers (product_id, optional ship_to): pick-up p, delivery d, transport s, each with its ways back and slots |
GET /wc-sibooking/ | A day’s time slots for a product: product_id, method, date, side (out or back), return_method |
PATCH /wc-sibooking/ | Change a booking’s hand-over: method, return_method, window, back_window, return_tracking, force. 409 not_available when the stock no longer fits, unless force |
An area has id, name, public_name, postcodes, radius_km, center, location_id, days, window_list, deliver_before, collect_after, day_cap, fee_model, fee, price_table, free_over, min_order, collect_fee, active and position.
Smart Routing #
The route board’s endpoints. Every one takes date (Y-m-d, required) and depot (a location id, default 0). Reading needs sibooking_, the rest sibooking_dispatch (shop managers have both).
| Endpoint | What it does |
|---|---|
GET /siroutes/v1/day | The day: vehicles (each vehicle with id, name, shift, capacity, features), stops, the saved plan, locks, sent and version, with date, today, depots, depot, depotPoint and canEdit |
GET /siroutes/v1/changes | {"version"}: changes when the day’s stops or saved routes change |
POST /siroutes/v1/plan | Plans the day (Plan routes) without saving. locks keeps stops on a vehicle, first or last, or at a time. 422 siroutes_no_depot when the vehicles have no start address |
POST /siroutes/v1/time | Times routes you arranged yourself: routes |
POST /siroutes/v1/save | Accept plan: saves routes (and locks) to the Schedule. Answers ok, version and the timed plan |
POST /siroutes/v1/send | Send to drivers: {"ok": true, "sent": 2, "told": 9, "version"} (told = customers sent their window, when that setting is on). 422 siroutes_ when nothing is saved |
routes is a list of {"vehicle": "r12", "stops": ["101", "102"]} (the vehicle’s id from day, the stop ids in driving order). locks is an object by stop id: {"101": {"vehicle": "r12", "position": "first", "time": "09:30"}}, every part optional.
A plan answers method (the planner used), routes, unassigned and totals. Each route has vehicle, used, startHm, endHm, meters, travel, waiting and late (seconds), and stops with job (the stop id), kind, arrivalHm and beginHm. Each unassigned stop has job, reason (capacity, window, shift, features, no_location, lock and so on) and a message to show. plannerNote says why an outside planner fell back to the built-in one.
curl -u "dispatcher:abcd efgh ijkl mnop qrst uvwx" -X POST \
-H "Content-Type: application/json" \
-d '{"date":"2026-10-20"}' "$STORE/siroutes/v1/plan"
Hooks #
To react to these events inside WordPress rather than poll, use the hooks: sibooking_ and sibooking_ (driver taps), siroutes_plan_saved (Accept plan) and siroutes_routes_sent (Send to drivers).
