Commerce
Tables and Registers
Use table and register endpoints for restaurants, cafés and multi-till POS setups.
TablesRegistersPOS
Tables, areas and registers
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /tables | List tables. |
| POST | /tables | Create table. |
| DELETE | /tables/{id} | Delete table. |
| GET | /registers | List registers. |
| POST | /registers | Create register. |
| DELETE | /registers/{id} | Delete register. |
Create table
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Table name or number. |
area_id | integer | Optional | Table area id when areas are enabled. |
seats | integer | Optional | Number of seats. |
is_active | boolean/integer | Optional | Whether the table is active. |
'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $secretKey,
'Accept: application/json',
'Content-Type: application/json',
'X-NeroPay-Timestamp: ' . $timestamp,
'X-NeroPay-Signature: ' . $signature,
'Idempotency-Key: ' . bin2hex(random_bytes(16)),
],
CURLOPT_POSTFIELDS => $rawBody,
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $response;
{
"success": true,
"data": {
"id": 9001,
"name": "Table 1",
"area_id": 1,
"seats": 4,
"is_active": 1
}
}
Create register
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Register or till name. |
location_id | integer/string | Optional | Location reference. |
is_active | boolean/integer | Optional | Whether register is active. |
'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $secretKey,
'Accept: application/json',
'Content-Type: application/json',
'X-NeroPay-Timestamp: ' . $timestamp,
'X-NeroPay-Signature: ' . $signature,
'Idempotency-Key: ' . bin2hex(random_bytes(16)),
],
CURLOPT_POSTFIELDS => $rawBody,
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $response;
{
"success": true,
"data": {
"id": 9501,
"name": "Front Till",
"location_id": "tml_nero_123",
"is_active": 1
}
}
Delete examples
true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $secretKey,
'Accept: application/json',
],
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $response;
true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $secretKey,
'Accept: application/json',
],
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $response;
{
"success": false,
"error": {
"code": "resource_not_found",
"message": "Table was not found for this merchant.",
"details": null
}
}