shop.product.sales

Return's a product's sales information for the past 30 days.

Parameters

  • id GET

    Product ID.

  • access_token GET

    API auth token obtained during the API authorization.

  • format GET Optional

    Sets response format. Available options: json (default), xml.

product sales data. Amounts are expressed in the main store currency.

  • total array Array of sales data for the entire period, with the following keys:
    • total['discount'] float Applied discount.
    • total['profit'] float Profit.
    • total['purchase'] float Purchase cost.
    • total['quantity'] float Sold quantity.
    • total['sales'] float Sales revenue.
    • total['subtotal'] float Sales revenue less the purchase cost.
  • days array List of all period days, with detailed data for each day in the form of sub-arrays with the following keys:
    • days[]['date'] date Current day’s date.
    • + all the keys used in the 'total' array.

Example

https://demo1.webasyst.com/api.php/shop.product.sales?