حالة الحساب

يمكنك استخدام مورد accountstatuses للاطّلاع على حالة حسابك على Merchant Center أو حساب متعدّد العملاء وجميع الحسابات الفرعية المرتبطة به.

يمكن للتجّار الذين يملكون متاجر أو علامات تجارية متعدّدة على الإنترنت ويبيعونها على مواقع إلكترونية منفصلة اختيار الحصول على حسابات فرعية ضمن حساب متعدّد العملاء.

يتحمّل التجّار مسؤولية الالتزام بسياسات إعلانات Shopping والبيانات المجانية. يحتفظ محرّك بحث Google Shopping بالحق في فرض هذه السياسات واتّخاذ الإجراءات اللازمة إذا عثرنا على محتوى أو سلوك يخالف هذه السياسات.

يمكنك الاطّلاع على مرجع مشاكل الحساب للحصول على تفاصيل حول مشاكل الحساب الشائعة.

accountstatuses.get

يمكنك استخدام accountstatuses.get لعرض معلومات حالة حساب تاجر واحد.

يمكنك استخدام المَعلمة destination للتحكّم في مشاكل المنتجات التي يتم عرضها. عندما لا يتم تحديد وجهة، يتضمّن الردّ التلقائي حالات destination: Shopping.

في ما يلي نموذج طلب، حيث يمثّل merchantId معرّف حساب متعدّد العملاء، ويمثّل accountId حسابًا فرعيًا لهذا الحساب:

GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/accountstatuses/accountId

للحصول على معلومات حالة حساب مستقل، استخدِم طريقة الاستدعاء accountstatuses.get مع رقم تعريف الحساب نفسه لكلّ من merchantId وaccountId.

تعرض هذه الطريقة المشاكل على مستوى الحساب والسلعة. يمكنك استخدام الموارد الخاصة بإعلانات Shopping والبيانات المجانية لإصلاح الخطأ accountLevelIssues الذي تم عرضه في الردّ من accountstatuses.get.

في ما يلي نموذج ردّ لحساب فرعي تم تعليقه بسبب مخالفة "الصفحة المقصودة لا تعمل".

{
 "kind": "content#accountStatus",
 "accountId": "123456789",
 "websiteClaimed": true,
 "accountLevelIssues": [
  {
   "id": "editorial_and_professional_standards_destination_url_down_policy",
   "title": "Account suspended due to policy violation: landing page not working",
   "country": "US",
   "severity": "critical",
   "documentation": "https://support.google.com/merchants/answer/6150244#wycd-usefulness"
  },
  {
   "id": "missing_ad_words_link",
   "title": "No Google Ads account linked",
   "severity": "error",
   "documentation": "https://support.google.com/merchants/answer/6159060"
  }
 ],
 "products": [
  {
   "channel": "online",
   "destination": "Shopping",
   "country": "US",
   "statistics": {
    "active": "0",
    "pending": "0",
    "disapproved": "5",
    "expiring": "0"
   },
   "itemLevelIssues": [
    {
     "code": "image_link_broken",
     "servability": "disapproved",
     "resolution": "merchant_action",
     "attributeName": "image link",
     "description": "Invalid image [image link]",
     "detail": "Ensure the image is accessible and uses an accepted image format (JPEG, PNG, GIF)",
     "documentation": "https://support.google.com/merchants/answer/6098289",
     "numItems": "2"
    },
    {
     "code": "landing_page_error",
     "servability": "disapproved",
     "resolution": "merchant_action",
     "attributeName": "link",
     "description": "Unavailable desktop landing page",
     "detail": "Update your website or landing page URL to enable access from desktop devices",
     "documentation": "https://support.google.com/merchants/answer/6098155",
     "numItems": "5"
    },
    {
     "code": "missing_condition_microdata",
     "servability": "unaffected",
     "resolution": "merchant_action",
     "description": "Missing or invalid data [condition]",
     "detail": "Add valid structured data markup to your landing page",
     "documentation": "https://support.google.com/merchants/answer/6183460",
     "numItems": "5"
    },
    {
     "code": "mobile_landing_page_error",
     "servability": "disapproved",
     "resolution": "merchant_action",
     "attributeName": "link",
     "description": "Unavailable mobile landing page",
     "detail": "Update your website or landing page URL to enable access from mobile devices",
     "documentation": "https://support.google.com/merchants/answer/6098296",
     "numItems": "3"
    }
   ]
  }
 ]
}

