Skip to main content

Remove POS Invoice Discount Line (v1)

Method & Path

DELETE /v1/workspace/:workspaceId/pos/invoices/:invoiceId/discount/:discountIndex

Actual backend path: /v1/workspace/:workspaceId/pos/invoices/:invoiceId/discount/:discountIndex

Description

Removes one discount line from a draft POS invoice by its zero-based index in the discounts array. Totals are recalculated after removal. Only draft invoices in an open business session 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>

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier
invoiceIdstringYesPOS invoice ID
discountIndexnumberYesIndex of the discount line (0-based)

Request Body

None.

Response 200 OK

Returns the updated invoice with discounts, subtotal, and total recalculated.

Common Errors

  • 400 Bad Request: Invalid identifiers
  • 401 Unauthorized: Missing or invalid authentication token
  • 403 Forbidden: Insufficient permissions
  • 404 Not Found: Invoice or discount index not found
  • 422 Unprocessable Entity: Invoice not in draft, or POS business session closed
  • 500 Internal Server Error: Server error