মার্চেন্ট সেন্টারের সীমা

এপিআই কল কোটা ছাড়াও, মার্চেন্ট সেন্টার রিসোর্সের উপর অন্যান্য সীমাবদ্ধতা আরোপ করে। এগুলোকে প্রায়শই এপিআই কোটার সাথে গুলিয়ে ফেলা হয়, কিন্তু এগুলো মার্চেন্ট সেন্টারের সীমাবদ্ধতারই অংশ। আরও তথ্যের জন্য, গুগল মার্চেন্ট সেন্টারে কোটা বোঝা দেখুন।

পণ্যের সীমা

পণ্যের সীমা পরীক্ষা করতে, আপনি accounts.limits.get এবং accounts.limits.list মেথডগুলো ব্যবহার করেন।

একটি নির্দিষ্ট প্রোডাক্ট লিমিট পুনরুদ্ধার করতে, যেমন কোনো অ্যাকাউন্টের Ads EEA কোটা পেতে, আপনাকে accounts.limits.get কল করার সময় অ্যাকাউন্ট আইডি এবং লিমিট আইডি উল্লেখ করতে হবে। লিমিট আইডি হলো লিমিটের ধরন এবং পরিধির একটি সমন্বয়। উদাহরণস্বরূপ, EEA-তে বিজ্ঞাপন টার্গেট করা প্রোডাক্টের জন্য products~ADS_EEA , এবং EEA-এর বাইরে বিজ্ঞাপন টার্গেট করা প্রোডাক্টের জন্য 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");
  }
}

আপনার অ্যাকাউন্টের জন্য উপলব্ধ লিমিট আইডিগুলো সম্পর্কে জানতে type="products" ফিল্টার সহ accounts.limits.list ব্যবহার করুন।

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());
  }
}

সম্পদ উপস্থাপনার সীমাবদ্ধতা

নিম্নলিখিত সীমাগুলো মার্চেন্ট এপিআই-তে ব্যবহৃত রিসোর্স রিপ্রেজেন্টেশনের মধ্যে থাকা নির্দিষ্ট স্ট্রিং ভ্যালু এবং অ্যারে ফিল্ডের জন্য উল্লেখযোগ্য সীমাবদ্ধতা বর্ণনা করে। এই সীমাগুলো মার্চেন্ট এপিআই এবং মার্চেন্ট সেন্টারে থাকা সেগুলোর সংশ্লিষ্ট ফিচারের জন্য একই।

সম্পদ মাঠ সীমা
shippingsettings

দেশ অনুযায়ী শিপিং পরিষেবা ( services )।

শিপিং পরিষেবা অনুযায়ী শিপিং গ্রুপ ( rateGroups )।

প্রতিটি শিপিং গ্রুপের জন্য লেবেল ( applicableShippingLabels )।

প্রতিটি শিপিং গ্রুপের জন্য উপ-টেবিল ( subtables )।

একটি একক রেট টেবিলে সারি বা কলামের সংখ্যা।

শিপিং লেবেলের দৈর্ঘ্য।

২০

২০

৩০

১০০

১৫০

১০০

একটি রেট টেবিলের সারি বা কলামের সংখ্যা নিম্নলিখিত অ্যারে ফিল্ডগুলিকে প্রভাবিত করে:

  • rowHeaders বা columnHeaders ভেতরের অ্যারে ফিল্ডসমূহ:
    • prices[]
    • weights[]
    • numberOfItems[]
    • postalCodeGroupNames[]
    • locations[]
    • rows[]
    • cells[]