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');