Content API for Shopping . 1 . returnpolicy

Instance Methods

custombatch(body=None)

Batches multiple return policy related calls in a single request.

delete(merchantId=*, returnPolicyId=*)

Deletes a return policy for the given Merchant Center account.

get(merchantId=*, returnPolicyId=*)

Gets a return policy of the Merchant Center account.

insert(merchantId=*, body=None)

Inserts a return policy for the Merchant Center account.

list(merchantId=*)

Lists the return policies of the Merchant Center account.

Method Details

custombatch(body=None)
Batches multiple return policy related calls in a single request.

Args:
  body: object, The request body.
    The object takes the form of:

{
    "entries": [ # The request entries to be processed in the batch.
      {
        "batchId": 42, # An entry ID, unique within the batch request.
        "returnPolicyId": "A String", # The return policy ID. Set this only if the method is delete or get.
        "returnPolicy": { # Return policy resource. # The return policy to submit. Set this only if the method is insert.
            "nonFreeReturnReasons": [ # Return reasons that will incur return fees.
              "A String",
            ],
            "kind": "content#returnPolicy", # Identifies what kind of resource this is. Value: the fixed string "content#returnPolicy".
            "name": "A String", # The name of the policy as shown in Merchant Center.
            "country": "A String", # The country of sale where the return policy is applicable.
            "seasonalOverrides": [ # An optional list of seasonal overrides.
              {
                "policy": { # The policy which is in effect during that time.
                  "lastReturnDate": "A String", # Last day for returning the items. In ISO 8601 format. When specifying the return window like this, set the policy type to "lastReturnDate". Use this for seasonal overrides only.
                  "numberOfDays": "A String", # The number of days items can be returned after delivery, where one day is defined to be 24 hours after the delivery timestamp. When specifying the return window like this, set the policy type to "numberOfDaysAfterDelivery". Acceptable values are 30, 45, 60, 90, 100, 180, 270 and 365 for the default policy. Additional policies further allow 14, 15, 21 and 28 days, but note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics. A policy of less than 30 days can only be applied to those items.
                  "type": "A String", # Policy type. Use "lastReturnDate" for seasonal overrides only. Note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics or non-returnable items such as food, perishables, and living things. A policy of less than 30 days can only be applied to those items.
                },
                "startDate": "A String", # First day on which the override applies. In ISO 8601 format.
                "endDate": "A String", # Last day on which the override applies. In ISO 8601 format.
                "name": "A String", # The name of the seasonal override as shown in Merchant Center.
              },
            ],
            "label": "A String", # The user-defined label of the return policy. For the default policy, use the label "default".
            "policy": { # The policy.
              "lastReturnDate": "A String", # Last day for returning the items. In ISO 8601 format. When specifying the return window like this, set the policy type to "lastReturnDate". Use this for seasonal overrides only.
              "numberOfDays": "A String", # The number of days items can be returned after delivery, where one day is defined to be 24 hours after the delivery timestamp. When specifying the return window like this, set the policy type to "numberOfDaysAfterDelivery". Acceptable values are 30, 45, 60, 90, 100, 180, 270 and 365 for the default policy. Additional policies further allow 14, 15, 21 and 28 days, but note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics. A policy of less than 30 days can only be applied to those items.
              "type": "A String", # Policy type. Use "lastReturnDate" for seasonal overrides only. Note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics or non-returnable items such as food, perishables, and living things. A policy of less than 30 days can only be applied to those items.
            },
            "returnPolicyId": "A String", # Return policy ID generated by Google.
          },
        "merchantId": "A String", # The Merchant Center account ID.
        "method": "A String",
      },
    ],
  }


