Stati del prodotto

Puoi utilizzare la risorsa Product per visualizzare lo stato dettagliato dei tuoi prodotti Shopping.

Con l'API Content, puoi recuperare lo stato del prodotto chiamando il metodo ProductStatuses.get. Con l'API Merchant, puoi recuperare lo stato del prodotto recuperando la risorsa Accounts.Products.

Sei responsabile della conformità alle norme relative agli annunci Shopping e alle schede senza costi. Gli annunci Shopping si riservano il diritto di applicare queste norme e di rispondere adeguatamente se rileviamo contenuti o comportamenti che violano queste norme.

Requisiti

Per visualizzare gli stati dei prodotti:

  • Registra il tuo account in una destinazione.
  • Fornisci un codice paese valido in uno dei seguenti documenti:
    • Il campo feedLabel.
    • Il campo shipping.
    • A livello di feed.
    • Le impostazioni di spedizione del tuo account.

Conoscere lo stato di un prodotto

Recupera la risorsa Accounts.Products per visualizzare lo stato di un prodotto.

Ecco un esempio di richiesta GET:

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

Tutte le risposte da products.get includono i seguenti campi:

  • creationDate: la data di creazione del prodotto.
  • lastUpdateDate: l'ultima volta che il prodotto è stato aggiornato.
  • googleExpirationDate: la data di scadenza del prodotto.
  • destinationStatuses: le destinazioni previste per il prodotto.
  • itemLevelIssues: un elenco di tutti i problemi associati al prodotto.

Il campo itemLevelIssues viene visualizzato nella risposta solo se il prodotto presenta problemi a livello di articolo al momento della richiesta.

Ecco un esempio di risposta 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"
}

Elenca tutti gli stati del prodotto

Utilizza products.list per visualizzare tutti i tuoi prodotti e il relativo stato.

Per perfezionare la query, puoi utilizzare i seguenti parametri:

  • pageToken: utilizzato per ricevere pagine di risultati successive. Ogni pagina ha un nextPageToken che puoi utilizzare per ottenere la pagina successiva della sequenza.
  • maxResults: il numero massimo di risultati per pagina.

Ecco un esempio di richiesta list con parametri di ricerca facoltativi:

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

Ecco un esempio di risposta 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"
  }
]
}

La chiamata productstatuses.list può essere testata in sicurezza in produzione perché non apporta modifiche ai dati.

Problemi a livello di articolo

Ogni problema a livello di articolo include i seguenti campi:

  • code: il codice di errore del problema.
  • severity: la gravità del problema.
  • resolution: informa se il commerciante può risolvere il problema.
  • attribute: il nome dell'attributo interessato.
  • reportingContext: il contesto del report a cui si applica il problema.
  • description: la descrizione del problema.
  • detail: fornisce ulteriori informazioni sul problema.
  • documentation: l'URL della documentazione sul problema.
  • applicableCountries: indica i paesi in cui il problema interessa il prodotto.