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 रिस्पॉन्स का सैंपल दिया गया है जिसमें list
कॉल के लिए इस्तेमाल किए गए एमसीए खाते से कॉन्फ़िगर की गई 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
कॉल की मदद से, एमसीए खाता किसी एक उप-खाते या स्टैंडअलोन खाते के लिए, शिपिंग सेटिंग की जानकारी अपडेट कर सकता है.
PUT https://shoppingcontent.googleapis.com/content/v2.1/merchantId/shippingsettings/accountId
यहां JSON अनुरोध बॉडी का एक सैंपल दिया गया है. इसका इस्तेमाल, 10
के एमसीए Merchant Center आईडी में मौजूद, खाता आईडी 2222
वाले उप-खाते के लिए, शिपिंग सेवा 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 अनुरोध में, एमसीए खाता नंबर का merchantId
, सब-खाते का accountId
, एक यूनीक batchId
, और शिपिंग की सेटिंग को वापस पाने के लिए method
को get
पर सेट किया गया है. साथ ही, शिपिंग की सेटिंग में बदलाव करने के लिए update
को सेट किया गया है.
POST https://shoppingcontent.googleapis.com/content/v2.1/shippingsettings/batch
यहां दिए गए JSON अनुरोध के मुख्य हिस्से के दो हिस्से हैं:
batchId=1
का इस्तेमाल, खाता आईडी1111
के लिए शिपिंग की सेटिंग वापस पाने के लिए किया जाता है.batchId=2
, जिसका इस्तेमाल शिपिंग सेवाGSA Shipping - Free Ship Over $49.99
के लिए,maxTransitTimeInDays
को8
में अपडेट करने के लिए किया जाता है. (इस सेटिंग को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
सेक्शन में इलाकों की जानकारी डालें.शिपिंग सेवाओं और
postalCodeGroups
दोनों सेक्शन के पॉप्युलेट होने पर,update
कॉल करें.
यहां update
कॉल के अनुरोध का मुख्य हिस्सा दिया गया है. यह पहले get
उदाहरण का सैंपल है, जिसे ऊपर postalCodeGroups
के साथ इस्तेमाल किया गया है. इस उदाहरण में, क्षेत्र 1 के लिए 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()
के तरीके से, क्योंकि यह मौजूदा वैल्यू में बदलाव करता है.