Add

책 속 글귀를 저장하는 API

Request (요청)

URL

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

Method

POST

Params

URL Params

None

Data Params

name value type
mybook_id MyBook PK integer
content 책 속 글귀 string
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: 403
  • Reason: 본인 소유의 게시물이 아닌 경우
  • Content:
{
  "detail": "You do not have permission to perform this action."
}
  • Code: 400
  • Reason: 키(mybook_id, content)가 없는 경우
  • Content:
{
  "ios_error_code": "4002",
  "detail": [
    "'mybook_id', 'content' field is required."
  ]
}
  • Code: 400
  • Reason: 키의 값이 없는 경우
  • Content:
{
  "ios_error_code": "4003",
  "detail": [
    "'mybook_id', 'content' field may not be blank."
  ]
}
  • Code: 400
  • Reason: 유효하지 않은 mybook_id를 입력하는 경우
  • Content:
{
  "ios_error_code": "4004",
  "detail": "Invalid mybook_id."
}

results matching ""

    No results matching ""