Reference documentation and code samples for the Google Shopping Merchant Products V1 Client class GetProductRequest.
Request message for the GetProduct method.
Generated from protobuf messagegoogle.shopping.merchant.products.v1.GetProductRequest
Namespace
Google \ Shopping \ Merchant \ Products \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Required. The name of the product to retrieve. Format:accounts/{account}/products/{product}where the last sectionproductconsists of:content_language~feed_label~offer_idexample for product name isaccounts/123/products/en~US~sku123. A legacy local product name would beaccounts/123/products/local~en~US~sku123. Note: For calls to the v1beta version, theproductsection consists of:channel~content_language~feed_label~offer_id, for example:accounts/123/products/online~en~US~sku123.
getName
Required. The name of the product to retrieve.
Format:accounts/{account}/products/{product}where the last
sectionproductconsists of:content_language~feed_label~offer_idexample for product name isaccounts/123/products/en~US~sku123. A legacy
local product name would beaccounts/123/products/local~en~US~sku123.
Note: For calls to the v1beta version, theproductsection consists
of:channel~content_language~feed_label~offer_id, for example:accounts/123/products/online~en~US~sku123.
Returns
Type
Description
string
setName
Required. The name of the product to retrieve.
Format:accounts/{account}/products/{product}where the last
sectionproductconsists of:content_language~feed_label~offer_idexample for product name isaccounts/123/products/en~US~sku123. A legacy
local product name would beaccounts/123/products/local~en~US~sku123.
Note: For calls to the v1beta version, theproductsection consists
of:channel~content_language~feed_label~offer_id, for example:accounts/123/products/online~en~US~sku123.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
static::build
Parameter
Name
Description
name
string
Required. The name of the product to retrieve.
Format:accounts/{account}/products/{product}where the last
sectionproductconsists of:content_language~feed_label~offer_idexample for product name isaccounts/123/products/en~US~sku123. A legacy
local product name would beaccounts/123/products/local~en~US~sku123.
Note: For calls to the v1beta version, theproductsection consists
of:channel~content_language~feed_label~offer_id, for example:accounts/123/products/online~en~US~sku123. Please seeProductsServiceClient::productName()for help formatting this field.
[[["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 Products V1 Client - Class GetProductRequest (1.0.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0 (latest)](/php/docs/reference/shopping-merchant-products/latest/V1.GetProductRequest)\n- [0.7.0](/php/docs/reference/shopping-merchant-products/0.7.0/V1.GetProductRequest)\n- [0.6.1](/php/docs/reference/shopping-merchant-products/0.6.1/V1.GetProductRequest)\n- [0.5.0](/php/docs/reference/shopping-merchant-products/0.5.0/V1.GetProductRequest)\n- [0.4.0](/php/docs/reference/shopping-merchant-products/0.4.0/V1.GetProductRequest)\n- [0.3.0](/php/docs/reference/shopping-merchant-products/0.3.0/V1.GetProductRequest)\n- [0.2.1](/php/docs/reference/shopping-merchant-products/0.2.1/V1.GetProductRequest)\n- [0.1.1](/php/docs/reference/shopping-merchant-products/0.1.1/V1.GetProductRequest) \nReference documentation and code samples for the Google Shopping Merchant Products V1 Client class GetProductRequest.\n\nRequest message for the GetProduct method.\n\nGenerated from protobuf message `google.shopping.merchant.products.v1.GetProductRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Shopping \\\\ Merchant \\\\ Products \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nRequired. The name of the product to retrieve.\n\nFormat:\n`accounts/{account}/products/{product}` where the last\nsection `product` consists of:\n`content_language~feed_label~offer_id`\nexample for product name is `accounts/123/products/en~US~sku123`. A legacy\nlocal product name would be `accounts/123/products/local~en~US~sku123`.\nNote: For calls to the v1beta version, the `product` section consists\nof: `channel~content_language~feed_label~offer_id`, for example:\n`accounts/123/products/online~en~US~sku123`.\n\n### setName\n\nRequired. The name of the product to retrieve.\n\nFormat:\n`accounts/{account}/products/{product}` where the last\nsection `product` consists of:\n`content_language~feed_label~offer_id`\nexample for product name is `accounts/123/products/en~US~sku123`. A legacy\nlocal product name would be `accounts/123/products/local~en~US~sku123`.\nNote: For calls to the v1beta version, the `product` section consists\nof: `channel~content_language~feed_label~offer_id`, for example:\n`accounts/123/products/online~en~US~sku123`.\n\n### static::build"]]