Skip to main content

Get Item Sales Summary

By calling this API, you can retrieve the summary of the item sales in the specified MokaPOS outlet.

POST /integrations/mokapos/outlets/{outlet_id}/v1/reporting/item-sales

Path Parameters

AttributeDescriptionTypeRequired
outlet_idID of a MokaPOS businessStringRequired

Sample Request

curl -X POST /integrations/mokapos/outlets/{outlet_id}/v1/reporting/item-sales \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d $'
{
"query": {
"range": {
"transaction_time": {
"gte": "2020-01-01T00:00:00+07:00",
"lte": "2020-01-30T23:59:59+07:00"
}
}
}
}
'

Sample Response - 200 Success

{
"success": true,
"data": {
"total_refund": 0,
"total_net_sales": 80000,
"total_item_sold": 4,
"total_gross_sales": 80000,
"total_discounts": 0,
"item_sales": [
{
"variant_id": "1234",
"name": "Vanilla Ice Cream",
"category_name": "Dessert",
"refund": 0,
"redemption": 0,
"net_sales": 80000,
"item_sold": 4,
"item_refunded": 0,
"cogs": 0,
"gross_sales": 80000,
"gross_profit": 80000,
"discount": 0
}
]
}
}
note

To perform this operation, you must be authenticated using go_auth_client_credentials(mokapos:reporting:read).