Ustawienia zwrotów w reklamach produktowych i bezpłatnych informacjach

Jeśli wyświetlasz produkty za pomocą reklam produktowych lub bezpłatnych informacji, za pomocą returnpolicyonline możesz tworzyć, wyświetlać, edytować i usuwać zasady zwrotów online z tymi atrybutami:

Produkty sprzedawane za pomocą reklam produktowych lub bezpłatnych informacji nie wymagają adresu zwrotnego.

Więcej informacji znajdziesz w artykule Konfigurowanie zasad zwrotów dla reklam produktowych i bezpłatnych informacji.

lista

Aby wymienić wszystkie obowiązujące zasady zwrotów online, możesz użyć atrybutu returnpolicyonline.list. Aby wyświetlić konkretne zasady zwrotów według identyfikatora, zobacz get.

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

Przykładowa odpowiedź:

{
 "returnPolicies": [
   {
     "returnPolicyId": "transactions:US:default",
     "label": "default",
     "countries": [
       "GB"
     ],
     "policy": {
       "type": "NUMBER_OF_DAYS_AFTER_DELIVERY",
       "days": "90"
     },
     "restockingFee": {
       "fixedFee": {
         "value": "5.99",
         "currency": "GBP"
       }
     },
     "returnMethods": [
       "IN_STORE",
       "BY_MAIL"
     ],
     "itemConditions": [
       "NEW",
       "USED"
     ],
     "returnReasonCategoryInfo": [
       {
         "returnReasonCategory": "ITEM_DEFECT",
         "returnLabelSource": "DOWNLOAD_AND_PRINT",
         "returnShippingFee": {
           "type": "FIXED",
           "fixedFee": {
             "value": "0.00",
             "currency": "GBP"
           }
         }
       },
       {
         "returnReasonCategory": "BUYER_REMORSE",
         "returnLabelSource": "DOWNLOAD_AND_PRINT",
         "returnShippingFee": {
           "type": "FIXED",
           "fixedFee": {
             "value": "0.00",
             "currency": "GBP"
           }
         }
       }
     ],
     "returnPolicyUri": "https://www.example.com/return-policy"
   },
   {
     "returnPolicyId": "transactions:US:default",
     "label": "default120days",
     "countries": [
       "US",
       "FR"
     ],
     "name": "returnpolicy120days",
     "policy": {
       "type": "NUMBER_OF_DAYS_AFTER_DELIVERY",
       "days": "90"
     },
     "restockingFee": {
       "fixedFee": {
         "value": "0.00",
         "currency": "USD"
       }
     },
     "returnMethods": [
       "BY_MAIL"
     ],
     "itemConditions": [
       "NEW",
       "USED"
     ],
     "returnReasonCategoryInfo": [
       {
         "returnReasonCategory": "ITEM_DEFECT",
         "returnLabelSource": "DOWNLOAD_AND_PRINT",
         "returnShippingFee": {
           "type": "FIXED",
           "fixedFee": {
             "value": "0.00",
             "currency": "USD"
           }
         }
       },
       {
         "returnReasonCategory": "BUYER_REMORSE",
         "returnLabelSource": "DOWNLOAD_AND_PRINT",
         "returnShippingFee": {
           "type": "FIXED",
           "fixedFee": {
             "value": "0.00",
             "currency": "USD"
           }
         }
       }
     ],
     "returnPolicyUri": "https://www.example.com/return-policy"
   }
 ]
}

get

Możesz użyć adresu returnpolicyonline.get, aby uzyskać konkretne zasady zwrotów do returnPolicyId. Ta metoda zwraca pojedyncze zasady zwrotów. Aby wyświetlić wszystkie zasady zwrotów jednocześnie, zobacz list.

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

Przykładowa odpowiedź:

{
  "returnPolicyId": "transactions:US:default",
  "label": "default",
  "countries": [
    "US"
  ],
  "policy": {
    "type": "NUMBER_OF_DAYS_AFTER_DELIVERY",
    "days": "90"
  },
  "restockingFee": {
    "fixedFee": {
      "value": "0.00",
      "currency": "USD"
    }
  },
  "returnMethods": [
    "BY_MAIL"
  ],
  "itemConditions": [
    "NEW",
    "USED"
  ],
  "returnReasonCategoryInfo": [
    {
      "returnReasonCategory": "ITEM_DEFECT",
      "returnLabelSource": "DOWNLOAD_AND_PRINT",
      "returnShippingFee": {
        "type": "FIXED",
        "fixedFee": {
          "value": "0.00",
          "currency": "USD"
        }
      }
    },
    {
      "returnReasonCategory": "BUYER_REMORSE",
      "returnLabelSource": "DOWNLOAD_AND_PRINT",
      "returnShippingFee": {
        "type": "FIXED",
        "fixedFee": {
          "value": "0.00",
          "currency": "USD"
        }
      }
    }
  ],
  "returnPolicyUri": "https://www.example.com/return-policy"
}

create

Za pomocą adresu returnpolicyonline.create możesz dodać nowe zasady zwrotów. Odpowiedź zawiera zaktualizowaną zasadę.

POST https://shoppingcontent.googleapis.com/content/v2.1/merchantId/returnpolicyonline

Oto przykładowe żądanie:

