Get Bookings During Pause Period
Returns a summary of the customer’s bookings that fall within a proposed pause period. Use this endpoint in the pause flow to warn the customer about any existing bookings that will be affected — specifically those that have not yet been charged, invoiced, or paid.
Authentication
This endpoint requires an authenticated customer session.
Query Parameters
ISO 8601 datetime string for the start of the proposed pause period. This is typically the earliest pause date returned by the pause metadata
endpoint.
ISO 8601 datetime string for the end of the proposed pause period. This is computed from the selected number of pause cycles.
Response
Returns a PauseBooking object summarising booking counts within the date range.
Total number of bookings within the proposed pause period.
Number of bookings that have not yet been charged.
Number of bookings that have not yet been invoiced.
Number of bookings whose invoices have not yet been paid.
Example Response
{
"Total": 3,
"NotCharged": 1,
"NotInvoiced": 2,
"NotPaid": 3
}
Usage in Portal
Called inside the pause modal each time the customer changes the number of pause cycles, so the warning counts stay in sync with the selected date range.
- File:
src/views/user/plans/components/PauseContractModal.tsx
Typical integration pattern
// From src/api/endpoints.ts
// endpoints.billing.contracts.pauseBookings = (start: string, end: string) => ({
// url: `/api/public/billing/coworkerContracts/pause/bookings?start=${start}&end=${end}`,
// type: null as unknown as PauseBooking,
// })
// Usage in React (recalculated on every cycle selection change)
const endDate = earliestPauseDate.plus({ months: selectedCycles })
const bookingsEndpoint = endpoints.billing.contracts.pauseBookings(earliestPauseDateISO, endDate.toUTC().toISO() ?? earliestPauseDateISO)
const { resource: bookings } = useData<typeof bookingsEndpoint.type>(httpClient, bookingsEndpoint.url)
GET /api/public/billing/coworkerContracts/{contractId}/pause/meta – Get pause eligibility and available date options
PUT /api/public/billing/coworkerContracts/v2/{contractId}/pause – Submit the pause request
Error Responses
The current user is not authenticated.
Missing or invalid start/end parameters.