Associate URL Scheme and X-Callback-URL Documentation

Associate is a utility that makes it easy to create affiliate links to products on Amazon. The Amazon Associates program allows you to link to products and earn commissions from those links. After you are accepted into the program and receive an associate identifier, you can use Associate to automate the process of creating affiliate links.

URL Scheme Support

Root Scheme - associate://

Associate provides workflow integration with other apps via the x-callback-url protocol. Using Associate's built in actions you can search for products and convert existing links into affiliate links that include your associate identifier.
Associate registers the "associate://" URL scheme. Try typing "associate://" into the mobile Safari address bar. If you have Associate installed, it should open.

But opening the app is just the start. The Associate URL scheme can be used to search for products and copy a markdown-formatted or plain version of the resulting affiliate link and to convert existing URLs to affiliate links. Using the x-callback-url protocol, you can invoke Associate from another app that supports the x-callback-url protocol and send the results to that or any other app that supports x-callback-url.

Search for Media With Associate:

Search
Use Associate's URL scheme to quickly look up products on Amazon and create an affiliate link that you can drop into any other app or document.

Actions and Parameters

  • Action: search
  • Parameter: q (required)
  • Parameter: x-success (optional)
  • Example:

associate://x-callback-url/search?q=headphones

You can add the x-success parameter to your url to return a plain or markdown link to another app. Your x-success parameter must include a "[[link]]" placeholder for Associate to pass the link it generates to a destination app. For example sending:

associate://x-callback-url/search?q=headphones&x-success=drafts4://x-callback-url/create?text=[[link]]

from the iOS app Drafts by Agile Tortoise will open Associate and start a search for headphones, and allow you to return the resulting affilliate link to Drafts. What you can do with a link via the x-success parameter will depend on the url scheme of the destination app. For instance, instead of creating a new note in Drafts containing the link generated by Associate, you could append the link to an existing note.

Convert Links
Associate can convert any link to an Amazon product page into an affiliate link. This includes links which have been shortened or include other redirection mechanisms.

Actions and Parameters

  • Action: convert
  • Parameter: url (required)
  • x-success (optional)
  • Example:

    associate://x-callback-url/convert?url=[[draft]]&x-success=drafts4://x-callback-url/create?text=[[link]]