Size tables by ID

The method is available for all models.

If you are using an API Key token, one of the accesses in the list is required to call the method

Returns size tables by their IDs. IDs are returned by the method selection of size tables. If sizeTableIds not passed, returns all size tables, created by the business.

First, the tables created by the business are returned, then the branded tables, then the standard tables; within each group — in descending order of the ID.

The results are returned page by page. To navigate, use the parameters pageToken and limit. In each subsequent request, pass the same set. sizeTableIds, as in the first one: pageToken linked to it, and the request will be rejected with a different set. Order It doesn't matter about IDs.

IDs for which the table could not be returned — there is no such table or it is belongs to another business, — they return to notFoundSizeTableIds on the first page.

⚙️ Limit: 100 requests per minute

Request

POST

https://api.partner.market.yandex.ru/v2/businesses/{businessId}/size-tables

Path parameters

Name

Description

businessId

Type: integer

Cabinet ID.

To find out, use the request GET v2/campaigns.

ℹ️ What is a cabinet and a store on the Market?

Min value: 1

Query parameters

Name

Description

limit

Type: integer

The number of values per page.

Default: 25

Min value: 1

Max value: 100

pageToken

Type: string

ID of the results page.

If the parameter is omitted, the first page is returned.

Pass the value of the output parameter nextPageToken, received during the last request.

Example: ``

Body

application/json
{
  "sizeTableIds": [
    1
  ]
}

Name

Description

sizeTableIds

Type: integer[] | null

IDs of the size tables.

If the parameter is omitted, all tables created by the business are returned.

Min items: 1

Max items: 100

Unique items: true

Example
[
  1
]

Responses

200 OK

Size tables.

Body

application/json
{
  "status": "OK",
  "result": {
    "sizeTables": [
      {
        "sizeTableId": 0,
        "sizeTableName": "example",
        "sizeTableType": "CUSTOM",
        "sizeParameterId": 0,
        "editable": true,
        "key": {},
        "sizeCharts": [
          null
        ]
      }
    ],
    "notFoundSizeTableIds": [
      0
    ],
    "paging": {
      "nextPageToken": "example"
    }
  }
}

Type: object

All of 2 types
  • Type: object

    status

    Type: string

    The type of response. Possible values:

    • OK — There are no errors.
    • ERROR — an error occurred while processing the request.

    Enum: OK, ERROR

    The standard wrapper for server responses.

    Example
    {
      "status": "OK"
    }
    
  • Type: object

    result

    Type: object

    notFoundSizeTableIds

    Type: integer[]

    IDs from the query for which the table could not be returned: there is no such table. or it belongs to another business.

    It is filled in only on the first page. On the following pages and in the request without sizeTableIds the list is empty.

    Unique items: true

    Example
    [
      0
    ]
    

    paging

    Type: object

    nextPageToken

    Type: string

    ID of the next results page.

    Example: example

    The ID of the next page.

    Example
    {
      "nextPageToken": "example"
    }
    

    sizeTables

    Type: object[]

    editable

    Type: boolean

    Can a business edit a table: true — for tables created by a business, false — for Market tables.

    sizeCharts

    Type: object[]

    columnType

    Type: string

    Column type of the size chart:

    • SIZE_CHART — the size grid used to determine the size of the product.
    • MEASUREMENT — measurement, such as chest circumference or foot length. It does not participate in determining the size of the product.

    Enum: SIZE_CHART, MEASUREMENT

    sizeChartId

    Type: integer

    ID of the dimension grid or dimension. Grids and measurements have a common identifier space.

    sizeChartName

    Type: string

    The name of the dimension grid or measurement.

    Example: example

    sizes

    Type: object[]

    rowIndex

    Type: integer

    The row number of the table, starting from 0. Values with the same rowIndex The same size is described in different columns.

    The numbers may be missing, and the row order may not match the size order. Collect lines by value rowIndex, and not by the position of the value in sizes.

    Min value: 0

    sizeValue

    Type: string

    The value of the size or measurement.

    Example: example

    sizeValueId

    Type: integer

    ID of the size value. It is returned only if the column has a reference list of values. — these are the standard size grids of the Market.

    In grids created by businesses, branded grids, and measurements, the value is set only by text.

    Column values are in the order of the rows in the table. Empty cells are not returned.

    Example
    [
      {
        "sizeValueId": 0,
        "sizeValue": "example",
        "rowIndex": 0
      }
    ]
    

    Columns of the table: dimensional grids and measurements. Columns without values are not returned.

    Example
    [
      {
        "sizeChartId": 0,
        "sizeChartName": "example",
        "columnType": "SIZE_CHART",
        "sizes": [
          {
            "sizeValueId": 0,
            "sizeValue": "example",
            "rowIndex": 0
          }
        ]
      }
    ]
    

    sizeParameterId

    Type: integer

    ID of the dimension characteristic that the dimensions from the table relate to.

    sizeTableId

    Type: integer

    ID of the size table.

    sizeTableName

    Type: string

    The name of the size chart.

    Example: example

    sizeTableType

    Type: string

    Size Chart Type:

    • CUSTOM — a table created by the business.
    • STANDARD — Market table: standard or customized.

    Enum: CUSTOM, STANDARD

    key

    Type: object

    categoryId

    Type: integer

    The category ID from the request.

    genderId

    Type: integer

    The gender ID on the Market.

    vendorId

    Type: integer

    The brand ID on the Market. Returned only for brand tables.

    The conditions for which the table is selected.

    Example
    {
      "categoryId": 0,
      "vendorId": 0,
      "genderId": 0
    }
    

    Size charts: first created by the business, then branded, then standard; within each group — in descending order of the ID.

    Example
    [
      {
        "sizeTableId": 0,
        "sizeTableName": "example",
        "sizeTableType": "CUSTOM",
        "sizeParameterId": 0,
        "editable": true,
        "key": {
          "categoryId": 0,
          "vendorId": 0,
          "genderId": 0
        },
        "sizeCharts": [
          {
            "sizeChartId": 0,
            "sizeChartName": "example",
            "columnType": "SIZE_CHART",
            "sizes": [
              {}
            ]
          }
        ]
      }
    ]
    

    Size tables.

    Example
    {
      "sizeTables": [
        {
          "sizeTableId": 0,
          "sizeTableName": "example",
          "sizeTableType": "CUSTOM",
          "sizeParameterId": 0,
          "editable": true,
          "key": {
            "categoryId": 0,
            "vendorId": 0,
            "genderId": 0
          },
          "sizeCharts": [
            {
              "sizeChartId": 0,
              "sizeChartName": "example",
              "columnType": "SIZE_CHART",
              "sizes": [
                null
              ]
            }
          ]
        }
      ],
      "notFoundSizeTableIds": [
        0
      ],
      "paging": {
        "nextPageToken": "example"
      }
    }
    
    Example
    {
      "result": {
        "sizeTables": [
          {
            "sizeTableId": 0,
            "sizeTableName": "example",
            "sizeTableType": "CUSTOM",
            "sizeParameterId": 0,
            "editable": true,
            "key": {
              "categoryId": 0,
              "vendorId": 0,
              "genderId": 0
            },
            "sizeCharts": [
              {}
            ]
          }
        ],
        "notFoundSizeTableIds": [
          0
        ],
        "paging": {
          "nextPageToken": "example"
        }
      }
    }
    

