Skip to main content
GET
/
api
/
public
/
billing
/
invoices
/
{invoiceId}
/
bookings
/
{bookingUniqueId}
{
  "Id": 123,
  "UniqueId": "<string>",
  "ResourceId": 123,
  "ResourceName": "<string>",
  "FromTime": "<string>",
  "ToTime": "<string>",
  "CoworkerId": 123,
  "InvoiceId": 123,
  "Tentative": true,
  "Cancelled": true,
  "401 Unauthorized": {},
  "404 Not Found": {}
}

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

invoiceId
number
required
The unique identifier of the parent invoice.
bookingUniqueId
string
required
The UniqueId of the booking associated with the invoice line. This value is available on the invoice line object as BookingUniqueId.

Query Parameters

_shape
string
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.
Id
number
Unique identifier of the booking.
UniqueId
string
Globally unique identifier of the booking.
ResourceId
number
ID of the booked resource.
ResourceName
string
Display name of the booked resource.
FromTime
string
ISO 8601 datetime for the start of the booking.
ToTime
string
ISO 8601 datetime for the end of the booking.
CoworkerId
number
ID of the customer who made the booking.
InvoiceId
number
ID of the associated invoice.
Tentative
boolean
Whether the booking is still tentative/unconfirmed.
Cancelled
boolean
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

401 Unauthorized
error
The current user is not authenticated or does not have access to this invoice.
404 Not Found
error
The invoice or booking does not exist or cannot be associated.