Setup
This article shows you how to quickly get set up as a developer and start testing our APIs on Wink.
Follow these steps:
- Register your user account on Wink
- Create a travel agent account or an affiliate account.
- Create an Application where you associate it with the account you created in Step 2.
- Once you’ve created your
Application
, save the client-id and client secret in a safe place.
At Wink, we use Cloudinary for all our image and video assets. When you access our travel inventory, you will have full access to all of Cloudinary’s advanced features.
Our cloud_name
is traveliko
.
Cloudinary
Section titled “Cloudinary”Example
Section titled “Example”For every travel inventory type we support, there will be a nested JSON array called multimedias
. The JSON for a multimedia entry looks like this:
{ "multimediaIdentifier": "multimedia-1", "identifier": "partners/radisson_blu_logo", "type": "IMAGE", "width": "1024", "height": "768", "category": "1", "descriptions": [ { "name": "Lobby", "description": "Picture of the lobby", "language": "en" } ], "lifestyleType": "LIFESTYLE_BUSINESS", "attribution": [ { "url": "https://www.hilton.com", "name": "Hilton" } ]}
The highlighted line above shows the Cloudinary unique ID partners/radisson_blu_logo
. That is all you need to retrieve the image in any format, quality and size you want.
Testing
Section titled “Testing”Head on over to our APIs section and choose the API you want to work with.
API docs
Section titled “API docs”Our documentation site is set up in such a way that you can run API commands from within the site.
In this example, you want to use the Search Lookups (OAuth2)
API call.
- Use the Lookup API to retrieve destinations or hotels.
- In the left navbar, click on
Authentication
. - Enter your client-id and client secret and click the
Get TOKEN
button. - If your credentials are valid, you will see that your API key has been applied.
- You can now test the lookup endpoint.
Postman
Section titled “Postman”You can do the same thing with Postman.
- Download Postman.
- Click on
Download OpenAPI spec
from the top of the Lookup API page. - Import it into Postman.
- If you imported it as a new collection called
Wink API
, click on the horizontal elipsis (3 dots) next to the collection name and clickEdit
. - In the
Authorization tab
, set theAuth type
to OAuth2. - Set the field
Add auth data to
toRequest headers
. - Set the field
Header prefix
toBearer
. - Set the field
Token Name
to whatever you want to name your saved token in Postman. E.g. Wink Staging. - Set the field
Grant type
toClient Credentials
. - Set the field
Access token URL
to https://staging-iam.wink.travel/oauth2/token. - Set the field
Client ID
to the Client ID your app helped generate. - Set the field
Client Secret
to the Client Secret your app helped generate. - Set the field
Scope
toinventory.read inventory.write inventory.remove
. Those are all the scopes you will need for Wink. - Set the field
Client Authentication
toSend as Basic Auth header
. - Click the
Get New Access Token
button to retrieve your token and save it. - For all API calls under the Wink API collection, make sure the authentication tab says
Inherit auth from parent
so it includes your token with every call.