API: Update A Hotel
Merges the fields you send into one item.
A Travelyfe access token.
In: header
Path Parameters
The itinerary id (UUID).
uuidThe hotel id.
Header Parameters
The ETag you last read. A write with an out-of-date ETag is refused with itineraryModified.
Send clean on every request that reads or writes an itinerary. It is the shape this reference documents.
Value in
- "clean"
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/v1/itineraries/497f6eca-6276-4993-bfeb-53cbbbba6f08/hotels/string" \ -H "If-Match: "v42"" \ -H "Content-Type: application/json" \ -d '{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "place": {} }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "title": "string", "summary": "string", "destination": { "name": "string", "address": "string", "coordinate": { "latitude": -90, "longitude": -180 }, "placeId": "string", "countryCode": "string", "timeZone": "string", "code": "string" }, "origin": { "name": "string", "address": "string", "coordinate": { "latitude": -90, "longitude": -180 }, "placeId": "string", "countryCode": "string", "timeZone": "string", "code": "string" }, "startDate": "2019-08-24", "travellers": 1, "tags": [ "string" ], "coverImage": { "url": "http://example.com", "source": "string" }, "currency": "string", "days": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "image": { "url": "http://example.com", "source": "string" }, "stops": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "category": "beach", "place": { "name": "string", "address": "string", "coordinate": { "latitude": -90, "longitude": -180 }, "placeId": "string", "countryCode": "string", "timeZone": "string", "code": "string" }, "startTime": "string", "startTimeSuggested": true, "durationMinutes": 1, "phoneNumber": "string", "activity": { "provider": "string", "productCode": "string", "rating": 0, "reviewCount": 0, "bookingUrl": "http://example.com", "lastCheckedAt": "2019-08-24T14:15:22Z" } } ], "legs": [ { "from": "string", "mode": "walk", "minutes": 0, "metres": 0, "source": "string", "to": "string" } ] } ], "flights": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "flightAirline": { "code": "string", "name": "string" }, "flightNumber": "string", "departureAirport": { "name": "string", "address": "string", "coordinate": { "latitude": -90, "longitude": -180 }, "placeId": "string", "countryCode": "string", "timeZone": "string", "code": "string" }, "arrivalAirport": { "name": "string", "address": "string", "coordinate": { "latitude": -90, "longitude": -180 }, "placeId": "string", "countryCode": "string", "timeZone": "string", "code": "string" }, "departureDate": "2019-08-24T14:15:22Z", "arrivalDate": "2019-08-24T14:15:22Z", "cabinClass": "economy", "seatNumber": "string", "gateNumber": "string", "departureTerminal": "string", "arrivalTerminal": "string", "phoneNumber": "string" } ], "hotels": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "place": { "name": "string", "address": "string", "coordinate": { "latitude": -90, "longitude": -180 }, "placeId": "string", "countryCode": "string", "timeZone": "string", "code": "string" }, "checkInDate": "2019-08-24T14:15:22Z", "checkOutDate": "2019-08-24T14:15:22Z", "roomNumber": "string", "phoneNumber": "string" } ], "expenses": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "cost": { "amount": 1, "currency": "string" }, "category": "activity", "date": "2019-08-24", "belongsTo": { "kind": "flight", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" } } ], "packing": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "category": "accessories", "quantity": 1, "isPacked": true, "belongsTo": { "kind": "flight", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" } } ], "documents": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "category": "boardingPass", "file": { "path": "string", "name": "string", "size": 0 }, "belongsTo": { "kind": "flight", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" } } ], "savedFrom": { "itineraryId": "03efdba6-bc0e-4f7f-a1d4-b800bf7fb9ae", "author": "string", "authorDisplayName": "string", "authorIsPro": true }, "visibility": "private", "role": "owner", "author": {}, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "likesCount": 0, "viewsCount": 0}