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

> Retrieve a single CoworkerDiscountCode record by its Id.

A **CoworkerDiscountCode** assigns a `DiscountCode` to a specific customer, allowing the system to track per-customer redemption history and enforce individual validity windows.

Use `ValidFrom` and `ExpiresOn` to set customer-specific validity dates. These are distinct from the discount code's own `ValidFrom`/`ValidTo` and `ExpirationType`/`ExpiresIn` fields — the system enforces whichever constraint is more restrictive.

When the discount is part of the referral programme, `RefererGuid` identifies the referring customer. `BookingUniqueId` links the assignment to the specific booking where the code was originally applied.

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

## Path Parameters

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

## Code Examples

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

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

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

## Response

### 200

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

<ResponseField name="CoworkerCoworkerType" type="string">
  Whether the customer is an individual or a company.
</ResponseField>

<ResponseField name="CoworkerFullName" type="string">
  Full name of the customer this discount code is assigned to.
</ResponseField>

<ResponseField name="CoworkerBillingName" type="string">
  Billing name of the customer.
</ResponseField>

<ResponseField name="CoworkerCompanyName" type="string">
  Company name of the customer.
</ResponseField>

<ResponseField name="BusinessId" type="integer">
  ID of the location this assignment belongs to.
</ResponseField>

<ResponseField name="BusinessName" type="string">
  Name of the location this assignment belongs to.
</ResponseField>

<ResponseField name="DiscountCodeId" type="integer">
  ID of the discount code assigned to this customer.
</ResponseField>

<ResponseField name="DiscountCodeCode" type="string">
  The alphanumeric code customers enter to apply the discount.
</ResponseField>

<ResponseField name="DiscountCodeActive" type="boolean">
  Whether the discount code is currently active and can be redeemed.
</ResponseField>

<ResponseField name="DiscountCodeValidFrom" type="string">
  Start date from which the discount code itself can be redeemed (set on the discount code).
</ResponseField>

<ResponseField name="DiscountCodeValidTo" type="string">
  End date after which the discount code itself can no longer be redeemed (set on the discount code).
</ResponseField>

<ResponseField name="Notes" type="string">
  Optional notes about this discount code assignment.
</ResponseField>

<ResponseField name="TimesUsed" type="integer">
  Number of times this customer has redeemed the discount code.
</ResponseField>

<ResponseField name="ValidFrom" type="string">
  Customer-specific date from which this discount code assignment becomes valid.
</ResponseField>

<ResponseField name="ExpiresOn" type="string">
  Customer-specific date after which this discount code assignment expires.
</ResponseField>

<ResponseField name="RefererGuid" type="string">
  Unique identifier of the customer who referred this customer, when the discount is part of the referral programme.
</ResponseField>

<ResponseField name="BookingUniqueId" type="string">
  Unique identifier of the booking to which this discount code was applied.
</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,
  "CoworkerCoworkerType": null,
  "CoworkerFullName": null,
  "CoworkerBillingName": null,
  "CoworkerCompanyName": null,
  "BusinessId": 0,
  "BusinessName": null,
  "DiscountCodeId": 0,
  "DiscountCodeCode": null,
  "DiscountCodeActive": null,
  "DiscountCodeValidFrom": null,
  "DiscountCodeValidTo": null,
  "Notes": null,
  "TimesUsed": 0,
  "ValidFrom": null,
  "ExpiresOn": null,
  "RefererGuid": null,
  "BookingUniqueId": null,
  "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": "CoworkerDiscountCode Example",
  "LocalizationDetails": null,
  "CustomFields": null
}
```
