Skip to main content

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

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token: Bearer <token>
Content-TypestringYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier
statusIdstringYesOrder status ID (MongoDB ObjectId)

Request Body

At least one field required.

{
"name": "preparing",
"labelAr": "قيد التحضير",
"order": 1
}
ParameterTypeRequiredDescription
namestringNoInternal name (must remain unique in workspace)
labelArstringNoArabic display label
ordernumberNoSort 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