...
유효한 API Key 를 Request Header에 정해진 형식으로 입력해야만 호출 가능합니다.
상품 - 등록 투어상품 매핑 요청 에서 응답으로 받은
channel_product_mapping_data_code
와, 팔린 (상품의) 옵션의dcoption_code
가 필수적으로 요구됩니다.새로 주문을 등록하려는 채널에서는 주문을 추상화한 후, 채널 측 주문 식별자(
channel_order_code
)와 AX 측 주문 식별자(ax_order_code
)를 연동해 관리해야 합니다.하나의 채널 측 주문에 대해 여러 개의 AX 측 주문이 연동될 수 있습니다. (한 주문에서 여러 옵션이 구매된 경우)
하나의 AX 측 주문에서 quantity에 따라 n개의 AX측 ticket이 생성됩니다. 이는 부분 취소를 지원하기 위함입니다. 채널 또한 ticket 단위까지 추상화를 해 AX 측 ticket과 연동한다면 부분 취소를 지원할 수 있습니다.
하나의 채널 측 주문이 하나의 옵션에 대해서 quantity가 1로 구매가 발생했다면 (
channel_order_code
↔︎ax_order_code
↔︎ax_ticket_code
)는 1:1:1 관계입니다.
...
Name | Required | Type | Description | Example |
---|---|---|---|---|
depth_combinationsoptions | O | List[Depth CombinationOption] |
| |
order | O | Order |
| |
purchaser | O | Purchaser |
| |
representative | O | Traveler |
|
(2) Type - Order
Name | Required | Type | Description | Example |
---|---|---|---|---|
channel_order_id | O | String |
| |
purchased_at | O | Datetime |
| |
purchase_requested_at | X | Datetime |
| |
reserved_at | X | Datetime |
| |
reservation_requested_at | X | Datetime |
| |
sub_total | O | String |
| |
discount_method | X | String |
| |
discount | X | String |
| |
total | O | String |
| |
status | O | String |
| |
is_voucher | O | Boolean |
| |
comment | X | String |
| |
currency | O | String |
|
(3) Type -
...
Option
Name | Required | Type | Description | Example |
---|---|---|---|---|
channel_product_mapping_code | O | String |
| |
dcoption_code | O | String |
| |
quantity | O | Integer |
| |
inventory_at | O | Datetime |
| |
unit_selling_price | O | String |
| |
discount | X | String |
| |
discount_method | X | String |
| |
amount_price | O | String |
| |
tickets | O | List[Ticket] |
|
...
Name | Required | Type | Description | Example |
---|---|---|---|---|
is_required_more_information | O | Boolean |
| |
name | O | String |
| |
national_code | O | String |
| |
phone | O | String |
| |
O | String |
| ||
additional | X | Object |
| |
extra | O | String |
|
...
Name | Required | Type | Description | Example |
---|---|---|---|---|
channel_code | O | String |
| |
name | O | String |
| |
national_code | O | String |
| |
phone | O | String |
| |
O | String |
| ||
additional | X | Object |
| |
extra | X | String |
|
...
Name | Type | Description | Example | |||
---|---|---|---|---|---|---|
status_code | Integer |
|
| |||
data | Object |
| ||||
channel_order_code | String |
| ||||
channel_order_status | String |
|
| |||
depth_combinationsoptions | List[Object] | |||||
dcoption_code | string |
| ||||
inventory_at | Datetime |
| ||||
ax_order_code | string |
| ||||
ax_order_status | string |
|
| |||
quantity | Integer |
| ||||
tickets | List[Object] |
| ||||
ax_ticket_code | String |
| ||||
ax_ticket_status | String |
|
|
Expand | ||
---|---|---|
| ||
|
...
Expand | ||
---|---|---|
| ||
|
Expand | ||
---|---|---|
| ||
|
...
Code Block |
---|
curl -X 'POST' \ 'https://test.ax-cloud.com/v1/channel/orders/tour' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H "Authorization: Token api_key_secret" \ -d '{ "depth_combinationsoptions": [ { "channel_product_mapping_code": "af01c7c4-1637-46fb-b289-a090a9be0397", "dcoption_code": "d96b2ed4-12c5-4fb5-ae94-4f39b11ee980", "quantity": 2, "inventory_at": "2017-05-23 23:30:00", "unit_selling_price": 2222, "discount": 22, "discount_method": "쿠폰 할인", "amount_price": "2200", "tickets": [ { "channel_code": "d96b2td4-15c5-4fb5-ae94-4f36667ee980", "name": "first last", "national_code": "82", "phone": "01012345678", "email": "user@example.com", "additional": { "english_name": "first last", "korean_name": "성 이름" }, "extra": "소라 알레르기가 있습니다." }, { "channel_code": "d96b2td4-15c5-4fb5-ae94-4f36667ee981", "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": "2017-05-23 23:30:00", "purchase_requested_at": "2017-05-23 23:30:00", "reserved_at": "2017-05-23 23:30:00", "reservation_requested_at": "2017-05-23 23:30:00", "sub_total": "4444", "discount_method": "주문 전체 10% 할인", "discount": "444", "total": "4000", "status": "New", "is_voucher": true, "comment": "string", "currency": "KRW" }, "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
...
RFC 3339 형식의 UTC 기준 상품이 팔린 일시
...
purchase_requested_at
...
X
...
Datetime
...
RFC 3339 형식의 UTC 기준 구매 요청이 발생한 일시
...
reserved_at
...
X
...
Datetime
...
RFC 3339 형식의 UTC 기준 예약이 발생한 일시
...
reservation_requested_at
...
X
...
Datetime
...
RFC 3339 형식의 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
...
주문의 상태
"New" : 새 주문
...
is_voucher
...
O
...
Boolean
...
True
voucher가 있는 상품
False
voucher가 없는 상품
...
comment
...
X
...
String
...
추가적으로 입력된 코멘트 입력
...
currency
...
O
...
String
...
상품이 팔린 화폐
"KRW" : 원화
"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
...
각 옵션 판매량
...
inventory_at
...
O
...
Datetime
...
팔린 상품의 사용 일자를 RFC 3339 형식의 Datetime 표기
Depth Combination의 특정 날짜의 인벤토리를 특정하기 위해 필요.
...
unit_selling_price
...
O
...
String
...
옵션 당 판매 단가
소수점 5자리
...
discount
...
X
...
String
...
옵션 당 할인가
소수점 5자리
...
discount_method
...
X
...
String
...
옵션 당 할인 방법
...
amount_price
...
O
...
String
...
옵션 당 최종가격
소수점 5자리
...
tickets
...
O
...
List[Ticket]
...
Depth Combination > quantity 하나에 대응되는 Entity
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) Ticket
...
Name
...
Required
...
Type
...
Description
...
channel_code
...
O
...
String
...
Channel에서 DepthCombination > quantity > 하나의 Ticket에 대한 식별자
...
name
...
O
...
String
...
여행자 이름
...
national_code
...
O
...
String
...
여행자 전화번호 국가 번호
...
phone
...
O
...
String
...
여행자 핸드폰 번호
...
...
O
...
String
...
여행자 이메일
...
additional
...
X
...
Object
...
Supplier가 요구하는 추가 정보
...
extra
...
X
...
String
...