We will sunset v2 of the Content API on March 29th, 2021. To avoid disruptions with your integration, please migrate to v2.1 as soon as possible. For more information, see Migrating to v2.1.

REST Resource: shippingsettings

Resource: ShippingSettings

The merchant account's shipping settings. All methods except getsupportedcarriers and getsupportedholidays require the admin role.

JSON representation
{
  "accountId": string,
  "services": [
    {
      object (Service)
    }
  ],
  "postalCodeGroups": [
    {
      object (PostalCodeGroup)
    }
  ]
}
Fields
accountId

string

The ID of the account to which these account shipping settings belong. Ignored upon update, always present in get request responses.

services[]

object (Service)

The target account's list of services. Optional.

postalCodeGroups[]

object (PostalCodeGroup)

A list of postal code groups that can be referred to in services. Optional.

Service

JSON representation
{
  "name": string,
  "deliveryCountry": string,
  "currency": string,
  "deliveryTime": {
    object (DeliveryTime)
  },
  "rateGroups": [
    {
      object (RateGroup)
    }
  ],
  "active": boolean,
  "minimumOrderValue": {
    object (Price)
  },
  "eligibility": string,
  "shipmentType": string,
  "pickupService": {
    object (PickupCarrierService)
  },
  "minimumOrderValueTable": {
    object (MinimumOrderValueTable)
  }
}
Fields
name

string

Free-form name of the service. Must be unique within target account. Required.

deliveryCountry

string

The CLDR territory code of the country to which the service applies. Required.

currency

string

The CLDR code of the currency to which this service applies. Must match that of the prices in rate groups.

deliveryTime

object (DeliveryTime)

Time spent in various aspects from order to the delivery of the product. Required.

rateGroups[]

object (RateGroup)

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.

active

boolean

A boolean exposing the active status of the shipping service. Required.

minimumOrderValue

object (Price)

Minimum order value for this service. If set, indicates that customers will have to spend at least this amount. All prices within a service must have the same currency. Cannot be set together with minimumOrderValueTable.

eligibility

string

Eligibility for this service.

Acceptable values are:

  • "All scenarios"
  • "All scenarios except Shopping Actions"
  • "Shopping Actions"

shipmentType

string

Type of locations this service ships orders to.

Acceptable values are:

  • "delivery"
  • "pickup"

pickupService

object (PickupCarrierService)

The carrier-service pair delivering items to collection points. The list of supported pickup services can be retrieved via the getSupportedPickupServices method. Required if and only if the service delivery type is pickup.

minimumOrderValueTable

object (MinimumOrderValueTable)

Table of per store minimum order values for the pickup fulfillment type. Cannot be set together with minimumOrderValue.

DeliveryTime

JSON representation
{
  "minTransitTimeInDays": integer,
  "maxTransitTimeInDays": integer,
  "holidayCutoffs": [
    {
      object (HolidayCutoff)
    }
  ],
  "cutoffTime": {
    object (CutoffTime)
  },
  "minHandlingTimeInDays": integer,
  "maxHandlingTimeInDays": integer,
  "transitTimeTable": {
    object (TransitTable)
  },
  "handlingBusinessDayConfig": {
    object (BusinessDayConfig)
  },
  "transitBusinessDayConfig": {
    object (BusinessDayConfig)
  }
}
Fields
minTransitTimeInDays

integer (uint32 format)

Minimum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Either {min,max}TransitTimeInDays or transitTimeTable must be set, but not both.

maxTransitTimeInDays

integer (uint32 format)

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.

holidayCutoffs[]

object (HolidayCutoff)

Holiday cutoff definitions. If configured, they specify order cutoff times for holiday-specific shipping.

cutoffTime

object (CutoffTime)

Business days cutoff time definition. If not configured the cutoff time will be defaulted to 8AM PST.

minHandlingTimeInDays

integer (uint32 format)

Minimum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped.

maxHandlingTimeInDays

integer (uint32 format)

Maximum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped. Must be greater than or equal to minHandlingTimeInDays.

transitTimeTable

object (TransitTable)

Transit time table, number of business days spent in transit based on row and column dimensions. Either {min,max}TransitTimeInDays or transitTimeTable can be set, but not both.

handlingBusinessDayConfig

object (BusinessDayConfig)

The business days during which orders can be handled. If not provided, Monday to Friday business days will be assumed.

transitBusinessDayConfig

object (BusinessDayConfig)

