حالات المنتجات

يمكنك استخدام مورد Product لعرض الحالة التفصيلية لمنتجات Shopping.

باستخدام Content API، يمكنك الاطّلاع على حالة المنتج من خلال استدعاء طريقة ProductStatuses.get. باستخدام Merchant API، يمكنك استرداد حالة المنتج من خلال استرداد مورد Accounts.Products.

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

المتطلّبات

للاطّلاع على حالات المنتجات، عليك اتّباع الخطوات التالية:

  • سجِّل حسابك في وجهة معيّنة.
  • يُرجى تقديم رمز بلد صالح في أحد البلدان التالية:
    • الحقل "feedLabel".
    • الحقل "shipping".
    • على مستوى الخلاصة:
    • إعدادات الشحن في حسابك

الاطّلاع على حالة المنتج

يمكنك استرداد مورد Accounts.Products لعرض حالة منتج.

إليك نموذج لطلب "GET":

GET https://merchantapi.googleapis.com/products/v1beta/{name=accounts/*/products/*}

تشتمل جميع الردود من products.get على الحقول التالية:

  • creationDate: تاريخ إنشاء المنتج
  • lastUpdateDate: تشير هذه السمة إلى آخر مرة تم فيها تعديل المنتج.
  • googleExpirationDate: تاريخ انتهاء صلاحية المنتج
  • destinationStatuses: الوجهات المقصودة للمنتج
  • itemLevelIssues: قائمة بكل المشاكل المرتبطة بالمنتج

لن يظهر لك الحقل itemLevelIssues في الردّ إلا إذا كان المنتج يتضمّن مشاكل على مستوى السلعة في وقت طلبك.

إليك نموذج استجابة JSON:

