商品のステータスを取得する

accounts.products リソースを使用すると、ショッピング商品の詳細なステータスを確認できます。

Content API for Shopping を使用して商品を追加している場合は、移行ガイドで Merchant Products API の使用方法をご覧ください。

ショッピング広告無料リスティングのポリシーに準拠する責任は販売者に帰属します。ショッピング広告は、これらのポリシーに違反するコンテンツや行為が見つかった場合、これらのポリシーを適用し、適切に対応する権利を留保します。

要件

商品のステータスを表示するには、次の操作を行う必要があります。

  • アカウントをプログラムに登録します。
  • 次のいずれかの有効な国コードを指定します(指定した国の統合が対象となります)。

商品のステータスを取得する

accounts.products リソースを取得して、商品のステータスを確認します。

GET リクエストの例を次に示します。

GET https://merchantapi.googleapis.com/products/v1beta/accounts/ACCOUNT_ID/products/PRODUCT_ID

products.get からのすべてのレスポンスには、次のフィールドを含む ProductStatus メッセージが含まれます。

  • 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"
}

不承認の商品をすべて取得する

不承認または対象外の商品をすべて取得するには、次の accounts.reports.search リクエストを使用します。

POST https://merchantapi.googleapis.com/reports/v1beta/accounts/{ACCOUNT_ID}/reports:search

{
  "query": "SELECT id,offer_id,feed_label,title FROM product_view WHERE aggregated_reporting_context_status = 'NOT_ELIGIBLE_OR_DISAPPROVED'"
}

Merchant Reports API を使用して商品をフィルタして取得する方法については、商品を評価するをご覧ください。

審査待ちのすべての商品を取得する

審査待ちの商品をすべて取得するには、次のリクエストを使用します。

POST https://merchantapi.googleapis.com/reports/v1beta/accounts/{ACCOUNT_ID}/reports:search

{
  "query": "SELECT id,offer_id,feed_label,title FROM product_view WHERE aggregated_reporting_context_status = 'PENDING'"
}

すべてのプロダクト ステータスを一覧表示する

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: 問題がプロダクトに影響している国を示します。