Table of Contents | ||||
---|---|---|---|---|
|
...
1. Cancel Order
1) Purpose
채널에서 발생한 여행자 취소에 대해 AX Cloud 에 요청 합니다.
해당 요청으로 채널에서 발생한 취소를 처리할 수 있습니다.
주문 전체 취소가 아니라 부분 취소를 원하면 티켓 단위로 취소할 수 있습니다. 주문 - 티켓 날짜지정형 입장권 주문 부분 취소 요청
채널에서 구매자의 주문 취소를 확정 후 AX Cloud와 동기화하기 위해 사용합니다.
Drawio | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2) Detail
고유한 채널 코드와 유효한 API Key 를 Request Header에 정해진 형식으로 입력해야만 호출 가능합니다.
AX에서 해당 주문의 상태와 Channel에서 해당 주문의 상태를 동기화하기 위해 두 개의 주문 상태를 각각 변경합니다.
2. API Spec
1) Request
Endpoint | product environment: https://prod.ax-cloud.com/v1/channel/orders/day-ticket/{ax_order_code} test environment: https://test.ax-cloud.com/v1/channel/orders/tour/{ax_order_code} | ||
---|---|---|---|
Method | PATCH | ||
Description | 주문 상태 변경취소 | ||
Content-Type | application/json | ||
Headers > Authorization | Token {api_key} | Headers > Channel | Code {channel_code} |
2) Body Parameter
Name | Required | Type | Description | ax_status | O | String|
---|---|---|---|---|---|---|
| channel_status | O | String |
| ||
comment | X | String |
|
3) Response
Name | Type | Description | ||
---|---|---|---|---|
status_code | Integer | 정상 처리 시 200 | ||
data | Object | - | ||
channel_order_code | IntegerString | 갱신된 채널의 취소된 주문의 식별자 | ||
axchannel_order_status | String | 갱신된 AX의 취소된 Channel의 주문 상태 | ||
channelax_order_statuscode | String | 갱신된 Channel의 주문 상태 | commentAX의 취소된 주문의 식별자 | |
ax_order_status | String갱신시 남긴 주석 | 취소된 AX의 주문 상태 |
Expand | ||
---|---|---|
| ||
|
4) Error Spec
Expand | ||
---|---|---|
| ||
|
Expand | ||
---|---|---|
| ||
|
3. Request Example
1) CURL
Code Block |
---|
curl -X 'PATCH' \ 'https://prodtest.ax-cloud.com/v1/channel/orders/day-ticket/915c1218-f41c-492b-bb0b-96177ff4d2ee' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'X-CSRFTOKEN: qE3VQawgUcqbERA2G3LiGZQ1gPQuZZQLNmz9OmMxB7EuDCGMjjEgMQMsdVcGi7kw' \ -H "Authorization: Token api_key_secret" \ -H "Channel: Code code_secret" \ -d '{ "axchannel_order_status": "5", "channel_status": "5Traveler cancel", "comment": "여행자의 개인 사정으로 인한 취소" }' |
...