Guru API (1.0.0)

Download OpenAPI specification:

This is a collection of http methods based on the OpenAPI 3.0 specification to manage agencies airline tickets.

To test it you can download the Postman files for our API using the following links
- Download API Postman File
- Download Development Env Postman File
These files contain the necessary configurations and endpoints for testing and interacting with our API. If you have any questions or need further assistance, feel free to reach out!

To know more about us, access Agent Guru

Auth

This is the OAuth 2.0 password grant to access the API.
Use the endpoints to directly request an access token by using the application's credentials (Username and Password) and to renew an expired access_token using a refresh_token.

/oauth/token - Use the OAuth 2.0 password grant to request an access token.

Use this endpoint to directly request an access token by using the application's credentials (Username and Password).
The access token lasts 1 hour.

Request Body schema: application/json
required
username
string

Represents the unique identifier assigned to the client application that is making requests to the API.
For this API the username will be in a form of an e-mail.

Example: mymail@agency.com

password
string

Represents the password associated with the username, used to authenticate the client application when making requests to the API.

group_id
integer

(Optional) Group associated to the user. Created bookings will be registered to this specific group.

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "string",
  • "group_id": 0
}

Response samples

Content type
application/json
{
  • "access_token": "string",
  • "token_type": "string",
  • "refresh_token": "string",
  • "expires_in": 0
}

/oauth/refreshtoken - Use the OAuth 2.0 refresh_token to request an access token.

Use this endpoint to directly request a new access token by using the refresh token issued previously. As a result of exchanging a refresh token, a new refresh token will be issued and the existing token will be invalidated. This allows for automatic detection of token reuse if the token is leaked.

The refresh token is valid for a duration of 24 hours.
Each time a new refresh token is generated, the previously issued token will be invalidated.

Request Body schema: application/json
required
refresh_token
string

Represents the refresh token issued in conjunction with the access token.

Example: v1.MQQ4tMbnZ_52--saQdBX7ybSMAFq-vQxtoxHy8F90EOiXgA4-WCkk5uLcsk6lzyoxNhzV4Kj7fe7j4E3NUsP5NM

Responses

Request samples

Content type
application/json
{
  • "refresh_token": "string"
}

Response samples

Content type
application/json
{
  • "access_token": "string",
  • "token_type": "string",
  • "refresh_token": "string",
  • "expires_in": 0
}

Shopping

The Airline Shopping Management API serves as a comprehensive solution for travel agencies to manage airline fares efficiently.
This API allows users to search for flights from different sources like GDSs and Direct Connect providers.

/offers - Obtain fares within a specified timeframe.

Obtain a list of fares during a specified date interval.
The maximum period is 330 days.

Authorizations:
(bearerAuthapiKeyAuth)
query Parameters
route
string

Specifies flight route as pipe-delimited string: origin,destination,outbound_date[+origin,destination,inbound_date]. Example: SAO,GIG,2026-02-10+GIG,SAO,2026-02-20 for São Paulo-Rio roundtrip (Feb 10-20).

provider_type
Array of strings (ProviderType)
Items Enum: "" "UNSPECIFIED" "AMADEUS" "FARELOGIX" "SABRE" "AZUL" "GOL" "LATAM" "ELATAM" "IBERIA" "LUFTHANSA" "AIREUROPA"
airlines
Array of strings

List of preferred airlines.

adts
integer <int32>

Specifies the number of adults.

Example: 1
The limit is 9.

chds
integer <int32>

Specifies the number of children.

Example: 1
The limit is 9.

infs
integer <int32>

Specifies the number of infants.

Example: 1
The limit is 9.

cabin
string (Cabin)
Enum: "UNSPECIFIED" "ECONOMY" "PREMIUM" "BUSINESS" "FIRST"

Cabin class requested or booked for the flight.

  • UNSPECIFIED - Cabin class was not provided.
  • ECONOMY - Standard economy cabin.
  • PREMIUM - Premium economy or equivalent.
  • BUSINESS - Business class cabin.
  • FIRST - First class cabin.
direct_flights_only
boolean

If true, only direct flights will be included in the search.

