Skip to main content
GET
/
api
/
billing
/
coworkerdiscountcodes
/
{id}
Get one CoworkerDiscountCode
curl --request GET \
  --url https://spaces.nexudus.com/api/billing/coworkerdiscountcodes/{id} \
  --header 'Authorization: Basic <encoded-value>'
{
  "CoworkerId": 123,
  "CoworkerCoworkerType": "<string>",
  "CoworkerFullName": "<string>",
  "CoworkerBillingName": "<string>",
  "CoworkerCompanyName": "<string>",
  "BusinessId": 123,
  "BusinessName": "<string>",
  "DiscountCodeId": 123,
  "DiscountCodeCode": "<string>",
  "DiscountCodeActive": true,
  "DiscountCodeValidFrom": "<string>",
  "DiscountCodeValidTo": "<string>",
  "Notes": "<string>",
  "TimesUsed": 123,
  "ValidFrom": "<string>",
  "ExpiresOn": "<string>",
  "RefererGuid": "<string>",
  "BookingUniqueId": "<string>",
  "Id": 123,
  "UniqueId": "<string>",
  "CreatedOn": "<string>",
  "UpdatedOn": "<string>",
  "UpdatedBy": "<string>",
  "IsNew": true,
  "SystemId": "<string>"
}
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

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.

Path Parameters

id
integer
required
The Id of the CoworkerDiscountCode record to retrieve.

Code Examples

curl -X GET \
  "https://spaces.nexudus.com/api/billing/coworkerdiscountcodes/87654321" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

200

CoworkerId
integer
ID of the customer this discount code is assigned to.
CoworkerCoworkerType
string
Whether the customer is an individual or a company.
CoworkerFullName
string
Full name of the customer this discount code is assigned to.
CoworkerBillingName
string
Billing name of the customer.
CoworkerCompanyName
string
Company name of the customer.
BusinessId
integer
ID of the location this assignment belongs to.
BusinessName
string
Name of the location this assignment belongs to.
DiscountCodeId
integer
ID of the discount code assigned to this customer.
DiscountCodeCode
string
The alphanumeric code customers enter to apply the discount.
DiscountCodeActive
boolean
Whether the discount code is currently active and can be redeemed.
DiscountCodeValidFrom
string
Start date from which the discount code itself can be redeemed (set on the discount code).
DiscountCodeValidTo
string
End date after which the discount code itself can no longer be redeemed (set on the discount code).
Notes
string
Optional notes about this discount code assignment.
TimesUsed
integer
Number of times this customer has redeemed the discount code.
ValidFrom
string
Customer-specific date from which this discount code assignment becomes valid.
ExpiresOn
string
Customer-specific date after which this discount code assignment expires.
RefererGuid
string
Unique identifier of the customer who referred this customer, when the discount is part of the referral programme.
BookingUniqueId
string
Unique identifier of the booking to which this discount code was applied.
Id
integer
Unique record identifier.
UniqueId
string
UUID of the record.
CreatedOn
string
Date and time the record was created (ISO 8601).
UpdatedOn
string
Date and time the record was last updated (ISO 8601).
UpdatedBy
string
Email of the user who last updated this record.
IsNew
boolean
Whether the record was recently created.
SystemId
string
External system identifier.
Example Response
{
  "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
}