Endpoint details
Endpoints
All paths below are relative to https://your-site.example/api/index.php/v1/nextrestaurant.
Each needs the API app plus the app named in the table, and a key holding the scope.
| Purpose | Method and path | Scope | App |
|---|---|---|---|
| Published locations | GET /locations |
menu:read |
— |
| A location's live menu | GET /locations/{id}/menu |
menu:read |
— |
| List orders | GET /orders |
orders:read |
Orders |
| One order | GET /orders/{id} |
orders:read |
Orders |
| Place an order | POST /orders |
orders:write |
Orders |
| Bookable slots | GET /locations/{id}/availability |
reservations:read |
Reservations |
| List reservations | GET /reservations |
reservations:read |
Reservations |
| One reservation | GET /reservations/{id} |
reservations:read |
Reservations |
| Book a table | POST /reservations |
reservations:write |
Reservations |
| Change a reservation | PATCH /reservations/{id} |
reservations:write |
Reservations |
| Change an item's base price or publish it | PATCH /menu-items/{id} |
menu:write |
— |
| 86 an item or override its price at a location | PATCH /locations/{id}/menu-items/{item_id} |
menu:write |
— |
| Stock on hand | GET /locations/{id}/stock-levels |
inventory:read |
Inventory |
| Set a count, par or reorder point, or 86 an ingredient | PATCH /locations/{id}/stock-levels/{stock_item_id} |
inventory:write |
Inventory |
| List customers | GET /customers |
customers:read |
Customers |
| One customer | GET /customers/{id} |
customers:read |
Customers |
| Payments | GET /payments |
payments:read |
POS |
| Refunds | GET /refunds |
payments:read |
POS |
| Sales summary | GET /reports/sales-summary |
reports:read |
Reports |
| Timesheets | GET /timesheets |
staff:read |
Staff |
The query-string lane offers the first three operations only: task=publicApi.locations,
task=publicApi.menu&location_id={id} and task=publicApi.createOrder, with the same keys and
scopes.
Every endpoint can also answer 401, 403 (INSUFFICIENT_SCOPE, MODULE_DISABLED,
API_DISABLED, DEMO_READONLY on writes) and 429; they are listed once in
Conventions & errors and not repeated below. Writes (POST, PATCH)
take a JSON body (Content-Type: application/json, up to 64 KB), accept an Idempotency-Key, and
PATCH honours If-Match — see Worked example & advice.
Catalogue
Locations
Scope menu:read.
REST GET /api/index.php/v1/nextrestaurant/locations
Query-string GET /index.php?option=com_nextrestaurant&format=json&task=publicApi.locations
curl -s "https://your-site.example/api/index.php/v1/nextrestaurant/locations" \
-H "Authorization: Bearer $NR_KEY"
Returns every published location. Unpublished ones are never listed.
On REST, service_modes is an array, opening_hours an object and tax_rate a number:
{
"data": [
{
"id": 1,
"code": "MAIN",
"title": "Downtown Bistro",
"currency": "USD",
"timezone": "America/Chicago",
"service_modes": ["dine_in", "takeaway", "delivery", "qr"],
"opening_hours": {
"mon": { "open": "11:00", "close": "22:00" },
"sat": { "open": "10:00", "close": "23:30" }
},
"tax_rate": 8.25
}
]
}
The query-string lane returns the same data exactly as stored, which means two of those fields arrive as JSON-encoded strings and need a second decode:
{
"success": true,
"locations": [
{
"id": 1,
"code": "MAIN",
"title": "Downtown Bistro",
"currency": "USD",
"timezone": "America/Chicago",
"service_modes": "[\"dine_in\",\"takeaway\",\"delivery\",\"qr\"]",
"opening_hours": "{\"mon\":{\"open\":\"11:00\",\"close\":\"22:00\"}}",
"tax_rate": "8.25",
"state": 1
}
]
}
opening_hours is keyed by mon–sun on both lanes; a day that is absent or empty means closed.
The query-string lane also carries a state field, which is always 1 because unpublished
locations are never returned.
The id from here is the location id every other endpoint needs.
Menu
Scope menu:read.
REST GET /api/index.php/v1/nextrestaurant/locations/{id}/menu
Query-string GET /index.php?option=com_nextrestaurant&format=json&task=publicApi.menu&location_id={id}
curl -s "https://your-site.example/api/index.php/v1/nextrestaurant/locations/2/menu" \
-H "Authorization: Bearer $NR_KEY"
| Parameter | Required | Meaning |
|---|---|---|
id (REST path) / location_id (query-string) |
Yes | A published location's id |
Both lanes return the same item structure. On REST it is {"data": {"location_id": …, "categories": [ … ]}}; on the query-string lane the same object sits inside Joomla's envelope.
The menu reflects live availability for that location: unpublished items, items switched off for that branch, and 86'd items are all absent, and the price is the branch's price where one overrides the base. An integration therefore cannot sell something you cannot make.
Items are grouped into categories, in the order you arranged them in the admin.
{
"success": true,
"location_id": 2,
"categories": [
{
"id": 2,
"title": "Starters",
"items": [
{
"id": 1,
"title": "Garlic Bread",
"description": "Stone-baked sourdough with roasted garlic butter, melted mozzarella and parsley.",
"price": 6.5,
"has_variations": 0,
"image": "images/nextrestaurant/items/1/gallery/cb901db407fa4277.jpg",
"prep_time_minutes": 19,
"calories": null,
"spice_level": 0,
"is_alcohol": 0,
"variations": [],
"modifier_groups": [],
"allergens": [
{ "id": 1, "title": "Celery", "presence": "contains" }
]
}
]
},
{
"id": 5,
"title": "Pizza",
"items": [
{
"id": 16,
"title": "Margherita Pizza",
"description": "San Marzano tomato, fior di latte and fresh basil on a 48-hour dough.",
"price": 13,
"has_variations": 1,
"image": "images/nextrestaurant/items/16/gallery/ca98f3a212f1aac0.jpg",
"prep_time_minutes": 23,
"calories": null,
"spice_level": 0,
"is_alcohol": 0,
"variations": [
{ "id": 1, "title": "Regular", "price": 13, "is_default": 1 },
{ "id": 2, "title": "Large", "price": 17, "is_default": 0 }
],
"modifier_groups": [
{
"id": 2,
"title": "Extra Toppings",
"selection_type": "multiple",
"is_required": 0,
"min_select": 0,
"max_select": 4,
"free_quantity": 0,
"modifiers": [
{ "id": 5, "title": "Extra Cheese", "price": 1.5, "is_default": 0, "max_quantity": 1 },
{ "id": 6, "title": "Mushrooms", "price": 1, "is_default": 0, "max_quantity": 1 },
{ "id": 7, "title": "Olives", "price": 1, "is_default": 0, "max_quantity": 1 },
{ "id": 8, "title": "Jalapenos", "price": 0.75, "is_default": 0, "max_quantity": 1 }
]
}
],
"allergens": [
{ "id": 5, "title": "Fish", "presence": "contains" },
{ "id": 14, "title": "Sulphur dioxide / sulphites", "presence": "contains" }
]
}
]
}
]
}
Item fields
| Field | Meaning |
|---|---|
price |
The branch price for the item as ordered with no variation |
has_variations |
1 when the item is sold in sizes or versions |
image |
Path relative to the site root, or null. Prefix with your site URL to display it |
prep_time_minutes, calories, spice_level, is_alcohol |
Optional presentation data; any may be null or 0 |
variations |
Sizes/versions. Empty when the item has none |
modifier_groups |
Option groups attached to this item |
allergens |
Declared allergens; presence is contains or may_contain |
Variations
When variations is non-empty, pick one and send its id. The variation's price replaces the
item's price — it is not added to it. is_default marks the one to pre-select.
Submitting an item that has variations without a variation_id is accepted, and is charged at the
base price with no size recorded. That is almost never what a customer meant, so treat a missing
selection as a validation error in your own UI.
Modifier groups
| Field | Meaning |
|---|---|
selection_type |
single (choose one) or multiple (choose several) |
is_required |
1 when the customer must choose |
min_select / max_select |
How many modifiers may be chosen from this group |
free_quantity |
How many are included before the per-modifier price applies |
modifiers[].max_quantity |
How many times one modifier may be repeated |
min_select and max_select already include any per-item override, so use them as given.
Modifier prices are added to the line.
Orders
Create order
REST POST /api/index.php/v1/nextrestaurant/orders -> 201 Created
Query-string POST /index.php?...&task=publicApi.createOrder -> 200 OK
Content-Type: application/json
Scope orders:write, Orders app. Open in demo mode, like the storefront.
curl -s -X POST "https://your-site.example/api/index.php/v1/nextrestaurant/orders" \
-H "Authorization: Bearer $NR_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 6f1c2d9e-0b7a-4c1e-9f3d-2a8b5c7d1e40" \
-d '{
"location_id": 2,
"channel": "web",
"service_mode": "takeaway",
"notes": "Ring the bell at the side door",
"customer": { "name": "Dana Whitfield", "phone": "+1 555 0142", "email": "[email protected]" },
"items": [
{ "item_id": 16, "variation_id": 2, "qty": 1, "notes": "Well done",
"modifiers": [ { "modifier_id": 5, "qty": 1 } ] },
{ "item_id": 1, "qty": 2 }
]
}'
Request body
| Field | Required | Meaning |
|---|---|---|
location_id |
Yes | Where the order is placed |
items |
Yes | At least one line — see below |
channel |
No | web (default), phone, takeaway or delivery. Anything else falls back to web. Recorded on the order and visible in reports |
service_mode |
No | Free text stored with the order, e.g. takeaway, dine_in |
notes |
No | Order-level note, shown to the kitchen |
customer |
No | { name, phone, email } — all optional, stored with the order |
Each entry in items:
| Field | Required | Meaning |
|---|---|---|
item_id |
Yes | Menu item id from the menu endpoint |
qty |
Yes | Quantity |
variation_id |
When the item has variations | Chosen variation |
modifiers |
No | [{ "modifier_id": 5, "qty": 1 }, …] |
notes |
No | Line note, e.g. "no ice" |
A body wrapped as {"data": { … }} is also accepted, for clients that always send that envelope.
Response
On REST, the full order — the same object GET /orders/{id} returns (see One order).
Since 6.1 that includes payments, updated_at and the other fields listed there; 6.0's fields
are all still present.
The query-string lane answers with its own envelope, with the order under data.order and
numbers as strings:
{
"success": true,
"id": 580,
"order_number": "ORD-000580",
"grand_total": 34.1,
"status": "placed",
"order": { "id": 580, "order_number": "ORD-000580", "grand_total": "34.10", "items": [ ] }
}
name_snapshot on each line is what the kitchen and the receipt will show — it records the item
as it was priced, including the variation.
Note: an order's
currencyis oftennull. Take the currency from the location instead.
What the totals mean
Totals are recomputed on the server from your menu records. A submitted price is ignored, so a
tampered request buys nothing at the wrong price — and so your integration never has to replicate
your tax or pricing rules. For example: 17.00 + 1.50 for a large pizza with extra cheese plus
6.50 × 2 for garlic bread gives a 31.50 subtotal, and tax brings the grand_total to 34.10.
A new order's status is always placed. It cannot be set by the caller.
What an API order becomes
An ordinary order. It routes to kitchen stations by your routing rules, depletes stock at whatever status you configured, settles into the payments ledger, and appears in reports with its channel recorded — exactly like an order from the storefront.
Orders arrive unpaid. The API records an order; it does not take payment. Collect at the counter, on delivery, or through your own checkout.
Errors
| Status | code |
When |
|---|---|---|
400 |
INVALID_ORDER |
Missing input, or an item is unpublished, 86'd or unavailable there |
404 |
UNKNOWN_LOCATION |
The location does not exist or is not published |
422 |
IDEMPOTENCY_MISMATCH |
The Idempotency-Key was used for a different order |
429 |
RATE_LIMITED |
Over the key's budget, or 60 orders from this address in 5 minutes |
500 |
ORDER_FAILED |
Something failed server-side |
List orders
GET /orders?location_id=2&status=completed&updated_since=2026-12-01T00:00:00Z&limit=50
Scope orders:read, Orders app. Oldest change first, a page at a time — see
Lists and syncing.
| Parameter | Meaning |
|---|---|
location_id |
Only this location |
status |
placed, confirmed, preparing, ready, served, completed, cancelled, refunded, draft or open. Anything else is 422 |
channel |
e.g. web, dine_in, takeaway, delivery, qr |
updated_since |
Only orders changed at or after this UTC time |
limit, cursor |
Paging |
One order
GET /orders/{id}
Scope orders:read. Carries an ETag. 404 NOT_FOUND when there is no such order.
{
"data": {
"id": 591,
"order_number": "ORD-000591",
"location_id": 2,
"customer_id": null,
"table_id": null,
"channel": "web",
"source": "api",
"status": "completed",
"fulfillment_status": "delivered",
"guest_count": null,
"subtotal": 31.5,
"discount_total": 0,
"tax_total": 2.6,
"service_charge": 0,
"tip_total": 0,
"delivery_fee": 0,
"grand_total": 34.1,
"currency": null,
"notes": "Ring the bell at the side door",
"scheduled_for": null,
"placed_at": "2026-12-24 18:42:51",
"completed_at": "2026-12-24 19:05:12",
"cancelled_at": null,
"cancel_reason": null,
"created_at": "2026-12-24 18:42:51",
"updated_at": "2026-12-24 19:05:12",
"items": [
{
"id": 1300,
"item_id": 16,
"variation_id": 2,
"name_snapshot": "Margherita Pizza (Large)",
"qty": 1,
"unit_price": 17,
"modifiers_total": 1.5,
"discount_amount": 0,
"line_total": 18.5,
"status": "sent",
"seat_number": null,
"notes": "Well done"
}
],
"payments": [
{
"id": 812,
"order_id": 591,
"location_id": 2,
"method": "card",
"amount": 34.1,
"tip_amount": 0,
"refunded_total": 0,
"currency": "USD",
"status": "captured",
"reference": "TXN-15E39117E693",
"paid_at": "2026-12-24 19:05:12",
"created_at": "2026-12-24 19:05:12",
"updated_at": "2026-12-24 19:05:12"
}
]
}
}
| Field | Meaning |
|---|---|
source |
Where an online order came from: web, qr or api. null for orders entered by staff |
status |
placed, then confirmed, preparing, ready, served, completed; or cancelled, refunded |
fulfillment_status |
The kitchen's view, e.g. in_kitchen, ready, delivered |
items[].status |
pending, sent, voided, … A voided line stays on the order with its status |
payments |
Every payment against the order, with how much of it was refunded |
Reservations
Bookings go through the same engine as the storefront's booking form: opening hours, lead time, closures and seat capacity are all checked, under a per-location lock so two clients cannot both take the last seats.
Times. Responses carry reserved_at in UTC and reserved_at_local in the venue's wall clock.
Requests take the venue's local time, Y-m-d H:i (a T between date and time is accepted too).
Bookable slots
GET /locations/{id}/availability?date=2026-12-24&party_size=4
Scope reservations:read, Reservations app.
| Parameter | Required | Meaning |
|---|---|---|
date |
Yes | The venue's calendar day, Y-m-d |
party_size |
No | 1–100, default 2 |
{
"data": {
"date": "2026-12-24",
"location_id": 2,
"open": true,
"capacity": 54,
"slots": [
{ "time": "18:00", "available": true, "remaining": 12 },
{ "time": "18:30", "available": false, "remaining": 2 }
]
}
}
time is the venue's wall clock. open is false on a closed day, with an explanatory message.
422 for a missing or malformed date, 404 UNKNOWN_LOCATION for an unknown location.
List reservations
GET /reservations?location_id=2&status=confirmed&from=2026-12-24 00:00:00&to=2026-12-25 00:00:00
Scope reservations:read. Paged like every list.
| Parameter | Meaning |
|---|---|
location_id |
Only this location |
status |
pending, confirmed, seated, completed, no_show, cancelled or waitlist |
from, to |
reserved_at on or after / before these UTC times |
updated_since, limit, cursor |
Syncing and paging |
One reservation
GET /reservations/{id}
{
"data": {
"id": 109,
"reservation_number": "RES-000109",
"location_id": 2,
"customer_id": null,
"area_id": null,
"table_ids": [],
"guest_name": "Dana Whitfield",
"guest_phone": null,
"guest_email": "[email protected]",
"party_size": 4,
"reserved_at": "2026-12-25 01:30:00",
"reserved_at_local": "2026-12-24 19:30:00",
"duration_minutes": 90,
"status": "pending",
"deposit_amount": 0,
"special_requests": null,
"source": "api",
"created_at": "2026-12-01 10:12:40",
"updated_at": "2026-12-01 10:12:40"
}
}
Book a table
POST /reservations
Scope reservations:write, Reservations app. Open in demo mode, like the storefront. Limited to
30 bookings per address per 5 minutes, on top of the key's budget.
curl -s -X POST "$BASE/reservations" -H "$AUTH" \
-H "Content-Type: application/json" -H "Idempotency-Key: booking-7f2c" \
-d '{"location_id":2,"guest_name":"Dana Whitfield","guest_email":"[email protected]",
"party_size":4,"reserved_at":"2026-12-24 19:30"}'
| Field | Required | Meaning |
|---|---|---|
location_id |
Yes | Where |
guest_name |
Yes | Who |
party_size |
Yes | 1–100 |
reserved_at |
Yes | The venue's local time, Y-m-d H:i. Take it from the availability slots |
guest_email, guest_phone |
No | The guest gets the same acknowledgement email as from the storefront |
special_requests |
No | Shown to staff |
The booking is created pending, for staff to confirm, exactly like a storefront booking.
Answers 201 with the reservation.
| Status | code |
When |
|---|---|---|
404 |
UNKNOWN_LOCATION |
No such published location |
409 |
SLOT_UNAVAILABLE |
Closed, fully booked, too soon, or a party larger than the venue seats — the title says which |
422 |
VALIDATION_FAILED |
A field is missing or malformed; source.pointer names it |
429 |
RATE_LIMITED |
Over the key's budget or the per-address booking limit |
Change a reservation
PATCH /reservations/{id}
Scope reservations:write. Refused in demo mode. Send only what changes:
| Field | Meaning |
|---|---|
guest_name, guest_phone, guest_email, special_requests |
Contact details |
party_size |
1–100 |
reserved_at |
The venue's local time, Y-m-d H:i |
duration_minutes |
15–720 |
status |
Move it through its lifecycle — see below |
Moving the time, the duration or the party size re-checks the slot, without counting this booking against itself, and checks that its assigned tables are free at the new time.
status follows the same lifecycle as the host stand:
| From | To |
|---|---|
pending |
confirmed, waitlist, cancelled, no_show |
waitlist |
confirmed, cancelled, no_show |
confirmed |
seated, cancelled, no_show |
seated |
completed, cancelled |
Confirming or cancelling emails the guest, as it does from the admin.
| Status | code |
When |
|---|---|---|
404 |
NOT_FOUND |
No such reservation |
409 |
SLOT_UNAVAILABLE / TABLE_CONFLICT |
The new time does not fit |
409 |
ILLEGAL_TRANSITION |
meta.from and meta.allowed say which moves are possible |
412 |
PRECONDITION_FAILED |
Changed since the ETag you sent |
422 |
VALIDATION_FAILED |
A malformed field, or a field that cannot be changed |
Menu and stock
These change what is for sale, so they are refused in demo mode. Each change is recorded in the audit log under the key's name.
Change an item's base price or publish it
PATCH /menu-items/{id}?location_id=2
{"base_price": 12.5}
Scope menu:write. Body: base_price (0 or more) and/or published (true/false). The same
form rules as the admin menu screen apply. The answer is the item's availability at location_id
(default: the first location), in the shape below; its ETag is the item's, for a following
If-Match on this path.
86 an item, switch it off, or override its price at a location
PATCH /locations/{id}/menu-items/{item_id}
{"is_86": true, "eighty_six_reason": "Out of salmon"}
Scope menu:write. The same per-location settings as the admin menu screen. Send any of:
| Field | Meaning |
|---|---|
is_86 |
true takes it off sale now |
eighty_six_reason |
Shown to staff; null clears it |
eighty_six_until |
UTC time the 86 lifts by itself; null clears it |
available |
false switches the item off at this location (not an 86: it stays off) |
price_override |
This location's price; null returns to the base price |
{
"data": {
"item_id": 42,
"location_id": 2,
"title": "Grilled Salmon",
"base_price": 24,
"price": 24,
"price_override": null,
"published": true,
"available": false,
"is_86": true,
"eighty_six_until": null,
"eighty_six_reason": "Out of salmon",
"updated_at": "2026-12-24 19:02:11"
}
}
available is the one to read: whether a guest can order it there right now. A change in it fires
the menu_item.availability_changed webhook.
Stock on hand
GET /locations/{id}/stock-levels?low=true
Scope inventory:read, Inventory app. Ordered by stock item; low=true returns only levels at
or below their reorder point. Paged with limit and cursor (no updated_since).
{
"data": [
{
"stock_item_id": 1,
"location_id": 2,
"sku": "STK-001",
"title": "Chicken Breast",
"unit": "kg",
"quantity": 8.5,
"par_level": 40,
"reorder_point": 10,
"low": true,
"is_86": false,
"last_counted_at": "2026-12-24 07:30:00",
"updated_at": "2026-12-24 18:44:10"
}
],
"meta": { "limit": 25, "next_cursor": null }
}
Set a count, par or reorder point, or 86 an ingredient
PATCH /locations/{id}/stock-levels/{stock_item_id}
{"quantity": 42.5}
Scope inventory:write. Send any of quantity, par_level, reorder_point (null clears the
last two) and is_86.
- A new
quantityis a count: the difference is recorded as an adjustment movement in the stock ledger, like a count made on the stock screen. - Dropping to or below the reorder point fires
stock.low. is_86: truetakes every menu item whose recipe uses this ingredient off sale at the location, exactly like the stock screen;falseputs them back.
Reporting
Read-only. Each needs its own scope and app, so an accounting integration does not need access to reservations, and a CRM sync does not see payroll.
Customers
GET /customers?updated_since=2026-12-01T00:00:00Z
GET /[email protected]
GET /customers/{id}
Scope customers:read, Customers app. Filters: email (exact), marketing_opt_in
(true/false), updated_since, limit, cursor.
{
"data": {
"id": 2,
"code": "CUST-0002",
"first_name": "Jessica",
"last_name": "Robinson",
"email": "[email protected]",
"phone": "+1 217-555-1201",
"marketing_opt_in": true,
"default_location_id": 1,
"tags": ["vip"],
"active": true,
"created_at": "2025-12-06 05:09:05",
"updated_at": "2026-11-02 14:20:31"
}
}
Market only to customers whose marketing_opt_in is true.
Payments and refunds
GET /payments?location_id=2&status=captured&updated_since=2026-12-01T00:00:00Z
GET /refunds?updated_since=2026-12-01T00:00:00Z
Scope payments:read, POS app. A payment is shaped as in payments on an order (see
One order); refunded_total sums the refunds against it. A refund:
{
"id": 42,
"payment_id": 335,
"order_id": 405,
"amount": 33.56,
"reason": "customer_request",
"status": "completed",
"reference": "RFD-BD88B264DC75",
"processed_at": "2026-12-03 10:47:33",
"created_at": "2026-12-03 10:47:33"
}
Refunds are listed by when they were processed, not by when the payment was made.
Sales summary
GET /reports/sales-summary?from=2026-12-01&to=2026-12-31&location_id=2
Scope reports:read, Reports app. from and to are venue calendar days, inclusive, at
most 366 days apart; omit location_id for all locations. The same numbers as the admin Reports
screen.
{
"data": {
"from": "2026-12-01",
"to": "2026-12-31",
"location_id": 2,
"totals": {
"orders_count": 1204,
"gross_sales": 41260.4,
"net_sales": 37712.1,
"tax_total": 3111.25,
"service_total": 0,
"tips_total": 2210.5,
"discount_total": 412,
"avg_order_value": 34.27,
"comp_total": 96.5,
"refund_total": 140.2
},
"days": [
{ "day": "2026-12-01", "orders_count": 38, "gross_sales": 1302.8 }
]
}
}
Orders count as sales from placed to completed; cancelled and refunded orders do not. Refunds
are totalled by the day they were made.
Timesheets
GET /timesheets?from=2026-12-01&to=2026-12-15&location_id=2
Scope staff:read, Staff app. The same figures as Monitoring → Payroll, for shifts that
started on the venue days in range: staff (per person: hours, regular, overtime, break minutes,
hourly rate, gross pay, shift count and a per-week split), days (per person per day) and
open_shifts (clock-ins with no clock-out, which are not counted until they are closed). This
includes pay rates: give staff:read only to payroll integrations.
422 for a missing or malformed range, or one longer than 366 days.