Sales Reports API Documentation

Orders

Sample Call
URL: /api/sales/orders?format=json&start_date=18-Dec-2016&end_date=07-Jan-2017
Parameters
format Data format (csv or json, json default)
start_date First date of records to return
end_date Last date of records to return
Response
date
order_id
quantity
sku
page
description_sku
paid
profit
status

Sample Response (JSON)

[{"order_id": "2019209","quantity": "1","sku": "100001","page": "100","description_sku": "ESP8266 WIFI DevBoard", "name": "John","country": "United States","description_ship": "DHL China (2-5 days)","paid": "14.00","profit": "1.00","status": "TRACK"}]

Shares

Sample Call
URL: /api/sales/shares?format=json&start_date=18-Dec-2016&end_date=07-Jan-2017
Parameters
format Data format (csv or json, json default)
start_date First date of records to return
end_date Last date of records to return
Response
D0 Sales today
D1 Sales yesterday
MTD Month to date
MM1 Last month
MM2 Month - 2
MM3 Month - 3
MM4 Month - 4
MM5 Month - 5
description_sku
sku
department pcbs, print3d, or items
page

Sample Response (JSON)

[{"D0": "0","D1": "0","MTD": "0","MM1": "0","MM2": "0","MM3": "0","MM4": "0","MM5": "0",   "description_sku": "ESP8266 WIFI DevBoard","sku": "100001","department": "pcbs","page": "100"}]

Items

Sample Call
URL: /api/sales/items?format=json&start_date=18-Dec-2016&end_date=07-Jan-2017
Parameters
format Data format (csv or json, json default)
start_date First date of records to return
end_date Last date of records to return
Response
D0 Sales today
D1 Sales yesterday
MTD Month to date
MM1 Last month
MM2 Month - 2
MM3 Month - 3
MM4 Month - 4
MM5 Month - 5
description_sku
sku
department pcbs, print3d, or items
page

Sample Response (JSON)

[{"D0": "0","D1": "0","MTD": "0","MM1": "0","MM2": "0","MM3": "0","MM4": "0","MM5": "0",   "description_sku": "P100-A2 1mm pogo pin","sku": "100001","department": "items","page": "12"}]

Wallet

Sample Call
URL: /api/sales/wallet?format=json&start_date=18-Dec-2016&end_date=07-Jan-2017
Parameters
format Data format (csv or json, json default)
start_date First date of records to return
end_date Last date of records to return
Response
date
description
credits
debits

Sample Response (JSON)

[{"date": "2017-01-05 15:16:12","description": "Used $70.00 in order 2024691","credits": null,"debits": "70.00"},{"date": "2016-08-05 05:13:11","description": "Shared ESP8266 WIFI Devboard PN:100375 in order 2024000","credits": "1.00","debits": null}]

User wallet balance

Sample Call
URL: /api/sales/balance?format=json
Parameters
format Data format (csv or json, json default)
Response
user_id
username
email
total_credits
total_debits
balance

Sample Response (JSON)

[{"user_id": "1","username": "johndoe","email": "john@example.com","total_credits": "622.00", "total_debits": "622.00","balance": "0.00"}]