인벤토리 - 가용성 정보 조회
- 1 1. Inventory Quantity
- 1.1 1) Purpose
- 1.2 2) Detail
- 2 2. API spec
- 2.1 1) Request
- 2.2 2) Path Parameter
- 2.3 3) Query Parameter
- 2.4 3) Response
- 2.5 4) Response Example
- 2.6 5) Error Spec
- 3 3. Request Example
- 3.1 1) CURL
1. Inventory Quantity
1) Purpose
특정 Product의 인벤토리의 가용성을 확인하기 위하여 사용하는 API입니다.
가용성을 확인하면 해당 인벤토리를 구매 가능 여부를 판단할 수 있습니다.
2) Detail
인벤토리는 Depth Combination(Option) 와 연결되어 있습니다.
Path Parameter로 입력한 <product_id> 와 일치하는 Product의 Inventory List 를 보여줍니다.
유효한 API Key를 Request Header에 토큰으로 입력해야만 호출 가능합니다.
2. API spec
1) Request
Endpoint | product environment: https://prod.ax-cloud.com/v1/channel/inventory/tour/{product_code} test environment: https://test.ax-cloud.com/v1/channel/inventory/tour/{product_code} |
---|---|
Method | GET |
Description | 특정 Product의 Inventory를 조회합니다. |
Content-Type | application/json |
Headers > Authorization | Token {api_key} |
Headers > Channel | Code {channel_code} |
2) Path Parameter
Name | Required | Type | Description |
---|---|---|---|
product_code | O | UUID | Product ID(UUID) |
3) Query Parameter
Name | Required | Type | Description |
---|---|---|---|
page | X | Integer | Page number(default : 1) |
page_size | X | Integer | Size per page(default : 25) |
3) Response
Name |
| Type | Description | |
---|---|---|---|---|
status_code | Integer | 정상 처리 시 200 | ||
option_codes | Object |
| ||
| {option_code} | List[Object] | 상품의 옵션 식별자 | |
|
| inventory_code | String | 상품의 인벤토리 식별자 |
|
| date | Date | 날짜 |
|
| start_time | Time | 투어 시작 시간 |
|
| day_of_the_week | String | 요일 |
|
| is_order | Boolean | 판매 유무 |
|
| max_quantity | Integer | 최초 생성 재고 |
|
| min_quantity | Integer | 최소 출발 인원으로 ordered_quantity가 이 값 보다 높아야 Tour가 진행된다. |
|
| remain_quantity | Integer | 남은 재고 |
|
| ordered_quantity | Integer | 주문 갯수 |
4) Response Example
5) Error Spec
3. Request Example
1) CURL