새로운 예약 생성
POST/schedule/open/v1/commands/reserve
@deprecated 신규 개발 시 V2 API를 사용하세요.
새로운 예약을 생성합니다.
에러 응답
동일한 내원객에 대해, 시간이 겹치는 예약이 있음
{
status: 400,
message: "InvalidRequestException",
className: "InvalidRequestException",
errorProperties: [
{
key: "startDateTime",
reason: "NotAvailable"
},
],
}
Request
### Content-Type별 요청의 JSON Schema
{
"application/json": {
"schema": {
"required": [
"visitorName",
"visitorPhone",
"reservationGroupId",
"zoneId",
"startDateTimeUtc",
"endDateTimeUtc"
],
"type": "object",
"properties": {
"visitorName": {
"type": "string",
"description": "내원객 이름"
},
"visitorPhone": {
"allOf": [
{
"required": [
"countryCode",
"phoneNumber"
],
"type": "object",
"properties": {
"countryCode": {
"type": "string",
"description": "국제전화 국가 번호n 예: 82, 81, 1, 44 ... [참고](https://ko.wikipedia.org/wiki/%EA%B5%AD%EC%A0%9C%EC%A0%84%ED%99%94_%EA%B5%AD%EA%B0%80_%EB%B2%88%ED%98%B8)"
},
"phoneNumber": {
"type": "string",
"description": "전화번호n 예: 10123456789"
}
},
"title": "protos.Phone"
}
],
"description": "내원객 전화번호"
},
"reservationGroupId": {
"type": "string",
"description": "예약 그룹 ID",
"format": "object-id"
},
"zoneId": {
"type": "string",
"description": "예약 영역 ID",
"format": "object-id"
},
"startDateTimeUtc": {
"type": "string",
"description": "예약 시작 시각",
"format": "date-time"
},
"endDateTimeUtc": {
"type": "string",
"description": "예약 종료 시각",
"format": "date-time"
},
"consultationRequired": {
"type": "boolean",
"description": "상담 필요 여부"
},
"sedationRequired": {
"type": "boolean",
"description": "수면 마취 필요 여부"
},
"funnelDetail": {
"type": "string",
"description": "상세 유입 경로"
},
"requestedProcedures": {
"type": "array",
"items": {
"required": [
"type"
],
"type": "object",
"properties": {
"type": {
"enum": [
"RESERVATION_REQUESTED_PROCEDURE_TYPE_UNSPECIFIED",
"OPTION",
"TICKET"
],
"type": "string",
"description": "요청 시술 유형 (OPTION: 상품 옵션, TICKET: 시술권)",
"format": "enum"
},
"optionConfiguration": {
"allOf": [
{
"required": [
"optionId",
"optionTitle",
"price"
],
"type": "object",
"properties": {
"optionId": {
"type": "string",
"description": "상품 옵션 ID"
},
"optionTitle": {
"type": "string",
"description": "상품 옵션 이름"
},
"productTitle": {
"type": "string",
"description": "상품 이름"
},
"promotionTitle": {
"type": "string",
"description": "프로모션 이름"
},
"price": {
"allOf": [
{
"type": "object",
"properties": {
"amount": {
"type": "integer",
"format": "int32"
},
"currency": {
"type": "string"
},
"reason": {
"type": "object",
"properties": {
"type": {
"enum": [
"RESERVATION_REQUESTED_OPTION_PRICE_REASON_TYPE_UNSPECIFIED",
"GENERAL",
"PROMOTION",
"VISITOR_TYPE"
],
"type": "string",
"format": "enum"
},
"promotionId": {
"type": "string"
},
"visitorTypeId": {
"type": "string"
}
},
"title": "protos.schedule.ReservationRequestedOptionPriceReason"
}
},
"title": "protos.schedule.ReservationRequestedOptionPrice"
}
],
"description": "가격 정보"
},
"medicalService": {
"allOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"translsMap": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"translation": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"title": "protos.Transls"
},
"description": "# 다국어 지원대상 필드n - title"
},
"status": {
"enum": [
"MedicalServiceStatus_UNKNOWN",
"DRAFT",
"PUBLISHED"
],
"type": "string",
"format": "enum"
},
"deleted": {
"type": "boolean"
},
"configuration": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"procedure": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"searchPhoneticName": {
"type": "string",
"description": "백엔드 내부에서 검색을 위해 존재하는 필드"
}
},
"title": "protos.procedure.medical_service.MedicalServiceProcedure"
},
"machines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"searchPhoneticName": {
"type": "string",
"description": "백엔드 내부에서 검색을 위해 존재하는 필드"
}
},
"title": "protos.procedure.medical_service.MedicalServiceMachine"
}
},
"medicines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"searchPhoneticName": {
"type": "string",
"description": "백엔드 내부에서 검색을 위해 존재하는 필드"
}
},
"title": "protos.procedure.medical_service.MedicalServiceMedicine"
}
},
"unit": {
"type": "object",
"properties": {
"type": {
"enum": [
"UnitType_UNKNOWN",
"UNIT",
"CC",
"VIAL",
"PEN",
"STRING",
"SHOT",
"PAD",
"MINUTE",
"KJ",
"QUANTITY",
"DOT",
"J",
"MG",
"G",
"PULSE",
"BOTTLE",
"SYRINGE",
"PASS",
"IU",
"KHZ",
"MHZ"
],
"type": "string",
"format": "enum"
},
"value": {
"type": "integer",
"format": "int32"
}
},
"title": "protos.procedure.Unit"
},
"healthcareReimbursement": {
"enum": [
"HealthcareReimbursement_UNKNOWN",
"REIMBURSABLE",
"NON_REIMBURSABLE"
],
"type": "string",
"format": "enum"
},
"taxation": {
"enum": [
"Taxation_UNKNOWN",
"TAXABLE",
"TAX_FREE",
"MIXED"
],
"type": "string",
"format": "enum"
}
},
"title": "protos.procedure.medical_service.MedicalServiceConfiguration"
},
"draftedDateTimeUtc": {
"type": "string"
},
"updatedDateTimeUtc": {
"type": "string"
},
"priceAmount": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"format": "int32"
},
"currency": {
"type": "string"
}
},
"title": "protos.procedure.PriceAmount"
},
"description": {
"type": "string"
},
"caution": {
"type": "string"
},
"recommendedInterval": {
"type": "integer",
"format": "int32"
},
"contributionConstant": {
"type": "integer",
"format": "int32"
},
"durationTime": {
"type": "number",
"format": "double"
}
},
"title": "protos.procedure.medical_service.MedicalService"
}
],
"description": "진료 항목"
}
},
"title": "protos.schedule.ReservationRequestedOptionConfiguration"
}
],
"description": "상품 옵션 설정 (type이 OPTION인 경우)"
},
"ticketConfiguration": {
"allOf": [
{
"required": [
"ticketId",
"ticketTitle",
"optionTitle"
],
"type": "object",
"properties": {
"ticketId": {
"type": "string",
"description": "시술권 ID"
},
"ticketTitle": {
"type": "string",
"description": "시술권 이름"
},
"optionTitle": {
"type": "string",
"description": "옵션 이름"
},
"medicalService": {
"allOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"translsMap": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"translation": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"title": "protos.Transls"
},
"description": "# 다국어 지원대상 필드n - title"
},
"status": {
"enum": [
"MedicalServiceStatus_UNKNOWN",
"DRAFT",
"PUBLISHED"
],
"type": "string",
"format": "enum"
},
"deleted": {
"type": "boolean"
},
"configuration": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"procedure": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"searchPhoneticName": {
"type": "string",
"description": "백엔드 내부에서 검색을 위해 존재하는 필드"
}
},
"title": "protos.procedure.medical_service.MedicalServiceProcedure"
},
"machines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"searchPhoneticName": {
"type": "string",
"description": "백엔드 내부에서 검색을 위해 존재하는 필드"
}
},
"title": "protos.procedure.medical_service.MedicalServiceMachine"
}
},
"medicines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"searchPhoneticName": {
"type": "string",
"description": "백엔드 내부에서 검색을 위해 존재하는 필드"
}
},
"title": "protos.procedure.medical_service.MedicalServiceMedicine"
}
},
"unit": {
"type": "object",
"properties": {
"type": {
"enum": [
"UnitType_UNKNOWN",
"UNIT",
"CC",
"VIAL",
"PEN",
"STRING",
"SHOT",
"PAD",
"MINUTE",
"KJ",
"QUANTITY",
"DOT",
"J",
"MG",
"G",
"PULSE",
"BOTTLE",
"SYRINGE",
"PASS",
"IU",
"KHZ",
"MHZ"
],
"type": "string",
"format": "enum"
},
"value": {
"type": "integer",
"format": "int32"
}
},
"title": "protos.procedure.Unit"
},
"healthcareReimbursement": {
"enum": [
"HealthcareReimbursement_UNKNOWN",
"REIMBURSABLE",
"NON_REIMBURSABLE"
],
"type": "string",
"format": "enum"
},
"taxation": {
"enum": [
"Taxation_UNKNOWN",
"TAXABLE",
"TAX_FREE",
"MIXED"
],
"type": "string",
"format": "enum"
}
},
"title": "protos.procedure.medical_service.MedicalServiceConfiguration"
},
"draftedDateTimeUtc": {
"type": "string"
},
"updatedDateTimeUtc": {
"type": "string"
},
"priceAmount": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"format": "int32"
},
"currency": {
"type": "string"
}
},
"title": "protos.procedure.PriceAmount"
},
"description": {
"type": "string"
},
"caution": {
"type": "string"
},
"recommendedInterval": {
"type": "integer",
"format": "int32"
},
"contributionConstant": {
"type": "integer",
"format": "int32"
},
"durationTime": {
"type": "number",
"format": "double"
}
},
"title": "protos.procedure.medical_service.MedicalService"
}
],
"description": "진료 항목"
}
},
"title": "protos.schedule.ReservationRequestedTicketConfiguration"
}
],
"description": "시술권 설정 (type이 TICKET인 경우)"
}
},
"title": "protos.schedule.ReservationRequestedProcedure"
},
"description": "희망 시술 목록"
},
"reservationMemo": {
"type": "string",
"description": "예약 메모"
},
"visitorNationality": {
"type": "string",
"description": "내원객 국적n 예: KR, JP, CN, US ... [참고](https://ko.wikipedia.org/wiki/ISO_3166-1_alpha-2?useskin=vector)"
},
"visitorLanguage": {
"type": "string",
"description": "내원객 언어n 지원 목록: ko, ja, en, zh-CN, zh-yue, es, th, ru, id, ms, vi, mn, uz, nl, de, pt, etc"
},
"visitorEmail": {
"type": "string",
"description": "내원객 이메일",
"format": "email"
},
"visitorBirthDayUtc": {
"type": "string",
"description": "내원객 생년월일",
"format": "date-time"
},
"visitorSnsInfo": {
"allOf": [
{
"type": "object",
"properties": {
"snsType": {
"enum": [
"etc",
"kakaotalk",
"line",
"instagram",
"whatsapp",
"wechat"
],
"type": "string",
"format": "enum"
},
"accountId": {
"type": "string"
}
},
"title": "protos.visitor.SnsInfo"
}
],
"description": "내원객 SNS 정보"
},
"visitorPassportSurname": {
"type": "string",
"description": "내원객 여권 영문명"
},
"visitorPassportGivenNames": {
"type": "string",
"description": "내원객 여권 영문명"
},
"visitorPassportNumber": {
"type": "string",
"description": "내원객 여권 번호"
}
},
"description": "새로운 예약을 생성합니다.nn ### 내원객 중복 검색 정책nn 요청에 포함된 내원객 정보로 기존 내원객을 검색하여, 일치하는 내원객이 있으면 해당 내원객으로 예약을 생성합니다.n 일치하는 내원객이 없으면 새로운 내원객을 생성한 후 예약을 생성합니다.nn 중복 검색은 다음 조건들을 **우선순위 순서대로** 확인하며, 먼저 일치하는 조건이 있으면 해당 내원객을 사용합니다:nn | 우선순위 | 검색 조건 |n |---------|----------|n | 1 | `visitorName` + `visitorPhone` |n | 2 | `visitorPassportNumber` |n | 3 | `visitorSnsInfo` |n | 4 | `visitorEmail` |n | 5 | `visitorName` + `visitorBirthDayUtc` |nn > **참고**: 각 조건은 독립적으로 검색되며, 모든 필드가 AND로 결합되지 않습니다.",
"title": "protos.open.ReserveCommand"
}
}
}
Responses
- 200
OK
### Status Code별 응답의 JSON Schema
{
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"required": [
"reservationId"
],
"type": "object",
"properties": {
"reservationId": {
"type": "string",
"description": "예약 ID",
"format": "uuid"
}
},
"title": "protos.open.ReserveCommandResponse"
}
}
}
}
}