Returns:
  An object of the form:

    {
    "kind": "content#returnpolicyCustomBatchResponse", # Identifies what kind of resource this is. Value: the fixed string "content#returnpolicyCustomBatchResponse".
    "entries": [ # The result of the execution of the batch requests.
      {
        "batchId": 42, # The ID of the request entry to which this entry responds.
        "kind": "content#returnpolicyCustomBatchResponseEntry", # Identifies what kind of resource this is. Value: the fixed string "content#returnpolicyCustomBatchResponseEntry".
        "errors": { # A list of errors returned by a failed batch entry. # A list of errors defined if, and only if, the request failed.
          "message": "A String", # The message of the first error in errors.
          "code": 42, # The HTTP status of the first error in errors.
          "errors": [ # A list of errors.
            { # An error returned by the API.
              "reason": "A String", # The error code.
              "domain": "A String", # The domain of the error.
              "message": "A String", # A description of the error.
            },
          ],
        },
        "returnPolicy": { # Return policy resource. # The retrieved return policy.
            "nonFreeReturnReasons": [ # Return reasons that will incur return fees.
              "A String",
            ],
            "kind": "content#returnPolicy", # Identifies what kind of resource this is. Value: the fixed string "content#returnPolicy".
            "name": "A String", # The name of the policy as shown in Merchant Center.
            "country": "A String", # The country of sale where the return policy is applicable.
            "seasonalOverrides": [ # An optional list of seasonal overrides.
              {
                "policy": { # The policy which is in effect during that time.
                  "lastReturnDate": "A String", # Last day for returning the items. In ISO 8601 format. When specifying the return window like this, set the policy type to "lastReturnDate". Use this for seasonal overrides only.
                  "numberOfDays": "A String", # The number of days items can be returned after delivery, where one day is defined to be 24 hours after the delivery timestamp. When specifying the return window like this, set the policy type to "numberOfDaysAfterDelivery". Acceptable values are 30, 45, 60, 90, 100, 180, 270 and 365 for the default policy. Additional policies further allow 14, 15, 21 and 28 days, but note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics. A policy of less than 30 days can only be applied to those items.
                  "type": "A String", # Policy type. Use "lastReturnDate" for seasonal overrides only. Note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics or non-returnable items such as food, perishables, and living things. A policy of less than 30 days can only be applied to those items.
                },
                "startDate": "A String", # First day on which the override applies. In ISO 8601 format.
                "endDate": "A String", # Last day on which the override applies. In ISO 8601 format.
                "name": "A String", # The name of the seasonal override as shown in Merchant Center.
              },
            ],
            "label": "A String", # The user-defined label of the return policy. For the default policy, use the label "default".
            "policy": { # The policy.
              "lastReturnDate": "A String", # Last day for returning the items. In ISO 8601 format. When specifying the return window like this, set the policy type to "lastReturnDate". Use this for seasonal overrides only.
              "numberOfDays": "A String", # The number of days items can be returned after delivery, where one day is defined to be 24 hours after the delivery timestamp. When specifying the return window like this, set the policy type to "numberOfDaysAfterDelivery". Acceptable values are 30, 45, 60, 90, 100, 180, 270 and 365 for the default policy. Additional policies further allow 14, 15, 21 and 28 days, but note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics. A policy of less than 30 days can only be applied to those items.
              "type": "A String", # Policy type. Use "lastReturnDate" for seasonal overrides only. Note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics or non-returnable items such as food, perishables, and living things. A policy of less than 30 days can only be applied to those items.
            },
            "returnPolicyId": "A String", # Return policy ID generated by Google.
          },
      },
    ],
  }
delete(merchantId=*, returnPolicyId=*)
Deletes a return policy for the given Merchant Center account.

Args:
  merchantId: string, The Merchant Center account from which to delete the given return policy. (required)
  returnPolicyId: string, Return policy ID generated by Google. (required)
get(merchantId=*, returnPolicyId=*)
Gets a return policy of the Merchant Center account.

Args:
  merchantId: string, The Merchant Center account to get a return policy for. (required)
  returnPolicyId: string, Return policy ID generated by Google. (required)

Returns:
  An object of the form:

    { # Return policy resource.
      "nonFreeReturnReasons": [ # Return reasons that will incur return fees.
        "A String",
      ],
      "kind": "content#returnPolicy", # Identifies what kind of resource this is. Value: the fixed string "content#returnPolicy".
      "name": "A String", # The name of the policy as shown in Merchant Center.
      "country": "A String", # The country of sale where the return policy is applicable.
      "seasonalOverrides": [ # An optional list of seasonal overrides.
        {
          "policy": { # The policy which is in effect during that time.
            "lastReturnDate": "A String", # Last day for returning the items. In ISO 8601 format. When specifying the return window like this, set the policy type to "lastReturnDate". Use this for seasonal overrides only.
            "numberOfDays": "A String", # The number of days items can be returned after delivery, where one day is defined to be 24 hours after the delivery timestamp. When specifying the return window like this, set the policy type to "numberOfDaysAfterDelivery". Acceptable values are 30, 45, 60, 90, 100, 180, 270 and 365 for the default policy. Additional policies further allow 14, 15, 21 and 28 days, but note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics. A policy of less than 30 days can only be applied to those items.
            "type": "A String", # Policy type. Use "lastReturnDate" for seasonal overrides only. Note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics or non-returnable items such as food, perishables, and living things. A policy of less than 30 days can only be applied to those items.
          },
          "startDate": "A String", # First day on which the override applies. In ISO 8601 format.
          "endDate": "A String", # Last day on which the override applies. In ISO 8601 format.
          "name": "A String", # The name of the seasonal override as shown in Merchant Center.
        },
      ],
      "label": "A String", # The user-defined label of the return policy. For the default policy, use the label "default".
      "policy": { # The policy.
        "lastReturnDate": "A String", # Last day for returning the items. In ISO 8601 format. When specifying the return window like this, set the policy type to "lastReturnDate". Use this for seasonal overrides only.
        "numberOfDays": "A String", # The number of days items can be returned after delivery, where one day is defined to be 24 hours after the delivery timestamp. When specifying the return window like this, set the policy type to "numberOfDaysAfterDelivery". Acceptable values are 30, 45, 60, 90, 100, 180, 270 and 365 for the default policy. Additional policies further allow 14, 15, 21 and 28 days, but note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics. A policy of less than 30 days can only be applied to those items.
        "type": "A String", # Policy type. Use "lastReturnDate" for seasonal overrides only. Note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics or non-returnable items such as food, perishables, and living things. A policy of less than 30 days can only be applied to those items.
      },
      "returnPolicyId": "A String", # Return policy ID generated by Google.
    }
