sale.cashbox.handler.add
Scope: catalog Permissions to execute: for all
Description and example
Method adds a cash register REST handler.
Example
BX.rest.callMethod( "sale.cashbox.handler.add", { "CODE": "restcashbox01", "NAME": "REST cash register 01", "SORT": 100, "SETTINGS": { "PRINT_URL": "http:\/\/example.com\/rest_print.php", "CHECK_URL": "http:\/\/example.com\/rest_check.php", "CONFIG": { "AUTH": { "LABEL": "Login", "ITEMS": { "KEYWORD": { "TYPE": "STRING", "LABEL": "Password" }, "PREFERENCE": { "TYPE": "ENUM", "LABEL": "Multiple selection", "REQUIRED": "Y", "OPTIONS": { "FIRST": "First", "SECOND": "Second", "THIRD": "Third", } } } }, "INTERACTION": { "LABEL": "Cash register interaction settings", "ITEMS": { "MODE": { "TYPE": "ENUM", "LABEL": "Cash register handling mode", "OPTIONS": { "ACTIVE": "active", "TEST": "test" } } } } } } }, function(result) { if(result.error()) console.error(result.error()); else console.dir(result.data()); } );
Parameters
Parameter | Description | Available from version |
---|---|---|
CODE | Required. REST handler code. Can be unique among all handlers. | |
NAME | Required. REST handler name. | |
SORT | Sorting (100 by default). | |
SUPPORTS_FFD105 | Cash register support for fiscal data format version 1.05 (N by default). | |
SETTINGS | Required. Handler settings (all parameters are required):
|
© «Bitrix24», 2001-2024