DiscountCodes
Update DiscountCode
Update an existing DiscountCode record.
PUT
Update DiscountCode
Updates an existing DiscountCode record. You must include theDocumentation Index
Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt
Use this file to discover all available pages before exploring further.
Id of the record to update along with all required fields.
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 DiscountCode-Edit role.Enums
eDiscountExpirePeriod
eDiscountExpirePeriod
| Value | Name |
|---|---|
| 1 | Day |
| 2 | Week |
| 3 | Month |
| 4 | Year |
Request Body
Required Fields
The Id of the DiscountCode record to update.
ID of the business linked to this record.
The unique alphanumeric code customers enter to apply the discount.
Human-readable description of what this discount code is for.
Optional Fields
Whether this discount code is currently active and can be redeemed.
Date from which this discount code is visible/published to customers.
Date until which this discount code is visible/published to customers.
Percentage discount to apply (e.g. 10 for 10% off). Mutually exclusive with DiscountAmount.
Fixed monetary amount to discount. Mutually exclusive with DiscountPercentage.
Whether this discount code is used as part of the referral program.
Whether this discount can be applied to price plans (tariffs). When true, use Tariffs to restrict to specific plans.
List of tariffs linked to this record.
The added tariffs value for this discount code.
The removed tariffs value for this discount code.
Whether this discount can be applied to resource bookings. When true, use ResourceTypes to restrict to specific resource types.
List of resource types linked to this record.
The added resource types value for this discount code.
The removed resource types value for this discount code.
Whether this discount can be applied to products. When true, use Products to restrict to specific products.
List of products linked to this record.
The added products value for this discount code.
The removed products value for this discount code.
Whether this discount can be applied to events. When true, use EventCategories to restrict to specific event categories.
List of event categories linked to this record.
The added event categories value for this discount code.
The removed event categories value for this discount code.
Maximum number of times a single customer can redeem this discount code.
Maximum total number of times this discount code can be redeemed across all customers.
When true, only contacts (non-member customers) can use this discount code.
When true, only members (customers with an active plan) can use this discount code.
Start date from which this discount code can be redeemed.
End date after which this discount code can no longer be redeemed.
Unit of the expiration period (Day, Week, Month, Year). Used with ExpiresIn to determine when the discount expires after being assigned to a customer. See
eDiscountExpirePeriod? enum above.Number of ExpirationType periods after assignment until the discount expires for a customer.
Code Examples
Response
200
HTTP status code.
200 on success.A human-readable message confirming the update.
Contains the
Id of the updated record.true if the discountcode was updated successfully.null on success.Example Response
400
A summary of the validation error(s), in the format
PropertyName: error message.null on validation failure.Array of validation errors.
false when the request fails validation.Example Response
Update DiscountCode