Retrieves and updates the shipping settings of multiple accounts in a single request.
Retrieves the shipping settings of the account.
list(merchantId, pageToken=None, maxResults=None)
Lists the shipping settings of the sub-accounts in your Merchant Center account.
list_next(previous_request, previous_response)
Retrieves the next page of results.
patch(merchantId, accountId, body)
Updates the shipping settings of the account. This method supports patch semantics.
update(merchantId, accountId, body)
Updates the shipping settings of the account.
custombatch(body)
Retrieves and updates the shipping settings of multiple accounts in a single request. Args: body: object, The request body. (required) The object takes the form of: { "entries": [ # The request entries to be processed in the batch. { # A batch entry encoding a single non-batch accountshipping request. "batchId": 42, # An entry ID, unique within the batch request. "method": "A String", "accountShipping": { # The shipping settings of a merchant account. # The account shipping settings to update. Only defined if the method is update. "kind": "content#accountShipping", # Identifies what kind of resource this is. Value: the fixed string "content#accountShipping". "carrierRates": [ # Carrier-based shipping calculations. { # A carrier-calculated shipping rate. "shippingOrigin": "A String", # Shipping origin represented as a postal code. "name": "A String", # The name of the carrier rate. "saleCountry": "A String", # Sale country for which this carrier rate is valid, represented as an ISO 3166-1 Alpha-2 code. "modifierPercent": "A String", # Multiplicative shipping rate modifier in percent. Represented as a floating point number without the percentage character. "carrier": "A String", # The carrier that is responsible for the shipping, such as "UPS", "FedEx", or "USPS". "carrierService": "A String", # The carrier service, such as "Ground" or "2Day". "modifierFlatRate": { # Additive shipping rate modifier. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, ], "locationGroups": [ # Location groups for shipping. { # A user-defined locations group in a given country. All the locations of the group must be of the same type. "postalCodeRanges": [ # A postal code range representing a city or a set of cities. { # A postal code range, that can be either: # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, ], "country": "A String", # The country in which this location group is, represented as ISO 3166-1 Alpha-2 code. "locationIds": [ # A location ID (also called criteria ID) representing administrative areas, smaller country subdivisions (counties), or cities. "A String", ], "name": "A String", # The name of the location group. "postalCodes": [ # A postal code representing a city or a set of cities. # - A single postal code (e.g., 12345) # - A postal code prefix followed by a star (e.g., 1234*) "A String", ], }, ], "services": [ # Shipping services describing shipping fees calculation. { # Shipping services provided in a country. "active": True or False, # Whether the shipping service is available. "costRuleTree": { # Building block of the cost calculation decision tree. # Decision tree for "complicated" shipping cost calculation. # - The tree root should have no condition and no calculation method. # - All the children must have a condition on the same dimension. The first child matching a condition is entered, therefore, price and weight conditions form contiguous intervals. # - The last child of an element must have no condition and matches all elements not previously matched. # - Children and calculation method are mutually exclusive, and exactly one of them must be defined; the root must only have children. "calculationMethod": { # Shipping cost calculation method. Exactly one of the field is set. # Final calculation method to be used only in leaf nodes. "percentageRate": "A String", # Percentage of the price, represented as a floating point number without the percentage character. "carrierRate": "A String", # Name of the carrier rate to use for the calculation. "rateTable": "A String", # Name of the rate table to use for the calculation. "excluded": True or False, # Delivery is excluded. Valid only within cost rules tree. "flatRate": { # Fixed price shipping, represented as a floating point number associated with a currency. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, "condition": { # Condition for this rule to be applicable. If no condition is specified, the rule acts as a catch-all. "weightMax": { # Maximum shipping weight. Forms an interval between the maximum of smaller weight (exclusive) and this weight (inclusive). "value": "A String", # The weight represented as a number. "unit": "A String", # The weight unit. }, "deliveryLocationId": "A String", # Delivery location in terms of a location ID. Can be used to represent administrative areas, smaller country subdivisions, or cities. "deliveryPostalCode": "A String", # Delivery location in terms of a postal code. "deliveryPostalCodeRange": { # A postal code range, that can be either: # Delivery location in terms of a postal code range. # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, "priceMax": { # Maximum shipping price. Forms an interval between the maximum of smaller prices (exclusive) and this price (inclusive). "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "shippingLabel": "A String", # Shipping label of the product. The products with the label are matched. "deliveryLocationGroup": "A String", # Delivery location in terms of a location group name. A location group with this name must be specified among location groups. }, "children": [ # Subsequent rules to be applied, only for inner nodes. The last child must not specify a condition and acts as a catch-all. # Object with schema name: AccountShippingShippingServiceCostRule ], }, "saleCountry": "A String", # Sale country for which this service can be used, represented as an ISO 3166-1 Alpha-2 code. "calculationMethod": { # Shipping cost calculation method. Exactly one of the field is set. # Calculation method for the "simple" case that needs no rules. "percentageRate": "A String", # Percentage of the price, represented as a floating point number without the percentage character. "carrierRate": "A String", # Name of the carrier rate to use for the calculation. "rateTable": "A String", # Name of the rate table to use for the calculation. "excluded": True or False, # Delivery is excluded. Valid only within cost rules tree. "flatRate": { # Fixed price shipping, represented as a floating point number associated with a currency. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, "name": "A String", # The name of this shipping service. }, ], "accountId": "A String", # The ID of the account to which these account shipping settings belong. "rateTables": [ # Rate tables definitions. { # A single or bi-dimensional table of shipping rates. Each dimension is defined in terms of consecutive price/weight ranges, delivery locations, or shipping labels. "content": [ # One-dimensional table cells define one condition along the same dimension. Bi-dimensional table cells use two dimensions with respectively M and N distinct values and must contain exactly M * N cells with distinct conditions (for each possible value pairs). { "rate": { # The rate applicable if the cell conditions are matched. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "condition": { # Conditions for which the cell is valid. All cells in a table must use the same dimension or pair of dimensions among price, weight, shipping label or delivery location. If no condition is specified, the cell acts as a catch-all and matches all the elements that are not matched by other cells in this dimension. "weightMax": { # Maximum shipping weight. Forms an interval between the maximum of smaller weight (exclusive) and this weight (inclusive). "value": "A String", # The weight represented as a number. "unit": "A String", # The weight unit. }, "deliveryLocationId": "A String", # Delivery location in terms of a location ID. Can be used to represent administrative areas, smaller country subdivisions, or cities. "deliveryPostalCode": "A String", # Delivery location in terms of a postal code. "deliveryPostalCodeRange": { # A postal code range, that can be either: # Delivery location in terms of a postal code range. # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, "priceMax": { # Maximum shipping price. Forms an interval between the maximum of smaller prices (exclusive) and this price (inclusive). "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "shippingLabel": "A String", # Shipping label of the product. The products with the label are matched. "deliveryLocationGroup": "A String", # Delivery location in terms of a location group name. A location group with this name must be specified among location groups. }, }, ], "saleCountry": "A String", # Sale country for which this table is valid, represented as an ISO 3166-1 Alpha-2 code. "name": "A String", # The name of the rate table. }, ], }, "merchantId": "A String", # The ID of the managing account. "accountId": "A String", # The ID of the account for which to get/update account shipping settings. }, ], } Returns: An object of the form: { "kind": "content#accountshippingCustomBatchResponse", # Identifies what kind of resource this is. Value: the fixed string "content#accountshippingCustomBatchResponse". "entries": [ # The result of the execution of the batch requests. { # A batch entry encoding a single non-batch accountshipping response. "batchId": 42, # The ID of the request entry this entry responds to. "kind": "content#accountshippingCustomBatchResponseEntry", # Identifies what kind of resource this is. Value: the fixed string "content#accountshippingCustomBatchResponseEntry". "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. }, ], }, "accountShipping": { # The shipping settings of a merchant account. # The retrieved or updated account shipping settings. "kind": "content#accountShipping", # Identifies what kind of resource this is. Value: the fixed string "content#accountShipping". "carrierRates": [ # Carrier-based shipping calculations. { # A carrier-calculated shipping rate. "shippingOrigin": "A String", # Shipping origin represented as a postal code. "name": "A String", # The name of the carrier rate. "saleCountry": "A String", # Sale country for which this carrier rate is valid, represented as an ISO 3166-1 Alpha-2 code. "modifierPercent": "A String", # Multiplicative shipping rate modifier in percent. Represented as a floating point number without the percentage character. "carrier": "A String", # The carrier that is responsible for the shipping, such as "UPS", "FedEx", or "USPS". "carrierService": "A String", # The carrier service, such as "Ground" or "2Day". "modifierFlatRate": { # Additive shipping rate modifier. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, ], "locationGroups": [ # Location groups for shipping. { # A user-defined locations group in a given country. All the locations of the group must be of the same type. "postalCodeRanges": [ # A postal code range representing a city or a set of cities. { # A postal code range, that can be either: # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, ], "country": "A String", # The country in which this location group is, represented as ISO 3166-1 Alpha-2 code. "locationIds": [ # A location ID (also called criteria ID) representing administrative areas, smaller country subdivisions (counties), or cities. "A String", ], "name": "A String", # The name of the location group. "postalCodes": [ # A postal code representing a city or a set of cities. # - A single postal code (e.g., 12345) # - A postal code prefix followed by a star (e.g., 1234*) "A String", ], }, ], "services": [ # Shipping services describing shipping fees calculation. { # Shipping services provided in a country. "active": True or False, # Whether the shipping service is available. "costRuleTree": { # Building block of the cost calculation decision tree. # Decision tree for "complicated" shipping cost calculation. # - The tree root should have no condition and no calculation method. # - All the children must have a condition on the same dimension. The first child matching a condition is entered, therefore, price and weight conditions form contiguous intervals. # - The last child of an element must have no condition and matches all elements not previously matched. # - Children and calculation method are mutually exclusive, and exactly one of them must be defined; the root must only have children. "calculationMethod": { # Shipping cost calculation method. Exactly one of the field is set. # Final calculation method to be used only in leaf nodes. "percentageRate": "A String", # Percentage of the price, represented as a floating point number without the percentage character. "carrierRate": "A String", # Name of the carrier rate to use for the calculation. "rateTable": "A String", # Name of the rate table to use for the calculation. "excluded": True or False, # Delivery is excluded. Valid only within cost rules tree. "flatRate": { # Fixed price shipping, represented as a floating point number associated with a currency. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, "condition": { # Condition for this rule to be applicable. If no condition is specified, the rule acts as a catch-all. "weightMax": { # Maximum shipping weight. Forms an interval between the maximum of smaller weight (exclusive) and this weight (inclusive). "value": "A String", # The weight represented as a number. "unit": "A String", # The weight unit. }, "deliveryLocationId": "A String", # Delivery location in terms of a location ID. Can be used to represent administrative areas, smaller country subdivisions, or cities. "deliveryPostalCode": "A String", # Delivery location in terms of a postal code. "deliveryPostalCodeRange": { # A postal code range, that can be either: # Delivery location in terms of a postal code range. # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, "priceMax": { # Maximum shipping price. Forms an interval between the maximum of smaller prices (exclusive) and this price (inclusive). "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "shippingLabel": "A String", # Shipping label of the product. The products with the label are matched. "deliveryLocationGroup": "A String", # Delivery location in terms of a location group name. A location group with this name must be specified among location groups. }, "children": [ # Subsequent rules to be applied, only for inner nodes. The last child must not specify a condition and acts as a catch-all. # Object with schema name: AccountShippingShippingServiceCostRule ], }, "saleCountry": "A String", # Sale country for which this service can be used, represented as an ISO 3166-1 Alpha-2 code. "calculationMethod": { # Shipping cost calculation method. Exactly one of the field is set. # Calculation method for the "simple" case that needs no rules. "percentageRate": "A String", # Percentage of the price, represented as a floating point number without the percentage character. "carrierRate": "A String", # Name of the carrier rate to use for the calculation. "rateTable": "A String", # Name of the rate table to use for the calculation. "excluded": True or False, # Delivery is excluded. Valid only within cost rules tree. "flatRate": { # Fixed price shipping, represented as a floating point number associated with a currency. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, "name": "A String", # The name of this shipping service. }, ], "accountId": "A String", # The ID of the account to which these account shipping settings belong. "rateTables": [ # Rate tables definitions. { # A single or bi-dimensional table of shipping rates. Each dimension is defined in terms of consecutive price/weight ranges, delivery locations, or shipping labels. "content": [ # One-dimensional table cells define one condition along the same dimension. Bi-dimensional table cells use two dimensions with respectively M and N distinct values and must contain exactly M * N cells with distinct conditions (for each possible value pairs). { "rate": { # The rate applicable if the cell conditions are matched. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "condition": { # Conditions for which the cell is valid. All cells in a table must use the same dimension or pair of dimensions among price, weight, shipping label or delivery location. If no condition is specified, the cell acts as a catch-all and matches all the elements that are not matched by other cells in this dimension. "weightMax": { # Maximum shipping weight. Forms an interval between the maximum of smaller weight (exclusive) and this weight (inclusive). "value": "A String", # The weight represented as a number. "unit": "A String", # The weight unit. }, "deliveryLocationId": "A String", # Delivery location in terms of a location ID. Can be used to represent administrative areas, smaller country subdivisions, or cities. "deliveryPostalCode": "A String", # Delivery location in terms of a postal code. "deliveryPostalCodeRange": { # A postal code range, that can be either: # Delivery location in terms of a postal code range. # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, "priceMax": { # Maximum shipping price. Forms an interval between the maximum of smaller prices (exclusive) and this price (inclusive). "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "shippingLabel": "A String", # Shipping label of the product. The products with the label are matched. "deliveryLocationGroup": "A String", # Delivery location in terms of a location group name. A location group with this name must be specified among location groups. }, }, ], "saleCountry": "A String", # Sale country for which this table is valid, represented as an ISO 3166-1 Alpha-2 code. "name": "A String", # The name of the rate table. }, ], }, }, ], }
get(merchantId, accountId)
Retrieves the shipping settings of the account. Args: merchantId: string, The ID of the managing account. (required) accountId: string, The ID of the account for which to get/update account shipping settings. (required) Returns: An object of the form: { # The shipping settings of a merchant account. "kind": "content#accountShipping", # Identifies what kind of resource this is. Value: the fixed string "content#accountShipping". "carrierRates": [ # Carrier-based shipping calculations. { # A carrier-calculated shipping rate. "shippingOrigin": "A String", # Shipping origin represented as a postal code. "name": "A String", # The name of the carrier rate. "saleCountry": "A String", # Sale country for which this carrier rate is valid, represented as an ISO 3166-1 Alpha-2 code. "modifierPercent": "A String", # Multiplicative shipping rate modifier in percent. Represented as a floating point number without the percentage character. "carrier": "A String", # The carrier that is responsible for the shipping, such as "UPS", "FedEx", or "USPS". "carrierService": "A String", # The carrier service, such as "Ground" or "2Day". "modifierFlatRate": { # Additive shipping rate modifier. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, ], "locationGroups": [ # Location groups for shipping. { # A user-defined locations group in a given country. All the locations of the group must be of the same type. "postalCodeRanges": [ # A postal code range representing a city or a set of cities. { # A postal code range, that can be either: # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, ], "country": "A String", # The country in which this location group is, represented as ISO 3166-1 Alpha-2 code. "locationIds": [ # A location ID (also called criteria ID) representing administrative areas, smaller country subdivisions (counties), or cities. "A String", ], "name": "A String", # The name of the location group. "postalCodes": [ # A postal code representing a city or a set of cities. # - A single postal code (e.g., 12345) # - A postal code prefix followed by a star (e.g., 1234*) "A String", ], }, ], "services": [ # Shipping services describing shipping fees calculation. { # Shipping services provided in a country. "active": True or False, # Whether the shipping service is available. "costRuleTree": { # Building block of the cost calculation decision tree. # Decision tree for "complicated" shipping cost calculation. # - The tree root should have no condition and no calculation method. # - All the children must have a condition on the same dimension. The first child matching a condition is entered, therefore, price and weight conditions form contiguous intervals. # - The last child of an element must have no condition and matches all elements not previously matched. # - Children and calculation method are mutually exclusive, and exactly one of them must be defined; the root must only have children. "calculationMethod": { # Shipping cost calculation method. Exactly one of the field is set. # Final calculation method to be used only in leaf nodes. "percentageRate": "A String", # Percentage of the price, represented as a floating point number without the percentage character. "carrierRate": "A String", # Name of the carrier rate to use for the calculation. "rateTable": "A String", # Name of the rate table to use for the calculation. "excluded": True or False, # Delivery is excluded. Valid only within cost rules tree. "flatRate": { # Fixed price shipping, represented as a floating point number associated with a currency. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, "condition": { # Condition for this rule to be applicable. If no condition is specified, the rule acts as a catch-all. "weightMax": { # Maximum shipping weight. Forms an interval between the maximum of smaller weight (exclusive) and this weight (inclusive). "value": "A String", # The weight represented as a number. "unit": "A String", # The weight unit. }, "deliveryLocationId": "A String", # Delivery location in terms of a location ID. Can be used to represent administrative areas, smaller country subdivisions, or cities. "deliveryPostalCode": "A String", # Delivery location in terms of a postal code. "deliveryPostalCodeRange": { # A postal code range, that can be either: # Delivery location in terms of a postal code range. # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, "priceMax": { # Maximum shipping price. Forms an interval between the maximum of smaller prices (exclusive) and this price (inclusive). "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "shippingLabel": "A String", # Shipping label of the product. The products with the label are matched. "deliveryLocationGroup": "A String", # Delivery location in terms of a location group name. A location group with this name must be specified among location groups. }, "children": [ # Subsequent rules to be applied, only for inner nodes. The last child must not specify a condition and acts as a catch-all. # Object with schema name: AccountShippingShippingServiceCostRule ], }, "saleCountry": "A String", # Sale country for which this service can be used, represented as an ISO 3166-1 Alpha-2 code. "calculationMethod": { # Shipping cost calculation method. Exactly one of the field is set. # Calculation method for the "simple" case that needs no rules. "percentageRate": "A String", # Percentage of the price, represented as a floating point number without the percentage character. "carrierRate": "A String", # Name of the carrier rate to use for the calculation. "rateTable": "A String", # Name of the rate table to use for the calculation. "excluded": True or False, # Delivery is excluded. Valid only within cost rules tree. "flatRate": { # Fixed price shipping, represented as a floating point number associated with a currency. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, "name": "A String", # The name of this shipping service. }, ], "accountId": "A String", # The ID of the account to which these account shipping settings belong. "rateTables": [ # Rate tables definitions. { # A single or bi-dimensional table of shipping rates. Each dimension is defined in terms of consecutive price/weight ranges, delivery locations, or shipping labels. "content": [ # One-dimensional table cells define one condition along the same dimension. Bi-dimensional table cells use two dimensions with respectively M and N distinct values and must contain exactly M * N cells with distinct conditions (for each possible value pairs). { "rate": { # The rate applicable if the cell conditions are matched. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "condition": { # Conditions for which the cell is valid. All cells in a table must use the same dimension or pair of dimensions among price, weight, shipping label or delivery location. If no condition is specified, the cell acts as a catch-all and matches all the elements that are not matched by other cells in this dimension. "weightMax": { # Maximum shipping weight. Forms an interval between the maximum of smaller weight (exclusive) and this weight (inclusive). "value": "A String", # The weight represented as a number. "unit": "A String", # The weight unit. }, "deliveryLocationId": "A String", # Delivery location in terms of a location ID. Can be used to represent administrative areas, smaller country subdivisions, or cities. "deliveryPostalCode": "A String", # Delivery location in terms of a postal code. "deliveryPostalCodeRange": { # A postal code range, that can be either: # Delivery location in terms of a postal code range. # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, "priceMax": { # Maximum shipping price. Forms an interval between the maximum of smaller prices (exclusive) and this price (inclusive). "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "shippingLabel": "A String", # Shipping label of the product. The products with the label are matched. "deliveryLocationGroup": "A String", # Delivery location in terms of a location group name. A location group with this name must be specified among location groups. }, }, ], "saleCountry": "A String", # Sale country for which this table is valid, represented as an ISO 3166-1 Alpha-2 code. "name": "A String", # The name of the rate table. }, ], }
list(merchantId, pageToken=None, maxResults=None)
Lists the shipping settings of the sub-accounts in your Merchant Center account. Args: merchantId: string, The ID of the managing account. (required) pageToken: string, The token returned by the previous request. maxResults: integer, The maximum number of shipping settings to return in the response, used for paging. Returns: An object of the form: { "nextPageToken": "A String", # The token for the retrieval of the next page of account shipping settings. "kind": "content#accountshippingListResponse", # Identifies what kind of resource this is. Value: the fixed string "content#accountshippingListResponse". "resources": [ { # The shipping settings of a merchant account. "kind": "content#accountShipping", # Identifies what kind of resource this is. Value: the fixed string "content#accountShipping". "carrierRates": [ # Carrier-based shipping calculations. { # A carrier-calculated shipping rate. "shippingOrigin": "A String", # Shipping origin represented as a postal code. "name": "A String", # The name of the carrier rate. "saleCountry": "A String", # Sale country for which this carrier rate is valid, represented as an ISO 3166-1 Alpha-2 code. "modifierPercent": "A String", # Multiplicative shipping rate modifier in percent. Represented as a floating point number without the percentage character. "carrier": "A String", # The carrier that is responsible for the shipping, such as "UPS", "FedEx", or "USPS". "carrierService": "A String", # The carrier service, such as "Ground" or "2Day". "modifierFlatRate": { # Additive shipping rate modifier. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, ], "locationGroups": [ # Location groups for shipping. { # A user-defined locations group in a given country. All the locations of the group must be of the same type. "postalCodeRanges": [ # A postal code range representing a city or a set of cities. { # A postal code range, that can be either: # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, ], "country": "A String", # The country in which this location group is, represented as ISO 3166-1 Alpha-2 code. "locationIds": [ # A location ID (also called criteria ID) representing administrative areas, smaller country subdivisions (counties), or cities. "A String", ], "name": "A String", # The name of the location group. "postalCodes": [ # A postal code representing a city or a set of cities. # - A single postal code (e.g., 12345) # - A postal code prefix followed by a star (e.g., 1234*) "A String", ], }, ], "services": [ # Shipping services describing shipping fees calculation. { # Shipping services provided in a country. "active": True or False, # Whether the shipping service is available. "costRuleTree": { # Building block of the cost calculation decision tree. # Decision tree for "complicated" shipping cost calculation. # - The tree root should have no condition and no calculation method. # - All the children must have a condition on the same dimension. The first child matching a condition is entered, therefore, price and weight conditions form contiguous intervals. # - The last child of an element must have no condition and matches all elements not previously matched. # - Children and calculation method are mutually exclusive, and exactly one of them must be defined; the root must only have children. "calculationMethod": { # Shipping cost calculation method. Exactly one of the field is set. # Final calculation method to be used only in leaf nodes. "percentageRate": "A String", # Percentage of the price, represented as a floating point number without the percentage character. "carrierRate": "A String", # Name of the carrier rate to use for the calculation. "rateTable": "A String", # Name of the rate table to use for the calculation. "excluded": True or False, # Delivery is excluded. Valid only within cost rules tree. "flatRate": { # Fixed price shipping, represented as a floating point number associated with a currency. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, "condition": { # Condition for this rule to be applicable. If no condition is specified, the rule acts as a catch-all. "weightMax": { # Maximum shipping weight. Forms an interval between the maximum of smaller weight (exclusive) and this weight (inclusive). "value": "A String", # The weight represented as a number. "unit": "A String", # The weight unit. }, "deliveryLocationId": "A String", # Delivery location in terms of a location ID. Can be used to represent administrative areas, smaller country subdivisions, or cities. "deliveryPostalCode": "A String", # Delivery location in terms of a postal code. "deliveryPostalCodeRange": { # A postal code range, that can be either: # Delivery location in terms of a postal code range. # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, "priceMax": { # Maximum shipping price. Forms an interval between the maximum of smaller prices (exclusive) and this price (inclusive). "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "shippingLabel": "A String", # Shipping label of the product. The products with the label are matched. "deliveryLocationGroup": "A String", # Delivery location in terms of a location group name. A location group with this name must be specified among location groups. }, "children": [ # Subsequent rules to be applied, only for inner nodes. The last child must not specify a condition and acts as a catch-all. # Object with schema name: AccountShippingShippingServiceCostRule ], }, "saleCountry": "A String", # Sale country for which this service can be used, represented as an ISO 3166-1 Alpha-2 code. "calculationMethod": { # Shipping cost calculation method. Exactly one of the field is set. # Calculation method for the "simple" case that needs no rules. "percentageRate": "A String", # Percentage of the price, represented as a floating point number without the percentage character. "carrierRate": "A String", # Name of the carrier rate to use for the calculation. "rateTable": "A String", # Name of the rate table to use for the calculation. "excluded": True or False, # Delivery is excluded. Valid only within cost rules tree. "flatRate": { # Fixed price shipping, represented as a floating point number associated with a currency. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, "name": "A String", # The name of this shipping service. }, ], "accountId": "A String", # The ID of the account to which these account shipping settings belong. "rateTables": [ # Rate tables definitions. { # A single or bi-dimensional table of shipping rates. Each dimension is defined in terms of consecutive price/weight ranges, delivery locations, or shipping labels. "content": [ # One-dimensional table cells define one condition along the same dimension. Bi-dimensional table cells use two dimensions with respectively M and N distinct values and must contain exactly M * N cells with distinct conditions (for each possible value pairs). { "rate": { # The rate applicable if the cell conditions are matched. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "condition": { # Conditions for which the cell is valid. All cells in a table must use the same dimension or pair of dimensions among price, weight, shipping label or delivery location. If no condition is specified, the cell acts as a catch-all and matches all the elements that are not matched by other cells in this dimension. "weightMax": { # Maximum shipping weight. Forms an interval between the maximum of smaller weight (exclusive) and this weight (inclusive). "value": "A String", # The weight represented as a number. "unit": "A String", # The weight unit. }, "deliveryLocationId": "A String", # Delivery location in terms of a location ID. Can be used to represent administrative areas, smaller country subdivisions, or cities. "deliveryPostalCode": "A String", # Delivery location in terms of a postal code. "deliveryPostalCodeRange": { # A postal code range, that can be either: # Delivery location in terms of a postal code range. # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, "priceMax": { # Maximum shipping price. Forms an interval between the maximum of smaller prices (exclusive) and this price (inclusive). "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "shippingLabel": "A String", # Shipping label of the product. The products with the label are matched. "deliveryLocationGroup": "A String", # Delivery location in terms of a location group name. A location group with this name must be specified among location groups. }, }, ], "saleCountry": "A String", # Sale country for which this table is valid, represented as an ISO 3166-1 Alpha-2 code. "name": "A String", # The name of the rate table. }, ], }, ], }
list_next(previous_request, previous_response)
Retrieves the next page of results. Args: previous_request: The request for the previous page. (required) previous_response: The response from the request for the previous page. (required) Returns: A request object that you can call 'execute()' on to request the next page. Returns None if there are no more items in the collection.
patch(merchantId, accountId, body)
Updates the shipping settings of the account. This method supports patch semantics. Args: merchantId: string, The ID of the managing account. (required) accountId: string, The ID of the account for which to get/update account shipping settings. (required) body: object, The request body. (required) The object takes the form of: { # The shipping settings of a merchant account. "kind": "content#accountShipping", # Identifies what kind of resource this is. Value: the fixed string "content#accountShipping". "carrierRates": [ # Carrier-based shipping calculations. { # A carrier-calculated shipping rate. "shippingOrigin": "A String", # Shipping origin represented as a postal code. "name": "A String", # The name of the carrier rate. "saleCountry": "A String", # Sale country for which this carrier rate is valid, represented as an ISO 3166-1 Alpha-2 code. "modifierPercent": "A String", # Multiplicative shipping rate modifier in percent. Represented as a floating point number without the percentage character. "carrier": "A String", # The carrier that is responsible for the shipping, such as "UPS", "FedEx", or "USPS". "carrierService": "A String", # The carrier service, such as "Ground" or "2Day". "modifierFlatRate": { # Additive shipping rate modifier. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, ], "locationGroups": [ # Location groups for shipping. { # A user-defined locations group in a given country. All the locations of the group must be of the same type. "postalCodeRanges": [ # A postal code range representing a city or a set of cities. { # A postal code range, that can be either: # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, ], "country": "A String", # The country in which this location group is, represented as ISO 3166-1 Alpha-2 code. "locationIds": [ # A location ID (also called criteria ID) representing administrative areas, smaller country subdivisions (counties), or cities. "A String", ], "name": "A String", # The name of the location group. "postalCodes": [ # A postal code representing a city or a set of cities. # - A single postal code (e.g., 12345) # - A postal code prefix followed by a star (e.g., 1234*) "A String", ], }, ], "services": [ # Shipping services describing shipping fees calculation. { # Shipping services provided in a country. "active": True or False, # Whether the shipping service is available. "costRuleTree": { # Building block of the cost calculation decision tree. # Decision tree for "complicated" shipping cost calculation. # - The tree root should have no condition and no calculation method. # - All the children must have a condition on the same dimension. The first child matching a condition is entered, therefore, price and weight conditions form contiguous intervals. # - The last child of an element must have no condition and matches all elements not previously matched. # - Children and calculation method are mutually exclusive, and exactly one of them must be defined; the root must only have children. "calculationMethod": { # Shipping cost calculation method. Exactly one of the field is set. # Final calculation method to be used only in leaf nodes. "percentageRate": "A String", # Percentage of the price, represented as a floating point number without the percentage character. "carrierRate": "A String", # Name of the carrier rate to use for the calculation. "rateTable": "A String", # Name of the rate table to use for the calculation. "excluded": True or False, # Delivery is excluded. Valid only within cost rules tree. "flatRate": { # Fixed price shipping, represented as a floating point number associated with a currency. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, "condition": { # Condition for this rule to be applicable. If no condition is specified, the rule acts as a catch-all. "weightMax": { # Maximum shipping weight. Forms an interval between the maximum of smaller weight (exclusive) and this weight (inclusive). "value": "A String", # The weight represented as a number. "unit": "A String", # The weight unit. }, "deliveryLocationId": "A String", # Delivery location in terms of a location ID. Can be used to represent administrative areas, smaller country subdivisions, or cities. "deliveryPostalCode": "A String", # Delivery location in terms of a postal code. "deliveryPostalCodeRange": { # A postal code range, that can be either: # Delivery location in terms of a postal code range. # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, "priceMax": { # Maximum shipping price. Forms an interval between the maximum of smaller prices (exclusive) and this price (inclusive). "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "shippingLabel": "A String", # Shipping label of the product. The products with the label are matched. "deliveryLocationGroup": "A String", # Delivery location in terms of a location group name. A location group with this name must be specified among location groups. }, "children": [ # Subsequent rules to be applied, only for inner nodes. The last child must not specify a condition and acts as a catch-all. # Object with schema name: AccountShippingShippingServiceCostRule ], }, "saleCountry": "A String", # Sale country for which this service can be used, represented as an ISO 3166-1 Alpha-2 code. "calculationMethod": { # Shipping cost calculation method. Exactly one of the field is set. # Calculation method for the "simple" case that needs no rules. "percentageRate": "A String", # Percentage of the price, represented as a floating point number without the percentage character. "carrierRate": "A String", # Name of the carrier rate to use for the calculation. "rateTable": "A String", # Name of the rate table to use for the calculation. "excluded": True or False, # Delivery is excluded. Valid only within cost rules tree. "flatRate": { # Fixed price shipping, represented as a floating point number associated with a currency. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, "name": "A String", # The name of this shipping service. }, ], "accountId": "A String", # The ID of the account to which these account shipping settings belong. "rateTables": [ # Rate tables definitions. { # A single or bi-dimensional table of shipping rates. Each dimension is defined in terms of consecutive price/weight ranges, delivery locations, or shipping labels. "content": [ # One-dimensional table cells define one condition along the same dimension. Bi-dimensional table cells use two dimensions with respectively M and N distinct values and must contain exactly M * N cells with distinct conditions (for each possible value pairs). { "rate": { # The rate applicable if the cell conditions are matched. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "condition": { # Conditions for which the cell is valid. All cells in a table must use the same dimension or pair of dimensions among price, weight, shipping label or delivery location. If no condition is specified, the cell acts as a catch-all and matches all the elements that are not matched by other cells in this dimension. "weightMax": { # Maximum shipping weight. Forms an interval between the maximum of smaller weight (exclusive) and this weight (inclusive). "value": "A String", # The weight represented as a number. "unit": "A String", # The weight unit. }, "deliveryLocationId": "A String", # Delivery location in terms of a location ID. Can be used to represent administrative areas, smaller country subdivisions, or cities. "deliveryPostalCode": "A String", # Delivery location in terms of a postal code. "deliveryPostalCodeRange": { # A postal code range, that can be either: # Delivery location in terms of a postal code range. # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, "priceMax": { # Maximum shipping price. Forms an interval between the maximum of smaller prices (exclusive) and this price (inclusive). "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "shippingLabel": "A String", # Shipping label of the product. The products with the label are matched. "deliveryLocationGroup": "A String", # Delivery location in terms of a location group name. A location group with this name must be specified among location groups. }, }, ], "saleCountry": "A String", # Sale country for which this table is valid, represented as an ISO 3166-1 Alpha-2 code. "name": "A String", # The name of the rate table. }, ], } Returns: An object of the form: { # The shipping settings of a merchant account. "kind": "content#accountShipping", # Identifies what kind of resource this is. Value: the fixed string "content#accountShipping". "carrierRates": [ # Carrier-based shipping calculations. { # A carrier-calculated shipping rate. "shippingOrigin": "A String", # Shipping origin represented as a postal code. "name": "A String", # The name of the carrier rate. "saleCountry": "A String", # Sale country for which this carrier rate is valid, represented as an ISO 3166-1 Alpha-2 code. "modifierPercent": "A String", # Multiplicative shipping rate modifier in percent. Represented as a floating point number without the percentage character. "carrier": "A String", # The carrier that is responsible for the shipping, such as "UPS", "FedEx", or "USPS". "carrierService": "A String", # The carrier service, such as "Ground" or "2Day". "modifierFlatRate": { # Additive shipping rate modifier. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, ], "locationGroups": [ # Location groups for shipping. { # A user-defined locations group in a given country. All the locations of the group must be of the same type. "postalCodeRanges": [ # A postal code range representing a city or a set of cities. { # A postal code range, that can be either: # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, ], "country": "A String", # The country in which this location group is, represented as ISO 3166-1 Alpha-2 code. "locationIds": [ # A location ID (also called criteria ID) representing administrative areas, smaller country subdivisions (counties), or cities. "A String", ], "name": "A String", # The name of the location group. "postalCodes": [ # A postal code representing a city or a set of cities. # - A single postal code (e.g., 12345) # - A postal code prefix followed by a star (e.g., 1234*) "A String", ], }, ], "services": [ # Shipping services describing shipping fees calculation. { # Shipping services provided in a country. "active": True or False, # Whether the shipping service is available. "costRuleTree": { # Building block of the cost calculation decision tree. # Decision tree for "complicated" shipping cost calculation. # - The tree root should have no condition and no calculation method. # - All the children must have a condition on the same dimension. The first child matching a condition is entered, therefore, price and weight conditions form contiguous intervals. # - The last child of an element must have no condition and matches all elements not previously matched. # - Children and calculation method are mutually exclusive, and exactly one of them must be defined; the root must only have children. "calculationMethod": { # Shipping cost calculation method. Exactly one of the field is set. # Final calculation method to be used only in leaf nodes. "percentageRate": "A String", # Percentage of the price, represented as a floating point number without the percentage character. "carrierRate": "A String", # Name of the carrier rate to use for the calculation. "rateTable": "A String", # Name of the rate table to use for the calculation. "excluded": True or False, # Delivery is excluded. Valid only within cost rules tree. "flatRate": { # Fixed price shipping, represented as a floating point number associated with a currency. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, "condition": { # Condition for this rule to be applicable. If no condition is specified, the rule acts as a catch-all. "weightMax": { # Maximum shipping weight. Forms an interval between the maximum of smaller weight (exclusive) and this weight (inclusive). "value": "A String", # The weight represented as a number. "unit": "A String", # The weight unit. }, "deliveryLocationId": "A String", # Delivery location in terms of a location ID. Can be used to represent administrative areas, smaller country subdivisions, or cities. "deliveryPostalCode": "A String", # Delivery location in terms of a postal code. "deliveryPostalCodeRange": { # A postal code range, that can be either: # Delivery location in terms of a postal code range. # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, "priceMax": { # Maximum shipping price. Forms an interval between the maximum of smaller prices (exclusive) and this price (inclusive). "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "shippingLabel": "A String", # Shipping label of the product. The products with the label are matched. "deliveryLocationGroup": "A String", # Delivery location in terms of a location group name. A location group with this name must be specified among location groups. }, "children": [ # Subsequent rules to be applied, only for inner nodes. The last child must not specify a condition and acts as a catch-all. # Object with schema name: AccountShippingShippingServiceCostRule ], }, "saleCountry": "A String", # Sale country for which this service can be used, represented as an ISO 3166-1 Alpha-2 code. "calculationMethod": { # Shipping cost calculation method. Exactly one of the field is set. # Calculation method for the "simple" case that needs no rules. "percentageRate": "A String", # Percentage of the price, represented as a floating point number without the percentage character. "carrierRate": "A String", # Name of the carrier rate to use for the calculation. "rateTable": "A String", # Name of the rate table to use for the calculation. "excluded": True or False, # Delivery is excluded. Valid only within cost rules tree. "flatRate": { # Fixed price shipping, represented as a floating point number associated with a currency. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, "name": "A String", # The name of this shipping service. }, ], "accountId": "A String", # The ID of the account to which these account shipping settings belong. "rateTables": [ # Rate tables definitions. { # A single or bi-dimensional table of shipping rates. Each dimension is defined in terms of consecutive price/weight ranges, delivery locations, or shipping labels. "content": [ # One-dimensional table cells define one condition along the same dimension. Bi-dimensional table cells use two dimensions with respectively M and N distinct values and must contain exactly M * N cells with distinct conditions (for each possible value pairs). { "rate": { # The rate applicable if the cell conditions are matched. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "condition": { # Conditions for which the cell is valid. All cells in a table must use the same dimension or pair of dimensions among price, weight, shipping label or delivery location. If no condition is specified, the cell acts as a catch-all and matches all the elements that are not matched by other cells in this dimension. "weightMax": { # Maximum shipping weight. Forms an interval between the maximum of smaller weight (exclusive) and this weight (inclusive). "value": "A String", # The weight represented as a number. "unit": "A String", # The weight unit. }, "deliveryLocationId": "A String", # Delivery location in terms of a location ID. Can be used to represent administrative areas, smaller country subdivisions, or cities. "deliveryPostalCode": "A String", # Delivery location in terms of a postal code. "deliveryPostalCodeRange": { # A postal code range, that can be either: # Delivery location in terms of a postal code range. # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, "priceMax": { # Maximum shipping price. Forms an interval between the maximum of smaller prices (exclusive) and this price (inclusive). "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "shippingLabel": "A String", # Shipping label of the product. The products with the label are matched. "deliveryLocationGroup": "A String", # Delivery location in terms of a location group name. A location group with this name must be specified among location groups. }, }, ], "saleCountry": "A String", # Sale country for which this table is valid, represented as an ISO 3166-1 Alpha-2 code. "name": "A String", # The name of the rate table. }, ], }
update(merchantId, accountId, body)
Updates the shipping settings of the account. Args: merchantId: string, The ID of the managing account. (required) accountId: string, The ID of the account for which to get/update account shipping settings. (required) body: object, The request body. (required) The object takes the form of: { # The shipping settings of a merchant account. "kind": "content#accountShipping", # Identifies what kind of resource this is. Value: the fixed string "content#accountShipping". "carrierRates": [ # Carrier-based shipping calculations. { # A carrier-calculated shipping rate. "shippingOrigin": "A String", # Shipping origin represented as a postal code. "name": "A String", # The name of the carrier rate. "saleCountry": "A String", # Sale country for which this carrier rate is valid, represented as an ISO 3166-1 Alpha-2 code. "modifierPercent": "A String", # Multiplicative shipping rate modifier in percent. Represented as a floating point number without the percentage character. "carrier": "A String", # The carrier that is responsible for the shipping, such as "UPS", "FedEx", or "USPS". "carrierService": "A String", # The carrier service, such as "Ground" or "2Day". "modifierFlatRate": { # Additive shipping rate modifier. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, ], "locationGroups": [ # Location groups for shipping. { # A user-defined locations group in a given country. All the locations of the group must be of the same type. "postalCodeRanges": [ # A postal code range representing a city or a set of cities. { # A postal code range, that can be either: # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, ], "country": "A String", # The country in which this location group is, represented as ISO 3166-1 Alpha-2 code. "locationIds": [ # A location ID (also called criteria ID) representing administrative areas, smaller country subdivisions (counties), or cities. "A String", ], "name": "A String", # The name of the location group. "postalCodes": [ # A postal code representing a city or a set of cities. # - A single postal code (e.g., 12345) # - A postal code prefix followed by a star (e.g., 1234*) "A String", ], }, ], "services": [ # Shipping services describing shipping fees calculation. { # Shipping services provided in a country. "active": True or False, # Whether the shipping service is available. "costRuleTree": { # Building block of the cost calculation decision tree. # Decision tree for "complicated" shipping cost calculation. # - The tree root should have no condition and no calculation method. # - All the children must have a condition on the same dimension. The first child matching a condition is entered, therefore, price and weight conditions form contiguous intervals. # - The last child of an element must have no condition and matches all elements not previously matched. # - Children and calculation method are mutually exclusive, and exactly one of them must be defined; the root must only have children. "calculationMethod": { # Shipping cost calculation method. Exactly one of the field is set. # Final calculation method to be used only in leaf nodes. "percentageRate": "A String", # Percentage of the price, represented as a floating point number without the percentage character. "carrierRate": "A String", # Name of the carrier rate to use for the calculation. "rateTable": "A String", # Name of the rate table to use for the calculation. "excluded": True or False, # Delivery is excluded. Valid only within cost rules tree. "flatRate": { # Fixed price shipping, represented as a floating point number associated with a currency. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, "condition": { # Condition for this rule to be applicable. If no condition is specified, the rule acts as a catch-all. "weightMax": { # Maximum shipping weight. Forms an interval between the maximum of smaller weight (exclusive) and this weight (inclusive). "value": "A String", # The weight represented as a number. "unit": "A String", # The weight unit. }, "deliveryLocationId": "A String", # Delivery location in terms of a location ID. Can be used to represent administrative areas, smaller country subdivisions, or cities. "deliveryPostalCode": "A String", # Delivery location in terms of a postal code. "deliveryPostalCodeRange": { # A postal code range, that can be either: # Delivery location in terms of a postal code range. # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, "priceMax": { # Maximum shipping price. Forms an interval between the maximum of smaller prices (exclusive) and this price (inclusive). "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "shippingLabel": "A String", # Shipping label of the product. The products with the label are matched. "deliveryLocationGroup": "A String", # Delivery location in terms of a location group name. A location group with this name must be specified among location groups. }, "children": [ # Subsequent rules to be applied, only for inner nodes. The last child must not specify a condition and acts as a catch-all. # Object with schema name: AccountShippingShippingServiceCostRule ], }, "saleCountry": "A String", # Sale country for which this service can be used, represented as an ISO 3166-1 Alpha-2 code. "calculationMethod": { # Shipping cost calculation method. Exactly one of the field is set. # Calculation method for the "simple" case that needs no rules. "percentageRate": "A String", # Percentage of the price, represented as a floating point number without the percentage character. "carrierRate": "A String", # Name of the carrier rate to use for the calculation. "rateTable": "A String", # Name of the rate table to use for the calculation. "excluded": True or False, # Delivery is excluded. Valid only within cost rules tree. "flatRate": { # Fixed price shipping, represented as a floating point number associated with a currency. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, "name": "A String", # The name of this shipping service. }, ], "accountId": "A String", # The ID of the account to which these account shipping settings belong. "rateTables": [ # Rate tables definitions. { # A single or bi-dimensional table of shipping rates. Each dimension is defined in terms of consecutive price/weight ranges, delivery locations, or shipping labels. "content": [ # One-dimensional table cells define one condition along the same dimension. Bi-dimensional table cells use two dimensions with respectively M and N distinct values and must contain exactly M * N cells with distinct conditions (for each possible value pairs). { "rate": { # The rate applicable if the cell conditions are matched. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "condition": { # Conditions for which the cell is valid. All cells in a table must use the same dimension or pair of dimensions among price, weight, shipping label or delivery location. If no condition is specified, the cell acts as a catch-all and matches all the elements that are not matched by other cells in this dimension. "weightMax": { # Maximum shipping weight. Forms an interval between the maximum of smaller weight (exclusive) and this weight (inclusive). "value": "A String", # The weight represented as a number. "unit": "A String", # The weight unit. }, "deliveryLocationId": "A String", # Delivery location in terms of a location ID. Can be used to represent administrative areas, smaller country subdivisions, or cities. "deliveryPostalCode": "A String", # Delivery location in terms of a postal code. "deliveryPostalCodeRange": { # A postal code range, that can be either: # Delivery location in terms of a postal code range. # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, "priceMax": { # Maximum shipping price. Forms an interval between the maximum of smaller prices (exclusive) and this price (inclusive). "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "shippingLabel": "A String", # Shipping label of the product. The products with the label are matched. "deliveryLocationGroup": "A String", # Delivery location in terms of a location group name. A location group with this name must be specified among location groups. }, }, ], "saleCountry": "A String", # Sale country for which this table is valid, represented as an ISO 3166-1 Alpha-2 code. "name": "A String", # The name of the rate table. }, ], } Returns: An object of the form: { # The shipping settings of a merchant account. "kind": "content#accountShipping", # Identifies what kind of resource this is. Value: the fixed string "content#accountShipping". "carrierRates": [ # Carrier-based shipping calculations. { # A carrier-calculated shipping rate. "shippingOrigin": "A String", # Shipping origin represented as a postal code. "name": "A String", # The name of the carrier rate. "saleCountry": "A String", # Sale country for which this carrier rate is valid, represented as an ISO 3166-1 Alpha-2 code. "modifierPercent": "A String", # Multiplicative shipping rate modifier in percent. Represented as a floating point number without the percentage character. "carrier": "A String", # The carrier that is responsible for the shipping, such as "UPS", "FedEx", or "USPS". "carrierService": "A String", # The carrier service, such as "Ground" or "2Day". "modifierFlatRate": { # Additive shipping rate modifier. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, ], "locationGroups": [ # Location groups for shipping. { # A user-defined locations group in a given country. All the locations of the group must be of the same type. "postalCodeRanges": [ # A postal code range representing a city or a set of cities. { # A postal code range, that can be either: # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, ], "country": "A String", # The country in which this location group is, represented as ISO 3166-1 Alpha-2 code. "locationIds": [ # A location ID (also called criteria ID) representing administrative areas, smaller country subdivisions (counties), or cities. "A String", ], "name": "A String", # The name of the location group. "postalCodes": [ # A postal code representing a city or a set of cities. # - A single postal code (e.g., 12345) # - A postal code prefix followed by a star (e.g., 1234*) "A String", ], }, ], "services": [ # Shipping services describing shipping fees calculation. { # Shipping services provided in a country. "active": True or False, # Whether the shipping service is available. "costRuleTree": { # Building block of the cost calculation decision tree. # Decision tree for "complicated" shipping cost calculation. # - The tree root should have no condition and no calculation method. # - All the children must have a condition on the same dimension. The first child matching a condition is entered, therefore, price and weight conditions form contiguous intervals. # - The last child of an element must have no condition and matches all elements not previously matched. # - Children and calculation method are mutually exclusive, and exactly one of them must be defined; the root must only have children. "calculationMethod": { # Shipping cost calculation method. Exactly one of the field is set. # Final calculation method to be used only in leaf nodes. "percentageRate": "A String", # Percentage of the price, represented as a floating point number without the percentage character. "carrierRate": "A String", # Name of the carrier rate to use for the calculation. "rateTable": "A String", # Name of the rate table to use for the calculation. "excluded": True or False, # Delivery is excluded. Valid only within cost rules tree. "flatRate": { # Fixed price shipping, represented as a floating point number associated with a currency. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, "condition": { # Condition for this rule to be applicable. If no condition is specified, the rule acts as a catch-all. "weightMax": { # Maximum shipping weight. Forms an interval between the maximum of smaller weight (exclusive) and this weight (inclusive). "value": "A String", # The weight represented as a number. "unit": "A String", # The weight unit. }, "deliveryLocationId": "A String", # Delivery location in terms of a location ID. Can be used to represent administrative areas, smaller country subdivisions, or cities. "deliveryPostalCode": "A String", # Delivery location in terms of a postal code. "deliveryPostalCodeRange": { # A postal code range, that can be either: # Delivery location in terms of a postal code range. # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, "priceMax": { # Maximum shipping price. Forms an interval between the maximum of smaller prices (exclusive) and this price (inclusive). "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "shippingLabel": "A String", # Shipping label of the product. The products with the label are matched. "deliveryLocationGroup": "A String", # Delivery location in terms of a location group name. A location group with this name must be specified among location groups. }, "children": [ # Subsequent rules to be applied, only for inner nodes. The last child must not specify a condition and acts as a catch-all. # Object with schema name: AccountShippingShippingServiceCostRule ], }, "saleCountry": "A String", # Sale country for which this service can be used, represented as an ISO 3166-1 Alpha-2 code. "calculationMethod": { # Shipping cost calculation method. Exactly one of the field is set. # Calculation method for the "simple" case that needs no rules. "percentageRate": "A String", # Percentage of the price, represented as a floating point number without the percentage character. "carrierRate": "A String", # Name of the carrier rate to use for the calculation. "rateTable": "A String", # Name of the rate table to use for the calculation. "excluded": True or False, # Delivery is excluded. Valid only within cost rules tree. "flatRate": { # Fixed price shipping, represented as a floating point number associated with a currency. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, }, "name": "A String", # The name of this shipping service. }, ], "accountId": "A String", # The ID of the account to which these account shipping settings belong. "rateTables": [ # Rate tables definitions. { # A single or bi-dimensional table of shipping rates. Each dimension is defined in terms of consecutive price/weight ranges, delivery locations, or shipping labels. "content": [ # One-dimensional table cells define one condition along the same dimension. Bi-dimensional table cells use two dimensions with respectively M and N distinct values and must contain exactly M * N cells with distinct conditions (for each possible value pairs). { "rate": { # The rate applicable if the cell conditions are matched. "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "condition": { # Conditions for which the cell is valid. All cells in a table must use the same dimension or pair of dimensions among price, weight, shipping label or delivery location. If no condition is specified, the cell acts as a catch-all and matches all the elements that are not matched by other cells in this dimension. "weightMax": { # Maximum shipping weight. Forms an interval between the maximum of smaller weight (exclusive) and this weight (inclusive). "value": "A String", # The weight represented as a number. "unit": "A String", # The weight unit. }, "deliveryLocationId": "A String", # Delivery location in terms of a location ID. Can be used to represent administrative areas, smaller country subdivisions, or cities. "deliveryPostalCode": "A String", # Delivery location in terms of a postal code. "deliveryPostalCodeRange": { # A postal code range, that can be either: # Delivery location in terms of a postal code range. # - A range of postal codes (e.g., start=12340, end=12359) # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). "start": "A String", # The first (inclusive) postal code or prefix of the range. "end": "A String", # The last (inclusive) postal code or prefix of the range. }, "priceMax": { # Maximum shipping price. Forms an interval between the maximum of smaller prices (exclusive) and this price (inclusive). "currency": "A String", # The currency of the price. "value": "A String", # The price represented as a number. }, "shippingLabel": "A String", # Shipping label of the product. The products with the label are matched. "deliveryLocationGroup": "A String", # Delivery location in terms of a location group name. A location group with this name must be specified among location groups. }, }, ], "saleCountry": "A String", # Sale country for which this table is valid, represented as an ISO 3166-1 Alpha-2 code. "name": "A String", # The name of the rate table. }, ], }