Snapdeal affiliate api in php
This tutorial about affiliate marketing of snapdeal products, Last month i have create tutorial on flipkart affiliate api to fetch flipkart products, Same process will be follow again but here i’ll show you how to fetch snapdeal products using snapdeal affiliate api.
If you are not aware about what is affiliate marketing then below is the sort definition..
What is affiliate marketing
Affiliate marketing is the process of earning a commission by promoting other people’s (or company’s) products. You find a product you like, promote it to others, and earn a piece of the commission for each sale that you make.
Or for more info about affiliate marketing you can google it.

For fetching snapdeal products i created a simple api in php, You only need to pass three parameter, Your affiliate id, Your token no. and Product feed url.
To generate snapdeal affiliate id and token goto snapdeal affiliate panel and create an account.
https://affiliate.snapdeal.com/

Lets start the tutorial.
Create a php class file and write some curl operation, pass required header like snapdeal affiliate id, token no etc to authenticate your request.
snapdealApiClass.php
getMessage();
}
}
}
?>
After that initialize snapdealApi class and call the getData function.
But before calling the function you have to pass two parameter url and datatype.
Pass these two parameter on getData function. Don’t forget to pass affilateID and token at the time of snapdealApi class initialization.
Here first i’ll fetch all snapdeal product categories and if you’ll click any category then you’ll able see all associated products of that category.
See live demo and download full source code.
DEMO |
DOWNLOAD |