{"info":{"_postman_id":"362cc053-653c-443b-99f7-8d375c69d6fe","name":"Book Store API","description":"<html><head></head><body><p>Welcome to the Book Store API! This API enables you to store, edit and share the details of any book. All of these operations are secured by a JWT token that is sent in the headers of every request (i.e the custom x-book-store-api header). So dive into these docs and have fun!</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"5802609","collectionId":"362cc053-653c-443b-99f7-8d375c69d6fe","publishedId":"RzZ6KgwS","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2018-11-06T11:35:36.000Z"},"item":[{"name":"Users","item":[{"name":"Sign up.","id":"1c6a1edc-5d72-4b58-bd7f-8d32e33dd90f","request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"firstName\": \"\",\n\t\"lastName\": \"\",\n\t\"username\": \"\",\n\t\"password\": \"\"\n}"},"url":"http://localhost:3001/api/v1/users/signup","description":"<p>A request used to create a new user account. In order to create an account, a user must supply:</p>\n<ul>\n<li>a first name that has at least 2 non-whitespace characters.</li>\n<li>a last name that has at least 2 non-whitespace characters.</li>\n<li>a valid email address as his/her username.</li>\n<li>a strong password. This app considers a strong password to be one that is at least 8 characters long and has at least one lowercase letter, one uppercase letter, one number and one symbol/special character.</li>\n</ul>\n<p>If this request is successful, its response will contain a token which must be used when interacting with the endpoints of this app that require authentication e.g the one for creating a book.</p>\n","urlObject":{"protocol":"http","port":"3001","path":["api","v1","users","signup"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"1c6a1edc-5d72-4b58-bd7f-8d32e33dd90f"},{"name":"Log in.","id":"43ecf6d1-b418-4084-8033-36ca1cb370f4","request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"username\": \"\",\n\t\"password\": \"\"\n}"},"url":"http://localhost:3001/api/v1/users/login","description":"<p>A request for logging into this app. If this request is successful, its response will contain a token that must be used when interacting with the endpoints of this app that require authentication e.g the one for creating a book.</p>\n","urlObject":{"protocol":"http","port":"3001","path":["api","v1","users","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"43ecf6d1-b418-4084-8033-36ca1cb370f4"},{"name":"Fetch my books.","id":"26b31b30-2029-44c0-9866-1312071f6bf5","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"x-book-store-authentication","value":"<JWT_TOKEN>","type":"text"}],"url":"http://localhost:3001/api/v1/users/mybooks","description":"<p>Fetch all the books created by the user making the request. This user is identified from the authentication token sent with the request.</p>\n","urlObject":{"protocol":"http","port":"3001","path":["api","v1","users","mybooks"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"26b31b30-2029-44c0-9866-1312071f6bf5"}],"id":"8247ff0f-ec3b-4666-9d13-1fba408b0b7f","description":"<p>Requests that are specific to the accounts of users e.g sign up, log in etc.</p>\n","event":[{"listen":"prerequest","script":{"id":"0850028f-792f-4983-b344-67c0900d7d0d","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"92ae7cc0-3d3a-4df3-a09a-5fca3706b78c","type":"text/javascript","exec":[""]}}],"_postman_id":"8247ff0f-ec3b-4666-9d13-1fba408b0b7f"},{"name":"Books","item":[{"name":"Add a new book.","id":"6117326e-fcd1-48d3-8348-2e0377192ebb","request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"x-book-store-authentication","type":"text","value":"<JWT_TOKEN>"}],"body":{"mode":"raw","raw":"{\n\t\"title\": \"\",\n\t\"author\": \"\",\n\t\"publicationDate\": \"\",\n\t\"genres\": [],\n\t\"isPrivate\": false\n}"},"url":"http://localhost:3001/api/v1/books/","description":"<p>A request for adding a new book. The body of the request should have these fields:</p>\n<ul>\n<li>title [required]: the title of the book. The title must have 2 or more non-whitespace characters.</li>\n<li>author [required]: the name of the author of the book. That name must have 2 or more non-whitespace characters.</li>\n<li>publicationDate [required]: the date when the book was published. This must be a valid date in the ISO8601 format e.g 2018-01-22</li>\n<li>genres [optional]: a list of the genres that the book belongs to. Default value is [].</li>\n<li>isPrivate [optional]: a Boolean value to state whether or not the book is private to the user that added it or it should be public. All new books are private by default.</li>\n</ul>\n","urlObject":{"protocol":"http","port":"3001","path":["api","v1","books",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6117326e-fcd1-48d3-8348-2e0377192ebb"},{"name":"Get all books.","id":"0fd0ad78-8594-418d-ae46-c9fe8ac0f5d2","request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"x-book-store-authentication","type":"text","value":"<JWT_TOKEN>"}],"url":"http://localhost:3001/api/v1/books/","description":"<p>Get all the books in the app that are either marked as public books or which belong to you.</p>\n","urlObject":{"protocol":"http","port":"3001","path":["api","v1","books",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"0fd0ad78-8594-418d-ae46-c9fe8ac0f5d2"},{"name":"Get a particular book.","id":"e9954cd3-3417-4d98-a9d8-d34eaa7ad9fe","request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"x-book-store-authentication","type":"text","value":"<JWT_TOKEN>"}],"url":"http://localhost:3001/api/v1/books/1","description":"<p>Get a specific book, identified by its ID. The book will only be returned if you own it or its owner has marked it as a public book. You must supply the book's ID in the request URL's path.</p>\n","urlObject":{"protocol":"http","port":"3001","path":["api","v1","books","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e9954cd3-3417-4d98-a9d8-d34eaa7ad9fe"},{"name":"Edit a book.","id":"9c16c401-5870-484e-b41e-c424ef90a7aa","request":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"x-book-store-authentication","type":"text","value":"<JWT_TOKEN>"}],"body":{"mode":"raw","raw":"{\n\t\"title\": \"\",\n\t\"author\": \"\",\n\t\"publicationDate\": \"\",\n\t\"genres\": [],\n\t\"isPrivate\": false\n}"},"url":"http://localhost:3001/api/v1/books/9","description":"<p>Update the details of a book. You can only perform this action if you are the owner of the book. You must also supply the book's ID in the request URL's path. You may update the book's title, author, publication date, genres or privacy.</p>\n","urlObject":{"protocol":"http","port":"3001","path":["api","v1","books","9"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9c16c401-5870-484e-b41e-c424ef90a7aa"},{"name":"Delete a book.","id":"73becdb2-5ec9-4e67-9306-091eff0541df","request":{"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"x-book-store-authentication","type":"text","value":"<JWT_TOKEN>"}],"body":{"mode":"raw","raw":""},"url":"http://localhost:3001/api/v1/books/5","description":"<p>Delete a book identified by its ID. However, you can only perform this action if you are the owner of the book. You must supply the book's ID in the request URL's path.</p>\n","urlObject":{"protocol":"http","port":"3001","path":["api","v1","books","5"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"73becdb2-5ec9-4e67-9306-091eff0541df"}],"id":"d46fa37e-9504-4b4e-b2c7-c427b2ed83ab","description":"<p>A collection of requests for managing and/or viewing the books stored in the app.</p>\n","_postman_id":"d46fa37e-9504-4b4e-b2c7-c427b2ed83ab"}],"event":[{"listen":"prerequest","script":{"id":"f35da4e1-fb80-47df-8843-1560239979f5","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"a7ca06ff-cb50-42bc-97d4-9f184ab2db77","type":"text/javascript","exec":[""]}}],"variable":[{"key":"x-book-store-authentication","value":"","type":"string"}]}