Content API for Shopping . returnpolicy

Instance Methods

close()

Close httplib2 connections.

custombatch(body=None, x__xgafv=None)

Batches multiple return policy related calls in a single request.

delete(merchantId, returnPolicyId, x__xgafv=None)

Deletes a return policy for the given Merchant Center account.

get(merchantId, returnPolicyId, x__xgafv=None)

Gets a return policy of the Merchant Center account.

insert(merchantId, body=None, x__xgafv=None)

Inserts a return policy for the Merchant Center account.

list(merchantId, x__xgafv=None)

Lists the return policies of the Merchant Center account.

Method Details

close()
Close httplib2 connections.
custombatch(body=None, x__xgafv=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.
        "merchantId": "A String", # The Merchant Center account ID.
        "method": "A String", # Method of the batch request entry. Acceptable values are: - "`delete`" - "`get`" - "`insert`"
        "returnPolicyId": "A String", # The return policy ID. This should be set only if the method is `delete` or `get`.
        "returnPolicy": { # Return policy resource. # The return policy to submit. This should be set only if the method is `insert`.
            "nonFreeReturnReasons": [ # Return reasons that will incur return fees.
              "A String",
            ],
            "seasonalOverrides": [ # An optional list of seasonal overrides.
              {
                "startDate": "A String", # Required. First day on which the override applies. In ISO 8601 format.
                "name": "A String", # Required. The name of the seasonal override as shown in Merchant Center.
                "endDate": "A String", # Required. Last day on which the override applies. In ISO 8601 format.
                "policy": { # Required. The policy which is in effect during that time.
                  "lastReturnDate": "A String", # Required. 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.
                  "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. Acceptable values are: - "`lastReturnDate`" - "`lifetimeReturns`" - "`noReturns`" - "`numberOfDaysAfterDelivery`"
                  "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.
                },
              },
            ],
            "policy": { # Required. The policy.
              "lastReturnDate": "A String", # Required. 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.
              "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. Acceptable values are: - "`lastReturnDate`" - "`lifetimeReturns`" - "`noReturns`" - "`numberOfDaysAfterDelivery`"
              "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.
            },
            "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#returnPolicy`"
            "label": "A String", # Required. The user-defined label of the return policy. For the default policy, use the label "default".
            "name": "A String", # Required. The name of the policy as shown in Merchant Center.
            "country": "A String", # Required. The country of sale where the return policy is applicable.
            "returnPolicyId": "A String", # Return policy ID generated by Google.
          },
      },
    ],
  }

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
    "kind": "A String", # 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.
        "errors": { # A list of errors returned by a failed batch entry. # A list of errors defined if, and only if, the request failed.
          "errors": [ # A list of errors.
            { # An error returned by the API.
              "message": "A String", # A description of the error.
              "domain": "A String", # The domain of the error.
              "reason": "A String", # The error code.
            },
          ],
          "message": "A String", # The message of the first error in `errors`.
          "code": 42, # The HTTP status of the first error in `errors`.
        },
        "returnPolicy": { # Return policy resource. # The retrieved return policy.
            "nonFreeReturnReasons": [ # Return reasons that will incur return fees.
              "A String",
            ],
            "seasonalOverrides": [ # An optional list of seasonal overrides.
              {
                "startDate": "A String", # Required. First day on which the override applies. In ISO 8601 format.
                "name": "A String", # Required. The name of the seasonal override as shown in Merchant Center.
                "endDate": "A String", # Required. Last day on which the override applies. In ISO 8601 format.
                "policy": { # Required. The policy which is in effect during that time.
                  "lastReturnDate": "A String", # Required. 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.
                  "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. Acceptable values are: - "`lastReturnDate`" - "`lifetimeReturns`" - "`noReturns`" - "`numberOfDaysAfterDelivery`"
                  "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.
                },
              },
            ],
            "policy": { # Required. The policy.
              "lastReturnDate": "A String", # Required. 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.
              "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. Acceptable values are: - "`lastReturnDate`" - "`lifetimeReturns`" - "`noReturns`" - "`numberOfDaysAfterDelivery`"
              "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.
            },
            "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#returnPolicy`"
            "label": "A String", # Required. The user-defined label of the return policy. For the default policy, use the label "default".
            "name": "A String", # Required. The name of the policy as shown in Merchant Center.
            "country": "A String", # Required. The country of sale where the return policy is applicable.
            "returnPolicyId": "A String", # Return policy ID generated by Google.
          },
        "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#returnpolicyCustomBatchResponseEntry`"
      },
    ],
  }
