This service is going to be used in the Admin Dashboard.
GET /reports/sales/summary?lang=<lang>
| Parameter | Type | Description |
|---|---|---|
lang |
enum {"en"} |
Optional. Locate language for the result. Defaults to en. |
Examples:
GET /reports/sales/summary?lang=en.GET /reports/sales/summary. Equivalent to the previous.The response body is an object with the fields:
| Field | Type | Description |
|---|---|---|
currencies |
Array of Currency |
List of the available. |
timelines |
Array of Timeline |
List of available timelines with series information by currency. |
totals |
Array of Total |
List of summary totals. |
Object with the fields:
| Field | Type | Description |
|---|---|---|
code |
string |
The currency code according to standard ISO 4217, in lower case. |
symbol |
string |
The currency symbol. |
name |
string |
The translatable human friendly currency name. |
Object with the fields:
| Field | Type | Description |
|---|---|---|
code |
string |
The timeline code. |
data |
Array of tuples of the form [string, number] |
Tuple with a label in the first position and its related numberic value in the second one. |
Object with the fields:
| Field | Type | Description |
|---|---|---|
code |
string |
The total code. |
title |
string |
The total translatable title. |
values |
Array of CurrencyValue |
List of the available values for this totals in different currencies. |
Object with the fields:
| Field | Type | Description |
|---|---|---|
currency |
string |
The currency code according to standard ISO 4217, in lower case. |
value |
number |
The numeric value for the total in the corresponding currency. |
{
"currencies":[
{
"code":"usd",
"symbol":"$",
"name":"US Dollar"
},
{
"code":"eur",
"symbol":"€",
"name":"Euro"
},
{
"code":"ars",
"symbol":"$",
"name":"Argentine Peso"
}
],
"timelines":[
{
"code":"usd",
"data":[
["Nov/2019", 80020],
["Dec/2019", 42300],
["Jan/2020", 38700.99],
["Feb/2020", 40010],
["Mar/2020", 79876.50],
["Apr/2020", 88970],
["May/2020", 127672],
["Jun/2020", 109000],
["Jul/2020", 120090],
["Aug/2020", 96002],
["Sep/2020", 80025],
["Oct/2020", 107020]
]
},
{
"code":"eur",
"data":[
["Nov/2019", 22160],
["Dec/2019", 22600],
["Jan/2020", 31100],
["Feb/2020", 28300],
["Mar/2020", 40100],
["Apr/2020", 60600],
["May/2020", 64300],
["Jun/2020", 68200],
["Jul/2020", 50580],
["Aug/2020", 65400],
["Sep/2020", 60300],
["Oct/2020", 50344]
]
},
{
"code":"ars",
"data":[
["Nov/2019", 0],
["Dec/2019", 0],
["Jan/2020", 0],
["Feb/2020", 0],
["Mar/2020", 0],
["Apr/2020", 0],
["May/2020", 0],
["Jun/2020", 0],
["Jul/2020", 0],
["Aug/2020", 0],
["Sep/2020", 0],
["Oct/2020", 0]
]
}
],
"totals":[
{
"code":"lifetime-sales",
"title":"Lifetime Sales",
"values":[
{
"currency":"usd",
"value":1250341.25
},
{
"currency":"eur",
"value":320341.05
},
{
"currency":"ars",
"value":32346442
}
]
},
{
"code":"last-month-sales",
"title":"Last Month Sales",
"values":[
{
"currency":"usd",
"value":210141.25
},
{
"currency":"ars",
"value":2340440.75
}
]
},
{
"code":"average-order",
"title":"Average Order",
"values":[
{
"currency":"usd",
"value":15201.50
},
{
"currency":"eur",
"value":11410.45
},
{
"currency":"ars",
"value":52111.11
}
]
}
]
}