<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="content_v2.html">Content API for Shopping</a> . <a href="content_v2.shippingsettings.html">shippingsettings</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#custombatch">custombatch(body, dryRun=None)</a></code></p>
<p class="firstline">Retrieves and updates the shipping settings of multiple accounts in a single request.</p>
<p class="toc_element">
<code><a href="#get">get(merchantId, accountId)</a></code></p>
<p class="firstline">Retrieves the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account.</p>
<p class="toc_element">
<code><a href="#getsupportedcarriers">getsupportedcarriers(merchantId)</a></code></p>
<p class="firstline">Retrieves supported carriers and carrier services for an account.</p>
<p class="toc_element">
<code><a href="#list">list(merchantId, pageToken=None, maxResults=None)</a></code></p>
<p class="firstline">Lists the shipping settings of the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts.</p>
<p class="toc_element">
<code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
<code><a href="#patch">patch(merchantId, accountId, body, dryRun=None)</a></code></p>
<p class="firstline">Updates the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account. This method supports patch semantics.</p>
<p class="toc_element">
<code><a href="#update">update(merchantId, accountId, body, dryRun=None)</a></code></p>
<p class="firstline">Updates the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="custombatch">custombatch(body, dryRun=None)</code>
<pre>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 shippingsettings request.
"batchId": 42, # An entry ID, unique within the batch request.
"method": "A String",
"merchantId": "A String", # The ID of the managing account.
"shippingSettings": { # The merchant account's shipping settings. # The account shipping settings to update. Only defined if the method is update.
"services": [ # The target account's list of services. Optional.
{
"name": "A String", # Free-form name of the service. Must be unique within target account. Required.
"deliveryTime": { # Time spent in various aspects from order to the delivery of the product. Required.
"maxTransitTimeInDays": 42, # Maximum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Must be greater than or equal to minTransitTimeInDays. Required.
"minTransitTimeInDays": 42, # Minimum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Required.
},
"deliveryCountry": "A String", # The CLDR territory code of the country to which the service applies. Required.
"rateGroups": [ # Shipping rate group definitions. Only the last one is allowed to have an empty applicableShippingLabels, which means "everything else". The other applicableShippingLabels must not overlap.
{
"applicableShippingLabels": [ # A list of shipping labels defining the products to which this rate group applies to. This is a disjunction: only one of the labels has to match for the rate group to apply. May only be empty for the last rate group of a service. Required.
"A String",
],
"carrierRates": [ # A list of carrier rates that can be referred to by mainTable or singleValue.
{
"name": "A String", # Name of the carrier rate. Must be unique per rate group. Required.
"originPostalCode": "A String", # Shipping origin for this carrier rate. Required.
"flatAdjustment": { # Additive shipping rate modifier. Can be negative. For example { "value": "1", "currency" : "USD" } adds $1 to the rate, { "value": "-3", "currency" : "USD" } removes $3 from the rate. Optional.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
"percentageAdjustment": "A String", # Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example "5.4" increases the rate by 5.4%, "-3" decreases the rate by 3%. Optional.
"carrierName": "A String", # Carrier service, such as "UPS" or "Fedex". The list of supported carriers can be retrieved via the getSupportedCarriers method. Required.
"carrierService": "A String", # Carrier service, such as "ground" or "2 days". The list of supported services for a carrier can be retrieved via the getSupportedCarriers method. Required.
},
],
"singleValue": { # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set. # The value of the rate group (e.g. flat rate $10). Can only be set if mainTable and subtables are not set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
"mainTable": { # A table defining the rate group, when singleValue is not expressive enough. Can only be set if singleValue is not set.
"rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's rows. Required.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"rows": [ # The list of rows that constitute the table. Must have the same length as rowHeaders. Required.
{
"cells": [ # The list of cells that constitute the row. Must have the same length as columnHeaders for two-dimensional tables, a length of 1 for one-dimensional tables. Required.
{ # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
],
},
],
"columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"name": "A String", # Name of the table. Required for subtables, ignored for the main table.
},
"subtables": [ # A list of subtables referred to by mainTable. Can only be set if mainTable is set.
{
"rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's rows. Required.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"rows": [ # The list of rows that constitute the table. Must have the same length as rowHeaders. Required.
{
"cells": [ # The list of cells that constitute the row. Must have the same length as columnHeaders for two-dimensional tables, a length of 1 for one-dimensional tables. Required.
{ # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
],
},
],
"columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"name": "A String", # Name of the table. Required for subtables, ignored for the main table.
},
],
},
],
"currency": "A String", # The CLDR code of the currency to which this service applies. Must match that of the prices in rate groups.
"active": True or False, # A boolean exposing the active status of the shipping service. Required.
},
],
"postalCodeGroups": [ # A list of postal code groups that can be referred to in services. Optional.
{
"postalCodeRanges": [ # A range of postal codes. Required.
{
"postalCodeRangeBegin": "A String", # A postal code or a pattern of the form prefix* denoting the inclusive lower bound of the range defining the area. Examples values: "94108", "9410*", "9*". Required.
"postalCodeRangeEnd": "A String", # A postal code or a pattern of the form prefix* denoting the inclusive upper bound of the range defining the area. It must have the same length as postalCodeRangeBegin: if postalCodeRangeBegin is a postal code then postalCodeRangeEnd must be a postal code too; if postalCodeRangeBegin is a pattern then postalCodeRangeEnd must be a pattern with the same prefix length. Optional: if not set, then the area is defined as being all the postal codes matching postalCodeRangeBegin.
},
],
"country": "A String", # The CLDR territory code of the country the postal code group applies to. Required.
"name": "A String", # The name of the postal code group, referred to in headers. Required.
},
],
"accountId": "A String", # The ID of the account to which these account shipping settings belong. Ignored upon update, always present in get request responses.
},
"accountId": "A String", # The ID of the account for which to get/update account shipping settings.
},
],
}
dryRun: boolean, Flag to run the request in dry-run mode.
Returns:
An object of the form:
{
"kind": "content#shippingsettingsCustomBatchResponse", # Identifies what kind of resource this is. Value: the fixed string "content#shippingsettingsCustomBatchResponse".
"entries": [ # The result of the execution of the batch requests.
{ # A batch entry encoding a single non-batch shipping settings response.
"batchId": 42, # The ID of the request entry to which this entry responds.
"kind": "content#shippingsettingsCustomBatchResponseEntry", # Identifies what kind of resource this is. Value: the fixed string "content#shippingsettingsCustomBatchResponseEntry".
"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.
},
],
},
"shippingSettings": { # The merchant account's shipping settings. # The retrieved or updated account shipping settings.
"services": [ # The target account's list of services. Optional.
{
"name": "A String", # Free-form name of the service. Must be unique within target account. Required.
"deliveryTime": { # Time spent in various aspects from order to the delivery of the product. Required.
"maxTransitTimeInDays": 42, # Maximum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Must be greater than or equal to minTransitTimeInDays. Required.
"minTransitTimeInDays": 42, # Minimum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Required.
},
"deliveryCountry": "A String", # The CLDR territory code of the country to which the service applies. Required.
"rateGroups": [ # Shipping rate group definitions. Only the last one is allowed to have an empty applicableShippingLabels, which means "everything else". The other applicableShippingLabels must not overlap.
{
"applicableShippingLabels": [ # A list of shipping labels defining the products to which this rate group applies to. This is a disjunction: only one of the labels has to match for the rate group to apply. May only be empty for the last rate group of a service. Required.
"A String",
],
"carrierRates": [ # A list of carrier rates that can be referred to by mainTable or singleValue.
{
"name": "A String", # Name of the carrier rate. Must be unique per rate group. Required.
"originPostalCode": "A String", # Shipping origin for this carrier rate. Required.
"flatAdjustment": { # Additive shipping rate modifier. Can be negative. For example { "value": "1", "currency" : "USD" } adds $1 to the rate, { "value": "-3", "currency" : "USD" } removes $3 from the rate. Optional.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
"percentageAdjustment": "A String", # Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example "5.4" increases the rate by 5.4%, "-3" decreases the rate by 3%. Optional.
"carrierName": "A String", # Carrier service, such as "UPS" or "Fedex". The list of supported carriers can be retrieved via the getSupportedCarriers method. Required.
"carrierService": "A String", # Carrier service, such as "ground" or "2 days". The list of supported services for a carrier can be retrieved via the getSupportedCarriers method. Required.
},
],
"singleValue": { # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set. # The value of the rate group (e.g. flat rate $10). Can only be set if mainTable and subtables are not set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
"mainTable": { # A table defining the rate group, when singleValue is not expressive enough. Can only be set if singleValue is not set.
"rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's rows. Required.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"rows": [ # The list of rows that constitute the table. Must have the same length as rowHeaders. Required.
{
"cells": [ # The list of cells that constitute the row. Must have the same length as columnHeaders for two-dimensional tables, a length of 1 for one-dimensional tables. Required.
{ # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
],
},
],
"columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"name": "A String", # Name of the table. Required for subtables, ignored for the main table.
},
"subtables": [ # A list of subtables referred to by mainTable. Can only be set if mainTable is set.
{
"rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's rows. Required.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"rows": [ # The list of rows that constitute the table. Must have the same length as rowHeaders. Required.
{
"cells": [ # The list of cells that constitute the row. Must have the same length as columnHeaders for two-dimensional tables, a length of 1 for one-dimensional tables. Required.
{ # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
],
},
],
"columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"name": "A String", # Name of the table. Required for subtables, ignored for the main table.
},
],
},
],
"currency": "A String", # The CLDR code of the currency to which this service applies. Must match that of the prices in rate groups.
"active": True or False, # A boolean exposing the active status of the shipping service. Required.
},
],
"postalCodeGroups": [ # A list of postal code groups that can be referred to in services. Optional.
{
"postalCodeRanges": [ # A range of postal codes. Required.
{
"postalCodeRangeBegin": "A String", # A postal code or a pattern of the form prefix* denoting the inclusive lower bound of the range defining the area. Examples values: "94108", "9410*", "9*". Required.
"postalCodeRangeEnd": "A String", # A postal code or a pattern of the form prefix* denoting the inclusive upper bound of the range defining the area. It must have the same length as postalCodeRangeBegin: if postalCodeRangeBegin is a postal code then postalCodeRangeEnd must be a postal code too; if postalCodeRangeBegin is a pattern then postalCodeRangeEnd must be a pattern with the same prefix length. Optional: if not set, then the area is defined as being all the postal codes matching postalCodeRangeBegin.
},
],
"country": "A String", # The CLDR territory code of the country the postal code group applies to. Required.
"name": "A String", # The name of the postal code group, referred to in headers. Required.
},
],
"accountId": "A String", # The ID of the account to which these account shipping settings belong. Ignored upon update, always present in get request responses.
},
},
],
}</pre>
</div>
<div class="method">
<code class="details" id="get">get(merchantId, accountId)</code>
<pre>Retrieves the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account.
Args:
merchantId: string, The ID of the managing account. (required)
accountId: string, The ID of the account for which to get/update shipping settings. (required)
Returns:
An object of the form:
{ # The merchant account's shipping settings.
"services": [ # The target account's list of services. Optional.
{
"name": "A String", # Free-form name of the service. Must be unique within target account. Required.
"deliveryTime": { # Time spent in various aspects from order to the delivery of the product. Required.
"maxTransitTimeInDays": 42, # Maximum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Must be greater than or equal to minTransitTimeInDays. Required.
"minTransitTimeInDays": 42, # Minimum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Required.
},
"deliveryCountry": "A String", # The CLDR territory code of the country to which the service applies. Required.
"rateGroups": [ # Shipping rate group definitions. Only the last one is allowed to have an empty applicableShippingLabels, which means "everything else". The other applicableShippingLabels must not overlap.
{
"applicableShippingLabels": [ # A list of shipping labels defining the products to which this rate group applies to. This is a disjunction: only one of the labels has to match for the rate group to apply. May only be empty for the last rate group of a service. Required.
"A String",
],
"carrierRates": [ # A list of carrier rates that can be referred to by mainTable or singleValue.
{
"name": "A String", # Name of the carrier rate. Must be unique per rate group. Required.
"originPostalCode": "A String", # Shipping origin for this carrier rate. Required.
"flatAdjustment": { # Additive shipping rate modifier. Can be negative. For example { "value": "1", "currency" : "USD" } adds $1 to the rate, { "value": "-3", "currency" : "USD" } removes $3 from the rate. Optional.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
"percentageAdjustment": "A String", # Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example "5.4" increases the rate by 5.4%, "-3" decreases the rate by 3%. Optional.
"carrierName": "A String", # Carrier service, such as "UPS" or "Fedex". The list of supported carriers can be retrieved via the getSupportedCarriers method. Required.
"carrierService": "A String", # Carrier service, such as "ground" or "2 days". The list of supported services for a carrier can be retrieved via the getSupportedCarriers method. Required.
},
],
"singleValue": { # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set. # The value of the rate group (e.g. flat rate $10). Can only be set if mainTable and subtables are not set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
"mainTable": { # A table defining the rate group, when singleValue is not expressive enough. Can only be set if singleValue is not set.
"rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's rows. Required.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"rows": [ # The list of rows that constitute the table. Must have the same length as rowHeaders. Required.
{
"cells": [ # The list of cells that constitute the row. Must have the same length as columnHeaders for two-dimensional tables, a length of 1 for one-dimensional tables. Required.
{ # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
],
},
],
"columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"name": "A String", # Name of the table. Required for subtables, ignored for the main table.
},
"subtables": [ # A list of subtables referred to by mainTable. Can only be set if mainTable is set.
{
"rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's rows. Required.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"rows": [ # The list of rows that constitute the table. Must have the same length as rowHeaders. Required.
{
"cells": [ # The list of cells that constitute the row. Must have the same length as columnHeaders for two-dimensional tables, a length of 1 for one-dimensional tables. Required.
{ # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
],
},
],
"columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"name": "A String", # Name of the table. Required for subtables, ignored for the main table.
},
],
},
],
"currency": "A String", # The CLDR code of the currency to which this service applies. Must match that of the prices in rate groups.
"active": True or False, # A boolean exposing the active status of the shipping service. Required.
},
],
"postalCodeGroups": [ # A list of postal code groups that can be referred to in services. Optional.
{
"postalCodeRanges": [ # A range of postal codes. Required.
{
"postalCodeRangeBegin": "A String", # A postal code or a pattern of the form prefix* denoting the inclusive lower bound of the range defining the area. Examples values: "94108", "9410*", "9*". Required.
"postalCodeRangeEnd": "A String", # A postal code or a pattern of the form prefix* denoting the inclusive upper bound of the range defining the area. It must have the same length as postalCodeRangeBegin: if postalCodeRangeBegin is a postal code then postalCodeRangeEnd must be a postal code too; if postalCodeRangeBegin is a pattern then postalCodeRangeEnd must be a pattern with the same prefix length. Optional: if not set, then the area is defined as being all the postal codes matching postalCodeRangeBegin.
},
],
"country": "A String", # The CLDR territory code of the country the postal code group applies to. Required.
"name": "A String", # The name of the postal code group, referred to in headers. Required.
},
],
"accountId": "A String", # The ID of the account to which these account shipping settings belong. Ignored upon update, always present in get request responses.
}</pre>
</div>
<div class="method">
<code class="details" id="getsupportedcarriers">getsupportedcarriers(merchantId)</code>
<pre>Retrieves supported carriers and carrier services for an account.
Args:
merchantId: string, The ID of the account for which to retrieve the supported carriers. (required)
Returns:
An object of the form:
{
"kind": "content#shippingsettingsGetSupportedCarriersResponse", # Identifies what kind of resource this is. Value: the fixed string "content#shippingsettingsGetSupportedCarriersResponse".
"carriers": [ # A list of supported carriers. May be empty.
{
"services": [ # A list of supported services (e.g., "ground") for that carrier. Contains at least one service.
"A String",
],
"country": "A String", # The CLDR country code of the carrier (e.g., "US"). Always present.
"name": "A String", # The name of the carrier (e.g., "UPS"). Always present.
},
],
}</pre>
</div>
<div class="method">
<code class="details" id="list">list(merchantId, pageToken=None, maxResults=None)</code>
<pre>Lists the shipping settings of the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts.
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 shipping settings.
"kind": "content#shippingsettingsListResponse", # Identifies what kind of resource this is. Value: the fixed string "content#shippingsettingsListResponse".
"resources": [
{ # The merchant account's shipping settings.
"services": [ # The target account's list of services. Optional.
{
"name": "A String", # Free-form name of the service. Must be unique within target account. Required.
"deliveryTime": { # Time spent in various aspects from order to the delivery of the product. Required.
"maxTransitTimeInDays": 42, # Maximum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Must be greater than or equal to minTransitTimeInDays. Required.
"minTransitTimeInDays": 42, # Minimum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Required.
},
"deliveryCountry": "A String", # The CLDR territory code of the country to which the service applies. Required.
"rateGroups": [ # Shipping rate group definitions. Only the last one is allowed to have an empty applicableShippingLabels, which means "everything else". The other applicableShippingLabels must not overlap.
{
"applicableShippingLabels": [ # A list of shipping labels defining the products to which this rate group applies to. This is a disjunction: only one of the labels has to match for the rate group to apply. May only be empty for the last rate group of a service. Required.
"A String",
],
"carrierRates": [ # A list of carrier rates that can be referred to by mainTable or singleValue.
{
"name": "A String", # Name of the carrier rate. Must be unique per rate group. Required.
"originPostalCode": "A String", # Shipping origin for this carrier rate. Required.
"flatAdjustment": { # Additive shipping rate modifier. Can be negative. For example { "value": "1", "currency" : "USD" } adds $1 to the rate, { "value": "-3", "currency" : "USD" } removes $3 from the rate. Optional.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
"percentageAdjustment": "A String", # Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example "5.4" increases the rate by 5.4%, "-3" decreases the rate by 3%. Optional.
"carrierName": "A String", # Carrier service, such as "UPS" or "Fedex". The list of supported carriers can be retrieved via the getSupportedCarriers method. Required.
"carrierService": "A String", # Carrier service, such as "ground" or "2 days". The list of supported services for a carrier can be retrieved via the getSupportedCarriers method. Required.
},
],
"singleValue": { # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set. # The value of the rate group (e.g. flat rate $10). Can only be set if mainTable and subtables are not set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
"mainTable": { # A table defining the rate group, when singleValue is not expressive enough. Can only be set if singleValue is not set.
"rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's rows. Required.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"rows": [ # The list of rows that constitute the table. Must have the same length as rowHeaders. Required.
{
"cells": [ # The list of cells that constitute the row. Must have the same length as columnHeaders for two-dimensional tables, a length of 1 for one-dimensional tables. Required.
{ # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
],
},
],
"columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"name": "A String", # Name of the table. Required for subtables, ignored for the main table.
},
"subtables": [ # A list of subtables referred to by mainTable. Can only be set if mainTable is set.
{
"rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's rows. Required.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"rows": [ # The list of rows that constitute the table. Must have the same length as rowHeaders. Required.
{
"cells": [ # The list of cells that constitute the row. Must have the same length as columnHeaders for two-dimensional tables, a length of 1 for one-dimensional tables. Required.
{ # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
],
},
],
"columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"name": "A String", # Name of the table. Required for subtables, ignored for the main table.
},
],
},
],
"currency": "A String", # The CLDR code of the currency to which this service applies. Must match that of the prices in rate groups.
"active": True or False, # A boolean exposing the active status of the shipping service. Required.
},
],
"postalCodeGroups": [ # A list of postal code groups that can be referred to in services. Optional.
{
"postalCodeRanges": [ # A range of postal codes. Required.
{
"postalCodeRangeBegin": "A String", # A postal code or a pattern of the form prefix* denoting the inclusive lower bound of the range defining the area. Examples values: "94108", "9410*", "9*". Required.
"postalCodeRangeEnd": "A String", # A postal code or a pattern of the form prefix* denoting the inclusive upper bound of the range defining the area. It must have the same length as postalCodeRangeBegin: if postalCodeRangeBegin is a postal code then postalCodeRangeEnd must be a postal code too; if postalCodeRangeBegin is a pattern then postalCodeRangeEnd must be a pattern with the same prefix length. Optional: if not set, then the area is defined as being all the postal codes matching postalCodeRangeBegin.
},
],
"country": "A String", # The CLDR territory code of the country the postal code group applies to. Required.
"name": "A String", # The name of the postal code group, referred to in headers. Required.
},
],
"accountId": "A String", # The ID of the account to which these account shipping settings belong. Ignored upon update, always present in get request responses.
},
],
}</pre>
</div>
<div class="method">
<code class="details" id="list_next">list_next(previous_request, previous_response)</code>
<pre>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.
</pre>
</div>
<div class="method">
<code class="details" id="patch">patch(merchantId, accountId, body, dryRun=None)</code>
<pre>Updates the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client 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 shipping settings. (required)
body: object, The request body. (required)
The object takes the form of:
{ # The merchant account's shipping settings.
"services": [ # The target account's list of services. Optional.
{
"name": "A String", # Free-form name of the service. Must be unique within target account. Required.
"deliveryTime": { # Time spent in various aspects from order to the delivery of the product. Required.
"maxTransitTimeInDays": 42, # Maximum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Must be greater than or equal to minTransitTimeInDays. Required.
"minTransitTimeInDays": 42, # Minimum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Required.
},
"deliveryCountry": "A String", # The CLDR territory code of the country to which the service applies. Required.
"rateGroups": [ # Shipping rate group definitions. Only the last one is allowed to have an empty applicableShippingLabels, which means "everything else". The other applicableShippingLabels must not overlap.
{
"applicableShippingLabels": [ # A list of shipping labels defining the products to which this rate group applies to. This is a disjunction: only one of the labels has to match for the rate group to apply. May only be empty for the last rate group of a service. Required.
"A String",
],
"carrierRates": [ # A list of carrier rates that can be referred to by mainTable or singleValue.
{
"name": "A String", # Name of the carrier rate. Must be unique per rate group. Required.
"originPostalCode": "A String", # Shipping origin for this carrier rate. Required.
"flatAdjustment": { # Additive shipping rate modifier. Can be negative. For example { "value": "1", "currency" : "USD" } adds $1 to the rate, { "value": "-3", "currency" : "USD" } removes $3 from the rate. Optional.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
"percentageAdjustment": "A String", # Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example "5.4" increases the rate by 5.4%, "-3" decreases the rate by 3%. Optional.
"carrierName": "A String", # Carrier service, such as "UPS" or "Fedex". The list of supported carriers can be retrieved via the getSupportedCarriers method. Required.
"carrierService": "A String", # Carrier service, such as "ground" or "2 days". The list of supported services for a carrier can be retrieved via the getSupportedCarriers method. Required.
},
],
"singleValue": { # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set. # The value of the rate group (e.g. flat rate $10). Can only be set if mainTable and subtables are not set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
"mainTable": { # A table defining the rate group, when singleValue is not expressive enough. Can only be set if singleValue is not set.
"rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's rows. Required.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"rows": [ # The list of rows that constitute the table. Must have the same length as rowHeaders. Required.
{
"cells": [ # The list of cells that constitute the row. Must have the same length as columnHeaders for two-dimensional tables, a length of 1 for one-dimensional tables. Required.
{ # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
],
},
],
"columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"name": "A String", # Name of the table. Required for subtables, ignored for the main table.
},
"subtables": [ # A list of subtables referred to by mainTable. Can only be set if mainTable is set.
{
"rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's rows. Required.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"rows": [ # The list of rows that constitute the table. Must have the same length as rowHeaders. Required.
{
"cells": [ # The list of cells that constitute the row. Must have the same length as columnHeaders for two-dimensional tables, a length of 1 for one-dimensional tables. Required.
{ # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
],
},
],
"columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"name": "A String", # Name of the table. Required for subtables, ignored for the main table.
},
],
},
],
"currency": "A String", # The CLDR code of the currency to which this service applies. Must match that of the prices in rate groups.
"active": True or False, # A boolean exposing the active status of the shipping service. Required.
},
],
"postalCodeGroups": [ # A list of postal code groups that can be referred to in services. Optional.
{
"postalCodeRanges": [ # A range of postal codes. Required.
{
"postalCodeRangeBegin": "A String", # A postal code or a pattern of the form prefix* denoting the inclusive lower bound of the range defining the area. Examples values: "94108", "9410*", "9*". Required.
"postalCodeRangeEnd": "A String", # A postal code or a pattern of the form prefix* denoting the inclusive upper bound of the range defining the area. It must have the same length as postalCodeRangeBegin: if postalCodeRangeBegin is a postal code then postalCodeRangeEnd must be a postal code too; if postalCodeRangeBegin is a pattern then postalCodeRangeEnd must be a pattern with the same prefix length. Optional: if not set, then the area is defined as being all the postal codes matching postalCodeRangeBegin.
},
],
"country": "A String", # The CLDR territory code of the country the postal code group applies to. Required.
"name": "A String", # The name of the postal code group, referred to in headers. Required.
},
],
"accountId": "A String", # The ID of the account to which these account shipping settings belong. Ignored upon update, always present in get request responses.
}
dryRun: boolean, Flag to run the request in dry-run mode.
Returns:
An object of the form:
{ # The merchant account's shipping settings.
"services": [ # The target account's list of services. Optional.
{
"name": "A String", # Free-form name of the service. Must be unique within target account. Required.
"deliveryTime": { # Time spent in various aspects from order to the delivery of the product. Required.
"maxTransitTimeInDays": 42, # Maximum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Must be greater than or equal to minTransitTimeInDays. Required.
"minTransitTimeInDays": 42, # Minimum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Required.
},
"deliveryCountry": "A String", # The CLDR territory code of the country to which the service applies. Required.
"rateGroups": [ # Shipping rate group definitions. Only the last one is allowed to have an empty applicableShippingLabels, which means "everything else". The other applicableShippingLabels must not overlap.
{
"applicableShippingLabels": [ # A list of shipping labels defining the products to which this rate group applies to. This is a disjunction: only one of the labels has to match for the rate group to apply. May only be empty for the last rate group of a service. Required.
"A String",
],
"carrierRates": [ # A list of carrier rates that can be referred to by mainTable or singleValue.
{
"name": "A String", # Name of the carrier rate. Must be unique per rate group. Required.
"originPostalCode": "A String", # Shipping origin for this carrier rate. Required.
"flatAdjustment": { # Additive shipping rate modifier. Can be negative. For example { "value": "1", "currency" : "USD" } adds $1 to the rate, { "value": "-3", "currency" : "USD" } removes $3 from the rate. Optional.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
"percentageAdjustment": "A String", # Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example "5.4" increases the rate by 5.4%, "-3" decreases the rate by 3%. Optional.
"carrierName": "A String", # Carrier service, such as "UPS" or "Fedex". The list of supported carriers can be retrieved via the getSupportedCarriers method. Required.
"carrierService": "A String", # Carrier service, such as "ground" or "2 days". The list of supported services for a carrier can be retrieved via the getSupportedCarriers method. Required.
},
],
"singleValue": { # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set. # The value of the rate group (e.g. flat rate $10). Can only be set if mainTable and subtables are not set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
"mainTable": { # A table defining the rate group, when singleValue is not expressive enough. Can only be set if singleValue is not set.
"rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's rows. Required.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"rows": [ # The list of rows that constitute the table. Must have the same length as rowHeaders. Required.
{
"cells": [ # The list of cells that constitute the row. Must have the same length as columnHeaders for two-dimensional tables, a length of 1 for one-dimensional tables. Required.
{ # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
],
},
],
"columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"name": "A String", # Name of the table. Required for subtables, ignored for the main table.
},
"subtables": [ # A list of subtables referred to by mainTable. Can only be set if mainTable is set.
{
"rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's rows. Required.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"rows": [ # The list of rows that constitute the table. Must have the same length as rowHeaders. Required.
{
"cells": [ # The list of cells that constitute the row. Must have the same length as columnHeaders for two-dimensional tables, a length of 1 for one-dimensional tables. Required.
{ # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
],
},
],
"columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"name": "A String", # Name of the table. Required for subtables, ignored for the main table.
},
],
},
],
"currency": "A String", # The CLDR code of the currency to which this service applies. Must match that of the prices in rate groups.
"active": True or False, # A boolean exposing the active status of the shipping service. Required.
},
],
"postalCodeGroups": [ # A list of postal code groups that can be referred to in services. Optional.
{
"postalCodeRanges": [ # A range of postal codes. Required.
{
"postalCodeRangeBegin": "A String", # A postal code or a pattern of the form prefix* denoting the inclusive lower bound of the range defining the area. Examples values: "94108", "9410*", "9*". Required.
"postalCodeRangeEnd": "A String", # A postal code or a pattern of the form prefix* denoting the inclusive upper bound of the range defining the area. It must have the same length as postalCodeRangeBegin: if postalCodeRangeBegin is a postal code then postalCodeRangeEnd must be a postal code too; if postalCodeRangeBegin is a pattern then postalCodeRangeEnd must be a pattern with the same prefix length. Optional: if not set, then the area is defined as being all the postal codes matching postalCodeRangeBegin.
},
],
"country": "A String", # The CLDR territory code of the country the postal code group applies to. Required.
"name": "A String", # The name of the postal code group, referred to in headers. Required.
},
],
"accountId": "A String", # The ID of the account to which these account shipping settings belong. Ignored upon update, always present in get request responses.
}</pre>
</div>
<div class="method">
<code class="details" id="update">update(merchantId, accountId, body, dryRun=None)</code>
<pre>Updates the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account.
Args:
merchantId: string, The ID of the managing account. (required)
accountId: string, The ID of the account for which to get/update shipping settings. (required)
body: object, The request body. (required)
The object takes the form of:
{ # The merchant account's shipping settings.
"services": [ # The target account's list of services. Optional.
{
"name": "A String", # Free-form name of the service. Must be unique within target account. Required.
"deliveryTime": { # Time spent in various aspects from order to the delivery of the product. Required.
"maxTransitTimeInDays": 42, # Maximum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Must be greater than or equal to minTransitTimeInDays. Required.
"minTransitTimeInDays": 42, # Minimum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Required.
},
"deliveryCountry": "A String", # The CLDR territory code of the country to which the service applies. Required.
"rateGroups": [ # Shipping rate group definitions. Only the last one is allowed to have an empty applicableShippingLabels, which means "everything else". The other applicableShippingLabels must not overlap.
{
"applicableShippingLabels": [ # A list of shipping labels defining the products to which this rate group applies to. This is a disjunction: only one of the labels has to match for the rate group to apply. May only be empty for the last rate group of a service. Required.
"A String",
],
"carrierRates": [ # A list of carrier rates that can be referred to by mainTable or singleValue.
{
"name": "A String", # Name of the carrier rate. Must be unique per rate group. Required.
"originPostalCode": "A String", # Shipping origin for this carrier rate. Required.
"flatAdjustment": { # Additive shipping rate modifier. Can be negative. For example { "value": "1", "currency" : "USD" } adds $1 to the rate, { "value": "-3", "currency" : "USD" } removes $3 from the rate. Optional.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
"percentageAdjustment": "A String", # Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example "5.4" increases the rate by 5.4%, "-3" decreases the rate by 3%. Optional.
"carrierName": "A String", # Carrier service, such as "UPS" or "Fedex". The list of supported carriers can be retrieved via the getSupportedCarriers method. Required.
"carrierService": "A String", # Carrier service, such as "ground" or "2 days". The list of supported services for a carrier can be retrieved via the getSupportedCarriers method. Required.
},
],
"singleValue": { # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set. # The value of the rate group (e.g. flat rate $10). Can only be set if mainTable and subtables are not set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
"mainTable": { # A table defining the rate group, when singleValue is not expressive enough. Can only be set if singleValue is not set.
"rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's rows. Required.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"rows": [ # The list of rows that constitute the table. Must have the same length as rowHeaders. Required.
{
"cells": [ # The list of cells that constitute the row. Must have the same length as columnHeaders for two-dimensional tables, a length of 1 for one-dimensional tables. Required.
{ # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
],
},
],
"columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"name": "A String", # Name of the table. Required for subtables, ignored for the main table.
},
"subtables": [ # A list of subtables referred to by mainTable. Can only be set if mainTable is set.
{
"rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's rows. Required.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"rows": [ # The list of rows that constitute the table. Must have the same length as rowHeaders. Required.
{
"cells": [ # The list of cells that constitute the row. Must have the same length as columnHeaders for two-dimensional tables, a length of 1 for one-dimensional tables. Required.
{ # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
],
},
],
"columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"name": "A String", # Name of the table. Required for subtables, ignored for the main table.
},
],
},
],
"currency": "A String", # The CLDR code of the currency to which this service applies. Must match that of the prices in rate groups.
"active": True or False, # A boolean exposing the active status of the shipping service. Required.
},
],
"postalCodeGroups": [ # A list of postal code groups that can be referred to in services. Optional.
{
"postalCodeRanges": [ # A range of postal codes. Required.
{
"postalCodeRangeBegin": "A String", # A postal code or a pattern of the form prefix* denoting the inclusive lower bound of the range defining the area. Examples values: "94108", "9410*", "9*". Required.
"postalCodeRangeEnd": "A String", # A postal code or a pattern of the form prefix* denoting the inclusive upper bound of the range defining the area. It must have the same length as postalCodeRangeBegin: if postalCodeRangeBegin is a postal code then postalCodeRangeEnd must be a postal code too; if postalCodeRangeBegin is a pattern then postalCodeRangeEnd must be a pattern with the same prefix length. Optional: if not set, then the area is defined as being all the postal codes matching postalCodeRangeBegin.
},
],
"country": "A String", # The CLDR territory code of the country the postal code group applies to. Required.
"name": "A String", # The name of the postal code group, referred to in headers. Required.
},
],
"accountId": "A String", # The ID of the account to which these account shipping settings belong. Ignored upon update, always present in get request responses.
}
dryRun: boolean, Flag to run the request in dry-run mode.
Returns:
An object of the form:
{ # The merchant account's shipping settings.
"services": [ # The target account's list of services. Optional.
{
"name": "A String", # Free-form name of the service. Must be unique within target account. Required.
"deliveryTime": { # Time spent in various aspects from order to the delivery of the product. Required.
"maxTransitTimeInDays": 42, # Maximum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Must be greater than or equal to minTransitTimeInDays. Required.
"minTransitTimeInDays": 42, # Minimum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Required.
},
"deliveryCountry": "A String", # The CLDR territory code of the country to which the service applies. Required.
"rateGroups": [ # Shipping rate group definitions. Only the last one is allowed to have an empty applicableShippingLabels, which means "everything else". The other applicableShippingLabels must not overlap.
{
"applicableShippingLabels": [ # A list of shipping labels defining the products to which this rate group applies to. This is a disjunction: only one of the labels has to match for the rate group to apply. May only be empty for the last rate group of a service. Required.
"A String",
],
"carrierRates": [ # A list of carrier rates that can be referred to by mainTable or singleValue.
{
"name": "A String", # Name of the carrier rate. Must be unique per rate group. Required.
"originPostalCode": "A String", # Shipping origin for this carrier rate. Required.
"flatAdjustment": { # Additive shipping rate modifier. Can be negative. For example { "value": "1", "currency" : "USD" } adds $1 to the rate, { "value": "-3", "currency" : "USD" } removes $3 from the rate. Optional.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
"percentageAdjustment": "A String", # Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example "5.4" increases the rate by 5.4%, "-3" decreases the rate by 3%. Optional.
"carrierName": "A String", # Carrier service, such as "UPS" or "Fedex". The list of supported carriers can be retrieved via the getSupportedCarriers method. Required.
"carrierService": "A String", # Carrier service, such as "ground" or "2 days". The list of supported services for a carrier can be retrieved via the getSupportedCarriers method. Required.
},
],
"singleValue": { # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set. # The value of the rate group (e.g. flat rate $10). Can only be set if mainTable and subtables are not set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
"mainTable": { # A table defining the rate group, when singleValue is not expressive enough. Can only be set if singleValue is not set.
"rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's rows. Required.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"rows": [ # The list of rows that constitute the table. Must have the same length as rowHeaders. Required.
{
"cells": [ # The list of cells that constitute the row. Must have the same length as columnHeaders for two-dimensional tables, a length of 1 for one-dimensional tables. Required.
{ # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
],
},
],
"columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"name": "A String", # Name of the table. Required for subtables, ignored for the main table.
},
"subtables": [ # A list of subtables referred to by mainTable. Can only be set if mainTable is set.
{
"rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's rows. Required.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"rows": [ # The list of rows that constitute the table. Must have the same length as rowHeaders. Required.
{
"cells": [ # The list of cells that constitute the row. Must have the same length as columnHeaders for two-dimensional tables, a length of 1 for one-dimensional tables. Required.
{ # The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set.
"carrierRateName": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
"noShipping": True or False, # If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.
"pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set.
"subtableName": "A String", # The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.
"flatRate": { # A flat rate. Can only be set if all other fields are not set.
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
},
],
},
],
"columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension.
"prices": [ # be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
{
"currency": "A String", # The currency of the price.
"value": "A String", # The price represented as a number.
},
],
"postalCodeGroupNames": [ # A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
"weights": [ # be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
{
"value": "A String", # The weight represented as a number.
"unit": "A String", # The weight unit.
},
],
"locations": [ # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
{
"locationIds": [ # A non-empty list of location IDs. They must all be of the same location type (e.g., state).
"A String",
],
},
],
"numberOfItems": [ # A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 items", " 50 items". Must be non-empty. Can only be set if all other fields are not set.
"A String",
],
},
"name": "A String", # Name of the table. Required for subtables, ignored for the main table.
},
],
},
],
"currency": "A String", # The CLDR code of the currency to which this service applies. Must match that of the prices in rate groups.
"active": True or False, # A boolean exposing the active status of the shipping service. Required.
},
],
"postalCodeGroups": [ # A list of postal code groups that can be referred to in services. Optional.
{
"postalCodeRanges": [ # A range of postal codes. Required.
{
"postalCodeRangeBegin": "A String", # A postal code or a pattern of the form prefix* denoting the inclusive lower bound of the range defining the area. Examples values: "94108", "9410*", "9*". Required.
"postalCodeRangeEnd": "A String", # A postal code or a pattern of the form prefix* denoting the inclusive upper bound of the range defining the area. It must have the same length as postalCodeRangeBegin: if postalCodeRangeBegin is a postal code then postalCodeRangeEnd must be a postal code too; if postalCodeRangeBegin is a pattern then postalCodeRangeEnd must be a pattern with the same prefix length. Optional: if not set, then the area is defined as being all the postal codes matching postalCodeRangeBegin.
},
],
"country": "A String", # The CLDR territory code of the country the postal code group applies to. Required.
"name": "A String", # The name of the postal code group, referred to in headers. Required.
},
],
"accountId": "A String", # The ID of the account to which these account shipping settings belong. Ignored upon update, always present in get request responses.
}</pre>
</div>
</body></html>