Pet Delete
user pk값에 대응하는 유저가 pet pk에 대응하는 pet object를 삭제합니다.
URL
/profile/<user_pk>/pets/<pet_pk>/
Method
DELETE
Header
Headers Key | Headers Value | 설명 | Required |
---|---|---|---|
Authorization | Token 321*************************** | 로그인에서 획득한 Token값 입력 | True |
Success Response
HTTP Status code
204 NO CONTENT
Content
없음
Error Response
HTTP Status code
401 Unauthorized
Content
# 토큰 값을 보내지 않은 경우 - 로그인 하지 않은 유저가 접근해서 삭제하려는 경우
{
"detail": "Authentication credentials were not provided."
}
HTTP Status code
403 Forbidden
Content
# 다른 유저가 접근해서 pk값을 삭제하려는 경우
{
"detail": "You do not have permission to perform this action."
}
HTTP Status code
404 Not Found
Content
# 존재하지 않는 <pk>로 접근할 경우 (이미 지운 펫을 또 지운 경우)
{
"detail": "Not found."
}
# pk값을 입력하지 않은 경우
## json
Unexpected '<'
## HTML
Page not found