sale.cashbox.list
Scope: catalog Permissions to execute: for all
Description and example
Method returns list of configured cash registers.
Example
// selecting all fields for cash registers BX.rest.callMethod( "sale.cashbox.list", { }, function(result) { if(result.error()) console.error(result.error()); else console.dir(result.data()); } ); // selecting specific fields BX.rest.callMethod( "sale.cashbox.list", { "SELECT": ["ID", "NAME"] }, function(result) { if(result.error()) console.error(result.error()); else console.dir(result.data()); } ); // filtering elements BX.rest.callMethod( "sale.cashbox.list", { "SELECT": ["ID", "NAME"], "FILTER": {">ID": 9} }, function(result) { if(result.error()) console.error(result.error()); else console.dir(result.data()); } ); BX.rest.callMethod( "sale.cashbox.list", { "SELECT": ["ID", "NAME"], "FILTER": {"=NAME": "My Rest cash register"} }, function(result) { if(result.error()) console.error(result.error()); else console.dir(result.data()); } ); // sorting elements BX.rest.callMethod( "sale.cashbox.list", { "SELECT": ["ID", "NAME"], "ORDER": {"ID": "DESC"}, }, function(result) { if(result.error()) console.error(result.error()); else console.dir(result.data()); } );
Parameters
Parameter | Description | Version |
---|---|---|
SELECT | List of selected fields. Fields, available for selection:
| |
FILTER | List of filters. Format is the same as ORM filters (for example, in
getList
For the new API to be more convenient and more familiar for developers, we have preserved the name of the most popular method: getList. However, if previously each getList had its own standalone set of parameters and non-transparent behaviour, now this method is uniform for all entities and is subject to the same laws. It means that all attempts by developers to create a "band-aid" solution in getList will have no effect.
Learn more... ). | |
ORDER | Sorting parameters. Format: {field: direction (ASC, DESC)} . |
© «Bitrix24», 2001-2024