판매자 센터는 API 호출 할당량 외에도 리소스에 다른 한도를 적용합니다. 이러한 한도는 API 할당량과 혼동되는 경우가 많지만 판매자 센터 한도의 일부입니다. 자세한 내용은 Google 판매자 센터의 할당량 이해를 참고하세요.
제품 한도
제품 한도를 확인하려면 accounts.limits.get 및 accounts.limits.list 메서드를 사용합니다.
특정 제품 한도를 검색하려면(예: 계정의 Google Ads EEA 할당량을 가져오려면) accounts.limits.get 호출에서 계정 ID와 한도 ID를 지정해야 합니다.
한도 ID는 한도 유형과 범위의 조합입니다. 예를 들어 EEA에서 Google Ads를 타겟팅하는 제품의 경우 products~ADS_EEA이고 EEA 외부에서 Google Ads를 타겟팅하는 제품의 경우 products~ADS_NON_EEA입니다.
다음은 특정 계정의 products~ADS_EEA 한도를 가져오는 요청의 예입니다.
GET https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/limits/products~ADS_EEA
다음 샘플에서는 특정 계정 한도를 검색하는 방법을 보여줍니다.
자바
import com.google.api.gax.core.FixedCredentialsProvider;
import com.google.auth.oauth2.GoogleCredentials;
import com.google.shopping.merchant.quota.v1.AccountLimit;
import com.google.shopping.merchant.quota.v1.AccountLimitsServiceClient;
import com.google.shopping.merchant.quota.v1.AccountLimitsServiceSettings;
import com.google.shopping.merchant.quota.v1.GetAccountLimitRequest;
import shopping.merchant.samples.utils.Authenticator;
import shopping.merchant.samples.utils.Config;
/**
* This class demonstrates how to get a single account limit for a given Merchant Center account.
*/
public class GetAccountLimitSample {
public static void getAccountLimit(String accountId, String limitId) throws Exception {
GoogleCredentials credential = new Authenticator().authenticate();
AccountLimitsServiceSettings accountLimitsServiceSettings =
AccountLimitsServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(credential))
.build();
try (AccountLimitsServiceClient accountLimitsServiceClient =
AccountLimitsServiceClient.create(accountLimitsServiceSettings)) {
GetAccountLimitRequest request =
GetAccountLimitRequest.newBuilder()
.setName(String.format("accounts/%s/limits/%s", accountId, limitId))
.build();
System.out.println("Sending get account limit request:");
AccountLimit response = accountLimitsServiceClient.getAccountLimit(request);
System.out.println("Retrieved account limit below");
System.out.println(response);
} catch (Exception e) {
System.out.println("Failed to get account limit.");
System.out.println(e);
}
}
public static void main(String[] args) throws Exception {
Config config = Config.load();
// The limit ID is a combination of the limit type and the scope, for example:
// `products~ADS_NON_EEA`
getAccountLimit(config.getAccountId().toString(), "products~ADS_EEA");
}
}
계정에서 사용할 수 있는 한도 ID에 대해 알아보려면
accounts.limits.list
필터와 함께 type="products"를 사용하세요.
GET https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/limits?filter=type%3D%22products%22
다음 샘플에서는 계정 한도를 나열하는 방법을 보여줍니다.
자바
import com.google.api.gax.core.FixedCredentialsProvider;
import com.google.auth.oauth2.GoogleCredentials;
import com.google.shopping.merchant.quota.v1.AccountLimit;
import com.google.shopping.merchant.quota.v1.AccountLimitsServiceClient;
import com.google.shopping.merchant.quota.v1.AccountLimitsServiceClient.ListAccountLimitsPagedResponse;
import com.google.shopping.merchant.quota.v1.AccountLimitsServiceSettings;
import com.google.shopping.merchant.quota.v1.ListAccountLimitsRequest;
import shopping.merchant.samples.utils.Authenticator;
import shopping.merchant.samples.utils.Config;
/** This class demonstrates how to list account limits for a given Merchant Center account. */
public class ListAccountLimitsSample {
public static void listAccountLimits(String accountId) throws Exception {
GoogleCredentials credential = new Authenticator().authenticate();
AccountLimitsServiceSettings accountLimitsServiceSettings =
AccountLimitsServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(credential))
.build();
try (AccountLimitsServiceClient accountLimitsServiceClient =
AccountLimitsServiceClient.create(accountLimitsServiceSettings)) {
ListAccountLimitsRequest request =
ListAccountLimitsRequest.newBuilder()
.setParent(String.format("accounts/%s", accountId))
.setFilter("type = \"products\"")
.build();
System.out.println("Sending list account limits request:");
ListAccountLimitsPagedResponse response =
accountLimitsServiceClient.listAccountLimits(request);
int count = 0;
// Iterates over all rows in all pages and prints the account limit in each row.
// Automatically uses the `nextPageToken` if returned to fetch all pages of data.
for (AccountLimit accountLimit : response.iterateAll()) {
System.out.println(accountLimit);
count++;
}
System.out.print("The following count of account limits were returned: ");
System.out.println(count);
} catch (Exception e) {
System.out.println("Failed to list account limits.");
System.out.println(e);
}
}
public static void main(String[] args) throws Exception {
Config config = Config.load();
listAccountLimits(config.getAccountId().toString());
}
}
리소스 표현 한도
다음 한도는 Merchant API에 사용되는 리소스 표현 내의 특정 문자열 값과 배열 필드에 적용되는 주목할 만한 제한사항을 설명합니다. 이러한 한도는 Merchant API와 판매자 센터의 해당 기능에 모두 동일하게 적용됩니다.
| 리소스 | 필드 | 한도 |
|---|---|---|
shippingsettings |
국가별 배송 서비스 ( 배송 서비스별 배송 그룹 ( 배송 그룹별 라벨 ( 배송 그룹별 하위 표 ( 단일 요금표의 행 수 또는 열 수. 배송 라벨의 길이. |
20 20 30 100 150 100 |
요금 표의 행 수 또는 열 수는 다음 배열 필드에 영향을 미칩니다.
rowHeaders또는columnHeaders내 배열 필드:prices[]weights[]numberOfItems[]postalCodeGroupNames[]locations[]rows[]cells[]