Overview of Programs sub-API

Programs let you control the promotion of your products and enhance the features of your account across various Google surfaces.

A typical example of this is the free product listings program, which enables products from your online store to be shown across Google with no charge.

Programs sub-API lets you retrieve and update your participation in all available shopping programs.

To retrieve, enable, and disable programs, you can use the following methods:

List all programs

To retrieve all programs for the account, use the accounts.programs.list method.

Here's a sample request:

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 
 

Here's a sample response from a successful request:

  { 
  
 "programs" 
 : 
  
 [ 
  
 { 
  
 "name" 
 : 
  
 "accounts/ {ACCOUNT_ID} 
/programs/free-listings" 
 , 
  
 "documentationUri" 
 : 
  
 " {URI} 
" 
 , 
  
 "state" 
 : 
  
 " {ACCOUNT_STATE} 
" 
 , 
  
 "unmetRequirements" 
 : 
  
 [ 
  
 { 
  
 "title" 
 : 
  
 " {TITLE} 
" 
 , 
  
 "documentationUri" 
 : 
  
 " {URI} 
" 
 , 
  
 "affectedRegionCodes" 
 : 
  
 [ 
  
 " {REGION_CODE} 
" 
  
 ] 
  
 } 
  
 ] 
  
 } 
  
 ] 
 } 
 

Retrieve a single program

To retrieve a specific program, use the accounts.programs.get method.

Here's a sample request:

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 
 

Here's a sample response from a successful request:

  { 
  
 "name" 
 : 
  
 "accounts/ {ACCOUNT_ID} 
/programs/free-listings" 
 , 
  
 "documentationUri" 
 : 
  
 " {URI} 
" 
 , 
  
 "state" 
 : 
  
 " {ACCOUNT_STATE} 
" 
 , 
  
 "unmetRequirements" 
 : 
  
 [ 
  
 { 
  
 "title" 
 : 
  
 " {TITLE} 
" 
 , 
  
 "documentationUri" 
 : 
  
 " {URI} 
" 
 , 
  
 "affectedRegionCodes" 
 : 
  
 [ 
  
 " {REGION_CODE} 
" 
  
 ] 
  
 } 
  
 ] 
 } 
 

Enable a program

To enable participation in the specified program for the account, use the accounts.programs.enable method. You must have administrator access to run this permission.

Here's a sample request:

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 
 

Here's a sample response from a successful request:

  { 
  
 "name" 
 : 
  
 "accounts/ {ACCOUNT_ID} 
/programs/free-listings" 
 , 
  
 "documentationUri" 
 : 
  
 " {URI} 
" 
 , 
  
 "state" 
 : 
  
 " {ACCOUNT_STATE} 
" 
 , 
  
 "unmetRequirements" 
 : 
  
 [ 
  
 { 
  
 "title" 
 : 
  
 " {TITLE} 
" 
 , 
  
 "documentationUri" 
 : 
  
 " {URI} 
" 
 , 
  
 "affectedRegionCodes" 
 : 
  
 [ 
  
 " {REGION_CODE} 
" 
  
 ] 
  
 } 
  
 ] 
 } 
 

Disable a program

To disable participation in the specified program for the account, use the accounts.programs.disable method. You must have administrator access to run this permission.

Here's a sample request:

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 
 

Here's a sample response from a successful request:

  { 
  
 "name" 
 : 
  
 "accounts/ {ACCOUNT_ID} 
/programs/free-listings" 
 , 
  
 "documentationUri" 
 : 
  
 " {URI} 
" 
 , 
  
 "state" 
 : 
  
 " {ACCOUNT_STATE} 
" 
 } 
 
Create a Mobile Website
View Site in Mobile | Classic
Share by: