CoworkerDiscountCodes
Update CoworkerDiscountCode
Update an existing CoworkerDiscountCode record.
PUT
Update CoworkerDiscountCode
Updates an existing CoworkerDiscountCode record. You must include the
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 CoworkerDiscountCode-Edit role.Request Body
Required Fields
ID of the customer who holds this discount and receives the reduced price. On a referral assignment this is the customer who made the referral, not the person who was referred.
ID of the location that issued this discount to the customer. When the customer claims a code themselves this is taken from the code’s own location, or from the booking’s location for a booking-specific claim.
ID of the discount code offer granted to the customer. Every rule on that offer still applies on top of this assignment, including its active flag, validity window, usage caps, audience and which kinds of purchase it pays for.
Optional Fields
Free-text internal note about why the customer has this discount. Filled in automatically for a referral assignment to record who the customer referred.
UTC date and time from which this customer may use the discount, on top of the offer’s own validity window; the more restrictive of the two applies. Leave empty for no customer-specific start. The server rejects a value later than ExpiresOn.
UTC date and time after which this customer may no longer use the discount, on top of the offer’s own validity window; the more restrictive of the two applies. Calculated from the offer’s ExpirationType and ExpiresIn when the customer claims a code themselves, but not when an operator assigns one directly, so set it explicitly if the discount should lapse. Leave empty for no customer-specific end.
System-managed unique identifier of the customer who was referred, meaning the person who signed up with the code, while the holder of this assignment is the one being rewarded. Set by the referral sign-up flow; a referral discount stops applying once the referred customer is no longer active. Do not set this by hand to simulate a referral.
System-managed unique identifier of the booking this discount is reserved for. When empty the discount can be used for any eligible purchase; when set it only applies to that one booking. Populated by the booking flow when a customer enters a code against a booking.
Code Examples
Response
200
Example Response
400
Example Response