---
sidebar_position: 3
description: Get products by ID and other functions to work with VK in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, VK]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Get products by ID
 Gets information about products by array of IDs



`Function GetProductsByID(Val Products, Val Parameters = "") Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Products | --items | String, Array of String | &#x2714; | Array of product IDs |
  | Parameters | --auth | Structure Of String | &#x2716; | Authorization parameters. See GetAuthParameters |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from VK



```bsl title="1C:Enterprise/OneScript code example"
    Parameters = GetVKParameters();

    Item1 = "12369885";
    Item2 = "12369886";

    ProductsArray = New Array;
    ProductsArray.Add(Item1);
    ProductsArray.Add(Item2);

    Result = OPI_VK.GetProductsByID(ProductsArray, Parameters);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            # JSON data can also be passed as a path to a .json file
            
            oint vk GetProductsByID \
             --items "['12369918','12369920']" \
             --auth "{'access_token':'***','owner_id':'-218861756','app_id':'51694790','group_id':'218861756'}"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            :: JSON data can also be passed as a path to a .json file
            
            oint vk GetProductsByID ^
             --items "['12369918','12369920']" ^
             --auth "{'access_token':'***','owner_id':'-218861756','app_id':'51694790','group_id':'218861756'}"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "response": {
  "count": 2,
  "items": [
   {
    "availability": 0,
    "category": {
     "inner_type": "market_market_category_old",
     "id": 20173,
     "name": "Батарейки",
     "section": {
      "id": 10016,
      "name": "Канцелярские товары"
     }
    },
    "description": "Product description",
    "id": 12369918,
    "owner_id": -218861756,
    "price": {
     "amount": "100",
     "currency": {
      "id": 643,
      "name": "RUB",
      "title": "₽"
     },
     "text": "1 ₽",
     "discount_rate": -93,
     "old_amount": "1500",
     "old_amount_text": "15 ₽"
    },
    "title": "Test product (with prop)",
    "other_items": [
     {
      "title": "Другие товары сообщества",
      "view_type": 1,
      "item_ids": [
       "***",
       "***",
       "***",
       "***",
       "***",
       "***",
       "***",
       "***",
       "***",
       "***"
      ],
      "referrer_item_type": "other_goods"
     }
    ],
    "dimensions": {
     "width": "***",
     "height": 30,
     "length": 40
    },
    "weight": 100,
    "albums_ids": [],
    "photos": [
     {
      "album_id": -53,
      "date": 1765391093,
      "id": 457261190,
      "owner_id": -218861756,
      "access_key": "***",
      "sizes": [
       {
        "height": 54,
        "type": "s",
        "width": "***",
        "url": "https://sun9-73.userapi.com/s/v1/ig2/e8ioguVUo9IVm0K-ZwW9uUYxZtYUjohGnKWhYCWChoJXYDSV3nG9lE0d0_4teUrGTTZfKDzFFlPVESXNl9P2Pl_h.jpg?quality=95&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu&cs=72x0"
       },
       {
        "height": 120,
        "type": "m",
        "width": "***",
        "url": "https://sun9-73.userapi.com/s/v1/ig2/e8ioguVUo9IVm0K-ZwW9uUYxZtYUjohGnKWhYCWChoJXYDSV3nG9lE0d0_4teUrGTTZfKDzFFlPVESXNl9P2Pl_h.jpg?quality=95&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu&cs=160x0"
       },
       {
        "height": 480,
        "type": "x",
        "width": "***",
        "url": "https://sun9-73.userapi.com/s/v1/ig2/e8ioguVUo9IVm0K-ZwW9uUYxZtYUjohGnKWhYCWChoJXYDSV3nG9lE0d0_4teUrGTTZfKDzFFlPVESXNl9P2Pl_h.jpg?quality=95&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu&cs=640x0"
       },
       {
        "height": 810,
        "type": "y",
        "width": "***",
        "url": "https://sun9-73.userapi.com/s/v1/ig2/e8ioguVUo9IVm0K-ZwW9uUYxZtYUjohGnKWhYCWChoJXYDSV3nG9lE0d0_4teUrGTTZfKDzFFlPVESXNl9P2Pl_h.jpg?quality=95&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu&cs=1080x0"
       },
       {
        "height": 960,
        "type": "z",
        "width": "***",
        "url": "https://sun9-73.userapi.com/s/v1/ig2/e8ioguVUo9IVm0K-ZwW9uUYxZtYUjohGnKWhYCWChoJXYDSV3nG9lE0d0_4teUrGTTZfKDzFFlPVESXNl9P2Pl_h.jpg?quality=95&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu&cs=1280x0"
       },
       {
        "height": 1920,
        "type": "w",
        "width": "***",
        "url": "https://sun9-73.userapi.com/s/v1/ig2/e8ioguVUo9IVm0K-ZwW9uUYxZtYUjohGnKWhYCWChoJXYDSV3nG9lE0d0_4teUrGTTZfKDzFFlPVESXNl9P2Pl_h.jpg?quality=95&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu&cs=2560x0"
       },
       {
        "height": 81,
        "type": "o",
        "width": "***",
        "url": "https://sun9-73.userapi.com/s/v1/ig2/e8ioguVUo9IVm0K-ZwW9uUYxZtYUjohGnKWhYCWChoJXYDSV3nG9lE0d0_4teUrGTTZfKDzFFlPVESXNl9P2Pl_h.jpg?quality=95&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu&cs=108x0"
       },
       {
        "height": 180,
        "type": "p",
        "width": "***",
        "url": "https://sun9-73.userapi.com/s/v1/ig2/e8ioguVUo9IVm0K-ZwW9uUYxZtYUjohGnKWhYCWChoJXYDSV3nG9lE0d0_4teUrGTTZfKDzFFlPVESXNl9P2Pl_h.jpg?quality=95&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu&cs=240x0"
       },
       {
        "height": 270,
        "type": "q",
        "width": "***",
        "url": "https://sun9-73.userapi.com/s/v1/ig2/e8ioguVUo9IVm0K-ZwW9uUYxZtYUjohGnKWhYCWChoJXYDSV3nG9lE0d0_4teUrGTTZfKDzFFlPVESXNl9P2Pl_h.jpg?quality=95&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu&cs=360x0"
       },
       {
        "height": 405,
        "type": "r",
        "width": "***",
        "url": "https://sun9-73.userapi.com/s/v1/ig2/e8ioguVUo9IVm0K-ZwW9uUYxZtYUjohGnKWhYCWChoJXYDSV3nG9lE0d0_4teUrGTTZfKDzFFlPVESXNl9P2Pl_h.jpg?quality=95&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu&cs=540x0"
       },
       {
        "height": 1920,
        "type": "base",
        "width": "***",
        "url": "https://sun9-73.userapi.com/s/v1/ig2/e8ioguVUo9IVm0K-ZwW9uUYxZtYUjohGnKWhYCWChoJXYDSV3nG9lE0d0_4teUrGTTZfKDzFFlPVESXNl9P2Pl_h.jpg?quality=95&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu"
       }
      ],
      "text": "",
      "user_id": 100,
      "web_view_token": "***",
      "has_tags": false,
      "orig_photo": {
       "height": 1920,
       "type": "base",
       "url": "https://sun9-73.userapi.com/s/v1/ig2/e8ioguVUo9IVm0K-ZwW9uUYxZtYUjohGnKWhYCWChoJXYDSV3nG9lE0d0_4teUrGTTZfKDzFFlPVESXNl9P2Pl_h.jpg?quality=95&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu",
       "width": "***"
      }
     },
     {
      "album_id": -53,
      "date": 1765391097,
      "id": 457261191,
      "owner_id": -218861756,
      "access_key": "***",
      "sizes": [
...
```