accountstatuses.list

يمكنك استخدام accountstatuses.list لعرض معلومات حالة الحساب على جميع الحسابات الفرعية في حسابك المتعدّد العملاء.

يمكنك استخدام الفلاتر مع accountstatuses.list لفلترة مشاكل المنتجات حسب الوجهة. عندما لا يتم تحديد وجهة، تتضمّن الاستجابة حالات destination: Shopping.

في ما يلي نموذج طلب للحصول على معلومات حالة الحساب لجميع الحسابات الفرعية ضمن الحساب المتعدّد العملاء merchantId:

GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/accountstatuses

في ما يلي نموذج للردّ:

{
 "kind": "content#accountstatusesListResponse",
 "resources": [
  {
   "kind": "content#accountStatus",
   "accountId": "1234567",
   "websiteClaimed": true,
   "accountLevelIssues": [
    {
     "id": "editorial_and_professional_standards_destination_url_down_policy",
     "title": "Account suspended due to policy violation: landing page not working",
     "country": "US",
     "severity": "critical",
     "documentation": "https://support.google.com/merchants/answer/6150244#wycd-usefulness"
    },
    {
     "id": "missing_ad_words_link",
     "title": "No Google Ads account linked",
     "severity": "error",
     "documentation": "https://support.google.com/merchants/answer/6159060"
    }
   ],
   "products": [
    {
     "channel": "online",
     "destination": "Shopping",
     "country": "US",
     "statistics": {
      "active": "0",
      "pending": "0",
      "disapproved": "0",
      "expiring": "0"
     }
    }
   ]
  },
  {
   "kind": "content#accountStatus",
   "accountId": "123456789",
   "websiteClaimed": true,
   "accountLevelIssues": [
    {
     "id": "home_page_issue",
     "title": "Website URL not provided",
     "severity": "critical",
     "documentation": "https://support.google.com/merchants/answer/176793"
    },
    {
     "id": "missing_ad_words_link",
     "title": "No Google Ads account linked",
     "severity": "error",
     "documentation": "https://support.google.com/merchants/answer/6159060"
    }
   ],
   "products": [
    {
     "channel": "online",
     "destination": "Shopping",
     "country": "US",
     "statistics": {
      "active": "0",
      "pending": "0",
      "disapproved": "0",
      "expiring": "0"
     }
    }
   ]
  }
 ]
}

يؤدي طلب موجّه إلى accountstatuses.list لحساب غير تابع لحساب متعدّد العملاء (على سبيل المثال، حساب مستقل على Merchant Center) إلى عرض الخطأ 403.

في ما يلي نموذج ردّ عند طلب accountstatuses.list لحساب مستقل:

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "forbidden",
    "message": "111111111 is not a multi-client account (MCA). The only account
                service operations allowed on non-MCAs are 'get', 'update',
                'authinfo' and 'claimwebsite'."
   }
  ],
  "code": 403,
  "message": "111111111 is not a multi-client account (MCA). The only account
              service operations allowed on non-MCAs are 'get', 'update',
              'authinfo' and 'claimwebsite'."
 }
}

وضع الدُفعات

تعرض الطريقة accountstatuses.custombatch التي تتضمّن GET معلومات حالة الحساب لعدة حسابات فرعية في حساب متعدّد العملاء.

يتضمّن ملف JSON الخاص بالطلب merchantId لرقم حساب "الحساب المتعدّد العملاء" وaccountId للحساب الفرعي وbatchId فريدًا وmethod تم ضبطه على get.

POST https://shoppingcontent.googleapis.com/content/v2.1/accountstatuses/batch

