编辑产品类别特征

方法适用于模式:FBY, FBS, Express 和 DBS.

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

编辑特定于其所属类别的产品特征。

这里只是属于特定类别的内容。

如果您需要更改产品的主要参数(名称,描述,图像,视频,制造商,条形码),请使用请求 POST v2/businesses/{businessId}/offer-mappings/update.

若要删除类型的参数中设置的特征 string,传递一个空值。

目录中的数据不会立即更新

最多需要几分钟。

⚙️ 限制: 每分钟10,000件物品

Request

POST

https://api.partner.market.yandex.ru/v2/businesses/{businessId}/offer-cards/update

Path parameters

Name

Description

businessId

Type: integer

内阁ID。 要找到答案,请使用请求 GET v2/campaigns.

ℹ️ 什么是市场上的橱柜和商店?

Min value: 1

Body

application/json
{
  "offersContent": [
    {
      "offerId": "example",
      "categoryId": 0,
      "parameterValues": [
        {
          "parameterId": 1,
          "unitId": 0,
          "valueId": 0,
          "value": "example"
        }
      ]
    }
  ]
}

Name

Description

offersContent

Type: object[]

categoryId

Type: integer

市场上的类别的ID。

更改类别时,请确保参数中的产品特性及其值 parameterValues 您正在提交一个新的类别.

您可以使用请求获取市场类别列表。 POST v2/categories/tree.

Min value: 0

Exclusive min: true

offerId

Type: string

你的 SKU — 系统中的产品ID。

使用规则 SKU:

  • 对于每个产品 SKU 一定有一个。

  • 已经设置 SKU 它不能被释放并重新用于另一个产品。 每个产品都应该收到一个以前从未在目录中使用过的新标识符。

SKU 产品可以在市场上的卖方帐户中更改。 阅读如何做到这一点。 在市场对卖家的帮助.

重要

值开头和结尾的空格会自动删除。 例如, " SKU123 ""SKU123" 它们将被视为相同的值。

什么是 SKU 以及如何分配它

Min length: 1

Max length: 255

Pattern: ^(?=.*\S.*)[^\x00-\x08\x0A-\x1f\x7f]{1,255}$

Example: example

parameterValues

Type: object[]

parameterId

Type: integer

特性的标识符。

Min value: 1

unitId

Type: integer

测量单位的ID。 如果没有传递参数 unitId,使用默认的测量单位。

value

Type: string

意义。

对于类型特征 ENUM 发送:

  • valueId,如果从目录取值;
  • 没有 valueId,如果值是它自己的。

Example: example

valueId

Type: integer

值的ID。

  • 如果要从从市场接收的可接受值列表中传输值,请务必指定标识符。
  • 不要指定您自己的值。
  • 仅针对类型特征 ENUM.

具有其值的特征列表。

改变特性时,仅传送其值需要更新的那些。 如果在 categoryId 您正在更改类别,新旧类别的共同特征的值将保留,并且您不需要转移它们。

阅读更多 "特性值的传递".

Min items: 1

Max items: 300

Example
[
  {
    "parameterId": 1,
    "unitId": 0,
    "valueId": 0,
    "value": "example"
  }
]

具有指定特性的产品列表。

Min items: 1

Max items: 100

Example
[
  {
    "offerId": "example",
    "categoryId": 0,
    "parameterValues": [
      {
        "parameterId": 1,
        "unitId": 0,
        "valueId": 0,
        "value": "example"
      }
    ]
  }
]

Responses

200 OK

请求已正确执行,并且数据已被处理。

回答 200 就其本身而言,它并不意味着传递的值是正确的。

请务必查看响应的详细信息。: status,以及错误列表(results.errors)和评论(results.warnings),如果有的话。

  • 如果至少有一个产品返回错误(results.errors),场 status = ERROR. 不会应用对所有转移项目的更改。
  • 如果没有错误,但至少有一个产品返回了注释(results.warnings),场 status = OK,并将应用更改。

如果在 status 回来了 ERROR,确保:

  • 所有要求的规格都填写完毕。
  • 特征实际存在于指定的类别中;
  • 值对应于特征;
  • 您自己的值具有所需的数据类型。

字段将帮助您发现问题 errorswarnings.

Body

application/json
{
  "status": "OK",
  "results": [
    {
      "offerId": "example",
      "errors": [
        {}
      ],
      "warnings": [
        {}
      ]
    }
  ]
}

Type: object

