Skip to content

[POST] 성분 추가 (혁)

Malibin edited this page Dec 28, 2019 · 2 revisions

[POST] 성분 추가

혁 - Issue #48

메소드 경로 짧은 설명
POST /nutrient 성분 추가

요청 헤더

Content-Type: application/json

요청 바디

key 설명 타입 비고
nutrient_type 성분 종류 Int NON-NULL / 0 : 성분, 1 : 기능성분
nutrient_name 성분 이름 String NON-NULL
nutrient_recommend_dose 추천 복용량 Int NON-NULL
nutrient_max_do Int NON-NULL
nutrient_dose_unit String NON-NULL
nutrient_common_description 공통 설명 String NON-NULL
nutrient_default_description 기본 설명 String NON-NULL
{
    "nutrient_type" : 0,
    "nutrient_name" : "이름",
    "nutrient_recommend_dose" : 200,
    "nutrient_max_dose" : 500,
    "nutrient_dose_unit" : "mg",
    "nutrient_common_description" : "호롤롤",
    "nutrient_default_description" : "잇힝"
}

응답 바디

성공

{
    "status": 201,
    "message": "nutrient insert success",
    "data": null
}

실패

  • 입력값에 Null Value
{
    "status": 400,
    "message": "입력 값에 null이 존재합니다.",
    "data": null
}
  • 서버 내부 에러
{
    "status": 500,
    "message": "서버 내부 에러",
    "data": null
}

Clone this wiki locally