Skip to main content
GET
/
api
/
public
/
billing
/
coworkerContracts
/
{contractId}
{
  "TariffId": 123,
  "TariffName": "<string>",
  "Price": 123,
  "PriceFormatted": "<string>",
  "NextPrice": 123,
  "NextPriceFormatted": "<string>",
  "CurrencyCode": "<string>",
  "Quantity": 123,
  "StartDate": "<string>",
  "RenewalDate": "<string>",
  "RenewalDateUtc": "<string>",
  "BillingDay": 123,
  "EarliestCancellationDate": "<string>",
  "CancellationDate": "<string>",
  "AbsoluteCancellationDate": "<string>",
  "Active": true,
  "Cancelled": true,
  "MainContract": true,
  "IsPaused": true,
  "IsPausedNow": true,
  "CanBePausedNow": true,
  "InPausedPeriod": true,
  "InPausedPeriodFromUtc": "<string>",
  "InPausedPeriodUntilUtc": "<string>",
  "PricePlanTermsAccepted": true,
  "PricePlanTermsAcceptedOn": "<string>",
  "DepositsAmount": 123,
  "DepositsAmountFormatted": "<string>",
  "Id": 123,
  "UniqueId": "<string>",
  "CreatedOn": "<string>",
  "UpdatedOn": "<string>",
  "401 Unauthorized": {},
  "404 Not Found": {}
}

Get Contract Details

Retrieves a single plan contract for the currently authenticated customer. Contracts represent the customer’s active plan subscription, including pricing, billing cycle, renewal dates, and pause/cancellation state.

Authentication

This endpoint requires an authenticated customer session. The contract must belong to the current customer or to a team the customer manages.

Path Parameters

contractId
number
required
The unique identifier of the contract to retrieve.

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=Tariff.Name,Price,PriceFormatted,Active,StartDate,RenewalDate.

Response

Returns a CoworkerContract object.

Plan & Pricing

TariffId
number
ID of the plan associated with this contract.
TariffName
string
Display name of the plan.
Price
number
Current monthly (or per-cycle) price.
PriceFormatted
string
Pre-formatted price string (e.g. "$199.00").
NextPrice
number
Price that will be charged from the next renewal.
NextPriceFormatted
string
Pre-formatted next renewal price.
CurrencyCode
string
ISO 4217 currency code.
Quantity
number
Number of units (e.g., desks) covered by this contract.

Dates & Billing

StartDate
string
ISO 8601 date the contract started.
RenewalDate
string
ISO 8601 date of the next billing renewal.
RenewalDateUtc
string
UTC version of the renewal date.
BillingDay
number
Day of the month on which the contract is billed.
EarliestCancellationDate
string
The earliest date the contract can be cancelled without penalty.
CancellationDate
string
ISO 8601 date when the contract was cancelled (if applicable).
AbsoluteCancellationDate
string
The absolute final date the contract will end (if applicable).

Status Flags

Active
boolean
Whether the contract is currently active.
Cancelled
boolean
Whether the contract has been cancelled.
MainContract
boolean
Whether this is the customer’s primary contract.
IsPaused
boolean
Whether the contract is in a paused state.
IsPausedNow
boolean
Whether the contract is actively paused at the current moment.
CanBePausedNow
boolean
Whether the contract is eligible to be paused right now.
InPausedPeriod
boolean
Whether the current date falls within a scheduled pause period.
InPausedPeriodFromUtc
string
UTC datetime from which the pause period begins.
InPausedPeriodUntilUtc
string
UTC datetime at which the pause period ends.

Terms & Deposits

PricePlanTermsAccepted
boolean
Whether the customer has accepted the plan’s terms and conditions.
PricePlanTermsAcceptedOn
string
ISO 8601 datetime when terms were accepted.
DepositsAmount
number
Total deposit amount held against this contract.
DepositsAmountFormatted
string
Pre-formatted deposit amount string.

System Fields

Id
number
Unique identifier of the contract.
UniqueId
string
Globally unique identifier of the contract.
CreatedOn
string
ISO 8601 datetime when the contract was created (local time).
UpdatedOn
string
ISO 8601 datetime when the contract was last updated (local time).

Example Response

{
  "Id": 5001,
  "UniqueId": "c7d8e9f0-1234-5678-abcd-ef0987654321",
  "TariffId": 12,
  "TariffName": "Hot Desk Monthly",
  "Price": 199.0,
  "PriceFormatted": "$199.00",
  "NextPrice": 199.0,
  "NextPriceFormatted": "$199.00",
  "CurrencyCode": "USD",
  "Quantity": 1,
  "StartDate": "2025-01-01",
  "RenewalDate": "2025-11-01",
  "BillingDay": 1,
  "EarliestCancellationDate": "2025-12-01",
  "Active": true,
  "Cancelled": false,
  "MainContract": true,
  "IsPaused": false,
  "IsPausedNow": false,
  "CanBePausedNow": true,
  "PricePlanTermsAccepted": true,
  "DepositsAmount": 0,
  "CreatedOn": "2025-01-01T09:00:00",
  "UpdatedOn": "2025-09-15T14:30:00"
}

Usage in Portal

This endpoint is used in the My Plans section to display full contract details.
  • File: src/views/user/plans/useContractData.ts

Typical integration pattern

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

// Usage in React
const endpoint = useMemo(() => endpoints.billing.contracts.one(contractId), [contractId])
const { resource: contract } = useData<typeof endpoint.type>(httpClient, endpoint.url)
  • GET /api/public/billing/coworkerContracts/{contractId}/pause/meta – Get pause eligibility metadata
  • PUT /api/public/billing/coworkerContracts/v2/{contractId}/pause – Pause a contract
  • PUT /api/public/billing/coworkerContracts/v2/{contractId}/resume – Resume a paused contract

Error Responses

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