The
ShippingSettings
resource lets you retrieve and update the shipping settings of your account and
all the sub-accounts associated with it. For more information about how you can
add or manage your account's shipping settings, see Overview of shipping
settings.
To use the Merchant API to read shipping settings information, use the following requests:
GET https://merchantapi.googleapis.com/accounts/v1beta/accounts/{accountId}/shippingSettings
Replace {accountId} with the unique identifier of your Merchant Center account.
To use the Merchant API to update shipping settings information, use the following requests:
POST https://merchantapi.googleapis.com/accounts/v1beta/accounts/{accountId}/shippingSettings:insert
For more information, see Method:
accounts.shippingSettings.insert
.
Comparison between Content API for Shopping and Merchant API
Here's a sample comparison of the Content API for Shopping to the Merchant Shipping settings API:
Content API | Merchant API | |
---|---|---|
URL | https://shoppingcontent.googleapis.com/content/v2.1/ {accountId}/shippingsettings:insert |
https://merchantapi.googleapis.com/accounts/v1beta/accounts/ {accountId}/shippingSettings:insert |
Identifiers | {accountId}/shippingsettings/ {accountId} |
{name} |
The following list mentions the major updates in Merchant Shipping settings API compared to Content API for Shopping:
- Merchant API users must put
accounts/{accountId}/shippingSettings
into the {name} field in order to have the same behavior. - Merchant API doesn't support read and write operations on custom areas, such as location groups. Custom areas like location groups can only be read or written using the region service.
- The way to set up
WarehouseBasedDeliveryTime
is different for Merchant API compared to Content API for Shopping. If you are using Merchant API, you must define warehouse information undershippingsettings.warehouses
. Then each shipping service can reference the warehouse through warehouse name underwarehouseBaseDeliveryTime
. - One service in Merchant API supports multiple delivery countries.
New supported fields
Merchant Shipping settings API supports the following new fields compared to Content API for Shopping:
- Warehouses: Provides information about a fulfillment warehouse, which stores and handles inventory.
- Loyalty programs: Merchant API users can input loyalty program information to their shipping settings.
- Etag: Etag is designed to resolve async issues when different users try to update shipping settings using Merchant API and Merchant Center UI at the same time.
Renamed fields
The following fields have been renamed in the Merchant API:
Content API for Shopping | Merchant Shipping settings API | Description |
---|---|---|
service |
services |
A single shipping service. |
service.name |
services.serviceName |
Free-form name of the service that must be unique within your Merchant Center account. |
service.deliveryCountry |
services.deliveryCountries |
The CLDR territory code of the country to which the shipping service applies. |
service.currency |
services.currencyCode |
The CLDR code of the currency to which this service applies. |
service.deliveryTime.minTransitTimeInDays |
services.deliveryTime.minTransitDays |
Minimum number of business days that an order spends in transit. For example, 0 means same day delivery and 1 means next day delivery. |
service.deliveryTime.maxTransitTimeInDays |
services.deliveryTime.maxTransitDays |
Maximum number of business days that an order spends in transit. |
service.deliveryTime.minHandlingTimeInDays |
services.deliveryTime.minHandlingDays |
Minimum number of business days spent before an order is shipped. |
service.deliveryTime.maxHandlingTimeInDays |
services.deliveryTime.maxHandlingDays |
Maximum number of business days spent before an order is shipped. |
service.deliveryTime.cutoffTime.timezone |
services.deliveryTime.cutoffTime.timeZone |
Timezone identifier for the cutoff time. |
service.deliveryTime.transitTimeTable.postalCodeGroupName |
services.deliveryTime.transitTimeTable.postalCodeGroupNames |
The name of the postal code group. |
service.deliveryTime.transitTimeTable.transitTimeLabel |
services.deliveryTime.transitTimeTable.transitTimeLabel |
The transit time label of the product. |
service.rate_group |
services.rateGroups |
Shipping rate group definitions. |
service.rate_group.subtable |
services.rateGroups.subtables |
A list of subtables. |
service.rate_group.carrier_rate |
services.rateGroups.carrierRates |
A list of carrier rates. |
service.minimumOrderValueTable.storeCodeSetWithMovs |
services.minimumOrderValueTable.storeCodeSetWithMovs |
A list of store code sets sharing the same minimum order value. |
Deprecated methods
You cannot use shippingsettings.custombatch
to retrieve and
update the shipping settings of multiple accounts in a single request.
Deprecated fields
The following fields from Content API are deprecated in Merchant API. Merchant API doesn't provide any alternative for these fields.
postal_code_group
service
Pickup_service
Eligibility
Scheduling_channel
Delivery_time
Holiday_cutoff
Min_scheduling_time_in_days
Max_scheduling_time_in_days
Scheduling_business_day_config
Rate_group
single_value_alternative_list
Methods
Here's a comparison of the methods in the Content API for Shopping and the Merchant Shipping settings API:
Method | Content API for Shopping | Merchant API |
---|---|---|
customBatch |
Yes | No |
get |
Yes | Yes |
update |
Yes | No |
insert |
No | Yes |
getSupportedCarrier |
Yes | No |
getSupportedHolidays |
Yes | No |