Skip to main content

Add POS Invoice Item (v1)

Method & Path

POST /v1/workspace/:workspaceId/pos/invoices/:invoiceId/items

Actual backend path: /v1/workspace/:workspaceId/pos/invoices/:invoiceId/items

Description

Add a product line item to a draft POS invoice. Product must belong to the workspace's storefront store. Price is calculated from the product base price and selected options (if any). 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

Request Body

{
"productId": "507f1f77bcf86cd799439020",
"quantity": 2,
"selectedOptions": [
{ "groupId": "507f1f77bcf86cd799439021", "optionId": "507f1f77bcf86cd799439022" }
]
}
ParameterTypeRequiredDescription
productIdstringYesStorefront product ID
quantitynumberYesInteger 1–999
selectedOptionsarrayNoOption selections: { groupId, optionId } per option group

Response 201 OK

Returns the updated invoice (same shape as Get POS Invoice), including the new line item and recalculated subtotal and total.

Common Errors

  • 400 Bad Request: Invalid body, invalid product/options, or invoice not in draft
  • 401 Unauthorized: Missing or invalid authentication token
  • 403 Forbidden: Insufficient permissions (requires store.orders.manage)
  • 404 Not Found: Workspace, invoice, or product not found
  • 422 Unprocessable Entity: Validation errors (e.g. quantity out of range)
  • 500 Internal Server Error: Server error