group_by chooses the card, is_summary chooses the shape./owner/reports/stock_transactions_profit and backs the 3 Profit Periodic cards (Daily, Weekly, Yearly Profits; Details and Summary each).meta.conversion_rates. Purchase prices are not converted.View_His_Own_Reports permission for a signed-in caller, and an explicit opt-in on the account for an API-key caller.{format} suffix.| Bound | Default | Applies to |
|---|---|---|
| Stock transactions | 20,000 | is_summary=0 |
| Stock transactions | 100,000 | is_summary=1 |
| Groups | 2,000 | both |
curl --location '/api2/reports/stock_transactions_profit?group_by=monthly&is_summary=1&date_from=2025-02-01&date_to=2025-05-31&client_id=7&client_category=&product_id=9&staff_id=&branch_id=&order_source_id=' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--header 'apikey: ' \
--header 'Content-Type: application/json'{
"result": "successful",
"code": 200,
"data": {
"report": {
"key": "string",
"group_by": "string",
"mode": "detailed",
"group_dimension": "string",
"title": "string",
"base_currency": "string"
},
"filters": {
"group_by": "string",
"is_summary": 0,
"date_from": "2019-08-24",
"date_to": "2019-08-24",
"client_id": 0,
"client_category": [
0
],
"product_id": 0,
"staff_id": 0,
"branch_id": [
0
],
"order_source_id": 0
},
"columns": [
{
"key": "string",
"label": "string"
}
],
"currencies": [
{
"currency": "string",
"totals": {
"quantity": 0,
"purchase_price": 0,
"sales": 0,
"discount": 0,
"profit": 0
},
"groups": [
{
"key": "string",
"label": "string",
"period": {
"start": "2019-08-24",
"end": "2019-08-24"
},
"id": 0,
"subtotals": {
"quantity": 0,
"purchase_price": 0,
"sales": 0,
"discount": 0,
"profit": 0
},
"transaction_count": 0,
"transactions": [
{
"document": {
"id": 0,
"no": "string",
"type": 0,
"type_label": "string",
"kind": "invoice"
},
"date": "2019-08-24",
"client": {
"id": 0,
"name": "string"
},
"staff": {
"id": 0,
"name": "string"
},
"product": {
"id": 0,
"name": "string"
},
"quantity": 0,
"unit": {
"factor": 0,
"small_name": "string",
"quantity_in_unit": 0
},
"unit_purchase_price": 0,
"purchase_price": 0,
"unit_selling_price": 0,
"sales": 0,
"unit_discount": 0,
"discount": 0,
"profit": 0,
"original_currency": "string",
"conversion_rate": 0
}
]
}
]
}
],
"meta": {
"currency_count": 0,
"group_count": 0,
"transaction_count": 0,
"is_summary": true,
"quantity_column_shown": true,
"columns_shown": {
"property1": true,
"property2": true
},
"conversion_rates": {
"property1": {
"rate": 0,
"date": "2019-08-24"
},
"property2": {
"rate": 0,
"date": "2019-08-24"
}
}
}
}
}