Get Invoice Booking Line
Returns the Booking record linked to a specific invoice line. This endpoint is used to enrich invoice line items that originate from a booking, giving the UI access to full booking details (resource name, times, floor plan, etc.) alongside the invoice.
Authentication
This endpoint requires an authenticated customer session.
Path Parameters
The unique identifier of the parent invoice.
The UniqueId of the booking associated with the invoice line. This value is available on the invoice line object as BookingUniqueId.
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=Booking.ResourceName,Booking.FromTime,Booking.ToTime.
Response
Returns a Booking object.
Unique identifier of the booking.
Globally unique identifier of the booking.
ID of the booked resource.
Display name of the booked resource.
ISO 8601 datetime for the start of the booking.
ISO 8601 datetime for the end of the booking.
ID of the customer who made the booking.
ID of the associated invoice.
Whether the booking is still tentative/unconfirmed.
Whether the booking has been cancelled.
Example Response
{
"Id": 9876,
"UniqueId": "b1a2c3d4-e5f6-7890-abcd-ef1234567890",
"ResourceId": 55,
"ResourceName": "Focus Room 2",
"FromTime": "2025-10-15T09:00:00",
"ToTime": "2025-10-15T11:00:00",
"CoworkerId": 987,
"InvoiceId": 12345,
"Tentative": false,
"Cancelled": false
}
Usage in Portal
This endpoint is used to render booking-specific details within an invoice line row in the basket/invoice summary UI.
- File:
src/components/Basket/invoiceLines/BookingInvoiceLineRow.tsx
Typical integration pattern
// From src/api/endpoints.ts
// endpoints.billing.invoices.booking = (invoiceId: number, bookingUniqueId: string) => ({
// url: `/api/public/billing/invoices/${invoiceId}/bookings/${bookingUniqueId}`,
// type: null as unknown as Booking,
// })
// Usage in React
const endpoint = endpoints.billing.invoices.booking(invoice.Id, line.BookingUniqueId)
const { resource: booking } = useData<typeof endpoint.type>(httpClient, endpoint.url)
GET /api/public/billing/invoices/{invoiceId} – Get full invoice details
GET /api/public/bookings/{id} – Get booking details directly
Error Responses
The current user is not authenticated or does not have access to this invoice.
The invoice or booking does not exist or cannot be associated.