googleapis
Version:
Google APIs Client Library for Node.js
1,281 lines (1,280 loc) • 571 kB
TypeScript
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { Readable } from 'stream';
export declare namespace content_v2 {
export interface Options extends GlobalOptions {
version: 'v2';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: 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.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* 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.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* Content API for Shopping
*
* Manage your product listings and accounts for Google Shopping
*
* @example
* ```js
* const {google} = require('googleapis');
* const content = google.content('v2');
* ```
*/
export class Content {
context: APIRequestContext;
accounts: Resource$Accounts;
accountstatuses: Resource$Accountstatuses;
accounttax: Resource$Accounttax;
datafeeds: Resource$Datafeeds;
datafeedstatuses: Resource$Datafeedstatuses;
liasettings: Resource$Liasettings;
orderinvoices: Resource$Orderinvoices;
orderreports: Resource$Orderreports;
orderreturns: Resource$Orderreturns;
orders: Resource$Orders;
pos: Resource$Pos;
products: Resource$Products;
productstatuses: Resource$Productstatuses;
shippingsettings: Resource$Shippingsettings;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* Account data. After the creation of a new account it may take a few minutes before it is fully operational. The methods delete, insert, and update require the admin role.
*/
export interface Schema$Account {
/**
* Indicates whether the merchant sells adult content.
*/
adultContent?: boolean | null;
/**
* List of linked AdWords accounts that are active or pending approval. To create a new link request, add a new link with status `active` to the list. It will remain in a `pending` state until approved or rejected either in the AdWords interface or through the AdWords API. To delete an active link, or to cancel a link request, remove it from the list.
*/
adwordsLinks?: Schema$AccountAdwordsLink[];
/**
* The business information of the account.
*/
businessInformation?: Schema$AccountBusinessInformation;
/**
* The GMB account which is linked or in the process of being linked with the Merchant Center account.
*/
googleMyBusinessLink?: Schema$AccountGoogleMyBusinessLink;
/**
* Required for update. Merchant Center account ID.
*/
id?: string | null;
/**
* Identifies what kind of resource this is. Value: the fixed string "`content#account`"
*/
kind?: string | null;
/**
* Required. Display name for the account.
*/
name?: string | null;
/**
* [DEPRECATED] This field is never returned and will be ignored if provided.
*/
reviewsUrl?: string | null;
/**
* Client-specific, locally-unique, internal ID for the child account.
*/
sellerId?: string | null;
/**
* Users with access to the account. Every account (except for subaccounts) must have at least one admin user.
*/
users?: Schema$AccountUser[];
/**
* The merchant's website.
*/
websiteUrl?: string | null;
/**
* List of linked YouTube channels that are active or pending approval. To create a new link request, add a new link with status `active` to the list. It will remain in a `pending` state until approved or rejected in the YT Creator Studio interface. To delete an active link, or to cancel a link request, remove it from the list.
*/
youtubeChannelLinks?: Schema$AccountYouTubeChannelLink[];
}
export interface Schema$AccountAddress {
/**
* CLDR country code (e.g. "US"). This value cannot be set for a sub-account of an MCA. All MCA sub-accounts inherit the country of their parent MCA.
*/
country?: string | null;
/**
* City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs).
*/
locality?: string | null;
/**
* Postal code or ZIP (e.g. "94043").
*/
postalCode?: string | null;
/**
* Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC").
*/
region?: string | null;
/**
* Street-level part of the address.
*/
streetAddress?: string | null;
}
export interface Schema$AccountAdwordsLink {
/**
* Customer ID of the AdWords account.
*/
adwordsId?: string | null;
/**
* Status of the link between this Merchant Center account and the AdWords account. Upon retrieval, it represents the actual status of the link and can be either `active` if it was approved in Google AdWords or `pending` if it's pending approval. Upon insertion, it represents the *intended* status of the link. Re-uploading a link with status `active` when it's still pending or with status `pending` when it's already active will have no effect: the status will remain unchanged. Re-uploading a link with deprecated status `inactive` is equivalent to not submitting the link at all and will delete the link if it was active or cancel the link request if it was pending. Acceptable values are: - "`active`" - "`pending`"
*/
status?: string | null;
}
export interface Schema$AccountBusinessInformation {
/**
* The address of the business.
*/
address?: Schema$AccountAddress;
/**
* The customer service information of the business.
*/
customerService?: Schema$AccountCustomerService;
/**
* The 10-digit [Korean business registration number](https://support.google.com/merchants/answer/9037766) separated with dashes in the format: XXX-XX-XXXXX. This field will only be updated if explicitly set.
*/
koreanBusinessRegistrationNumber?: string | null;
/**
* The phone number of the business.
*/
phoneNumber?: string | null;
}
export interface Schema$AccountCustomerService {
/**
* Customer service email.
*/
email?: string | null;
/**
* Customer service phone number.
*/
phoneNumber?: string | null;
/**
* Customer service URL.
*/
url?: string | null;
}
export interface Schema$AccountGoogleMyBusinessLink {
/**
* The GMB email address of which a specific account within a GMB account. A sample account within a GMB account could be a business account with set of locations, managed under the GMB account.
*/
gmbEmail?: string | null;
/**
* Status of the link between this Merchant Center account and the GMB account. Acceptable values are: - "`active`" - "`pending`"
*/
status?: string | null;
}
export interface Schema$AccountIdentifier {
/**
* The aggregator ID, set for aggregators and subaccounts (in that case, it represents the aggregator of the subaccount).
*/
aggregatorId?: string | null;
/**
* The merchant account ID, set for individual accounts and subaccounts.
*/
merchantId?: string | null;
}
export interface Schema$AccountsAuthInfoResponse {
/**
* The account identifiers corresponding to the authenticated user. - For an individual account: only the merchant ID is defined - For an aggregator: only the aggregator ID is defined - For a subaccount of an MCA: both the merchant ID and the aggregator ID are defined.
*/
accountIdentifiers?: Schema$AccountIdentifier[];
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accountsAuthInfoResponse".
*/
kind?: string | null;
}
export interface Schema$AccountsClaimWebsiteResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accountsClaimWebsiteResponse".
*/
kind?: string | null;
}
export interface Schema$AccountsCustomBatchRequest {
/**
* The request entries to be processed in the batch.
*/
entries?: Schema$AccountsCustomBatchRequestEntry[];
}
/**
* A batch entry encoding a single non-batch accounts request.
*/
export interface Schema$AccountsCustomBatchRequestEntry {
/**
* The account to create or update. Only defined if the method is `insert` or `update`.
*/
account?: Schema$Account;
/**
* The ID of the targeted account. Only defined if the method is not `insert`.
*/
accountId?: string | null;
/**
* An entry ID, unique within the batch request.
*/
batchId?: number | null;
/**
* Whether the account should be deleted if the account has offers. Only applicable if the method is `delete`.
*/
force?: boolean | null;
/**
* Label IDs for the 'updatelabels' request.
*/
labelIds?: string[] | null;
/**
* Details about the `link` request.
*/
linkRequest?: Schema$AccountsCustomBatchRequestEntryLinkRequest;
/**
* The ID of the managing account.
*/
merchantId?: string | null;
/**
* The method of the batch entry. Acceptable values are: - "`claimWebsite`" - "`delete`" - "`get`" - "`insert`" - "`link`" - "`update`"
*/
method?: string | null;
/**
* Only applicable if the method is `claimwebsite`. Indicates whether or not to take the claim from another account in case there is a conflict.
*/
overwrite?: boolean | null;
}
export interface Schema$AccountsCustomBatchRequestEntryLinkRequest {
/**
* Action to perform for this link. The `"request"` action is only available to select merchants. Acceptable values are: - "`approve`" - "`remove`" - "`request`"
*/
action?: string | null;
/**
* The ID of the linked account.
*/
linkedAccountId?: string | null;
/**
* Type of the link between the two accounts. Acceptable values are: - "`channelPartner`" - "`eCommercePlatform`"
*/
linkType?: string | null;
}
export interface Schema$AccountsCustomBatchResponse {
/**
* The result of the execution of the batch requests.
*/
entries?: Schema$AccountsCustomBatchResponseEntry[];
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accountsCustomBatchResponse".
*/
kind?: string | null;
}
/**
* A batch entry encoding a single non-batch accounts response.
*/
export interface Schema$AccountsCustomBatchResponseEntry {
/**
* The retrieved, created, or updated account. Not defined if the method was `delete`, `claimwebsite` or `link`.
*/
account?: Schema$Account;
/**
* The ID of the request entry this entry responds to.
*/
batchId?: number | null;
/**
* A list of errors defined if and only if the request failed.
*/
errors?: Schema$Errors;
/**
* Identifies what kind of resource this is. Value: the fixed string "`content#accountsCustomBatchResponseEntry`"
*/
kind?: string | null;
/**
* Deprecated. This field is never set. Acceptable values are: - "`active`" - "`inactive`" - "`pending`"
*/
linkStatus?: string | null;
}
export interface Schema$AccountsLinkRequest {
/**
* Action to perform for this link. The `"request"` action is only available to select merchants. Acceptable values are: - "`approve`" - "`remove`" - "`request`"
*/
action?: string | null;
/**
* The ID of the linked account.
*/
linkedAccountId?: string | null;
/**
* Type of the link between the two accounts. Acceptable values are: - "`channelPartner`" - "`eCommercePlatform`"
*/
linkType?: string | null;
}
export interface Schema$AccountsLinkResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accountsLinkResponse".
*/
kind?: string | null;
}
export interface Schema$AccountsListResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accountsListResponse".
*/
kind?: string | null;
/**
* The token for the retrieval of the next page of accounts.
*/
nextPageToken?: string | null;
resources?: Schema$Account[];
}
/**
* The status of an account, i.e., information about its products, which is computed offline and not returned immediately at insertion time.
*/
export interface Schema$AccountStatus {
/**
* The ID of the account for which the status is reported.
*/
accountId?: string | null;
/**
* A list of account level issues.
*/
accountLevelIssues?: Schema$AccountStatusAccountLevelIssue[];
/**
* DEPRECATED - never populated.
*/
dataQualityIssues?: Schema$AccountStatusDataQualityIssue[];
/**
* Identifies what kind of resource this is. Value: the fixed string "`content#accountStatus`"
*/
kind?: string | null;
/**
* List of product-related data by channel, destination, and country. Data in this field may be delayed by up to 30 minutes.
*/
products?: Schema$AccountStatusProducts[];
/**
* Whether the account's website is claimed or not.
*/
websiteClaimed?: boolean | null;
}
export interface Schema$AccountStatusAccountLevelIssue {
/**
* Country for which this issue is reported.
*/
country?: string | null;
/**
* The destination the issue applies to. If this field is empty then the issue applies to all available destinations.
*/
destination?: string | null;
/**
* Additional details about the issue.
*/
detail?: string | null;
/**
* The URL of a web page to help resolving this issue.
*/
documentation?: string | null;
/**
* Issue identifier.
*/
id?: string | null;
/**
* Severity of the issue. Acceptable values are: - "`critical`" - "`error`" - "`suggestion`"
*/
severity?: string | null;
/**
* Short description of the issue.
*/
title?: string | null;
}
export interface Schema$AccountStatusDataQualityIssue {
country?: string | null;
destination?: string | null;
detail?: string | null;
displayedValue?: string | null;
exampleItems?: Schema$AccountStatusExampleItem[];
id?: string | null;
lastChecked?: string | null;
location?: string | null;
numItems?: number | null;
/**
* Acceptable values are: - "`critical`" - "`error`" - "`suggestion`"
*/
severity?: string | null;
submittedValue?: string | null;
}
export interface Schema$AccountstatusesCustomBatchRequest {
/**
* The request entries to be processed in the batch.
*/
entries?: Schema$AccountstatusesCustomBatchRequestEntry[];
}
/**
* A batch entry encoding a single non-batch accountstatuses request.
*/
export interface Schema$AccountstatusesCustomBatchRequestEntry {
/**
* The ID of the (sub-)account whose status to get.
*/
accountId?: string | null;
/**
* An entry ID, unique within the batch request.
*/
batchId?: number | null;
/**
* If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.
*/
destinations?: string[] | null;
/**
* The ID of the managing account.
*/
merchantId?: string | null;
/**
* The method of the batch entry. Acceptable values are: - "`get`"
*/
method?: string | null;
}
export interface Schema$AccountstatusesCustomBatchResponse {
/**
* The result of the execution of the batch requests.
*/
entries?: Schema$AccountstatusesCustomBatchResponseEntry[];
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accountstatusesCustomBatchResponse".
*/
kind?: string | null;
}
/**
* A batch entry encoding a single non-batch accountstatuses response.
*/
export interface Schema$AccountstatusesCustomBatchResponseEntry {
/**
* The requested account status. Defined if and only if the request was successful.
*/
accountStatus?: Schema$AccountStatus;
/**
* The ID of the request entry this entry responds to.
*/
batchId?: number | null;
/**
* A list of errors defined if and only if the request failed.
*/
errors?: Schema$Errors;
}
export interface Schema$AccountstatusesListResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accountstatusesListResponse".
*/
kind?: string | null;
/**
* The token for the retrieval of the next page of account statuses.
*/
nextPageToken?: string | null;
resources?: Schema$AccountStatus[];
}
export interface Schema$AccountStatusExampleItem {
itemId?: string | null;
link?: string | null;
submittedValue?: string | null;
title?: string | null;
valueOnLandingPage?: string | null;
}
export interface Schema$AccountStatusItemLevelIssue {
/**
* The attribute's name, if the issue is caused by a single attribute.
*/
attributeName?: string | null;
/**
* The error code of the issue.
*/
code?: string | null;
/**
* A short issue description in English.
*/
description?: string | null;
/**
* A detailed issue description in English.
*/
detail?: string | null;
/**
* The URL of a web page to help with resolving this issue.
*/
documentation?: string | null;
/**
* Number of items with this issue.
*/
numItems?: string | null;
/**
* Whether the issue can be resolved by the merchant.
*/
resolution?: string | null;
/**
* How this issue affects serving of the offer.
*/
servability?: string | null;
}
export interface Schema$AccountStatusProducts {
/**
* The channel the data applies to. Acceptable values are: - "`local`" - "`online`"
*/
channel?: string | null;
/**
* The country the data applies to.
*/
country?: string | null;
/**
* The destination the data applies to.
*/
destination?: string | null;
/**
* List of item-level issues.
*/
itemLevelIssues?: Schema$AccountStatusItemLevelIssue[];
/**
* Aggregated product statistics.
*/
statistics?: Schema$AccountStatusStatistics;
}
export interface Schema$AccountStatusStatistics {
/**
* Number of active offers.
*/
active?: string | null;
/**
* Number of disapproved offers.
*/
disapproved?: string | null;
/**
* Number of expiring offers.
*/
expiring?: string | null;
/**
* Number of pending offers.
*/
pending?: string | null;
}
/**
* The tax settings of a merchant account. All methods require the admin role.
*/
export interface Schema$AccountTax {
/**
* Required. The ID of the account to which these account tax settings belong.
*/
accountId?: string | null;
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accountTax".
*/
kind?: string | null;
/**
* Tax rules. Updating the tax rules will enable US taxes (not reversible). Defining no rules is equivalent to not charging tax at all.
*/
rules?: Schema$AccountTaxTaxRule[];
}
export interface Schema$AccounttaxCustomBatchRequest {
/**
* The request entries to be processed in the batch.
*/
entries?: Schema$AccounttaxCustomBatchRequestEntry[];
}
/**
* A batch entry encoding a single non-batch accounttax request.
*/
export interface Schema$AccounttaxCustomBatchRequestEntry {
/**
* The ID of the account for which to get/update account tax settings.
*/
accountId?: string | null;
/**
* The account tax settings to update. Only defined if the method is `update`.
*/
accountTax?: Schema$AccountTax;
/**
* An entry ID, unique within the batch request.
*/
batchId?: number | null;
/**
* The ID of the managing account.
*/
merchantId?: string | null;
/**
* The method of the batch entry. Acceptable values are: - "`get`" - "`update`"
*/
method?: string | null;
}
export interface Schema$AccounttaxCustomBatchResponse {
/**
* The result of the execution of the batch requests.
*/
entries?: Schema$AccounttaxCustomBatchResponseEntry[];
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accounttaxCustomBatchResponse".
*/
kind?: string | null;
}
/**
* A batch entry encoding a single non-batch accounttax response.
*/
export interface Schema$AccounttaxCustomBatchResponseEntry {
/**
* The retrieved or updated account tax settings.
*/
accountTax?: Schema$AccountTax;
/**
* The ID of the request entry this entry responds to.
*/
batchId?: number | null;
/**
* A list of errors defined if and only if the request failed.
*/
errors?: Schema$Errors;
/**
* Identifies what kind of resource this is. Value: the fixed string "`content#accounttaxCustomBatchResponseEntry`"
*/
kind?: string | null;
}
export interface Schema$AccounttaxListResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accounttaxListResponse".
*/
kind?: string | null;
/**
* The token for the retrieval of the next page of account tax settings.
*/
nextPageToken?: string | null;
resources?: Schema$AccountTax[];
}
/**
* Tax calculation rule to apply in a state or province (USA only).
*/
export interface Schema$AccountTaxTaxRule {
/**
* Country code in which tax is applicable.
*/
country?: string | null;
/**
* Required. State (or province) is which the tax is applicable, described by its location ID (also called criteria ID).
*/
locationId?: string | null;
/**
* Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative.
*/
ratePercent?: string | null;
/**
* If true, shipping charges are also taxed.
*/
shippingTaxed?: boolean | null;
/**
* Whether the tax rate is taken from a global tax table or specified explicitly.
*/
useGlobalRate?: boolean | null;
}
export interface Schema$AccountUser {
/**
* Whether user is an admin.
*/
admin?: boolean | null;
/**
* User's email address.
*/
emailAddress?: string | null;
/**
* Whether user is an order manager.
*/
orderManager?: boolean | null;
/**
* Whether user can access payment statements.
*/
paymentsAnalyst?: boolean | null;
/**
* Whether user can manage payment settings.
*/
paymentsManager?: boolean | null;
}
export interface Schema$AccountYouTubeChannelLink {
/**
* Channel ID.
*/
channelId?: string | null;
/**
* Status of the link between this Merchant Center account and the YouTube channel. Upon retrieval, it represents the actual status of the link and can be either `active` if it was approved in YT Creator Studio or `pending` if it's pending approval. Upon insertion, it represents the *intended* status of the link. Re-uploading a link with status `active` when it's still pending or with status `pending` when it's already active will have no effect: the status will remain unchanged. Re-uploading a link with deprecated status `inactive` is equivalent to not submitting the link at all and will delete the link if it was active or cancel the link request if it was pending.
*/
status?: string | null;
}
export interface Schema$Address {
/**
* Required. Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC").
*/
administrativeArea?: string | null;
/**
* Required. City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs).
*/
city?: string | null;
/**
* Required. [CLDR country code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)(e.g. "US").
*/
country?: string | null;
/**
* Required. Postal code or ZIP (e.g. "94043"). Required.
*/
postalCode?: string | null;
/**
* Street-level part of the address.
*/
streetAddress?: string | null;
}
export interface Schema$Amount {
/**
* [required] Value before taxes.
*/
pretax?: Schema$Price;
/**
* [required] Tax value.
*/
tax?: Schema$Price;
}
export interface Schema$BusinessDayConfig {
/**
* Regular business days, such as '"monday"'. May not be empty.
*/
businessDays?: string[] | null;
}
export interface Schema$CarrierRate {
/**
* Carrier service, such as `"UPS"` or `"Fedex"`. The list of supported carriers can be retrieved via the `getSupportedCarriers` method. Required.
*/
carrierName?: string | null;
/**
* Carrier service, such as `"ground"` or `"2 days"`. The list of supported services for a carrier can be retrieved via the `getSupportedCarriers` method. Required.
*/
carrierService?: string | null;
/**
* Additive shipping rate modifier. Can be negative. For example `{ "value": "1", "currency" : "USD" \}` adds $1 to the rate, `{ "value": "-3", "currency" : "USD" \}` removes $3 from the rate. Optional.
*/
flatAdjustment?: Schema$Price;
/**
* Name of the carrier rate. Must be unique per rate group. Required.
*/
name?: string | null;
/**
* Shipping origin for this carrier rate. Required.
*/
originPostalCode?: string | null;
/**
* Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example `"5.4"` increases the rate by 5.4%, `"-3"` decreases the rate by 3%. Optional.
*/
percentageAdjustment?: string | null;
}
export interface Schema$CarriersCarrier {
/**
* The CLDR country code of the carrier (e.g., "US"). Always present.
*/
country?: string | null;
/**
* A list of services supported for EDD (Estimated Delivery Date) calculation. This is the list of valid values for WarehouseBasedDeliveryTime.carrierService.
*/
eddServices?: string[] | null;
/**
* The name of the carrier (e.g., `"UPS"`). Always present.
*/
name?: string | null;
/**
* A list of supported services (e.g., `"ground"`) for that carrier. Contains at least one service. This is the list of valid values for CarrierRate.carrierService.
*/
services?: string[] | null;
}
export interface Schema$CustomAttribute {
/**
* The name of the attribute. Underscores will be replaced by spaces upon insertion.
*/
name?: string | null;
/**
* The type of the attribute. Acceptable values are: - "`boolean`" - "`datetimerange`" - "`float`" - "`group`" - "`int`" - "`price`" - "`text`" - "`time`" - "`url`"
*/
type?: string | null;
/**
* Free-form unit of the attribute. Unit can only be used for values of type int, float, or price.
*/
unit?: string | null;
/**
* The value of the attribute.
*/
value?: string | null;
}
export interface Schema$CustomerReturnReason {
/**
* Description of the reason.
*/
description?: string | null;
/**
* Code of the return reason. Acceptable values are: - "`betterPriceFound`" - "`changedMind`" - "`damagedOrDefectiveItem`" - "`didNotMatchDescription`" - "`doesNotFit`" - "`expiredItem`" - "`incorrectItemReceived`" - "`noLongerNeeded`" - "`notSpecified`" - "`orderedWrongItem`" - "`other`" - "`qualityNotExpected`" - "`receivedTooLate`" - "`undeliverable`"
*/
reasonCode?: string | null;
}
export interface Schema$CustomGroup {
/**
* The sub-attributes.
*/
attributes?: Schema$CustomAttribute[];
/**
* The name of the group. Underscores will be replaced by spaces upon insertion.
*/
name?: string | null;
}
export interface Schema$CutoffTime {
/**
* Hour of the cutoff time until which an order has to be placed to be processed in the same day. Required.
*/
hour?: number | null;
/**
* Minute of the cutoff time until which an order has to be placed to be processed in the same day. Required.
*/
minute?: number | null;
/**
* Timezone identifier for the cutoff time. A list of identifiers can be found in the AdWords API documentation. E.g. "Europe/Zurich". Required.
*/
timezone?: string | null;
}
/**
* Datafeed configuration data.
*/
export interface Schema$Datafeed {
/**
* The two-letter ISO 639-1 language in which the attributes are defined in the data feed.
*/
attributeLanguage?: string | null;
/**
* [DEPRECATED] Please use targets[].language instead. The two-letter ISO 639-1 language of the items in the feed. Must be a valid language for `targetCountry`.
*/
contentLanguage?: string | null;
/**
* Required. The type of data feed. For product inventory feeds, only feeds for local stores, not online stores, are supported. Acceptable values are: - "`local products`" - "`product inventory`" - "`products`"
*/
contentType?: string | null;
/**
* Fetch schedule for the feed file.
*/
fetchSchedule?: Schema$DatafeedFetchSchedule;
/**
* Required. The filename of the feed. All feeds must have a unique file name.
*/
fileName?: string | null;
/**
* Format of the feed file.
*/
format?: Schema$DatafeedFormat;
/**
* Required for update. The ID of the data feed.
*/
id?: string | null;
/**
* [DEPRECATED] Please use targets[].includedDestinations instead. The list of intended destinations (corresponds to checked check boxes in Merchant Center).
*/
intendedDestinations?: string[] | null;
/**
* Identifies what kind of resource this is. Value: the fixed string "`content#datafeed`"
*/
kind?: string | null;
/**
* Required for insert. A descriptive name of the data feed.
*/
name?: string | null;
/**
* [DEPRECATED] Please use targets[].country instead. The country where the items in the feed will be included in the search index, represented as a CLDR territory code.
*/
targetCountry?: string | null;
/**
* The targets this feed should apply to (country, language, destinations).
*/
targets?: Schema$DatafeedTarget[];
}
/**
* The required fields vary based on the frequency of fetching. For a monthly fetch schedule, day_of_month and hour are required. For a weekly fetch schedule, weekday and hour are required. For a daily fetch schedule, only hour is required.
*/
export interface Schema$DatafeedFetchSchedule {
/**
* The day of the month the feed file should be fetched (1-31).
*/
dayOfMonth?: number | null;
/**
* The URL where the feed file can be fetched. Google Merchant Center will support automatic scheduled uploads using the HTTP, HTTPS, FTP, or SFTP protocols, so the value will need to be a valid link using one of those four protocols.
*/
fetchUrl?: string | null;
/**
* The hour of the day the feed file should be fetched (0-23).
*/
hour?: number | null;
/**
* The minute of the hour the feed file should be fetched (0-59). Read-only.
*/
minuteOfHour?: number | null;
/**
* An optional password for fetch_url.
*/
password?: string | null;
/**
* Whether the scheduled fetch is paused or not.
*/
paused?: boolean | null;
/**
* Time zone used for schedule. UTC by default. E.g., "America/Los_Angeles".
*/
timeZone?: string | null;
/**
* An optional user name for fetch_url.
*/
username?: string | null;
/**
* The day of the week the feed file should be fetched. Acceptable values are: - "`monday`" - "`tuesday`" - "`wednesday`" - "`thursday`" - "`friday`" - "`saturday`" - "`sunday`"
*/
weekday?: string | null;
}
export interface Schema$DatafeedFormat {
/**
* Delimiter for the separation of values in a delimiter-separated values feed. If not specified, the delimiter will be auto-detected. Ignored for non-DSV data feeds. Acceptable values are: - "`pipe`" - "`tab`" - "`tilde`"
*/
columnDelimiter?: string | null;
/**
* Character encoding scheme of the data feed. If not specified, the encoding will be auto-detected. Acceptable values are: - "`latin-1`" - "`utf-16be`" - "`utf-16le`" - "`utf-8`" - "`windows-1252`"
*/
fileEncoding?: string | null;
/**
* Specifies how double quotes are interpreted. If not specified, the mode will be auto-detected. Ignored for non-DSV data feeds. Acceptable values are: - "`normal character`" - "`value quoting`"
*/
quotingMode?: string | null;
}
export interface Schema$DatafeedsCustomBatchRequest {
/**
* The request entries to be processed in the batch.
*/
entries?: Schema$DatafeedsCustomBatchRequestEntry[];
}
/**
* A batch entry encoding a single non-batch datafeeds request.
*/
export interface Schema$DatafeedsCustomBatchRequestEntry {
/**
* An entry ID, unique within the batch request.
*/
batchId?: number | null;
/**
* The data feed to insert.
*/
datafeed?: Schema$Datafeed;
/**
* The ID of the data feed to get, delete or fetch.
*/
datafeedId?: string | null;
/**
* The ID of the managing account.
*/
merchantId?: string | null;
/**
* The method of the batch entry. Acceptable values are: - "`delete`" - "`fetchNow`" - "`get`" - "`insert`" - "`update`"
*/
method?: string | null;
}
export interface Schema$DatafeedsCustomBatchResponse {
/**
* The result of the execution of the batch requests.
*/
entries?: Schema$DatafeedsCustomBatchResponseEntry[];
/**
* Identifies what kind of resource this is. Value: the fixed string "content#datafeedsCustomBatchResponse".
*/
kind?: string | null;
}
/**
* A batch entry encoding a single non-batch datafeeds response.
*/
export interface Schema$DatafeedsCustomBatchResponseEntry {
/**
* The ID of the request entry this entry responds to.
*/
batchId?: number | null;
/**
* The requested data feed. Defined if and only if the request was successful.
*/
datafeed?: Schema$Datafeed;
/**
* A list of errors defined if and only if the request failed.
*/
errors?: Schema$Errors;
}
export interface Schema$DatafeedsFetchNowResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string "content#datafeedsFetchNowResponse".
*/
kind?: string | null;
}
export interface Schema$DatafeedsListResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string "content#datafeedsListResponse".
*/
kind?: string | null;
/**
* The token for the retrieval of the next page of datafeeds.
*/
nextPageToken?: string | null;
resources?: Schema$Datafeed[];
}
/**
* The status of a datafeed, i.e., the result of the last retrieval of the datafeed computed asynchronously when the feed processing is finished.
*/
export interface Schema$DatafeedStatus {
/**
* The country for which the status is reported, represented as a CLDR territory code.
*/
country?: string | null;
/**
* The ID of the feed for which the status is reported.
*/
datafeedId?: string | null;
/**
* The list of errors occurring in the feed.
*/
errors?: Schema$DatafeedStatusError[];
/**
* The number of items in the feed that were processed.
*/
itemsTotal?: string | null;
/**
* The number of items in the feed that were valid.
*/
itemsValid?: string | null;
/**
* Identifies what kind of resource this is. Value: the fixed string "`content#datafeedStatus`"
*/
kind?: string | null;
/**
* The two-letter ISO 639-1 language for which the status is reported.
*/
language?: string | null;
/**
* The last date at which the feed was uploaded.
*/
lastUploadDate?: string | null;
/**
* The processing status of the feed. Acceptable values are: - "`"`failure`": The feed could not be processed or all items had errors.`" - "`in progress`": The feed is being processed. - "`none`": The feed has not yet been processed. For example, a feed that has never been uploaded will have this processing status. - "`success`": The feed was processed successfully, though some items might have had errors.
*/
processingStatus?: string | null;
/**
* The list of errors occurring in the feed.
*/
warnings?: Schema$DatafeedStatusError[];
}
/**
* An error occurring in the feed, like "invalid price".
*/
export interface Schema$DatafeedStatusError {
/**
* The code of the error, e.g., "validation/invalid_value".
*/
code?: string | null;
/**
* The number of occurrences of the error in the feed.
*/
count?: string | null;
/**
* A list of example occurrences of the error, grouped by product.
*/
examples?: Schema$DatafeedStatusExample[];
/**
* The error message, e.g., "Invalid price".
*/
message?: string | null;
}
export interface Schema$DatafeedstatusesCustomBatchRequest {
/**
* The request entries to be processed in the batch.
*/
entries?: Schema$DatafeedstatusesCustomBatchRequestEntry[];
}
/**
* A batch entry encoding a single non-batch datafeedstatuses request.
*/
export interface Schema$DatafeedstatusesCustomBatchRequestEntry {
/**
* An entry ID, unique within the batch request.
*/
batchId?: number | null;
/**
* The country for which to get the datafeed status. If this parameter is provided then language must also be provided. Note that for multi-target datafeeds this parameter is required.
*/
country?: string | null;
/**
* The ID of the data feed to get.
*/
datafeedId?: string | null;
/**
* The language for which to get the datafeed status. If this parameter is provided then country must also be provided. Note that for multi-target datafeeds this parameter is required.
*/
language?: string | null;
/**
* The ID of the managing account.
*/
merchantId?: string | null;
/**
* The method of the batch entry. Acceptable values are: - "`get`"
*/
method?: string | null;
}
export interface Schema$DatafeedstatusesCustomBatchResponse {
/**
* The result of the execution of the batch requests.
*/
entries?: Schema$DatafeedstatusesCustomBatchResponseEntry[];
/**
* Identifies what kind of resource this is. Value: the fixed string "content#datafeedstatusesCustomBatchResponse".
*/
kind?: string | null;
}
/**
* A batch entry encoding a single non-batch datafeedstatuses response.
*/
export interface Schema$DatafeedstatusesCustomBatchResponseEntry {
/**
* The ID of the request entry this entry responds to.
*/
batchId?: number | null;
/**
* The requested data feed status. Defined if and only if the request was successful.
*/
datafeedStatus?: Schema$DatafeedStatus;
/**
* A list of errors defined if and only if the request failed.
*/
errors?: Schema$Errors;
}
export interface Schema$DatafeedstatusesListResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string "content#datafeedstatusesListResponse".
*/
kind?: string | null;
/**
* The token for the retrieval of the next page of datafeed statuses.
*/
nextPageToken?: string | null;
resources?: Schema$DatafeedStatus[];
}
/**
* An example occurrence for a particular error.
*/
export interface Schema$DatafeedStatusExample {
/**
* The ID of the example item.
*/
itemId?: string | null;
/**
* Line number in the data feed where the example is found.
*/
lineNumber?: string | null;
/**
* The problematic value.
*/
value?: string | null;
}
export interface Schema$DatafeedTarget {
/**
* The country where the items in the feed will be included in the search index, represented as a CLDR territory code.
*/
country?: string | null;
/**
* The list of destinations to exclude for this target (corresponds to unchecked check boxes in Merchant Center).
*/
excludedDestinations?: string[] | null;
/**
* The list of destinations to include for this target (corresponds to checked check boxes in Merchant Center). Default destinations are always included unless provided in `excludedDestinations`. List of supported destinations (if available to the account): - DisplayAds - Shopping - ShoppingActions - SurfacesAcrossGoogle
*/
includedDestinations?: string[] | null;
/**
* The two-letter ISO 639-1 language of the items in the feed. Must be a valid language for `targets[].country`.
*/
language?: string | null;
}
export interface Schema$DeliveryTime {
/**
* Business days cutoff time definition. If not configured the cutoff time will be defaulted to 8AM PST.
*/
cutoffTime?: Schema$CutoffTime;
/**
* The business days during which orders can be handled. If not provided, Monday to Friday business days will be assumed.
*/
handlingBusinessDayConfig?: Schema$BusinessDayConfig;
/**
* Holiday cutoff definitions. If configured, they specify order cutoff times for holiday-specific shipping.
*/
holidayCutoffs?: Schema$HolidayCutoff[];
/**
* Maximum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped. Must be greater than or equal to `minHandlingTimeInDays`.
*/
maxHandlingTimeInDays?: number | null;
/**
* Maximum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Must be greater than or equal to `minTransitTimeInDays`.
*/
maxTransitTimeInDays?: number | null;
/**
* Minimum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped.
*/
minHandlingTimeInDays?: number | null;
/**
* Minimum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Either `{min,max\}TransitTimeInDays` or `transitTimeTable` must be set, but not both.
*/
minTransitTimeInDays?: number | null;
/**
* The business days during which orders can be in-transit. If not provided, Monday to Friday business days will be assumed.
*/
transitBusinessDayConfig?: Schema$BusinessDayConfig;
/**
* Transit time table, number of business days spent in transit based on row and column dimensions. Either `{min,max\}TransitTimeInDays` or `transitTimeTable` can be set, but not both.
*/
transitTimeTable?: Schema$TransitTable;
/**
* Indicates that the delivery time should be calculated per warehouse (shipping origin location) based on the settings of the selected carrier. When set, no other transit time related field in DeliveryTime should be set.
*/
warehouseBasedDeliveryTimes?: Schema$WarehouseBasedDeliveryTime[];
}
/**
* An error returned by the API.
*/
export interface Schema$Error {
/**
* The domain of the error.
*/
domain?: string | null;
/**
* A description of the error.