Income/expense account
Income account is an account in the business's books that shows how much it has earned while the expense account shows the running costs of the business. Income / expense accounts can be used to manage cash flow in and out of your cash drawer that are not generated by sales. For an example of expense the store manager might need to pay for the window washing. Income/expense accounts are also used to handle the flow of tips or gratuity.
In LS One the income and expense accounts are managed per store and can include information about which account number they post to when posting to an ERP system. Income/expense lines can be added to a transaction in the basket endpoint.
The income-expense-account
endpoint in LS One API allows management of the income and expense accounts as well as retrieval of the already defined accounts for a store.
Actions
GET |
Get income/expense account |
GET | Get all income/expense accounts |
GET | Get a list of income/expense accounts for a specific store |
POST |
Create a new income/expense account |
PUT |
Update a income/expense account |
DELETE |
Delete a income/expense account |
Properties
Field | Data type | Validation | Description |
---|---|---|---|
id | string |
- |
Unique identifier of the account |
accountNum | string | - | Account number |
storeID | string | Required | Unique identifier for the store |
name | string | Required
max. length = 30 |
Name of account |
nameAlias | string | Required
max. length = 20 |
Name alias of account |
accountType | int |
Required |
Type of the account:
|
ledgerAccount | string |
- |
Ledger account for income/expense |
Examples
Get income/expense account
Returns details of a single income/expense account.
GET /api/income-expense-account/{id}
Permissions
-
IncomeExpenseAccount:Read
For more information on authenticating to LS One APIs, see Authentication.
Request
Parameter | Data type | Validation | Description |
---|---|---|---|
id | string |
Required |
Unique identifier of the income/expense account |
Response
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 income/expense account(s) |
404 | Not Found | The requested income/expense account was not found |
Get Income/Expense accounts
Returns a list of all income/expense accounts.
GET /api/income-expense-account
Permissions
-
IncomeExpenseAccount:Read
For more information on authenticating to LS One APIs, see Authentication.
Request
Response
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 income/expense account(s) |
404 | Not Found | No income/expense accounts found |
Get income/expense accounts for store
Returns a list of all income/expense accounts for a specific store.
GET /api/income-expense-account/store/{storeId}
Permissions
-
IncomeExpenseAccount:Read
For more information on authenticating to LS One APIs, see Authentication.
Request
Response
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 income/expense account(s) |
404 | Not Found | No income/expense accounts found |
Create income/expense account
Create a new income/expense account.
POST /api/income-expense-account
To create a new income/expense account, the following fields are required:
-
StoreID
-
Name
-
NameAlias
-
AccountType
Permissions
-
IncomeExpenseAccount:Write
For more information on authenticating to LS One APIs, see Authentication.
Request
Response
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 income/expense account(s) |
400 | Bad Request | New income/expense account could not be created |
Update income/expense account
Updates an existing income/expense account.
PUT /api/income-expense-account
To update an existing income/expense account, the following fields are required:
-
ID
-
StoreID
-
Name
-
NameAlias
-
AccountType
Permissions
-
IncomeExpenseAccount:Write
For more information on authenticating to LS One APIs, see Authentication.
Request
Response
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 write income/expense account(s) |
400 | Bad Request | Income/Expense account could not be updated |
404 | Not Found | Income/Expense account to be updated was not found |
Delete income/expense account
Delete an existing income/expense account.
DELETE /api/income-expense-account/{id}
Permissions
-
IncomeExpenseAccount:Write
For more information on authenticating to LS One APIs, see Authentication.
Request
Parameter | Data type | Validation | Description |
---|---|---|---|
id | string |
Required |
Unique identifier of the income/expense account |
Response
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 income/expense account(s) |
404 | Not Found | The requested income/expense account was not found |