Authorization
The host: https://api.worldota.net
.
The API key is the sequence of characters used to send API requests.
The ETG:
-
Requires HTTP Basic Authentication via the API key.
-
Grants the following API key types:
test
—the sandbox environment.production
—the production environment.
Sandbox environment
Use sandbox API keys only to book a test hotel test_hotel_do_not_book
.
Production environment
Use the production API keys to book hotels available via the ETG API.
You may have several production API keys across different contracts.
API key structure
The API key structure consists of the two values: <KEY_ID>:<API_KEY>
.
You can find the created API keys in the API section of your contract settings. Access to this section is provided for the Master account only.
KEY_ID
API key ID. Use it as an HTTP Basic Authentication username.
API_KEY
API key access token. Use it as an HTTP Basic Authentication password.
Request limits
Every endpoint has a limit to the number of requests. To discuss a change to the limits, contact your account manager.
The limit is specified in the corresponding header in the call response. The ETG specifies:
- The limit to the number of requests per specified period.
- The number of remaining requests per current period.
- The timestamp of the limitation period expiration.
X-RateLimit-SecondsNumber
The seconds’ number of requests that can be executed within the X-RateLimit-RequestsNumber
.
X-RateLimit-RequestsNumber
The maximum seconds number of requests that can be executed within the X-RateLimit-SecondsNumber
.
X-RateLimit-Remaining
The remaining seconds’ number of requests in the current period of the X-RateLimit-SecondsNumber
.
The number is out of the X-RateLimit-RequestsNumber
.
X-RateLimit-Reset
The date and time of expiration for the period of the X-RateLimit-SecondsNumber
. In the UTC+0 time zone, seconds.
Limits example
"X-RateLimit-SecondsNumber": 1
"X-RateLimit-RequestsNumber": 10
"X-RateLimit-Remaining": 9
"X-RateLimit-Reset": "2018-08-14T08:54:11"