Merchant Center-এর সীমা

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

আপনার অ্যাকাউন্টের জন্য উপলভ্য সীমা আইডি সম্পর্কে জানতে accounts.limits.list type="products"-এর জন্য ফিল্টার সহ ব্যবহার করুন:

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

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

প্রতিটি শিপিং পরিষেবার জন্য শিপিং গ্রুপ (rateGroups)।

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

শিপিং গ্রুপ পিছু সাবটেবিল (subtables)।

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

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

20

20

৩০

100

১৫০

100

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

  • rowHeaders বা columnHeaders-এর মধ্যে অ্যারে ফিল্ড:
    • prices[]
    • weights[]
    • numberOfItems[]
    • postalCodeGroupNames[]
    • locations[]
    • rows[]
    • cells[]