Skip to main content

Sales Summary

Overview​

Returns a POS sales summary for a date range (and optional time window), including summary totals, product breakdown, and Payment-method breakdown. This endpoint is typically used to build recap dashboards or export POS performance over a period.

Request Endpoint​

  • Method: POST
  • Path: {{base_url}}/api/reports/sales-summary

Payload Construction and Schema Definition​

The request payload is submitted as form-data fields.

Request Body Fields​

FieldTypeRequiredDescription
start_datestring (date)YesStart date (YYYY-MM-DD) for the report.
end_datestring (date)YesEnd date (YYYY-MM-DD) for the report.
pos_idstringNoPOS filter. Use all for all POS.
product_group_typestringNoProduct group type.
start_timestring (HH:mm)NoStart time for filtering.
end_timestring (HH:mm)NoEnd time for filtering.

Response Body Fields​

FieldTypeAlways presentDescription
errorbooleanYesIndicates whether the request failed. false means success.
statusstringYesStatus string. On success the example returns "ok".
messagestringYesHuman-readable message. Often empty on success.
dataobjectYes (on success)Sales summary data.

Response data.header Fields​

FieldTypeDescriptionExample
start_datestring (date)Start date of the report.2023-01-13
end_datestring (date)End date of the report.2024-01-17
transaction_countstring/numberNumber of transactions.250
total_paxstring/numberTotal number of guests (if present).243
transaction_averagenumberAverage transaction value.124986.775
total_trxnumberTotal transaction value.31208250.2
total_paymentnumberTotal payment value.29755578.75
total_card_feenumberTotal card fee.10000
total_roundingnumberTotal rounding adjustment.28443.55
pos_namestringPOS name.All POS

Response data.product Fields​

FieldTypeDescriptionExample
qtynumberQuantity sold.81
product_namestringProduct name.Ayam
totalnumberTotal sales for the product.7720950

Response data.payment Fields​

FieldTypeDescriptionExample
namestringPayment method name.Cash On Hand
qtynumberNumber of transactions for this payment method.37
valuenumberTotal value for this payment method.4203180

Expected System Responses​

The system responds with HTTP 200 OK.

{
"error": false,
"status": "ok",
"message": "",
"data": {
"header": {
"start_date": "2023-01-13",
"end_date": "2024-01-17",
"transaction_count": "250",
"total_pax": "243",
"transaction_average": 124986.775,
"total_trx": 31208250.2,
"total_payment": 29755578.75,
"total_card_fee": 10000,
"total_rounding": 28443.55,
"pos_name": "All POS"
},
"product": [{ "qty": 81, "product_name": "Ayam", "total": 7720950 }],
"payment": [{ "name": "Cash On Hand", "qty": 37, "value": 4203180 }]
}
}