PUT
/api/v1/books/{id}
curl \
--request PUT 'http://localhost:8080/api/v1/books/{id}' \
--header "Content-Type: multipart/form-data" \
--form "id=123456" \
--form "title=The Alchemist" \
--form "author=Paulo Coelho" \
--form "description=A novel by Paulo Coelho" \
--form "language=English" \
--form "condition=New" \
--form "genres[]=Fiction" \
--form "coverPhotos[]=book-cover-photo.jpg" \
--form 'swapCondition={"books":[{"title":"The Alchemist","author":"Paulo Coelho","coverPhoto":"swappable-book-cover-photo.jpg"}],"genres":[],"giveAway":false,"conditionType":"ByBooks","openForOffers":false}'
Response examples (401)
{
"error": {
"code": "string",
"message": "string",
"target": "string",
"details": [
{
"code": "string",
"message": "string",
"target": "string"
}
]
}
}
Response examples (404)
{
"error": {
"code": "string",
"message": "string",
"target": "string",
"details": [
{
"code": "string",
"message": "string",
"target": "string"
}
]
}
}
Response examples (500)
{
"error": {
"code": "string",
"message": "string",
"target": "string",
"details": [
{
"code": "string",
"message": "string",
"target": "string"
}
]
}
}
Response examples (400)
{
"error": {
"code": "string",
"message": "string",
"target": "string",
"details": [
{
"code": "string",
"message": "string",
"target": "string"
}
]
}
}
Response examples (200)
{
"id": "string",
"title": "string",
"author": "string",
"genres": [
"string"
],
"language": "string",
"description": "string",
"condition": "string",
"coverPhotoUrls": [
"string"
],
"owner": {
"id": "string",
"name": "string"
},
"swapCondition": {
"swapType": "string",
"giveAway": true,
"openForOffers": true,
"swappableGenres": [
{
"id": "string",
"name": "string"
}
],
"swappableBooks": [
{
"id": "string",
"title": "string",
"author": "string",
"coverPhotoUrl": "string"
}
]
}
}