Skip to content

API 명세서 예시

Daewook.Choi edited this page Jan 24, 2025 · 3 revisions

API 명세서 예시

PATH

PUT : /api/

Request Header

Content-Type: application/json

Request Params

params Example Description Default
None None None None

Request Body

Key Example Description Default
None None None None

Response

Example URL : {{BaseURL}}/api/dogs/detail/611219dcda587b36104d42e7/status

Success : 200

{
    "data": {
        "status": "waiting",
        "kakaotalkId": [
            "kakaoTalk~"
        ],
        "phoneNumber": [
            "01012345678"
        ],
        "photos": [
            "https://takeus-test-bucket-01.s3.ap-northeast-2.amazonaws.com/image/dogs/2.jpg"
        ],
        "_id": "611219dcda587b36104d42e7",
        "user": "6110cc2ac50cff6c7c8b1e6e",
        "endingCountry": "캐나다",
        "endingAirport": "벤쿠버 국제공항 ",
        
    }
}

dog를 찾을 수 없는 경우 : 404

{
    "error": "Dog Not Found"
}

Request Body의 status가 "waiting" 이나 "done"이 아닐 경우 : 400

{
    "error": "Status is not valid"
}

토큰이 없거나 잘못된 경우 : 401

{
    "error": "No token"
}

자신의 강아지가 아닐경우 : 403

{
    "error": "Not authenticated"
}

Server Error : 500

{
    "error" : "Internal Server Error"
}
Clone this wiki locally