Shopping session
Create a shopping session
Opens a shopping session from the header and any items in the body, and returns it (201, `Location` header set). Requires `Permissions.PosShoppingSession.Create`.
Search shopping sessions
Returns one page of shopping sessions matching the filter. A shopping session is a till basket that is still open — it becomes a POS receipt once finished. Body is a `PaginationRequest` — see the *Filtering & pagination* concept in the developer docs. Sortable and limitable fields depend on the instance's data-grid view. Requires `Permissions.PosShoppingSession.View`.
Get a shopping session
Returns one shopping session by `sessionId`. Use `details` to pick which sub-collections (items, payments, …) are loaded; omit it for the header only. Requires `Permissions.PosShoppingSession.View`.
Delete a shopping session
Discards the open session with its items and payments. Cannot be undone; a session that has already been finished is a POS receipt and is not deleted here. Requires `Permissions.PosShoppingSession.Delete`.
Update a shopping session
Updates the session header and the items sent in the body, and returns the stored session. Requires `Permissions.PosShoppingSession.Update`.
Find an item by barcode (deprecated)
**Deprecated.** Use `POST {sessionId}/scan` instead, which also resolves customer cards. Returns the session items matching the scanned barcode. Requires `Permissions.PosShoppingSession.View`.
Finish a shopping session
Validates the session, converts it into a POS receipt with its items and payments, and returns the receipt (201, `Location` header pointing at the receipt detail). Returns 400 with every validation violation in `messages` when the basket or its payments are not consistent. Cannot be undone. Requires `Permissions.PosShoppingSession.Update`.
Add items to a shopping session
Appends the items in the body to an open session and recalculates its totals. Returns the whole updated session. Requires `Permissions.PosShoppingSession.Create`.
Delete every shopping session item
Empties the session's basket while leaving the session itself open. Returns the whole updated session. Requires `Permissions.PosShoppingSession.Delete`.
Delete a shopping session item
Removes one item from the session and recalculates its totals. Returns the whole updated session. Requires `Permissions.PosShoppingSession.Delete`.
Update a shopping session item
Replaces one item of the session, identified by `itemId`, and recalculates its totals. Returns the whole updated session. Requires `Permissions.PosShoppingSession.Update`.
Add a card payment
Records a card payment on the session, including the terminal's authorisation details. Returns the whole updated session. Reverse it with `DELETE {sessionId}/payments/credit-cards/{paymentGuid}`. Requires `Permissions.PosShoppingSession.Create`.
Roll back a card payment
Reverses the card payment identified by `paymentGuid`. This clears the payment inside Winshop only — any refund on the payment terminal is a separate step. Returns the whole updated session. Requires `Permissions.PosShoppingSession.Delete`.
Add a credit payment
Draws the requested amount from the customer's credit account and records it as a payment on the session. Returns the whole updated session. Reverse it with `DELETE {sessionId}/payments/credits/{paymentGuid}`. Requires `Permissions.PosShoppingSession.Create`.
Roll back a credit payment
Reverses the credit payment identified by `paymentGuid` and returns the drawn amount to the customer's credit account. Returns the whole updated session. Requires `Permissions.PosShoppingSession.Delete`.
Add a foreign-currency payment
Records a payment made in a foreign currency, converted with that currency's configured rate. Returns the whole updated session. Reverse it with `DELETE {sessionId}/payments/foreign-currencies/{paymentGuid}`. Requires `Permissions.PosShoppingSession.Create`.
Roll back a foreign-currency payment
Reverses the foreign-currency payment identified by `paymentGuid`. Returns the whole updated session. Requires `Permissions.PosShoppingSession.Delete`.
Scan a barcode into a shopping session
Resolves one scanned barcode against the session and reports what it is through `type` — a product, a customer card, or nothing recognised — with the matching payload filled in. Use this as the single entry point for till scanning instead of deciding the barcode's kind up front. Requires `Permissions.PosShoppingSession.View`.
Get a POS receipt as PDF GET
Renders the receipt with its configured print template and returns `application/pdf` inline. 404 when the document has no printable output. Requires `Permissions.PosReceipt.View`.
Create a shopping session POST
Opens a shopping session from the header and any items in the body, and returns it (201, `Location` header set). Requires `Permissions.PosShoppingSession.Create`.