지원 메모 API
개요
지원 메모 API는 사용자(환자)의 메모를 생성하고 수정하는 기능을 제공합니다.
주요기능
- 메모 생성: 특정 사용자의 메모 생성
- 메모 수정: 기존 메모 내용 수정
[POST] /support/users/{userId}/memo - 메모 생성
메모 생성
특정 사용자의 메모를 생성합니다.
- HTTP Method:
POST - 인증: 액세스 토큰 (
accessToken) 필요
Headers
| Header | Type | Description | Required |
|---|---|---|---|
| Authorization | Bearer {accessToken} | 사용자 인증을 통해 발급받은 액세스 토큰 입니다. | ✔ |
| Content-Type | application/json | 요청 본문 타입 | ✔ |
Path Parameters
| 파라미터 | 타입 | 설명 | Required |
|---|---|---|---|
| userId | string | 사용자 ID | ✔ |
Request Body
| 필드 | 타입 | 설명 | Required |
|---|---|---|---|
| log | string | 메모 내용 | ✔ |
| type | string | 로그 타입 (LOG, PATIENT_ISSUE, CALL_SCHEDULE_CHANGE, FOLLOW_UP_STATUS_CHANGE, ACCOUNT_UPDATE, ACCOUNT_DELETE, SITE_UPDATE) | ✗ |
Request Body Example - 일반 로그
{
"log": "환자가 두통을 호소함"
}
Request Body Example - 타입 지정
{
"log": "환자가 두통을 호소함",
"type": "LOG"
}
Request Body Example - 이슈 로그
{
"log": "환자가 두통을 호소함",
"type": "PATIENT_ISSUE"
}
Responses
| Http Status Code | 설명 | Error Code(s) |
|---|---|---|
201 Created | 메모 생성 성공 | - |
401 Unauthorized | 인증 실패 | - |
404 Not Found | 사용자를 찾을 수 없음 | - |
201 Created - 성공
{
"id": "userFollowUpLogId"
}
| 필드 | 타입 | 설명 |
|---|---|---|
| id | string | 생성된 메모 ID |
401 Unauthorized - 인증 실패
예시: 토큰이 누락된 경우
{
"status": 401,
"code": 40100,
"message": "Unauthorized",
"detail": ""
}
404 Not Found - 찾을 수 없음
예시: 사용자를 찾을 수 없는 경우
{
"status": 404,
"code": 40400,
"message": "User not found",
"detail": ""
}
[PATCH] /support/users/{userId}/memos/{memoId} - 메모 수정
메모 수정
특정 사용자의 메모를 수정합니다.
- HTTP Method:
PATCH - 인증: 액세스 토큰 (
accessToken) 필요
Headers
| Header | Type | Description | Required |
|---|---|---|---|
| Authorization | Bearer {accessToken} | 사용자 인증을 통해 발급받은 액세스 토큰 입니다. | ✔ |
| Content-Type | application/json | 요청 본문 타입 | ✔ |
Path Parameters
| 파라미터 | 타입 | 설명 | Required |
|---|---|---|---|
| userId | string | 사용자 ID | ✔ |
| memoId | number | 메모 ID | ✔ |
Request Body
| 필드 | 타입 | 설명 | Required |
|---|---|---|---|
| log | string | 수정할 메모 내용 | ✔ |
Request Body Example
{
"log": "수정된 메모 내용입니다"
}
Responses
| Http Status Code | 설명 | Error Code(s) |
|---|---|---|
200 OK | 메모 수정 성공 | - |
401 Unauthorized | 인증 실패 | - |
404 Not Found | 메모를 찾을 수 없음 | - |
200 OK - 성공
{
"success": true
}
| 필드 | 타입 | 설명 |
|---|---|---|
| success | boolean | 성공 여부 |
401 Unauthorized - 인증 실패
예시: 토큰이 누락된 경우
{
"status": 401,
"code": 40100,
"message": "Unauthorized",
"detail": ""
}
404 Not Found - 찾을 수 없음
예시: 메모를 찾을 수 없는 경우
{
"status": 404,
"code": 40400,
"message": "Memo not found",
"detail": ""
}