API কল কোটা ছাড়াও, Merchant Center রিসোর্সের উপর অন্যান্য সীমা এনফোর্স করে। এগুলি প্রায়ই API কোটার সাথে গুলিয়ে ফেলা হয়, তবে এগুলি Merchant Center-এর সীমার অংশ। আরও তথ্যের জন্য, Google Merchant Center-এ কোটা বোঝা দেখুন।
প্রোডাক্টের সীমা
প্রোডাক্টের সীমা চেক করতে, আপনি accounts.limits.get এবং accounts.limits.list পদ্ধতি ব্যবহার করেন।
কোনও নির্দিষ্ট প্রোডাক্টের সীমা জানতে, যেমন, কোনও অ্যাকাউন্টের Ads EEA কোটা জানতে, আপনাকে accounts.limits.get-এ কল করার সময় অ্যাকাউন্ট আইডি ও সীমা আইডি
উল্লেখ করতে হবে।
সীমা আইডি হল সীমা প্রকার এবং স্কোপের কম্বিনেশন। যেমন,
products~ADS_EEA EEA-তে বিজ্ঞাপন টার্গেট করা প্রোডাক্টের জন্য এবং
products~ADS_NON_EEA EEA-এর বাইরে বিজ্ঞাপন টার্গেট করা প্রোডাক্টের জন্য।
এখানে একটি প্রদত্ত অ্যাকাউন্টের জন্য products~ADS_EEA সীমা পেতে একটি উদাহরণ অনুরোধ দেওয়া হল:
GET https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/limits/products~ADS_EEA
নির্দিষ্ট অ্যাকাউন্ট সীমা কীভাবে ফিরিয়ে আনতে হয় তা নিম্নলিখিত স্যাম্পেল থেকে জানতে পারবেন:
Java
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");
}
}
আপনার অ্যাকাউন্টের জন্য উপলভ্য লিমিট আইডি সম্পর্কে জানতে, type="products"-এর জন্য ফিল্টার সহ
accounts.limits.list
ব্যবহার করুন:
GET https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/limits?filter=type%3D%22products%22
অ্যাকাউন্ট সীমা কীভাবে তালিকাভুক্ত করতে হয় তা নিম্নলিখিত স্যাম্পেল থেকে দেখানো হয়েছে:
Java
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 এবং Merchant Center-এ তার সংশ্লিষ্ট ফিচারের জন্য এই সীমা একই।
| রিসোর্স | ফিল্ড | সীমা |
|---|---|---|
shippingsettings |
দেশ প্রতি শিপিং পরিষেবা ( প্রতি শিপিং সার্ভিসে শিপিং গ্রুপ ( শিপিং গ্রুপ প্রতি লেবেল ( শিপিং গ্রুপ প্রতি সাবটেবিল ( একটি রেট টেবিলে সারি বা কলামের সংখ্যা। শিপিং লেবেলের দৈর্ঘ্য। |
20 20 ৩০ 100 ১৫০ 100 |
রেট টেবিলের সারি বা কলামের সংখ্যা নিম্নলিখিত অ্যারে ফিল্ডকে প্রভাবিত করে:
rowHeadersবাcolumnHeaders-এর মধ্যে অ্যারে ফিল্ড:prices[]weights[]numberOfItems[]postalCodeGroupNames[]locations[]rows[]cells[]