【问题标题】:How do i update a nested value via. the API?我如何通过更新嵌套值。 API?
【发布时间】:2022-01-22 20:34:33
【问题描述】:

我如何通过更新嵌套值。 API?我想更新我的自定义字段 custom_product_fields_magento_product_id

请求路径:/api/product/f9529c4f40e94fa6ae7439f97090cc9e

请求类型:PATCH

主体:

{
    "translated.customFields.custom_product_fields_magento_product_id" : "123"
}

我哪里出错了?我可以轻松更新未嵌套的产品值,例如 "productNumber" : "value"

【问题讨论】:

    标签: api nested shopware shopware6


    【解决方案1】:

    你可以使用

    {
        "customFields": {
            "custom_product_fields_magento_product_id":"123"
        }
    }
    

    该值将自动保存到翻译中,其语言在请求头中指定或使用默认语言。

    【讨论】:

      猜你喜欢
      • 2021-07-09
      • 1970-01-01
      • 2022-01-04
      • 2021-11-04
      • 1970-01-01
      • 1970-01-01
      • 2016-11-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多