Sales Register Management
Sales registers are specific cash register stations within a branch. For a terminal to process POS transactions, it must be linked to an active Sales Register.
Create Sales Register
Endpoint
POST /api/pos/sales-registers
Request Payload
| Field | Type | Required | Description |
|---|---|---|---|
pos_branches_id | string | Yes | Branch ID |
name | string | Yes | Register name (max 100 chars) |
register_number | string | Yes | Unique register number within branch (max 50 chars) |
external_id | string | No | External system ID (max 100 chars) |
status | string | No | Status: active, inactive, maintenance (default: "active") |
settings | object | No | Register settings |
settings.require_operator_login | boolean | No | Require operator login |
settings.auto_print_receipt | boolean | No | Auto-print receipts |
settings.allow_refunds | boolean | No | Allow refunds |
settings.max_refund_amount | number | No | Maximum refund amount |
settings.require_manager_approval | boolean | No | Require manager approval for transactions |
settings.manager_approval_threshold | number | No | Amount threshold for manager approval |
settings.receipt_copies | number | No | Number of receipt copies (1-5) |
settings.timeout_minutes | number | No | Session timeout in minutes (1-60) |
metadata | object | No | Custom metadata |
Response
{
"message": "Sales register created successfully",
"data": { ... }
}Get All Sales Registers
Retrieves all sales registers for the authenticated account.
Endpoint
GET /api/pos/sales-registers
Query Parameters
| Parameter | Type | Description |
|---|---|---|
pos_branches_id | string | Filter by branch |
status | string | Filter by status |
has_terminal | boolean | Filter by terminal linkage |
page | number | Page number |
limit | number | Items per page |
Response
{
"data": [...],
"pagination": {
"total": 10,
"page": 1,
"limit": 50,
"pages": 1
}
}Get Sales Register by ID
Retrieves a specific sales register with branch and terminal details.
Endpoint
GET /api/pos/sales-registers/:id
Response
{
"data": {
"_id": "...",
"name": "Register 1",
"pos_branches_id": { ... },
"pos_information_id": { ... },
...
}
}Update Sales Register
Updates an existing sales register.
Endpoint
PUT /api/pos/sales-registers/:id
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Register name (max 100 chars) |
external_id | string | No | External system ID (max 100 chars) |
status | string | No | Status: active, inactive, maintenance |
settings | object | No | Register settings (same as create) |
metadata | object | No | Custom metadata |
Response
{
"message": "Sales register updated successfully",
"data": { ... }
}Delete Sales Register
Soft-deletes a sales register.
Endpoint
DELETE /api/pos/sales-registers/:id
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | No | Deletion reason (max 500 chars) |
Response
{
"message": "Sales register deleted successfully",
"data": {
"id": "...",
"deleted_at": "..."
}
}Restore Sales Register
Restores a soft-deleted sales register.
Endpoint
POST /api/pos/sales-registers/:id/restore
Response
{
"message": "Sales register restored successfully",
"data": { ... }
}Link Terminal to Register
Links a POS-enabled terminal to a sales register.
Endpoint
PUT /api/pos/sales-registers/:id/link-terminal
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
pos_information_id | string | Yes | POS Information ID to link |
Response
{
"message": "Terminal linked successfully",
"data": {
"register_id": "...",
"pos_information_id": "..."
}
}Unlink Terminal from Register
Unlinks a terminal from a sales register.
Endpoint
PUT /api/pos/sales-registers/:id/unlink-terminal
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | No | Reason for unlinking (max 200 chars, default: "Manual unlink") |
Response
{
"message": "Terminal unlinked successfully"
}Updated 20 days ago