Documentation

sale.cashbox.list

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

ParameterDescriptionVersion
SELECT List of selected fields. Fields, available for selection:
  • ID - cash register ID;
  • NAME - cash register name;
  • HANDLER - handler;
  • OFD - fiscal data operator handler code;
  • OFD_SETTINGS - fiscal data operator settings;
  • EMAIL - email to receive notifications in case of errors when printing receipts;
  • DATE_CREATE - data when created;
  • DATE_LAST_CHECK - date of last check;
  • NUMBER_KKM - cash register external ID;
  • KKM_ID - Cash register ID;
  • ACTIVE - Cash register activity;
  • SORT - sorting;
  • USE_OFFLINE - use offline cash;
  • ENABLED - availability;
  • SETTINGS - cash register settings according to settings structure.
FILTER List of filters. Format is the same as ORM filters (for example, in getList).
ORDER Sorting parameters. Format: {field: direction (ASC, DESC)}.


© «Bitrix24», 2001-2022
Up