{
  "returnPolicyId": "12345678",
  "label": "default90days",
  "name": "returnpolicy90days",
  "policy": {
    "type": "NUMBER_OF_DAYS_AFTER_DELIVERY",
    "days": "90"
  },
  "countries": [
    "US"
  ],
  "itemConditions": [
    "NEW",
    "USED"
  ],
  "restockingFee": {
    "fixedFee": {
      "currency": "USD",
      "value": "0.00"
    }
  },
  "returnMethods": [
    "BY_MAIL"
  ],
  "returnReasonCategoryInfo": [
    {
      "returnReasonCategory": "ITEM_DEFECT",
      "returnLabelSource": "DOWNLOAD_AND_PRINT",
      "returnShippingFee": {
        "type": "FIXED",
        "fixedFee": {
          "value": "0.00",
          "currency": "USD"
        }
      }
    }
  ],
  "returnPolicyUri": "https://www.example.com/return-policy"
}

Przykładowa odpowiedź:

{
  "returnPolicyId": "12345678",
  "label": "default90days",
  "countries": [
    "US"
  ],
  "name": "returnpolicy90days",
  "policy": {
    "type": "NUMBER_OF_DAYS_AFTER_DELIVERY",
    "days": "90"
  },
  "restockingFee": {
    "fixedFee": {
      "value": "0.00",
      "currency": "USD"
    }
  },
  "returnMethods": [
    "BY_MAIL"
  ],
  "itemConditions": [
    "NEW",
    "USED"
  ],
  "returnReasonCategoryInfo": [
    {
      "returnReasonCategory": "ITEM_DEFECT",
      "returnLabelSource": "DOWNLOAD_AND_PRINT",
      "returnShippingFee": {
        "type": "FIXED",
        "fixedFee": {
          "value": "0.00",
          "currency": "USD"
        }
      }
    }
  ],
  "returnPolicyUri": "https://www.example.com/return-policy"
}

patch

Za pomocą returnpolicyonline.patch możesz zaktualizować dotychczasowe zasady zwrotów online do returnPolicyId.

PATCH https://shoppingcontent.googleapis.com/content/v2.1/merchantId/returnpolicyonline/returnPolicyId

Oto przykładowe żądanie:

{
  "returnPolicyId": "12345678",
  "label": "default90days",
  "countries": [
    "US",
    "FR"
  ],
  "name": "returnpolicy90days",
  "policy": {
    "type": "NUMBER_OF_DAYS_AFTER_DELIVERY",
    "days": "90"
  },
  "restockingFee": {
    "fixedFee": {
      "value": "0.00",
      "currency": "USD"
    }
  },
  "returnMethods": [
    "BY_MAIL"
  ],
  "itemConditions": [
    "NEW",
    "USED"
  ],
  "returnReasonCategoryInfo": [
    {
      "returnReasonCategory": "ITEM_DEFECT",
      "returnLabelSource": "DOWNLOAD_AND_PRINT",
      "returnShippingFee": {
        "type": "FIXED",
        "fixedFee": {
          "value": "0.00",
          "currency": "USD"
        }
      }
    },
    {
      "returnReasonCategory": "BUYER_REMORSE",
      "returnLabelSource": "DOWNLOAD_AND_PRINT",
      "returnShippingFee": {
        "type": "FIXED",
        "fixedFee": {
          "value": "0.00",
          "currency": "USD"
        }
      }
    }
  ],
  "returnPolicyUri": "https://www.example.com/return-policy"
}

Przykładowa odpowiedź:

{
  "returnPolicyId": "12345678",
  "label": "default90days",
  "countries": [
    "US",
    "FR"
  ],
  "name": "returnpolicy90days",
  "policy": {
    "type": "NUMBER_OF_DAYS_AFTER_DELIVERY",
    "days": "90"
  },
  "restockingFee": {
    "fixedFee": {
      "value": "0.00",
      "currency": "USD"
    }
  },
  "returnMethods": [
    "BY_MAIL"
  ],
  "itemConditions": [
    "NEW",
    "USED"
  ],
  "returnReasonCategoryInfo": [
    {
      "returnReasonCategory": "ITEM_DEFECT",
      "returnLabelSource": "DOWNLOAD_AND_PRINT",
      "returnShippingFee": {
        "type": "FIXED",
        "fixedFee": {
          "value": "0.00",
          "currency": "USD"
        }
      }
    },
    {
      "returnReasonCategory": "BUYER_REMORSE",
      "returnLabelSource": "DOWNLOAD_AND_PRINT",
      "returnShippingFee": {
        "type": "FIXED",
        "fixedFee": {
          "value": "0.00",
          "currency": "USD"
        }
      }
    }
  ],
  "returnPolicyUri": "https://www.example.com/return-policy"
}

usuń

Aby usunąć istniejące zasady zwrotów online do returnPolicyId, możesz użyć atrybutu returnpolicyonline.delete. Zwraca ona kod 200, jeśli żądanie zakończy się powodzeniem, i kod 404, jeśli żądanie napotka błąd.

DELETE https://shoppingcontent.googleapis.com/content/v2.1/merchantId/returnpolicyonline/returnPolicyId

Oto przykładowe żądanie:

{
  "error": {
    "code": "404",
    "message": "Return policy not found.",
    "status": "NOT_FOUND",
    "details": [
      {
        "type": "type.googleapis.com/google.rpc.ErrorInfo",
        "reason": "notFound",
        "domain": "global"
      }
    ]
  }
}