Dimensional grids and measurements for size tables

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 dimensional grids and measurements, from which you can create a size table for the specified dimension specifications. Their IDs are passed to sizeChartId cells in the methods of creating and updating tables sizes POST v2/businesses/{businessId}/size-tables/create and POST v2/businesses/{businessId}/size-tables/update.

The list includes:

  • standard Market size grids — the values in them are selected from the directory sizeValues;
  • dimensional grids with text values.
  • measurements — the values in them are also set in text.

Branded size grids are not included in the list, and you cannot use them in your tables: for them an error is returned UNKNOWN_SIZE_CHART.

The required size grids are marked required: true. The table must contain at least one of them., and each mandatory grid in the table must be filled in all rows.

An error is returned for an unknown dimension identifier. UNKNOWN_SIZE_PARAMETER.

⚙️ Limit: 100 requests per minute

Request

POST

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

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

Body

application/json
{
  "sizeParameterId": 1
}

Name

Description

sizeParameterId

Type: integer

ID of the dimensional characteristic.

Min value: 1

Responses

200 OK

Dimensional grids and measurements of dimensional characteristics.

Body

application/json
{
  "status": "OK",
  "result": {
    "sizeParameterId": 0,
    "sizeCharts": [
      {
        "sizeChartId": 0,
        "sizeChartName": "example",
        "columnType": "SIZE_CHART",
        "required": true,
        "sizeValues": [
          null
        ]
      }
    ]
  }
}

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

    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

    required

    Type: boolean

    Is there a mandatory size grid? There must be at least one mandatory grid in the table., and each mandatory grid in the table must be filled in all rows. Measurements always have false.

    sizeChartId

    Type: integer

    ID of the dimension grid or dimension. Send it to sizeChartId table cells.

    sizeChartName

    Type: string

    The name of the dimension grid or measurement.

    Example: example

    sizeValues

    Type: object[]

    sizeValue

    Type: string

    The text of the value.

    Example: example

    sizeValueId

    Type: integer

    ID of the value. Send it to sizeValueId table cells.

    A reference book of dimensional grid values. It is filled in only for standard Market size grids: in the cell for such a column, pass the value from the directory.

    If the list is empty, the value is set in text.

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

    Dimensional grids and measurements that can be used in size tables: grids first, then measurements.

    Example
    [
      {
        "sizeChartId": 0,
        "sizeChartName": "example",
        "columnType": "SIZE_CHART",
        "required": true,
        "sizeValues": [
          {
            "sizeValueId": 0,
            "sizeValue": "example"
          }
        ]
      }
    ]
    

    sizeParameterId

    Type: integer

    ID of the dimensional characteristic from the request.

    Dimensional grids and measurements of dimensional characteristics.

    Example
    {
      "sizeParameterId": 0,
      "sizeCharts": [
        {
          "sizeChartId": 0,
          "sizeChartName": "example",
          "columnType": "SIZE_CHART",
          "required": true,
          "sizeValues": [
            {
              "sizeValueId": 0,
              "sizeValue": "example"
            }
          ]
        }
      ]
    }
    
    Example
    {
      "result": {
        "sizeParameterId": 0,
        "sizeCharts": [
          {
            "sizeChartId": 0,
            "sizeChartName": "example",
            "columnType": "SIZE_CHART",
            "required": true,
            "sizeValues": [
              {}
            ]
          }
        ]
      }
    }
    

400 Bad Request

The request contains incorrect data. More information about the error

Error codes:

  • BAD_REQUEST — the request does not match the description of the method.
  • UNKNOWN_SIZE_PARAMETER — sizeParameterId not from the list of acceptable values.

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"
        }
      ]
    }