Skip to main content
GET
/
api
/
public
/
billing
/
coworkerContracts
/
{contractId}
/
pause
/
meta
{
  "CanBePausedNow": true,
  "IsPausedNow": true,
  "InPausedPeriod": true,
  "InPausedPeriodFrom": "<string>",
  "InPausedPeriodFromUtc": "<string>",
  "InPausedPeriodUntil": "<string>",
  "InPausedPeriodUntilUtc": "<string>",
  "CurrentPeriodStart": "<string>",
  "CurrentPeriodStartUtc": "<string>",
  "InProratePeriod": true,
  "RenewalDate": "<string>",
  "PauseCyclesLimit": 123,
  "PauseYearlyLimit": 123,
  "PausedPeriodsCount": 123,
  "ProrateDaysBefore": 123,
  "PauseUntilOptions": [
    {}
  ],
  "TermsAndConditions": "<string>",
  "401 Unauthorized": {},
  "404 Not Found": {}
}

Get Contract Pause Metadata

Returns metadata about the pause eligibility and state of a given contract. Use this endpoint before presenting the pause flow to the customer to determine whether pausing is possible, what the earliest pause date is, available pause-until options, and any applicable terms and conditions.

Authentication

This endpoint requires an authenticated customer session.

Path Parameters

contractId
number
required
The unique identifier of the contract.

Response

Returns a PauseContractMeta object.
CanBePausedNow
boolean
Whether the contract is currently eligible to be paused.
IsPausedNow
boolean
Whether the contract is already actively paused.
InPausedPeriod
boolean
Whether the current date falls within an existing scheduled pause period.
InPausedPeriodFrom
string
Local datetime from which the current pause period starts (if in one).
InPausedPeriodFromUtc
string
UTC datetime from which the current pause period starts.
InPausedPeriodUntil
string
Local datetime at which the current pause period ends.
InPausedPeriodUntilUtc
string
UTC datetime at which the current pause period ends.
CurrentPeriodStart
string
ISO 8601 date for the start of the current billing period.
CurrentPeriodStartUtc
string
UTC version of the current billing period start.
InProratePeriod
boolean
Whether the contract is currently within a pro-rata period (affects pause timing).
RenewalDate
string
ISO 8601 date of the next scheduled renewal.
PauseCyclesLimit
number
Maximum number of billing cycles that can be paused (if restricted). null means unlimited.
PauseYearlyLimit
number
Maximum number of months that can be paused per year (if restricted). null means unlimited.
PausedPeriodsCount
number
Number of pause periods already used by this contract.
ProrateDaysBefore
number
Number of days before the renewal where pro-rata charges apply.
PauseUntilOptions
array
Array of ISO 8601 date strings representing the available pause end dates the customer can select from.
TermsAndConditions
string
HTML or plain text for the pause terms and conditions that should be shown to and accepted by the customer before pausing.

Example Response

{
  "CanBePausedNow": true,
  "IsPausedNow": false,
  "InPausedPeriod": false,
  "InPausedPeriodFrom": null,
  "InPausedPeriodFromUtc": null,
  "InPausedPeriodUntil": null,
  "InPausedPeriodUntilUtc": null,
  "CurrentPeriodStart": "2025-10-01",
  "CurrentPeriodStartUtc": "2025-10-01T00:00:00Z",
  "InProratePeriod": false,
  "RenewalDate": "2025-11-01",
  "PauseCyclesLimit": null,
  "PauseYearlyLimit": 3,
  "PausedPeriodsCount": 0,
  "ProrateDaysBefore": 5,
  "PauseUntilOptions": ["2025-11-01", "2025-12-01", "2026-01-01"],
  "TermsAndConditions": "<p>By pausing your plan you agree to...</p>"
}

Usage in Portal

Fetched at the start of the pause flow to determine UI state and options presented to the customer.
  • File: src/views/user/plans/useContractPauseMeta.ts
  • Used by: src/views/user/plans/components/PauseContractModal.tsx

Typical integration pattern

// From src/api/endpoints.ts
// endpoints.billing.contracts.pauseMmeta = (contractId: number) => ({
//   url: `/api/public/billing/coworkerContracts/${contractId}/pause/meta`,
//   type: null as unknown as PauseContractMeta,
// })

// Usage in React
const endpoint = endpoints.billing.contracts.pauseMmeta(contractId)
const { resource: pauseMeta } = useData<typeof endpoint.type>(httpClient, endpoint.url)
  • GET /api/public/billing/coworkerContracts/{contractId} – Get full contract details
  • PUT /api/public/billing/coworkerContracts/v2/{contractId}/pause – Submit a pause request
  • GET /api/public/billing/coworkerContracts/pause/bookings – Check bookings affected by the pause period

Error Responses

401 Unauthorized
error
The current user is not authenticated or does not have access to this contract.
404 Not Found
error
Contract with the specified ID does not exist.