1. AVIA
ETS API
  • Try it and Run in ApiDog
  • AVIA API Documentation
  • AVIA Flows example
  • HOTELS API
  • AVIA
    • 1 REQ B2B Login Api Token
      POST
    • 1 REQ B2C Login
      GET
    • 2A Search Direct flight
      POST
    • 2C Search Round trip
      POST
    • 2B Search Multi-City
      POST
    • 3 Schedule - Amadeus optional
      POST
    • 4 Offers request
      POST
    • 4B Smart Offer Request optional
      GET
    • 4C Offer Rules
      GET
    • 5 Documents types for offer
      GET
    • 5.1 Get available citizenships for an offer
      GET
    • 6 Offer info
      GET
    • 7 Availability of Offer
      GET
    • 8 OPT Available Services
      GET
    • 9 OPT Select services
      POST
    • 10 Create Order
      POST
    • 11 Split Order
      PATCH
    • 12 Order payment methods
      POST
    • 13 Order payment
      POST
    • 14 Checkout status
      GET
    • 15 Refund order
      GET
    • 16 Get order info
      GET
    • 17 Print E-Tiket
      GET
    • 18 Receiving a cancellation fee
      GET
    • 19 Cancel Order
      GET
    • 20 Get airports
      GET
    • 21 Get cities
      GET
    • 22 Get countries
      GET
    • 23 Get counterparties info
      GET
    • 24 Get list of countries for citizenship
      GET
    • 25 Get list of country dialing codes
      GET
  • HOTELS
    • REQUIRED
      • 1A REQ B2B Login
      • 1B REQ B2B Login Token
      • 1C REQ B2C Login
      • 2 REQ Destination
      • 3 REQ Search
      • 4 REQ Receiving found hotels
      • 5 REQ Getting a Hotel Offer
      • 6 REQ Create order
      • 7 REQ Cancel order
    • OPTIONAL
      • 1 REQ B2B Login
      • 1B REQ B2B Login Token Copy
      • 1 REQ B2C Login
      • 2 REQ Search
      • 3 OPT Destination point info
      • 4 OPT List of popular destinations Copy
      • 5 OPT List of filtered destinations
      • 6 OPT Group guide
      • 7 OPT Getting information on possible hotels
      • 8 OPT Getting the list of currencies
      • 9 REQ Receiving found hotels
      • 10 REQ Getting a Hotel Offer
      • 11 OPT Cancel-policies
      • 12 OPT Account number and info
      • 13 OPT Receiving information on the hotel offer
      • 14 OPT Receive detailed information about the cost of an offer
      • 15 REQ Create order
      • 16 OPT Receive hotel services
  • External system export
    • Export Air Order
  • Schemas
    • Sample Schemas
      • Pet
      • Category
      • Tag
  1. AVIA

7 Availability of Offer

GET
{{AVIA_URL}}/api/air/offers/{{buy_id}}/availability

GET /api/air/offers/{buy_id}/availability#

7-availability-of-offer.png
Checks the selected offer with the supplier before an order is created: whether it can still be booked and at what price. This step is required: Create Order accepts only the buy_id returned by this method.

Request#

buy_id (path, string) - buy_id of the selected offer from POST /api/air/offers or GET /api/air/offers/{buy_id}/smart_ff. Required.
price_change_confirm (query, 1 or 0) - send 1 if your system can show a new price to the user and ask for confirmation. Default: 0. See "Price change". Optional.
etm-auth-key (header) - session key from POST /api/login. Required.
No request body.

Two forms of buy_id#

Search buy_idBooking buy_id
SourcePOST /api/air/offers, smart_ffResponse of this method
Examplerequest_86e7a14d-..._10, ff_..._22275014016, 2275014016_2275014017
ValidWhile search results are kept: at least 20 minutes after the search startsNo time limit on the ETS side. One order per buy_id
Used inOffer info, Offer rules, Smart offer, AvailabilityAvailability, Additional services, Create Order, Offer rules
Each call with a search buy_id returns a new booking buy_id. Use the one from the latest successful response.
If more than 20 minutes have passed since the search started, start a new search before booking. When the search results expire, Availability with a search buy_id returns 404 without code (see "Errors").
The booking buy_id does not expire on the ETS side, but the supplier can change the price or sell the seats at any time. Create the order right after Availability. If some time has passed, call Availability again with the booking buy_id: the offer is checked with the supplier again.
One booking buy_id can be used for one order. A second Create Order with the same buy_id returns an error.

What a successful response means#

