Get sales
Retrieve completed sales transactions.Query parameters
Filter sales from the last N days
Response
Returns an array of sale objects with employee and item details.Unique sale identifier
Unique transaction ID (format: TXN-YYYYMMDD-XXXXXXXX)
ID of employee who processed the sale
ISO 8601 timestamp of sale
Subtotal before tax and discounts
Tax rate percentage applied
Tax amount calculated
Discount amount applied
Reason for discount
Total amount after tax and discounts
Amount paid by customer
Change given to customer
Payment method (Cash, Card, etc.)
Sale status (Completed, Voided, Refunded)
Array of items in the sale
Example request
Get sale by ID
Retrieve details of a specific sale.Path parameters
Sale ID
Create sale
Process a new sales transaction.Request body
ID of employee processing the sale
Subtotal amount
Tax rate percentage
Tax amount
Discount amount
Reason for discount
Total amount
Amount paid by customer
Change to give customer
Payment method
Additional notes
Array of sale items
Sale item structure
Product ID
Quantity sold
Price per unit
Total for this line item
Example request
Validation
- Employee must exist
- Products must exist and have sufficient stock
- Stock is automatically reduced when sale is created
Response
Returns the complete sale object with generated transaction ID.Today’s sales summary
Get a summary of all sales for the current day.Response
Date of the summary
Number of sales transactions
Total revenue
Total tax collected
Total discounts given
Array of today’s sales
Example request
This week’s summary
Get sales summary for the current week.Response
Returns aggregated sales data for the week (Monday through today).This month’s summary
Get sales summary for the current month.Response
Returns aggregated sales data for the current calendar month.Top products
Get the best-selling products for a time period.Query parameters
Number of days to analyze
Response
Product name
Total units sold
Total revenue generated
Number of transactions
Example request
Payment breakdown
Get breakdown of sales by payment method.Query parameters
Time period:
today, week, or monthResponse
Period label
Array of payment method summaries
Example request
Tax summary
Get tax collection summary for reporting.Query parameters
Time period:
week, month, or yearResponse
Period label
Number of sales
Total revenue
Total tax collected
Average tax rate applied
Employee performance
Get sales performance by employee.Query parameters
Time period:
today, week, or monthResponse
Employee name
Number of sales processed
Total revenue generated
Average sale amount