주문 - 날짜지정형 입장권 주문 생성
- 1 1. Create Order
- 1.1 1) Purpose
- 1.2 2) Detail
- 2 2. API Spec
- 2.1 1) Request
- 2.2 2) Body Parameter
- 2.2.1 (1) Parameter
- 2.2.2 (2) Type - Order
- 2.2.3 (3) Type - Option
- 2.2.4 (4) Type - Purchaser
- 2.2.5 (5) Type - Ticket
- 2.3 3) Response
- 2.4 4) Error Spec
- 3 3. Request Example
- 3.1 1) CURL
1. Create Order
1) Purpose
채널에서 상품의 옵션이 판매되었을 때 이 API로 새 주문을 등록합니다.
Supplier 가 주문을 처리하기 위해서 등록해야 합니다.
2) Detail
유효한 API Key 를 Request Header에 정해진 형식으로 입력해야만 호출 가능합니다.
상품 - 등록 투어상품 매핑 요청 에서 응답으로 받은
channel_product_mapping_data_code
와, 팔린 (상품의) 옵션의option_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 관계입니다.
2. API Spec
1) Request
Endpoint | product environment: https://prod.ax-cloud.com/v1/channel/orders/day-ticket test environment: https://test.ax-cloud.com/v1/channel/orders/day-ticket |
---|---|
Method | POST |
Description | 새 주문 등록 |
Content-Type | application/json |
Headers > Authorization | Token {api_key} |
2) Body Parameter
(1) Parameter
Name | Required | Type | Description | Example |
---|---|---|---|---|
options | O | List[Option] |
|
|
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 |
|
|
option_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] |
|
|
(4) Type - Purchaser
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 |
|
|
(5) Type - Ticket
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 |
|
|
3) Response
Name | Type | Description | Example | |||
---|---|---|---|---|---|---|
status_code | Integer |
|
| |||
data | Object |
|
| |||
| channel_order_code | String |
|
| ||
| channel_order_status | String |
|
| ||
| options | List[Object] |
|
| ||
|
| option_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 |
|
|