For any type of API each URL starts with https://app.bananastand.io/api/v1/ and the paths listed below are after that URL part.
NOTE: The api is mainly used to manage your event data.If you’re looking to push events or get the HTML content for a product page see the Public API instead.
To use the REST resources you must first authenticate:

Authentication for the REST API

Each request needs to have the following headers set:

Header Description
X-Public-Key This is your store’s public key.
X-Secret-Key This is your store’s secret key.

Note: You can also pass the public and secret keys as parameters using the
secret_key and public_key attributes on any request.

Product Events

Method Path Description
GET product_events.json Get list of product events. Accepts a ?page=213 parameter to get a certain page of data.
Page size is 20 items.
Default sorting is most recent to oldest event.
GET product_events/:product_event_id.json Fetch a single event. :product_event_id is the ID of the product event object.
DELETE product_events/:product_event_id.json Delete an event. :product_event_id is the ID of the product event object.

Get Product Event Counts

Method Path Description
GET product_counters.json Get a list of all product counters for the current store.
GET product_counters/:product_id.json Get the counters (of all types) for the product specified
:product_id is the ID of the product (from your eCommerce platform) that you want to get counts for.
Example: Request: GET https://app.bananastand.io/api/v1/product_counters/1234.json,
Response: [ { count: 32, type: 'add_to_cart', updated_at: "2017-08-23T19:09:16.477Z" }]
See the event codes list for your options.
GET product_events/:product_id/:event_type.json Get the count for the product and event type specified.
:product_id is the ID of the product (from your eCommerce platform) that you want to get counts for.
:event_type is the event type code that we’re wondering about. See the event codes list for your options.
Example: Request: GET https://app.bananastand.io/api/v1/product_counters/1234/view.json,
Response: { count: 32, updated_at: "2017-08-23T19:09:16.477Z" }

Note: If you get a 404 response this means that the count does not exist in the system and you can assume the number is at 0.