Skip to main content

Overview

Cash registers represent physical or virtual points of sale. Each register belongs to a branch and can be of three types: ON_PREMISE (dine-in), DELIVERY, or EVENT (temporary operations).

Create Cash Register

POST /api/v1/cash-registers

Request Body

branch_id
integer
required
Branch ID where the register is located
operating_unit_id
integer
Operating unit ID (required for EVENT type registers)
code
string
required
Unique register code (max 50 characters)
name
string
required
Register name (max 255 characters)
type
string
required
Register type: ON_PREMISE, DELIVERY, or EVENT
is_active
boolean
default:"true"
Active status
meta
object
Additional metadata

Response

message
string
Success message
data
object
curl -X POST https://api.sushigo.local/api/v1/cash-registers \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "branch_id": 1,
    "code": "REG-001",
    "name": "Caja Principal",
    "type": "ON_PREMISE",
    "is_active": true,
    "meta": {
      "location": "Counter 1"
    }
  }'
{
  "message": "Cash register created successfully",
  "data": {
    "id": 1,
    "branch_id": 1,
    "operating_unit_id": null,
    "code": "REG-001",
    "name": "Caja Principal",
    "type": "ON_PREMISE",
    "is_active": true,
    "meta": {
      "location": "Counter 1"
    },
    "created_at": "2025-12-13T08:00:00+00:00",
    "updated_at": "2025-12-13T08:00:00+00:00",
    "branch": {
      "id": 1,
      "name": "Sucursal Centro"
    },
    "operating_unit": null
  }
}

List Cash Registers

GET /api/v1/cash-registers

Query Parameters

branch_id
integer
Filter by branch ID
type
string
Filter by register type: ON_PREMISE, DELIVERY, or EVENT
is_active
boolean
Filter by active status
sort_by
string
default:"code"
Sort field
sort_order
string
default:"asc"
Sort order: asc or desc
per_page
integer
default:"15"
Items per page

Response

Returns paginated list of cash registers with branch and operating unit information.
curl https://api.sushigo.local/api/v1/cash-registers?branch_id=1&is_active=true \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "current_page": 1,
  "data": [
    {
      "id": 1,
      "branch_id": 1,
      "code": "REG-001",
      "name": "Caja Principal",
      "type": "ON_PREMISE",
      "is_active": true,
      "branch": {
        "id": 1,
        "name": "Sucursal Centro"
      }
    },
    {
      "id": 2,
      "branch_id": 1,
      "code": "REG-DEL",
      "name": "Caja Delivery",
      "type": "DELIVERY",
      "is_active": true,
      "branch": {
        "id": 1,
        "name": "Sucursal Centro"
      }
    }
  ],
  "per_page": 15,
  "total": 2
}

Get Cash Register

GET /api/v1/cash-registers/{id}

Path Parameters

id
integer
required
Cash register ID

Response

Returns register details with recent sessions (last 5).
data
object
curl https://api.sushigo.local/api/v1/cash-registers/1 \
  -H "Authorization: Bearer YOUR_TOKEN"

Update Cash Register

PUT /api/v1/cash-registers/{id}

Path Parameters

id
integer
required
Cash register ID

Request Body

operating_unit_id
integer
Operating unit ID (for events)
code
string
Register code (must be unique)
name
string
Register name
type
string
Register type: ON_PREMISE, DELIVERY, or EVENT
is_active
boolean
Active status
meta
object
Additional metadata

Response

message
string
Success message
data
object
Updated register object
curl -X PUT https://api.sushigo.local/api/v1/cash-registers/1 \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Caja Principal Actualizada",
    "is_active": false
  }'

Delete Cash Register

Cannot delete a register with existing sessions. Set is_active to false instead.
DELETE /api/v1/cash-registers/{id}

Path Parameters

id
integer
required
Cash register ID

Response

message
string
Success message
curl -X DELETE https://api.sushigo.local/api/v1/cash-registers/1 \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "message": "Cash register deleted successfully"
}

Register Types

Used for dine-in sales at the restaurant location. This is the most common type for traditional POS operations.

Build docs developers (and LLMs) love