shippingsettings
संसाधन की मदद से, एक से ज़्यादा क्लाइंट वाले खाते (एमसीए) और उससे जुड़े सभी उप-खातों की शिपिंग सेटिंग को वापस पाया जा सकता है और उन्हें अपडेट किया जा सकता है.
एमसीए का इस्तेमाल आम तौर पर इंटिग्रेटर, एग्रीगेटर, और चैनल पार्टनर करते हैं. ये लोग या कंपनियां, कई कारोबारियों या कंपनियों के लिए ऑनलाइन स्टोर और एपीआई सेवाओं को मैनेज करती हैं. जिन कारोबारियों या कंपनियों के एक से ज़्यादा ऑनलाइन स्टोर या ब्रैंड हैं और उन्हें अलग-अलग वेबसाइटों पर बेचा जाता है वे भी एक एमसीए के तहत उप-खाते इस्तेमाल कर सकती हैं.
Google, कुछ प्रॉडक्ट के लिए डिलीवरी में लगने वाले समय के अनुमान को अपने-आप अपडेट कर सकता है. ज़्यादा जानकारी के लिए, अपने-आप होने वाले सुधार की सुविधा चालू करना लेख पढ़ें.
shippingsettings.list
shippingsettings.list
कॉल, किसी खाते या एमसीए खाते से जुड़े सभी उप-खातों के लिए, शिपिंग संसाधन की पूरी जानकारी दिखाता है.
shippingsettings.list
तरीके के लिए यूआरएल का उदाहरण:
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/shippingsettings
यहां JSON का एक उदाहरण दिया गया है. इसमें एमसीए खाते के उप-खातों 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
कॉल की मदद से, एमसीए खाता किसी एक उप-खाते के लिए शिपिंग की सेटिंग की जानकारी पा सकता है. इसके अलावा, स्टैंडअलोन खाता अपने खाते की स्थिति की जानकारी पा सकता है.
शिपिंग की सेटिंग की जानकारी पाने के लिए, इस कॉल का इस्तेमाल करें. इसमें merchantId
, एमसीए खाता नंबर है और accountId
, उसका उप-खाता है. अगर Merchant Center खाता, एक से ज़्यादा क्लाइंट वाला खाता नहीं है, तो shippingsettings.get
अब भी शिपिंग सेटिंग की जानकारी दे सकता है. इस मामले में, merchantId
और accountId
, दोनों पैरामीटर के लिए एक ही Merchant Center खाता नंबर का इस्तेमाल करें.
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/shippingsettings/accountId
यहां एक उप-खाते के लिए JSON रिस्पॉन्स का उदाहरण दिया गया है. इस उप-खाते में, Standard
और Expedited
शिपिंग सेवा कॉन्फ़िगर की गई है. यह एमसीए खाता, 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
shippingsettings.update
कॉल की मदद से, एमसीए खाता किसी एक उप-खाते या स्टैंडअलोन खाते के लिए शिपिंग सेटिंग की जानकारी अपडेट कर सकता है.
PUT https://shoppingcontent.googleapis.com/content/v2.1/merchantId/shippingsettings/accountId
यहां 10
एमसीए के कारोबारी या कंपनी के आईडी में मौजूद 2222
आईडी वाले उप-खाते के लिए, शिपिंग सेवा GSA Shipping - Free Ship Over $49.99
के maxTransitTimeInDays
को 7
पर अपडेट करने के लिए, JSON फ़ॉर्मैट में अनुरोध का एक सैंपल दिया गया है.
{
...
"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 अनुरोध में, एमसीए खाते का merchantId
, उप-खाते का accountId
, यूनीक batchId
, और method
शामिल होता है. शिपिंग की सेटिंग पाने के लिए, method
को get
पर सेट किया जाता है. साथ ही, शिपिंग की सेटिंग में बदलाव करने के लिए, method
को update
पर सेट किया जाता है.
POST https://shoppingcontent.googleapis.com/content/v2.1/shippingsettings/batch
यहां दिए गए JSON अनुरोध के मुख्य भाग के उदाहरण में दो हिस्से हैं:
- इस
batchId=1
का इस्तेमाल, खाता आईडी1111
के लिए शिपिंग की सेटिंग वापस पाने के लिए किया जाता है. - इस कुकी का इस्तेमाल, शिपिंग सेवा
GSA Shipping - Free Ship Over $49.99
के लिएmaxTransitTimeInDays
को8
में अपडेट करने के लिए किया जाता है.batchId=2
(इस सेटिंग कोshippingsettings.update
के लिए, पिछले जवाब के मुख्य हिस्से में दिखाए गए2222
खाते के आईडी के लिए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
कॉल की मदद से, एमसीए खाते या स्टैंडअलोन खाते को उन कैरियर की जानकारी मिलती है जिनके साथ वह काम कर सकता है.
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
कॉल की मदद से, एमसीए खाते या स्टैंडअलोन खाते से, छुट्टियों की जानकारी वापस पाई जा सकती है.
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 का इस्तेमाल करके, ऐसे खातों को मैनेज करें जिनमें कई क्षेत्र शामिल हैं और जिनमें अक्सर बदलाव होता रहता है.
शिपिंग की सेटिंग से जुड़ी सेवा की मदद से, शिपिंग की सेटिंग और क्षेत्र सेट किए जा सकते हैं. साथ ही, इन्हें अपडेट किया जा सकता है और इनकी जानकारी पाई जा सकती है. एपीआई में, क्षेत्रों को postalCodeGroups
कहा जाता है.
"postalCodeGroups": [
{
"name": "string,
"country": string,
"postalCodeRanges": [
{
"postalCodeRangeBegin": string,
"postalCodeRangeEnd": string
}
]
}
]
यूज़र इंटरफ़ेस (यूआई) में, postalCodeGroups
पिन कोड, पिन कोड की रेंज, पिन कोड के प्रीफ़िक्स या प्रीफ़िक्स की रेंज की एक सामान्य सूची होती है.
क्षेत्रों की जानकारी और शिपिंग की सेटिंग एक साथ सेट की जाती हैं. इसलिए, postalCodeGroups
एट्रिब्यूट की वैल्यू सिर्फ़ मौजूदा शिपिंग की सेटिंग रिसोर्स के ज़रिए भरने पर ही शिपिंग सेवाएं मिटाई जाती हैं.
एपीआई के ज़रिए क्षेत्र सेट करने का सही तरीका यहां दिया गया है:
- सभी शिपिंग सेवाएं और
postalCodeGroups
(क्षेत्र) वापस पाने के लिए,get
कॉल करें. get
कॉल से शिपिंग सेवाओं कोupdate
कॉल में कॉपी करें.अगर शिपिंग सेवा में ट्रांज़िट टाइम के लेबल का इस्तेमाल नहीं किया जाता है, तो अनुरोध के कोड से यह एंट्री हटाएं:
"transitTimeLabels": [ "all other labels" ],
update
कॉल के लिए,postalCodeGroups
सेक्शन में इलाके की जानकारी भरें.update
कॉल करें. इसमें शिपिंग की दोनों सेवाओं औरpostalCodeGroups
सेक्शन की जानकारी भरी होनी चाहिए.
यहां update
कॉल के अनुरोध के मुख्य हिस्से का एक सैंपल दिया गया है. यह ऊपर दिए गए get
के पहले उदाहरण से लिया गया है. इसमें क्षेत्र 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 का इस्तेमाल करके, ऑर्डर वाले दिन डिलीवरी करने की सुविधा देने वाली शिपिंग सेवाएं कॉन्फ़िगर की जा सकती हैं.
ऑर्डर वाले दिन डिलीवरी करने की सुविधा देने वाली शिपिंग सेवाओं के लिए, local_delivery
को shipmentType
के तौर पर सेट किया जाता है. फ़िलहाल, सभी 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()
तरीके का इस्तेमाल करते समय, क्योंकि यह मौजूदा वैल्यू को बदलने का एकमात्र तरीका है.