Skip to main content

Create POS Order Status (v1)

Method & Path

POST /v1/workspace/:workspaceId/pos/order-statuses

Actual backend path: /v1/workspace/:workspaceId/pos/order-statuses

Description

Create a new workspace-defined order status for POS invoices (e.g. "قيد التحضير", "جاهز"). Names must be unique within the workspace.

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

Request Body

{
"name": "preparing",
"labelAr": "قيد التحضير",
"order": 0
}
ParameterTypeRequiredDescription
namestringYesInternal name (e.g. slug, used for API)
labelArstringNoArabic display label
ordernumberNoSort order for display (default 0)

Response 201 Created

{
"id": "507f1f77bcf86cd799439099",
"workspaceId": "507f1f77bcf86cd799439010",
"name": "preparing",
"labelAr": "قيد التحضير",
"order": 0,
"createdAt": "2024-01-15T10:00:00.000Z",
"updatedAt": "2024-01-15T10:00:00.000Z"
}

Common Errors

  • 400 Bad Request: Invalid or missing name
  • 401 Unauthorized: Missing or invalid authentication token
  • 403 Forbidden: Insufficient permissions
  • 404 Not Found: Workspace not found
  • 409 Conflict: An order status with this name already exists in the workspace
  • 500 Internal Server Error: Server error