Tujuan
shippingsettings
memungkinkan Anda mengambil dan memperbarui setelan pengiriman multiklien
(MCA) dan semua sub-akun yang terkait dengannya.
MCA biasanya digunakan oleh integrator, agregator, dan partner saluran yang mengelola toko online dan layanan API untuk beberapa penjual. Penjual yang memiliki beberapa toko online atau merek yang dijual di situs terpisah juga dapat memilih untuk memiliki sub-akun di bawah satu MCA.
Google dapat memperbarui estimasi waktu pengiriman untuk beberapa produk secara otomatis. Lihat Mengaktifkan otomatis untuk detail lebih lanjut.
shippingsettings.list
Panggilan shippingsettings.list
menampilkan semua informasi resource pengiriman
akun atau semua sub-akun jika
berurusan dengan akun MCA.
Contoh URL untuk metode shippingsettings.list
:
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/shippingsettings
Berikut adalah contoh respons JSON yang menunjukkan setelan pengiriman untuk
sub-akun 1111
dan 2222
dari akun MCA:
{
"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
Panggilan shippingsettings.get
memungkinkan akun MCA untuk menerima pengiriman
informasi setelan untuk satu sub-akun, atau akun mandiri untuk mendapatkan
informasi status akunnya sendiri.
Gunakan panggilan berikut untuk mendapatkan setelan pengiriman
informasi, dengan merchantId
sebagai nomor akun MCA, dan accountId
adalah sub-akunnya. Jika akun Merchant Center bukan akun multiklien,
shippingsettings.get
tetap dapat mengembalikan informasi setelan pengiriman. Di sini
kasus ini, gunakan nomor akun Merchant Center yang sama untuk merchantId
dan
Parameter accountId
.
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/shippingsettings/accountId
Berikut adalah contoh respons JSON untuk sub-akun yang memiliki Standard
dan layanan pengiriman Expedited
yang dikonfigurasi dari akun MCA yang digunakan untuk
Panggilan list
:
{
"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
Panggilan shippingsettings.update
memungkinkan akun MCA memperbarui
informasi setelan pengiriman untuk satu sub-akun atau akun mandiri.
PUT https://shoppingcontent.googleapis.com/content/v2.1/merchantId/shippingsettings/accountId
Berikut adalah contoh isi permintaan JSON untuk mengupdate maxTransitTimeInDays
ke 7
untuk Layanan Pengiriman GSA Shipping - Free Ship Over $49.99
sebesar
sub-akun dengan ID akun 2222
dalam ID perubahan MCA dari 10
.
{
...
"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"
}
]
}
}
Berikut adalah contoh isi respons 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
Panggilan shippingsettings.custombatch
mengambil atau memperbarui setelan pengiriman
informasi untuk beberapa sub-akun dari akun multiklien.
Permintaan JSON mencakup merchantId
nomor akun MCA, yaitu
accountId
dari sub-akun, batchId
unik, dan method
yang ditetapkan ke
get
untuk mengambil setelan pengiriman dan update
untuk mengubah pengiriman
setelan.
POST https://shoppingcontent.googleapis.com/content/v2.1/shippingsettings/batch
Contoh isi permintaan JSON berikut memiliki dua bagian:
batchId=1
digunakan untuk mengambil setelan pengiriman untuk ID akun1111
.batchId=2
, digunakan untuk mengupdatemaxTransitTimeInDays
ke8
untuk Layanan PengirimanGSA Shipping - Free Ship Over $49.99
. (Setelan ini tadinya diubah dari7
untuk ID akun2222
yang ditampilkan dalam isi respons sebelumnya misalnya untukshippingsettings.update
).
{
"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"
}
]
}
}
]
}
Berikut adalah contoh isi respons 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
Panggilan shippingsettings.getsupportedcarriers
memungkinkan akun MCA
atau akun mandiri untuk mendapatkan
operator yang didukungnya.
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/supportedCarriers
Berikut adalah contoh isi respons 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
Panggilan shippingsettings.getsupportedholidays
memungkinkan akun MCA
atau akun mandiri untuk
mengambil hari libur yang didukung.
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/supportedHolidays
Berikut adalah contoh respons 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"
}
]
}
Tetapkan grup kode pos
Meskipun mudah untuk membangun wilayah di Merchant Center, gunakan Content API untuk mengelola akun dengan beberapa region yang sering berubah.
Layanan Setelan Pengiriman
memungkinkan Anda menetapkan, mendapatkan, dan memperbarui setelan serta wilayah pengiriman. Di API,
region disebut postalCodeGroups
.
"postalCodeGroups": [
{
"name": "string,
"country": string,
"postalCodeRanges": [
{
"postalCodeRangeBegin": string,
"postalCodeRangeEnd": string
}
]
}
]
Seperti di UI, postalCodeGroups
adalah daftar sederhana kode pos dan kode pos
rentang, awalan kode pos, atau rentang awalan.
Karena wilayah diambil dan ditetapkan bersama dengan setelan pengiriman, hanya
mengisi postalCodeGroups
melalui
Setelan Pengiriman
referensi
akan menghapus layanan pengiriman.
Cara yang benar untuk menetapkan wilayah melalui API adalah sebagai berikut:
- Lakukan panggilan
get
untuk mengambil semua layanan pengiriman danpostalCodeGroups
(region). - Salin layanan pengiriman dari panggilan
get
ke panggilanupdate
. Hapus entri berikut dari isi permintaan jika Anda tidak menggunakan transportasi umum label waktu di layanan pengiriman Anda:
"transitTimeLabels": [ "all other labels" ],
Isi region di bagian
postalCodeGroups
untuk panggilanupdate
.Lakukan panggilan
update
dengan layanan pengiriman danpostalCodeGroups
bagian telah diisi.
Berikut adalah contoh isi permintaan panggilan update
dari contoh get
pertama
digunakan di atas dengan postalCodeGroups
untuk Region 1 yang diperbarui dari 94035
menjadi 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"
}
]
}
]
}
Berikut adalah contoh respons 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"
}
]
}
]
}
Gunakan lokasi pengambilan/pengumpulan
Untuk informasi selengkapnya tentang pesanan pengambilan/pengambilan titik, termasuk caranya berbeda dari pesanan yang dikirim ke rumah, dan informasi khusus pengambilan apa yang diproses, lihat Panduan lokasi pengambilan/pengumpulan.
Pengiriman di hari yang sama
Anda dapat menggunakan Content API for Shopping untuk mengonfigurasi layanan pengiriman di hari yang sama jika Anda memiliki situs lokal inventaris.
Layanan pengiriman pada hari yang sama mencantumkan local_delivery
sebagai shipmentType
. Semua layanan pengiriman local_delivery
dianggap sebagai pengiriman di hari yang sama saat ini. Anda tidak dapat mengubah informasi deliveryTime
untuk pengiriman lokal.
Gunakan
shippingsettings.update
untuk menyiapkan pengiriman di hari yang sama untuk produk inventaris lokal Anda.
Berikut contoh isi permintaan yang menambahkan layanan pengiriman di hari yang sama ke semua toko untuk akun Anda:
Perbarui semua nilai dalam contoh berikut sebelum menggunakannya dalam implementasi Anda.
{ "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" } } } ] }
Pengiriman di hari berikutnya
Pesanan yang dilakukan setelah batas waktu pengiriman di hari yang sama akan dijadwalkan untuk tanggal berikutnya
pengiriman harian secara default. Untuk menonaktifkan pengiriman di hari berikutnya, setel
no_delivery_post_cutoff
hingga true
. Jika Anda menonaktifkan pengiriman di hari berikutnya,
Layanan pengiriman hanya terlihat sebelum batas waktu setiap hari.
Pengiriman di hari berikutnya hanya tersedia jika shipmentType
adalah local_delivery
.
Pengujian
Karena semua item sedang dalam produksi, Anda harus berhati-hati agar tidak berubah
hal penting pada item yang ditayangkan, khususnya dengan update()
karena ini adalah satu-satunya yang mengubah nilai yang sudah ada.