في ما يلي نموذج لنص طلب JSON:

{
  "entries": [
    {
      "accountId": 1212121212,
      "merchantId": 4444444444,
      "method": "get",
      "batchId": 9
    },
    {
      "accountId": 1313131313,
      "merchantId": 4444444444,
      "method": "get",
      "batchId": 99
    }
  ]
}

في ما يلي نموذج لنص استجابة JSON:

{
 "kind": "content#accountstatusesCustomBatchResponse",
 "entries": [
  {
   "batchId": 9,
   "accountStatus": {
    "kind": "content#accountStatus",
    "accountId": "1212121212",
    "websiteClaimed": true,
    "accountLevelIssues": [
     {
      "id": "home_page_issue",
      "title": "Website URL not provided",
      "severity": "critical",
      "documentation": "https://support.google.com/merchants/answer/176793"
     },
     {
      "id": "missing_ad_words_link",
      "title": "No Google Ads account linked",
      "severity": "error",
      "documentation": "https://support.google.com/merchants/answer/6159060"
     }
    ],
    "products": [
     {
      "channel": "online",
      "destination": "Shopping",
      "country": "US",
      "statistics": {
       "active": "0",
       "pending": "0",
       "disapproved": "0",
       "expiring": "0"
      }
     }
    ]
   }
  },
  {
   "batchId": 99,
   "accountStatus": {
    "kind": "content#accountStatus",
    "accountId": "1313131313",
    "websiteClaimed": true,
    "accountLevelIssues": [
     {
      "id": "editorial_and_professional_standards_destination_url_down_policy",
      "title": "Account suspended due to policy violation: landing page not working",
      "country": "US",
      "severity": "critical",
      "documentation": "https://support.google.com/merchants/answer/6150244#wycd-usefulness"
     },
     {
      "id": "missing_ad_words_link",
      "title": "No Google Ads account linked",
      "severity": "error",
      "documentation": "https://support.google.com/merchants/answer/6159060"
     }
    ],
    "products": [
     {
      "channel": "online",
      "destination": "Shopping",
      "country": "US",
      "statistics": {
       "active": "0",
       "pending": "0",
       "disapproved": "0",
       "expiring": "0"
      }
     }
    ]
   }
  }
 ]
}

اختبار مورد "حالات الحساب"

في المثال التالي، نحصل على قائمة بحالات حسابات custombatch.get في حسابات العملاء المتعددة (MCA):

  1. يمكنك الحصول على حالة الحساب الفرعي لحساب متعدّد العملاء باستخدام accountstatuses.get.

    1. يمكنك الحصول على merchantId وaccountId من خلال تنفيذ GET إلى نقطة نهاية واجهة برمجة التطبيقات:

      GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/accountstatuses/accountId
      
    2. من المفترض أن تتلقّى رمز حالة HTTP 200 يشير إلى النجاح وقائمة بحالات الحسابات بتنسيق JSON.

  2. يمكنك الاطّلاع على حالة جميع الحسابات الفرعية لحساب متعدّد العملاء باستخدام accountstatuses.list.

    1. نفِّذ طلب GET إلى نقطة نهاية واجهة برمجة التطبيقات باستخدام merchantId:

      GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/accountstatuses
      
    2. من المفترض أن تتلقّى رمز حالة HTTP 200 للإشارة إلى النجاح وقائمة بحالات الحسابات بتنسيق JSON للرقم merchantId الذي تم إرساله.

  3. عرض حسابات فرعية متعدّدة لحساب متعدّد العملاء في وضع الدُفعات باستخدام accountstatuses.custombatch

    1. أنشئ JSON صالحًا باستخدام accountID وmerchant ID وطريقة get.

    2. إرسال طلب POST إلى نقطة نهاية واجهة برمجة التطبيقات:

      POST https://shoppingcontent.googleapis.com/content/v2.1/accountstatuses/batch
      
    3. من المفترض أن تتلقّى رمز حالة HTTP 200 يشير إلى النجاح وقائمة بحالات الحسابات بتنسيق JSON.