프로모션 관리 이전

Merchant Promotions 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}
메서드
  • insert
  • get
  • list
  • customBatch
  • delete
  • insert
  • get
  • list

필드 변경사항

표에는 판매자 프로모션 API의 프로모션 변경사항이 나와 있습니다.

참고 예시는 accounts.promotions를 참고하세요.

Content API for Shopping Merchant API 설명
(지원되지 않음) custom_attributes 사용자 제공 맞춤 속성 목록입니다. 일반적인 형식으로 피드 사양의 속성을 제출하는 데 사용할 수도 있습니다.


예를 들면 다음과 같습니다.
{
  "name": "size type", "value": "regular"
}
이는 API에서 명시적으로 노출되지 않는 속성을 제출하는 데 유용합니다.
지원되지 않음 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에서 가격
은 문자열 형식의 십진수였습니다.

이제 가격 금액은 마이크로 단위로 기록되며,
100만 마이크로는 통화의 표준 단위와
같습니다.

amount 필드 이름이 value에서
amountMicros로 변경되었습니다.

currency 필드 이름이
currencyCode 로 변경되었습니다. 형식은
ISO 4217로 유지됩니다. (위키피디아)

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,
    ]
    }
  ]
}