제품 이전

Merchant API는 제품 데이터를 관리하는 더 강력하고 직관적인 방법을 도입합니다. 주요 변경사항은 제품 데이터가 두 개의 별도 리소스로 분리된다는 점입니다. 데이터를 제출하는 ProductInput와 제품 상태 및 문제를 포함한 최종 처리된 버전을 확인하는 Product입니다. 이 새로운 구조는 더 예측 가능하고 투명한 환경을 제공합니다.

이 가이드에서는 Content API for Shopping에서 통합을 이전하는 데 도움이 되는 주요 차이점을 설명합니다. 새 기능 사용에 관한 자세한 가이드는 제품 관리를 참고하세요.

주요 차이점

Content API for Shopping과 비교했을 때 Merchant API에서 제품을 관리하는 방식의 가장 중요한 변경사항은 다음과 같습니다.

  • 입력 및 처리된 데이터를 위한 전용 리소스: Merchant API는 제품 관리를 두 가지 리소스로 분할합니다. ProductInput 리소스를 사용하여 제품 데이터를 삽입, 업데이트, 삭제할 수 있습니다. 읽기 전용 Product 리소스를 사용하여 Google에서 입력을 처리하고, 규칙을 적용하고, 보조 소스의 데이터를 결합한 후의 최종 제품을 볼 수 있습니다.

  • 통합 제품 상태: productstatuses 서비스가 삭제됩니다. 이제 제품 검증 문제와 대상 상태가 productStatus 필드 내의 Product 리소스에 직접 포함되어 데이터 검색이 간소화됩니다.

  • 예측 가능한 제품 업데이트: 새로운 productInputs.patch 메서드는 특정 제품 입력을 직접 수정합니다. 이는 업데이트가 다른 피드 업로드로 예기치 않게 덮어쓰일 수 있는 쇼핑용 Content API에 비해 크게 개선된 사항입니다. Merchant API에서 업데이트는 해당 특정 제품 입력이 다시 업데이트되거나 삭제될 때까지 유지됩니다. 제품 업데이트는 처리된 Product 리소스가 아닌 ProductInput 리소스에 적용됩니다.

  • 더 깔끔한 데이터 관리를 위해 데이터 소스 선택: 이제 모든 productInputs 쓰기 작업에 dataSource 쿼리 매개변수가 필요하므로 수정 중인 데이터 소스가 명시적으로 표시됩니다. 이는 데이터를 제공하는 소스가 여러 개인 경우에 특히 유용합니다.

  • 새 리소스 식별자: 이제 제품이 id 필드 대신 RESTful 리소스 name로 식별됩니다. 형식은 accounts/{account}/products/{product}입니다.

  • 맞춤 일괄 없음: custombatch 메서드를 더 이상 사용할 수 없습니다. 비동기 요청 또는 HTTP 일괄 처리를 사용하여 단일 HTTP 호출에서 여러 요청을 보낼 수 있습니다.

  • 피드 라벨 및 언어의 데이터 소스: Merchant API를 사용하면 피드 라벨과 언어를 지정하지 않고 데이터 소스를 만들 수 있으므로 모든 피드 라벨과 언어로 제품을 삽입할 수 있습니다.

요청

이 섹션에서는 Content API for Shopping과 Merchant API의 요청 형식을 비교합니다.

요청 설명 Content API for Shopping Merchant API
제품 가져오기 GET https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/products/{productId} GET https://merchantapi.googleapis.com/products/v1/accounts/{account}/products/{product}
제품 나열 GET https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/products GET https://merchantapi.googleapis.com/products/v1/accounts/{account}/products
제품 삽입 POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/products POST https://merchantapi.googleapis.com/products/v1/accounts/{account}/productInputs:insert
제품 업데이트 PATCH https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/products/{productId} PATCH https://merchantapi.googleapis.com/products/v1/accounts/{account}/productInputs/{productinput}
제품 삭제 DELETE https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/products/{productId} DELETE https://merchantapi.googleapis.com/products/v1/accounts/{account}/productInputs/{productinput}
제품 상태 가져오기 GET https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/productstatuses/{productId} GET https://merchantapi.googleapis.com/products/v1/accounts/{account}/products/{product}
제품 상태 나열 GET https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/productstatuses GET https://merchantapi.googleapis.com/products/v1/accounts/{account}/products
여러 요청 일괄 처리 POST https://shoppingcontent.googleapis.com/content/v2.1/products/custombatch 비동기 요청, HTTP 일괄 처리

