본문으로 건너뛰기

시간 점유 생성

POST 

/schedule/open/v1/commands/create-occupied-time

시간 점유를 생성합니다.

  • startDateTimeUtc ~ endDateTimeUtc 시간대를 점유합니다.
  • 시간이 유효하지 않다면 에러가 발생합니다.

에러 응답

startDateTimeUtc가 올바른 시각이 아닐 경우
{
"status": 400,
"message": "InvalidCommandException",
"className": "InvalidCommandException",
"errorProperties": [
{
"key": "startDateTimeUtc",
"reason": "NotAvailable"
}
]
}
endDateTimeUtc가 올바른 시각이 아닐 경우
{
"status": 400,
"message": "InvalidCommandException",
"className": "InvalidCommandException",
"errorProperties": [
{
"key": "endDateTimeUtc",
"reason": "NotAvailable"
}
]
}
startDateTimeUtc가 endDateTimeUtc보다 큰 경우
{
"status": 400,
"message": "InvalidCommandException",
"className": "InvalidCommandException",
"errorProperties": [
{
"key": "endDateTimeUtc",
"reason": "InvalidTimeRange"
}
]
}
startDateTimeUtc와 endDateTimeUtc가 동일하거나, 24시간 이상 차이날 경우
{
"status": 400,
"message": "InvalidCommandException",
"className": "InvalidCommandException",
"errorProperties": [
{
"key": "endDateTimeUtc",
"reason": "InvalidTimeRange"
}
]
}
startDateTimeUtc와 endDateTimeUtc가 서로 다른 날짜일 경우
{
"status": 400,
"message": "InvalidCommandException",
"className": "InvalidCommandException",
"errorProperties": [
{
"key": "endDateTimeUtc",
"reason": "InvalidTimeRange"
}
]
}
존재하지 않는 reservationGroupId, zoneId를 입력했을 경우
{
status: 400,
message: "InvalidCommandException",
className: "InvalidCommandException",
errorProperties: [
{
key: "{{ reservationGroupId 혹은 zoneId }}",
reason: "NotFound"
}
]
}

Request

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

{
"application/json": {
"schema": {
"required": [
"startDateTimeUtc",
"endDateTimeUtc",
"zoneId",
"reservationGroupId"
],
"type": "object",
"properties": {
"startDateTimeUtc": {
"type": "string",
"description": "점유 시작 시각"
},
"endDateTimeUtc": {
"type": "string",
"description": "점유 종료 시각"
},
"memo": {
"type": "string",
"description": "점유 관련 메모"
},
"zoneId": {
"type": "string",
"description": "점유할 구역 ID"
},
"reservationGroupId": {
"type": "string",
"description": "예약 그룹 ID"
}
},
"title": "protos.open.OpenCreateOccupiedTimeCommand"
}
}
}

Responses

OK

### Status Code별 응답의 JSON Schema

{
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"occupiedTimeId": {
"type": "string",
"description": "생성된 시간 점유 고유 ID"
}
},
"title": "protos.open.OpenCreateOccupiedTimeCommandResponseData"
}
},
"description": "시간 점유 생성 응답",
"title": "protos.open.OpenCreateOccupiedTimeCommandResponse"
}
}
}
}
}