The business days during which orders can be in-transit. If not provided, Monday to Friday business days will be assumed.

HolidayCutoff

JSON representation
{
  "holidayId": string,
  "deadlineDate": string,
  "deadlineHour": integer,
  "deadlineTimezone": string,
  "visibleFromDate": string
}
Fields
holidayId

string

Unique identifier for the holiday. Required.

deadlineDate

string

Date of the order deadline, in ISO 8601 format. E.g. "2016-11-29" for 29th November 2016. Required.

deadlineHour

integer (uint32 format)

Hour of the day on the deadline date until which the order has to be placed to qualify for the delivery guarantee. Possible values are: 0 (midnight), 1, ..., 12 (noon), 13, ..., 23. Required.

deadlineTimezone

string

Timezone identifier for the deadline hour. A list of identifiers can be found in the AdWords API documentation. E.g. "Europe/Zurich". Required.

visibleFromDate

string

Date on which the deadline will become visible to consumers in ISO 8601 format. E.g. "2016-10-31" for 31st October 2016. Required.

CutoffTime

JSON representation
{
  "hour": integer,
  "minute": integer,
  "timezone": string
}
Fields
hour

integer (uint32 format)

Hour of the cutoff time until which an order has to be placed to be processed in the same day. Required.

minute

integer (uint32 format)

Minute of the cutoff time until which an order has to be placed to be processed in the same day. Required.

timezone

string

Timezone identifier for the cutoff time. A list of identifiers can be found in the AdWords API documentation. E.g. "Europe/Zurich". Required.

TransitTable

JSON representation
{
  "postalCodeGroupNames": [
    string
  ],
  "transitTimeLabels": [
    string
  ],
  "rows": [
    {
      object (TransitTableTransitTimeRow)
    }
  ]
}
Fields
postalCodeGroupNames[]

string

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.

transitTimeLabels[]

string

A list of transit time labels. The last value can be "all other labels". Example: ["food", "electronics", "all other labels"].

rows[]

object (TransitTableTransitTimeRow)

TransitTableTransitTimeRow

JSON representation
{
  "values": [
    {
      object (TransitTableTransitTimeRowTransitTimeValue)
    }
  ]
}
Fields
values[]

object (TransitTableTransitTimeRowTransitTimeValue)

TransitTableTransitTimeRowTransitTimeValue

JSON representation
{
  "minTransitTimeInDays": integer,
  "maxTransitTimeInDays": integer
}
Fields
minTransitTimeInDays

integer (uint32 format)

Transit time range (min-max) in business days. 0 means same day delivery, 1 means next day delivery.

maxTransitTimeInDays

integer (uint32 format)

Must be greater than or equal to minTransitTimeInDays.

BusinessDayConfig

JSON representation
{
  "businessDays": [
    string
  ]
}
Fields
businessDays[]

string

Regular business days. May not be empty.

RateGroup

JSON representation
{
  "applicableShippingLabels": [
    string
  ],
  "singleValue": {
    object (Value)
  },
  "mainTable": {
    object (Table)
  },
  "subtables": [
    {
      object (Table)
    }
  ],
  "carrierRates": [
    {
      object (CarrierRate)
    }
  ],
  "name": string
}
Fields
applicableShippingLabels[]

string

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.

singleValue

object (Value)

The value of the rate group (e.g. flat rate $10). Can only be set if mainTable and subtables are not set.

mainTable

object (Table)

A table defining the rate group, when singleValue is not expressive enough. Can only be set if singleValue is not set.

subtables[]

object (Table)

A list of subtables referred to by mainTable. Can only be set if mainTable is set.

carrierRates[]

object (CarrierRate)

A list of carrier rates that can be referred to by mainTable or singleValue.

name

string

Name of the rate group. Optional. If set has to be unique within shipping service.

Value

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.

JSON representation
{
  "noShipping": boolean,
  "flatRate": {
    object (Price)
  },
  "pricePercentage": string,
  "carrierRateName": string,
  "subtableName": string
}
Fields
noShipping

boolean

If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.

flatRate

object (Price)

A flat rate. Can only be set if all other fields are not set.

pricePercentage

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.

carrierRateName

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.

subtableName

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.

Table

JSON representation
{
  "name": string,
  "rowHeaders": {
    object (Headers)
  },
  "columnHeaders": {
    object (Headers)
  },
  "rows": [
    {
      object (Row)
    }
  ]
}
Fields
name

string

Name of the table. Required for subtables, ignored for the main table.

