OrderController
Central API for synchronising order headers, lines, payments and integration metadata between tills, kiosks, web orders and the central database.
| Endpoint | Description | Request | Response |
|---|---|---|---|
POST /api/Order/PostOpenOrder |
Stores an in-progress order with its current line items so that other devices can continue editing it. | Body: Order with populated OrderLines. |
HTTP 200 when persisted; HTTP 417 otherwise. |
GET /api/Order/GetOpenOrder |
Returns open orders for the requested terminal/time window including their line items and product details. | Query: Dates with LastExecutedDate, CurrentDate and TerminalId. |
List of Order objects. |
POST /api/Order/PostOrder |
Finalises an order, saving its lines, payments, receipts and updating product stock quantities. | Body: complete Order payload including payments and receipt information. |
HTTP 200 when fully committed; HTTP 417 if any persistence step fails. |
GET /api/Order/GetCustomerInvoice |
Provides customer invoice headers generated within the supplied timeframe. | Query: Dates range. |
List of CustomerInvoice records. |
POST /api/Order/PostCustomerInvoice |
Creates or updates a customer invoice (including address and payment terms) from back-office workflows. | Body: CustomerInvoice. |
HTTP 200 when saved; HTTP 417 otherwise. |
POST /api/Order/PostReports |
Logs terminal health information (battery, storage, etc.) for monitoring dashboards. | Body: TerminalStatusLog. |
HTTP 200 when logged; HTTP 417 if logging fails. |
POST /api/Order/PostCashDrawerLog |
Writes a cash drawer event (open/close, float changes) captured while posting an order. | Body: CashDrawerLog. |
HTTP 200 on success; HTTP 417 if persistence fails. |
GET /api/Order/GetOrdersWithoutExternalID |
Returns completed orders lacking an ExternalId so that downstream systems can pick them up. |
Query: Dates range. |
List of Order objects. |
GET /api/Order/GetOrdersWithoutCustomerAndExternalID |
Finds orders that are missing both customer information and an external reference for reconciliation. | Query: Dates range. |
List of Order objects. |
POST /api/Order/PostOrderExternalInformation |
Updates an order with external identifiers or metadata supplied by a third-party integration. | Body: Order containing the external IDs. |
HTTP 200 when the order is updated; HTTP 417 otherwise. |
GET /api/Order/GetReturnOrdersWithoutExternalID |
Lists return orders awaiting external identifiers (similar to completed sales). | Query: Dates range. |
List of return Order records. |
POST /api/Order/PostReturnOrderExternalInformation |
Supplies missing external identifiers for return orders. | Body: Order with the correct return metadata. |
HTTP 200 when saved; HTTP 417 if the update fails. |
GET /api/Order/GetInviceGeneratedOpenOrder |
Returns open orders for which invoices have been generated but not yet synced. | Query: Dates range. |
List of Order objects. |
POST /api/Order/UpdateInviceGeneratedOpenOrder |
Marks invoice-generated open orders as synced after back-office acknowledgement. | Body: array of Order instances to update. |
HTTP 200 when all are processed; HTTP 417 if any fail. |
GET /api/Order/UpdateOrderStatus/{orderId}/{status} |
Updates the status code of an order (for example to mark it as delivered). | Route: order identifier and new numeric status. | HTTP 200 when status is updated; HTTP 417 if the order is not found. |
POST /api/Order/PostOnlineOrder |
Persists an order that originated from online channels (web or mobile) including payment references. | Body: Order with online payment metadata. |
HTTP 200 when committed; HTTP 417 otherwise. |
GET /api/Order/GetOrdersHistory/{customerId} |
Returns historical orders for a customer so client apps can show purchase history. | Route: customer identifier (GUID string). | List of Order records sorted by date. |
GET /api/Order/GetCustomerCartOrder/{customerId} |
Retrieves the most recent open cart for a customer (used by online ordering flows). | Route: customer identifier (GUID string). | Single Order representing the cart, or null if none exists. |
CashDrawerLogController
Keeps tills and back office aligned on cash drawer adjustments, openings and closings.
| Endpoint | Description | Request | Response |
|---|---|---|---|
GET /api/CashDrawerLog/GetCashDrawerLog |
Fetches cash drawer events for the specified time window with paging. | Query: Dates including paging properties. |
List of CashDrawerLog entries. |
POST /api/CashDrawerLog/PostCashDrawerLog |
Upserts a cash drawer event captured offline. | Body: CashDrawerLog. |
HTTP 200 when persisted; HTTP 417 if saving fails. |
SaleController
Exposes aggregated sales metrics for dashboards and reporting widgets inside the POS admin portal.
| Endpoint | Description | Request | Response |
|---|---|---|---|
GET /api/Sale/GetOutlets |
Lists the outlets available to the current user, including an "All" pseudo-outlet for combined reporting. | None. | List of OutletInfo. |
GET /api/Sale/GetTodaySale |
Returns today's sales summary for the tenant. | None. | ReportViewModel with daily totals. |
GET /api/Sale/GetSaleByMonth |
Retrieves the month-to-date sales overview for the specified month number. | Query: month integer. |
ReportViewModel grouped by outlet. |
GET /api/Sale/GetCurrentMonthSale |
Returns sales totals for the current calendar month. | None. | MonthlyCategorySale. |
GET /api/Sale/GetMonthalySale |
Produces a per-outlet breakdown for the requested month and year. | Query: outletId, year, month. |
MonthlyCategorySale. |
GET /api/Sale/GetDailySale |
Returns day-level category sales for an outlet on the supplied date. | Query: outletId and dt (date). |
DailyCategorySale. |
GET /api/Sale/GetHourlySale |
Lists hourly sales data for the provided date and outlet. | Query: outletId, year, month, day. |
Collection of SaleDetail entries. |
SwishOnlinePaymentController
Handles callbacks from the Swish payment platform to store payment references against online orders.
| Endpoint | Description | Request | Response |
|---|---|---|---|
POST /api/SwishOnlinePayment/PostSwishOnlinePayment |
Creates or updates a Swish payment record including the Swish status, token and associated order. | Body: SwishPayment. |
HTTP 200 when recorded; HTTP 417 if an error occurs. |