Description
API call exposes report "Gross Profit"
Request Parameters
| # |
Name |
Type |
Required |
Example |
Description |
| 1 |
FromDate |
string |
1 |
YYYY-MM-DD |
Range: Start of date range (Start of day time is added) |
| 2 |
ToDate |
string |
1 |
YYYY-MM-DD |
Range: End of date range (End of day time is added) |
| 3 |
ShopID |
string |
0 |
MAD |
Filter: Shop Id |
| 4 |
Category |
string |
0 |
Clothes |
Filter: Category code |
| 5 |
SupplNr |
string |
0 |
MGS |
Filter: Supplier code |
| 6 |
PaymentType |
string |
0 |
Single character : "C" |
Filter: Payment code |
| 7 |
ExcludePaymentType |
string |
0 |
Single character : "C" |
Filter: Payment code to exclude |
| 8 |
TagKey1 |
integer |
0 |
111 |
Filter: Item tag Id (1) |
| 9 |
TagKey2 |
integer |
0 |
222 |
Filter: Item tag Id (2) |
| 10 |
TagKey3 |
integer |
0 |
333 |
Filter: Item tag Id (3) |
Request body
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dem="https://api.pixi.eu/soap/demosandbox/">
<soapenv:Header/>
<soapenv:Body>
<dem:pixiReport_GrossProfit>
<dem:FromDate>YYYY-MM-DD</dem:FromDate>
<dem:ToDate>YYYY-MM-DD</dem:ToDate>
<dem:ShopID>MAD</dem:ShopID>
<dem:Category>Clothes</dem:Category>
<dem:SupplNr>MGS</dem:SupplNr>
<dem:PaymentType>Single character : "C"</dem:PaymentType>
<dem:ExcludePaymentType>Single character : "C"</dem:ExcludePaymentType>
<dem:TagKey1>111</dem:TagKey1>
<dem:TagKey2>222</dem:TagKey2>
<dem:TagKey3>333</dem:TagKey3>
</dem:pixiReport_GrossProfit>
</soapenv:Body>
</soapenv:Envelope>
Response
Body 1: Report "Gross Profit" output columns
| # |
Name |
Type |
Description |
| 1 |
ItemNrSupplier |
string |
Item number supplier |
| 2 |
Barcode |
string |
Item barcode |
| 3 |
ItemName |
string |
Item name |
| 4 |
Supplier |
string |
Supplier name |
| 5 |
Sales_Quantity |
integer |
Item quantity sold |
| 6 |
Sales_SellingPrice |
number |
Average item (sales) selling price |
| 7 |
Sales_VAT |
number |
Average item (sales) VAT |
| 8 |
Sales_SupplierPrice |
number |
Average item (sales) supplier price |
| 9 |
Returns_SellingPrice |
number |
Item quantity returned |
| 10 |
Returns_Quantity |
integer |
Average item (returns) selling price |
| 11 |
Returns_VAT |
number |
Average item (returns) VAT |
| 12 |
Returns_SupplierPrice |
number |
Average item (returns) supplier price |
| 13 |
SingleGrossProfit |
number |
Single Gross Profit = Selling Price (Sales) - VAT (Sales) - Supp. Price (Sales) |
| 14 |
TotalGrossProfit |
number |
Total Gross Profit = Single Gross Profit * Sales - ( Selling Price (Returns) - VAT (Returns) - Supp. Price (Returns) ) * Returns |
| 15 |
Currency |
string |
Currency |
Body 2: Error
| # |
Name |
Type |
Description |
| 1 |
Status |
string |
Status |
| 2 |
Message |
string |
Status message details |
Additional Notes
This report/API calculates the gross profit per item in a defined time frame.
Applicable for Sales and Returns (Avg.):
The selling price is an average of all selling prices during this time frame - same with supplier prices and VAT.
Calculation:
Single Gross Profit = Selling Price (Sales) - VAT (Sales) - Supp. Price (Sales)
Total Gross Profit = Single Gross Profit * Sales - ( Selling Price (Returns) - VAT (Returns) - Supp. Price (Returns) ) * Returns
Values:
Selling prices include VAT, supplier prices do not include VAT.
The sums for columns Selling Price, VAT and Supplier Price below Sales & Returns (Avg.) are already multiplied with item quantities for Sales or Returns.