GET /api/rooms/{roomId}/discounts/{id}

Path parameters

  • roomId string(uuid) Required

    The id of the room

  • id string(uuid) Required

    The id of the discount

Responses

  • Returns the discount with the given id

    Hide response attributes Show response attributes 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
    Hide response attributes Show response attributes 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
    Hide response attributes Show response attributes 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
  • 404

    If the discount is not found

GET /api/rooms/{roomId}/discounts/{id}
curl \
 -X GET http://api.example.com/api/rooms/{roomId}/discounts/{id} \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "id": "string",
  "roomId": "string",
  "percentage": 42.0,
  "originalPrice": 42.0,
  "discountedPrice": 42.0,
  "startDate": "2024-05-04T09:42:00+00:00",
  "endDate": "2024-05-04T09:42:00+00:00"
}
Response examples (200)
{
  "id": "string",
  "roomId": "string",
  "percentage": 42.0,
  "originalPrice": 42.0,
  "discountedPrice": 42.0,
  "startDate": "2025-05-04T09:42:00Z",
  "endDate": "2025-05-04T09:42:00Z"
}