Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 57 Next »


1. Product Registration

1) Purpose

  • 상품 최초 등록과 등록 이후 발생한 상품 업데이트를 채널에 적용합니다.

  • 주문 처리를 위해 채널의 상품 데이터와 매핑하는 용도입니다.

2) Detail

  • 유효한 API Key를 Request Header에 토큰으로 입력해야만 호출 가능합니다.

  • 상품 - 투어상품 상세정보 조회 을 통해 가져온 Product Data를 채널에 업로드 한 이후, AX에 업로드 완료된 정보를 전송합니다.

  • 상품 업데이트 이후, 이 API를 통해 옵션 매핑데이터를 다시 전달해주셔야 합니다.

2. API spec

1) Request

Endpoint

product environment: https://prod.ax-cloud.com/v1/channel/products/tour/registration/{product_code}

test environment: https://test.ax-cloud.com/v1/channel/products/tour/registration/{product_code}

Method

POST

Description

상품 등록 및 옵션 매핑

Content-Type

application/json

Headers > Authorization

Token {api_key}

Headers > Channel

Code {channel_code}

2) Path Parameter

Name

Required

Type

Description

Example

product_code

O

String

Product ID(UUID)

“c1f891f7-3f22-4b2c-a4a9-e7754c20be23”

3) Request Body

Name

Required

Type

Description

Example

mapping_data

O

Object

channel_product_name

O

String

  • 채널에 업로드된 상품 이름(여행자 노출 기준)

channel_product_link

O

String

  • 업로드된 상품을 확인할 수 있는 페이지 URL

channel_product_id

O

String

  • 채널에서 사용하는 상품 고유 ID

(1) Mapping Data

  • AX의 옵션 데이터를 이용해 채널의 옵션과 매핑합니다.

  • 옵션 이름은 여행자에게 노출되는 이름입니다.

    • 한 상품에서 같은 옵션명을 사용해서는 안됩니다.

    • AX의 모든 옵션 데이터를 매핑해야 합니다.

{
  <option_code>: <채널에서 설정한 옵션 이름(여행자에게 노출되는 이름)>,
  <option_code>: <채널에서 설정한 옵션 이름(여행자에게 노출되는 이름)>,
  <option_code>: <채널에서 설정한 옵션 이름(여행자에게 노출되는 이름)>,
  <option_code>: <채널에서 설정한 옵션 이름(여행자에게 노출되는 이름)>,
  ...
}

4) Response

 Status Code : 201 Response: 채널에 등록 완료한 AX Cloud 상품의 버전
{
  "product_code": <string>,
  "channel_product_mapping_data_code": <string>
}

5) Error Spec

 Status Code : 400 Cause: 유효하지 않은 product code
{'error': "product not found.")]}
 Status Code : 400 Cause: 유효하지 않은 mapping data (key 누락)
{'error': 'mapping data is not valid'}
 Status Code : 403 Cause: 유효하지 않은 API Key 혹은 Channel Code
{'detail': ErrorDetail(string='이 작업을 수행할 권한(permission)이 없습니다.', code='permission_denied')}

3. Request Example

1) CURL

curl \
--location --request POST 'https://prod.ax-cloud.com/v1/channel/products/tour/registration/e99f822f-42a8-4d3f-890e-77c5a9bc9cf3'\
--header 'Authorization: Token <access_key>' \
--header 'Content-Type: application/json' \
--data '{
    "mapping_data":{
      "d96b3ed4-12c5-4fb5-ae22-4f39b11ee980": "파리출발-식사제공-하절기-성인",
      "f7sa8f7s-gds8-6fa6-ng7d-fanjefr32n32": "파리출발-식사제공-하절기-아동"
    },
    "channel_product_name": "[프랑스파리]나른한 저녁 밤산책투어",
    "channel_product_link": "https://www.*****.com/ko/product/*******",
    "channel_product_id": "channel-214292"
  }'
  • No labels