insert(merchantId=*, body=None)
Inserts a return policy for the Merchant Center account.

Args:
  merchantId: string, The Merchant Center account to insert a return policy for. (required)
  body: object, The request body.
    The object takes the form of:

{ # Return policy resource.
    "nonFreeReturnReasons": [ # Return reasons that will incur return fees.
      "A String",
    ],
    "kind": "content#returnPolicy", # Identifies what kind of resource this is. Value: the fixed string "content#returnPolicy".
    "name": "A String", # The name of the policy as shown in Merchant Center.
    "country": "A String", # The country of sale where the return policy is applicable.
    "seasonalOverrides": [ # An optional list of seasonal overrides.
      {
        "policy": { # The policy which is in effect during that time.
          "lastReturnDate": "A String", # Last day for returning the items. In ISO 8601 format. When specifying the return window like this, set the policy type to "lastReturnDate". Use this for seasonal overrides only.
          "numberOfDays": "A String", # The number of days items can be returned after delivery, where one day is defined to be 24 hours after the delivery timestamp. When specifying the return window like this, set the policy type to "numberOfDaysAfterDelivery". Acceptable values are 30, 45, 60, 90, 100, 180, 270 and 365 for the default policy. Additional policies further allow 14, 15, 21 and 28 days, but note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics. A policy of less than 30 days can only be applied to those items.
          "type": "A String", # Policy type. Use "lastReturnDate" for seasonal overrides only. Note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics or non-returnable items such as food, perishables, and living things. A policy of less than 30 days can only be applied to those items.
        },
        "startDate": "A String", # First day on which the override applies. In ISO 8601 format.
        "endDate": "A String", # Last day on which the override applies. In ISO 8601 format.
        "name": "A String", # The name of the seasonal override as shown in Merchant Center.
      },
    ],
    "label": "A String", # The user-defined label of the return policy. For the default policy, use the label "default".
    "policy": { # The policy.
      "lastReturnDate": "A String", # Last day for returning the items. In ISO 8601 format. When specifying the return window like this, set the policy type to "lastReturnDate". Use this for seasonal overrides only.
      "numberOfDays": "A String", # The number of days items can be returned after delivery, where one day is defined to be 24 hours after the delivery timestamp. When specifying the return window like this, set the policy type to "numberOfDaysAfterDelivery". Acceptable values are 30, 45, 60, 90, 100, 180, 270 and 365 for the default policy. Additional policies further allow 14, 15, 21 and 28 days, but note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics. A policy of less than 30 days can only be applied to those items.
      "type": "A String", # Policy type. Use "lastReturnDate" for seasonal overrides only. Note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics or non-returnable items such as food, perishables, and living things. A policy of less than 30 days can only be applied to those items.
    },
    "returnPolicyId": "A String", # Return policy ID generated by Google.
  }