status: ok and availability: true mean that the supplier confirmed the offer at the moment of the request. It is not a booking and does not hold seats. Seats are booked by Create Order, and the final price is confirmed there.
For some suppliers the offer is checked only during Create Order. Always handle price changes and errors in Create Order too.

Warnings in a successful response#

message can contain text for the user even when status is ok. Show it to the user. Several warnings are joined with a space. For example:
the price has changed (see "Price change");
flight times have changed: message lists the old and new times of each changed flight;
less than 5 hours remain before departure: the ticket must be issued quickly, otherwise the booking will be cancelled;
a warning from the supplier.
message is localized and can change: do not parse it.
popup_message - text that must be shown to the user before booking, for example about delayed ticketing. Empty string if there is nothing to show.

Price change#

The price can change between the search and Availability. If ETS detects the change at this step:
without price_change_confirm=1 - error 404 with code 3004, the same as when the offer is not available;
with price_change_confirm=1 - status: ok and the price_changed block:
old_price (number) - price from the search results;
new_price (number) - current price;
currency (string) - currency of both prices.
price_details contains the new price by passenger type, and message contains the text about the change. Show the new price to the user and create the order only after the user agrees.
price_changed is returned only when Availability is called with a search buy_id.
Some suppliers report a price change only as text in message, without price_changed. The final price is confirmed in Create Order: if it differs, Create Order returns status: price_changed (see 10 Create Order).
We recommend always sending price_change_confirm=1 and checking price_changed in the response.

Self-transfer and delayed ticketing#

The response of this method does not contain these flags. Take them from the selected offer in POST /api/air/offers:
interline, flights_info[].self_dock, flights_info[].bagsRecheck - self-transfer, see 4 Offers request;
is_delayed_ticketing - delayed ticketing.
is_delayed_ticketing: true means that the supplier issues the ticket some time after payment, not during the payment request. Ticketing can take up to 24 hours. After payment the order has status K (ticketing in progress) and changes to T when the ticket is issued. Check the status with Get order info. Show the user a warning before booking.

Timeout#

Availability waits for the supplier's response. It usually takes a few seconds, but for some suppliers it can take more than a minute. Set the client timeout to at least 90 seconds. After a timeout, call Availability again with the same buy_id.

Response#

status (string) - ok.
availability (boolean) - always true in a successful response.
buy_id (string) - booking buy_id. Use it in Create Order and Additional services.
request_id (integer) - ID for GET /api/air/offers/{request_id}/additional-services. Not the search request_id (UUID).
message (string) - warnings for the user, empty if there are none.
popup_message (string) - see "Warnings in a successful response".
allow_cyrillic (boolean) - true if passenger names for this offer can be entered in Cyrillic.
gds (string) - supplier label. Informational.
price_changed (object) - only when the price has changed, see "Price change".
price_details (array) - only together with price_changed. Same format as price_details in 4 Offers request.
check_in_details (object) - only for some low-cost carriers. Informational.
offer_key (string) - for internal use. Ignore it.

Errors#

404 with code: 3004 - the offer cannot be booked. The reason can be: no seats, the supplier did not confirm the offer or the price, the supplier did not respond or returned an error, or the booking buy_id was not found. message contains the supplier's text or a general text. The code is the same for all these reasons. Repeat Availability once: the supplier failure may be temporary. If the error repeats, select another offer or start a new search.
Example: {"status": "error", "code": 3004, "message": "There are no seats available. Please try another option or change your search criteria."}
404 without code - the search buy_id was not found: the search results have expired or the buy_id is invalid. Start a new search.
Example: {"status": "error", "message": ""}
403 - the etm-auth-key header is missing or the session has expired. See "Authentication troubleshooting" in AVIA API Documentation.
Next request:
Method: POST
URL: {{url}}/api/air/orders
Use buy_id from this response. Optional before it: GET {{url}}/api/air/offers/{{request_id}}/additional-services?segment={{buy_id}}.

Request

Query Params

Header Params

Responses

🟢200Available
application/json
Bodyapplication/json

🟠404Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --globoff 'https://stage-api.etm-system.com/api/air/offers/{{buy_id}}/availability?price_change_confirm=1' \
--header 'Accept: application/json' \
--header 'Etm-Auth-Key: ' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'Content-Type: application/json'
Response Response Example
200 - 7 Availability of Offer
{
    "status": "ok",
    "message": "",
    "availability": true,
    "gds": "Amadeus",
    "request_id": 16915125,
    "popup_message": "",
    "allow_cyrillic": false,
    "buy_id": "2275014016"
}
Modified at 2026-11-25 13:03:08
Previous
6 Offer info
Next
8 OPT Available Services
Built with