Method: accounts.products.update
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
ویژگی های محصول را در حساب Manufacturer Center درج یا به روز می کند.
یک محصول با ویژگی های ارائه شده ایجاد می کند. اگر محصول از قبل وجود داشته باشد، تمام ویژگی ها با ویژگی های جدید جایگزین می شوند. بررسی ها در زمان آپلود حداقل است. برای معتبر بودن یک محصول، باید تمام ویژگی های مورد نیاز وجود داشته باشد. بعد از اینکه API آپلود جدیدی را برای یک محصول پذیرفت و امکان بازنویسی یک محصول معتبر موجود با یک محصول نامعتبر وجود دارد، ممکن است بعداً ظاهر شوند. برای تشخیص این موضوع، باید محصول را بازیابی کنید و پس از در دسترس قرار گرفتن نسخه جدید، آن را برای مشکلات بررسی کنید.
ویژگی های آپلود شده ابتدا باید قبل از بازیابی آنها پردازش شوند. تا آن زمان، محصولات جدید در دسترس نخواهد بود و بازیابی محصولات قبلی آپلود شده، وضعیت اولیه محصول را برمی گرداند.
درخواست HTTP
PUT https://manufacturers.googleapis.com/v1/{parent=accounts/*}/products/{name}
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای مسیر
پارامترها |
---|
parent | string شناسه والدین در قالب accounts/{account_id} . account_id - شناسه حساب Manufacturer Center. |
name | string نام در قالب {targetCountry}:{contentLanguage}:{productId} . targetCountry - کشور هدف محصول به عنوان کد قلمرو CLDR (به عنوان مثال، ایالات متحده). contentLanguage - زبان محتوای محصول به عنوان کد زبان ISO 639-1 دو حرفی (به عنوان مثال، en). productId - شناسه محصول. برای اطلاعات بیشتر، https://support.google.com/manufacturers/answer/6124116#id را ببینید. |
درخواست بدن
بدنه درخواست شامل نمونه ای از Attributes
است.
بدن پاسخگو
در صورت موفقیت آمیز بودن، بدنه پاسخ یک شی JSON خالی است.
محدوده مجوز
به محدوده OAuth زیر نیاز دارد:
-
https://www.googleapis.com/auth/manufacturercenter
برای اطلاعات بیشتر، بهOAuth 2.0 Overview .
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-08-14 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-14 بهوقت ساعت هماهنگ جهانی."],[[["\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)."]]