Getting Started
This guide is intended for partner who want to start using Wego Distribution APIs.
Technical Requirements
More Parameters in API Response in Future
APIs could provide more parameters in API response in future dates for improving functionality. These parameters may not be documented in this document, so please do not validate against new parameters.
IP Whitelisting for Accessing Staging Endpoints
Please note that only trusted IP addresses are allowed to access to Wego’s Staging endpoints. Partners shall provide list of IP addresses to Wego account manager for whitelisting before starting integration.
Rate Limiting
Use of the Wego Distribution APIs is subject to rate limits. Limits apply to all APIs on an application basis (based on client id). Please check with us for the rate limit number applied to your client id.
Note that rate limit can be increased or decreased upon request.
OAuth 2.0 Protocol for Authentication and Authorization
All API requests must adhere to OAuth 2.0 Protocol, and authorization will be determined by the scope assigned to each account.
The following OAuth 2.0 grant types are supported:
- Client Credentials, the access token request exchanges the client Id and secret to get an access token. The client Id and secret are the credentials for your client application.
How it works:
-
Obtain client credentials. You will need to obtain client credentials from Wego.
-
Request an access token. Request an access token by making a POST request to token endpoint with the client credentials provided and the specified scope.
curl -X POST https://api.wego.com/oauth/token \
-H 'Content-Type: application/json' \
-d '{
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"grant_type": "client_credentials",
"scope": "hotel.search"
}' -
Receive the access token. If successful, the response will contain the access token. With the access token, you can send the access token when make requests to the APIs. If the access token expires, then you need to obtain a new access token.
{
"access_token": "ACCESS_TOKEN",
"token_type": "bearer",
"created_at": 1704038400,
"expires_in": 43200,
"scope": "hotel.search hotel.booking"
} -
Call the API. Make calls to Wego Distribution APIs with your access token.
curl -X POST https://api.wego.com/ota/hotels/v1/all-rates \
-H 'Authorization: Bearer {access_token}' \
-d '[post data]'