본문으로 건너뛰기

상품 옵션으로 예약 슬롯 조회

POST 

/schedule/open/v1/queries/get-reservation-slots-by-product

상품 옵션 ID를 기준으로 예약 가능한 슬롯을 조회합니다.

  • 상품 옵션들이 연결된 예약 그룹 중 대표 그룹 하나가 선택되어 해당 그룹의 슬롯이 반환됩니다.
  • 대표 그룹은 가장 큰 슬롯 간격(intervalMinutes)을 가진 그룹 중 기본 그룹이 우선 선택됩니다.
  • 휴무일 및 예약 그룹 시작일 이전의 슬롯은 제외됩니다.

에러 응답

startDateUtc가 ISO 8601 포맷이 아닌 경우
{
"status": 400,
"message": "InvalidRequestException",
"className": "InvalidRequestException",
"errorProperties": [
{
"key": "startDateUtc",
"reason": "NotAvailable"
}
]
}
endDateUtc가 ISO 8601 포맷이 아닌 경우
{
"status": 400,
"message": "InvalidRequestException",
"className": "InvalidRequestException",
"errorProperties": [
{
"key": "endDateUtc",
"reason": "NotAvailable"
}
]
}
endDateUtcstartDateUtc보다 이전일 경우
{
"status": 400,
"message": "InvalidRequestException",
"className": "InvalidRequestException",
"errorProperties": [
{
"key": "endDateUtc",
"reason": "InvalidTimeRange"
}
]
}

Request

### Content-Type별 요청의 JSON Schema

{
"application/json": {
"schema": {
"required": [
"requestedProductOptionIds",
"requestedProductOptionIdsOfPromotion",
"startDateUtc",
"endDateUtc"
],
"type": "object",
"properties": {
"requestedProductOptionIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "조회할 상품 옵션 ID 목록. 옵션들이 연결된 예약 그룹 중 대표 그룹이 선택되어 해당 슬롯이 반환됩니다."
},
"requestedProductOptionIdsOfPromotion": {
"type": "array",
"items": {
"type": "string"
},
"description": "@deprecated 프로모션 시술 옵션 ID 목록. `requestedProductOptionIds`를 사용하세요."
},
"startDateUtc": {
"type": "string",
"description": "조회 범위 시작 시각 (ISO 8601, e.g. `2024-01-01T00:00:00Z`)",
"format": "date-time"
},
"endDateUtc": {
"type": "string",
"description": "조회 범위 끝 시각 (ISO 8601, e.g. `2024-01-31T23:59:59Z`)",
"format": "date-time"
}
},
"title": "protos.open.GetReservationSlotsByProductQuery"
}
}
}

Responses

OK

### Status Code별 응답의 JSON Schema

{
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"required": [
"data"
],
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"required": [
"reservationGroupId",
"zone",
"startDateTimeUtc",
"endDateTimeUtc",
"capacity",
"reservationCount"
],
"type": "object",
"properties": {
"reservationGroupId": {
"type": "string",
"description": "예약 그룹 ID"
},
"zone": {
"allOf": [
{
"required": [
"id",
"name"
],
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "구역 ID",
"format": "object-id"
},
"name": {
"type": "string",
"description": "구역 이름"
}
},
"title": "protos.open.ReservationSlotZoneConfiguration"
}
],
"description": "구역 정보"
},
"startDateTimeUtc": {
"type": "string",
"description": "예약 시작 시각 (ISO 8601)",
"format": "date-time"
},
"endDateTimeUtc": {
"type": "string",
"description": "예약 종료 시각 (ISO 8601)",
"format": "date-time"
},
"capacity": {
"type": "integer",
"description": "해당 슬롯의 최대 예약 가능 인원",
"format": "int32"
},
"reservationCount": {
"type": "integer",
"description": "현재 예약된 인원 수",
"format": "int32"
}
},
"title": "protos.open.ReservationSlot"
}
}
},
"title": "protos.open.GetReservationSlotsQueryResponse"
}
}
}
}
}