rocket Meet
Merchant API - جانشین رسمی Content API برای خرید.
update جدیدترین ویژگیهای Merchant API، رفع اشکالها و بهروزرسانیها
را دریافت کنید .
add_alert توجه: Content API برای خرید در 18 اوت 2026 غروب میکند.
نمایه کسب و کار خود را پیوند دهید
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
برای ارائه موجودی محلی به Merchant Center، ابتدا باید مشخص کنید که Merchant Center مسئولیت کدام مشاغل را بر عهده خواهد داشت. میتوانید فهرست گروههای تجاری احتمالی را از نمایه کسبوکار از طریق Content API دریافت کنید، اما ابتدا باید درخواست دسترسی به نمایه کسبوکار را داشته باشید.
درخواست دسترسی به نمایه کسب و کار
برای درخواست دسترسی به نمایه کسب و کار خود، از روش liasettings.requestgmbaccess
استفاده کنید:
POST https://shoppingcontent.googleapis.com/content/v2.1/12345/liasettings/67890/requestgmbaccess?gmbEmail=admin@example.com
همانطور که این مثال نشان می دهد، پارامتر query gmbEmail
آدرس ایمیل مدیر را برای نمایه کسب و کار مشخص می کند.
پس از تماس با این روش، مدیر مشخص شده ایمیلی دریافت می کند که از آنها می خواهد درخواست دسترسی را بپذیرند یا رد کنند. در صورتی که مدیر اقدامی انجام ندهد این درخواست پس از 7 روز منقضی می شود.
گروه های تجاری موجود را فهرست کنید
هنگامی که دسترسی مجاز شد، میتوانید با تماس با روش liasettings.getaccessiblegmbaccounts
ببینید کدام کسبوکارها در دسترس هستند:
GET https://shoppingcontent.googleapis.com/content/v2.1/12345/liasettings/67890/accessiblegmbaccounts
Response:
200 OK
{
"kind": "content#liasettingsGetAccessibleGmbAccountsResponse",
"accountId": 67890,
"gmbAccounts": [{
"type" : "user",
"email" : "admin@example.com",
"name" : "admin@example.com",
"listingCount": 82
},
{
"type" : "business",
"email" : "california@example.com",
"name" : "Golden-State",
"listingCount" : 20
},
{
"type" : "business",
"email" : "florida@example.com",
"name" : "Sunshine-State",
"listingCount" : 15
},
{
"type" : "business",
"email" : "newyork@example.com",
"name" : "Empire-State",
"listingCount" : 25
}]
}
گروه تجاری را برای حساب Merchant Center مشخص کنید
اکنون که فهرستی از گروههای تجاری احتمالی دارید، باید فیلد googleMyBusinessLink
را در منبع Accounts
مرتبط با حساب Merchant Center روی مورد دلخواه تنظیم کنید. برای مثال، اگر Merchant Center 67890 حاوی محصولاتی برای مشاغل مستقر در کالیفرنیا باشد، میتوانید از Accounts.update
برای تنظیم این اطلاعات استفاده کنید:
PUT https://shoppingcontent.googleapis.com/content/v2/12345/accounts/67890
{
"googleMyBusinessLink" : {
"gmbEmail": "california@example.com"
}
}
Response:
200 OK
{
"kind": "content#account",
"id": 67890,
"googleMyBusinessLink" : {
"gmbEmail": "california@example.com",
"status" : "active"
}
}
تنظیم فیلد googleMyBusinessLink
نیازی به تأیید دستی ندارد، بنابراین وضعیت پیوند فوراً منعکس می شود.
اطلاعات محصول و موجودی را ارسال کنید
اکنون که Merchant Center با یک گروه تجاری مرتبط است، میتوانید دادههای موجودی محصول محلی و محصولات محلی را برای آن مشاغل ارائه دهید. برای این کار، از همان روشهایی مانند products.insert
استفاده میکنید که برای آپلود محصولات آنلاین و دادههای موجودی استفاده میکنید. برای products.insert
، به جای online
، یک کانال local
را مشخص خواهید کرد.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-08-13 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-13 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThe Merchant API is the new version of the Content API for Shopping and its future.\u003c/p\u003e\n"],["\u003cp\u003eTo provide local inventory, you must first link your Merchant Center to your Business Profile.\u003c/p\u003e\n"],["\u003cp\u003eAccess to the Business Profile is requested via the \u003ccode\u003eliasettings.requestgmbaccess\u003c/code\u003e method and granted by the Business Profile administrator.\u003c/p\u003e\n"],["\u003cp\u003eAfter access is granted, you can specify the business group for your Merchant Center and submit local product and inventory data.\u003c/p\u003e\n"]]],["The Merchant API beta, a new version of the Content API for Shopping, is introduced. To provide local inventory, first request Business Profile access via the `liasettings.requestgmbaccess` method, specifying the administrator's email. Once granted, use `liasettings.getaccessiblegmbaccounts` to list available business groups. Associate the Merchant Center account with a business group by setting the `googleMyBusinessLink` field via `Accounts.update`. Finally, submit local product and inventory data using methods like `products.insert`, specifying the \"local\" channel.\n"],null,["# Link your Business Profile\n\nTo provide local inventory to the Merchant Center, you must first specify which\nbusinesses the Merchant Center will be responsible for. You can get the list of\npossible business groups from the Business Profile via the Content API, but you'll need\nto request access to the Business Profile first.\n\nRequest access to a Business Profile\n------------------------------------\n\nTo request access to your Business Profile, use the\n[`liasettings.requestgmbaccess`](/shopping-content/reference/rest/v2.1/liasettings/requestgmbaccess)\nmethod: \n\n POST https://shoppingcontent.googleapis.com/content/v2.1/12345/liasettings/67890/requestgmbaccess?gmbEmail=admin@example.com\n\nAs this example shows, the `gmbEmail` query parameter specifies the email\naddress of the administrator for the Business Profile.\n\nAfter you call this method, the specified administrator will receive an email\nasking them to accept or reject the access request. This request expires after\n7 days if no action is taken by the administrator.\n\nList the available business groups\n----------------------------------\n\nOnce access has been permitted, you can see which businesses are available by\ncalling the\n[`liasettings.getaccessiblegmbaccounts`](/shopping-content/reference/rest/v2.1/liasettings/getaccessiblegmbaccounts)\nmethod: \n\n GET https://shoppingcontent.googleapis.com/content/v2.1/12345/liasettings/67890/accessiblegmbaccounts\n\n Response:\n 200 OK\n {\n \"kind\": \"content#liasettingsGetAccessibleGmbAccountsResponse\",\n \"accountId\": 67890,\n \"gmbAccounts\": [{\n \"type\" : \"user\",\n \"email\" : \"admin@example.com\",\n \"name\" : \"admin@example.com\",\n \"listingCount\": 82\n },\n {\n \"type\" : \"business\",\n \"email\" : \"california@example.com\",\n \"name\" : \"Golden-State\",\n \"listingCount\" : 20\n },\n {\n \"type\" : \"business\",\n \"email\" : \"florida@example.com\",\n \"name\" : \"Sunshine-State\",\n \"listingCount\" : 15\n },\n {\n \"type\" : \"business\",\n \"email\" : \"newyork@example.com\",\n \"name\" : \"Empire-State\",\n \"listingCount\" : 25\n }]\n }\n\nSpecify the business group for the Merchant Center account\n----------------------------------------------------------\n\nNow that you have a list of possible business groups, you need to set the\n`googleMyBusinessLink` field in the\n[`Accounts`](/shopping-content/reference/rest/v2.1/accounts) resource associated\nwith the Merchant Center account to the desired one. For example, if Merchant\nCenter 67890 will contain products for California-based businesses, you can use\n[`Accounts.update`](/shopping-content/reference/rest/v2.1/accounts/update) to set that\ninformation: \n\n PUT https://shoppingcontent.googleapis.com/content/v2/12345/accounts/67890\n {\n \"googleMyBusinessLink\" : {\n \"gmbEmail\": \"california@example.com\"\n }\n }\n\n Response:\n 200 OK\n {\n \"kind\": \"content#account\",\n \"id\": 67890,\n \"googleMyBusinessLink\" : {\n \"gmbEmail\": \"california@example.com\",\n \"status\" : \"active\"\n }\n }\n\nSetting the `googleMyBusinessLink` field does not require any manual\nverification, so the status of the link will be reflected immediately.\n\nSubmit product and inventory data\n---------------------------------\n\nNow that the Merchant Center is associated with a business group, you can\nprovide local product and local product inventory data for those businesses.\nFor this, you use the same methods, such as\n[`products.insert`](/shopping-content/reference/rest/v2.1/products/insert) that you\nuse to upload online products and inventory data.\nFor `products.insert`, you'll specify a channel of `local` instead of `online`.\n| **Note:** There are separate requirements for [local product feeds](https://support.google.com/merchants/answer/3061198) and [local product inventory feeds](https://support.google.com/merchants/answer/3061342), so make sure you're providing all the necessary information."]]