It is important to design your booking request workflow to be tolerant of network issues. Do not interpret a lack of a response as an indicator of a failed booking. If a network connection is lost after a reservation request is sent but before the response is received, then your customer's booking may still have been charged & confirmed within EPS's systems.
Any non-response instance following a booking request should be followed up with a Retrieve Request that includes the original affiliate_reference_id used in the reservation. The status of the booking can then be retrieved.
Always send affiliate_reference_id
Generate a unique affiliate_reference_id for each customer's booking. If resending the same request details (e.g. due to a failed attempt), the same affiliate_reference_id should be used. This prevents accidental duplicate bookings.
When sending a new booking request, the API will not respond until the booking is either confirmed or refused. The majority of responses are returned within a few seconds. However, a small number of bookings can take up to several minutes to process & generate a response.
Monitor bookings that do not resolve quickly
If no response is received after ~30 seconds, check the progress of the booking with an Retrieve Request, using the same affiliate_reference_id that was sent with the booking. If the reservation is still in progress or if the reservation has failed, you will receive the 404 error "Itinerary was not found with provided request." After receiving this message, you should attempt your booking request again with the same affiliate_reference_id. If the reservation is still being completed, you will see a 400 error with the message "An itinerary already exists with this affiliate reference id." If this error has returned, you can Retrieve the booking again to see if the reservation details are ready to be viewed.