API đối tác nguồn cấp dữ liệu địa phương

Bạn có thể thêm kho hàng tại địa phương bằng cách tải nguồn cấp dữ liệu kho hàng tại địa phương lên. Nguồn cấp dữ liệu kho hàng tại địa phương cung cấp danh sách các mặt hàng có thể bán tại cửa hàng kèm theo các thuộc tính để mô tả những mặt hàng đó.

Để thêm nhà cung cấp dữ liệu kho hàng của bạn vào Merchant Center, hãy cung cấp thông tin chi tiết về họ trong biểu mẫu này.

Chèn khoảng không quảng cáo

Để chèn khoảng không quảng cáo, hãy sử dụng yêu cầu sau:

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}"
}

Bạn có thể sẽ thấy phản hồi sau đây:

{
 "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"
}

Chèn chương trình giảm giá

Để chèn chương trình giảm giá, hãy sử dụng yêu cầu sau:

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}"
}

Bạn có thể sẽ thấy phản hồi sau đây:

{
 "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"
}

Chèn cửa hàng

Để chèn cửa hàng, hãy sử dụng yêu cầu sau:

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

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

Bạn có thể sẽ thấy phản hồi sau đây:

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