Method: accounts.products.update
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แทรกหรืออัปเดตแอตทริบิวต์ของผลิตภัณฑ์ในบัญชี Manufacturer Center
สร้างผลิตภัณฑ์ที่มีแอตทริบิวต์ที่ระบุ หากมีผลิตภัณฑ์อยู่แล้ว ระบบจะแทนที่แอตทริบิวต์ทั้งหมดด้วยแอตทริบิวต์ใหม่ การตรวจสอบในเวลาที่อัปโหลดจะดำเนินการเพียงเล็กน้อย ผลิตภัณฑ์ต้องมีแอตทริบิวต์ที่ต้องระบุทั้งหมดจึงจะถูกต้อง ปัญหาอาจปรากฏขึ้นในภายหลังหลังจากที่ API ยอมรับการอัปโหลดผลิตภัณฑ์ใหม่ และอาจมีการเขียนทับผลิตภัณฑ์ที่ถูกต้องที่มีอยู่ด้วยผลิตภัณฑ์ที่ไม่ถูกต้อง หากต้องการตรวจหาปัญหานี้ คุณควรดึงข้อมูลผลิตภัณฑ์และตรวจสอบปัญหาเมื่อเวอร์ชันใหม่พร้อมใช้งาน
ระบบจะต้องประมวลผลแอตทริบิวต์ที่อัปโหลดก่อนจึงจะดึงข้อมูลได้ ในระหว่างนี้ ผลิตภัณฑ์ใหม่จะไม่พร้อมใช้งาน และการดึงข้อมูลผลิตภัณฑ์ที่อัปโหลดก่อนหน้านี้จะทำให้ผลิตภัณฑ์กลับสู่สถานะเดิม
คำขอ HTTP
PUT https://manufacturers.googleapis.com/v1/{parent=accounts/*}/products/{name}
URL ใช้ไวยากรณ์การแปลงรหัส gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
parent |
string
รหัสระดับบนสุดในรูปแบบ accounts/{account_id} account_id - รหัสของบัญชี Manufacturer Center
|
name |
string
ชื่อในรูปแบบ {targetCountry}:{contentLanguage}:{productId} targetCountry - ประเทศเป้าหมายของผลิตภัณฑ์เป็นรหัสเขตแดน CLDR (เช่น US)
contentLanguage - ภาษาของเนื้อหาของผลิตภัณฑ์เป็นรหัสภาษา ISO 639-1 แบบ 2 ตัวอักษร (เช่น en)
productId - รหัสของผลิตภัณฑ์ ดูข้อมูลเพิ่มเติมได้ที่ https://support.google.com/manufacturers/answer/6124116#id
|
เนื้อความของคำขอ
เนื้อความของคำขอมีอินสแตนซ์ของ Attributes
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะเป็นออบเจ็กต์ JSON ที่ว่างเปล่า
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/manufacturercenter
ดูข้อมูลเพิ่มเติมได้ที่OAuth 2.0 Overview
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-17 UTC
[null,null,["อัปเดตล่าสุด 2025-08-17 UTC"],[[["\u003cp\u003eUpdates or creates product attributes within a Manufacturer Center account, potentially overwriting existing data.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing product details like target country, content language, and a unique product ID within the request.\u003c/p\u003e\n"],["\u003cp\u003eUploaded product data needs processing time before becoming visible or retrievable in its updated state.\u003c/p\u003e\n"],["\u003cp\u003eUtilizes the \u003ccode\u003ePUT\u003c/code\u003e method and specific path parameters for identifying the account and product in the request URL.\u003c/p\u003e\n"],["\u003cp\u003eNeeds authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/manufacturercenter\u003c/code\u003e scope for access.\u003c/p\u003e\n"]]],[],null,["# Method: accounts.products.update\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nInserts or updates the attributes of the product in a Manufacturer Center account.\n\nCreates a product with the provided attributes. If the product already exists, then all attributes are replaced with the new ones. The checks at upload time are minimal. All required attributes need to be present for a product to be valid. Issues may show up later after the API has accepted a new upload for a product and it is possible to overwrite an existing valid product with an invalid product. To detect this, you should retrieve the product and check it for issues once the new version is available.\n\nUploaded attributes first need to be processed before they can be retrieved. Until then, new products will be unavailable, and retrieval of previously uploaded products will return the original state of the product.\n\n### HTTP request\n\n`PUT https://manufacturers.googleapis.com/v1/{parent=accounts/*}/products/{name}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Parent ID in the format `accounts/{account_id}`. `account_id` - The ID of the Manufacturer Center account. |\n| `name` | `string` Name in the format `{targetCountry}:{contentLanguage}:{productId}`. `targetCountry` - The target country of the product as a CLDR territory code (for example, US). `contentLanguage` - The content language of the product as a two-letter ISO 639-1 language code (for example, en). `productId` - The ID of the product. For more information, see \u003chttps://support.google.com/manufacturers/answer/6124116#id\u003e. |\n\n### Request body\n\nThe request body contains an instance of [Attributes](/manufacturers/reference/rest/v1/Attributes).\n\n### Response body\n\nIf successful, the response body is an empty JSON object.\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/manufacturercenter`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]