Skip to content

Latest commit

 

History

History

google_manufacturers

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

@datafire/google_manufacturers

Client library for Manufacturer Center API

Installation and Usage

npm install --save @datafire/google_manufacturers
let google_manufacturers = require('@datafire/google_manufacturers').create({
  access_token: "",
  refresh_token: "",
  client_id: "",
  client_secret: "",
  redirect_uri: ""
});

.then(data => {
  console.log(data);
});

Description

Public API for managing Manufacturer Center related data.

Actions

oauthCallback

Exchange the code passed to your redirect URI for an access_token

google_manufacturers.oauthCallback({
  "code": ""
}, context)

Input

  • input object
    • code required string

Output

  • output object
    • access_token string
    • refresh_token string
    • token_type string
    • scope string
    • expiration string

oauthRefresh

Exchange a refresh_token for an access_token

google_manufacturers.oauthRefresh(null, context)

Input

This action has no parameters

Output

  • output object
    • access_token string
    • refresh_token string
    • token_type string
    • scope string
    • expiration string

manufacturers.accounts.products.list

Lists all the products in a Manufacturer Center account.

google_manufacturers.manufacturers.accounts.products.list({
  "parent": ""
}, context)

Input

  • input object
    • parent required string: Parent ID in the format accounts/{account_id}. account_id - The ID of the Manufacturer Center account.
    • include array: The information to be included in the response. Only sections listed here will be returned.
    • pageSize integer: Maximum number of product statuses to return in the response, used for paging.
    • pageToken string: The token returned by the previous request.
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

manufacturers.accounts.products.delete

Deletes the product from a Manufacturer Center account.

google_manufacturers.manufacturers.accounts.products.delete({
  "parent": "",
  "name": ""
}, context)

Input

  • input object
    • parent required string: Parent ID in the format accounts/{account_id}. account_id - The ID of the Manufacturer Center account.
    • name required string: Name in the format {target_country}:{content_language}:{product_id}. target_country - The target country of the product as a CLDR territory code (for example, US). content_language - The content language of the product as a two-letter ISO 639-1 language code (for example, en). product_id - The ID of the product. For more information, see https://support.google.com/manufacturers/answer/6124116#id.
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

manufacturers.accounts.products.get

Gets the product from a Manufacturer Center account, including product issues. A recently updated product takes around 15 minutes to process. Changes are only visible after it has been processed. While some issues may be available once the product has been processed, other issues may take days to appear.

google_manufacturers.manufacturers.accounts.products.get({
  "parent": "",
  "name": ""
}, context)

Input

  • input object
    • parent required string: Parent ID in the format accounts/{account_id}. account_id - The ID of the Manufacturer Center account.
    • name required string: Name in the format {target_country}:{content_language}:{product_id}. target_country - The target country of the product as a CLDR territory code (for example, US). content_language - The content language of the product as a two-letter ISO 639-1 language code (for example, en). product_id - The ID of the product. For more information, see https://support.google.com/manufacturers/answer/6124116#id.
    • include array: The information to be included in the response. Only sections listed here will be returned.
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

manufacturers.accounts.products.update

Inserts or updates the attributes of the product in a Manufacturer Center account. Creates a product with the provided attributes. If the product already exists, then all attributes are replaced with the new ones. The checks at upload time are minimal. All required attributes need to be present for a product to be valid. Issues may show up later after the API has accepted a new upload for a product and it is possible to overwrite an existing valid product with an invalid product. To detect this, you should retrieve the product and check it for issues once the new version is available. Uploaded attributes first need to be processed before they can be retrieved. Until then, new products will be unavailable, and retrieval of previously uploaded products will return the original state of the product.

google_manufacturers.manufacturers.accounts.products.update({
  "parent": "",
  "name": ""
}, context)

Input

  • input object
    • parent required string: Parent ID in the format accounts/{account_id}. account_id - The ID of the Manufacturer Center account.
    • name required string: Name in the format {target_country}:{content_language}:{product_id}. target_country - The target country of the product as a CLDR territory code (for example, US). content_language - The content language of the product as a two-letter ISO 639-1 language code (for example, en). product_id - The ID of the product. For more information, see https://support.google.com/manufacturers/answer/6124116#id.
    • body Attributes
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

Definitions

Attributes

Capacity

Count

DestinationStatus

  • DestinationStatus object: The destination status.
    • destination string: The name of the destination.
    • status string (values: UNKNOWN, ACTIVE, PENDING, DISAPPROVED): The status of the destination.

Empty

  • Empty object: A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for Empty is empty JSON object {}.

FeatureDescription

Image

  • Image object: An image.
    • imageUrl string: The URL of the image. For crawled images, this is the provided URL. For uploaded images, this is a serving URL from Google if the image has been processed successfully.
    • status string (values: STATUS_UNSPECIFIED, PENDING_PROCESSING, PENDING_CRAWL, OK, ROBOTED, XROBOTED, CRAWL_ERROR, PROCESSING_ERROR, DECODING_ERROR, TOO_BIG, CRAWL_SKIPPED, HOSTLOADED, HTTP_404): The status of the image. @OutputOnly
    • type string (values: TYPE_UNSPECIFIED, CRAWLED, UPLOADED): The type of the image, i.e., crawled or uploaded. @OutputOnly

Issue

  • Issue object: Product issue.
    • attribute string: If present, the attribute that triggered the issue. For more information about attributes, see https://support.google.com/manufacturers/answer/6124116.
    • description string: Longer description of the issue focused on how to resolve it.
    • destination string: The destination this issue applies to.
    • resolution string (values: RESOLUTION_UNSPECIFIED, USER_ACTION, PENDING_PROCESSING): What needs to happen to resolve the issue.
    • severity string (values: SEVERITY_UNSPECIFIED, ERROR, WARNING, INFO): The severity of the issue.
    • timestamp string: The timestamp when this issue appeared.
    • title string: Short title describing the nature of the issue.
    • type string: The server-generated type of the issue, for example, “INCORRECT_TEXT_FORMATTING”, “IMAGE_NOT_SERVEABLE”, etc.

ListProductsResponse

  • ListProductsResponse object
    • nextPageToken string: The token for the retrieval of the next page of product statuses.
    • products array: List of the products.

Price

  • Price object: A price.
    • amount string: The numeric value of the price.
    • currency string: The currency in which the price is denoted.

Product

  • Product object: Product data.
    • attributes Attributes
    • contentLanguage string: The content language of the product as a two-letter ISO 639-1 language code (for example, en).
    • destinationStatuses array: The status of the destinations.
    • issues array: A server-generated list of issues associated with the product.
    • name string: Name in the format {target_country}:{content_language}:{product_id}. target_country - The target country of the product as a CLDR territory code (for example, US). content_language - The content language of the product as a two-letter ISO 639-1 language code (for example, en). product_id - The ID of the product. For more information, see https://support.google.com/manufacturers/answer/6124116#id.
    • parent string: Parent ID in the format accounts/{account_id}. account_id - The ID of the Manufacturer Center account.
    • productId string: The ID of the product. For more information, see https://support.google.com/manufacturers/answer/6124116#id.
    • targetCountry string: The target country of the product as a CLDR territory code (for example, US).

ProductDetail

  • ProductDetail object: A product detail of the product. For more information, see https://support.google.com/manufacturers/answer/6124116#productdetail.
    • attributeName string: The name of the attribute.
    • attributeValue string: The value of the attribute.
    • sectionName string: A short section name that can be reused between multiple product details.