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:

  1. 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.
  2. 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.

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.

Text

  • 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.
  • 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 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:

Text


Example Expanded URL with a TC value appended:

Text


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 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 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:

JSON


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


And here is the same example in an Expanded URL:

Expanded URL


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.