from_date), Inward and Outward (movements from from_date to the end of to_date), and Net (the position at the end of to_date)./owner/reports/report/product_average_cost. The report shows nothing without a date range, so from_date and to_date are both required.columns[] carries both the label and the group:| Key | Report header | Type |
|---|---|---|
code, barcode, name | Code, Barcode, Name | text |
before_quantity, before_amount | Before - Quantity, Amount | quantity, amount |
inward_quantity, inward_amount | Inward - Quantity, Amount | quantity, amount |
outward_quantity, outward_amount | Outward - Quantity, Amount | quantity, amount |
net_quantity, net_amount | Net - Quantity, Amount | quantity, amount |
columns[].key, plus product_id.net_quantity and net_amount are 0 when their absolute value is below 0.01.totals is the sum of every row, keyed like the rows. It is null when there are no rows.curl --location --globoff 'https://.daftara.com/api2/reports/product_average_cost?from_date=2025-01-01&to_date=2025-06-30&product_id=&warehouse_id=&category_id=&product_branch_id=' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--header 'apikey: ' \
--header 'Content-Type: application/json'{
"result": "successful",
"code": 200,
"data": {
"report": {
"key": "product_average_cost",
"title": "string"
},
"filters": {
"from_date": "2019-08-24",
"to_date": "2019-08-24",
"product_id": [
0
],
"warehouse_id": [
0
],
"category_id": [
0
],
"product_branch_id": [
0
]
},
"columns": [
{
"key": "string",
"label": "string",
"type": "text",
"group": "before",
"group_label": "string"
}
],
"rows": [
{
"product_id": 0,
"code": "string",
"barcode": "string",
"name": "string",
"before_quantity": 0,
"before_amount": 0,
"inward_quantity": 0,
"inward_amount": 0,
"outward_quantity": 0,
"outward_amount": 0,
"net_quantity": 0,
"net_amount": 0
}
],
"totals": {
"before_quantity": 0,
"before_amount": 0,
"inward_quantity": 0,
"inward_amount": 0,
"outward_quantity": 0,
"outward_amount": 0,
"net_quantity": 0,
"net_amount": 0
},
"meta": {
"row_count": 0
}
}
}