판매자 프로모션 API를 사용하여 Google에서 프로모션을 만들고 관리할 수 있습니다. accounts.promotions 리소스를 사용하면 Google에서 판매하는 제품의 특별 이벤트를 표시할 수 있습니다.
자세한 내용은 판매자 프로모션 API 개요를 참고하세요.
Content API for Shopping에서 Merchant API로의 변경사항 개요
중요한 차이점은 Content API for Shopping은 첫 번째 프로모션 삽입 시 데이터 소스를 자동으로 생성하지만 Merchant API는 그렇지 않다는 것입니다. Merchant API를 사용하여 프로모션을 삽입하려면 먼저 프로모션 데이터 소스를 만들어야 합니다.
accounts.dataSources 리소스의 promotionDataSource 객체에 있는 필드에 대한 자세한 내용은 PromotionDataSource를 참고하세요.
기존 데이터 소스
기존 데이터 소스의 경우 accounts.dataSources.name를 모르면 dataSources.list를 사용하여 검색합니다.
또는 accounts.promotions.get 메서드를 사용하고 계정 내 기존 프로모션의 응답에서 dataSource 필드를 검사하여 각 프로모션의 데이터 소스를 식별할 수 있습니다.
향후 API 호출에서 직접 참조하려면 각 프로모션의 accounts.dataSources.name를 로컬 데이터베이스에 저장하는 것이 좋습니다.
요청
요청을 하려면 다음 URL을 사용하세요.
POST https://merchantapi.googleapis.com/promotions/v1/{ACCOUNT_NAME}/promotions
Content API for Shopping에서 이전하기
다음은 프로모션 관련 요청에 대해 Content API for Shopping과 판매자 프로모션 API를 비교한 것입니다.
URL
Content API for Shopping:
https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/promotions
Merchant API에서는 다음과 같이 변경됩니다.
https://merchantapi.googleapis.com/promotions/v1/{parent=accounts/*}/promotions
식별자
Content API for Shopping:
{MERCHANT_ID}/promotions/{PROMOTION_ID}
Merchant API에서는 다음과 같이 변경됩니다.
{NAME}
메서드
Merchant API는 프로모션에 다음 메서드를 지원합니다.
- 프로모션 삽입
- 프로모션 받기
- 프로모션 나열
다음은 Content API for Shopping과 Merchant API에서 사용할 수 있는 프로모션 방법을 비교한 것입니다.
| 기능 | Content API for Shopping | Merchant API |
|---|---|---|
| URL | https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/promotions |
https://merchantapi.googleapis.com/promotions/v1/{parent=accounts/*}/promotions |
| 식별자 | {MERCHANT_ID}/promotions/{PROMOTION_ID} |
{NAME} |
| 메서드 |
|
|
필드 변경사항
다음 표는 Merchant Promotions API의 판매자 프로모션 변경사항을 보여줍니다.
참고용 예시는 accounts.promotions를 참고하세요.
| Content API for Shopping | Merchant API | 설명 |
|---|---|---|
| (지원되지 않음) | custom_attributes |
커스텀 (사용자 제공) 속성 목록입니다. 또한 이 속성을 사용하여 피드 사양의 모든 속성을 일반적인 형식으로 제출할 수 있습니다. 예를 들면 다음과 같습니다.
{
"name": "size type", "value": "regular"
}
|
| 지원되지 않음 | data_source | 프로모션을 만들려면 기존 데이터 소스가 필요합니다. |
| 지원되지 않음 | attributes |
프로모션별 속성(예: long_tile, promotion_effective_timeperiod, 기타)은 속성 메시지의 일부입니다. |
| item_id | item_id_inclusion |
프로모션이 적용되는 상품 ID 목록의 이름이 로 변경됩니다. |
| store_id | store_id_inclusion |
프로모션이 적용되는 매장 ID 목록의 이름이
로 바뀝니다. |
| product_type | product_type_inclusion |
프로모션이 적용되는 제품 유형 목록의 이름이
바뀝니다. |
| item_group_id | item_group_id_inclusion |
프로모션이 적용되는 상품 그룹 ID 목록의 이름이 (으)로 바뀝니다. |
| brand | brand_inclusion |
프로모션이 적용되는 브랜드 목록의 이름이
바뀝니다. |
| store_code | store_codes_inclusion |
프로모션이 적용되는 매장 코드 목록의 이름이
변경되었습니다. |
price:
{
object (Price)
}
|
price:
{
object (Price)
}
|
가격의 정의가 변경되었습니다.
Content API for Shopping에서 Price
가격 금액은 이제 마이크로 단위로 기록되며,
amount 필드 이름이 값에서
currency 필드 이름이 |
| order_limit | (지원되지 않음) | order_limit 속성은 지원되지 않습니다. |
| shippingServiceNames[] | (지원되지 않음) | shippingServiceNames[]는 지원되지 않습니다. |
| money_budget | (지원되지 않음) | money_budget은 지원되지 않습니다. |
| promotion_destination_ids | promotion_destinations | promotionDestinationIds의 이름이 변경되었습니다. |
프로모션 상태
{
"destinationStatuses": [
{
"destination": string,
"status": enum (State)
}
],
"promotionIssue": [
{
"code": string,
"detail": string
}
],
"creationDate": string,
"lastUpdateDate": string
}
|
프로모션 상태가 변경되었습니다.
문제에서 더 세부적인 내용을 확인할 수 있습니다.
promotionStatus = {
destinationStatuses = [
{
reportingContext = Enum
status = Enum
},
],
itemLevelIssues = [
{
code = String
severity = Enum
resolution = String
reportingContext = Enum
description = String
detail = String
documentation = String applicableCountries = [
String,
]
}
]
}
|
|