亚马逊Amazon SP API 拉取产品详情和修改产品属性

1.获取产品详情  getListingsItem   

GET /listings/2021-08-01/items/{sellerId}/{sku}

文档地址:Listings Items API v2021-08-01 reference

$result = $requestReport->applicationreport($account->merchant_id,strtolower($account->site),'/listings/2021-08-01/items/'.$account->merchant_id.'/'.$sku.'?marketplaceIds='.$account->market_place_id.'&includedData=summaries,attributes,issues,offers,fulfillmentAvailability,procurement',['marketplaceIds'=>$account->market_place_id],"",'GET');

2.获取ProductTpye目录  searchDefinitionsProductTypes    GET /definitions/2020-09-01/productTypes

文档地址:Product Type Definitions API v2020-09-01 reference

$result = $requestReport->applicationreport($account->merchant_id,strtolower($account->site),'/definitions/2020-09-01/productTypes?marketplaceIds='.$account->market_place_id,['marketplaceIds'=>$account->market_place_id],"",'GET');

3.获取 获取ProductTpye详细目录   getDefinitionsProductType   GET /definitions/2020-09-01/productTypes/{productType}

文档地址:Product Type Definitions API v2020-09-01 reference

$result = $requestReport->applicationreport($account->merchant_id,strtolower($account->site),'/definitions/2020-09-01/productTypes/'.$producttpye.'?marketplaceIds='.$account->market_place_id,['marketplaceIds'=>$account->market_place_id],"",'GET');

4. 修改产品属性    patchListingsItem     PATCH /listings/2021-08-01/items/{sellerId}/{sku}

文档地址:Listings Items API v2021-08-01 reference

//里面的 productType 必须和产品的 相对应      $data = '{
  "productType":"POWER_CONVERTER",
  "patches":[
    {
      "op":"replace",
      "path":"/attributes/item_name",
      "value":[
        {
          "value": "NEW DC Voltage Regulator, 36V 48V 60V to 12V 3A DC-DC Step-down Converter Buck Power Supply Module Voltage Regulator for Car Auto Vehicle Motor",
          "language_tag": "en_US",
          "marketplace_id": "'.$account->market_place_id.'"
        }
      ]
    }
  ]
}';
$result = $requestReport->applicationreportnew($account->merchant_id,strtolower($account->site),'/listings/2021-08-01/items/'.$account->merchant_id.'/'.$sku.'?marketplaceIds='.$account->market_place_id.'&issueLocale=en_US',"",$data,'PATCH');
 修改五点
$data = '{
  "productType":"POWER_CONVERTER",
  "patches":[
    {
      "op":"replace",
      "path":"/attributes/bullet_point",
      "value":[
        {
          "value": "NEW High quality DC-DC reverse converter: Ensures reliable and efficient conversion of DC voltage, providing a stable power supply for your devices.",
          "language_tag": "en_US",
          "marketplace_id": "'.$account->market_place_id.'"
        }
      ]
    }
  ]
}';
$result = $requestReport->applicationreportnew($account->merchant_id,strtolower($account->site),'/listings/2021-08-01/items/'.$account->merchant_id.'/'.$sku.'?marketplaceIds='.$account->market_place_id.'&issueLocale=en_US',"",$data,'PATCH');

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值