Returns:
  An object of the form:

    { # Return policy resource.
      "nonFreeReturnReasons": [ # Return reasons that will incur return fees.
        "A String",
      ],
      "kind": "content#returnPolicy", # Identifies what kind of resource this is. Value: the fixed string "content#returnPolicy".
      "name": "A String", # The name of the policy as shown in Merchant Center.
      "country": "A String", # The country of sale where the return policy is applicable.
      "seasonalOverrides": [ # An optional list of seasonal overrides.
        {
          "policy": { # The policy which is in effect during that time.
            "lastReturnDate": "A String", # Last day for returning the items. In ISO 8601 format. When specifying the return window like this, set the policy type to "lastReturnDate". Use this for seasonal overrides only.
            "numberOfDays": "A String", # The number of days items can be returned after delivery, where one day is defined to be 24 hours after the delivery timestamp. When specifying the return window like this, set the policy type to "numberOfDaysAfterDelivery". Acceptable values are 30, 45, 60, 90, 100, 180, 270 and 365 for the default policy. Additional policies further allow 14, 15, 21 and 28 days, but note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics. A policy of less than 30 days can only be applied to those items.
            "type": "A String", # Policy type. Use "lastReturnDate" for seasonal overrides only. Note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics or non-returnable items such as food, perishables, and living things. A policy of less than 30 days can only be applied to those items.
          },
          "startDate": "A String", # First day on which the override applies. In ISO 8601 format.
          "endDate": "A String", # Last day on which the override applies. In ISO 8601 format.
          "name": "A String", # The name of the seasonal override as shown in Merchant Center.
        },
      ],
      "label": "A String", # The user-defined label of the return policy. For the default policy, use the label "default".
      "policy": { # The policy.
        "lastReturnDate": "A String", # Last day for returning the items. In ISO 8601 format. When specifying the return window like this, set the policy type to "lastReturnDate". Use this for seasonal overrides only.
        "numberOfDays": "A String", # The number of days items can be returned after delivery, where one day is defined to be 24 hours after the delivery timestamp. When specifying the return window like this, set the policy type to "numberOfDaysAfterDelivery". Acceptable values are 30, 45, 60, 90, 100, 180, 270 and 365 for the default policy. Additional policies further allow 14, 15, 21 and 28 days, but note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics. A policy of less than 30 days can only be applied to those items.
        "type": "A String", # Policy type. Use "lastReturnDate" for seasonal overrides only. Note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics or non-returnable items such as food, perishables, and living things. A policy of less than 30 days can only be applied to those items.
      },
      "returnPolicyId": "A String", # Return policy ID generated by Google.
    }
list(merchantId=*)
Lists the return policies of the Merchant Center account.

Args:
  merchantId: string, The Merchant Center account to list return policies for. (required)

Returns:
  An object of the form:

    {
    "kind": "content#returnpolicyListResponse", # Identifies what kind of resource this is. Value: the fixed string "content#returnpolicyListResponse".
    "resources": [
      { # Return policy resource.
          "nonFreeReturnReasons": [ # Return reasons that will incur return fees.
            "A String",
          ],
          "kind": "content#returnPolicy", # Identifies what kind of resource this is. Value: the fixed string "content#returnPolicy".
          "name": "A String", # The name of the policy as shown in Merchant Center.
          "country": "A String", # The country of sale where the return policy is applicable.
          "seasonalOverrides": [ # An optional list of seasonal overrides.
            {
              "policy": { # The policy which is in effect during that time.
                "lastReturnDate": "A String", # Last day for returning the items. In ISO 8601 format. When specifying the return window like this, set the policy type to "lastReturnDate". Use this for seasonal overrides only.
                "numberOfDays": "A String", # The number of days items can be returned after delivery, where one day is defined to be 24 hours after the delivery timestamp. When specifying the return window like this, set the policy type to "numberOfDaysAfterDelivery". Acceptable values are 30, 45, 60, 90, 100, 180, 270 and 365 for the default policy. Additional policies further allow 14, 15, 21 and 28 days, but note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics. A policy of less than 30 days can only be applied to those items.
                "type": "A String", # Policy type. Use "lastReturnDate" for seasonal overrides only. Note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics or non-returnable items such as food, perishables, and living things. A policy of less than 30 days can only be applied to those items.
              },
              "startDate": "A String", # First day on which the override applies. In ISO 8601 format.
              "endDate": "A String", # Last day on which the override applies. In ISO 8601 format.
              "name": "A String", # The name of the seasonal override as shown in Merchant Center.
            },
          ],
          "label": "A String", # The user-defined label of the return policy. For the default policy, use the label "default".
          "policy": { # The policy.
            "lastReturnDate": "A String", # Last day for returning the items. In ISO 8601 format. When specifying the return window like this, set the policy type to "lastReturnDate". Use this for seasonal overrides only.
            "numberOfDays": "A String", # The number of days items can be returned after delivery, where one day is defined to be 24 hours after the delivery timestamp. When specifying the return window like this, set the policy type to "numberOfDaysAfterDelivery". Acceptable values are 30, 45, 60, 90, 100, 180, 270 and 365 for the default policy. Additional policies further allow 14, 15, 21 and 28 days, but note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics. A policy of less than 30 days can only be applied to those items.
            "type": "A String", # Policy type. Use "lastReturnDate" for seasonal overrides only. Note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics or non-returnable items such as food, perishables, and living things. A policy of less than 30 days can only be applied to those items.
          },
          "returnPolicyId": "A String", # Return policy ID generated by Google.
        },
    ],
  }