Data APIs (Dashboard Stats and Recoveries)

The Data APIs allow you to query the data that is displayed on the CartStack dashboard.

First, you will need to obtain your encrypted Site ID and API Key from your account setup page.  Click on the "Site ID / API Key" button on the right sidebar of the settings page.  From here you can copy the Site ID and generate a new API key.

There are two different service URLs, one for the dashboard stats (open rate, click rate, recovered revenue, etc.) and one for recovered orders (recovery date, email address and order amount).  Here are the URL endpoints and their respective parameters...

Dashboard Stats:  https://admin.cartstack.com/secure/cartstack_api_dashboardstats.php

Required parameters: Site ID (siteid), API Key (apikey)

Optional parameters: Days Returned(days), Date Range(startdate, enddate | format yyyy-mm-dd) and Return Type (sum or day). Default is 30 days with summary format.

Data Limitations: You are only allowed to select up to 365 days of data per request.  Also, dashboard data is only available for approximately 2 years.  The "Return Type" controls the data that is received.  If the return type is set to "sum" or blank it will only return a summary of the dashboard stats for the date range.  If the return type is set to "day" it will return an array of data broken out by date in addition to the summary results.  See below for an example...

Recovered Orders: https://admin.cartstack.com/secure/cartstack_api_recoveries.php

Required parameters: Site ID (siteid), API Key (apikey)

Optional parameters: Days Returned(days), Date Range(startdate, enddate | format yyyy-mm-dd). Default is 30 days.

Data Limitations:  You are only allowed to select up to 365 days worth of data per request.  Also, the recovery data is only available for approximately 13 months.  See below for an example...

API Call Examples:

Here are a couple examples (Remember you must get your site id and API Key from your setup page in the CartStack admin):


https://admin.cartstack.com/secure/cartstack_api_dashboardstats.php?siteid=xxxxxx&apikey=xxxxxxxxxxxxxxxxxxxxxxx&returntype=day

The response will be in JSON format, for example:
{"site":{"URL":"www.cartstack.com"},"query":{"Site ID":"xxxxxxxx","Start Date":"2019-11-18","End Date":"2019-12-18"},"dashboard":{"summary":{"Recovered Revenue":953451.96,"Abandon Carts":58559,"Recovered Carts":7244,"Conversion Rate":0.12,"Average Order":131.62,"Email Sent":131397,"Open Rate":0.356,"Click Rate":0.085,"Bounce Rate":0.005,"Unsubscribes":1522},"daily":[{"Date":"2019-12-18","Recovered Revenue":5267.26,"Abandon Carts":488,"Recovered Carts":40,"Conversion Rate":0.082,"Average Order":131.68,"Email Sent":1127,"Open Count":195,"Open Rate":0.174,"Click Count":40,"Click Rate":0.036,"Bounce Count":5,"Bounce Rate":0.004,"Unsubscribes":24},...
	

https://admin.cartstack.com/secure/cartstack_api_recoveries.php?siteid=xxxxxxxx&apikey=xxxxxxxxxxxxxxxxxxxxxxxxx&startdate=2019-11-01

The response will be in JSON format, for example:

{"site":{"URL":"www.cartstack.com"},"query":{"Site ID":"xxxxxxxx","Start Date":"2019-11-01","End Date":"2019-12-18"},"recoveries":[{"Email Address":"support@cartstack.com","Recovery Date":"2019-12-18 10:36:19","Order Amount":592},{"Email Address":"support@cartstack.com","Recovery Date":"2019-12-18 07:20:47","Order Amount":76.14},{"Email Address":"support@cartstack.com","Recovery Date":"2019-12-18 07:14:38","Order Amount":86.24}...
	

Please let us know if you have any questions!

Did this answer your question? Thanks for the feedback. Click the "Contact Us" button to the right if you need further help. There was a problem submitting your feedback. Please try again later.