cheapest_price_only
boolean

If true, only direct flights will be included in the search.

with_bags_only
boolean

If true, only flights with baggage are returned.

max_connections
integer <int32>

Maximum number of connections allowed.

booking_id
string

Identifier of an existing booking to reissue within the same PNR.
When provided, the search reuses the booking's credential: guruapi resolves the booking's slice tokens internally and forwards them to the provider so the same negotiated fare/credential is used.
The returned offers carry a search_id to be used in POST /exchange/estimate.

Responses

Request samples

curl -X 'GET' \
  'https://api.stg.agent.guru/rs/v1/flights/offers?route=SAO,GIG,2026-02-01+GIG,SAO,2026-02-10&adts=1&chds=1&infs=0&provider_type=AZUL' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer mytoken' \
  -H 'x-api-key: myapikey'

Response samples

Content type
application/json
{
  • "flexible_recommendations": true,
  • "international": true,
  • "offers": [
    ]
}

/offers/price - Confirm if the chosen fare is still available.

Obtain a list of fares during a specified date interval.
The maximum period is 330 days.

Authorizations:
(bearerAuthapiKeyAuth)
query Parameters
slice_tokens
Array of strings

Comma-separated list of slice tokens returned by GET /offers. Example: slice_token_1,slice_token_2

additional_offers
boolean
Default: false

When true, populates additional_offers in the response with alternative fare family combinations for the same flights. Only effective for flexible providers (GOL, AZUL, LATAM, ELATAM).

Responses

Request samples

curl -X 'GET' \
  'https://api.stg.agent.guru/rs/v1/flights/offers/price?slice_tokens=token_1,token_2' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer mytoken' \
  -H 'x-api-key: myapikey'

Response samples

Content type
application/json
{
  • "offer": {
    },
  • "additional_offers": [
    ]
}

Booking

The Airline Booking Management API serves as a comprehensive solution for travel agencies to manage airline fares efficiently.
This API allows users to book flights from different sources like GDSs and Direct Connect providers.

/bookings - Create Booking

Authorizations:
(bearerAuthapiKeyAuth)
Request Body schema: application/json
required
selected_tokens
required
Array of strings

An array of selected token identifiers for the booking process.

required
Array of objects (Passenger)

A list of passengers included in the booking.

Responses

Request samples

Content type
application/json
{
  • "selected_tokens": [
    ],
  • "passengers": [
    ]
}

Response samples

Content type
application/json
{
  • "booking": {
    }
}

/bookings/import - Import Booking

Imports an existing booking from a provider using its locator (PNR).

When save is true, the booking is persisted in the database and becomes fully manageable through the API.
When save is false or omitted, the booking is fetched and returned but not saved — useful for previewing a booking before deciding to import it.

Authorizations:
bearerAuthapiKeyAuth
Request Body schema: application/json
required
locator
required
string

The airline's reference for the booking, also known as a "passenger name record" (PNR) or "record locator".

Example: "BKJJ25"

provider_type
required
string (ProviderType)
Enum: "" "UNSPECIFIED" "AMADEUS" "FARELOGIX" "SABRE" "AZUL" "GOL" "LATAM" "ELATAM" "IBERIA" "LUFTHANSA" "AIREUROPA"

The airline's system.

save
boolean

When true, the imported booking is persisted in the database and becomes fully manageable.
When false (or omitted), the booking is fetched and returned but not saved — useful for previewing a booking before deciding to import it.

provider_id
string

The provider's internal order identifier.
Required when provider_type is LATAM, where it corresponds to the Order ID.
Optional for other providers.

Responses

Request samples

Content type
application/json
{
  • "locator": "string",
  • "provider_type": "",
  • "save": true,
  • "provider_id": "string"
}

Response samples

Content type
application/json
{
  • "booking": {
    }
}

/bookings/{id} - Get Booking

Authorizations:
(bearerAuthapiKeyAuth)
path Parameters
id
required
string

The airline booking id. This is classified as a string because the airline ticket number consists of 13 characters, with the initial characters potentially being zeros, which must not be omitted.

Example: "0014995096800"

Responses

Request samples

