尺寸表格的尺寸网格和测量

方法适用于所有模式.

如果您使用API-Key令牌,调用该方法时需要具备列表中可用权限之一

返回尺寸网格和测量值,您可以从中为指定的尺寸创建尺寸表 规格。 他们的Id被传递给 sizeChartId 创建和更新表的方法中的单元格 尺寸 POST v2/businesses/{businessId}/size-tables/create 和 POST v2/businesses/{businessId}/size-tables/update.

该列表包括:

  • 标准市场尺寸网格 — 其中的值是从目录中选择的 sizeValues;
  • 具有文本值的维网格。
  • 测量 — 其中的值也以文本形式设置。

品牌尺寸网格不包括在列表中,并且您不能在表中使用它们:对于它们 返回错误 UNKNOWN_SIZE_CHART.

标出所需大小的网格 required: true. 表必须至少包含其中一个。, 并且表中的每个强制网格必须填写在所有行中。

维特征的未知标识符返回错误。 UNKNOWN_SIZE_PARAMETER.

⚙️ 限额: 100 请求 每分钟

Request

POST

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

Path parameters

Name

Description

businessId

Type: integer

内阁ID。

Min value: 1

Body

application/json
{
  "sizeParameterId": 1
}

Name

Description

sizeParameterId

Type: integer

维特征的ID。

Min value: 1

Responses

200 OK

维网格和尺寸特征的测量。

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

    响应的类型。 可能的值:

    • OK — 没有错误。
    • ERROR — 处理请求时出错。

    Enum: OK, ERROR

    服务器响应的标准包装器。

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

    result

    Type: object

    sizeCharts

    Type: object[]

    columnType

    Type: string

    尺寸图的列类型:

    • SIZE_CHART — 用于确定产品尺寸的尺寸网格。
    • MEASUREMENT — 测量,例如胸围或足长。 它不参与确定产品的尺寸。

    Enum: SIZE_CHART, MEASUREMENT

    required

    Type: boolean

    是否有强制尺寸网格? 表中必须至少有一个强制网格。, 并且表中的每个强制网格必须填写在所有行中。 测量总是有 false.

    sizeChartId

    Type: integer

    维度网格或维度的ID。 发送至 sizeChartId 表单元格。

    sizeChartName

    Type: string

    维度网格或度量的名称。

    Example: example

    sizeValues

    Type: object[]

    sizeValue

    Type: string

    值的文本。

    Example: example

    sizeValueId

    Type: integer

    值的ID。 发送至 sizeValueId 表单元格。

    维网格值的参考书。 它仅适用于标准市场大小的网格:在单元格中 对于这样的列,从目录中传递值。

    如果列表为空,则以文本形式设置该值。

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

    可在尺寸表中使用的尺寸网格和测量:首先是网格,然后是测量。

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

    sizeParameterId

    Type: integer

    来自请求的尺寸特征的ID。

    维网格和尺寸特征的测量。

    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

请求包含不正确的数据。 有关错误的更多信息

错误代码:

  • BAD_REQUEST — 请求与方法的描述不匹配。
  • UNKNOWN_SIZE_PARAMETER — sizeParameterId 不是从可接受的值列表中。

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

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

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

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

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

    服务器错误的标准包装器。

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

401 Unauthorized

请求中未指定授权数据。 有关错误的更多信息

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

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

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

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

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

    服务器错误的标准包装器。

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

403 Forbidden

授权数据不正确或禁止访问资源。 有关错误的更多信息

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

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

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

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

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

    服务器错误的标准包装器。

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

404 Not Found

找不到请求的资源。 有关错误的更多信息

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

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

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

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

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

    服务器错误的标准包装器。

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

420 Method Failure

已超出资源访问限制。 有关错误的更多信息

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

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

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

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

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

    服务器错误的标准包装器。

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

500 Internal Server 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

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

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

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

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

    服务器错误的标准包装器。

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