All of 2 types
  • Type: object

    status

    Type: string

    响应的类型。 可能的值:

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

    Enum: OK, ERROR

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

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

    results

    Type: object[]

    offerId

    Type: string

    你的 SKU — 系统中的产品ID。

    使用规则 SKU:

    • 对于每个产品 SKU 一定有一个。

    • 已经设置 SKU 它不能被释放并重新用于另一个产品。 每个产品都应该收到一个以前从未在目录中使用过的新标识符。

    SKU 产品可以在市场上的卖方帐户中更改。 阅读如何做到这一点。 在市场对卖家的帮助.

    重要

    值开头和结尾的空格会自动删除。 例如, " SKU123 ""SKU123" 它们将被视为相同的值。

    什么是 SKU 以及如何分配它

    Min length: 1

    Max length: 255

    Pattern: ^(?=.*\S.*)[^\x00-\x08\x0A-\x1f\x7f]{1,255}$

    Example: example

    errors

    Type: object[]

    message

    Type: string

    错误或警告的文本。

    Example: example

    type

    Type: string

    错误和警告的类型:

    • OFFER_NOT_FOUND — 目录中没有这样的产品。
    • UNKNOWN_CATEGORY — 指定了未知类别。
    • INVALID_CATEGORY — 指定了非叶类别。 指定没有子类别的类别。
    • UNKNOWN_PARAMETER — 已经传输了不属于该类别特征的特征。
    • UNEXPECTED_BOOLEAN_VALUE — 传递其他内容而不是布尔值。
    • NUMBER_FORMAT — 传递的字符串不代表数字,而不是数字。
    • INVALID_UNIT_ID — 特性不可接受的测量单位已经通过。
    • INVALID_GROUP_ID_LENGTH — 名称中超出允许的字符值 — 255.
    • INVALID_GROUP_ID_CHARACTERS — 通过无效字符.

    您可以检查哪些类别特征可用于给定类别,并使用请求获取其设置。 POST v2/category/{categoryId}/parameters.

    Enum: OFFER_NOT_FOUND, UNKNOWN_CATEGORY, INVALID_CATEGORY, UNKNOWN_PARAMETER, UNEXPECTED_BOOLEAN_VALUE, NUMBER_FORMAT, INVALID_UNIT_ID, INVALID_GROUP_ID_LENGTH, INVALID_GROUP_ID_CHARACTERS

    parameterId

    Type: integer

    与错误或警告相关联的功能的ID。

    错误。

    如果至少有一个产品出现错误,目录中的信息将不会更新所有传输的产品。

    Min items: 1

    Example
    [
      {
        "type": "OFFER_NOT_FOUND",
        "parameterId": 0,
        "message": "example"
      }
    ]
    

    warnings

    Type: object[]

    message

    Type: string

    错误或警告的文本。

    Example: example

    type

    Type: string

    错误和警告的类型:

    • OFFER_NOT_FOUND — 目录中没有这样的产品。
    • UNKNOWN_CATEGORY — 指定了未知类别。
    • INVALID_CATEGORY — 指定了非叶类别。 指定没有子类别的类别。
    • UNKNOWN_PARAMETER — 已经传输了不属于该类别特征的特征。
    • UNEXPECTED_BOOLEAN_VALUE — 传递其他内容而不是布尔值。
    • NUMBER_FORMAT — 传递的字符串不代表数字,而不是数字。
    • INVALID_UNIT_ID — 特性不可接受的测量单位已经通过。
    • INVALID_GROUP_ID_LENGTH — 名称中超出允许的字符值 — 255.
    • INVALID_GROUP_ID_CHARACTERS — 通过无效字符.

    您可以检查哪些类别特征可用于给定类别,并使用请求获取其设置。 POST v2/category/{categoryId}/parameters.

    Enum: OFFER_NOT_FOUND, UNKNOWN_CATEGORY, INVALID_CATEGORY, UNKNOWN_PARAMETER, UNEXPECTED_BOOLEAN_VALUE, NUMBER_FORMAT, INVALID_UNIT_ID, INVALID_GROUP_ID_LENGTH, INVALID_GROUP_ID_CHARACTERS

    parameterId

    Type: integer

    与错误或警告相关联的功能的ID。

    警告。

    目录中的信息将被更新。

    Min items: 1

    Example
    [
      {
        "type": "OFFER_NOT_FOUND",
        "parameterId": 0,
        "message": "example"
      }
    ]
    

    处理传输值时出现的错误和警告。 列表中的每个项目对应一个产品。

    如果没有错误或警告,则不传递该字段。

    Min items: 1

    Example
    [
      {
        "offerId": "example",
        "errors": [
          {
            "type": "OFFER_NOT_FOUND",
            "parameterId": 0,
            "message": "example"
          }
        ],
        "warnings": [
          {
            "type": "OFFER_NOT_FOUND",
            "parameterId": 0,
            "message": "example"
          }
        ]
      }
    ]
    
    Example
    {
      "results": [
        {
          "offerId": "example",
          "errors": [
            {
              "type": "OFFER_NOT_FOUND",
              "parameterId": 0,
              "message": "example"
            }
          ],
          "warnings": [
            {
              "type": "OFFER_NOT_FOUND",
              "parameterId": 0,
              "message": "example"
            }
          ]
        }
      ]
    }
    

400 Bad Request

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

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

423 Locked

指定的方法不能应用于资源。 有关错误的更多信息

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

Yandex中的内部错误。 市场。 有关错误的更多信息

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

No longer supported, please use an alternative and newer version.

ASCII字符0到31(9除外)和127被禁止。 从表.