API endpoints
Get offer details
Re-read an offer and check whether it still exists and whether its price changed.
POST
/
api
/
v1
/
flights
/
details
curl -X POST "https://api.staging.ttool.travel/hub/api/v1/flights/details" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"requestId": "3f1a1c9e-7b2d-4c7e-9a1f-2b3c4d5e6f70",
"proposalId": "8d0e3b6a-2f41-4b8e-b1c9-5d6e7f8a9b0c",
"returningRequestId": null,
"returningProposalId": null
}'
{
"proposalDetails": {
"offer": { "offerId": "8d0e3b6a-2f41-4b8e-b1c9-5d6e7f8a9b0c", "price": { "currency": "USD", "total": 436.00 } },
"availableRequest": {
"requestId": "3f1a1c9e-7b2d-4c7e-9a1f-2b3c4d5e6f70",
"adultsCount": 1, "childrenCount": 0, "infantsCount": 0,
"cabinType": "Economy", "flightType": "RoundTrip",
"segments": []
},
"flightExist": true,
"priceHasChanges": false
},
"returningProposalDetails": null,
"dictionaries": { "carriers": { "IA": "Iraqi Airways" }, "airports": { "BGW": { "name": "Baghdad International", "city": "Baghdad", "country": "IQ" } } }
}
{
"success": false,
"error": { "errorCode": "FLIGHT_PROPOSAL_NOT_FOUND", "errorCategory": "NotFound", "httpStatusCode": 404 }
}
Call it when time has passed between search and booking, or to show the full offer on a confirmation page.
Body
string (uuid)
required
requestId from search.string (uuid)
required
The offer’s
offerId.string (uuid)
Split round trips only. Send with
returningProposalId.string (uuid)
Split round trips only. Send with
returningRequestId.Response
object
Show properties
Show properties
Offer
The current offer. If the price changed,
price already holds the new price.object
The original search:
requestId, adultsCount, childrenCount, infantsCount, cabinType, flightType, segments.boolean
Always
true. A missing offer returns HTTP 404 instead.boolean
true if the provider re-priced since the search. Show the new price.total before booking.object | null
Same shape, for the return leg of a split round trip.
object
Carrier and airport names for the codes in these offers. See Dictionaries.
Errors
| HTTP | errorCode | Action |
|---|---|---|
| 404 | FLIGHT_PROPOSAL_NOT_FOUND | The offer or search expired. Search again. |
curl -X POST "https://api.staging.ttool.travel/hub/api/v1/flights/details" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"requestId": "3f1a1c9e-7b2d-4c7e-9a1f-2b3c4d5e6f70",
"proposalId": "8d0e3b6a-2f41-4b8e-b1c9-5d6e7f8a9b0c",
"returningRequestId": null,
"returningProposalId": null
}'
{
"proposalDetails": {
"offer": { "offerId": "8d0e3b6a-2f41-4b8e-b1c9-5d6e7f8a9b0c", "price": { "currency": "USD", "total": 436.00 } },
"availableRequest": {
"requestId": "3f1a1c9e-7b2d-4c7e-9a1f-2b3c4d5e6f70",
"adultsCount": 1, "childrenCount": 0, "infantsCount": 0,
"cabinType": "Economy", "flightType": "RoundTrip",
"segments": []
},
"flightExist": true,
"priceHasChanges": false
},
"returningProposalDetails": null,
"dictionaries": { "carriers": { "IA": "Iraqi Airways" }, "airports": { "BGW": { "name": "Baghdad International", "city": "Baghdad", "country": "IQ" } } }
}
{
"success": false,
"error": { "errorCode": "FLIGHT_PROPOSAL_NOT_FOUND", "errorCategory": "NotFound", "httpStatusCode": 404 }
}
⌘I
curl -X POST "https://api.staging.ttool.travel/hub/api/v1/flights/details" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"requestId": "3f1a1c9e-7b2d-4c7e-9a1f-2b3c4d5e6f70",
"proposalId": "8d0e3b6a-2f41-4b8e-b1c9-5d6e7f8a9b0c",
"returningRequestId": null,
"returningProposalId": null
}'
{
"proposalDetails": {
"offer": { "offerId": "8d0e3b6a-2f41-4b8e-b1c9-5d6e7f8a9b0c", "price": { "currency": "USD", "total": 436.00 } },
"availableRequest": {
"requestId": "3f1a1c9e-7b2d-4c7e-9a1f-2b3c4d5e6f70",
"adultsCount": 1, "childrenCount": 0, "infantsCount": 0,
"cabinType": "Economy", "flightType": "RoundTrip",
"segments": []
},
"flightExist": true,
"priceHasChanges": false
},
"returningProposalDetails": null,
"dictionaries": { "carriers": { "IA": "Iraqi Airways" }, "airports": { "BGW": { "name": "Baghdad International", "city": "Baghdad", "country": "IQ" } } }
}
{
"success": false,
"error": { "errorCode": "FLIGHT_PROPOSAL_NOT_FOUND", "errorCategory": "NotFound", "httpStatusCode": 404 }
}

