Skip to content

Instantly share code, notes, and snippets.

@zeiv
Last active August 1, 2018 14:06
Show Gist options
  • Save zeiv/b4fafcd89f4fa27294259a2866c05949 to your computer and use it in GitHub Desktop.
Save zeiv/b4fafcd89f4fa27294259a2866c05949 to your computer and use it in GitHub Desktop.
trade.io Affiliate Partner Leads API

Introduction

Please Note: The current state of the documentation is written with ICO clients in mind, to be used for roadshow events. Examples and clarifications are given to reflect this.

Authentication

Requests should be authenticated using a bearer token which we will provide, like Authorization: Bearer TOKEN_HERE

API Host

The planned API host is https://aff.apis.trade.io, with an available test API on https://aff-test.apis.trade.io. This may be subject to change, however ample notice will be given.

Leads

To create a lead, this endpoint should be called whenever a user registers for a roadshow event, or otherwise enters their information on a page that an affiliate directed them to regarding a particular product.

POST /leads

Body

Required Params:

  • product_id - the ID of the product. In the case of ICO Roadshows, it will be an event ID which we provide.

Optional Params:

  • affiliate_id - the affiliate's 8-character ID.
  • email - the email address of the user funding the project.
  • mobile - the funding user's mobile phone number.
  • country - the funding user's country.
  • meta - any additional arbitrary metadata, as a serialized JSON string.
  • utm_source
  • utm_medium
  • utm_campaign
  • utm_term
  • utm_content
{
  "product_id": "event-id-here",
  "email": "user_email@example.com",
  "affiliate_id": "d93gd8a2",
  "meta": "{\"questions\": {\"Have you invested in any ICOs before?  If yes, which ones?\": \"TIO, DLBX\"}}"
}
Response

Success Reponse: 202 CREATED, no body.

Error Response Example:

422 Unprocessable Entity

{
  "error": {
    "message": "Invalid Product ID"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment