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.
Testing
Head on over to our APIs section and choose the API you want to work with.
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
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.