If you are a registered affiliate, you are granted access to the Affiliate APIs using your private Affiliate API Token. To generate the token:
- Ensure that you are registered as an affiliate (URL: https://affiliate.flipkart.com/registerme) and are logged into your account.
- Go to API > API Token (URL: https://affiliate.flipkart.com/api/api-token).
- The Affiliate Tracking ID field is populated automatically.
- Click Generate API Token.
Only one token is allowed per affiliate account. Generating a new token disables the old one.
You can access the APIs by passing the following headers as an HTTPS request. Without the headers, the APIs respond with an authentication error.
Sample HTTPS request
curl -H "Fk-Affiliate-Id:<your Affiliate Tracking ID>" -H "Fk-Affiliate-Token:<your Affiliate API Token>" "<API URL>"
Once the token is generated, your Affiliate Tracking ID automatically becomes eligible to access the API via HTTPS request. All the URLs returned by the API feeds are appended with your tracking ID, by default.