식별자

판매자 API에서 제품 식별자 형식이 표준 REST 리소스 이름으로 변경되었습니다.

식별자 설명 Content API for Shopping Merchant API
제품 ID 콜론 (:)으로 구분된 세그먼트로 구성된 문자열입니다.
형식: channel:contentLanguage:targetCountry:offerId 또는 channel:contentLanguage:feedLabel:offerId
예: online:en:US:sku123
REST 리소스 name 문자열입니다.
형식: accounts/{account}/products/{product}(여기서 {product}contentLanguage~feedLabel~offerId임)
예: accounts/12345/products/en~US~sku123

메서드

이 표에는 Content API for Shopping 메서드와 Merchant API의 상응하는 메서드가 표시되어 있습니다.

Content API for Shopping 메서드 Merchant API 메서드 사용 가능 여부 및 참고사항
products.get products.get 처리된 최종 제품을 가져옵니다.
products.list products.list 처리된 최종 제품을 나열합니다.
products.insert productInputs.insert 제품 입력을 삽입합니다. dataSource가 필요합니다.
products.update productInputs.update 동작이 크게 다릅니다. 특정 제품 입력을 업데이트하며 지속됩니다.
products.delete productInputs.delete 특정 제품 입력을 삭제합니다. dataSource가 필요합니다.
products.custombatch 사용할 수 없음 비동기 요청 또는 HTTP 일괄 처리를 사용합니다.
productstatuses.get products.get productstatuses 서비스가 삭제됩니다. 이제 상태 정보가 Product 리소스에 포함됩니다.
productstatuses.list products.list productstatuses 서비스가 삭제됩니다. 이제 상태 정보가 Product 리소스에 포함됩니다.
productstatuses.custombatch 사용할 수 없음 [비동기

요청](/merchant/api/samples/insert-product-input-async) 또는 HTTP 일괄 처리를 사용하세요. |

세부 필드 변경사항

이 표에서는 Merchant API에서 변경, 추가 또는 삭제된 중요한 필드를 강조 표시합니다.

Content API for Shopping Merchant API 설명
id name 이제 제품의 기본 식별자는 REST 리소스 name입니다.
최상위 제품 데이터 사양 속성 (예: title, price, link) productAttributes 객체 title, price, link와 같은 제품 속성은 더 이상 최상위 필드가 아닙니다. 이제 ProductProductInput 리소스 모두에서 productAttributes 객체 내에 그룹화됩니다. 이렇게 하면 더 깔끔하고 체계적인 리소스 구조를 제공할 수 있습니다.
targetCountry feedLabel 이제 리소스 이름이 판매자 센터 기능과 일치하도록 targetCountry 대신 feedLabel을 사용합니다.
feedId dataSource (쿼리 매개변수) 이제 dataSource 이름은 모든 productInputs 쓰기 메서드 (insert, update, delete)에 필수 쿼리 매개변수입니다.
channel 사용할 수 없습니다. 오프라인 전용 제품에는 legacy_local을 사용합니다. channel 필드가 더 이상 Merchant API에 없습니다. Content API for Shopping에서 LOCAL 채널이 있는 제품은 대신 legacy_local 필드를 true로 설정해야 합니다.
사용할 수 없음 versionNumber 기본 데이터 소스에 잘못된 순서로 삽입되는 것을 방지하는 데 사용할 수 있는 ProductInput의 새로운 선택적 필드입니다.
정의된 값 집합이 있는 string 유형 필드 정의된 값 집합이 있는 enum 유형 필드 정의된 값 집합이 있는 제품 속성의 필드 (예: excluded_destinations, availability)가 이제 enum 유형입니다.