Add product to selection
Adds a product to the selection
Function AddProductToCollection(Val ProductsArray, Val Selection, Val Parameters = "") Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| ProductsArray | --items | Array of string, number | ✔ | Array of products or product |
| Selection | --sel | String | ✔ | Selection ID |
| Parameters | --auth | Structure Of String | ✖ | Authorization JSON or path to .json |
Returns: Map Of KeyAndValue - serialized JSON response from VK
1C:Enterprise/OneScript code example
Parameters = GetVKParameters();
Product = "12106789";
Selection = "141";
Result = OPI_VK.AddProductToCollection(Product, Selection, Parameters);
- Bash
- CMD/Bat
# JSON data can also be passed as a path to a .json file
oint vk AddProductToCollection \
--items 12110915 \
--sel 146 \
--auth "{'access_token':'***','owner_id':'-218861756','app_id':'51694790','group_id':'218861756'}"
:: JSON data can also be passed as a path to a .json file
oint vk AddProductToCollection ^
--items 12110915 ^
--sel 146 ^
--auth "{'access_token':'***','owner_id':'-218861756','app_id':'51694790','group_id':'218861756'}"
Result
{
"response": 1
}