Skip to content

Sales GET

URL: https://api.painelalter.com/api/v2/sales?dateBegin=2020-10-02&dateEnd=2020-11-02&groupBy=day

Returns sales data stored in the database between two specific dates for all stores registered under a user.

Query Parameters

ParameterDescription
dateBeginStart date. Format YYYY-MM-DD (Inclusive)
dateEndEnd date. Format YYYY-MM-DD (Inclusive)
groupByData grouping parameter

groupBy Values Table

groupByDescription
dayGroup by day
monthGroup by month
hourGroup by hour
weekdayGroup by day of the week

Response Example

json
{
  "2021-05-01": {
    "1": 265,
    "2": 480,
    "3": 443
  },
  "2021-05-02": {
    "1": 265,
    "2": 480,
    "3": 443
  },
  "2021-05-03": {
    "1": 265,
    "2": 480,
    "3": 443
  },
  "2021-05-04": {
    "1": 265,
    "2": 480,
    "3": 443
  }
}