Twitter
medium-01.png
Email

Terms  |  Privacy Policy
© 2019 cashbot.ai INC  

DOCUMENTATION

Our APIs allow you to monetize your conversational experiences in two ways - when your users CLICK or when your users BUY. Once you have finished reading our documentation, head to the dashboard to give our APIs a try.

Integrations
 
Getting Started
 

CREATING AN ACCOUNT

  • First, create a Cashbot account. You can signup using either an email and password or Facebook login.

  • If you choose to signup using an email and password, you will also need to verify your email by clicking on the verification link we send you in a verification email. You will not be able to access any of the cashbot features until you verify your account.

  • If you choose to signup with Facebook login, you will need to authorize access to your Facebook profile. We use your Facebook email to create your account. We do not share your Facebook profile information with any third parties.

  • Once you have created an account, you will be able to add bots, create agents, and provision API keys.

ADDING CHATBOTS

First, you will add a bot. By telling cashbot about your chatbot, you enable cashbot to make better recommendations. Information about your chatbot can be found on your chatbot admin page and chatbot analytics page. 

CHOOSING AGENT TYPE

Next, you choose the type of agent to create, one that makes you money when user CLICK, called an AI Agent, or one that makes you money when users buy, called a Non-AI Agent.

AI Agents

Make money when cashbot's AI-driven platform connects your users with brand experiences that they will enjoy.

Non-AI Agents
Make money when your users buy products. Connect your affiliate number or store to make customized product recommendations. 

Note: if you do not enable and configure an Amazon Affiliate tracking ID, you will not receive payment for your product recommendations. Become an Amazon Associate here. Once you have enabled and configured an Amazon Affiliate tracking ID, payments will be processed and paid directly from your Amazon Affiliate account. cashbot does not currently handle payments to developers.

Currently, there is one optional recommendation source, Amazon. If you are interested in additional recommendation sources, please submit a request to support@cashbot.ai.

CREATING AN AI AGENT

Choose keywords to help your agent match your chatbot users with the best recommendations. These should be related to your bot users and what they may like to see in your chatbot.

 

Then choose the bot integration type.

CREATING A NON-AI AGENT

Training a Non-AI Agent

You will need to train cashbot to understand what products your users will be interested in by adding keywords. You can add them one by one or as a comma delimited string, then click TRAIN AGENT.

Cashbot will show up to 75 products related to your keywords, categorized in sets by each keyword. You can edit your product list and the product descriptions. Once you have completed the updates to your product list, click SAVE.

Customizing Your Agent

Choose widget display style and what your button will say. Considerations include how many products to display at once, and the style of the display.

BOT INTEGRATION
Copy the API keys and integrate in your chatbot conversation at opportune moments in chatbot conversation flow.

Authenticating Requests
 

Every request to cashbot.ai must include your API key in the header of the request.

Every POST request to cashbot.ai must also include a content type of JSON. Other media types are currently not supported.

NODE:

x-api-key: AGENT_TOKEN Content-Type: application/json

RECOMMEND Reference
 

These are the main cashbot.ai APIs for receiving and improving product recommendations.

NOTE: there are a rate limits of 100 requests per second and 1,000,000 total requests per month for these types of requests. If these rate limits are too restrictive, please e-mail us at support@cashbot.ai.

Bolded query parameters are required.

All requests and responses should be in JSON format.

QUERY Reference
 

Below are a set of APIs that can be used to query for information about your account.

NOTE: there is a rate limit of 50 requests per 10 minutes for these types of requests. If these rate limits are too restrictive, please e-mail us at support@cashbot.ai.

Bolded query parameters are required.

All requests and responses should be in JSON format.


GET /query/inputs

Get a “raw dump” of inputs over a given time period.

Query Parameters

Parameter

start

end

type

Default

all

Type

integer

integer

integer

Description

A unix timestamp in milliseconds representing the inclusive start of the query date range

A unix timestamp in milliseconds representing the inclusive end of the query date range

A value from the enumerated types of the userInput object, defaults to “all”


Response

ARRAY userInput objects

NODE:

var request = require('request');

var options = {

      url: 'https://api.cashbot.ai/recommend/USER_ID?n=2',

      method: 'GET',

      headers: [

       {

        name: 'x-api-key',

        value: 'AGENT_TOKEN'

       },

       {

        name: 'Content-Type',

        value: 'application/json'

       }

      ]

};

 

request(options, function(err, res, body) { if (err) { console.log('[ERROR] GET recommend', err); } else if (res.statusCode === 401) { console.log('[ERROR] GET recommend: authorization failed'); } else if (res.statusCode === 400 || res.statusCode === 405) { console.log('[ERROR] GET recommend: bad request'); } else { console.log(JSON.parse(body)); } });