Skip to main content

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

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

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier
invoiceIdstringYesPOS invoice ID
itemIndexnumberYesZero-based index of the item in items

Request Body

{
"quantity": 3
}
ParameterTypeRequiredDescription
quantitynumberYesInteger 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