PUT /api/Hotels/{id}

Sample request:

PUT /hotels/{hotelId} { "name": "Hotel Budapest", "owner": "Hungarian Hotels Ltd.", "street": "King lu, 19 st." "latitude": "15.9", "longitude": "20.5", "starRate" : "4" "cityId": "{cityId}" }

Path parameters

  • id string(uuid) Required

    The id of the hotel to update

Body

The data for the uploaded hotel

  • cityId string(uuid)

    Id of the city where the hotel is located

  • name string | null

    Name of the hotel

  • owner string | null

    Owner of the hotel

  • street string | null

    Location of the hotel

  • latitude number(double)

    Latitude for the hotel

  • longitude number(double)

    Longitude for the hotel

  • Additional properties are NOT allowed

Body

The data for the uploaded hotel

  • cityId string(uuid)

    Id of the city where the hotel is located

  • name string | null

    Name of the hotel

  • owner string | null

    Owner of the hotel

  • street string | null

    Location of the hotel

  • latitude number(double)

    Latitude for the hotel

  • longitude number(double)

    Longitude for the hotel

  • Additional properties are NOT allowed

Body

The data for the uploaded hotel

  • cityId string(uuid)

    Id of the city where the hotel is located

  • name string | null

    Name of the hotel

  • owner string | null

    Owner of the hotel

  • street string | null

    Location of the hotel

  • latitude number(double)

    Latitude for the hotel

  • longitude number(double)

    Longitude for the hotel

  • Additional properties are NOT allowed

Responses

  • 200

    Success

  • 204

    If the hotel is successfully uploaded

  • 400

    If the request data is invalid

  • 401

    If the user is not authenticated

  • 403

    If the user is not authorized (not an admin)

  • 404

    If the hotel is not found

PUT /api/Hotels/{id}
curl \
 -X PUT http://api.example.com/api/Hotels/{id} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"cityId":"string","name":"string","owner":"string","street":"string","latitude":42.0,"longitude":42.0}'
curl \
 -X PUT http://api.example.com/api/Hotels/{id} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: text/json"
curl \
 -X PUT http://api.example.com/api/Hotels/{id} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/*+json"
Request example
{
  "cityId": "string",
  "name": "string",
  "owner": "string",
  "street": "string",
  "latitude": 42.0,
  "longitude": 42.0
}
Request examples
{
  "cityId": "string",
  "name": "string",
  "owner": "string",
  "street": "string",
  "latitude": 42.0,
  "longitude": 42.0
}
Request examples
{
  "cityId": "string",
  "name": "string",
  "owner": "string",
  "street": "string",
  "latitude": 42.0,
  "longitude": 42.0
}