Table of Contents |
---|
...
1.
...
Request Refund
1) Purpose
채널에서 상품의 옵션이 판매되었을 때 이 API로 새 주문을 등록합니다구매자에 의해 발생한 주문 취소 건에 대한 환불을 AX Cloud 에 요청합니다.
채널에서 미리 정해진 환불 규정에 따라 AX Cloud로 단방향 요청을 합니다.
2) Detail
...
채널에서 정해진 환불 규정에 따라 진행된 환불 정보를 포함하여 요청합니다.
유효한 API Key를 Request Header에 정해진 형식으로 입력해야만 호출 가능합니다.
2. API Spec
1) Request
Endpoint | product environment: https://prod.ax-cloud.com/v1/channel/orders/tour/{ax_order_code}/tickets/{ticket_code}/refund | ||
---|---|---|---|
Method | POST | ||
Description | 새 주문 등록채널에서 특정 주문의 환불이 진행된 건에 대해 AX Cloud와 동기화 합니다. | ||
Content-Type | application/json | ||
Headers > Authorization | Token {api_key} | Headers > Channel | Code {channel_code} |
2) Body Parameter
Name | Required | Type | Description | |
---|---|---|---|---|
depthchannel_refunded_combinationsprice | O | List[Depth Combination] |
| |
order | O | Order |
| |
purchaser | O | Purchaser |
| |
representative | O | Traveler | 대표 여행자에 대한 정보 하단 4) Type > Traveler 참고 String |
|
channel_canceled_at | O | Datetime |
| |
channel_refunded_at | O | Datetime |
| |
channel_policy | O | Object |
|
3) Response
Name | Type | Description | |
---|---|---|---|
status_code | Integer | 정상 처리 시 201 | |
data | Object | - | |
order_code | String | 생성된 주문의 식별자 | 200 |
Expand | ||
---|---|---|
| ||
|
4) Error Spec
Expand | ||
---|---|---|
| ||
|
Expand | ||
---|---|---|
| ||
|
3. Request Example
1) CURL
Code Block |
---|
curl -X 'POSTPATCH' \ 'https://prod.ax-cloud.com/v1/channel/orders/tour/b9872ed4-12c5-4fb5-ae18-4f39b11ee912/tickets/915c1218-f41c-492b-bb0b-96177ff4d2ee/refunds' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'X-CSRFTOKEN: gVNVnmaKfzEovZJFYXnxVkZsluzfXFWJDDj9lyq1WuSHuKPpBdgv1bVTiAVrgNqu' \ -H "Authorization: Token api_key_secret" \ -H "Channel: Code code_secret" \ -d '{ "depth_combinations": [ { \ "channel_product_mapping_code": "af01c7c4-1637-46fb-b289-a090a9be0397", "dc_code": "d96b2ed4-12c5-4fb5-ae94-4f39b11ee980", "quantity": 2, "use_date": "2022-01-21T10:41:25.409Z", "unit_selling_price": 2222, "discount": 22, "discount_method": "쿠폰 할인", "amount_price": "2200", "tickets": [ { "name": "first last", "national_code": "82", "phone": "01012345678", "email": "user@example.com", "additional": { "english_name": "first last", "korean_name": "성 이름" }, "extra": "소라 알레르기가 있습니다." } ] } ], "order": { "channel_order_code": "d96b3ed4-12c5-4fb5-ae22-4f39b11ee980", "purchased_at": "2022-01-21T10:41:25.409Z", "purchase_requested_at": "2022-01-21T10:41:25.409Z", "reserved_at": "2022-01-21T10:41:25.409Z", "reservation_requested_at": "2022-01-21T10:41:25.409Z", "sub_total": "4444", "discount_method": "주문 전체 10% 할인", "discount": "444", "total": "4000", "status": "2", "is_voucher": true, "comment": "string", "currency": "1" }, "purchaser": { "is_required_more_information": true, "name": "first last", "national_code": "82", "phone": "01012345678", "email": "user@example.com", "additional": { "english_name": "first last", "korean_name": "성이름" }, "extra": "폐쇄 공포증이 있습니다." }, "representative": { "name": "first last", "national_code": "82", "phone": "01012345678", "email": "user@example.com", "additional": { "english_name": "first last", "korean_name": "성이름" }, "extra": "폐쇄 공포증이 있습니다." } }' |
4. Type
1) Order
...
Name
...
Required
...
Type
...
Description
...
channel_order_id
...
O
...
String
...
채널에서 주문을 식별하기 위해 부여한 아이디
...
purchased_at
...
O
...
Datetime
...
UTC 기준 상품이 팔린 일시
...
purchase_requested_at
...
X
...
Datetime
...
UTC 기준 구매 요청이 발생한 일시
...
reserved_at
...
X
...
Datetime
...
UTC 기준 예약이 발생한 일시
...
reservation_requested_at
...
X
...
Datetime
...
UTC 기준 예약 요청이 발생한 일시
...
sub_total
...
O
...
String
...
티켓들의 Amount 총 합
소수점 5자리
depth_combination > travelers에 기입된 unit_selling_price 총합
...
discount_method
...
X
...
String
...
주문 전체에 적용된 할인 방법
...
discount
...
X
...
String
...
주문 전체에 적용된 할인가
소수점 5자리
...
total
...
O
...
String
...
최종 결제 가격
소수점 5자리
...
status
...
O
...
String
...
주문의 상태
{"1": "New"}, # 새 주문
{"2": "Supplier pending"}, # Supplier 대기
{"3": "Supplier confirm"}, # Supplier 확정
{"4": "Supplier reject"}, # Supplier 거절
{"5": "Traveler cancel"}, # 여행자 취소
{"6": "Unavoidable cancel"} # 불가피한 취소
...
is_voucher
...
O
...
Boolean
...
True
voucher가 있는 상품
False
voucher가 없는 상품
...
comment
...
X
...
String
...
추가적으로 입력된 코멘트 입력
...
currency
...
O
...
String
...
상품이 팔린 화폐
{"1": "KRW"}, # 원화
{"2": "USD"} # 미국 달러
2) Depth Combination
...
Name
...
Required
...
Type
...
Description
...
channel_product_mapping_code
...
O
...
String
...
채널에 등록된 상품 옵션과 AX Cloud 의 상품 옵션을 매핑한 테이블의 고유 식별자
...
dc_code
...
O
...
String
...
팔린 상품의 옵션에 해당하는 Depth Combination의 고유 식별자
...
quantity
...
O
...
Integer
...
각 옵션 판매량
...
use_date
...
O
...
Datetime
...
팔린 상품의 사용 일자를 Datetime 표기
Depth Combination의 특정 날짜의 인벤토리를 특정하기 위해 필요.
...
unit_selling_price
...
O
...
String
...
옵션 당 판매 단가
소수점 5자리
...
discount
...
X
...
String
...
옵션 당 할인가
소수점 5자리
...
discount_method
...
X
...
String
...
옵션 당 할인 방법
...
amount_price
...
O
...
String
...
옵션 당 최종가격
소수점 5자리
...
travelers
...
O
...
List[Traveler]
...
여행자 목록
3) Purchaser
...
Name
...
Required
...
Type
...
Description
...
is_required_more_information
...
O
...
Boolean
...
True
추가적으로 더 입력받을 정보가 있다.
False
추가적으로 더 입력받을 정보가 없다.
...
name
...
O
...
String
...
구매자 이름
...
national_code
...
O
...
String
...
여행자 전화번호 국가번호
...
phone
...
O
...
String
...
여행자 핸드폰 번호
...
...
O
...
String
...
여행자 이메일
...
additional
...
X
...
Object
...
Supplier가 요구하는 추가 정보
...
extra
...
O
...
String
...
여행자가 작성한 기타 정보
4) Traveler
...
Name
...
Required
...
Type
...
Description
...
name
...
O
...
String
...
여행자 이름
...
national_code
...
O
...
String
...
여행자 전화번호 국가 번호
...
phone
...
O
...
String
...
여행자 핸드폰 번호
...
...
O
...
String
...
여행자 이메일
...
additional
...
X
...
Object
...
Supplier가 요구하는 추가 정보
...
extra
...
X
...
String
...
refund_price": "5000",
"channel_canceled_datetime": "2021-01-20 21:13:13",
"channel_refunded_datetime": "2021-01-20 23:24:29",
"policy": {"0": "1", "50": "3", "100": “7"}
}' |