curl -X 'GET' \
  'https://api.stg.agent.guru/rs/v1/flights/bookings/{booking_id}' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer mytoken' \
  -H 'x-api-key: myapikey'

Response samples

Content type
application/json
{
  • "booking": {
    }
}

/bookings/{id} - Cancel Booking

Authorizations:
(bearerAuthapiKeyAuth)
path Parameters
id
required
string

The airline booking id. This is classified as a string because the airline ticket number consists of 13 characters, with the initial characters potentially being zeros, which must not be omitted.

Example: "0014995096800"

Responses

Request samples

curl -X 'DELETE' \
  'https://api.stg.agent.guru/rs/v1/flights/bookings/{booking_id}' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer mytoken' \
  -H 'x-api-key: myapikey'

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

/bookings/{id} - Update Booking

Authorizations:
(bearerAuthapiKeyAuth)
path Parameters
id
required
string

The airline booking id. This is classified as a string because the airline ticket number consists of 13 characters, with the initial characters potentially being zeros, which must not be omitted.

Example: "0014995096800"

Request Body schema: application/json
required
required
Array of objects (BookingPassengerInfo)

Information about the passengers that need to be updated in the booking.

Responses

Request samples

Content type
application/json
{
  • "booking_passengers_info": [
    ]
}

Response samples

Content type
application/json
{
  • "booking": {
    }
}

/bookings/{id}/split - Split Booking

Splits a booking by moving one or more passengers into a newly created child booking.

The original booking remains active with the remaining passengers.
The response contains both the original_booking_id and the child_booking_id, along with the provider locator (child_locator) for the new booking.

Authorizations:
(bearerAuthapiKeyAuth)
path Parameters
id
required
string

The airline booking id. This is classified as a string because the airline ticket number consists of 13 characters, with the initial characters potentially being zeros, which must not be omitted.

Example: "0014995096800"

Request Body schema: application/json
required
passenger_ids
required
Array of strings non-empty

List of passenger identifiers to be moved into the new child booking.
At least one passenger must be provided.

Responses

Request samples

Content type
application/json
{
  • "passenger_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "original_booking_id": "string",
  • "child_booking_id": "string",
  • "child_locator": "string"
}

/bookings/{id}/price - Price Booking

Triggers a repricing for the given booking against the provider.

Use lowest_price to request the cheapest available fare.
Use informative to reprice without updating the booking record.

Authorizations:
(bearerAuthapiKeyAuth)
path Parameters
id
required
string

The airline booking id. This is classified as a string because the airline ticket number consists of 13 characters, with the initial characters potentially being zeros, which must not be omitted.

Example: "0014995096800"

Request Body schema: application/json
required
lowest_price
required
boolean

If true, the service returns the lowest available price for the booking across available options.

informative
required
boolean

If true, the repricing is informative only and does not update the booking record.

Responses

Request samples

Content type
application/json
{
  • "lowest_price": true,
  • "informative": true
}

Response samples

Content type
application/json
{
  • "slices": [
    ],
  • "booking_price": {
    },
  • "price_changed": true,
  • "rebook": true,
  • "extras_removed": true
}

/bookings/{id}/frequent-flyers - Update frequent flyers

Updates the frequent flyer information for one or more passengers in a booking.

All passengers to be updated must be provided in a single request. Each entry requires the passenger_id, the airline IATA code, and the frequent flyer code.

Authorizations:
(bearerAuthapiKeyAuth)
path Parameters
id
required
string

The airline booking id. This is classified as a string because the airline ticket number consists of 13 characters, with the initial characters potentially being zeros, which must not be omitted.

Example: "0014995096800"

Request Body schema: application/json
required
required
Array of objects

List of passengers with their frequent flyer information to update.

Responses

Request samples

