> ## 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 ProductBookingCredit

> Retrieve a single ProductBookingCredit record by its Id.

A **ProductBookingCredit** represents an amount of credit linked to a `Product`. When a customer purchases the product, the credit is automatically released as a `CoworkerBookingCredit` on the customer's account.

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 `ExpirationType` and `ExpiresIn` to control when the released credit expires.

## 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 **`ProductBookingCredit-Read`** role.
</Note>

## Path Parameters

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

## Code Examples

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

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/billing/productbookingcredits/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/productbookingcredits/87654321',
      headers={
          'Authorization': 'Bearer YOUR_TOKEN'
      }
  )

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

## Response

### 200

<ResponseField name="Name" type="string">
  Credit name.
</ResponseField>

<ResponseField name="ProductId" type="integer">
  Product Id.
</ResponseField>

<ResponseField name="ProductName" type="string">
  Product name.
</ResponseField>

<ResponseField name="ProductBusinessCurrencyCode" type="string">
  Product business currency code.
</ResponseField>

<ResponseField name="ElegibleResourceTypes" type="integer[]">
  Elegible Resource Types.
</ResponseField>

<ResponseField name="ElegibleProducts" type="integer[]">
  Elegible Products.
</ResponseField>

<ResponseField name="ElegibleTariffs" type="integer[]">
  Elegible Tariffs.
</ResponseField>

<ResponseField name="Credit" type="number">
  Credit amount.
</ResponseField>

<ResponseField name="ExpireTimeInMonths" type="integer">
  Expire Time In Months.
</ResponseField>

<ResponseField name="ExpireTimeInWeeks" type="integer">
  Expire Time In Weeks.
</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.
</ResponseField>

<ResponseField name="ExpirationType" type="integer">
  Expiration type.
</ResponseField>

<ResponseField name="ExpiresIn" type="integer">
  Number of periods (of `ExpirationType`) until the released credit expires.
</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="ElegiblePasses" type="integer[]">
  Elegible 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}
{
  "Name": "",
  "ProductId": 0,
  "ProductName": null,
  "ProductBusinessCurrencyCode": null,
  "ElegibleResourceTypes": [],
  "ElegibleProducts": [],
  "ElegibleTariffs": [],
  "Credit": 0,
  "ExpireTimeInMonths": null,
  "ExpireTimeInWeeks": null,
  "CaneBeUsedForBookings": false,
  "CaneBeUsedForEvents": false,
  "EventCategories": [],
  "ExpirationType": 0,
  "ExpiresIn": null,
  "IsUniversalCredit": false,
  "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": "ProductBookingCredit Example",
  "LocalizationDetails": null,
  "CustomFields": null
}
```
