Making requests
Here are the flow to set up your first request.
Get API account
Before building you will require a client-account and API gateway key(API access key). Please contact Travlinq support
team and get a client account and API gateway key.
API Access Key
You'll need to include an API access key(X-API-KEY
) in every request that you make to the API. The access token can be taken from Travlinq support team.
Authentication
You'll need to include an access token(sessionId
) in every request that you make to the API. The access token can be generated from Auth service
by using client account. The accesses token will be valid only for 6 hour(Duration is configurable). After token is expired user has to regenerate and use new token for following API calls. When token is expired user will get VAL-002 error code.
To create an access token, go with Auth service
flow.
MIME types
All responses from the API are in JSON format with UTF-8 encoding. An Accept header is required with every request:
Compression
We recommend enabling compression for responses returned by the API, since might be large. To enable compression, send an Accept-Encoding header:
You'll need to configure your HTTP client to decompress responses. Most clients will have this functionality built-in.Tracking transaction flow
You should set a common UUID for conversationId header. So you have to maintain single id for search to book. By providing proper conversationId, issue tracking will be lot easier and it'll be helpful for stats collection purpose as well.
Then you will have to provide below parameters with request headers with all request to API
Header Name | Value |
---|---|
sessionId | take from login call |
conversationId | common UUID for entire flow |
X-API-KEY | API access key which is unique for each client |
Content-Type | application/json |
Accept-Encoding | gzip |
The http header should include your API Client Key(sessionId
) with below parameters to allow access to the API.
In your HTTP connector pass these headers, for example: