Update POS Invoice Item Quantity (v1)
Method & Path
PATCH /v1/workspace/:workspaceId/pos/invoices/:invoiceId/items/:itemIndex
Actual backend path: /v1/workspace/:workspaceId/pos/invoices/:invoiceId/items/:itemIndex
Description
Update the quantity of a line item in a draft POS invoice. itemIndex is the zero-based index of the item in the invoice's items array. Only draft invoices can be modified.
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 |
invoiceId | string | Yes | POS invoice ID |
itemIndex | number | Yes | Zero-based index of the item in items |
Request Body
{
"quantity": 3
}
| Parameter | Type | Required | Description |
|---|---|---|---|
quantity | number | Yes | Integer 1–999 |
Response 200 OK
Returns the updated invoice with the modified line item and recalculated subtotal and total.
Common Errors
- 400 Bad Request: Invoice not in draft or invalid quantity
- 401 Unauthorized: Missing or invalid authentication token
- 403 Forbidden: Insufficient permissions (requires
store.orders.manage) - 404 Not Found: Workspace, invoice, or item index not found
- 422 Unprocessable Entity: Validation errors
- 500 Internal Server Error: Server error