View Categories

Update a book

< 1 min read

PUT/books/{bookid}

Code Samples #

  • 💻 cURL
  • 📄 JavaScript
  • 🐍 Python
  • 🐘 PHP
  • 🔷 C#
  • Java
Copy
curl --request PUT \
  --url 'https://api.bookstore.example.com/v1/books/{bookid}' \
  --header 'X-API-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "price": 19.99,
    "in_stock": false
}'

Update fields on an existing book.

Path Parameters #

NameTypeRequiredDescription
bookidstringRequired

Request Body #

Content type: application/json

FieldTypeRequiredDescription
pricenumberOptional
in_stockbooleanOptional
📋
Example request
Copy
{
    "price": 19.99,
    "in_stock": false
}

Responses #

200 — Successful response #

Powered by BetterDocs

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is registered on wpml.org as a development site. Switch to a production site key to remove this banner.