Add

도서를 저장하는 API

Request (요청)

URL

https://soobook.devlim.net/api/book/mybook/

Method

POST

Params

URL Params

None

Data Params

name value type
book_id Book PK integer
name value type
Authorization Token <발급받은 토큰 key> string

Response (응답)

Success Response

  • Code: 201
  • Content:
{
  "detail": "Successfully added."
}
  • Code: 200
  • Content:
{
  "detail": "Already added."
}

Error Response

  • Code: 401
  • Reason: 헤더에 Authorization: Token이 없는 경우
  • Content:
{
  "detail": "Authentication credentials were not provided."
}
  • Code: 401
  • Reason: 유효하지 않은 토큰 키를 입력하는 경우
  • Content:
{
  "detail": "Invalid token."
}
  • Code: 400
  • Reason: 키(book_id)가 없는 경우
  • Content:
{
  "ios_error_code": "4002",
  "book_id": [
    "This field is required."
  ]
}
  • Code: 400
  • Reason: 키의 값이 없는 경우
  • Content:
{
  "ios_error_code": "4003",
  "book_id": [
    "This field may not be blank."
  ]
}
  • Code: 400
  • Reason: 유효하지 않은 book_id를 입력하는 경우
  • Content:
{
  "ios_error_code": "4004",
  "detail": "Invalid book_id."
}

results matching ""

    No results matching ""