Programs サブ API の概要
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
プログラムを使用すると、商品の宣伝を管理し、さまざまな Google サービスでアカウントの機能を強化できます。
典型的な例が、無料商品リスティング プログラムです。このプログラムでは、オンライン ショップの商品を Google の各種サービスに無料で掲載できます。
Programs サブ API を使用すると、利用可能なすべてのショッピング プログラムへの参加状況を取得して更新できます。
プログラムの取得、有効化、無効化には、次の方法を使用します。
すべてのプログラムを一覧表示する
アカウントのすべてのプログラムを取得するには、accounts.programs.list
メソッドを使用します。
リクエストの例を次に示します。
HTTP
GET https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/programs
cURL
curl \
'https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/programs?key=[YOUR_API_KEY]' \
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--compressed
成功したリクエストからのレスポンスの例を次に示します。
{
"programs": [
{
"name": "accounts/{ACCOUNT_ID}/programs/free-listings",
"documentationUri": "{URI}",
"state": "{ACCOUNT_STATE}",
"unmetRequirements": [
{
"title": "{TITLE}",
"documentationUri": "{URI}",
"affectedRegionCodes": [
"{REGION_CODE}"
]
}
]
}
]
}
単一のプログラムを取得する
特定のプログラムを取得するには、accounts.programs.get
メソッドを使用します。
リクエストの例を次に示します。
HTTP
GET https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/programs/free-listings
cURL
curl \
'https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/programs/free-listing?key=[YOUR_API_KEY]' \
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--compressed
成功したリクエストからのレスポンスの例を次に示します。
{
"name": "accounts/{ACCOUNT_ID}/programs/free-listings",
"documentationUri": "{URI}",
"state": "{ACCOUNT_STATE}",
"unmetRequirements": [
{
"title": "{TITLE}",
"documentationUri": "{URI}",
"affectedRegionCodes": [
"{REGION_CODE}"
]
}
]
}
プログラムを有効にする
アカウントで指定されたプログラムへの参加を有効にするには、accounts.programs.enable
メソッドを使用します。この権限を実行するには、管理者権限が必要です。
リクエストの例を次に示します。
HTTP
POST https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/programs/free-listings:enable
cURL
curl --request POST \
'https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/programs/free-listing:enable?key=[YOUR_API_KEY]' \
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{}' \
--compressed
成功したリクエストからのレスポンスの例を次に示します。
{
"name": "accounts/{ACCOUNT_ID}/programs/free-listings",
"documentationUri": "{URI}",
"state": "{ACCOUNT_STATE}",
"unmetRequirements": [
{
"title": "{TITLE}",
"documentationUri": "{URI}",
"affectedRegionCodes": [
"{REGION_CODE}"
]
}
]
}
プログラムを無効にする
アカウントの指定したプログラムへの参加を無効にするには、accounts.programs.disable
メソッドを使用します。この権限を実行するには、管理者権限が必要です。
リクエストの例を次に示します。
HTTP
POST https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/programs/free-listings:disable
cURL
curl --request POST \
'https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/programs/free-listing:disable?key=[YOUR_API_KEY]' \
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{}' \
--compressed
成功したリクエストからのレスポンスの例を次に示します。
{
"name": "accounts/{ACCOUNT_ID}/programs/free-listings",
"documentationUri": "{URI}",
"state": "{ACCOUNT_STATE}"
}
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-08 UTC。
[null,null,["最終更新日 2025-08-08 UTC。"],[[["\u003cp\u003ePrograms allow users to manage the promotion of their products and enhance account features across Google.\u003c/p\u003e\n"],["\u003cp\u003eThe Programs API enables the retrieval and modification of participation in all available shopping programs.\u003c/p\u003e\n"],["\u003cp\u003eUsers can retrieve all programs for an account using the \u003ccode\u003eaccounts.programs.list\u003c/code\u003e method, with example requests and responses provided.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eaccounts.programs.get\u003c/code\u003e, \u003ccode\u003eaccounts.programs.enable\u003c/code\u003e, and \u003ccode\u003eaccounts.programs.disable\u003c/code\u003e methods can be used to manage specific programs, such as enabling or disabling free product listings.\u003c/p\u003e\n"],["\u003cp\u003eEnabling or disabling programs requires administrator access, as detailed in the provided documentation.\u003c/p\u003e\n"]]],["Programs API manages participation in Google shopping programs, like free product listings, to enhance product promotion across Google. You can retrieve, enable, and disable these programs using specific API methods. `accounts.programs.list` retrieves all programs; `accounts.programs.get` retrieves a single program. The methods `accounts.programs.enable` and `accounts.programs.disable` allow for enabling or disabling program participation, respectively. These actions require administrator access, and successful requests return program details, including state and unmet requirements.\n"],null,["# Overview of Programs sub-API\n\nPrograms let you control the\n[promotion of your products](https://www.google.com/retail/) and enhance the\nfeatures of your account across various Google surfaces.\n\nA typical example of this is the [free product listings](//support.google.com/merchants/topic/15190028)\nprogram, which enables products from your online store to be shown across\nGoogle with no charge.\n\nPrograms sub-API lets you retrieve and update your participation in all\navailable shopping programs.\n\nTo retrieve, enable, and disable programs, you can use the following methods:\n\n- [`accounts.programs.list`](#list)\n- [`accounts.programs.get`](#get)\n- [`accounts.programs.enable`](#enable)\n- [`accounts.programs.disable`](#disable)\n\nList all programs\n-----------------\n\nTo retrieve all programs for the account, use the [`accounts.programs.list`](/merchant/api/reference/rest/accounts_v1/accounts.programs/list)\nmethod.\n\nHere's a sample request: \n\n### HTTP\n\n GET https://merchantapi.googleapis.com/accounts/v1/accounts/\u003cvar translate=\"no\"\u003e{ACCOUNT_ID}\u003c/var\u003e/programs\n\n### cURL\n\n curl \\\n 'https://merchantapi.googleapis.com/accounts/v1/accounts/\u003cvar translate=\"no\"\u003e{ACCOUNT_ID}\u003c/var\u003e/programs?key=[YOUR_API_KEY]' \\\n --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \\\n --header 'Accept: application/json' \\\n --compressed\n\nHere's a sample response from a successful request: \n\n {\n \"programs\": [\n {\n \"name\": \"accounts/\u003cvar class=\"readonly\" translate=\"no\"\u003e{ACCOUNT_ID}\u003c/var\u003e/programs/free-listings\",\n \"documentationUri\": \"\u003cvar class=\"readonly\" translate=\"no\"\u003e{URI}\u003c/var\u003e\",\n \"state\": \"\u003cvar class=\"readonly\" translate=\"no\"\u003e{ACCOUNT_STATE}\u003c/var\u003e\",\n \"unmetRequirements\": [\n {\n \"title\": \"\u003cvar class=\"readonly\" translate=\"no\"\u003e{TITLE}\u003c/var\u003e\",\n \"documentationUri\": \"\u003cvar class=\"readonly\" translate=\"no\"\u003e{URI}\u003c/var\u003e\",\n \"affectedRegionCodes\": [\n \"\u003cvar class=\"readonly\" translate=\"no\"\u003e{REGION_CODE}\u003c/var\u003e\"\n ]\n }\n ]\n }\n ]\n }\n\nRetrieve a single program\n-------------------------\n\nTo retrieve a specific program, use the [`accounts.programs.get`](/merchant/api/reference/rest/accounts_v1/accounts.programs/get)\nmethod.\n\nHere's a sample request: \n\n### HTTP\n\n GET https://merchantapi.googleapis.com/accounts/v1/accounts/\u003cvar translate=\"no\"\u003e{ACCOUNT_ID}\u003c/var\u003e/programs/free-listings\n\n### cURL\n\n curl \\\n 'https://merchantapi.googleapis.com/accounts/v1/accounts/\u003cvar translate=\"no\"\u003e{ACCOUNT_ID}\u003c/var\u003e/programs/free-listing?key=[YOUR_API_KEY]' \\\n --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \\\n --header 'Accept: application/json' \\\n --compressed\n\nHere's a sample response from a successful request: \n\n {\n \"name\": \"accounts/\u003cvar class=\"readonly\" translate=\"no\"\u003e{ACCOUNT_ID}\u003c/var\u003e/programs/free-listings\",\n \"documentationUri\": \"\u003cvar class=\"readonly\" translate=\"no\"\u003e{URI}\u003c/var\u003e\",\n \"state\": \"\u003cvar class=\"readonly\" translate=\"no\"\u003e{ACCOUNT_STATE}\u003c/var\u003e\",\n \"unmetRequirements\": [\n {\n \"title\": \"\u003cvar class=\"readonly\" translate=\"no\"\u003e{TITLE}\u003c/var\u003e\",\n \"documentationUri\": \"\u003cvar class=\"readonly\" translate=\"no\"\u003e{URI}\u003c/var\u003e\",\n \"affectedRegionCodes\": [\n \"\u003cvar class=\"readonly\" translate=\"no\"\u003e{REGION_CODE}\u003c/var\u003e\"\n ]\n }\n ]\n }\n\nEnable a program\n----------------\n\nTo enable participation in the specified program for the account, use the [`accounts.programs.enable`](/merchant/api/reference/rest/accounts_v1/accounts.programs/enable)\nmethod. You must have [administrator access](/merchant/api/guides/accounts/control-access)\nto run this permission.\n\nHere's a sample request: \n\n### HTTP\n\n POST https://merchantapi.googleapis.com/accounts/v1/accounts/\u003cvar translate=\"no\"\u003e{ACCOUNT_ID}\u003c/var\u003e/programs/free-listings:enable\n\n### cURL\n\n curl --request POST \\\n 'https://merchantapi.googleapis.com/accounts/v1/accounts/\u003cvar translate=\"no\"\u003e{ACCOUNT_ID}\u003c/var\u003e/programs/free-listing:enable?key=[YOUR_API_KEY]' \\\n --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \\\n --header 'Accept: application/json' \\\n --header 'Content-Type: application/json' \\\n --data '{}' \\\n --compressed\n\nHere's a sample response from a successful request: \n\n {\n \"name\": \"accounts/\u003cvar class=\"readonly\" translate=\"no\"\u003e{ACCOUNT_ID}\u003c/var\u003e/programs/free-listings\",\n \"documentationUri\": \"\u003cvar class=\"readonly\" translate=\"no\"\u003e{URI}\u003c/var\u003e\",\n \"state\": \"\u003cvar class=\"readonly\" translate=\"no\"\u003e{ACCOUNT_STATE}\u003c/var\u003e\",\n \"unmetRequirements\": [\n {\n \"title\": \"\u003cvar class=\"readonly\" translate=\"no\"\u003e{TITLE}\u003c/var\u003e\",\n \"documentationUri\": \"\u003cvar class=\"readonly\" translate=\"no\"\u003e{URI}\u003c/var\u003e\",\n \"affectedRegionCodes\": [\n \"\u003cvar class=\"readonly\" translate=\"no\"\u003e{REGION_CODE}\u003c/var\u003e\"\n ]\n }\n ]\n }\n\nDisable a program\n-----------------\n\nTo disable participation in the specified program for the account, use the [`accounts.programs.disable`](/merchant/api/reference/rest/accounts_v1/accounts.programs/disable)\nmethod. You must have [administrator access](/merchant/api/guides/accounts/control-access)\nto run this permission.\n\nHere's a sample request: \n\n### HTTP\n\n POST https://merchantapi.googleapis.com/accounts/v1/accounts/\u003cvar translate=\"no\"\u003e{ACCOUNT_ID}\u003c/var\u003e/programs/free-listings:disable\n\n### cURL\n\n curl --request POST \\\n 'https://merchantapi.googleapis.com/accounts/v1/accounts/\u003cvar translate=\"no\"\u003e{ACCOUNT_ID}\u003c/var\u003e/programs/free-listing:disable?key=[YOUR_API_KEY]' \\\n --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \\\n --header 'Accept: application/json' \\\n --header 'Content-Type: application/json' \\\n --data '{}' \\\n --compressed\n\nHere's a sample response from a successful request: \n\n {\n \"name\": \"accounts/\u003cvar class=\"readonly\" translate=\"no\"\u003e{ACCOUNT_ID}\u003c/var\u003e/programs/free-listings\",\n \"documentationUri\": \"\u003cvar class=\"readonly\" translate=\"no\"\u003e{URI}\u003c/var\u003e\",\n \"state\": \"\u003cvar class=\"readonly\" translate=\"no\"\u003e{ACCOUNT_STATE}\u003c/var\u003e\"\n }"]]