ממשק API של שותפות עם פידים של חנויות מקומיות

כדי להוסיף מלאי מוצרים בחנויות מקומיות, אפשר להעלות פיד של מלאי מוצרים בחנויות מקומיות. הפיד של מלאי המוצרים בחנויות המקומיות מספק רשימה של פריטים שניתן למכור. בחנות עם מאפיינים שמתארים אותם.

כדי להוסיף ל-Merchant Center את ספק נתוני המלאי, צריך לספק את הפרטים שלהם הטופס.

הוספת מלאי

כדי להוסיף מלאי, משתמשים בבקשה הבאה:

POST https://merchantapi.googleapis.com/lfp/v1beta/{parent}/lfpInventories:insert

{
 "availability": "in stock",
 "collectionTime": "2024-01-08T08:00:00Z",
 "contentLanguage": "en",
 "gtin": "gtin",
 "offerId": "{offerId}",
 "pickupMethod": "buy",
 "pickupSla": "same day",
 "price": {
   "amountMicros": "1000000",
   "currencyCode": "USD"
 },
 "regionCode": "US",
 "storeCode": "{storeCode}",
 "targetAccount": "{targetMerchantId}"
}

התגובה הבאה אמורה להופיע:

{
 "name": "accounts/{merchantId}/lfpInventories/{targetMerchantId}~{storeCode}~{offerId}",
 "targetAccount": "{targetMerchantId}",
 "storeCode": "123",
 "offerId": "{offerId}",
 "regionCode": "US",
 "contentLanguage": "en",
 "gtin": "gtin",
 "price": {
   "amountMicros": "1000000",
   "currencyCode": "USD"
 },
 "availability": "in stock",
 "collectionTime": "2024-01-08T08:00:00Z",
 "pickupMethod": "buy",
 "pickupSla": "same day",
 "feedLabel": "US"
}

למידע נוסף, ראו שיטה: accounts.lfpInventories.insert.

הוספת מבצע

כדי להוסיף מבצע, משתמשים בבקשה הבאה:

POST https://merchantapi.googleapis.com/lfp/v1beta/{parent}/lfpSales:insert

{
 "contentLanguage": "en",
 "gtin": "gtin",
 "offerId": "offerId",
 "price": {
   "amountMicros": "1000000",
   "currencyCode": "USD"
 },
 "quantity": 2,
 "regionCode": "US",
 "saleTime": "2024-01-08T08:00:00Z",
 "storeCode": "123",
 "targetAccount": "{targetMerchantId}"
}

התגובה הבאה אמורה להופיע:

{
 "name": "accounts/1000005718521947/lfpSales/{uuid}",
 "targetAccount": "{targetMerchantId}",
 "storeCode": "123",
 "offerId": "offerId",
 "regionCode": "US",
 "contentLanguage": "en",
 "gtin": "gtin",
 "price": {
   "amountMicros": "1000000",
   "currencyCode": "USD"
 },
 "quantity": "2",
 "saleTime": "2024-01-08T08:00:00Z",
 "uid": "{uuid}",
 "feedLabel": "US"
}

למידע נוסף, ראו שיטה: accounts.lfpSales.insert

הוספת חנות

כדי להוסיף חנות, משתמשים בבקשה הבאה:

POST https://merchantapi.googleapis.com/lfp/v1beta/{parent}/lfpStores:insert

{
 "storeAddress": "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",
 "storeCode": "{storeCode}",
 "targetAccount": "{targetMerchantId}"
}

התגובה הבאה אמורה להופיע:

{
 "name": "accounts/{merchantId}/lfpStores/{targetMerchantId}~{storeCode}",
 "targetAccount": "1000005718454644",
 "storeCode": "{storeCode}",
 "storeAddress": "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",
 "matchingState": "STORE_MATCHING_STATE_MATCHED"
}

למידע נוסף, ראו שיטה: accounts.lfpStores.insert.