Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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}

...

Name

Required

Type

Description

product_code

O

StringUUID

Product ID(UUID)

3) Query Parameter

...

3) Response

data

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

주문 갯수

depth_combination_id

String

인벤토리 연관된 옵션 아이디

4) Response Example

Expand
titleStatus Code : 200 정상 처리 시
Code Block
languagejson
{
  "status_code": 200,
  "dataoption_codes": {
      "1e0bd91f-989a-45e7-8e1c-4fe2d4231ae5": [
      {
        "inventory_code": c2befdbe"d50a6594-57fa3457-4a474e87-9132afe1-f7f8153b5f2c435ca13b8cdd",
        "date": "2023-03-01",
        "start_time": "14:00", 
        "day_of_the_week": "Sunday", 
        "is_order": true,
        "max_quantity": 25, 
        "min_quantity": 5,
        "remain_quantity": 1015, 
        "ordered_quantity": 10
15      },
      {
        "inventory_code": 0c529494"374bf54a-955fd7c1-44294ad3-8fe6a95a-6afc67d2a05832aa3e7212ae",
        "date": "2023-03-08",
        "start_time": "14:00", 
        "day_of_the_week": "Sunday", 
        "is_order": true, 
        "max_quantity": 25, 
        "min_quantity": 5,
        "remain_quantity": 205, 
        "ordered_quantity": 20
5      },
      {
        "inventory_code": 2269ced3"5e77bcf2-3cf99026-4a754263-b1fd847b-c6aa36a189e9a8a4a84b5613",
        "date": "2023-03-15",
        "start_time": "14:00", 
        "day_of_the_week": "Sunday", 
        "is_order": true, 
        "max_quantity": 25, 
        "min_quantity": 5,
        "remain_quantity": 11, 
        "ordered_quantity": 14
      }
    ]
  }
}

5) Error Spec

Expand
titleStatus Code : 404 Cause: 유효하지 않은 요청 값
Code Block
{'message': '찾을 수 없습니다.'}

...

Code Block
curl -X 'POST' \
  'https://prod.ax-cloud.com/v1/channel/inventory/tour/15a8b34ec-1a32-4b70-a5ba-8f2c81ec4c09' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Token api_key_secret' \
  -H 'Channel: Code code_secret'
  -d '{
  "status_code": 200,
  "data": [
    {
      "inventory_code": c2befdbe-57fa-4a47-9132-f7f8153b5f2c,
      "date": "2023-03-01",
      "start_time": "14:00", 
      "day_of_the_week": "Sunday", 
      "is_order": true, 
      "max_quantity": 25, 
      "min_quantity": 5, 
      "remain_quantity": 10,
      "ordered_quantity": 15
    },
    {
      "inventory_code": 0c529494-955f-4429-8fe6-6afc67d2a058,
      "date": "2023-03-08",
      "start_time": "14:00", 
      "day_of_the_week": "Sunday", 
      "is_order": true, 
      "max_quantity": 25, 
      "min_quantity": 5, 
      "remain_quantity": 20,
      "ordered_quantity": 5
    },
    {
      "inventory_code": 2269ced3-3cf9-4a75-b1fd-c6aa36a189e9,
      "date": "2023-03-15",
      "start_time": "14:00", 
      "day_of_the_week": "Sunday", 
      "is_order": true, 
      "max_quantity": 25, 
      "min_quantity": 5, 
      "remain_quantity": 11,
      "ordered_quantity": 14
    }
  ]
}
'

...