API Endpoints

Our RESTful API provides multiple ways to generate affiliate links

GET /avantlink/{AVANLINK_AFFILIATE_ID}

Generate Single Affiliate Link

Convert any product URL into a monetized affiliate link. Try it.

Just send a URL. We'll use your default website.

https://api.snaplinker.com/avantlink/{AVANLINK_AFFILIATE_ID}?url={http://www.example.com}

Example Request:

https://api.snaplinker.com/avantlink/28861?url=https://www.competitivecyclist.com/

Example Response:


{
  "url": "https://www.avantlink.com/click.php?tt=app&ti=1019&mi=11465&pw=37705&url=https%3A%2F%2Fwww.competitivecyclist.com%2F"
}
          

Or you can include a specific website with the URL.

https://api.snaplinker.com/avantlink/{AVANLINK_AFFILIATE_ID}?website_id={WEBSITE_ID}&url={http://www.example.com}

Example Request:

https://api.snaplinker.com/avantlink/28861?website_id=37705&url=https://www.competitivecyclist.com/

Example Response:


{
  "url": "https://www.avantlink.com/click.php?tt=app&ti=1019&mi=11465&pw=37705&url=https%3A%2F%2Fwww.competitivecyclist.com%2F"
}
          
POST /avantlinks/{AVANLINK_AFFILIATE_ID}

Generate Multiple Affiliate Links

Convert multiple URLs into monetized affiliate links with a single request.

https://api.snaplinker.com/avantlinks/{AVANLINK_AFFILIATE_ID}

Example Request:

POST https://api.snaplinker.com/avantlinks/28861
Content-Type: application/json

{
  "urls": [
    "https://www.competitivecyclist.com/",
    "https://www.backcountry.com/",
    "https://www.rei.com/"
  ]
}

Example Response:


{
  "urls": {
    "https://www.competitivecyclist.com/": "https://www.avantlink.com/click.php?tt=app&ti=1019&mi=11465&pw=251821&url=https%3A%2F%2Fwww.competitivecyclist.com%2F",
    "https://www.backcountry.com/": "https://www.avantlink.com/click.php?tt=app&ti=1019&mi=10421&pw=251821&url=https%3A%2F%2Fwww.backcountry.com%2F",
    "https://www.rei.com/": "https://www.avantlink.com/click.php?tt=app&ti=1019&mi=10248&pw=251821&url=https%3A%2F%2Fwww.rei.com%2F"
  }
}
          
GET /search/{AVANLINK_AFFILIATE_ID}

Search Products

Search all available products across multiple merchants and return affiliate links.

https://api.snaplinker.com/search/28861?search_term={SEARCH_TERM}

Example Request - Basic Search:

Try It

https://api.snaplinker.com/search/28861?search_term=hiking+boots

Example Request - Advanced Search:

Try It

https://api.snaplinker.com/search/28861?website_id=37705&search_term=hiking+boots&search_price_minimum=100&search_price_maximum=200&search_brand=Salomon,Merrell&merchant_ids=10248,10421&search_results_count=10

Example Request - Sale Items Only:

Try It

https://api.snaplinker.com/search/28861?website_id=37705&search_term=hiking+boots&search_on_sale_only=1

Example Response:


