{"info":{"_postman_id":"b0867e11-7bfe-45f2-9f16-15cba8b4bb63","name":"Room Hotel API","description":"<html><head></head><body><p>This collection documents the <strong>Room Hotel API</strong> for the Digital Booking platform. It focuses on hotel room management and the supporting resources required to operate the booking domain, including categories, features, authentication, and user role administration.</p>\n<p>The requests in this collection are aimed at local development and testing. Most endpoints use the base URL below:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-text\">http://localhost:8080\n\n</code></pre>\n<p>This collection includes examples of common workflows such as registering and logging in users, creating rooms, listing rooms, retrieving room details, editing rooms, deleting resources, and managing categories and features.</p>\n<p>Authentication appears to be role-based for some operations. Based on the request names, endpoints labeled with terms such as <code>needtokenadmin</code>, <code>with_token_admin</code>, or similar likely require an authenticated administrator token, while endpoints labeled <code>without_token</code> help validate unauthorized-access behavior. If your API returns a JWT or bearer token from the authentication endpoints, use that token in subsequent protected requests.</p>\n<p>For initial admin setup, if you need to grant <strong>ADMIN</strong> permissions to a regular user, an operator can use the H2 console and run the following SQL statement against the <code>USERS</code> table, replacing the email value as needed:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-sql\">UPDATE USERS SET ROLE = 'ROLE_ADMIN' WHERE EMAIL = '***';\n</code></pre>\n<p>After this initial elevation, admin permissions for any other registered user can be granted or revoked from the Admin interface.</p>\n<p>At a high level, the collection covers these resource areas:</p>\n<ul>\n<li><p><code>POST /api/auth/register</code> and <code>POST /api/auth/login</code> for account creation and sign-in</p>\n</li>\n<li><p><code>GET</code>, <code>POST</code>, <code>PUT</code>, and <code>DELETE</code> operations for <code>/api/rooms</code></p>\n</li>\n<li><p><code>GET</code>, <code>POST</code>, and <code>DELETE</code> operations for <code>/api/categories</code></p>\n</li>\n<li><p><code>GET</code>, <code>POST</code>, and <code>DELETE</code> operations for <code>/api/features</code></p>\n</li>\n<li><p>Administrative user operations under <code>/api/users</code></p>\n</li>\n</ul>\n<p>Use this collection as a reference for available endpoints and expected intent of each request. Where saved examples are not present, the documentation is based on the request name, method, URL shape, and resource path so consumers can still understand how to use the API without assuming undocumented response payloads.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"33164372","collectionId":"b0867e11-7bfe-45f2-9f16-15cba8b4bb63","publishedId":"2sBXietaPi","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-04-09T21:10:07.000Z"},"item":[{"name":"create_room_v1","id":"6b33c68f-fc36-41f7-898d-e6d43245a4e2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Standard Room para un Dev\",\n    \"description\": \"Habitación de hotel con WIFI\",\n    \"categoryId\": 2,\n    \"price\": 2000.00,\n    \"imageRoom\": null\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/rooms","urlObject":{"protocol":"http","port":"8080","path":["api","rooms"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6b33c68f-fc36-41f7-898d-e6d43245a4e2"},{"name":"create_room_adding_feature_and_category","id":"4bb10725-3994-4e3e-bb4f-02ba1ef57743","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Standard Room para un Developer, con WiFi y helado \",\n    \"description\": \"Habitación de hotel con WIFI y helado\",\n    \"categoryId\": 2,\n    \"price\": 666.00,\n    \"imageRoom\": null,\n    \"featureIds\": [1,2]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/rooms","urlObject":{"protocol":"http","port":"8080","path":["api","rooms"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"4bb10725-3994-4e3e-bb4f-02ba1ef57743"},{"name":"list_all_rooms","id":"1bbb93f7-458e-4ecb-8dce-05a288ffdbd8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"http://localhost:8080/api/rooms","urlObject":{"protocol":"http","port":"8080","path":["api","rooms"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"1bbb93f7-458e-4ecb-8dce-05a288ffdbd8"},{"name":"room_by_id","id":"4d814cb8-6734-488a-8267-093c226939a7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/api/rooms/11","urlObject":{"protocol":"http","port":"8080","path":["api","rooms","11"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"4d814cb8-6734-488a-8267-093c226939a7"},{"name":"aleatory_rooms","id":"30aa0e0e-6f49-41ac-93c3-54b4e1a3b9be","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"http://localhost:8080/api/rooms/random","urlObject":{"protocol":"http","port":"8080","path":["api","rooms","random"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"30aa0e0e-6f49-41ac-93c3-54b4e1a3b9be"},{"name":"delete_room_user","id":"9e17279b-8bc9-4c44-be72-b3b424791768","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:8080/api/rooms/1","urlObject":{"protocol":"http","port":"8080","path":["api","rooms","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9e17279b-8bc9-4c44-be72-b3b424791768"},{"name":"delete_with_token_admin","id":"b25e60b0-d310-4a36-8ed1-ef0570689603","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:8080/api/rooms/11","urlObject":{"protocol":"http","port":"8080","path":["api","rooms","11"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b25e60b0-d310-4a36-8ed1-ef0570689603"},{"name":"delete_without_token","id":"88b08cc8-7750-4773-80f4-20843539ca64","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:8080/api/rooms/2","urlObject":{"protocol":"http","port":"8080","path":["api","rooms","2"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"88b08cc8-7750-4773-80f4-20843539ca64"},{"name":"register_of_test_ADMIN","id":"7a32b2e6-a4ad-4208-b96f-8a278d52c3c5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"firstName\": \"Admin\",\n    \"lastName\": \"Digital\",\n    \"email\": \"admin@digitalbooking.com\",\n    \"password\": \"qwerty12345\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/auth/register","description":"<p>para dar permisos de ADMIN a un USER \"común\" en la consola de H2 ingresar:</p>\n<p>UPDATE USERS SET ROLE = 'ROLE_ADMIN' WHERE EMAIL = '<em>* * *</em>';</p>\n<p>luego se puede dar/quitar permisos desde la interfaz de Admin a cualquier otro usuario registrado</p>\n","urlObject":{"protocol":"http","port":"8080","path":["api","auth","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"7a32b2e6-a4ad-4208-b96f-8a278d52c3c5"},{"name":"login_of_test_ADMIN","id":"a5da3d37-4927-46c3-8bbe-24ee0c89be43","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"email\": \"admin@digitalbooking.com\",\n    \"password\": \"qwerty12345\"\n}"},"url":"http://localhost:8080/api/auth/login","description":"<p>para dar permisos de ADMIN a un USER \"común\" en la consola de H2 ingresar:</p>\n<p>UPDATE USERS SET ROLE = 'ROLE_ADMIN' WHERE EMAIL = '<em>* * *</em>';</p>\n<p>luego se puede dar/quitar permisos desde la interfaz de Admin a cualquier otro usuario registrado</p>\n","urlObject":{"protocol":"http","port":"8080","path":["api","auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a5da3d37-4927-46c3-8bbe-24ee0c89be43"},{"name":"login_user","id":"73ca0b81-c5d3-4cc6-9658-60af6dd581ee","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"email\": \"juan@test.com\",\n    \"password\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/auth/login","urlObject":{"protocol":"http","port":"8080","path":["api","auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"73ca0b81-c5d3-4cc6-9658-60af6dd581ee"},{"name":"register_user","id":"f470bcfe-eab4-4f58-b959-ba82100f7980","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"firstName\": \"Juan\",\n    \"lastName\": \"Perez\",\n    \"email\": \"juan@test.com\",\n    \"password\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/auth/register","urlObject":{"protocol":"http","port":"8080","path":["api","auth","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"f470bcfe-eab4-4f58-b959-ba82100f7980"},{"name":"delete_category","id":"9465c077-f9ba-48d6-a10d-b4c9a49891b6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:8080/api/categories/5","urlObject":{"protocol":"http","port":"8080","path":["api","categories","5"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9465c077-f9ba-48d6-a10d-b4c9a49891b6"},{"name":"create_category","id":"c36b277a-f8c4-46b0-8130-f532cb2ff1d0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"API Request Body\",\n    \"description\": \"API Request Body to be sent with the request. We can use variables to dynamically set values in the request body.\",\n    \"imageUrl\": \"https://example.com/api-request-body.png\"\n\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/categories","urlObject":{"protocol":"http","port":"8080","path":["api","categories"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c36b277a-f8c4-46b0-8130-f532cb2ff1d0"},{"name":"get_categories","id":"e5c02512-ae17-49ef-9ff1-a6a20df3926c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/categories","urlObject":{"protocol":"http","port":"8080","path":["api","categories"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e5c02512-ae17-49ef-9ff1-a6a20df3926c"},{"name":"create_features","id":"d0063670-46f3-4f73-816c-2912debbcf0b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Ice Cream\",\n    \"icon\": \"🍦\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/features","urlObject":{"protocol":"http","port":"8080","path":["api","features"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"d0063670-46f3-4f73-816c-2912debbcf0b"},{"name":"delete_feature_by_id","id":"db81611f-b067-41bd-aad3-23853b13715b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:8080/api/features/3","urlObject":{"protocol":"http","port":"8080","path":["api","features","3"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"db81611f-b067-41bd-aad3-23853b13715b"},{"name":"get_features_list","id":"6d93eea0-d698-432b-b66c-0e08e4aaa549","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"WiFi\",\n    \"icon\": \"📶\"\n}"},"url":"http://localhost:8080/api/features","urlObject":{"protocol":"http","port":"8080","path":["api","features"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6d93eea0-d698-432b-b66c-0e08e4aaa549"},{"name":"delete_feature_by_id","id":"494d964c-928e-4db4-b03f-aafaa122b759","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"body":{"mode":"file","file":{}},"url":"http://localhost:8080/api/features/2","urlObject":{"protocol":"http","port":"8080","path":["api","features","2"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"494d964c-928e-4db4-b03f-aafaa122b759"},{"name":"list_users_with_role_needtokenadmin","id":"03ccaaf0-b95b-4a33-b2b1-870db71622c8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/users","urlObject":{"protocol":"http","port":"8080","path":["api","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"03ccaaf0-b95b-4a33-b2b1-870db71622c8"},{"name":"change_role_needtokenadmin","id":"4619d1f0-61a8-4191-89b6-5f7e7b89728d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{ \"role\": \"ROLE_USER\" }","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/users/2/role","description":"<p>para cambiar Rol de usuario:</p>\n<p>body: { \"role\": \"ROLE_ADMIN\" } || body: { \"role\": \"ROLE_USER\" }</p>\n","urlObject":{"protocol":"http","port":"8080","path":["api","users","2","role"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"4619d1f0-61a8-4191-89b6-5f7e7b89728d"},{"name":"edit_room_with_all_options","id":"1bfd8941-4a3e-4e66-9c70-2638162780e8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"\n{\n    \"name\": \"Suite en Natal\",\n    \"description\": \"Habitación en Suite romantica con playa privada\",\n    \"categoryId\": 1,\n    \"price\": 6677.0,\n    \"imageRoom\": \"https://pbs.twimg.com/media/E5kk4r0WYAMpbUf.jpg\",\n    \"active\": true,\n    \"featureIds\": [1]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/rooms/11","urlObject":{"protocol":"http","port":"8080","path":["api","rooms","11"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"1bfd8941-4a3e-4e66-9c70-2638162780e8"}]}