{
"name": "accounts/123/products/online~en~US~1",
"channel": "ONLINE",
"offerId": "1",
"contentLanguage": "en",
"feedLabel": "US",
"dataSource": "accounts/123/dataSources/456",
"attributes": {
  "title": "Color Headphones",
  "description": "A light and elegant design and super sound quality make these over-ear headphones a constant companion. Foldable to save space, and printed with the white Google logo on one earpiece.",
  "imageLink": "http://tmp53317.purecake.com/images/headphones.jpg",
  "availability": "in stock",
  "brand": "Google",
  "condition": "new",
  "googleProductCategory": "Electronics \u003e Audio \u003e Audio Components \u003e Headphones",
  "gtin": "00050644632143",
  "mpn": "90000007101",
  "price": {
    "amountMicros": "288000",
    "currencyCode": "USD"
  }
},
"productStatus": {
  "destinationStatuses": [
    {
      "reportingContext": "FREE_LISTINGS",
      "disapprovedCountries": [
        "US"
      ]
    }
  ],
  "itemLevelIssues": [
    {
      "code": "pending_phone_verification",
      "severity": "NOT_IMPACTED",
      "resolution": "merchant_action",
      "reportingContext": "FREE_LISTINGS",
      "description": "Unverified phone number",
      "detail": "Go to the Business information page to verify your business phone number",
      "documentation": "https://support.google.com/merchants/answer/10139041",
      "applicableCountries": [
        "US"
      ]
    },
    {
      "code": "pending_initial_policy_review_free_listings",
      "severity": "DISAPPROVED",
      "resolution": "pending_processing",
      "reportingContext": "FREE_LISTINGS",
      "description": "Pending initial review",
      "detail": "Please wait up to 3 business days for the review to be completed",
      "documentation": "https://support.google.com/merchants/answer/2948694",
      "applicableCountries": [
        "US"
      ]
    },
    {
      "code": "url_does_not_match_homepage",
      "severity": "DISAPPROVED",
      "resolution": "merchant_action",
      "attribute": "link",
      "reportingContext": "FREE_LISTINGS",
      "description": "Mismatched domains [link]",
      "detail": "Use the same domain for product landing page URLs as in your Merchant Center website setting",
      "documentation": "https://support.google.com/merchants/answer/160050",
      "applicableCountries": [
        "US"
      ]
    }
  ],
  "creationDate": "2024-05-27T16:15:31.791730Z",
  "lastUpdateDate": "2024-05-27T16:15:31.791730Z",
  "googleExpirationDate": "2024-06-26T16:15:31.791730Z"
}

إدراج جميع حالات المنتجات

يمكنك استخدام products.list للاطّلاع على جميع منتجاتك وحالاتها.

يمكنك استخدام المَعلمات التالية لتحسين طلب البحث:

  • pageToken: يُستخدَم للحصول على الصفحات اللاحقة من النتائج. تحتوي كل صفحة على nextPageToken يمكنك استخدامه للحصول على الصفحة التالية في التسلسل.
  • maxResults: الحد الأقصى لعدد النتائج في كل صفحة

في ما يلي نموذج لطلب list مع مَعلمات طلب بحث اختيارية:

GET https://merchantapi.googleapis.com/products/v1beta/{parent}/products?maxResults=1&pageToken=5108b52782905aa9

إليك نموذج استجابة JSON:

{
"nextPageToken": "632fd090c95712c6",
"products": [
 {
  "name": "accounts/123/products/online~en~US~1",
  "channel": "ONLINE",
  "offerId": "1",
  "contentLanguage": "en",
  "feedLabel": "US",
  "dataSource": "accounts/123/dataSources/10355371287",
  "attributes": {
    "title": "Color Headphones",
    "description": "A light and elegant design and super sound quality make these over-ear headphones a constant companion. Foldable to save space, and printed with the white Google logo on one earpiece.",
    "imageLink": "http://tmp53317.purecake.com/images/headphones.jpg",
    "availability": "in stock",
    "brand": "Google",
    "condition": "new",
    "googleProductCategory": "Electronics \u003e Audio \u003e Audio Components \u003e Headphones",
    "gtin": "00050644632143",
    "mpn": "90000007101",
    "price": {
      "amountMicros": "28800000",
      "currencyCode": "USD"
    }
  },
  "productStatus": {
    "destinationStatuses": [
      {
        "reportingContext": "FREE_LISTINGS",
        "disapprovedCountries": [
          "US"
        ]
      }
    ],
    "itemLevelIssues": [
      {
        "code": "pending_phone_verification",
        "severity": "NOT_IMPACTED",
        "resolution": "merchant_action",
        "reportingContext": "FREE_LISTINGS",
        "description": "Unverified phone number",
        "detail": "Go to the Business information page to verify your business phone number",
        "documentation": "https://support.google.com/merchants/answer/10139041",
        "applicableCountries": [
          "US"
        ]
      },
      {
        "code": "pending_initial_policy_review_free_listings",
        "severity": "DISAPPROVED",
        "resolution": "pending_processing",
        "reportingContext": "FREE_LISTINGS",
        "description": "Pending initial review",
        "detail": "Please wait up to 3 business days for the review to be completed",
        "documentation": "https://support.google.com/merchants/answer/2948694",
        "applicableCountries": [
          "US"
        ]
      },
      {
        "code": "url_does_not_match_homepage",
        "severity": "DISAPPROVED",
        "resolution": "merchant_action",
        "attribute": "link",
        "reportingContext": "FREE_LISTINGS",
        "description": "Mismatched domains [link]",
        "detail": "Use the same domain for product landing page URLs as in your Merchant Center website setting",
        "documentation": "https://support.google.com/merchants/answer/160050",
        "applicableCountries": [
          "US"
        ]
      }
    ],
    "creationDate": "2024-05-27T16:15:31.791730Z",
    "lastUpdateDate": "2024-05-27T16:15:31.791730Z",
    "googleExpirationDate": "2024-06-26T16:15:31.791730Z"
  }
]
}

المكالمة productstatuses.list آمنة للاستخدام التجريبي في مرحلة الإنتاج لأنّها لا تؤدي إلى إجراء أي تغييرات على بياناتك.

المشاكل على مستوى السلع

تتضمّن كل مشكلة على مستوى السلع الحقول التالية:

  • code: رمز الخطأ للمشكلة
  • severity: درجة خطورة المشكلة
  • resolution: تشير إلى ما إذا كان بإمكان التاجر حلّ المشكلة.
  • attribute: اسم السمة المتأثرة
  • reportingContext: سياق الإبلاغ عن المشكلة التي تنطبق عليه المشكلة
  • description: وصف المشكلة
  • detail: يقدّم هذا القسم المزيد من المعلومات عن المشكلة.
  • documentation: عنوان URL للمستند المتعلّق بالمشكلة
  • applicableCountries: يشير إلى البلدان التي تؤثر فيها المشكلة في المنتج.