حالة الحساب

يمكنك استخدام الـ 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 لحالات حسابات متعدّدة العملاء:

  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.