Content type
application/json
{
  • "passengers": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

/bookings/{id}/tickets - Cancel all tickets for a booking

Cancels all airline tickets associated with the given booking ID. The booking must belong to the authenticated agency.

Authorizations:
bearerAuthapiKeyAuth
path Parameters
id
required
string

The airline booking id.

Responses

Request samples

curl -X 'DELETE' \
  'https://api.stg.agent.guru/rs/v1/flights/bookings/{booking_id}/tickets' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer mytoken' \
  -H 'x-api-key: myapikey'

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

Ancillaries

The Ancillaries API allows management of ancillary services for an existing booking.
Use these endpoints to retrieve seat maps, select seats, retrieve baggage options, and select baggage for passengers.

/bookings/{id}/slices/{slice_id}/baggage-options - Get Baggage Options

Returns the available baggage options for a specific slice of a booking, grouped by passenger.

Each baggage option contains a token per passenger that must be used in the POST /bookings/{id}/baggages request to select that option.

Important: The quantity in each baggage option represents the number of bags that will be added to the booking for that slice — it does not represent the total.
For example: if a booking already has 1 free bag included in the fare and you select an option with quantity 2 for the outbound slice only, that slice will have 3 bags total while the remaining slices will keep their original 1 bag.

Note: Not all providers support baggage selection, and availability may vary depending on the booking status (on hold or ticketed). Before calling this endpoint, check the capabilities.buy_baggage field in the booking response — if false, baggage selection is not available for that booking.

Authorizations:
bearerAuthapiKeyAuth
path Parameters
id
required
string

The airline booking id.

Example: "0014995096800"

slice_id
required
string

The slice identifier for which to retrieve baggage options.

Example: "slice-uuid-1"

Responses

Request samples

curl -X 'GET' \
  'https://api.stg.agent.guru/rs/v1/flights/bookings/{booking_id}/slices/{slice_id}/baggage-options' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer mytoken' \
  -H 'x-api-key: myapikey'

Response samples

Content type
application/json
{
  • "baggage_options": [
    ]
}

/bookings/{id}/baggages - Select Baggages

Selects baggage options for one or more passengers across multiple slices of a booking in a single request.

Each entry in the slices array contains a slice_id and the list of baggage_tokens to select for that slice. Each token is returned per passenger in the baggage options response at baggage_options[].baggage_options[].token, where each entry corresponds to one passenger via the passenger_id field.

Important: The quantity of each selected option represents the number of bags that will be added to the booking — not the total. For example: a booking with 1 free bag that receives a selection of quantity 2 for the outbound slice will result in 3 bags for that slice and 1 for the rest.

On hold bookings: Every baggage selection replaces all previously selected but not yet ticketed bags. The new request is treated as the definitive selection — previously chosen bags that are not included in the new request will be removed.

The payment field is required when the booking is already ticketed. When the booking is on hold, payment is not required and will be ignored if provided.

Note: Not all providers support baggage selection, and availability may vary depending on the booking status (on hold or ticketed). Before calling this endpoint, check the capabilities.buy_baggage field in the booking response — if false, baggage selection is not available for that booking.

Authorizations:
bearerAuthapiKeyAuth
path Parameters
id
required
string

The airline booking id.

Example: "0014995096800"

Request Body schema: application/json
required
required
Array of objects

List of slices and their baggage selections.
Each entry contains the slice_id and the baggage tokens to select for that slice. Each token is returned per passenger in the baggage options response at baggage_options[].baggage_options[].token, where each entry corresponds to one passenger via the passenger_id field.

object (AncillaryPayment)

Responses

Request samples

Content type
application/json
{
  • "slices": [
    ],
  • "payment": {
    }
}

Response samples

Content type
application/json
{
  • "success": true,
  • "ancillaries": [
    ]
}

/bookings/{id}/seats - Select Seats

Selects seats for one or more passengers across multiple legs of a booking in a single request.

Each entry in the legs array contains a leg_id and the list of seat_tokens to select for that leg. Each token is returned per passenger in the seat map response at seat_map.cabins[].rows[].sections[].elements[].available_services[].token, where each available_service entry corresponds to one passenger via the passenger_id field.

The payment field is required when the booking is already ticketed. When the booking is on hold, payment is not required and will be ignored if provided.

Note: Not all providers support seat selection, and availability may vary depending on the booking status (on hold or ticketed). Before calling this endpoint, check the capabilities.buy_seat field in the booking response — if false, seat selection is not available for that booking.

Authorizations:
bearerAuthapiKeyAuth
path Parameters
id
required
string

The airline booking id.

Example: "0014995096800"

Request Body schema: application/json
required
required
Array of objects

List of legs and their seat selections.
Each entry contains the leg_id and the seat tokens to select for that leg.

object (AncillaryPayment)

Responses

Request samples

Content type
application/json
{
  • "legs": [
    ],
  • "payment": {
    }
}

Response samples

Content type
application/json
{
  • "success": true,
  • "seat_ancillaries": [
    ]
}

/bookings/{id}/legs/{leg_id}/seat-map - Get Seat Map

Returns the seat map for a specific leg of a booking.

The seat map includes all cabins, rows and individual seat elements with their availability status, disclosures (e.g. exit row, chargeable, bassinet) and available services with pricing per passenger.

Note: Not all providers support seat selection, and availability may vary depending on the booking status (on hold or ticketed). Before calling this endpoint, check the capabilities.buy_seat field in the booking response — if false, seat selection is not available for that booking.

Authorizations:
bearerAuthapiKeyAuth
path Parameters
id
required
string

The airline booking id.

Example: "0014995096800"

leg_id
required
string

The leg identifier for which to retrieve the seat map.
Each leg of a booking has its own aircraft configuration and seat map.

Example: "leg-uuid-1"

Responses

Request samples

curl -X 'GET' \
  'https://api.stg.agent.guru/rs/v1/flights/bookings/{booking_id}/legs/{leg_id}/seat-map' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer mytoken' \
  -H 'x-api-key: myapikey'

Response samples

Content type
application/json
{
  • "seat_map": {
    }
}

Ticketing

The Airline Ticket Management API serves as a comprehensive solution for travel agencies to manage airline ticket efficiently.
This API allows users to search for tickets in a given period, paginate the results if the it is bigger than 250 items and also request information for a single ticket.

/tickets - Issue airline tickets

Authorizations:
(bearerAuthapiKeyAuth)
Request Body schema: application/json
required
booking_id
required
string non-empty

The unique identifier of the booking to be ticketed.

Example: "abc123def456"

required
Array of objects (InputFormOfPayment) non-empty

The list of forms of payment for this ticketing request. At least one form of payment is required.

new_slice_tokens
Array of strings

List of new slice tokens obtained from the slices of the selected offer in POST /exchange/estimate. Each token corresponds to a slice (journeys[i].slices[j].balance_token) in the estimate response.

Required for new booking reissuance (new PNR).

exchange_slice_tokens
Array of strings

Tokens of the existing booking slices to exchange (remove) during same-booking reissuance.

Required for same-booking reissuance (same PNR). Must match the exchange_slice_tokens sent to POST /exchange/estimate.

Responses

Request samples

Content type
application/json
{
  • "booking_id": "string",
  • "form_of_payments": [
    ],
  • "new_slice_tokens": [
    ],
  • "exchange_slice_tokens": [
    ]
}

Response samples

Content type
application/json
{
  • "tickets": [
    ]
}

/tickets - Obtain tickets within a specified timeframe.

Obtain a list of tickets issued during a specified date interval.
The maximum period is 7 days.

Authorizations:
bearerAuth
query Parameters
start_date
string <date>

Specifies the start date of the period to search for ticketStatus.

Format: YYYY-MM-DD
Example: 2023-09-01
The default value is the current date.

end_date
string <date>

Specifies the end date of the period to search for tickets

Format: YYYY-MM-DD
Example: 2023-09-01
The default value is the current date.

page
integer <int32>

Specifies the page number for pagination of the search results.

Example: 1
The default value is 1

per_page
integer <int32>

Specifies the number of results to return per page for pagination.

Example: 50
The default value is set to its max limit of 250.

timezone
string

The timezone field allows the application to present date and time information in a way that is relevant to the client’s geographical location.

The default value is set to the Consolidator's timezone America/Sao_Paulo
Example values:

  • America/Sao_Paulo
  • America/New_York
  • Europe/Berlin
sort_by
string

Specifies the number of results to return per page for pagination
Additionally, they can be combined. Example: created_at,number

The default value is created_at.
Available fields for sorting:

  • id
  • number
  • validating_carrier
  • ticket_type
  • ticket_status
  • created_at
booking_id
string

The internal booking identifier (UUID).

Example: "550e8400-e29b-41d4-a716-446655440000"

locator
string
Deprecated

Deprecated — use booking_id instead.

The airline's reference for the booking, also known as a "passenger name record" (PNR) or "record locator".

Example: "BKJJ25"

Responses

Request samples

curl -X 'GET' \
  'https://api.stg.agent.guru/rs/v1/flights/tickets?start_date=2023-09-01&end_date=2023-09-11' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer mytoken' \
  -H 'x-api-key: myapikey'

Response samples

Content type
application/json
{
  • "tickets": [
    ],
  • "meta": {
    }
}

/tickets/{number} - Obtain a ticket by its number.

This method return a single ticket filtered by its number.

Authorizations:
bearerAuth
path Parameters
number
required
string

The airline ticket number. This is classified as a string because the airline ticket number consists of 13 characters, with the initial characters potentially being zeros, which must not be omitted.

Example: "0014995096800"

Responses

Request samples

curl -X 'GET' \
  'https://api.stg.agent.guru/rs/v1/flights/tickets/5774995096800 \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer mytoken' \
  -H 'x-api-key: myapikey'

Response samples

Content type
application/json
{
  • "number": "string",
  • "validating_carrier": "string",
  • "ticket_type": "TICKET",
  • "emd_type": "BAGGAGE",
  • "related_ticket_number": "string",
  • "flight_type": "DOMESTIC",
  • "ticket_status": "TICKETED",
  • "created_at": "string",
  • "cancelled_at": "2026-03-09T16:07:35Z",
  • "conjunctive_number": "string",
  • "original_ticket": "string",
  • "locator": "string",
  • "provider_type": "",
  • "backoffice_code": "string",
  • "created_by": {
    },
  • "airlines_locators": [
    ],
  • "price": {
    },
  • "passenger": {
    },
  • "slices": [
    ],
  • "form_of_payment": {
    },
  • "agency_profit": {
    }
}

/tickets/{number} - Cancel a ticket by its number.

This method cancel a single ticket filtered by its number.

Authorizations:
(bearerAuthapiKeyAuth)
path Parameters
number
required
string

The airline ticket number. This is classified as a string because the airline ticket number consists of 13 characters, with the initial characters potentially being zeros, which must not be omitted.

Example: "0014995096800"

Responses

Request samples

curl -X 'DELETE' \
  'https://api.stg.agent.guru/rs/v1/flights/tickets/5774995096800 \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer mytoken' \
  -H 'x-api-key: myapikey'

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

Installments

The Installments API provides available credit card installment plans for a set of flight offer tokens.
Use this endpoint before payment to display the installment options to the traveler, including per-installment amounts, interest rates, and total prices.

/installments - Get credit card installment plans.

Retrieves available installment plans for a credit card given a set of flight offer tokens.

You must provide either a booking_id or a list of selected_tokens — one of them is required.
When booking_id is provided, the service fetches the booking and uses the tokens from its slices.

The creditcard_bin is always required. It represents the first 6 digits of the credit card number (BIN — Bank Identification Number), used to identify the card brand and available installment plans.

Authorizations:
bearerAuth
query Parameters
creditcard_bin
required
string

The first 6 digits of the credit card number (BIN — Bank Identification Number).
Used to identify the card brand and retrieve the available installment plans.

Example: "411111"

booking_id
string

The booking identifier (UUID or locator).
When provided, the service fetches the booking and extracts the slice tokens automatically.
Either booking_id or selected_tokens must be provided — but not both.

selected_tokens
Array of strings

A list of flight slice tokens previously obtained from the offers search or price endpoints.
Either selected_tokens or booking_id must be provided — but not both.

passenger_ids
Array of strings

Restricts the installment plans to a subset of the booking's passengers.
Optional. When omitted, the plans cover every passenger of the booking.

Use it for a partial issuance, where the credit card pays for only some passengers: the plan — and the plan_token it carries — must be calculated over the amount actually being charged, otherwise the order is rejected for a total that does not match its form of payment.

Only meaningful together with booking_id.

Example: "d9pnnjrn092c73astlcg,d9pnnjrn092c73astld0"

Responses

Response samples

Content type
application/json
{
  • "card_brand": "VISA",
  • "card_partner": "AZUL",
  • "installment_plans": [
    ],
  • "discount": 50,
  • "obfee": 10,
  • "price_changed": false
}

Exchange

The Exchange API allows reissuance of airline tickets into a new booking.
Use the estimate endpoint first to simulate the cost breakdown before performing the actual reissuance.

/exchange - Reissue airline tickets

Reissues one or more tickets, supporting both same booking reissuance (same PNR) and new booking reissuance (new PNR), depending on the provider and fare conditions.

Before calling this endpoint, use POST /exchange/estimate to simulate the cost and present the breakdown to the user.

New booking reissuance (new PNR):
The ticket form of payment (FOP_TYPE_TICKET) is required in form_of_payments to apply the credit from the original tickets toward the new booking. The original ticket numbers must be informed inside the FOP_TYPE_TICKET entry.

Authorizations:
(bearerAuthapiKeyAuth)
Request Body schema: application/json
required
booking_id
required
string non-empty

The unique identifier of the booking to be ticketed.

Example: "abc123def456"

required
Array of objects (InputFormOfPayment) non-empty

The list of forms of payment for this ticketing request. At least one form of payment is required.

new_slice_tokens
Array of strings

List of new slice tokens obtained from the slices of the selected offer in POST /exchange/estimate. Each token corresponds to a slice (journeys[i].slices[j].balance_token) in the estimate response.

Required for new booking reissuance (new PNR).

exchange_slice_tokens
Array of strings

Tokens of the existing booking slices to exchange (remove) during same-booking reissuance.

Required for same-booking reissuance (same PNR). Must match the exchange_slice_tokens sent to POST /exchange/estimate.

Responses

Request samples

Content type
application/json
{
  • "booking_id": "string",
  • "form_of_payments": [
    ],
  • "new_slice_tokens": [
    ],
  • "exchange_slice_tokens": [
    ]
}

Response samples

Content type
application/json
{
  • "tickets": [
    ]
}

/exchange/estimate - Simulate ticket reissuance

Simulates the reissuance of one or more tickets and returns a pricing estimate.

This endpoint supports both same booking reissuance (same PNR) and new booking reissuance (new PNR), depending on the provider and fare conditions.

The response contains a single offer for both same-booking (same PNR) and new-booking (new PNR) reissuance.

The offer contains the current price, the new price after reissuance, and the balance — representing either the amount due or the credit to the passenger.

This endpoint does not perform the actual reissuance. Use the estimate result to present the cost breakdown to the user before proceeding with POST /exchange.

The estimate has an expiration time returned in expires_at — after that, a new estimate must be requested.

Authorizations:
bearerAuthapiKeyAuth
Request Body schema: application/json
required
booking_id
required
string

The booking identifier containing the tickets to be reissued.

ticket_numbers
Array of strings

By-tickets mode. List of ticket numbers to simulate reissuance for.
Each number consists of 13 characters — leading zeros must not be omitted.

Example: ["0014995096800", "0014995096801"]

search_id
string

Same-booking mode. Identifier of the search (from GET /offers) that produced the new slice tokens.

new_slice_tokens
Array of strings

Same-booking mode. Tokens of the new slices to add to the booking.
Each entry may be a comma-separated list of leg tokens composing a slice.
Must have the same number of entries as exchange_slice_tokens.

exchange_slice_tokens
Array of strings

Same-booking mode. Tokens of the existing booking slices to exchange (remove).
Must have the same number of entries as new_slice_tokens.

Responses

Request samples

Content type
application/json
{
  • "booking_id": "string",
  • "ticket_numbers": [
    ],
  • "search_id": "string",
  • "new_slice_tokens": [
    ],
  • "exchange_slice_tokens": [
    ]
}

Response samples

Content type
application/json
{
  • "offer": {
    }
}