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
- 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.
- Redirect customers to Wego's site when they click on any of Wego's flight options on partners' sites to resume the flow.
FAQ
-
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.
-
Timeout for API calls.
For the benefit of user experience, we recommend setting a timeout of 30 seconds for the
search flight prices
method. -
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
-
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
-
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
-
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 Code | Status Meaning | Status Definition |
---|---|---|
400 | Bad Request | The request could not be understood by the system, malformed syntax. |
401 | Unauthorized | If ApiKey not found or IP address restrictions violated. |
403 | Forbidden | If the authenticated client is not allowed to access the resource. |
429 | Too Many Requests | If the client has sent too many requests in a period of time. |
500 | Internal Server Error | Unrecoverable problem in the processing of the API call. |
503 | Service Unavailable | Due to maintenance that is either planned or ad-hoc, service is temporarily unavailable. |
Error Codes
Code | Message |
---|---|
10001 | Invalid clientId or clientSecret or grantType or scope |
10002 | Application expired |
10011 | Authorization required |
10012 | Authorization required |
10013 | Authorization required |
10014 | Authorization error |
10015 | Authorization error |
10016 | Authorization error |
10017 | Authorization failed |
10021 | Rate limit exceeded |
10022 | Rate limit exceeded |
40001 | Invalid headers |
40002 | Invalid query |
40003 | Invalid body |
40004 | Invalid params |
4000 | Session invalid or expired |
40101 | Unauthorized |
40301 | Forbidden |
40401 | Path not found |
50301 | Service unavailable |
9999 | Unexpected error |
Authentication
- OAuth 2.0: OAuth2
Security Scheme Type: | oauth2 |
---|---|
OAuth Flow (clientCredentials): | Token URL: https://api.wegostaging.com/oauth/token Scopes:
|