list_sales_by_selection
POST /list_sales_by_selection
To get the list of sales by stores and group for multiple search criteria.
"api_credentials": {
"token": "XXXX"
},
"filter_define": {
"from_date":"2022-07-01 00:00:00",
"to_date":"2022-07-02 15:00:00",
"results_based_on":"brand",
"stores_selection":"",
"include_returns":true,
"profit_based_on":87,
"includes_vat": false,
"date_selection_type":"SessionDateTime"
}
| field |
type |
description |
| api_credentials
|
| token |
string |
Credentials provided by Powersoft that allow access to the API |
| filter_define
|
| from_date |
string |
From date. The date must be provided in format yyyy-mm-dd HH:mm:ss |
| to_date |
string |
To date. The date must be provided in format yyyy-mm-dd HH:mm:ss |
| results_based_on |
string |
The group used to bring the results. Accepted value: brand, category,color,department, fabric, season, size, sizegroup, customer_agent and store |
| stores_selection |
string |
A comma separated list of 365 stores codes (eg '001,100,...'). If the value is empty then no search criteria by store is applied. |
| include_returns |
boolean |
If the list of sales includes the sales returns as well |
| profit_based_on |
integer |
| Based on this value is calculated the total cost and profit
|
| 0
|
Default price. It is the price defined at the system level
|
| 1
|
Price 1
|
| 2
|
Price 2
|
| 3
|
Price 3
|
| 4
|
Price 4
|
| 5
|
Price 5
|
| 6
|
Price 6
|
| 7
|
Price 7
|
| 8
|
Price 8
|
| 9
|
Price 9
|
| 10
|
Price 10
|
| 87
|
Weighted Average Cost
|
| 88
|
Average Cost
|
| 99
|
Latest Cost
|
|
| includes_vat |
boolean |
In case that total cost and profit is calculated based on one of the price from 1 to 10, or default price defined at the system level must be specified if the price used is the one including VAT or the one excluding VAT |
| request_password_365 |
string |
Request password as registered in 365 BASE64 encoded - optionally. The password is necessary if the user needs to use one of the cost value. Password is provided by Powersoft. |
| date_selection_type |
string |
Accepted value: ValueDate and SessionDateTime. If the value is 'ValueDate' the filter for the from-to date is done by the transaction date, otherwise by the session date time of the transaction. |
List of sales by selection for multiple search criteria.
{
"api_response": {
"response_code": "1",
"response_msg": "OK",
"response_id": ""
},
"count": 3,
"results_based_on": "brand",
"list_sales": [
{
"group_code_365": "GUCCI",
"group_name": "GUCCI",
"qty_sold": 1.0000,
"total_cost": 0.0000000,
"total_net": 42.0200,
"total_discount": 0.0000,
"total_before_vat": 42.0200,
"total_vat": 7.9800,
"total_gross": 50.0000,
"total_profit": 42.0200000
},
{
"group_code_365": "JOMA",
"group_name": "JOMA - SPORTS",
"qty_sold": 4.0000,
"total_cost": 0.0000000,
"total_net": 504.1600,
"total_discount": 100.8400,
"total_before_vat": 403.3200,
"total_vat": 76.6400,
"total_gross": 479.9600,
"total_profit": 403.3200000
},
{
"group_code_365": "N/A",
"group_name": "N/A",
"qty_sold": 33.0000,
"total_cost": 0.0000000,
"total_net": 529.4100,
"total_discount": 0.0000,
"total_before_vat": 529.4100,
"total_vat": 100.5900,
"total_gross": 630.0000,
"total_profit": 529.4100000
}
]
}