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 8 Next »


1. Get Price

1) Purpose

  • 채널에 등록된 상품의 최신 가격 정보를 조회 합니다.

  • 가장 최근에 조회한 가격일 수록 최신의 가격 정보입니다.

2) Detail

  • 가격 정보는 자주 주기적으로 조회해야 최신의 가격을 취득할 수 있습니다.

  • 여행자가 결제할 시기에 가까울 수록 최신 가격 정보 입니다.

  • 고유한 채널 코드와 유효한 API Key 를 Request Header에 정해진 형식으로 입력해야만 호출 가능합니다.

2. API Spec

1) Request

Endpoint

https://prod.ax-cloud.com/v1/channel/price/day-ticket/{product_code}

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_code

O

String

Product ID(UUID)

3) Response

Name

 

 

Type

Description

status_code

Integer

정상 처리 시 200

prices

Object

 

 

{depth_combination_code}

Object

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

 

 

currency

String

  • 상품이 팔린 화폐

  • 원화 "KRW"

  • 미국 달러 "USD"

 

 

price

String

  • 가격

  • 소수점 5자리

4) Response Example

 Status Code: 200 Cause: 정상 처리 시
{
  "status_code": 200,
  "prices": {
    "d96b2ed4-12c5-4fb5-ae94-4f39b11ee980": {
      "currency": "KRW",
      "price": "71200.00000"
    },
    "90c2e47c-c1e2-4d9f-8b91-1073fd929255": {
      "currency": "KRW",
      "price": "70000.00000"
    },
    "fb0a4845-7566-4c0b-8b68-23d822dff020": {
      "currency": "KRW",
      "price": "69800.00000"
    }
  }
}

5) Error Spec

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

3. Request Example

1) CURL

curl -X 'POST' \
  'https://prod.ax-cloud.com/v1/channel/price/day-ticket/481d654b-967f-47fb-8989-e20a9ba8477a' \
  -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"
    }
  }
}'

  • No labels