> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Contract Details

# 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

<ParamField path="contractId" type="number" required>
  The unique identifier of the contract to retrieve.
</ParamField>

## Query Parameters

<ParamField query="_shape" type="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`.
</ParamField>

## Response

Returns a `CoworkerContract` object.

### Plan & Pricing

<ResponseField name="TariffId" type="number">
  ID of the plan associated with this contract.
</ResponseField>

<ResponseField name="TariffName" type="string">
  Display name of the plan.
</ResponseField>

<ResponseField name="Price" type="number">
  Current monthly (or per-cycle) price.
</ResponseField>

<ResponseField name="PriceFormatted" type="string">
  Pre-formatted price string (e.g. `"$199.00"`).
</ResponseField>

<ResponseField name="NextPrice" type="number">
  Price that will be charged from the next renewal.
</ResponseField>

<ResponseField name="NextPriceFormatted" type="string">
  Pre-formatted next renewal price.
</ResponseField>

<ResponseField name="CurrencyCode" type="string">
  ISO 4217 currency code.
</ResponseField>

<ResponseField name="Quantity" type="number">
  Number of units (e.g., desks) covered by this contract.
</ResponseField>

### Dates & Billing

<ResponseField name="StartDate" type="string">
  ISO 8601 date the contract started.
</ResponseField>

<ResponseField name="RenewalDate" type="string">
  ISO 8601 date of the next billing renewal.
</ResponseField>

<ResponseField name="RenewalDateUtc" type="string">
  UTC version of the renewal date.
</ResponseField>

<ResponseField name="BillingDay" type="number">
  Day of the month on which the contract is billed.
</ResponseField>

<ResponseField name="EarliestCancellationDate" type="string">
  The earliest date the contract can be cancelled without penalty.
</ResponseField>

<ResponseField name="CancellationDate" type="string">
  ISO 8601 date when the contract was cancelled (if applicable).
</ResponseField>

<ResponseField name="AbsoluteCancellationDate" type="string">
  The absolute final date the contract will end (if applicable).
</ResponseField>

### Status Flags

<ResponseField name="Active" type="boolean">
  Whether the contract is currently active.
</ResponseField>

<ResponseField name="Cancelled" type="boolean">
  Whether the contract has been cancelled.
</ResponseField>

<ResponseField name="MainContract" type="boolean">
  Whether this is the customer's primary contract.
</ResponseField>

<ResponseField name="IsPaused" type="boolean">
  Whether the contract is in a paused state.
</ResponseField>

<ResponseField name="IsPausedNow" type="boolean">
  Whether the contract is actively paused at the current moment.
</ResponseField>

<ResponseField name="CanBePausedNow" type="boolean">
  Whether the contract is eligible to be paused right now.
</ResponseField>

<ResponseField name="InPausedPeriod" type="boolean">
  Whether the current date falls within a scheduled pause period.
</ResponseField>

<ResponseField name="InPausedPeriodFromUtc" type="string">
  UTC datetime from which the pause period begins.
</ResponseField>

<ResponseField name="InPausedPeriodUntilUtc" type="string">
  UTC datetime at which the pause period ends.
</ResponseField>

### Terms & Deposits

<ResponseField name="PricePlanTermsAccepted" type="boolean">
  Whether the customer has accepted the plan's terms and conditions.
</ResponseField>

<ResponseField name="PricePlanTermsAcceptedOn" type="string">
  ISO 8601 datetime when terms were accepted.
</ResponseField>

<ResponseField name="DepositsAmount" type="number">
  Total deposit amount held against this contract.
</ResponseField>

<ResponseField name="DepositsAmountFormatted" type="string">
  Pre-formatted deposit amount string.
</ResponseField>

### System Fields

<ResponseField name="Id" type="number">
  Unique identifier of the contract.
</ResponseField>

<ResponseField name="UniqueId" type="string">
  Globally unique identifier of the contract.
</ResponseField>

<ResponseField name="CreatedOn" type="string">
  ISO 8601 datetime when the contract was created (local time).
</ResponseField>

<ResponseField name="UpdatedOn" type="string">
  ISO 8601 datetime when the contract was last updated (local time).
</ResponseField>

## Example Response

```json theme={null}
{
  "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

```ts theme={null}
// 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)
```

## Related Endpoints

* `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

<ResponseField name="401 Unauthorized" type="error">
  The current user is not authenticated or the contract is not accessible to them.
</ResponseField>

<ResponseField name="404 Not Found" type="error">
  Contract with the specified ID does not exist.
</ResponseField>
