Skip to main content

Get POS Invoice (v1)

Method & Path

GET /v1/workspace/:workspaceId/pos/invoices/:invoiceId

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

Description

Get a single POS invoice by ID, including all line items and discount details.

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 (MongoDB ObjectId)

Response 200 OK

{
"invoice": {
"id": "507f1f77bcf86cd799439012",
"workspaceId": "507f1f77bcf86cd799439010",
"storeId": "507f1f77bcf86cd799439013",
"clientId": "507f1f77bcf86cd799439011",
"publicId": "POS-001",
"status": "draft",
"items": [
{
"productId": "507f1f77bcf86cd799439020",
"productName": "Product A",
"quantity": 2,
"basePrice": 50,
"selectedOptions": [
{ "groupId": "...", "groupName": "Size", "optionId": "...", "optionName": "Large", "priceDelta": 5 }
],
"unitPrice": 55,
"lineTotal": 110
}
],
"subtotal": 110,
"discounts": [],
"total": 110,
"paymentMethod": null,
"stockDeductedAt": null,
"createdBy": { "type": "staff", "id": "...", "name": "...", "email": "..." },
"createdAt": "2024-01-15T10:00:00.000Z",
"updatedAt": "2024-01-15T10:02:00.000Z"
}
}

Common Errors

  • 401 Unauthorized: Missing or invalid authentication token
  • 403 Forbidden: Insufficient permissions (requires store.orders.manage)
  • 404 Not Found: Workspace or POS invoice not found
  • 500 Internal Server Error: Server error