Skip to main content
Version: 3.0.0

Flight B2B Distribution APIs v3

Introduction

This B2B API provides endpoints for partners to search and retrieve available flight prices and itineraries based on specific search criteria.

Workflow

For Integrating as Metasearch Partners

  1. Search Flight Prices: When customers make a search on partners' sites, call this API to get availability and pricing for flights matching the search criteria.
  2. Redirect customers to Wego's site when they click on any of Wego's flight options on partners' sites to resume the flow.

FAQ

  1. Caching of the pricing and availability.

    Pricing and availability can change constantly, so we recommend not caching for more than 30 minutes. If caching is implemented on the partner's side, we recommend not caching by locale and currency as well.

  2. Timeout for API calls.

    For the benefit of user experience, we recommend setting a timeout of 30 seconds for the search flight prices method.

  3. Currencies supported at Wego site.

    USD, AED, AOA, ARS, AUD, AZN, BDT, BHD, BRL, BWP, CAD, CDF, CHF, CLP, CNY, COP, DZD, EGP, ETB, EUR, GBP, GHS, HKD, IDR, INR, IQD, IRR, JOD, JPY, KES, KRW, KWD, LBP, LKR, LYD, MAD, MOP, MUR, MXN, MYR, MZN, NAD, NGN, NZD, OMR, PHP, PKR, PLN, QAR, RUB, RWF, SAR, SDG, SEK, SGD, SYP, THB, TND, TRY, TWD, TZS, UGX, VND, XAF, XOF, ZAR, ZMW

  4. Languages supported at Wego site.

    ar, de, en, es, fa, fr, id, it, ja, ko, ms, nl, pl, pt, ru, sv, th, tr, vi, zh-cn, zh-hk, zh-tw

  5. Search criteria Wego can support.

    There are some search restrictions to note:

    • Max adults per search: 9
    • Max children per search: 8
    • Max infants per search: 8
  6. For partners to understand customers' behavior on Wego's site.

    Wego's site supports Pixel tracking for attribution, capable of tracking pre-conversion and conversion events. Partners can append additional parameters into the landing URL for tracking purposes.

Error Handling

If the API encounters an error while processing your request, an HTTP response code will be returned, along with an error code and message in the API response.

HTTP Status Codes

Status CodeStatus MeaningStatus Definition
400Bad RequestThe request could not be understood by the system, malformed syntax.
401UnauthorizedIf ApiKey not found or IP address restrictions violated.
403ForbiddenIf the authenticated client is not allowed to access the resource.
429Too Many RequestsIf the client has sent too many requests in a period of time.
500Internal Server ErrorUnrecoverable problem in the processing of the API call.
503Service UnavailableDue to maintenance that is either planned or ad-hoc, service is temporarily unavailable.

Error Codes

CodeMessage
10001Invalid clientId or clientSecret or grantType or scope
10002Application expired
10011Authorization required
10012Authorization required
10013Authorization required
10014Authorization error
10015Authorization error
10016Authorization error
10017Authorization failed
10021Rate limit exceeded
10022Rate limit exceeded
40001Invalid headers
40002Invalid query
40003Invalid body
40004Invalid params
4000Session invalid or expired
40101Unauthorized
40301Forbidden
40401Path not found
50301Service unavailable
9999Unexpected error

Authentication

Security Scheme Type:

oauth2

OAuth Flow (clientCredentials):

Token URL: https://api.wegostaging.com/oauth/token

Scopes:

  • flight.search: Grant search flight prices