Getting started with Analytics API
Getting started with Analytics API is simple. Just get an API key and a shared secret and begin testing.
1. Become a partner
To integrate with the Analytics API, you’ll first need to become a White Label Template partner. If you haven’t done so yet, you can apply on our Expedia Partner Solutions site.
Become a White Label Template partner
2. Select your options
Once you’ve become a partner, you can choose from our data domain options:
- Loyalty Earn: Let your customers earn points when they purchase travel through you
- Itineraries: Provide your customers with support to adjust or cancel the travel plans they’ve made through your site
Next, you’ll get your API credentials and set up authentication. The authentication method will differ based on the delivery mechanism you’re integrating.
3. Prep for Push method authentication
Notifications will be sent via the Push method to the endpoint you provide. To ensure secure and trusted data transmission, each event will include a header signature that’s generated using your API key and shared secret. The header signature will enable you to authenticate and verify Expedia as the sender.
4. Configure Pull method authentication
To get access to the Loyalty Earn and Itineraries endpoints, you’ll need an API key and a shared secret.
4.1 Request an access token
You’ll be provided a valid token that incorporates your credentials (reach out to your Technical Account Manager for more information). This token uses the HTTP Basic Authentication mechanism. You’ll need to supply a authorization header that contains a base64 encoded string of your API key and shared secret.
Example:
Authorization: Basic {api-key}:{shared-secret}
The call will then be made to the token endpoint documented in the OpenAPI spec.
securitySchemes:
oauth:
type: oauth2
flows:
clientCredentials:
tokenUrl: https://analytics.ean.com/template/v1/oauth/token
A valid authentication call will return a bearer token that you’ll use in the next step.
4.2 Make a request to the API using the token
We use bearer token authentication for the transactions
or last_update
endpoints. You will need to supply an authorization header which contains the token you received in the previous step.
Example:
Authorization: Bearer {token}
4.3 Test your requests
Once you have received your credentials and have configured your authentication, you can start making requests against our testing endpoint, https://test.analytics.ean.com/
. Any data returned via this endpoint is sample data; its only purpose is understanding the structure of the data.
When testing, you’ll need to specify your API version. Use the servers.url
value in the OpenAPI spec to construct the URL. These two values are standard:
- Integration validation:
test.analytics.ean.com
- Production endpoint:
analytics.ean.com
Note: When switching between endpoints, be sure to keep the protocol and path designation (https://[test.]analytics.ean.com
).
Example:
https://test.analytics.ean.com/template/v1/loyalty/earn/last_update
https://test.analytics.ean.com/template/v1/itineraries
The servers.url
value is found at the top of our downloadable OpenAPI spec files and will always correspond with the version number for the given API service.
Example:
openapi: 3.0.1
info:
title: Analytics API
description: Analytics API V1
version: v1
tags:
- name: Analytics
description: Template Analytics API
servers:
- url: https://analytics.ean.com/template/v1
- url: https://test.analytics.ean.com/template/v1