Get Invoice Product Line
Returns the CoworkerProduct record linked to a specific invoice line. This endpoint enriches invoice lines that originate from a product purchase, providing details such as product ID, quantity, and recurrence type.
Authentication
This endpoint requires an authenticated customer session.
Path Parameters
The unique identifier of the parent invoice.
The UniqueId of the customer product record associated with the invoice line. Available on the invoice line as CoworkerProductUniqueId.
Query Parameters
Comma-separated list of field paths to include in the response. When provided, only the
specified fields are returned — useful for reducing payload size. Supports nested paths
using dot notation. Example: _shape=Product.Price,Product.Quantity,Product.Product.Name.
Response
Returns a CoworkerProduct object.
Unique identifier of the customer product record.
ID of the underlying product in the catalogue.
Quantity of the product purchased.
Whether this product is set up as a recurring charge.
Globally unique identifier for this customer product record.
Example Response
{
"Id": 3001,
"ProductId": 88,
"Quantity": 2,
"RegularCharge": false,
"UniqueId": "a1b2c3d4-5678-90ef-abcd-1234567890ab"
}
Usage in Portal
Used to render product details in invoice line rows within the basket and invoice summary.
- File:
src/components/Basket/invoiceLines/ProductInvoiceLineRow.tsx
Typical integration pattern
// From src/api/endpoints.ts
// endpoints.billing.invoices.coworkerProduct = (invoiceId: number, coworkerProductsUniqueId: string) => ({
// url: `/api/public/billing/invoices/${invoiceId}/coworkerProducts/${coworkerProductsUniqueId}`,
// type: null as unknown as CoworkerProduct,
// })
// Usage in React
const endpoint = endpoints.billing.invoices.coworkerProduct(invoice.Id, line.CoworkerProductUniqueId)
const { resource: product } = useData<typeof endpoint.type>(httpClient, endpoint.url)
GET /api/public/billing/invoices/{invoiceId} – Get full invoice details
GET /api/public/store/products/{productId} – Get store product details
Error Responses
The current user is not authenticated or does not have access to this invoice.
The invoice or customer product record does not exist.