Transaction
LS One uses transactions for a various set of actions in the POS. The most common transaction type is the retail transaction containing sold goods and services to customers.
Other transaction types include cash flow, log in / log off, inventory, tender declaration, sales order / invoice and also transactions for internal operations.
The transaction
endpoint in LS One API allows searching through existing transactions.
Actions
POST |
Get transactions |
Properties
Field | Data type | Validation | Description |
---|---|---|---|
amountToAccount | decimal | - | Amount to deposit into a customer's account |
createdOnPosTerminal | string | - | Terminal on which the transaction was created |
currencyID | string | - | Curreny ID of the transaction |
customerID | string | - | Customer ID assigned to the transaction |
customerName | string | - | Name of the customer assigned to the transaction |
customerPurchRequestId | string | - | Customer purchase request ID |
cmployeeID | string | - | Current employee ID |
cndDateTime | datetime | - | Date and time when the transaction was concluded |
entryStatus | int | - |
Transaction status:
|
exchangeRate | decimal | - | Exchange rate used on the transaction |
hHasMarkup | bool | - | Flag indicating if the transaction has markup |
hasOilTax | bool | - | Flag indicating if the transaction has oil tax |
hasTaxIncludedInPriceFlag | bool | - | Flag indicating if the transaction tax included in item price flag |
id |
string |
- | Unique ID of the transaction |
incomeExpenseAmounts | decimal | - | Total amount of all income and expense amounts |
invoiceComment | string | - | Comment added on invoice |
login | string | - | Login of the current user |
markupAmount | decimal | - | Markup amount |
markupDescription | string | - | Markup description |
netAmount | decimal | - | Net amount of the transaction excluding tax |
netAmountWithTax | decimal | - | Net amount of the transaction including tax |
numberOfItems | decimal | - | Total number of items on the transaction |
oilTax | decimal | - | Oil tax amount |
openDrawer | bool | - | Flag indicating if the drawer should open at the end of the transaction |
paymentAmount | decimal | - | Total payment amount |
receiptEmailAddress | string | - | Email address to which the receipt is sent |
receiptID | string | - | Unique ID of the receipt |
roundingDifference | decimal | - | Rounding difference amount |
roundingSalePmtDiff | decimal | - | Difference between total payment amount and total sale amount |
salesInvoiceAmounts | decimal | - | Total amount of the sales invoice |
salesOrderAmounts | decimal | - | Total amount of the sales orders |
shiftDate | datetime | - | Shift date of the transaction |
shiftID | string | - | Unique ID of the current shift |
statementCode | string | - | Statement code of the transaction |
taxIncludedInPrice | bool | - | Flag indicating if the transaction has tax included in item price |
totalDiscountAmount | decimal | - | Total discount amount |
transactionDate | datetime | - | Date and time when the transaction started |
type | int | - |
Type of transaction:
|
Examples
Get transactions
Returns a list of transactions based on a set of filters.
POST /api/transaction/get
Permissions
-
Transaction:Read
For more information on authenticating to LS One APIs, see Authentication.
Request
curl -X 'POST' \
'https://lsoneapi.lsretail.com/api/transaction/get' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer {authorization_token}' \
-H 'Content-Type: application/json' \
-d '{
"numberOfTransactions": 10,
"terminalID": "",
"fromDate": "1900-01-01T00:00:00",
"toDate": "1900-01-01T00:00:00",
"receiptID": "",
"storeID": "",
"type": 2,
"staff": ""
}'
Parameter | Data type | Validation | Description |
---|---|---|---|
fromDate | datetime | - | Retrieve transactions starting from the specified date |
numberOfTransactions | integer | - | Maximum number of transactions to retrieve |
receiptID | string | - | Retrieve transactions with the specified receipt ID |
staff | string | - | Retreive transactions concluded by a specific staff |
storeID | string | - | Retrieve transactions from the specified store |
terminalID | string | - | Retrieve transactions from the specified terminal |
toDate | datetime | - | Retrieve transactions until the specified date |
type | integer | - | Retrieve transactions with the specified transaction type |
Response
{
"id": "000001",
"type": 0,
"currencyID": "USD",
"receiptID": "00001",
"employeeID": "USD",
"createdOnPosTerminal": "pos",
"entryStatus": 0,
"transactionDate": "2021-09-29T22:00:00.000Z",
"shiftID": "000001",
"shiftDate": "2021-09-29T22:00:00.000Z",
"openDrawer": true,
"statementCode": "000001",
"exchangeRate": 2.2,
"customerID": "000001",
"customerName": "Aurora Fashion Store North",
"customerPurchRequestId": "000001",
"netAmount": 231,
"netAmountWithTax": 231,
"salesOrderAmounts": 231,
"salesInvoceAmounts": 231,
"incomeExpenseAmounts": 231,
"roundingDifference": 231,
"roundingSalePmtDiff": 231,
"paymentAmount": 231,
"markupAmount": 231,
"hasMarkup": true,
"markupDescription": "markup",
"amountToAccount": 231,
"totalDiscountAmount": 354,
"numberOfItems": 3,
"invoiceComment": "comment",
"receiptEmailAddress": "email",
"hasOilTax": true,
"oilTax": 11,
"taxIncludedInPrice": true,
"hasTaxIncludedInPriceFlag": true,
"endDateTime": "2021-09-29T22:00:00.000Z",
"login": "user"
}
Status codes
Code | Text | Description |
---|---|---|
200 | Success | Success |
401 | Unauthorized | LS One API client did not provide a valid authentication token or it does not have permissions to read transaction(s) |
404 | Not Found | The requested transactions were not found |