> ## 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 one CoworkerBookingCredit

> Retrieve a single CoworkerBookingCredit record by its Id.

A **CoworkerBookingCredit** is an amount of monetary credit assigned to a customer. Credits are typically created automatically when a customer's contract on a plan that includes a `TariffBookingCredit` renews, but can also be created manually.

Credit can be configured for two primary uses:

* **Bookings** — set `CaneBeUsedForBookings` to allow the credit to pay for bookings. Use `ElegibleResourceTypes` to restrict the credit to specific resource types; if left empty the credit is valid for all resource types.
* **Events** — set `CaneBeUsedForEvents` to allow the credit to pay for event sign-ups. Use `EventCategories` to restrict to specific event categories; if left empty the credit is valid for all events.

Setting `IsUniversalCredit` enables the credit for products, time passes, and other charges. Use `ElegibleProducts`, `ElegiblePasses`, and `AppliesToCharges` to restrict which products or passes the credit is valid for. If all restriction lists are empty the universal credit applies to all products, passes and charges.

Use `ValidFrom` and `ExpireDate` to control the validity window of the credit.

## Authentication

<Note>
  This endpoint requires OAuth2 authentication. Include a valid bearer token in the `Authorization` header.
  The authenticated user must be a full unrestricted administrator or have the **`CoworkerBookingCredit-Read`** role.
</Note>

## Path Parameters

<ParamField path="id" type="integer" required>
  The Id of the CoworkerBookingCredit record to retrieve.
</ParamField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET \
    "https://spaces.nexudus.com/api/billing/coworkerbookingcredits/87654321" \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/billing/coworkerbookingcredits/87654321',
    {
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN'
      }
    }
  );

  const record = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://spaces.nexudus.com/api/billing/coworkerbookingcredits/87654321',
      headers={
          'Authorization': 'Bearer YOUR_TOKEN'
      }
  )

  record = response.json()
  ```
</CodeGroup>

## Response

### 200

<ResponseField name="CoworkerId" type="integer">
  ID of the customer this credit is assigned to.
</ResponseField>

<ResponseField name="BusinessId" type="integer">
  ID of the location issuing the credit.
</ResponseField>

<ResponseField name="BusinessName" type="string">
  Location name.
</ResponseField>

<ResponseField name="BusinessCurrencyCode" type="string">
  Currency code of the location.
</ResponseField>

<ResponseField name="Description" type="string">
  Optional description or label for this credit.
</ResponseField>

<ResponseField name="TariffBookingCreditId" type="integer">
  ID of the plan credit template (TariffBookingCredit) that originated this credit, if any.
</ResponseField>

<ResponseField name="TariffBookingCreditName" type="string">
  Name of the plan credit template that originated this credit.
</ResponseField>

<ResponseField name="ElegibleResourceTypes" type="integer[]">
  Resource types this credit can be used for. If empty, the credit is valid for all resource types.
</ResponseField>

<ResponseField name="ElegibleProducts" type="integer[]">
  Products this credit can be used for. If empty, applies to all products.
</ResponseField>

<ResponseField name="ElegibleTariffs" type="integer[]">
  Plans (tariffs) this credit is restricted to. If empty, applies to customers on any plan.
</ResponseField>

<ResponseField name="RemainingCredit" type="number">
  Remaining credit balance.
</ResponseField>

<ResponseField name="TotalCredit" type="number">
  Total credit amount originally assigned.
</ResponseField>

<ResponseField name="ValidFrom" type="string">
  Date from which this credit is valid.
</ResponseField>

<ResponseField name="ExpireDate" type="string">
  Date on which this credit expires.
</ResponseField>

<ResponseField name="CaneBeUsedForBookings" type="boolean">
  Whether this credit can be used to pay for bookings. Restrict to specific resource types with `ElegibleResourceTypes`.
</ResponseField>

<ResponseField name="CaneBeUsedForEvents" type="boolean">
  Whether this credit can be used to pay for event sign-ups. Restrict to specific categories with `EventCategories`.
</ResponseField>

<ResponseField name="EventCategories" type="integer[]">
  Event categories this credit can be used for. If empty, applies to all event categories.
</ResponseField>

<ResponseField name="IsUniversalCredit" type="boolean">
  Whether this is a universal credit applicable to products, time passes and other charges. Restrict with `ElegibleProducts`, `ElegiblePasses` and `AppliesToCharges`; if all are empty the credit applies to all products, passes and charges.
</ResponseField>

<ResponseField name="CoworkerProductUniqueId" type="string">
  Unique ID of the product purchase that created this credit.
</ResponseField>

<ResponseField name="UseCreditPrice" type="boolean">
  Whether to use the credit price instead of the standard booking price when this credit is applied.
</ResponseField>

<ResponseField name="CoworkerContractUniqueId" type="string">
  Unique ID of the contract that originated this credit.
</ResponseField>

<ResponseField name="ElegiblePasses" type="integer[]">
  Time passes this credit can be used for. If empty, applies to all passes.
</ResponseField>

<ResponseField name="AppliesToCharges" type="boolean">
  Whether this universal credit applies to other charges.
</ResponseField>

<ResponseField name="Id" type="integer">
  Unique record identifier.
</ResponseField>

<ResponseField name="UniqueId" type="string">
  UUID of the record.
</ResponseField>

<ResponseField name="CreatedOn" type="string">
  Date and time the record was created (ISO 8601).
</ResponseField>

<ResponseField name="UpdatedOn" type="string">
  Date and time the record was last updated (ISO 8601).
</ResponseField>

<ResponseField name="UpdatedBy" type="string">
  Email of the user who last updated this record.
</ResponseField>

<ResponseField name="IsNew" type="boolean">
  Whether the record was recently created.
</ResponseField>

<ResponseField name="SystemId" type="string">
  External system identifier.
</ResponseField>

```json Example Response theme={null}
{
  "CoworkerId": 0,
  "BusinessId": 0,
  "BusinessName": null,
  "BusinessCurrencyCode": null,
  "Description": null,
  "TariffBookingCreditId": null,
  "TariffBookingCreditName": null,
  "ElegibleResourceTypes": [],
  "ElegibleProducts": [],
  "ElegibleTariffs": [],
  "RemainingCredit": 0,
  "TotalCredit": 0,
  "ValidFrom": null,
  "ExpireDate": null,
  "CaneBeUsedForBookings": false,
  "CaneBeUsedForEvents": false,
  "EventCategories": [],
  "IsUniversalCredit": false,
  "CoworkerProductUniqueId": null,
  "UseCreditPrice": false,
  "CoworkerContractUniqueId": null,
  "ElegiblePasses": [],
  "AppliesToCharges": false,
  "Id": 87654321,
  "UpdatedOn": "2025-01-15T10:30:00Z",
  "CreatedOn": "2025-01-10T08:00:00Z",
  "UniqueId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "UpdatedBy": "admin@example.com",
  "IsNew": false,
  "SystemId": null,
  "ToStringText": "CoworkerBookingCredit Example",
  "LocalizationDetails": null,
  "CustomFields": null
}
```
