Si vous diffusez des produits via des annonces Shopping ou des fiches gratuites, vous pouvez utiliser returnpolicyonline
pour créer, afficher, modifier ou supprimer des conditions de retour en ligne à l'aide des attributs suivants :
- Pays cibles
- Frais de remise en stock
- Méthodes de retour
- Conditions de retour des articles
- Catégories de motif de retour
- URL des conditions de retour
Les produits vendus via des annonces Shopping ou des fiches gratuites ne nécessitent pas d'adresse de retour.
Pour en savoir plus, consultez Configurer vos conditions de retour pour les annonces Shopping et les fiches gratuites.
list
Vous pouvez utiliser returnpolicyonline.list
pour lister toutes vos conditions de retour en ligne. Pour consulter des conditions de retour spécifiques d'après leur ID, utilisez la méthode get
.
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/returnpolicyonline
Voici un exemple de réponse :
{
"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
Vous pouvez utiliser returnpolicyonline.get
pour récupérer des conditions de retour spécifiques en fonction de leur returnPolicyId
. Cette méthode renvoie un seul ensemble de conditions de retour. Pour afficher toutes vos conditions de retour à la fois, utilisez la méthode list
.
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/returnpolicyonline/returnPolicyId
Voici un exemple de réponse :
{
"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
Vous pouvez utiliser returnpolicyonline.create
pour ajouter des conditions de retour. La réponse inclut les conditions mises à jour.
POST https://shoppingcontent.googleapis.com/content/v2.1/merchantId/returnpolicyonline
Voici un exemple de requête :
{
"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"
}
Voici un exemple de réponse :
{
"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
Vous pouvez utiliser returnpolicyonline.patch
pour mettre à jour des conditions de retour en ligne en fonction de leur returnPolicyId
.
PATCH https://shoppingcontent.googleapis.com/content/v2.1/merchantId/returnpolicyonline/returnPolicyId
Voici un exemple de requête :
{
"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"
}
Voici un exemple de réponse :
{
"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"
}
delete
Vous pouvez utiliser returnpolicyonline.delete
pour supprimer des conditions de retour en ligne en fonction de leur returnPolicyId
. Cette méthode renvoie un code 200
si la requête aboutit et un code 404
si une erreur se produit.
DELETE https://shoppingcontent.googleapis.com/content/v2.1/merchantId/returnpolicyonline/returnPolicyId
Voici un exemple de requête :
{
"error": {
"code": "404",
"message": "Return policy not found.",
"status": "NOT_FOUND",
"details": [
{
"type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "notFound",
"domain": "global"
}
]
}
}