DevelopersReferenceItineraries
API: Refresh An Itinerary's Places
Looks up every stop, hotel and airport on the itinerary again and fills in the addresses, place ids, time zones and travel legs it is missing. Send the If-Match you read; the updated itinerary is returned.
AuthorizationBearer <token>
A Travelyfe access token.
In: header
Path Parameters
id*string
The itinerary id (UUID).
Format
uuidHeader Parameters
If-Match*string
The ETag you last read. A write with an out-of-date ETag is refused with itineraryModified.
Travelyfe-Itinerary-Shape?"clean"
Send clean on every request that reads or writes an itinerary. It is the shape this reference documents.
Value in
- "clean"
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/itineraries/497f6eca-6276-4993-bfeb-53cbbbba6f08/places/refresh" \ -H "If-Match: "v42""{ "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}