Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

2. API Spec

1) Request

Endpoint

구현 예정https://prod.ax-cloud.com/v1/channel/price/ticket/{product_id}

Method

GET

Description

상품의 최신 가격 정보 조회

Content-Type

application/json

Headers > Authorization

Token {api_key}

Headers > Channel

Code {channel_code}

2)

...

Path Parameter

Name

Required

Type

Description

product_id

O

String

Product ID

3) Response

  • 구현 예정

4) Error Spec

...

Name

 

 

Type

Description

status_code

Integer

정상 처리 시 200

prices

Object

 

 

{option_name}

Object

상품의 옵션에 해당하는 식별자

 

 

currency

String

  • 상품이 팔린 화폐

  • {"1": "KRW"}, # 원화
    {"2": "USD"} # 미국 달러

 

 

price

String

  • 가격

  • 소수점 5자리

4) Response Example

Expand
titleStatus Code: 200 Cause: 정상 처리 시
Code Block
languagenone
{
  "status_code": 200,
  "prices": {
    "d96b2ed4-12c5-4fb5-ae94-4f39b11ee980": {
      "currency": "1",
      "price": "12345678.00000"
    },
    "90c2e47c-c1e2-4d9f-8b91-1073fd929255": {
      "currency": "1",
      "price": "123456789.00000"
    },
    "fb0a4845-7566-4c0b-8b68-23d822dff020": {
      "currency": "1",
      "price": "123456780.00000"
    }
  }
}

5) Error Spec

Expand
titleStatus Code : 404 Cause: 유효하지 않은 요청 값
Code Block
{'message': '찾을 수 없습니다.'}
Expand
titleStatus Code : 403 Cause: 유효하지 않은 API Key 혹은 Channel Code
Code Block
{'detail': ErrorDetail(string='이 작업을 수행할 권한(permission)이 없습니다.', code='permission_denied')}

3. Request Example

1) CURL

...

Code Block
curl -X 'POST' \
  'https://prod.ax-cloud.com/v1/channel/price/ticket/1' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H "Authorization: Token api_key_secret" \
  -H "Channel: Code code_secret" \
  -d '{
  "status_code": 200,
  "prices": {
    "d96b2ed4-12c5-4fb5-ae94-4f39b11ee980": {
      "currency": "1",
      "price": "12345678.00000"
    },
    "90c2e47c-c1e2-4d9f-8b91-1073fd929255": {
      "currency": "1",
      "price": "123456789.00000"
    },
    "fb0a4845-7566-4c0b-8b68-23d822dff020": {
      "currency": "1",
      "price": "123456780.00000"
    }
  }
}'