Wildfire APIs
Creating links
13min
overview there are two ways to create links that will attribute commissions to you and your users vanity urls expanded urls with wildfire there are a couple of ways to create links that will give credit for commissions to you and your users there are two main use cases we support your user wants to share a link to a merchant (any page at a merchant, like a product page) so they can earn when their shared link is used to make a purchase these links are usually shortened, so they're easy to add to an email, text message, etc we call these vanity urls everything else, including when users want to earn cashback on their purchases, click through a cashback appeal in search results for products, etc we call these expanded urls vanity urls because vanity urls are shortened, they need to be created "as needed" and so they require making a call against our apis you can learn about how to use our api to create a vanity url as part of our postman collection https //documenter getpostman com/view/24961/rwgqvyv2#7270bd71 9970 42dd 945f 3c1eb9ef9f9e expanded urls if you want to create an expanded url, there's no api hit required you'll build this url using a couple pieces of data you just need to know the merchant id and device id (to create a device id, see our api docs ) here's an example of an expanded url that uses wildlink me as the example domain https //wild link/e?c=merchant id here\&d=wf device id here\&url=https%3a%2f%2fwww walmart com%2fcp%2fcamping gear%2f4128 the c value in this example is the wildfire merchant id the d value is an attributed wildfire device if your product doesn't use devices because it's not a client side software, just choose any of your devices for this value you can learn more about how to create a device for your application in the postman collection https //documenter getpostman com/view/24961/rwgqvyv2#d96bcd5d cad0 4e72 af91 9b00afceacc3 for the optional url value it should match the merchant id referenced in the c value and it should be url encoded note that the url value is a deep link and not the merchant's homepage the url parameter is optional if no deep link is required for your use case (i e a user clicking through a directory of merchants) and none is specified, then the link will take the user to a default url for the merchant (usually the homepage) you can find more information on how to get merchant ids for use in building these urls from the merchants and domains docid\ dqtk9k9qdr e76dt0g9zy article optional parameters once you have a url of either type (vanity or expanded) you may add optional parameters to the url for enhanced functionality note that most browsers only accept urls up to 2048 characters because of this, we recommend having the deep link url (if you're using it) as the last parameter to ensure that other parameters are not beyond the 2048 character limit where they may get dropped/ignored tracking code a tracking code (also known as a tc parameter) can be added to a url for tracking other information you want associated with purchases through these links this additional parameter can be added to either a vanity url or an expanded url example vanity url with a tc value appended https //wild link/walmart/abc123?tc=123e4567 e89b 12d3 a456 426614174000 example expanded url with a tc value appended https //wild link/e?c=5483936\&d=54321\&tc=123e4567 e89b 12d3 a456 426614174000\&url=https%3a%2f%2fwww walmart com%2fcp%2fcamping gear%2f4128 see also tracking code (tc) parameter docid\ pl3 phzaubmp4kwtmqukx while tc values can be used for tracking anything you want, it's important to include a user reference that consistently represents your user across all your platforms using a uuid value to represent a user across platforms allows wildfire to help with performance analysis and unit economic analysis while keeping your user's personal information private you should not pass an email address, phone number, etc in the tc value as this is private information that wildfire does not want access to unique user identifier in order to assign a unique value to each user you can add a uuid into the tracking code parameter (using the tc= parameter in the link example above) the uuid value should be in the universal unique identifier layout in its canonical textual representation, the 16 octets of a uuid are represented as 32 hexadecimal (base 16) digits, displayed in five groups separated by hyphens, in the form 8 4 4 4 12 for a total of 36 characters (32 hexadecimal characters and 4 hyphens) for example 123e4567 e89b 12d3 a456 426614174000 xxxxxxxx xxxx mxxx nxxx xxxxxxxxxxxx here is an additional resource https //en wikipedia org/wiki/universally unique identifier that describes uuids further preferred country a wildfire application has a single country associated with it in some cases, our partners operate exclusively within a single country while others operate in multiple countries our merchant programs often operate in several countries and matching your application and its users to the right merchant country is important by default, all links (vanity and expanded) will match your application's country to the appropriate merchant country to ensure proper affiliation for extension software, we further automatically match domain to merchant country (i e walmart ca for canada) so this association is handled automatically and there is no additional work required by our partners however, there are some use cases where a partner will want to select a specific merchant country a common example is an "offer wall" where the partner is using our apis to present a list of feature merchants when using a single application to present a merchant to users in multiple countries where the merchant operates (i e uk, canada) the partner needs to indicate which country wildfire should reference using the preferred country parameter (often described as the pc parameter), the partner can override the default application country it's important to note that not all merchants operate affiliate programs in all countries, so you will need to use getting to know the wildfire json data feeds docid\ bbiwqh1xlmejk6klsnmka that describes the countries each merchant supports because not every merchant supports every country you'll need to verify that you only use the codes specified for each merchant for example, the following merchant has it, fr, and gb available for earning commissions if your user is in one of these three countries this merchant can be used to earn commissions however, when creating the wild link the country code, matching the user’s location, must be specified if the user is in italy and you don’t specify the country code, using pc=it, the system will default to your application’s default country and potentially prevent commissions from being earned example merchant data { "id" 1234567, "name" "merchant name", "paysnewcustomersonly" false, "shareandearndisabled" false, "categories" \[ { "id" 49, "name" "women", "parentid" 1 }, ], "countries" \[ "it", "fr", "gb" ], "images" \[], "score" 0 } here's an example vanity url that can be used for a us application to force the affiliate to the walmart canada program vanity url https //wild link/walmart/abc123?pc=ca and here is the same example in an expanded url expanded url https //wild link/e?c=5483936\&d=1912282\&pc=ca\&url=https%3a%2f%2fwww walmart com%2fcp%2fcamping gear%2f4128 note that the value for the pc parameter is not case sensitive note also that the two letter country codes referenced here map to the iso two letter standard note also that you should avoid selecting an invalid value for the pc parameter by all means if an invalid value is passed in the pc parameter (either a completely invalid value like "xx" which is not a real country code or a a valid country code that isn't a country that the merchant operates in), the wildfire system will select the program with the highest max commission amount which may not match the application's default country