To declare a favorite sport for a member without requiring his connection you can use a client credential access.
This access method requires the specific scope sports:register
.
This scope should be requested from DECATHLON login through their smax offering
This HTTP API is defined like this:
Following an example of call to the add endpoint with curl tools:
curl --location --request POST
'https://api-global.decathlon.net/sports_practices/members/e0e1ded4-71ad-419e-b257-9f7d5c8c1b12/32'
--header 'X-Location: <location>'
--header 'x-api-key: <x-api-key>'
--header 'Authorization: Bearer <jwt_credential_decathlon_login>'
location header: Is the geographical zone of the member to which the sport is going to be added (ISO 3166 alpha 2)
Example of response returned by the API
[
{
"sport_id": 32
}
]