400 Bad Request

The request contains incorrect data. More information about the error

Body

application/json
{
  "status": "OK",
  "errors": [
    {
      "code": "example",
      "message": "example"
    }
  ]
}

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      The type of response. Possible values:

      • OK — There are no errors.
      • ERROR — an error occurred while processing the request.

      Enum: OK, ERROR

      The standard wrapper for server responses.

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    A standard wrapper for server errors.

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

401 Unauthorized

The authorization data is not specified in the request. More information about the error

Body

application/json
{
  "status": "OK",
  "errors": [
    {
      "code": "example",
      "message": "example"
    }
  ]
}

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      The type of response. Possible values:

      • OK — There are no errors.
      • ERROR — an error occurred while processing the request.

      Enum: OK, ERROR

      The standard wrapper for server responses.

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    A standard wrapper for server errors.

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

403 Forbidden

The authorization data is incorrect or access to the resource is prohibited. More information about the error

Body

application/json
{
  "status": "OK",
  "errors": [
    {
      "code": "example",
      "message": "example"
    }
  ]
}

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      The type of response. Possible values:

      • OK — There are no errors.
      • ERROR — an error occurred while processing the request.

      Enum: OK, ERROR

      The standard wrapper for server responses.

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    A standard wrapper for server errors.

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

404 Not Found

The requested resource was not found. More information about the error

Body

application/json
{
  "status": "OK",
  "errors": [
    {
      "code": "example",
      "message": "example"
    }
  ]
}

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      The type of response. Possible values:

      • OK — There are no errors.
      • ERROR — an error occurred while processing the request.

      Enum: OK, ERROR

      The standard wrapper for server responses.

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    A standard wrapper for server errors.

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

420 Method Failure

The resource access limit has been exceeded. More information about the error

Body

application/json
{
  "status": "OK",
  "errors": [
    {
      "code": "example",
      "message": "example"
    }
  ]
}

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      The type of response. Possible values:

      • OK — There are no errors.
      • ERROR — an error occurred while processing the request.

      Enum: OK, ERROR

      The standard wrapper for server responses.

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    A standard wrapper for server errors.

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

500 Internal Server Error

Internal error of the Market. More information about the error

Body

application/json
{
  "status": "OK",
  "errors": [
    {
      "code": "example",
      "message": "example"
    }
  ]
}

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      The type of response. Possible values:

      • OK — There are no errors.
      • ERROR — an error occurred while processing the request.

      Enum: OK, ERROR

      The standard wrapper for server responses.

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    A standard wrapper for server errors.

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }