---
title: "MoveBook"
method: POST
path: "/v1/shelves/{shelf}/books/{book}:move"
tags: ["LibraryService"]
---

# MoveBook

`POST /v1/shelves/{shelf}/books/{book}:move`

Moves a book to another shelf, and returns the new book. The book
 id of the new book may not be the same as the original book.

## Path parameters

- `shelf` string, required
- `book` string, required

## Request body

- MoveBookRequest — Describes what book to move (name) and what shelf we're moving it to (other_shelf_name).
  - `name` string, required — The name of the book to move.
  - `other_shelf_name` string, required — The name of the destination shelf.

## Response `200`

OK

- Book — A single book in the library.
  - `name` string, required — The resource name of the book. Book names have the form `shelves/{shelf_id}/books/{book_id}`. The name is ignored when creating a book.
  - `author` string — The name of the book author.
  - `title` string — The title of the book.
  - `read` boolean — Value indicating whether the book has been read.
  - `borrow_time` string, date-time — The previous borrowing timestamp.
  - `created_at` string, date-time — The creation date and time.
  - `updated_at` string, date-time — The last update date and time.

## Other responses

- `default` — Default error response

## Changes

- **2022-04-11** (v1) `ac9d37cae0e0` — 2 breaking
  - the request's body type changed from no type to `object`
  - the response's body type changed from no type to `object` for status `200`
- **2022-02-23** (v1) `639a4ec995ca` — 2 breaking, 1 info
  - the request property `name` became required
  - the request property `other_shelf_name` became required
  - the response property `name` became required for the status `200`
- **2022-01-12** (v1) `dbd82bd71d47` — 1 breaking
  - the `borrow_time` response's property format changed from `RFC3339` to `date-time` for status `200`
- **2022-01-12** (v1) `00e696b6b84a` — 1 breaking, 1 info
  - the `borrow_time` response's property format changed from `date-time` to `RFC3339` for status `200`
  - the `name` response's property pattern `^shelves/[a-z2-7]{26}/books/[a-z2-7]{26}$` was added for the status `200`
- **2022-01-12** (v1) `fab7e7c2f60c` — 1 breaking
  - the `borrow_time` response's property format changed from `RFC3339` to `date-time` for status `200`

[Full history](https://skmtc.dev/kollalabs/apis/libraryservice-api/changes/v1/shelves/:shelf/books/:book:move/post.md)

---

[API](https://skmtc.dev/kollalabs/apis/libraryservice-api.md) · [All operations](https://skmtc.dev/kollalabs/apis/libraryservice-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kollalabs/apis/libraryservice-api/revisions/b3518c94ac37?raw)
