Reference documentation and code samples for the Google Shopping Merchant Accounts V1 Client class Program.
Defines participation in a given program for the specified account.
Programs provide a mechanism for adding functionality to a Merchant Center
accounts. A typical example of this is theFree product
listingsprogram, which enables products from a business's store to be shown across
Google for free.
The following list is the available set of program resource IDs accessible
through the API:
free-listings
shopping-ads
youtube-shopping-checkout
Generated from protobuf messagegoogle.shopping.merchant.accounts.v1.Program
Namespace
Google \ Shopping \ Merchant \ Accounts \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Identifier. The resource name of the program. Format:accounts/{account}/programs/{program}
↳ documentation_uri
string
Output only. The URL of a Merchant Center help page describing the program.
↳ state
int
Output only. The participation state of the account in the program.
↳ active_region_codes
array
Output only. The regions in which the account is actively participating in the program. Active regions are defined as those where all program requirements affecting the regions have been met. Region codes are defined byCLDR. This is either a country where the program applies specifically to that country or001when the program applies globally.
Output only. The requirements that the account has not yet satisfied that are affecting participation in the program.
getName
Identifier. The resource name of the program.
Format:accounts/{account}/programs/{program}
Returns
Type
Description
string
setName
Identifier. The resource name of the program.
Format:accounts/{account}/programs/{program}
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDocumentationUri
Output only. The URL of a Merchant Center help page describing the program.
Returns
Type
Description
string
setDocumentationUri
Output only. The URL of a Merchant Center help page describing the program.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getState
Output only. The participation state of the account in the program.
Returns
Type
Description
int
setState
Output only. The participation state of the account in the program.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getActiveRegionCodes
Output only. The regions in which the account is actively participating in
the program. Active regions are defined as those where all program
requirements affecting the regions have been met.
Region codes are defined byCLDR. This is
either a country where the program applies specifically to that country or001when the program applies globally.
Output only. The regions in which the account is actively participating in
the program. Active regions are defined as those where all program
requirements affecting the regions have been met.
Region codes are defined byCLDR. This is
either a country where the program applies specifically to that country or001when the program applies globally.
Parameter
Name
Description
var
string[]
Returns
Type
Description
$this
getUnmetRequirements
Output only. The requirements that the account has not yet satisfied that
are affecting participation in the program.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Shopping Merchant Accounts V1 Client - Class Program (1.0.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0 (latest)](/php/docs/reference/shopping-merchant-accounts/latest/V1.Program)\n- [0.10.0](/php/docs/reference/shopping-merchant-accounts/0.10.0/V1.Program)\n- [0.9.1](/php/docs/reference/shopping-merchant-accounts/0.9.1/V1.Program)\n- [0.8.0](/php/docs/reference/shopping-merchant-accounts/0.8.0/V1.Program)\n- [0.7.0](/php/docs/reference/shopping-merchant-accounts/0.7.0/V1.Program)\n- [0.6.0](/php/docs/reference/shopping-merchant-accounts/0.6.0/V1.Program)\n- [0.5.0](/php/docs/reference/shopping-merchant-accounts/0.5.0/V1.Program)\n- [0.4.0](/php/docs/reference/shopping-merchant-accounts/0.4.0/V1.Program)\n- [0.3.3](/php/docs/reference/shopping-merchant-accounts/0.3.3/V1.Program)\n- [0.2.0](/php/docs/reference/shopping-merchant-accounts/0.2.0/V1.Program)\n- [0.1.0](/php/docs/reference/shopping-merchant-accounts/0.1.0/V1.Program) \nReference documentation and code samples for the Google Shopping Merchant Accounts V1 Client class Program.\n\nDefines participation in a given program for the specified account.\n\nPrograms provide a mechanism for adding functionality to a Merchant Center\naccounts. A typical example of this is the [Free product\nlistings](https://support.google.com/merchants/answer/13889434)\nprogram, which enables products from a business's store to be shown across\nGoogle for free.\nThe following list is the available set of program resource IDs accessible\nthrough the API:\n\n- `free-listings`\n- `shopping-ads`\n- `youtube-shopping-checkout`\n\nGenerated from protobuf message `google.shopping.merchant.accounts.v1.Program`\n\nNamespace\n---------\n\nGoogle \\\\ Shopping \\\\ Merchant \\\\ Accounts \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nIdentifier. The resource name of the program.\n\nFormat: `accounts/{account}/programs/{program}`\n\n### setName\n\nIdentifier. The resource name of the program.\n\nFormat: `accounts/{account}/programs/{program}`\n\n### getDocumentationUri\n\nOutput only. The URL of a Merchant Center help page describing the program.\n\n### setDocumentationUri\n\nOutput only. The URL of a Merchant Center help page describing the program.\n\n### getState\n\nOutput only. The participation state of the account in the program.\n\n### setState\n\nOutput only. The participation state of the account in the program.\n\n### getActiveRegionCodes\n\nOutput only. The regions in which the account is actively participating in\nthe program. Active regions are defined as those where all program\nrequirements affecting the regions have been met.\n\nRegion codes are defined by [CLDR](https://cldr.unicode.org/). This is\neither a country where the program applies specifically to that country or\n`001` when the program applies globally.\n\n### setActiveRegionCodes\n\nOutput only. The regions in which the account is actively participating in\nthe program. Active regions are defined as those where all program\nrequirements affecting the regions have been met.\n\nRegion codes are defined by [CLDR](https://cldr.unicode.org/). This is\neither a country where the program applies specifically to that country or\n`001` when the program applies globally.\n\n### getUnmetRequirements\n\nOutput only. The requirements that the account has not yet satisfied that\nare affecting participation in the program.\n\n### setUnmetRequirements\n\nOutput only. The requirements that the account has not yet satisfied that\nare affecting participation in the program."]]