delete(merchantId, returnPolicyId, x__xgafv=None)
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)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format
get(merchantId, returnPolicyId, x__xgafv=None)
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)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Return policy resource.
      "nonFreeReturnReasons": [ # Return reasons that will incur return fees.
        "A String",
      ],
      "seasonalOverrides": [ # An optional list of seasonal overrides.
        {
          "startDate": "A String", # Required. First day on which the override applies. In ISO 8601 format.
          "name": "A String", # Required. The name of the seasonal override as shown in Merchant Center.
          "endDate": "A String", # Required. Last day on which the override applies. In ISO 8601 format.
          "policy": { # Required. The policy which is in effect during that time.
            "lastReturnDate": "A String", # Required. 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.
            "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. Acceptable values are: - "`lastReturnDate`" - "`lifetimeReturns`" - "`noReturns`" - "`numberOfDaysAfterDelivery`"
            "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.
          },
        },
      ],
      "policy": { # Required. The policy.
        "lastReturnDate": "A String", # Required. 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.
        "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. Acceptable values are: - "`lastReturnDate`" - "`lifetimeReturns`" - "`noReturns`" - "`numberOfDaysAfterDelivery`"
        "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.
      },
      "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#returnPolicy`"
      "label": "A String", # Required. The user-defined label of the return policy. For the default policy, use the label "default".
      "name": "A String", # Required. The name of the policy as shown in Merchant Center.
      "country": "A String", # Required. The country of sale where the return policy is applicable.
      "returnPolicyId": "A String", # Return policy ID generated by Google.
    }
insert(merchantId, body=None, x__xgafv=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",
    ],
    "seasonalOverrides": [ # An optional list of seasonal overrides.
      {
        "startDate": "A String", # Required. First day on which the override applies. In ISO 8601 format.
        "name": "A String", # Required. The name of the seasonal override as shown in Merchant Center.
        "endDate": "A String", # Required. Last day on which the override applies. In ISO 8601 format.
        "policy": { # Required. The policy which is in effect during that time.
          "lastReturnDate": "A String", # Required. 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.
          "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. Acceptable values are: - "`lastReturnDate`" - "`lifetimeReturns`" - "`noReturns`" - "`numberOfDaysAfterDelivery`"
          "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.
        },
      },
    ],
    "policy": { # Required. The policy.
      "lastReturnDate": "A String", # Required. 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.
      "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. Acceptable values are: - "`lastReturnDate`" - "`lifetimeReturns`" - "`noReturns`" - "`numberOfDaysAfterDelivery`"
      "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.
    },
    "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#returnPolicy`"
    "label": "A String", # Required. The user-defined label of the return policy. For the default policy, use the label "default".
    "name": "A String", # Required. The name of the policy as shown in Merchant Center.
    "country": "A String", # Required. The country of sale where the return policy is applicable.
    "returnPolicyId": "A String", # Return policy ID generated by Google.
  }

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Return policy resource.
      "nonFreeReturnReasons": [ # Return reasons that will incur return fees.
        "A String",
      ],
      "seasonalOverrides": [ # An optional list of seasonal overrides.
        {
          "startDate": "A String", # Required. First day on which the override applies. In ISO 8601 format.
          "name": "A String", # Required. The name of the seasonal override as shown in Merchant Center.
          "endDate": "A String", # Required. Last day on which the override applies. In ISO 8601 format.
          "policy": { # Required. The policy which is in effect during that time.
            "lastReturnDate": "A String", # Required. 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.
            "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. Acceptable values are: - "`lastReturnDate`" - "`lifetimeReturns`" - "`noReturns`" - "`numberOfDaysAfterDelivery`"
            "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.
          },
        },
      ],
      "policy": { # Required. The policy.
        "lastReturnDate": "A String", # Required. 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.
        "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. Acceptable values are: - "`lastReturnDate`" - "`lifetimeReturns`" - "`noReturns`" - "`numberOfDaysAfterDelivery`"
        "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.
      },
      "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#returnPolicy`"
      "label": "A String", # Required. The user-defined label of the return policy. For the default policy, use the label "default".
      "name": "A String", # Required. The name of the policy as shown in Merchant Center.
      "country": "A String", # Required. The country of sale where the return policy is applicable.
      "returnPolicyId": "A String", # Return policy ID generated by Google.
    }
list(merchantId, x__xgafv=None)
Lists the return policies of the Merchant Center account.

Args:
  merchantId: string, The Merchant Center account to list return policies for. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
    "kind": "A String", # 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",
          ],
          "seasonalOverrides": [ # An optional list of seasonal overrides.
            {
              "startDate": "A String", # Required. First day on which the override applies. In ISO 8601 format.
              "name": "A String", # Required. The name of the seasonal override as shown in Merchant Center.
              "endDate": "A String", # Required. Last day on which the override applies. In ISO 8601 format.
              "policy": { # Required. The policy which is in effect during that time.
                "lastReturnDate": "A String", # Required. 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.
                "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. Acceptable values are: - "`lastReturnDate`" - "`lifetimeReturns`" - "`noReturns`" - "`numberOfDaysAfterDelivery`"
                "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.
              },
            },
          ],
          "policy": { # Required. The policy.
            "lastReturnDate": "A String", # Required. 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.
            "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. Acceptable values are: - "`lastReturnDate`" - "`lifetimeReturns`" - "`noReturns`" - "`numberOfDaysAfterDelivery`"
            "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.
          },
          "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#returnPolicy`"
          "label": "A String", # Required. The user-defined label of the return policy. For the default policy, use the label "default".
          "name": "A String", # Required. The name of the policy as shown in Merchant Center.
          "country": "A String", # Required. The country of sale where the return policy is applicable.
          "returnPolicyId": "A String", # Return policy ID generated by Google.
        },
    ],
  }