Create or update a single discount for an apartment
POST/v2/discount
Operation ID: upsertDiscount
Creates a discount when the body has no id, otherwise replaces the discount with that id (404 if it does not exist). Each call without id creates another discount, so keep the returned id instead of posting the same discount again (ids are 64-bit integers of about 18 digits: do not parse them as doubles, for example as JavaScript numbers). There is no DELETE: set status to DELETED, or to INACTIVE to pause the discount. If several discounts apply to a booking, only the one giving the highest discount is used.
Request
Responses
- 200
- 400
- 401
- 404
- 500
Discount created or updated
Bad Request
Authentication error
Apartment does not exist
Internal server error