@googleapis/merchantapi 17.3.0 → 17.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/accounts_v1.ts +180 -12
- package/accounts_v1beta.ts +179 -12
- package/build/accounts_v1.d.ts +102 -12
- package/build/accounts_v1.js +32 -0
- package/build/accounts_v1.js.map +1 -1
- package/build/accounts_v1beta.d.ts +102 -12
- package/build/accounts_v1beta.js +32 -0
- package/build/accounts_v1beta.js.map +1 -1
- package/build/datasources_v1.d.ts +4 -4
- package/build/datasources_v1beta.d.ts +4 -4
- package/build/inventories_v1.d.ts +26 -14
- package/build/inventories_v1.js.map +1 -1
- package/build/inventories_v1beta.d.ts +26 -14
- package/build/inventories_v1beta.js.map +1 -1
- package/build/issueresolution_v1.d.ts +3 -3
- package/build/issueresolution_v1beta.d.ts +3 -3
- package/build/products_v1.d.ts +230 -11
- package/build/products_v1.js.map +1 -1
- package/build/products_v1beta.d.ts +40 -11
- package/build/products_v1beta.js.map +1 -1
- package/build/promotions_v1.d.ts +66 -22
- package/build/promotions_v1.js.map +1 -1
- package/build/promotions_v1beta.d.ts +66 -22
- package/build/promotions_v1beta.js.map +1 -1
- package/build/reports_v1.d.ts +39 -6
- package/build/reports_v1.js.map +1 -1
- package/build/reports_v1beta.d.ts +39 -6
- package/build/reports_v1beta.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/datasources_v1.ts +4 -4
- package/datasources_v1beta.ts +4 -4
- package/inventories_v1.ts +26 -14
- package/inventories_v1beta.ts +26 -14
- package/issueresolution_v1.ts +3 -3
- package/issueresolution_v1beta.ts +3 -3
- package/package.json +1 -1
- package/products_v1.ts +230 -11
- package/products_v1beta.ts +40 -11
- package/promotions_v1.ts +66 -22
- package/promotions_v1beta.ts +66 -22
- package/reports_v1.ts +39 -6
- package/reports_v1beta.ts +39 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [17.4.0](https://github.com/googleapis/google-api-nodejs-client/compare/merchantapi-v17.3.0...merchantapi-v17.4.0) (2026-05-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **merchantapi:** update the API ([7a475e5](https://github.com/googleapis/google-api-nodejs-client/commit/7a475e5f32de846aee3c1b455a71d3db39013710))
|
|
9
|
+
* **merchantapi:** update the API ([213b03e](https://github.com/googleapis/google-api-nodejs-client/commit/213b03e856cba2c3ca3ee1da97c10ac8f0287ad5))
|
|
10
|
+
|
|
3
11
|
## [17.3.0](https://github.com/googleapis/google-api-nodejs-client/compare/merchantapi-v17.2.0...merchantapi-v17.3.0) (2026-01-28)
|
|
4
12
|
|
|
5
13
|
|
package/accounts_v1.ts
CHANGED
|
@@ -166,7 +166,7 @@ export namespace merchantapi_accounts_v1 {
|
|
|
166
166
|
termsOfServiceAgreementState?: Schema$TermsOfServiceAgreementState;
|
|
167
167
|
}
|
|
168
168
|
/**
|
|
169
|
-
* The `Account` message represents a business's account within
|
|
169
|
+
* The `Account` message represents a business's account within Merchant Center. It's the primary entity for managing product data, settings, and interactions with Google's services and external providers. Accounts can operate as standalone entities or be part of a advanced account structure. In an advanced account setup the parent account manages multiple sub-accounts. Establishing an account involves configuring attributes like the account name, time zone, and language preferences. The `Account` message is the parent entity for many other resources, for example, `AccountRelationship`, `Homepage`, `BusinessInfo` and so on.
|
|
170
170
|
*/
|
|
171
171
|
export interface Schema$Account {
|
|
172
172
|
/**
|
|
@@ -174,7 +174,7 @@ export namespace merchantapi_accounts_v1 {
|
|
|
174
174
|
*/
|
|
175
175
|
accountId?: string | null;
|
|
176
176
|
/**
|
|
177
|
-
* Required. A human-readable name of the account.
|
|
177
|
+
* Required. A human-readable name of the account. Don't use punctuation, capitalization, or non-alphanumeric symbols such as the "/" or "_" symbols. See [Adding a business name](https://support.google.com/merchants/answer/12159159) for more information.
|
|
178
178
|
*/
|
|
179
179
|
accountName?: string | null;
|
|
180
180
|
/**
|
|
@@ -639,7 +639,7 @@ export namespace merchantapi_accounts_v1 {
|
|
|
639
639
|
*/
|
|
640
640
|
effectiveUriSettings?: Schema$UriSettings;
|
|
641
641
|
/**
|
|
642
|
-
* Optional. The destinations (also known as [Marketing methods](https://support.google.com/merchants/answer/15130232)) to which the checkout program applies
|
|
642
|
+
* Optional. Required for the create operation. The destinations (also known as [Marketing methods](https://support.google.com/merchants/answer/15130232)) to which the checkout program applies. Valid destination values are `SHOPPING_ADS` and `FREE_LISTINGS`.
|
|
643
643
|
*/
|
|
644
644
|
eligibleDestinations?: string[] | null;
|
|
645
645
|
/**
|
|
@@ -681,7 +681,7 @@ export namespace merchantapi_accounts_v1 {
|
|
|
681
681
|
*/
|
|
682
682
|
account?: Schema$Account;
|
|
683
683
|
/**
|
|
684
|
-
* Required. An account service between the account to be created and the provider account is initialized as part of the creation. At least one such service needs to be provided. Currently exactly one of these needs to be `account_aggregation` and `accounts.createAndConfigure` method can be used to create a sub-account under an existing advanced account through this method. Additional `account_management` or `
|
|
684
|
+
* Required. An account service between the account to be created and the provider account is initialized as part of the creation. At least one such service needs to be provided. Currently exactly one of these needs to be `account_aggregation` and `accounts.createAndConfigure` method can be used to create a sub-account under an existing advanced account through this method. Additional `account_management` or `products_management` services may be provided.
|
|
685
685
|
*/
|
|
686
686
|
service?: Schema$AddAccountService[];
|
|
687
687
|
/**
|
|
@@ -837,7 +837,7 @@ export namespace merchantapi_accounts_v1 {
|
|
|
837
837
|
*/
|
|
838
838
|
gcpIds?: string[] | null;
|
|
839
839
|
/**
|
|
840
|
-
* Identifier. The `name` (ID) of the developer registration. Generated
|
|
840
|
+
* Identifier. The `name` (ID) of the developer registration. Generated upon creation of a new `DeveloperRegistration`. The `account` represents the merchant ID of the merchant that owns the registration.
|
|
841
841
|
*/
|
|
842
842
|
name?: string | null;
|
|
843
843
|
}
|
|
@@ -936,7 +936,7 @@ export namespace merchantapi_accounts_v1 {
|
|
|
936
936
|
name?: string | null;
|
|
937
937
|
}
|
|
938
938
|
/**
|
|
939
|
-
* The current status of establishing of the service. (for example, pending approval
|
|
939
|
+
* The current status of establishing of the service. (for example, pending approval, approved, established).
|
|
940
940
|
*/
|
|
941
941
|
export interface Schema$Handshake {
|
|
942
942
|
/**
|
|
@@ -1689,7 +1689,7 @@ export namespace merchantapi_accounts_v1 {
|
|
|
1689
1689
|
resourceType?: string | null;
|
|
1690
1690
|
}
|
|
1691
1691
|
/**
|
|
1692
|
-
* 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 the [Free product listings](https://support.google.com/merchants/answer/13889434) program, 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: * `checkout` * `free-listings` * `shopping-ads` * `youtube-shopping-checkout`
|
|
1692
|
+
* 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 the [Free product listings](https://support.google.com/merchants/answer/13889434) program, 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: * `checkout` * `free-listings` * `product-ratings` * `shopping-ads` * `youtube-affiliate` * `youtube-shopping-checkout`
|
|
1693
1693
|
*/
|
|
1694
1694
|
export interface Schema$Program {
|
|
1695
1695
|
/**
|
|
@@ -1777,7 +1777,7 @@ export namespace merchantapi_accounts_v1 {
|
|
|
1777
1777
|
subtables?: Schema$Table[];
|
|
1778
1778
|
}
|
|
1779
1779
|
/**
|
|
1780
|
-
* Represents a geographic region that you can use as a target with both the `RegionalInventory` and `ShippingSettings` services. You can define regions as collections of either postal codes or, in some countries, using predefined geotargets. For more information, see [Set up regions ](https://support.google.com/merchants/answer/7410946#zippy=%2Ccreate-a-new-region) for more information.
|
|
1780
|
+
* Represents a geographic region that you can use as a target with both the `RegionalInventory` and `ShippingSettings` services. You can define regions as collections of either postal codes, radius areas or, in some countries, using predefined geotargets. A region must be defined by specifying exactly one of `postal_code_area`, `geotarget_area`, or `radius_area`. For more information, see [Set up regions ](https://support.google.com/merchants/answer/7410946#zippy=%2Ccreate-a-new-region) for more information.
|
|
1781
1781
|
*/
|
|
1782
1782
|
export interface Schema$Region {
|
|
1783
1783
|
/**
|
|
@@ -1814,7 +1814,7 @@ export namespace merchantapi_accounts_v1 {
|
|
|
1814
1814
|
*/
|
|
1815
1815
|
export interface Schema$RegisterGcpRequest {
|
|
1816
1816
|
/**
|
|
1817
|
-
* Immutable. If the developer email provided is associated with a user in the merchant account
|
|
1817
|
+
* Immutable. Optional field. Developer role can be also added by using `users.update` method. If the developer email provided is associated with a user in the provided merchant account, the user will be updated to have `API_DEVELOPER` `access_rights` and the email preference corresponding to that user will be updated to have the new API notifications preference. If the developer email provided is not associated with any user, it is added as a contact. The email preference corresponding to that contact will have the new API notifications preference. Make sure the email used is associated with a Google Account and is not a service account as service accounts can't receive emails.
|
|
1818
1818
|
*/
|
|
1819
1819
|
developerEmail?: string | null;
|
|
1820
1820
|
}
|
|
@@ -2543,6 +2543,163 @@ export namespace merchantapi_accounts_v1 {
|
|
|
2543
2543
|
}
|
|
2544
2544
|
}
|
|
2545
2545
|
|
|
2546
|
+
/**
|
|
2547
|
+
* Creates a Merchant Center test account. Test accounts are intended for development and testing purposes, such as validating API integrations or new feature behavior. Key characteristics and limitations of test accounts: - Immutable Type: A test account cannot be converted into a regular (live) Merchant Center account. Likewise, a regular account cannot be converted into a test account. - Non-Serving Products: Any products, offers, or data created within a test account will not be published or made visible to end-users on any Google surfaces. They are strictly for testing environments. - Separate Environment: Test accounts operate in a sandbox-like manner, isolated from live serving and real user traffic.
|
|
2548
|
+
* @example
|
|
2549
|
+
* ```js
|
|
2550
|
+
* // Before running the sample:
|
|
2551
|
+
* // - Enable the API at:
|
|
2552
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
2553
|
+
* // - Login into gcloud by running:
|
|
2554
|
+
* // ```sh
|
|
2555
|
+
* // $ gcloud auth application-default login
|
|
2556
|
+
* // ```
|
|
2557
|
+
* // - Install the npm module by running:
|
|
2558
|
+
* // ```sh
|
|
2559
|
+
* // $ npm install googleapis
|
|
2560
|
+
* // ```
|
|
2561
|
+
*
|
|
2562
|
+
* const {google} = require('googleapis');
|
|
2563
|
+
* const merchantapi = google.merchantapi('accounts_v1');
|
|
2564
|
+
*
|
|
2565
|
+
* async function main() {
|
|
2566
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2567
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2568
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
2569
|
+
* });
|
|
2570
|
+
*
|
|
2571
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2572
|
+
* const authClient = await auth.getClient();
|
|
2573
|
+
* google.options({auth: authClient});
|
|
2574
|
+
*
|
|
2575
|
+
* // Do the magic
|
|
2576
|
+
* const res = await merchantapi.accounts.createTestAccount({
|
|
2577
|
+
* // Required. The account resource name to create the test account under. Format: accounts/{account\}
|
|
2578
|
+
* parent: 'accounts/my-account',
|
|
2579
|
+
*
|
|
2580
|
+
* // Request body metadata
|
|
2581
|
+
* requestBody: {
|
|
2582
|
+
* // request body parameters
|
|
2583
|
+
* // {
|
|
2584
|
+
* // "accountId": "my_accountId",
|
|
2585
|
+
* // "accountName": "my_accountName",
|
|
2586
|
+
* // "adultContent": false,
|
|
2587
|
+
* // "languageCode": "my_languageCode",
|
|
2588
|
+
* // "name": "my_name",
|
|
2589
|
+
* // "testAccount": false,
|
|
2590
|
+
* // "timeZone": {}
|
|
2591
|
+
* // }
|
|
2592
|
+
* },
|
|
2593
|
+
* });
|
|
2594
|
+
* console.log(res.data);
|
|
2595
|
+
*
|
|
2596
|
+
* // Example response
|
|
2597
|
+
* // {
|
|
2598
|
+
* // "accountId": "my_accountId",
|
|
2599
|
+
* // "accountName": "my_accountName",
|
|
2600
|
+
* // "adultContent": false,
|
|
2601
|
+
* // "languageCode": "my_languageCode",
|
|
2602
|
+
* // "name": "my_name",
|
|
2603
|
+
* // "testAccount": false,
|
|
2604
|
+
* // "timeZone": {}
|
|
2605
|
+
* // }
|
|
2606
|
+
* }
|
|
2607
|
+
*
|
|
2608
|
+
* main().catch(e => {
|
|
2609
|
+
* console.error(e);
|
|
2610
|
+
* throw e;
|
|
2611
|
+
* });
|
|
2612
|
+
*
|
|
2613
|
+
* ```
|
|
2614
|
+
*
|
|
2615
|
+
* @param params - Parameters for request
|
|
2616
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2617
|
+
* @param callback - Optional callback that handles the response.
|
|
2618
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2619
|
+
*/
|
|
2620
|
+
createTestAccount(
|
|
2621
|
+
params: Params$Resource$Accounts$Createtestaccount,
|
|
2622
|
+
options: StreamMethodOptions
|
|
2623
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2624
|
+
createTestAccount(
|
|
2625
|
+
params?: Params$Resource$Accounts$Createtestaccount,
|
|
2626
|
+
options?: MethodOptions
|
|
2627
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Account>>;
|
|
2628
|
+
createTestAccount(
|
|
2629
|
+
params: Params$Resource$Accounts$Createtestaccount,
|
|
2630
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
2631
|
+
callback: BodyResponseCallback<Readable>
|
|
2632
|
+
): void;
|
|
2633
|
+
createTestAccount(
|
|
2634
|
+
params: Params$Resource$Accounts$Createtestaccount,
|
|
2635
|
+
options: MethodOptions | BodyResponseCallback<Schema$Account>,
|
|
2636
|
+
callback: BodyResponseCallback<Schema$Account>
|
|
2637
|
+
): void;
|
|
2638
|
+
createTestAccount(
|
|
2639
|
+
params: Params$Resource$Accounts$Createtestaccount,
|
|
2640
|
+
callback: BodyResponseCallback<Schema$Account>
|
|
2641
|
+
): void;
|
|
2642
|
+
createTestAccount(callback: BodyResponseCallback<Schema$Account>): void;
|
|
2643
|
+
createTestAccount(
|
|
2644
|
+
paramsOrCallback?:
|
|
2645
|
+
| Params$Resource$Accounts$Createtestaccount
|
|
2646
|
+
| BodyResponseCallback<Schema$Account>
|
|
2647
|
+
| BodyResponseCallback<Readable>,
|
|
2648
|
+
optionsOrCallback?:
|
|
2649
|
+
| MethodOptions
|
|
2650
|
+
| StreamMethodOptions
|
|
2651
|
+
| BodyResponseCallback<Schema$Account>
|
|
2652
|
+
| BodyResponseCallback<Readable>,
|
|
2653
|
+
callback?:
|
|
2654
|
+
| BodyResponseCallback<Schema$Account>
|
|
2655
|
+
| BodyResponseCallback<Readable>
|
|
2656
|
+
):
|
|
2657
|
+
| void
|
|
2658
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Account>>
|
|
2659
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
2660
|
+
let params = (paramsOrCallback ||
|
|
2661
|
+
{}) as Params$Resource$Accounts$Createtestaccount;
|
|
2662
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
2663
|
+
|
|
2664
|
+
if (typeof paramsOrCallback === 'function') {
|
|
2665
|
+
callback = paramsOrCallback;
|
|
2666
|
+
params = {} as Params$Resource$Accounts$Createtestaccount;
|
|
2667
|
+
options = {};
|
|
2668
|
+
}
|
|
2669
|
+
|
|
2670
|
+
if (typeof optionsOrCallback === 'function') {
|
|
2671
|
+
callback = optionsOrCallback;
|
|
2672
|
+
options = {};
|
|
2673
|
+
}
|
|
2674
|
+
|
|
2675
|
+
const rootUrl = options.rootUrl || 'https://merchantapi.googleapis.com/';
|
|
2676
|
+
const parameters = {
|
|
2677
|
+
options: Object.assign(
|
|
2678
|
+
{
|
|
2679
|
+
url: (rootUrl + '/accounts/v1/{+parent}:createTestAccount').replace(
|
|
2680
|
+
/([^:]\/)\/+/g,
|
|
2681
|
+
'$1'
|
|
2682
|
+
),
|
|
2683
|
+
method: 'POST',
|
|
2684
|
+
apiVersion: '',
|
|
2685
|
+
},
|
|
2686
|
+
options
|
|
2687
|
+
),
|
|
2688
|
+
params,
|
|
2689
|
+
requiredParams: ['parent'],
|
|
2690
|
+
pathParams: ['parent'],
|
|
2691
|
+
context: this.context,
|
|
2692
|
+
};
|
|
2693
|
+
if (callback) {
|
|
2694
|
+
createAPIRequest<Schema$Account>(
|
|
2695
|
+
parameters,
|
|
2696
|
+
callback as BodyResponseCallback<unknown>
|
|
2697
|
+
);
|
|
2698
|
+
} else {
|
|
2699
|
+
return createAPIRequest<Schema$Account>(parameters);
|
|
2700
|
+
}
|
|
2701
|
+
}
|
|
2702
|
+
|
|
2546
2703
|
/**
|
|
2547
2704
|
* Deletes the specified account regardless of its type: standalone, advanced account or sub-account. Deleting an advanced account leads to the deletion of all of its sub-accounts. This also deletes the account's [developer registration entity](/merchant/api/reference/rest/accounts_v1/accounts.developerRegistration) and any associated GCP project to the account. Executing this method requires admin access. The deletion succeeds only if the account does not provide services to any other account and has no processed offers. You can use the `force` parameter to override this.
|
|
2548
2705
|
* @example
|
|
@@ -3275,6 +3432,17 @@ export namespace merchantapi_accounts_v1 {
|
|
|
3275
3432
|
*/
|
|
3276
3433
|
requestBody?: Schema$CreateAndConfigureAccountRequest;
|
|
3277
3434
|
}
|
|
3435
|
+
export interface Params$Resource$Accounts$Createtestaccount extends StandardParameters {
|
|
3436
|
+
/**
|
|
3437
|
+
* Required. The account resource name to create the test account under. Format: accounts/{account\}
|
|
3438
|
+
*/
|
|
3439
|
+
parent?: string;
|
|
3440
|
+
|
|
3441
|
+
/**
|
|
3442
|
+
* Request body metadata
|
|
3443
|
+
*/
|
|
3444
|
+
requestBody?: Schema$Account;
|
|
3445
|
+
}
|
|
3278
3446
|
export interface Params$Resource$Accounts$Delete extends StandardParameters {
|
|
3279
3447
|
/**
|
|
3280
3448
|
* Optional. If set to `true`, the account is deleted even if it provides services to other accounts or has processed offers.
|
|
@@ -4993,7 +5161,7 @@ export namespace merchantapi_accounts_v1 {
|
|
|
4993
5161
|
*
|
|
4994
5162
|
* // Do the magic
|
|
4995
5163
|
* const res = await merchantapi.accounts.developerRegistration.registerGcp({
|
|
4996
|
-
* // Required. The name of the developer registration to be created for the merchant account that the GCP will be registered with. Format: `accounts/{account\}/developerRegistration`
|
|
5164
|
+
* // Required. The name of the developer registration to be created for the merchant account that the GCP will be registered with. Format: `accounts/{account\}/developerRegistration` The {account\} used must be the same account where user calling this API method is directly added to.
|
|
4997
5165
|
* name: 'accounts/my-account/developerRegistration',
|
|
4998
5166
|
*
|
|
4999
5167
|
* // Request body metadata
|
|
@@ -5265,7 +5433,7 @@ export namespace merchantapi_accounts_v1 {
|
|
|
5265
5433
|
}
|
|
5266
5434
|
export interface Params$Resource$Accounts$Developerregistration$Registergcp extends StandardParameters {
|
|
5267
5435
|
/**
|
|
5268
|
-
* Required. The name of the developer registration to be created for the merchant account that the GCP will be registered with. Format: `accounts/{account\}/developerRegistration`
|
|
5436
|
+
* Required. The name of the developer registration to be created for the merchant account that the GCP will be registered with. Format: `accounts/{account\}/developerRegistration` The {account\} used must be the same account where user calling this API method is directly added to.
|
|
5269
5437
|
*/
|
|
5270
5438
|
name?: string;
|
|
5271
5439
|
|
|
@@ -13229,7 +13397,7 @@ export namespace merchantapi_accounts_v1 {
|
|
|
13229
13397
|
}
|
|
13230
13398
|
|
|
13231
13399
|
/**
|
|
13232
|
-
* Deletes a Merchant Center account user. Executing this method requires admin access. The user to be deleted can't be the last admin user of that account.
|
|
13400
|
+
* Deletes a Merchant Center account user. Executing this method requires admin access. The user to be deleted can't be the last admin user of that account.
|
|
13233
13401
|
* @example
|
|
13234
13402
|
* ```js
|
|
13235
13403
|
* // Before running the sample:
|
package/accounts_v1beta.ts
CHANGED
|
@@ -166,7 +166,7 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
166
166
|
termsOfServiceAgreementState?: Schema$TermsOfServiceAgreementState;
|
|
167
167
|
}
|
|
168
168
|
/**
|
|
169
|
-
* The `Account` message represents a business's account within
|
|
169
|
+
* The `Account` message represents a business's account within Merchant Center. It's the primary entity for managing product data, settings, and interactions with Google's services and external providers. Accounts can operate as standalone entities or be part of a advanced account structure. In an advanced account setup the parent account manages multiple sub-accounts. Establishing an account involves configuring attributes like the account name, time zone, and language preferences. The `Account` message is the parent entity for many other resources, for example, `AccountRelationship`, `Homepage`, `BusinessInfo` and so on.
|
|
170
170
|
*/
|
|
171
171
|
export interface Schema$Account {
|
|
172
172
|
/**
|
|
@@ -174,7 +174,7 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
174
174
|
*/
|
|
175
175
|
accountId?: string | null;
|
|
176
176
|
/**
|
|
177
|
-
* Required. A human-readable name of the account.
|
|
177
|
+
* Required. A human-readable name of the account. Don't use punctuation, capitalization, or non-alphanumeric symbols such as the "/" or "_" symbols. See [Adding a business name](https://support.google.com/merchants/answer/12159159) for more information.
|
|
178
178
|
*/
|
|
179
179
|
accountName?: string | null;
|
|
180
180
|
/**
|
|
@@ -594,7 +594,7 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
594
594
|
*/
|
|
595
595
|
effectiveUriSettings?: Schema$UriSettings;
|
|
596
596
|
/**
|
|
597
|
-
* Optional. The destinations (also known as [Marketing methods](https://support.google.com/merchants/answer/15130232)) to which the checkout program applies
|
|
597
|
+
* Optional. Required for the create operation. The destinations (also known as [Marketing methods](https://support.google.com/merchants/answer/15130232)) to which the checkout program applies. Valid destination values are `SHOPPING_ADS` and `FREE_LISTINGS`.
|
|
598
598
|
*/
|
|
599
599
|
eligibleDestinations?: string[] | null;
|
|
600
600
|
/**
|
|
@@ -636,7 +636,7 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
636
636
|
*/
|
|
637
637
|
account?: Schema$Account;
|
|
638
638
|
/**
|
|
639
|
-
* Required. An account service between the account to be created and the provider account is initialized as part of the creation. At least one such service needs to be provided. Currently exactly one of these needs to be `account_aggregation` and `accounts.createAndConfigure` method can be used to create a sub-account under an existing advanced account through this method. Additional `account_management` or `
|
|
639
|
+
* Required. An account service between the account to be created and the provider account is initialized as part of the creation. At least one such service needs to be provided. Currently exactly one of these needs to be `account_aggregation` and `accounts.createAndConfigure` method can be used to create a sub-account under an existing advanced account through this method. Additional `account_management` or `products_management` services may be provided.
|
|
640
640
|
*/
|
|
641
641
|
service?: Schema$AddAccountService[];
|
|
642
642
|
/**
|
|
@@ -787,7 +787,7 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
787
787
|
*/
|
|
788
788
|
gcpIds?: string[] | null;
|
|
789
789
|
/**
|
|
790
|
-
* Identifier. The `name` (ID) of the developer registration. Generated
|
|
790
|
+
* Identifier. The `name` (ID) of the developer registration. Generated upon creation of a new `DeveloperRegistration`. The `account` represents the merchant ID of the merchant that owns the registration.
|
|
791
791
|
*/
|
|
792
792
|
name?: string | null;
|
|
793
793
|
}
|
|
@@ -886,7 +886,7 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
886
886
|
name?: string | null;
|
|
887
887
|
}
|
|
888
888
|
/**
|
|
889
|
-
* The current status of establishing of the service. (for example, pending approval
|
|
889
|
+
* The current status of establishing of the service. (for example, pending approval, approved, established).
|
|
890
890
|
*/
|
|
891
891
|
export interface Schema$Handshake {
|
|
892
892
|
/**
|
|
@@ -1639,7 +1639,7 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
1639
1639
|
resourceType?: string | null;
|
|
1640
1640
|
}
|
|
1641
1641
|
/**
|
|
1642
|
-
* 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 the [Free product listings](https://support.google.com/merchants/answer/13889434) program, 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: * `checkout` * `free-listings` * `shopping-ads` * `youtube-shopping-checkout`
|
|
1642
|
+
* 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 the [Free product listings](https://support.google.com/merchants/answer/13889434) program, 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: * `checkout` * `free-listings` * `product-ratings` * `shopping-ads` * `youtube-affiliate` * `youtube-shopping-checkout`
|
|
1643
1643
|
*/
|
|
1644
1644
|
export interface Schema$Program {
|
|
1645
1645
|
/**
|
|
@@ -1727,7 +1727,7 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
1727
1727
|
subtables?: Schema$Table[];
|
|
1728
1728
|
}
|
|
1729
1729
|
/**
|
|
1730
|
-
* Represents a geographic region that you can use as a target with both the `RegionalInventory` and `ShippingSettings` services. You can define regions as collections of either postal codes or, in some countries, using predefined geotargets. For more information, see [Set up regions ](https://support.google.com/merchants/answer/7410946#zippy=%2Ccreate-a-new-region) for more information.
|
|
1730
|
+
* Represents a geographic region that you can use as a target with both the `RegionalInventory` and `ShippingSettings` services. You can define regions as collections of either postal codes, radius areas or, in some countries, using predefined geotargets. A region must be defined by specifying exactly one of `postal_code_area`, `geotarget_area`, or `radius_area`. For more information, see [Set up regions ](https://support.google.com/merchants/answer/7410946#zippy=%2Ccreate-a-new-region) for more information.
|
|
1731
1731
|
*/
|
|
1732
1732
|
export interface Schema$Region {
|
|
1733
1733
|
/**
|
|
@@ -1764,7 +1764,7 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
1764
1764
|
*/
|
|
1765
1765
|
export interface Schema$RegisterGcpRequest {
|
|
1766
1766
|
/**
|
|
1767
|
-
* Immutable. If the developer email provided is associated with a user in the merchant account
|
|
1767
|
+
* Immutable. Optional field. Developer role can be also added by using `users.update` method. If the developer email provided is associated with a user in the provided merchant account, the user will be updated to have `API_DEVELOPER` `access_rights` and the email preference corresponding to that user will be updated to have the new API notifications preference. If the developer email provided is not associated with any user, it is added as a contact. The email preference corresponding to that contact will have the new API notifications preference. Make sure the email used is associated with a Google Account and is not a service account as service accounts can't receive emails.
|
|
1768
1768
|
*/
|
|
1769
1769
|
developerEmail?: string | null;
|
|
1770
1770
|
}
|
|
@@ -2480,6 +2480,162 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
2480
2480
|
}
|
|
2481
2481
|
}
|
|
2482
2482
|
|
|
2483
|
+
/**
|
|
2484
|
+
* Creates a Merchant Center test account. Test accounts are intended for development and testing purposes, such as validating API integrations or new feature behavior. Key characteristics and limitations of test accounts: - Immutable Type: A test account cannot be converted into a regular (live) Merchant Center account. Likewise, a regular account cannot be converted into a test account. - Non-Serving Products: Any products, offers, or data created within a test account will not be published or made visible to end-users on any Google surfaces. They are strictly for testing environments. - Separate Environment: Test accounts operate in a sandbox-like manner, isolated from live serving and real user traffic.
|
|
2485
|
+
* @example
|
|
2486
|
+
* ```js
|
|
2487
|
+
* // Before running the sample:
|
|
2488
|
+
* // - Enable the API at:
|
|
2489
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
2490
|
+
* // - Login into gcloud by running:
|
|
2491
|
+
* // ```sh
|
|
2492
|
+
* // $ gcloud auth application-default login
|
|
2493
|
+
* // ```
|
|
2494
|
+
* // - Install the npm module by running:
|
|
2495
|
+
* // ```sh
|
|
2496
|
+
* // $ npm install googleapis
|
|
2497
|
+
* // ```
|
|
2498
|
+
*
|
|
2499
|
+
* const {google} = require('googleapis');
|
|
2500
|
+
* const merchantapi = google.merchantapi('accounts_v1beta');
|
|
2501
|
+
*
|
|
2502
|
+
* async function main() {
|
|
2503
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2504
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2505
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
2506
|
+
* });
|
|
2507
|
+
*
|
|
2508
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2509
|
+
* const authClient = await auth.getClient();
|
|
2510
|
+
* google.options({auth: authClient});
|
|
2511
|
+
*
|
|
2512
|
+
* // Do the magic
|
|
2513
|
+
* const res = await merchantapi.accounts.createTestAccount({
|
|
2514
|
+
* // Required. The account resource name to create the test account under. Format: accounts/{account\}
|
|
2515
|
+
* parent: 'accounts/my-account',
|
|
2516
|
+
*
|
|
2517
|
+
* // Request body metadata
|
|
2518
|
+
* requestBody: {
|
|
2519
|
+
* // request body parameters
|
|
2520
|
+
* // {
|
|
2521
|
+
* // "accountId": "my_accountId",
|
|
2522
|
+
* // "accountName": "my_accountName",
|
|
2523
|
+
* // "adultContent": false,
|
|
2524
|
+
* // "languageCode": "my_languageCode",
|
|
2525
|
+
* // "name": "my_name",
|
|
2526
|
+
* // "testAccount": false,
|
|
2527
|
+
* // "timeZone": {}
|
|
2528
|
+
* // }
|
|
2529
|
+
* },
|
|
2530
|
+
* });
|
|
2531
|
+
* console.log(res.data);
|
|
2532
|
+
*
|
|
2533
|
+
* // Example response
|
|
2534
|
+
* // {
|
|
2535
|
+
* // "accountId": "my_accountId",
|
|
2536
|
+
* // "accountName": "my_accountName",
|
|
2537
|
+
* // "adultContent": false,
|
|
2538
|
+
* // "languageCode": "my_languageCode",
|
|
2539
|
+
* // "name": "my_name",
|
|
2540
|
+
* // "testAccount": false,
|
|
2541
|
+
* // "timeZone": {}
|
|
2542
|
+
* // }
|
|
2543
|
+
* }
|
|
2544
|
+
*
|
|
2545
|
+
* main().catch(e => {
|
|
2546
|
+
* console.error(e);
|
|
2547
|
+
* throw e;
|
|
2548
|
+
* });
|
|
2549
|
+
*
|
|
2550
|
+
* ```
|
|
2551
|
+
*
|
|
2552
|
+
* @param params - Parameters for request
|
|
2553
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2554
|
+
* @param callback - Optional callback that handles the response.
|
|
2555
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2556
|
+
*/
|
|
2557
|
+
createTestAccount(
|
|
2558
|
+
params: Params$Resource$Accounts$Createtestaccount,
|
|
2559
|
+
options: StreamMethodOptions
|
|
2560
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2561
|
+
createTestAccount(
|
|
2562
|
+
params?: Params$Resource$Accounts$Createtestaccount,
|
|
2563
|
+
options?: MethodOptions
|
|
2564
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Account>>;
|
|
2565
|
+
createTestAccount(
|
|
2566
|
+
params: Params$Resource$Accounts$Createtestaccount,
|
|
2567
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
2568
|
+
callback: BodyResponseCallback<Readable>
|
|
2569
|
+
): void;
|
|
2570
|
+
createTestAccount(
|
|
2571
|
+
params: Params$Resource$Accounts$Createtestaccount,
|
|
2572
|
+
options: MethodOptions | BodyResponseCallback<Schema$Account>,
|
|
2573
|
+
callback: BodyResponseCallback<Schema$Account>
|
|
2574
|
+
): void;
|
|
2575
|
+
createTestAccount(
|
|
2576
|
+
params: Params$Resource$Accounts$Createtestaccount,
|
|
2577
|
+
callback: BodyResponseCallback<Schema$Account>
|
|
2578
|
+
): void;
|
|
2579
|
+
createTestAccount(callback: BodyResponseCallback<Schema$Account>): void;
|
|
2580
|
+
createTestAccount(
|
|
2581
|
+
paramsOrCallback?:
|
|
2582
|
+
| Params$Resource$Accounts$Createtestaccount
|
|
2583
|
+
| BodyResponseCallback<Schema$Account>
|
|
2584
|
+
| BodyResponseCallback<Readable>,
|
|
2585
|
+
optionsOrCallback?:
|
|
2586
|
+
| MethodOptions
|
|
2587
|
+
| StreamMethodOptions
|
|
2588
|
+
| BodyResponseCallback<Schema$Account>
|
|
2589
|
+
| BodyResponseCallback<Readable>,
|
|
2590
|
+
callback?:
|
|
2591
|
+
| BodyResponseCallback<Schema$Account>
|
|
2592
|
+
| BodyResponseCallback<Readable>
|
|
2593
|
+
):
|
|
2594
|
+
| void
|
|
2595
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Account>>
|
|
2596
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
2597
|
+
let params = (paramsOrCallback ||
|
|
2598
|
+
{}) as Params$Resource$Accounts$Createtestaccount;
|
|
2599
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
2600
|
+
|
|
2601
|
+
if (typeof paramsOrCallback === 'function') {
|
|
2602
|
+
callback = paramsOrCallback;
|
|
2603
|
+
params = {} as Params$Resource$Accounts$Createtestaccount;
|
|
2604
|
+
options = {};
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2607
|
+
if (typeof optionsOrCallback === 'function') {
|
|
2608
|
+
callback = optionsOrCallback;
|
|
2609
|
+
options = {};
|
|
2610
|
+
}
|
|
2611
|
+
|
|
2612
|
+
const rootUrl = options.rootUrl || 'https://merchantapi.googleapis.com/';
|
|
2613
|
+
const parameters = {
|
|
2614
|
+
options: Object.assign(
|
|
2615
|
+
{
|
|
2616
|
+
url: (
|
|
2617
|
+
rootUrl + '/accounts/v1beta/{+parent}:createTestAccount'
|
|
2618
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
2619
|
+
method: 'POST',
|
|
2620
|
+
apiVersion: '',
|
|
2621
|
+
},
|
|
2622
|
+
options
|
|
2623
|
+
),
|
|
2624
|
+
params,
|
|
2625
|
+
requiredParams: ['parent'],
|
|
2626
|
+
pathParams: ['parent'],
|
|
2627
|
+
context: this.context,
|
|
2628
|
+
};
|
|
2629
|
+
if (callback) {
|
|
2630
|
+
createAPIRequest<Schema$Account>(
|
|
2631
|
+
parameters,
|
|
2632
|
+
callback as BodyResponseCallback<unknown>
|
|
2633
|
+
);
|
|
2634
|
+
} else {
|
|
2635
|
+
return createAPIRequest<Schema$Account>(parameters);
|
|
2636
|
+
}
|
|
2637
|
+
}
|
|
2638
|
+
|
|
2483
2639
|
/**
|
|
2484
2640
|
* Deletes the specified account regardless of its type: standalone, advanced account or sub-account. Deleting an advanced account leads to the deletion of all of its sub-accounts. This also deletes the account's [developer registration entity](/merchant/api/reference/rest/accounts_v1beta/accounts.developerRegistration) and any associated GCP project to the account. Executing this method requires admin access. The deletion succeeds only if the account does not provide services to any other account and has no processed offers. You can use the `force` parameter to override this.
|
|
2485
2641
|
* @example
|
|
@@ -3211,6 +3367,17 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
3211
3367
|
*/
|
|
3212
3368
|
requestBody?: Schema$CreateAndConfigureAccountRequest;
|
|
3213
3369
|
}
|
|
3370
|
+
export interface Params$Resource$Accounts$Createtestaccount extends StandardParameters {
|
|
3371
|
+
/**
|
|
3372
|
+
* Required. The account resource name to create the test account under. Format: accounts/{account\}
|
|
3373
|
+
*/
|
|
3374
|
+
parent?: string;
|
|
3375
|
+
|
|
3376
|
+
/**
|
|
3377
|
+
* Request body metadata
|
|
3378
|
+
*/
|
|
3379
|
+
requestBody?: Schema$Account;
|
|
3380
|
+
}
|
|
3214
3381
|
export interface Params$Resource$Accounts$Delete extends StandardParameters {
|
|
3215
3382
|
/**
|
|
3216
3383
|
* Optional. If set to `true`, the account is deleted even if it provides services to other accounts or has processed offers.
|
|
@@ -4929,7 +5096,7 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
4929
5096
|
*
|
|
4930
5097
|
* // Do the magic
|
|
4931
5098
|
* const res = await merchantapi.accounts.developerRegistration.registerGcp({
|
|
4932
|
-
* // Required. The name of the developer registration to be created for the merchant account that the GCP will be registered with. Format: `accounts/{account\}/developerRegistration`
|
|
5099
|
+
* // Required. The name of the developer registration to be created for the merchant account that the GCP will be registered with. Format: `accounts/{account\}/developerRegistration` The {account\} used must be the same account where user calling this API method is directly added to.
|
|
4933
5100
|
* name: 'accounts/my-account/developerRegistration',
|
|
4934
5101
|
*
|
|
4935
5102
|
* // Request body metadata
|
|
@@ -5201,7 +5368,7 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
5201
5368
|
}
|
|
5202
5369
|
export interface Params$Resource$Accounts$Developerregistration$Registergcp extends StandardParameters {
|
|
5203
5370
|
/**
|
|
5204
|
-
* Required. The name of the developer registration to be created for the merchant account that the GCP will be registered with. Format: `accounts/{account\}/developerRegistration`
|
|
5371
|
+
* Required. The name of the developer registration to be created for the merchant account that the GCP will be registered with. Format: `accounts/{account\}/developerRegistration` The {account\} used must be the same account where user calling this API method is directly added to.
|
|
5205
5372
|
*/
|
|
5206
5373
|
name?: string;
|
|
5207
5374
|
|
|
@@ -12881,7 +13048,7 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
12881
13048
|
}
|
|
12882
13049
|
|
|
12883
13050
|
/**
|
|
12884
|
-
* Deletes a Merchant Center account user. Executing this method requires admin access. The user to be deleted can't be the last admin user of that account.
|
|
13051
|
+
* Deletes a Merchant Center account user. Executing this method requires admin access. The user to be deleted can't be the last admin user of that account.
|
|
12885
13052
|
* @example
|
|
12886
13053
|
* ```js
|
|
12887
13054
|
* // Before running the sample:
|