借助 shippingsettings
资源,您可以检索和更新多客户帐号 (MCA) 以及与其关联的所有子帐号的配送设置。
MCA 通常供为多个商家管理网店和 API 服务的集成商、集合商家和渠道合作伙伴使用。如果商家拥有多个网店或品牌,并在不同的网站上销售商品,也可以选择在一个 MCA 下拥有子帐号。
Google 可以自动更新某些商品的预计送货时间。 如需了解详情,请参阅启用自动改进。
shippingsettings.list
如果使用的是 MCA 帐号,则 shippingsettings.list
调用会返回一个帐号或所有子帐号的所有配送资源信息。
shippingsettings.list
方法的示例网址:
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/shippingsettings
以下是一个 JSON 响应示例,显示了 MCA 账号的子账号 1111
和 2222
的配送设置:
{
"kind": "content#shippingsettingsListResponse",
"resources": [
{
"accountId": "1111",
"services": [
{
"name": "Standard Shipping",
"active": true,
"deliveryCountry": "US",
"currency": "USD",
"deliveryTime": {
"minHandlingTimeInDays": 0,
"maxHandlingTimeInDays": 1,
"transitTimeTable": {
"postalCodeGroupNames": [
"Region1",
"Region2",
"all other locations"
],
"transitTimeLabels": [
"all other labels"
],
"rows": [
{
"values": [
{
"minTransitTimeInDays": 1,
"maxTransitTimeInDays": 2
}
]
},
{
"values": [
{
"minTransitTimeInDays": 2,
"maxTransitTimeInDays": 3
}
]
},
{
"values": [
{
"minTransitTimeInDays": 3,
"maxTransitTimeInDays": 5
}
]
}
]
}
},
"rateGroups": [
{
"singleValue": {
"flatRate": {
"value": "0",
"currency": "USD"
}
},
"name": "Standard Shipping"
}
],
"eligibility": "All scenarios"
},
{
"name": "Expedited",
"active": true,
"deliveryCountry": "US",
"currency": "USD",
"deliveryTime": {
"minTransitTimeInDays": 2,
"maxTransitTimeInDays": 2,
"minHandlingTimeInDays": 0,
"maxHandlingTimeInDays": 1
},
"rateGroups": [
{
"singleValue": {
"flatRate": {
"value": "9.99",
"currency": "USD"
}
},
"name": "Expedited"
}
],
"eligibility": "All scenarios"
}
],
"postalCodeGroups": [
{
"name": "Region1",
"country": "US",
"postalCodeRanges": [
{
"postalCodeRangeBegin": "94035",
"postalCodeRangeEnd": "94070"
}
]
},
{
"name": "Region2",
"country": "US",
"postalCodeRanges": [
{
"postalCodeRangeBegin": "94071",
"postalCodeRangeEnd": "94082"
}
]
}
]
},
{
"accountId": "2222",
"services": [
{
"name": "FedEx",
"active": true,
"deliveryCountry": "US",
"currency": "USD",
"deliveryTime": {
"minTransitTimeInDays": 4,
"maxTransitTimeInDays": 6,
"minHandlingTimeInDays": 0,
"maxHandlingTimeInDays": 0
},
"rateGroups": [
{
"singleValue": {
"flatRate": {
"value": "5.99",
"currency": "USD"
}
},
"name": "All products"
}
],
"eligibility": "All scenarios except Shopping Actions"
},
{
"name": "GSA Shipping - Free Ship Over $49.99",
"active": true,
"deliveryCountry": "US",
"currency": "USD",
"deliveryTime": {
"minTransitTimeInDays": 3,
"maxTransitTimeInDays": 7,
"minHandlingTimeInDays": 1,
"maxHandlingTimeInDays": 2
},
"rateGroups": [
{
"mainTable": {
"rowHeaders": {
"prices": [
{
"value": "49.99",
"currency": "USD"
},
{
"value": "infinity",
"currency": "USD"
}
]
},
"rows": [
{
"cells": [
{
"flatRate": {
"value": "6.99",
"currency": "USD"
}
}
]
},
{
"cells": [
{
"flatRate": {
"value": "0",
"currency": "USD"
}
}
]
}
]
},
"name": "Free Ship Over $49.99"
}
],
"eligibility": "Shopping Actions"
}
]
}
]
}
shippingsettings.get
通过 shippingsettings.get
调用,MCA 帐号可以获得单个子帐号的配送设置信息,或者通过独立帐号获取自己的帐号状态信息。
请使用以下调用来获取配送设置信息,其中 merchantId
是 MCA 帐号,accountId
是其子帐号。如果 Merchant Center 帐号不是多客户帐号,shippingsettings.get
仍然可以返回配送设置信息。在这种情况下,请为 merchantId
和 accountId
参数使用相同的 Merchant Center 帐号。
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/shippingsettings/accountId
以下是子帐号的示例 JSON 响应,该帐号通过用于 list
调用的 MCA 帐号配置了 Standard
和 Expedited
配送服务:
{
"accountId": "1111",
"services": [
{
"name": "Standard Shipping",
"active": true,
"deliveryCountry": "US",
"currency": "USD",
"deliveryTime": {
"minHandlingTimeInDays": 0,
"maxHandlingTimeInDays": 1,
"transitTimeTable": {
"postalCodeGroupNames": [
"Region1",
"Region2",
"all other locations"
],
"transitTimeLabels": [
"all other labels"
],
"rows": [
{
"values": [
{
"minTransitTimeInDays": 1,
"maxTransitTimeInDays": 2
}
]
},
{
"values": [
{
"minTransitTimeInDays": 2,
"maxTransitTimeInDays": 3
}
]
},
{
"values": [
{
"minTransitTimeInDays": 3,
"maxTransitTimeInDays": 5
}
]
}
]
}
},
"rateGroups": [
{
"singleValue": {
"flatRate": {
"value": "0",
"currency": "USD"
}
},
"name": "Standard Shipping"
}
],
"eligibility": "All scenarios"
},
{
"name": "Expedited",
"active": true,
"deliveryCountry": "US",
"currency": "USD",
"deliveryTime": {
"minTransitTimeInDays": 2,
"maxTransitTimeInDays": 2,
"minHandlingTimeInDays": 0,
"maxHandlingTimeInDays": 1
},
"rateGroups": [
{
"singleValue": {
"flatRate": {
"value": "9.99",
"currency": "USD"
}
},
"name": "Expedited"
}
],
"eligibility": "All scenarios"
}
],
"postalCodeGroups": [
{
"name": "Region1",
"country": "US",
"postalCodeRanges": [
{
"postalCodeRangeBegin": "94035",
"postalCodeRangeEnd": "94070"
}
]
},
{
"name": "Region2",
"country": "US",
"postalCodeRanges": [
{
"postalCodeRangeBegin": "94071",
"postalCodeRangeEnd": "94082"
}
]
}
]
}
shippingsettings.update
借助 shippingsettings.update
调用,MCA 帐号可以更新单个子帐号或独立帐号的配送设置信息。
PUT https://shoppingcontent.googleapis.com/content/v2.1/merchantId/shippingsettings/accountId
以下是一个示例 JSON 请求正文,用于将账号 ID 为 2222
且 MCA merchange ID 为 10
的子账号的配送服务 GSA Shipping - Free Ship Over $49.99
的 maxTransitTimeInDays
更新为 7
。
{
...
"services": [
{
"name": "FedEx",
"active": true,
"deliveryCountry": "US",
"currency": "USD",
"deliveryTime": {
"minTransitTimeInDays": 4,
"maxTransitTimeInDays": 6,
"minHandlingTimeInDays": 0,
"maxHandlingTimeInDays": 0
},
"rateGroups": [
{
"singleValue": {
"flatRate": {
"value": "5.99",
"currency": "USD"
}
},
"name": "All products"
}
],
"eligibility": "All scenarios except Shopping Actions"
},
{
"name": "GSA Shipping - Free Ship Over $49.99",
"active": true,
"deliveryCountry": "US",
"currency": "USD",
"deliveryTime": {
"minTransitTimeInDays": 3,
"maxTransitTimeInDays": 7,
"minHandlingTimeInDays": 1,
"maxHandlingTimeInDays": 2
},
"rateGroups": [
{
"mainTable": {
"rowHeaders": {
"prices": [
{
"value": "49.99",
"currency": "USD"
},
{
"value": "infinity",
"currency": "USD"
}
]
},
"rows": [
{
"cells": [
{
"flatRate": {
"value": "6.99",
"currency": "USD"
}
}
]
},
{
"cells": [
{
"flatRate": {
"value": "0",
"currency": "USD"
}
}
]
}
]
},
"name": "Free Ship Over $49.99"
}
],
"eligibility": "Shopping Actions"
}
]
}
}
以下是 JSON 响应正文示例:
{
"accountId": "2222",
"services": [
{
"name": "FedEx",
"active": true,
"deliveryCountry": "US",
"currency": "USD",
"deliveryTime": {
"minTransitTimeInDays": 4,
"maxTransitTimeInDays": 6,
"minHandlingTimeInDays": 0,
"maxHandlingTimeInDays": 0
},
"rateGroups": [
{
"singleValue": {
"flatRate": {
"value": "5.99",
"currency": "USD"
}
},
"name": "All products"
}
],
"eligibility": "All scenarios except Shopping Actions"
},
{
"name": "GSA Shipping - Free Ship Over $49.99",
"active": true,
"deliveryCountry": "US",
"currency": "USD",
"deliveryTime": {
"minTransitTimeInDays": 3,
"maxTransitTimeInDays": 7,
"minHandlingTimeInDays": 1,
"maxHandlingTimeInDays": 2
},
"rateGroups": [
{
"mainTable": {
"rowHeaders": {
"prices": [
{
"value": "49.99",
"currency": "USD"
},
{
"value": "infinity",
"currency": "USD"
}
]
},
"rows": [
{
"cells": [
{
"flatRate": {
"value": "6.99",
"currency": "USD"
}
}
]
},
{
"cells": [
{
"flatRate": {
"value": "0",
"currency": "USD"
}
}
]
}
]
},
"name": "Free Ship Over $49.99"
}
],
"eligibility": "Shopping Actions"
}
]
}
shippingsettings.custombatch
shippingsettings.custombatch
调用可检索或更新一个多客户帐号中多个子帐号的配送设置信息。
JSON 请求包含 MCA 帐号的 merchantId
、子帐号的 accountId
、唯一的 batchId
,以及设置为 get
的 method
(用于检索运费设置),以及 update
(用于修改运费设置)。
POST https://shoppingcontent.googleapis.com/content/v2.1/shippingsettings/batch
以下示例 JSON 请求正文包含两个部分:
batchId=1
,用于检索账号 ID1111
的运费设置。batchId=2
,用于将配送服务GSA Shipping - Free Ship Over $49.99
的maxTransitTimeInDays
更新为8
。(此设置已从shippingsettings.update
的先前响应正文示例中显示的帐号 ID2222
更改为7
)。
{
"entries": [
{
"accountId": 1111,
"merchantId": 10,
"method": "get",
"batchId": 1
},
{
"accountId": 2222,
"merchantId": 10,
"method": "update",
"batchId": 2,
"shippingSettings": {
"services": [
{
"name": "FedEx",
"active": true,
"deliveryCountry": "US",
"currency": "USD",
"deliveryTime": {
"minTransitTimeInDays": 4,
"maxTransitTimeInDays": 5,
"minHandlingTimeInDays": 0,
"maxHandlingTimeInDays": 0
},
"rateGroups": [
{
"singleValue": {
"flatRate": {
"value": "5.99",
"currency": "USD"
}
},
"name": "All products"
}
],
"eligibility": "All scenarios except Shopping Actions"
},
{
"name": "GSA Shipping - Free Ship Over $49.99",
"active": true,
"deliveryCountry": "US",
"currency": "USD",
"deliveryTime": {
"minTransitTimeInDays": 3,
"maxTransitTimeInDays": 8,
"minHandlingTimeInDays": 1,
"maxHandlingTimeInDays": 2
},
"rateGroups": [
{
"mainTable": {
"rowHeaders": {
"prices": [
{
"value": "49.99",
"currency": "USD"
},
{
"value": "infinity",
"currency": "USD"
}
]
},
"rows": [
{
"cells": [
{
"flatRate": {
"value": "6.99",
"currency": "USD"
}
}
]
},
{
"cells": [
{
"flatRate": {
"value": "0",
"currency": "USD"
}
}
]
}
]
},
"name": "Free Ship Over $49.99"
}
],
"eligibility": "Shopping Actions"
}
]
}
}
]
}
以下是 JSON 响应正文示例:
{
"kind": "content#shippingsettingsCustomBatchResponse",
"entries": [
{
"kind": "content#shippingsettingsCustomBatchResponseEntry",
"batchId": 1,
"shippingSettings": {
"accountId": "1111",
"services": [
{
"name": "Standard Shipping",
"active": true,
"deliveryCountry": "US",
"currency": "USD",
"deliveryTime": {
"minHandlingTimeInDays": 0,
"maxHandlingTimeInDays": 1,
"transitTimeTable": {
"postalCodeGroupNames": [
"Region1",
"Region2",
"all other locations"
],
"transitTimeLabels": [
"all other labels"
],
"rows": [
{
"values": [
{
"minTransitTimeInDays": 1,
"maxTransitTimeInDays": 2
}
]
},
{
"values": [
{
"minTransitTimeInDays": 2,
"maxTransitTimeInDays": 3
}
]
},
{
"values": [
{
"minTransitTimeInDays": 3,
"maxTransitTimeInDays": 5
}
]
}
]
}
},
"rateGroups": [
{
"singleValue": {
"flatRate": {
"value": "0",
"currency": "USD"
}
},
"name": "Standard Shipping"
}
],
"eligibility": "All scenarios"
},
{
"name": "Expedited",
"active": true,
"deliveryCountry": "US",
"currency": "USD",
"deliveryTime": {
"minTransitTimeInDays": 2,
"maxTransitTimeInDays": 2,
"minHandlingTimeInDays": 0,
"maxHandlingTimeInDays": 1
},
"rateGroups": [
{
"singleValue": {
"flatRate": {
"value": "9.99",
"currency": "USD"
}
},
"name": "Expedited"
}
],
"eligibility": "All scenarios"
}
],
"postalCodeGroups": [
{
"name": "Region1",
"country": "US",
"postalCodeRanges": [
{
"postalCodeRangeBegin": "94035",
"postalCodeRangeEnd": "94070"
}
]
},
{
"name": "Region2",
"country": "US",
"postalCodeRanges": [
{
"postalCodeRangeBegin": "94071",
"postalCodeRangeEnd": "94082"
}
]
}
]
}
},
{
"kind": "content#shippingsettingsCustomBatchResponseEntry",
"batchId": 2,
"shippingSettings": {
"accountId": "2222",
"services": [
{
"name": "FedEx",
"active": true,
"deliveryCountry": "US",
"currency": "USD",
"deliveryTime": {
"minTransitTimeInDays": 4,
"maxTransitTimeInDays": 5,
"minHandlingTimeInDays": 0,
"maxHandlingTimeInDays": 0
},
"rateGroups": [
{
"singleValue": {
"flatRate": {
"value": "5.99",
"currency": "USD"
}
},
"name": "All products"
}
],
"eligibility": "All scenarios except Shopping Actions"
},
{
"name": "GSA Shipping - Free Ship Over $49.99",
"active": true,
"deliveryCountry": "US",
"currency": "USD",
"deliveryTime": {
"minTransitTimeInDays": 3,
"maxTransitTimeInDays": 8,
"minHandlingTimeInDays": 1,
"maxHandlingTimeInDays": 2
},
"rateGroups": [
{
"mainTable": {
"rowHeaders": {
"prices": [
{
"value": "49.99",
"currency": "USD"
},
{
"value": "infinity",
"currency": "USD"
}
]
},
"rows": [
{
"cells": [
{
"flatRate": {
"value": "6.99",
"currency": "USD"
}
}
]
},
{
"cells": [
{
"flatRate": {
"value": "0",
"currency": "USD"
}
}
]
}
]
},
"name": "Free Ship Over $49.99"
}
],
"eligibility": "Shopping Actions"
}
]
}
}
]
}
shippingsettings.getsupportedcarriers
shippingsettings.getsupportedcarriers
调用允许 MCA 帐号或独立帐号获取其支持的运营商。
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/supportedCarriers
以下是 JSON 响应正文示例:
{
"kind": "content#shippingsettingsGetSupportedCarriersResponse",
"carriers": [
{
"name": "FedEx",
"country": "US",
"services": [
"Ground",
"Home Delivery",
"Express Saver",
"First Overnight",
"Priority Overnight",
"Standard Overnight",
"2Day"
]
},
{
"name": "UPS",
"country": "US",
"services": [
"2nd Day Air",
"2nd Day Air AM",
"3 Day Select",
"Ground",
"Next Day Air",
"Next Day Air Early AM",
"Next Day Air Saver"
]
},
{
"name": "USPS",
"country": "US",
"services": [
"Priority Mail Express",
"Media Mail",
"Retail Ground",
"Priority Mail",
"First Class Package Service Retail",
"First Class Package Service Commercial Base"
]
},
{
"name": "Australia Post",
"country": "AU",
"services": [
"Regular Parcel",
"Express Post"
]
},
{
"name": "TNT",
"country": "AU",
"services": [
"Road Express",
"Overnight Express"
]
},
{
"name": "TOLL",
"country": "AU",
"services": [
"Road Delivery",
"Overnight Priority"
]
},
{
"name": "DHL",
"country": "DE",
"services": [
"Paket",
"Päckchen"
]
},
{
"name": "DPD",
"country": "DE",
"services": [
"Express 12",
"Express",
"Classic Parcel"
]
},
{
"name": "Hermes",
"country": "DE",
"services": [
"Päckchen",
"Paketklasse S",
"Paketklasse M",
"Paketklasse L"
]
},
{
"name": "UPS",
"country": "DE",
"services": [
"Express",
"Express Saver",
"Standard"
]
},
{
"name": "DHL UK",
"country": "GB",
"services": [
"Express",
"Express 12"
]
},
{
"name": "DPD UK",
"country": "GB",
"services": [
"Express 12",
"Express Next Day",
"Standard Parcel 12",
"Standard Parcel Next Day",
"Standard Parcel Two Day"
]
},
{
"name": "RMG",
"country": "GB",
"services": [
"1st Class Small Parcel",
"1st Class Medium Parcel",
"2nd Class Small Parcel",
"2nd Class Medium Parcel"
]
},
{
"name": "TNT UK",
"country": "GB",
"services": [
"Express",
"Express 10",
"Express 12"
]
},
{
"name": "UPS UK",
"country": "GB",
"services": [
"Express",
"Express Saver",
"Standard"
]
},
{
"name": "Yodel",
"country": "GB",
"services": [
"B2C 48HR",
"B2C 72HR",
"B2C Packet"
]
}
]
}
shippingsettings.getsupportedholidays
shippingsettings.getsupportedholidays
调用允许 MCA 帐号或独立帐号检索受支持的节假日。
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/supportedHolidays
以下是一个示例 JSON 响应:
{
"kind": "content#shippingsettingsGetSupportedHolidaysResponse",
"holidays": [
{
"id": "FR_Christmas_2019-12-25",
"countryCode": "FR",
"type": "Christmas",
"date": "2019-12-25",
"deliveryGuaranteeDate": "2019-12-24",
"deliveryGuaranteeHour": "18"
},
{
"id": "US_Easter_2019-04-21",
"countryCode": "US",
"type": "Easter",
"date": "2019-04-21",
"deliveryGuaranteeDate": "2019-04-20",
"deliveryGuaranteeHour": "18"
},
{
"id": "US_Mother's Day_2019-05-12",
"countryCode": "US",
"type": "Mother's Day",
"date": "2019-05-12",
"deliveryGuaranteeDate": "2019-05-11",
"deliveryGuaranteeHour": "18"
},
{
"id": "US_Father's Day_2019-06-16",
"countryCode": "US",
"type": "Father's Day",
"date": "2019-06-16",
"deliveryGuaranteeDate": "2019-06-15",
"deliveryGuaranteeHour": "18"
},
{
"id": "US_Independence Day (USA)_2019-07-04",
"countryCode": "US",
"type": "Independence Day (USA)",
"date": "2019-07-04",
"deliveryGuaranteeDate": "2019-07-03",
"deliveryGuaranteeHour": "18"
},
{
"id": "US_Halloween_2019-10-31",
"countryCode": "US",
"type": "Halloween",
"date": "2019-10-31",
"deliveryGuaranteeDate": "2019-10-30",
"deliveryGuaranteeHour": "18"
},
{
"id": "US_Thanksgiving_2019-11-28",
"countryCode": "US",
"type": "Thanksgiving",
"date": "2019-11-28",
"deliveryGuaranteeDate": "2019-11-27",
"deliveryGuaranteeHour": "18"
},
{
"id": "US_Christmas_2019-12-25",
"countryCode": "US",
"type": "Christmas",
"date": "2019-12-25",
"deliveryGuaranteeDate": "2019-12-24",
"deliveryGuaranteeHour": "18"
}
]
}
设置邮政编码组
虽然在 Merchant Center 中构建地区会很方便,但您也可以使用 Content API 来维护包含多个频繁更改地区的帐号。
通过“配送设置”服务,您可以设置、获取和更新配送设置和地区。在 API 中,区域称为 postalCodeGroups
。
"postalCodeGroups": [
{
"name": "string,
"country": string,
"postalCodeRanges": [
{
"postalCodeRangeBegin": string,
"postalCodeRangeEnd": string
}
]
}
]
与在界面中一样,postalCodeGroups
是邮政编码、邮政编码范围、邮政编码前缀或前缀范围的简单列表。
由于地区是与配送设置一起检索和设置的,因此仅通过现有配送设置资源填充 postalCodeGroups
会删除配送服务。
通过 API 设置区域的正确方法如下:
- 调用
get
可检索所有配送服务和postalCodeGroups
(地区)。 - 将配送服务从
get
调用复制到update
调用。 如果您不在配送服务中使用运送时间标签,请从请求正文中移除以下条目:
"transitTimeLabels": [ "all other labels" ],
为
update
调用填充postalCodeGroups
部分中的区域。进行
update
调用,并填充配送服务和postalCodeGroups
部分。
以下是上面使用的第一个 get
示例中的 update
调用请求正文示例,其中区域 1 的 postalCodeGroups
已从 94035
更新为 94036
:
{
"services": [
{
"name": "Standard Shipping",
"active": true,
"deliveryCountry": "US",
"currency": "USD",
"deliveryTime": {
"minHandlingTimeInDays": 0,
"maxHandlingTimeInDays": 1,
"transitTimeTable": {
"postalCodeGroupNames": [
"Region1",
"Region2",
"all other locations"
],
"rows": [
{
"values": [
{
"minTransitTimeInDays": 1,
"maxTransitTimeInDays": 2
}
]
},
{
"values": [
{
"minTransitTimeInDays": 2,
"maxTransitTimeInDays": 3
}
]
},
{
"values": [
{
"minTransitTimeInDays": 3,
"maxTransitTimeInDays": 5
}
]
}
]
}
},
"rateGroups": [
{
"singleValue": {
"flatRate": {
"value": "0",
"currency": "USD"
}
},
"name": "Standard Shipping"
}
],
"eligibility": "All scenarios"
},
{
"name": "Expedited",
"active": true,
"deliveryCountry": "US",
"currency": "USD",
"deliveryTime": {
"minTransitTimeInDays": 2,
"maxTransitTimeInDays": 2,
"minHandlingTimeInDays": 0,
"maxHandlingTimeInDays": 1
},
"rateGroups": [
{
"singleValue": {
"flatRate": {
"value": "9.99",
"currency": "USD"
}
},
"name": "Expedited"
}
],
"eligibility": "All scenarios"
}
],
"postalCodeGroups": [
{
"name": "Region1",
"country": "US",
"postalCodeRanges": [
{
"postalCodeRangeBegin": "94036",
"postalCodeRangeEnd": "94070"
}
]
},
{
"name": "Region2",
"country": "US",
"postalCodeRanges": [
{
"postalCodeRangeBegin": "94071",
"postalCodeRangeEnd": "94082"
}
]
}
]
}
以下是一个示例 JSON 响应:
{
"accountId": "1111",
"services": [
{
"name": "Standard Shipping",
"active": true,
"deliveryCountry": "US",
"currency": "USD",
"deliveryTime": {
"minHandlingTimeInDays": 0,
"maxHandlingTimeInDays": 1,
"transitTimeTable": {
"postalCodeGroupNames": [
"Region1",
"Region2",
"all other locations"
],
"rows": [
{
"values": [
{
"minTransitTimeInDays": 1,
"maxTransitTimeInDays": 2
}
]
},
{
"values": [
{
"minTransitTimeInDays": 2,
"maxTransitTimeInDays": 3
}
]
},
{
"values": [
{
"minTransitTimeInDays": 3,
"maxTransitTimeInDays": 5
}
]
}
]
}
},
"rateGroups": [
{
"singleValue": {
"flatRate": {
"value": "0",
"currency": "USD"
}
},
"name": "Standard Shipping"
}
],
"eligibility": "All scenarios"
},
{
"name": "Expedited",
"active": true,
"deliveryCountry": "US",
"currency": "USD",
"deliveryTime": {
"minTransitTimeInDays": 2,
"maxTransitTimeInDays": 2,
"minHandlingTimeInDays": 0,
"maxHandlingTimeInDays": 1
},
"rateGroups": [
{
"singleValue": {
"flatRate": {
"value": "9.99",
"currency": "USD"
}
},
"name": "Expedited"
}
],
"eligibility": "All scenarios"
}
],
"postalCodeGroups": [
{
"name": "Region1",
"country": "US",
"postalCodeRanges": [
{
"postalCodeRangeBegin": "94036",
"postalCodeRangeEnd": "94070"
}
]
},
{
"name": "Region2",
"country": "US",
"postalCodeRanges": [
{
"postalCodeRangeBegin": "94071",
"postalCodeRangeEnd": "94082"
}
]
}
]
}
使用取件点
如需详细了解自提/取件点订单(包括这些订单与送货上门订单之间的区别以及需要处理哪些提货专属信息),请参阅取件/取件点指南。
当日送达
如果您有本地商品目录,则可以使用 Content API for Shopping 配置当天送达配送服务。
当天送达配送服务的 shipmentType
为 local_delivery
。目前,全部local_delivery
项配送服务均被视为当天送达。您无法更改本地配送服务的deliveryTime
信息。
使用 shippingsettings.update
为本地商品目录商品设置当天送达。
下面的示例请求正文会为您账号的所有商店添加当天送达服务:
请先更新以下示例中的所有值,然后再将其用于您的实现。
{ "accountId":"accountId", "services":[ { "name": "Local Delivery", "active":true, "shipmentType":"local_delivery", "deliveryCountry":"US", "currency":"USD", "rateGroups":[ { "singleValue":{ "flatRate":{ "value":"0", "currency":"USD" } } } ], "eligibility":"All scenarios", "storeConfig":{ "storeServiceType":"all stores", "storeCodes":[ ], "cutoffConfig":{ "storeCloseOffsetHours":2, "no_delivery_post_cutoff":true }, "serviceRadius":{ "value":4, "unit":"Miles" } } } ] }
次日送达
默认情况下,在当天送达截止时间之后下的订单安排在次日送达。如需停用次日送达,请将 no_delivery_post_cutoff
设置为 true
。如果您停用次日送达,您的配送服务仅在每天截止时间之前显示。
次日送达服务仅适用于shipmentType
的 local_delivery
。
测试
由于所有商品都在生产中,因此应注意避免更改有效商品中的任何重要内容,特别是使用 update()
方法,因为这是唯一会更改现有值的方法。