{
  "result": {
    "product_count": 25,
    "product_list": [
      {
        "product_name": "Salomon X Ultra 3 Mid GTX Hiking Boots",
        "brand_name": "Salomon",
        "price": "$164.95",
        "merchant_name": "REI",
        "buy_url": "https://www.avantlink.com/click.php?tt=app&ti=1019&mi=10248&pw=251821&url=https%3A%2F%2Fwww.rei.com%2Fproduct%2F123456%2Fsalomon-x-ultra-3-mid-gtx-hiking-boots",
        "image_url": "https://www.rei.com/media/product/123456",
        "sale_price": null,
        "description": "Waterproof hiking boots with excellent traction and support",
        "category": "Footwear",
        "subcategory": "Hiking Boots"
      },
      {
        "product_name": "Merrell Moab 2 Mid Waterproof Hiking Boots",
        "brand_name": "Merrell",
        "price": "$145.00",
        "merchant_name": "Backcountry",
        "buy_url": "https://www.avantlink.com/click.php?tt=app&ti=1019&mi=10421&pw=251821&url=https%3A%2F%2Fwww.backcountry.com%2Fproduct%2F789012%2Fmerrell-moab-2-mid-waterproof-hiking-boots",
        "image_url": "https://www.backcountry.com/media/product/789012",
        "sale_price": "$115.95",
        "description": "Versatile hiking boots with proven comfort and durability",
        "category": "Footwear",
        "subcategory": "Hiking Boots"
      },
      {
        "product_name": "Keen Targhee III Mid Waterproof Hiking Boots",
        "brand_name": "Keen",
        "price": "$175.00",
        "merchant_name": "REI",
        "buy_url": "https://www.avantlink.com/click.php?tt=app&ti=1019&mi=10248&pw=251821&url=https%3A%2F%2Fwww.rei.com%2Fproduct%2F456789%2Fkeen-targhee-iii-mid-waterproof-hiking-boots",
        "image_url": "https://www.rei.com/media/product/456789",
        "sale_price": "$139.95",
        "description": "All-terrain hiking boots with excellent ankle support",
        "category": "Footwear",
        "subcategory": "Hiking Boots"
      }
    ]
  }
}
          

Available Search Parameters:

Parameter Description Required
search_term The product to search for Yes
website_id Your AvantLink website ID No
merchant_ids Comma-separated list of merchant IDs to search No
search_brand Comma-separated list of brands to include No
search_price_minimum Minimum product price No
search_price_maximum Maximum product price No
search_on_sale_only Set to 1 to show only sale items No
search_results_count Number of results to return No
search_results_sort_order Sort order for results (price_asc, price_desc, etc.) No
GET /websites/{YOUR_AFFILIATE_ID}

Get All Websites

Retrieve all websites associated with your affiliate ID. Try it.

https://api.snaplinker.com/websites/{YOUR_AFFILIATE_ID}

Example Request:

https://api.snaplinker.com/websites/28861

Example Response:


{
  "websites": [
    {
      "id": "abc123",
      "name": "My Outdoor Blog",
      "url": "https://www.myoutdoorblog.com",
      "default": true
    },
    {
      "id": "def456",
      "name": "My Tech Reviews",
      "url": "https://www.mytechreviews.com",
      "default": false
    }
  ]
}
          

Response Fields:

Field Description
id External ID of the website (useful for API calls)
name Name of the website
url URL of the website
default Boolean indicating if this is your default website
GET /websites/{YOUR_AFFILIATE_ID}/default

Get Default Website

Retrieve the default website for your affiliate ID. This is useful when you want to quickly get your default website settings without parsing through all websites. Try it.

https://api.snaplinker.com/websites/{YOUR_AFFILIATE_ID}/default

Example Request:

https://api.snaplinker.com/websites/28861/default

Example Response:


{
  "website": {
    "id": "abc123",
    "name": "My Outdoor Blog",
    "url": "https://www.myoutdoorblog.com",
    "default": true
  }
}
          

Response Fields:

Field Description
id External ID of the website (useful for API calls)
name Name of the website
url URL of the website
default Always true for this endpoint

Error Responses:

Status Code Description
404 Not Found Returned when the affiliate ID is not found or when no default website exists
500 Internal Server Error Returned when a database error occurs
Documentation copied to clipboard!

Simple Integration

Add just a few lines of code to your application to start generating affiliate links.

// JavaScript example - Single URL
fetch('https://snaplinker.com/avantlink/1019?website_id=37705&url=https://example.com/product')
  .then(response => response.json())
  .then(data => {
    console.log('Affiliate URL:', data.url);
  });
// JavaScript example - Multiple URLs
fetch('https://snaplinker.com/avantlinks/1019', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    website_id: 37705,
    urls: [
      'https://example.com/product1',
      'https://example.com/product2',
      'https://otherstore.com/item'
    ]
  })
})
  .then(response => response.json())
  .then(data => {
    console.log('Affiliate URLs:', data.urls);
  });