# Create a new discount **POST /api/rooms/{roomId}/discounts** Sample request: POST /rooms/{roomId}/discounts { "Percentage": 20 "StartDate": "2024-02-0200:00:00", "EndDate": "2024-03-03T00:00:00" } ## Servers - http://api.example.com: http://api.example.com () ## Parameters ### Path parameters - **roomId** (string(uuid)) The id of the room ### Body: application/json (object) The data for the new discount - **percentage** (number(double) | null) Percentage of the discount for the room - **discountedPrice** (number(double) | null) Discounted price for the room - **startDate** (string(date-time)) Discount start date in UTC - **endDate** (string(date-time)) Discount end date in UTC - **Additional properties are NOT allowed** () ## Responses ### 200 Success #### Body: application/json (object) - **id** (string(uuid)) - **roomId** (string(uuid)) - **percentage** (number(double)) - **originalPrice** (number(double)) - **discountedPrice** (number(double)) - **startDate** (string(date-time)) - **endDate** (string(date-time)) - **Additional properties are NOT allowed** () ### 201 Returns the newly created discount ### 400 If the request data is invalid ### 401 User is not authenticated. ### 403 User is not authorized (not an admin). [Powered by Bump.sh](https://bump.sh)