rowHeaders

object (Headers)

Headers of the table's rows. Required.

columnHeaders

object (Headers)

Headers of the table's columns. Optional: if not set then the table has only one dimension.

rows[]

object (Row)

The list of rows that constitute the table. Must have the same length as rowHeaders. Required.

Headers

A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or location must be set.

JSON representation
{
  "prices": [
    {
      object (Price)
    }
  ],
  "weights": [
    {
      object (Weight)
    }
  ],
  "numberOfItems": [
    string
  ],
  "postalCodeGroupNames": [
    string
  ],
  "locations": [
    {
      object (LocationIdSet)
    }
  ]
}
Fields
prices[]

object (Price)

A list of inclusive order price upper bounds. The last price's value can be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] represents the headers "<= $10", "<= $500", and "> $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.

weights[]

object (Weight)

A list of inclusive order weight upper bounds. The last weight's value can be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers "<= 10kg", "<= 50kg", and "> 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.

numberOfItems[]

string

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", and "> 50 items". Must be non-empty. Can only be set if all other fields are not set.

postalCodeGroupNames[]

string

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.

locations[]

object (LocationIdSet)

A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.

Weight

JSON representation
{
  "value": string,
  "unit": string
}
Fields
value

string

Required. The weight represented as a number.

unit

string

Required. The weight unit.

Acceptable values are:

  • "kg"
  • "lb"

LocationIdSet

JSON representation
{
  "locationIds": [
    string
  ]
}
Fields
locationIds[]

string

A non-empty list of location IDs. They must all be of the same location type (e.g., state).

Row

JSON representation
{
  "cells": [
    {
      object (Value)
    }
  ]
}
Fields
cells[]

object (Value)

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.

CarrierRate

JSON representation
{
  "name": string,
  "carrierName": string,
  "carrierService": string,
  "originPostalCode": string,
  "percentageAdjustment": string,
  "flatAdjustment": {
    object (Price)
  }
}
Fields
name

string

Name of the carrier rate. Must be unique per rate group. Required.

carrierName

string

Carrier service, such as "UPS" or "Fedex". The list of supported carriers can be retrieved via the getSupportedCarriers method. Required.

carrierService

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.

originPostalCode

string

Shipping origin for this carrier rate. Required.

percentageAdjustment

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.

flatAdjustment

object (Price)

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.

PickupCarrierService

JSON representation
{
  "carrierName": string,
  "serviceName": string
}
Fields
carrierName

string

The name of the pickup carrier (e.g., "UPS"). Required.

serviceName

string

The name of the pickup service (e.g., "Access point"). Required.

MinimumOrderValueTable

JSON representation
{
  "storeCodeSetWithMovs": [
    {
      object (MinimumOrderValueTableStoreCodeSetWithMov)
    }
  ]
}
Fields
storeCodeSetWithMovs[]

object (MinimumOrderValueTableStoreCodeSetWithMov)

MinimumOrderValueTableStoreCodeSetWithMov

A list of store code sets sharing the same minimum order value. At least two sets are required and the last one must be empty, which signifies 'MOV for all other stores'. Each store code can only appear once across all the sets. All prices within a service must have the same currency.

JSON representation
{
  "storeCodes": [
    string
  ],
  "value": {
    object (Price)
  }
}
Fields
storeCodes[]

string

A list of unique store codes or empty for the catch all.

value

object (Price)

The minimum order value for the given stores.

PostalCodeGroup

JSON representation
{
  "name": string,
  "country": string,
  "postalCodeRanges": [
    {
      object (PostalCodeRange)
    }
  ]
}
Fields
name

string

The name of the postal code group, referred to in headers. Required.

country

string

The CLDR territory code of the country the postal code group applies to. Required.

postalCodeRanges[]

object (PostalCodeRange)

A range of postal codes. Required.

PostalCodeRange

JSON representation
{
  "postalCodeRangeBegin": string,
  "postalCodeRangeEnd": string
}
Fields
postalCodeRangeBegin

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

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.

Methods

custombatch

Retrieves and updates the shipping settings of multiple accounts in a single request.

get

Retrieves the shipping settings of the account.

getsupportedcarriers

Retrieves supported carriers and carrier services for an account.

getsupportedholidays

Retrieves supported holidays for an account.

getsupportedpickupservices

Retrieves supported pickup services for an account.

list

Lists the shipping settings of the sub-accounts in your Merchant Center account.

update

Updates the shipping settings of the account.