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


1. Get Confirm

1) Purpose

  • AX Cloud 에서 Supplier 가 주문 확정 처리한 정보를 조회 합니다.

  • 조회한 정보와 동기화 하여 채널에서 확정 처리할 수 있습니다.

2) Detail

  • AX Cloud 와 채널이 확정 상태가 동기화 되어야 합니다.

  • 최대한 둘의 간격이 발생하지 않도록 자주 호출하여 업데이트가 권장 됩니다.

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

2. API Spec

1) Request

Endpoint

https://prod.ax-cloud.com/v1/channel/orders/tour/{order_code}

Method

GET

Description

주문 확정 정보 조회

Content-Type

application/json

Headers > Authorization

Token {api_key}

Headers > Channel

Code {channel_code}

2) Response

Name

Type

Description

status_code

Integer

정상 처리 시 200

data

List[Object]

주문의 상태 및 상태에 대한 주석

channel_order_code

string

채널에서의 주문 식별자

ax_order_code

string

AX의 주문 식별자

status

String

  • 주문 상태

  • 주문 상태는 다음과 같습니다.

    • {"1": "New"}, # 새 주문
      {"2": "Supplier pending"}, # Supplier 대기
      {"3": "Supplier confirm"}, # Supplier 확정
      {"4": "Supplier reject"}, # Supplier 거절
      {"5": "Traveler cancel"}, # 여행자 취소
      {"6": "Unavoidable cancel"} # 불가피한 취소

comment

String

주문 상태에 대한 주석

 Status Code : 200 정상 처리 시
{
  "status_code": 200,
  "data": [
    {
      "channel_order_code": "af01c7c4-1637-46fb-b289-a090a9be0397",
      "ax_order_code": "d96b2ed4-12c5-4fb5-ae94-4f39b11ee980",
      "status": 3,
      "comment": "Supplier 확정",
    }
  ]
}

3) Error Spec

 Status Code : 403 Cause: 유효하지 않은 API Key 혹은 Channel Code
{"message": "이 작업을 수행할 권한(permission)이 없습니다."}
 Status Code : 404 Cause: 유효하지 않은 order_code
{"message": "찾을 수 없습니다."}

3. Request Example

1) CURL

curl -X 'GET' \
  'https://prod.ax-cloud.com/v1/channel/orders/tour/d96b2ed4-12c5-4fb5-ae94-4f39b11ee980' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'X-CSRFTOKEN: qE3VQawgUcqbERA2G3LiGZQ1gPQuZZQLNmz9OmMxB7EuDCGMjjEgMQMsdVcGi7kw' \
  -H "Authorization: Token api_key_secret" \
  -H "Channel: Code code_secret"

  • No labels