Use the Merchant Accounts API to manage the tax and shipping settings for all the products under your account, including sub-accounts.
Changes you make apply to all products. To update the tax and shipping for individual products, use the Merchant Products API.
Tax settings
You can use the accounttax resource to add tax settings for your products that target customers in the US. This updates your tax settings at the account level.
This sample request adds different tax rates for two different locations. (For more information, see Geo targets).
POST https://merchantapi.googleapis.com/accounts/v1beta/{account_id}/accounttax/{account_id}
{
"taxRules": [
{
"regionCode": "US",
"[locationId](/adwords/api/docs/appendix/geotargeting)": 21167,
"useGoogleRate": true,
"shippingTaxed": false
},
{
"locationId": 21137,
"shippingTaxed": true,
"selfSpecifiedRateMicros": 21500
}
// ...
]
}
Shipping settings
The
accounts.shippingSettings
resource lets you retrieve and update the shipping settings of your multi-client
account (MCA) and all associated sub-accounts.
MCAs are usually used by integrators, aggregators, and channel partners who manage online stores and API services for multiple merchants. Merchants who have multiple online stores or brands that are sold on separate websites may also choose to have sub-accounts under a single MCA.
Google can update the estimated delivery time for some products automatically.
Add shipping settings
Use the
accounts.shippingSettings.insert
method to add or update the shipping settings for your account.
The request body should contain the full resource body of the
accounts.shippingSettings
resource, even if you are just updating a single
attribute, as any NULL or missing values in the request body results in
nulling out the existing values.
Set postal code groups
Use the Merchant Accounts API to manage regions, called postalCodeGroups, for a merchant account.
The postalCodeGroups resource is a list of groupings, where each grouping is a list of multiple postal codes that share the same shipping settings.
Use the Merchant API to manage your postalCodeGroups as follows:
Make a get call to retrieve all your shippingsettings and postalCodeGroups.
Copy the shippingsettings from the get call to the update call.
If you don't use transit time labels in your shipping service, remove the following entry from the request body.
"transitTimeLabels": [ "all other labels" ],
Populate the regions you want to use in the postalCodeGroups section for the update call.
Make an update call with the shippingsettings and postalCodeGroups resources.
Add same-day delivery
You can use the Content API for Shopping to configure same-day delivery shipping services if you have local inventory. See Add in-store information to local products (addlocalinventory).
Same-day delivery shipping services have local_delivery as their shipmentType.
The following caveats apply:
- All local_delivery shipping services are considered same-day deliveries.
- You cannot change the deliveryTime information for local deliveries.
To set up same-day delivery for your local inventory products, use the
accounts.shippingSettings.insert
method.
Add next-day delivery
Orders placed after your same-day delivery cutoff time are scheduled for next-day delivery by default.
To turn off next-day delivery, set no_delivery_post_cutoff to true.
If you turn off next-day delivery, your shipping services are only visible before the cutoff time each day.
Next-day delivery is available only when the shipmentType is local_delivery.
Add a return policy
If you list products through Shopping Ads or organic listings, you can use returnpolicyonline to create, view, edit, or delete online return policies with the following attributes:
- Target countries (see Set up your return policies for Shopping Ads and free listings) * Restocking fees
- Return methods
- Return item condition
- Return reason category
- Return policy URLs (see Set up your return policies for Shopping Ads and free listings)
Products sold through Shopping Ads or organic listings don't require a return address.
For more details, see Set up your return policies for Shopping Ads and organic listings.
You can use returnpolicyonline.create to add a return policy. The response includes the updated policy.
POST https://merchantapi.googleapis.com/v1beta/{account_id}/returnpolicyonline