Update POS Order Status (v1)
Method & Path
PATCH /v1/workspace/:workspaceId/pos/order-statuses/:statusId
Actual backend path: /v1/workspace/:workspaceId/pos/order-statuses/:statusId
Description
Update an existing POS order status (name, labelAr, order). At least one field must be provided.
Authentication
Required: JWT in Authorization header.
Required permissions: store.orders.manage
Persona: Workspace Owner, Staff (store.orders.manage)
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer token: Bearer <token> |
Content-Type | string | Yes | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
statusId | string | Yes | Order status ID (MongoDB ObjectId) |
Request Body
At least one field required.
{
"name": "preparing",
"labelAr": "قيد التحضير",
"order": 1
}
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | Internal name (must remain unique in workspace) |
labelAr | string | No | Arabic display label |
order | number | No | Sort order for display |
Response 200 OK
{
"id": "507f1f77bcf86cd799439099",
"workspaceId": "507f1f77bcf86cd799439010",
"name": "preparing",
"labelAr": "قيد التحضير",
"order": 1,
"createdAt": "2024-01-15T10:00:00.000Z",
"updatedAt": "2024-01-15T10:05:00.000Z"
}
Common Errors
- 400 Bad Request: Empty name or invalid body
- 401 Unauthorized: Missing or invalid authentication token
- 403 Forbidden: Insufficient permissions
- 404 Not Found: Workspace or order status not found
- 409 Conflict: Another order status with this name already exists
- 422 Unprocessable Entity: No fields provided for update
- 500 Internal Server Error: Server error