Skip to content

scheduleCreate

SeungWan Park edited this page Jan 2, 2020 · 5 revisions

일정 추가하기


[POST] ~/schedules


Request-Header

메소드 파라미터 설명
Content-Type application/json

Request-Body

이름 type 설명
day INTEGER 여행의 n일차
cost INTEGER 사용한 금액
category STRING(20) 해당 카테고리 (숙소, 식당, 쇼핑..)
content STRING(100) 카테고리 세부 내용 (고급호텔, 간편식..)
TripId INTEGER 여행 id 값 (FK)

Response - body

SUCCESS
{
    "status": 200,
    "message": "일정 제작 성공",
    "data": {
        "id": 10,
        "day": 1,
        "cost": 10000,
        "category": "고급음식점",
        "content": "소고기",
        "TripId": 1,
        "updatedAt": "2020-01-02T03:59:13.339Z",
        "createdAt": "2020-01-02T03:59:13.339Z"
    },
    "success": true
}
FAIL 1 : 일정 제작 실패시
{
    "json": {
        "status": 500,
        "message": "일정 제작 실패",
        "success": false
    }
}
FAIL 2 : 서버 내부 오류
{
    "status": 500,
    "message": "여행별 일정 조회 실패",
    "success": false
}
Clone this wiki locally