Za pomocą interfejsu Merchant API możesz udostępniać Google dane o asortymencie, sklepach i sprzedaży, aby zwiększyć widoczność i ułatwić zarządzanie.
Nowe funkcje
Oprócz funkcji Content API interfejs Merchant API oferuje te nowe funkcje:
- metoda pobierania stanu właściwości na poziomie firmy związanych z integracją z programem partnerskim danych o asortymencie lokalnym;
- metoda wysyłania powiadomienia do sprzedawcy.
Żądania
W przypadku interfejsu API programu partnerskiego danych o asortymencie lokalnym użyj tego formatu adresu URL żądania:
POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpInventories:insert
Więcej informacji znajdziesz w artykule Metoda: accounts.lfpInventories.insert.
Oto przykładowe porównanie interfejsu Content API for Shopping z interfejsem API programu partnerskiego danych o asortymencie lokalnym w przypadku żądania wstawienia asortymentu:
| Content API | Merchant API | |
| URL |
POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/inventory
|
POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpInventories:insert
|
| Identyfikatory |
{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}
|
{PARENT} |
Oto przykładowe porównanie interfejsu Content API for Shopping z interfejsem API programu partnerskiego danych o asortymencie lokalnym w przypadku żądania wstawienia sprzedaży:
| Content API | Merchant API | |
| URL | POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/sale |
POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpSales:insert |
| Identyfikatory | {MERCHANT_ID}/pos/{TARGETMERCHANT_ID} |
{PARENT} |
Oto przykładowe porównanie interfejsu Content API for Shopping z interfejsem API programu partnerskiego danych o asortymencie lokalnym w przypadku żądania wstawienia sklepu:
| Content API | Merchant API | |
| URL | POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store |
POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpStores:insert |
| Identyfikatory | {MERCHANT_ID}/pos/{TARGETMERCHANT_ID} |
{PARENT} |
Metody
Oto zmiany w metodach interfejsu API sklepu w interfejsie API programu partnerskiego danych o asortymencie lokalnym:
| Metoda | URL w Content API for Shopping | URL w Merchant API | Identyfikatory w Content API for Shopping | Identyfikatory w Merchant API | Opis |
insert |
POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store |
POST https://merchantapi.googleapis.com/lfp/v1/{parent=accounts/*}/lfpStores:insert |
{MERCHANT_ID}/pos/{TARGETMERCHANT_ID} |
{PARENT} | parent ma format accounts/{IFP_PARTNER_ACCOUNT_ID} |
delete |
DELETE https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store/{STORE_CODE} |
DELETE https://merchantapi.googleapis.com/lfp/v1/{name=accounts/*/lfpStores/*} |
{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store/{STORE_CODE} |
{NAME} | name ma format accounts/{IFP_PARTNER_ACCOUNT_ID}/lfpStores/{TARGETMERCHANT_ID}~{STORE_CODE} |
get |
GET https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store/{STORE_CODE} |
GET https://merchantapi.googleapis.com/lfp/v1/{name=accounts/*/lfpStores/*} |
{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store/{STORE_CODE} |
{NAME} | name ma format accounts/{IFP_PARTNER_ACCOUNT_ID}/lfpStores/{TARGETMERCHANT_ID}~{STORE_CODE} |
list |
GET https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store |
GET https://merchantapi.googleapis.com/lfp/v1/{parent=accounts/*}/lfpStores |
/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID} |
{PARENT} | {PARENT} ma format accounts/{IFP_PARTNER_ACCOUNT_ID} |
Oto zmiany w metodach interfejsu API asortymentu w interfejsie API programu partnerskiego danych o asortymencie lokalnym:
| Metoda | URL w Content API for Shopping | URL w Merchant API | Identyfikatory w Content API for Shopping | Identyfikatory w Merchant API | Opis |
insert |
POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store |
POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpInventories:insert |
{MERCHANT_ID}/pos/{TARGETMERCHANT_ID} |
{PARENT} | parent ma format accounts/{IFP_PARTNER_ACCOUNT_ID} |
Oto zmiany w metodach interfejsu API sprzedaży w interfejsie API programu partnerskiego danych o asortymencie lokalnym:
| Metoda | URL w Content API for Shopping | URL w Merchant API | Identyfikatory w Content API for Shopping | Identyfikatory w Merchant API | Opis |
insert |
POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store |
POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpSales:insert |
{MERCHANT_ID}/pos/{TARGETMERCHANT_ID} |
{PARENT} | {PARENT} ma format accounts/{IFP_PARTNER_ACCOUNT_ID} |
Zasoby
Oto zmiany w zasobie sklepu w interfejsie API programu partnerskiego danych o asortymencie lokalnym. Pola, których tu nie wymieniono, nie uległy zmianie.
| Content API for Shopping | Merchant API | Opis |
| Nieobsługiwane | name: string |
Dodano nowe pole, aby odróżnić różne sklepy |
| Nieobsługiwane | targetAccount: integer |
Konto Merchant Center, na które mają być wstawiane asortymenty |
targetCountry: string |
regionCode: string |
targetCountry zostało zmienione na regionCode |
websiteUrl: string |
websiteUri: string |
websiteUrl zostało zmienione na websiteUri |
kind: string |
Nieobsługiwane | kind nie jest obsługiwane w interfejsie API programu partnerskiego danych o asortymencie lokalnym |
Oto zmiany w przypadku wstawiania asortymentu. Pola, których tu nie wymieniono, nie uległy zmianie.
| Content API for Shopping | Merchant API | Opis |
| Nieobsługiwane | name: string |
Dodano nowe pole, aby odróżnić różne asortymenty |
| Nieobsługiwane | targetAccount: integer |
Konto Merchant Center, na które mają być wstawiane asortymenty. |
targetCountry: string |
regionCode: string |
targetCountry zostało zmienione na regionCode. Kod terytorium CLDR kraju, w którym sprzedawany jest produkt. |
itemId: string |
offerId: string |
itemId zostało zmienione na offerId |
quantity: string |
quantity: string |
quantity zostało zmienione na opcjonalne |
| Nieobsługiwane | availability: string |
availability jest wymagane |
|
|
Zmieniła się definicja ceny. Więcej informacji znajdziesz w artykule Cena. |
timestamp: string |
collectionTime: string |
timestamp zostało zmienione na collectionTime |
kind: string |
Nieobsługiwane | kind nie jest obsługiwane w interfejsie API programu partnerskiego danych o asortymencie lokalnym. |
Oto zmiany w przypadku wstawiania sprzedaży. Pola, których tu nie wymieniono, nie uległy zmianie.
| Content API for Shopping | Merchant API | Opis |
| Nieobsługiwane | name: string |
Dodano nowe pole, aby odróżnić różne asortymenty |
| Nieobsługiwane | targetAccount:integer |
Konto Merchant Center, na które mają być wstawiane dane o sprzedaży |
targetCountry: string |
regionCode: string |
Kod terytorium CLDR kraju, w którym sprzedawany jest produkt. |
itemId: string |
offerId: string |
itemId zostało zmienione na offerId |
|
|
Zmieniła się definicja ceny. Więcej informacji znajdziesz w artykule Cena. |
timestamp: string |
saleTime: string |
timestamp zostało zmienione na saleTime |
kind: string |
Nieobsługiwane | kind nie jest obsługiwane w interfejsie API programu partnerskiego danych o asortymencie lokalnym. |