Thanks to the APIs for measuring the performance of your Marketing communications, proposed by the HubMessage program, you will be able to :
All these APIs are mainly used to provide the Corporate dashboard for Marketing performance monitoring here : Marketing Dashboard
But they also give you all the autonomy you need to feed your own reporting or to integrate some information in existing tools.
For that, we created specific APIs, which are:
If your application already exists in the API Portal, go directly to the section : “FINAL STEP : COMMUNICATION KPI SUBSCRIPTION” at the bottom of this page.
To be able to use our API, you need to have a federation identity account. This account will allow you to authenticate your application in the Decathlon ecosystem.
Follow the steps below after clicking on the link :
Then, a page like below appears :
PLEASE BE SURE YOU COPY YOUR CLIENT SECRET (it appears only one time)
Now you have a client id
and client secret
you can simulate an authentication token in Postman
To do so, you need to encode your “clientID:secret” given above and get a token. Follow this link to encode
#Example for preprod
curl
-X POST
-H "Authorization: Basic bmV4dDpuZXh0Q2xpZW50U2VjcmV0"
-d "grant_type=client_credentials"
"https://preprod.idpdecathlon.oxylane.com/as/token.oauth2"
In the response, you should get a JSON object containing the following fields:
access_token
: access token for the user. This value must be secured.token_type
: type of token this is, typically just the string “bearer”.Expires_in
: number of seconds remaining, from the time it was requested, before the token will expire
#Response
{
"access_token":"2YotnFZFEjr1zCsicMWpAA",
"token_type":"Bearer",
"expires_in":3600,
}
If an error parameter occur, refer to the values listed below.
invalid_request
: Missing parameter or unsupported oneinvalid_client
: Invalid client ID or secretinvalid_grant
: The call is invalid or expired, or the redirect URL given in the authorization grant does not match the URL provided in this access token requestinvalid_scope
: Invalid scope value in the requestunauthorized_client
: This client is not authorized to use the requested grant typeunsupported_grant_type
: If a grant type is requested that the authorization server doesn’t recognizeClick here for more examples
Now that your application is authenticate in Decathlon ecosystem, you can connect your application to the API management portal in order to access our API
Register now on preprod and prod environment:
Bonus: read the best pratices for a preproduction configuration
On header, click on your profile on the top-right corner and select applications
client_id
for the right environement (The one you received when you created your project on FEDID)As you have now an offical application on the API Portal, you can search for “COMMUNICATION KPI” and subscribe to our API : “[Marketing] Communication KPI”
API Portal Communication KPI Preproduction access
API Portal Communication KPI Production access
All data is sent and received as JSON
Country codes follow the is norme ISO 3166 with 2 char (ex : FR)Language codes follow the norme ISO 639-1 with 2 char (ex : NL)