Statuses and error codes
Look up what an answer's status, HTTP code and error_code mean, and whether a booking may exist.
What to do with each kind of failure: Handle errors.
Statuses
succeededcommit is booked. A booking at begin reached the form and nothing final was pressed. To know whether something was booked, check confirmation_number, not status: a commit can also succeed with none (an RSVP, an appointment request, a free event), and reason then says so. A search or availability answer can carry an error_code on succeeded (no_offers_found, or a search at begin whose walk stopped).processingerror_code: "continue_in_flight"). Read GET /v3/bookings/{booking_id} again until it changes.needs_inputmissing[] lists it.failedA connected account has its own statuses (connecting, requires_action, active, failed, disconnected): session object.
HTTP for a failure
invalid_input, wrong_id_namespace, offer_entity_mismatch, ambiguous_vertical.merchant_not_enabled_for_key: the site is not switched on for this key.unknown_entity, unknown_offer, unknown_booking, unknown_attempt.failure_class is terminal.attempt_expiredmax_total_requiredattempt_abandoned: the abandon worked, so the call succeeded.{"error_code": "internal", "error": "…"}. Or the rate limiter is down: {"error": "rate limiter unavailable"}, with nothing done.search_nav_failed, runner_transport, and a failure that carries no error_code or no failure_class.drive_capacity with Retry-After: 60. Any failure with failure_class: "retryable_elsewhere" (a site's bot wall or block) with Retry-After: 30. Nothing was booked.not_confirmed_after_otp, transaction_status_unknown and booked_a_different_entity mean a booking may exist, and v3 cannot cancel it. Tell the person and check with the site. Never send that booking again.The failure body
A failed drive answers the full envelope with status: "failed", failure_class, error_code and error (a sentence; do not parse it). failure_class is terminal (this attempt is over; whether a new one is fine depends on the error code) or retryable_elsewhere (blocked; nothing committed; try again after Retry-After).
Refusals before anything runs have other, smaller bodies: Request rules and Keys and scopes.
Did it book?
Each code below says whether a booking may exist after it. There are four answers:
idempotency_key.idempotency_key.commit, check GET /v3/bookings/{booking_id} and with the site before you book again. On a search, an availability read or a booking at begin, no final press was made.begin drive lands on a confirmation anyway, its booking report carries ALERT_BOOKING_CREATED. A booking may have been made that you did not authorize: tell the person and check with the site.Next try: a new try is a new request. On POST /v3/bookings it always takes a new idempotency_key: the same key replays the first answer, a failure included. Read the Booked column first.
Every error code
Codes marked in error arrive in the error field, with no error_code. New codes can appear: treat an unknown one by its HTTP status and failure_class, and as Check first on a booking.
wrong_key_environmentinsufficient_scopein errormerchant_not_enabled_for_keybilling_requiredin errorfree_tier_exhaustedin errorbilling_check_unavailablein errorentitlement_check_unavailablein errorrate_limitedin errorinvalid_inputneeds_inputwrong_id_namespaceunknown_entityunknown_attemptoffer_entity_mismatchambiguous_verticalcommitment_refusedcard_with_payment_linkinvalid_practice_timinginvalid_practice_scenarionot_implemented_in_v3private_addressakamai_blockedbot_wall_blockedblockedrate_limitsite_pacedsession_expiredsearch_errorno_offers_foundterm_not_appliedlocation_not_appliedask_not_appliedno_availabilityunaddressable_entitynot_confirmed_after_otptransaction_status_unknownbooked_a_different_entitybooking_errorentity_not_reachedno_action_foundno_bookable_actionnot_bookable_hereslot_mismatchslot_click_failedoffer_expiredoffer_goneterms_changedduplicate_reservationquote_unavailabledrive_lostmax_total_requiredover_max_totaltotal_unreadablecart_mismatchcurrency_mismatchout_of_stockvariant_unavailableselection_unconfirmedaddress_rejectedorder_refusedcard_declinedcredit_card_requiredpayment_method_unavailablepayment_link_expiredpayment_link_unavailablecard_with_link_walletlink_wallet_unavailablelink_wallet_amount_over_limitlink_wallet_unauthorizedlink_wallet_declinedlink_wallet_expiredlink_wallet_canceledlink_wallet_action_requiredlink_wallet_errorattempt_expiredattempt_abandonedcontinue_in_flightotp_input_not_foundotp_invalidend_user_requiredphone_invalidsession_not_foundnot_awaiting_codereconnect_requiredsession_verification_requiredaccount_requiredpassword_requiredno_clean_exitproxy_lane_blockedrunner_transportinternalinvalid_outputmissing_search_urlwire_fell_backunknown_status