Reports API documentation

Authentication 

Each store has a unique token. You can copy it from the API page at https://app.backinstock.org/account/api (note: your account must be on the Medium store plan or higher to use the API).
Authentication is handled using HTTP Basic and supplying the token as your username.

For example, using curl where your token is ABCD1234:

curl https://[email protected]/api
	

Accessing the variants report

The variants report is returned as JSON. 

curl https://[email protected]/api/variants
							

This returns a JSON array of data, for example: 

[{
  "sku": "bullseye-01",
  "product_id": 280917149,
  "variant_no": 661821745,
  "description": "Bullseye Small / with accessories", 
  "unsent_notifications_count": 223, 
  "sent_notifications_count": 0,
  "notifications_count": 223, 
  "notification_last_added_at": "2015-03-23T13:34:41.084Z", 
  "unit_price": "49.00"
} ]
											

You can provide the following params to construct a query: 

´┐╝per_page
Number of results returned

page
Page of results returned. Default is 1.
q
Return only product variants with a matching SKU.
sort
Field to sort by. Can be one of:
  • notification_last_added_at 
  • notification_last_sent_at 
  • notifications_count 
  • sent_notifications_count 
  • unsent_notifications_count
order
Return the data ascending or descending order. Can be one of asc, desc

Example: Getting the most wanted variants

curl https://[email protected]/api/variants?sort=unsent_notifications_count&order=desc
								

Example: Getting the the data for a variant with the SKU zurg-01 

curl https://[email protected]/api/variants?q=zurg-01
								

Still need help? Contact Us Contact Us