{"info":{"_postman_id":"bb6918ac-674e-4996-97cf-5720366b8961","name":"MyDevices","description":"<html><head></head><body><p>Create a REST API Laravel project and implement the following endpoints.<br>Create the following tables for the project to work using Laravel migration:<br>a. User (name, email, password)<br>b. Device (name, model, device-unique-id)<br>c. Access – This table shows which user has permissions for which devices.<br>You are free to structure the table names, and can decide how many columns for each table. You are free to name your columns.<br>Tasks:</p>\n<ol>\n<li><p>Login endpoint which will take username, password and gives us back a login and refresh token.</p>\n</li>\n<li><p>Create endpoint to get new login token using the refresh token (if possible use Laravel passport for login authentication).</p>\n</li>\n<li><p>Create endpoints to get and update user info.</p>\n</li>\n<li><p>Create endpoint to get list of devices which user has access.</p>\n</li>\n<li><p>Create endpoint to create a user and store a hashed password.</p>\n</li>\n<li><p>Create endpoints to get and update single device info.</p>\n</li>\n</ol>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"21137389","collectionId":"bb6918ac-674e-4996-97cf-5720366b8961","publishedId":"2sB3BALs9N","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-08-01T17:22:06.000Z"},"item":[{"name":"5 - Register User","id":"cfacefc0-6420-477a-93aa-950e8671bbd9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Milica\",\r\n  \"email\": \"milica@gmail.com\",\r\n  \"password\": \"secret123\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost/api/register","urlObject":{"protocol":"http","path":["api","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"77acbda9-edc8-47a4-95f2-e345bf02ac83","name":"Register Example","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Milica\",\r\n  \"email\": \"milica@gmail.com\",\r\n  \"password\": \"secret123\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost/api/register"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Host","value":"localhost"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.2.29"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Fri, 01 Aug 2025 15:27:38 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"name\": \"Milica\",\n    \"email\": \"milica@gmail.com\",\n    \"updated_at\": \"2025-08-01T15:27:38.000000Z\",\n    \"created_at\": \"2025-08-01T15:27:38.000000Z\",\n    \"id\": 1\n}"},{"id":"c3cee5f7-e3fc-4dfc-926c-b4d1a8ce2630","name":"5 - Register User error","originalRequest":{"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Milica\",\r\n  \"email\": \"milica-updated@gmail.com\",\r\n  \"password\": \"secret123\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost/api/register"},"status":"Unprocessable Content","code":422,"_postman_previewlanguage":null,"header":[{"key":"Host","value":"localhost"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.2.29"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Fri, 01 Aug 2025 17:21:14 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"The given data was invalid.\",\n    \"errors\": {\n        \"email\": [\n            \"The email has already been taken.\"\n        ]\n    }\n}"}],"_postman_id":"cfacefc0-6420-477a-93aa-950e8671bbd9"},{"name":"1 - Login User and return refresh token","id":"5701aea5-5aa1-4e85-9725-ddf2150f92ab","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"email\": \"milica@gmail.com\",\r\n  \"password\": \"secret123\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost/api/login","urlObject":{"protocol":"http","path":["api","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"cd4ea5fa-39cf-4c7e-8b05-eb538b6febcb","name":"Login User and get token Example","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"email\": \"test@gmail.com\",\r\n  \"password\": \"secret123\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost/api/login"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Host","value":"localhost"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.2.29"},{"key":"pragma","value":"no-cache"},{"key":"Cache-Control","value":"no-store, private"},{"key":"content-type","value":"application/json; charset=UTF-8"},{"key":"Date","value":"Fri, 01 Aug 2025 16:07:46 GMT"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"token_type\": \"Bearer\",\n    \"expires_in\": 31536000,\n    \"access_token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI1IiwianRpIjoiZTE0YjVkMWMxM2E5YzhjNWJkMTQzNGE3MTlmZjUxZjVlYTJjNzQyOTljNjZiZjNmZmRkYTg5MDZmNzJlNzRiODNmOGQ1ZmU2NzlkOGFmMjEiLCJpYXQiOjE3NTQwNjQ0NjUuOTQ4ODI1LCJuYmYiOjE3NTQwNjQ0NjUuOTQ4ODI2LCJleHAiOjE3ODU2MDA0NjUuOTI5MjQsInN1YiI6IjIiLCJzY29wZXMiOltdfQ.tnb2gCo2JBZieoOgSJQZ2BqN8Vw2o3MUTQM8mts2SCe3hiy1aH8IDUcr3vtDfRkfRoi0KzuZXgv6p0JnS9zS0ZsFRZdIv3SL5jTvuhSOl4bCa_VNb0stvfNp1T8RpSPwwyZGw8deraqL0OuqPcf4vU-MKtzPOJHlMkpdRhmgIMTeyaHAiePn0gN8te3G4bV1sd4DvDuyBI8OqORWK36dARCMoQcyxHD8re4uopTYAplJY3M6SDusBb17Yr9qiECG5JSBD5Tm2QwXiRGVYPV502ay2QGr7rPIPqzjnYBR9tQBvhUsv7WjRlHeyVq9GY0siG6hVWic8I-ad6ssqLaYz4gffS40sGiH9YyRR3Qf9bfZ1lZz1j6ftCMaB34vqw0kTQTftGjCPahJcMrafmg32xN18WOx8AGmPGAnJebL_6zg55SMfKQ78X7tQF1AfmXDNOSp8p_DXKCdSfucyhHIcVD6Sxc4fn9xTzfJFrMb3M8785KrFG98f7sHbJSLYBxoUoLrgTnFGcmgxb4Oyy2J2zEgaAnJPtDYGdZz9lgnpbkcH1Mc7R1TPR2UFZSdhw_fVMgTTyBxg1oxsgNueGYpx74Xsl-2pAniyzwnEJauT7ZGUP4IMel1fm2J3XYSu28XmNytmRCmNvMYFD5KlGCSj5TAYxrhMFZh8BKwtQYjnd0\",\n    \"refresh_token\": \"def50200e9b721f5dcd546c7c82a7e625b1a1a7a3f2bdb6ee82ee380f9f8f426ee97c48eaf92f4c9f610ce4da7e209f6bfdc164dc28bc143f86e80fdb1c60f7484c0f7d2e5cf989103f7498c1293b16101d092520f7e8fc986fb45f836649ed8c6ead41f833ffa1f2acdc4f7e3028704de2ea8a1d7b1874e3200f06cf837bf345f1000cd704121070d5cd933975b9418f2f53a965a372aea81b081a6c42a39820052dc10d78fde0adb885b47aba72355804346226f818ba64d245611f79f51fb1393da0160951a62d5ee6d0ac4497588aa740221fbd138d79d7b85c85df2d6ed7f6980d8d28d589643e25885fe5450dccfd0286c803b7b8bc1d32400482f40db13b5321b36a0d5349a9735f62eb531f1ef5f566f1c2e39319246c1655206d417c10fc264a55f6e8fa5cc167db7df68db62e24a16ff7bfc0553b856861d822af7a438cd2f99ebb626298c0a33e16c5c2d018dbc7453914528cdc4ba8311f40c0ae6\"\n}"}],"_postman_id":"5701aea5-5aa1-4e85-9725-ddf2150f92ab"},{"name":"2 - Refresh","id":"f979f0d2-613e-4dae-887f-7d35551520f3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"refresh_token\": \"def50200096fdf417804b118d7219ae4e411f840ceb3a584c04526209970975e057e074e35d1736a7a7f85d106572735a0116b5a8a732c14c34c5a3c7e4441a8de3d6d658fc6724fd51d5889d19ba17d41b4b42c9fab0af470ad9c02b2fabdcc52f2542848c4441b5a4f2d2dcaf4a3119a229ceb8e2d2c26f27dbc2ebf47b79f74cf4d637ad489f595f1ae51b43f0ada63f116eb63ebff3fb55bf5d82c5f3c64944ec5a8e2b5b18100a57edda8055581265deeb01b1a5210216f50c9547a960c9c3766eded5ce69f80dde65d5b3b996f379f2585c6949a3ecb0e07556a174fd2f609235254b27661dd35eb29b4b413954492d10b01b1ba868bb0fcb1ac3cf6e142e8aad31286409b73e2acea86e06471d5175631d62cfcd0fdc1d489cb17291b4b19039de329be96de7e9b1b30f31fe4ccb711554c98989b9cb7b753e6f994bab4977c98843c8f4113248dbca384a457a6ee022c4b8b34ffa8598ed81aedc2a779\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost/api/refresh","urlObject":{"protocol":"http","path":["api","refresh"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"d717b1ed-de16-410a-8461-4069fcaecd08","name":"Send Refresh -> get Access token Example","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"refresh_token\": \"def50200096fdf417804b118d7219ae4e411f840ceb3a584c04526209970975e057e074e35d1736a7a7f85d106572735a0116b5a8a732c14c34c5a3c7e4441a8de3d6d658fc6724fd51d5889d19ba17d41b4b42c9fab0af470ad9c02b2fabdcc52f2542848c4441b5a4f2d2dcaf4a3119a229ceb8e2d2c26f27dbc2ebf47b79f74cf4d637ad489f595f1ae51b43f0ada63f116eb63ebff3fb55bf5d82c5f3c64944ec5a8e2b5b18100a57edda8055581265deeb01b1a5210216f50c9547a960c9c3766eded5ce69f80dde65d5b3b996f379f2585c6949a3ecb0e07556a174fd2f609235254b27661dd35eb29b4b413954492d10b01b1ba868bb0fcb1ac3cf6e142e8aad31286409b73e2acea86e06471d5175631d62cfcd0fdc1d489cb17291b4b19039de329be96de7e9b1b30f31fe4ccb711554c98989b9cb7b753e6f994bab4977c98843c8f4113248dbca384a457a6ee022c4b8b34ffa8598ed81aedc2a779\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost/api/refresh"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Host","value":"localhost"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.2.29"},{"key":"pragma","value":"no-cache"},{"key":"Cache-Control","value":"no-store, private"},{"key":"content-type","value":"application/json; charset=UTF-8"},{"key":"Date","value":"Fri, 01 Aug 2025 16:15:10 GMT"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"58"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"token_type\": \"Bearer\",\n    \"expires_in\": 31536000,\n    \"access_token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI1IiwianRpIjoiMjkwYmUyZmMzMzkyY2U2Y2NjYmNhNGU5YWEzM2VlNDczMGIwNGVkMmQwYmE0NGFjODI5Yzc3NDJmMTFiYzJlMzBlNTlmOGNmZTg1Yjc3MGMiLCJpYXQiOjE3NTQwNjQ5MTAuNzMyNzE3LCJuYmYiOjE3NTQwNjQ5MTAuNzMyNzE4LCJleHAiOjE3ODU2MDA5MTAuNzIwODE2LCJzdWIiOiIyIiwic2NvcGVzIjpbXX0.mUzlEqbpyFxg0WcgCcr1R1S9zfjS8y38q1QHwj_4Q9IFM3hrBEPcn7DzOl13Mm7luqOfNuE2uCsz9G-djvNPGj6tgkklItMnm0tmQ73W506utyh19rI5xrxJDE0Jlh9wP1QSqmgIXrbrWDvKbh_U5OIMLqKy3-OU73eRZf1vYjEB_AqHsSKeNznK58Yyy_EC1XHI4aBMy_VlD3GBx1AIWAeraSlA75T4AX07g7VV9IzLWD0SDJjnk0aakAxxBY2mK2JimnbL4hpoGMDOZsdwaEitLtP3xk6806C3S3fP3SDu191DLQU-kevkFWt29KBvIFTCYn8_WKZa133wMdda5JyT5VO1XtlmAbONDx_eB9WcbEnV5cI89IlMKUgW3HhFIyBMQEqgKK2tAmQJwANep_qE601CMEXSxsS-V78XRNSNNtZYD-TzXHmM8z0FI44WDnc_YnV7DD_27RMLy5uJiFLPL4l8mHoRdDChX6OzHsJuyHAoEbUgVw2158hgnoEUGdC_mkE14cy27QI8MA61RdM2Fhqbfnt6MkRbe8y_52xl8qwO30TDJJkzmjQAMAir4r_A7SM_lW4DuThjjfcBjW5lz3OAvoYCkfFepAWvIkmFLqki82DBvVx11CzgNWBOHlAWM_pjicnzmjvkgdxqI2grfcwzEmwglf40epxJpQ0\",\n    \"refresh_token\": \"def50200516810b76ec32e6c68650b729d2a67f2e078ecce79fe991385472aa88dc21ed597edee9f031998786b8f63ec83ece4de35ddf7b9f8fef262a691c2c8ec259614d02c38c818ca6b84f2b936807ff6d2862a7da686cfd496e98fda36d639f7c4f72b3c587f0eec6dab062e6a338a64d2183da0039a776ef7b756475803d52383ec8b1411fab48ff7eda40c86661179bf714862126eeb3b0482cdcbff93c42fb4b69ddbc02162b6c11f479e7646a6cd90136fbbdfeb661a6ea463f624b291a6a9d76275fbaf0486e72735507cf5d04daa54978f6d72e201c8b53915733afaf05f3f066ec3e28d893eae1ae57603dfe15986a91c71dc59193c8f80132590c8067ea47ffe78e31ba1bc8200b26a9ee6b8cd85e38c72c20774c9f39713da5125b0149657ea91f36c999e318c24b56a99faa6a0d561ca74281f80e1305300e641eb8e6feba916e83f0279d2d5a5d1274734706f16dc18aa2e36e14821a38e77ea\"\n}"}],"_postman_id":"f979f0d2-613e-4dae-887f-7d35551520f3"},{"name":"3 - Get user","id":"c36c6074-1810-4630-9b94-e8d0ff69a44d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost/api/user","urlObject":{"protocol":"http","path":["api","user"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"34d00806-fbab-4eef-ac5f-c2718a663cdf","name":"3 - Get user Example","originalRequest":{"method":"GET","header":[],"url":"http://localhost/api/user"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Host","value":"localhost"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.2.29"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Fri, 01 Aug 2025 16:31:03 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 2,\n    \"name\": \"Test Updated\",\n    \"email\": \"test-updated@gmail.com\",\n    \"created_at\": \"2025-08-01T15:54:25.000000Z\",\n    \"updated_at\": \"2025-08-01T16:30:28.000000Z\"\n}"}],"_postman_id":"c36c6074-1810-4630-9b94-e8d0ff69a44d"},{"name":"3 - Update user","id":"5d02f8bc-9ae1-420b-b0f3-db4f68c82629","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PUT","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Test Updated\",\r\n    \"email\": \"test-updated@gmail.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost/api/user","urlObject":{"protocol":"http","path":["api","user"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"626089b0-8f32-4514-b64d-095772675d69","name":"3 - Update user Example","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Test Updated\",\r\n    \"email\": \"test-updated@gmail.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost/api/user"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Host","value":"localhost"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.2.29"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Fri, 01 Aug 2025 16:30:28 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"58"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 2,\n    \"name\": \"Test Updated\",\n    \"email\": \"test-updated@gmail.com\",\n    \"created_at\": \"2025-08-01T15:54:25.000000Z\",\n    \"updated_at\": \"2025-08-01T16:30:28.000000Z\"\n}"}],"_postman_id":"5d02f8bc-9ae1-420b-b0f3-db4f68c82629"},{"name":"4 - Get user devices","id":"915ab210-bae3-4ba9-9503-5136fd50d4ce","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost/api/devices","urlObject":{"protocol":"http","path":["api","devices"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"eb6ab6a3-fcd9-40e7-9a89-52be5ea15062","name":"Get user devices Example","originalRequest":{"method":"GET","header":[],"url":"http://localhost/api/devices"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Host","value":"localhost"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.2.29"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Fri, 01 Aug 2025 16:50:21 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 1,\n        \"name\": \"iPhone 15\",\n        \"model\": \"A3090\",\n        \"device_unique_id\": \"IPH15-MILICA-001\",\n        \"created_at\": \"2025-08-01T16:35:39.000000Z\",\n        \"updated_at\": \"2025-08-01T16:35:39.000000Z\",\n        \"pivot\": {\n            \"user_id\": 2,\n            \"device_id\": 1\n        }\n    },\n    {\n        \"id\": 2,\n        \"name\": \"iPhone X\",\n        \"model\": \"A3090\",\n        \"device_unique_id\": \"IPH15-MILICA-0022\",\n        \"created_at\": \"2025-08-01T16:39:19.000000Z\",\n        \"updated_at\": \"2025-08-01T16:39:19.000000Z\",\n        \"pivot\": {\n            \"user_id\": 2,\n            \"device_id\": 2\n        }\n    },\n    {\n        \"id\": 3,\n        \"name\": \"iPhone X\",\n        \"model\": \"A3090\",\n        \"device_unique_id\": \"IPH15-MILICA-05\",\n        \"created_at\": \"2025-08-01T16:41:00.000000Z\",\n        \"updated_at\": \"2025-08-01T16:41:00.000000Z\",\n        \"pivot\": {\n            \"user_id\": 2,\n            \"device_id\": 3\n        }\n    },\n    {\n        \"id\": 4,\n        \"name\": \"iPhone X\",\n        \"model\": \"A3090\",\n        \"device_unique_id\": \"IPH15-MIL-05\",\n        \"created_at\": \"2025-08-01T16:46:55.000000Z\",\n        \"updated_at\": \"2025-08-01T16:46:55.000000Z\",\n        \"pivot\": {\n            \"user_id\": 2,\n            \"device_id\": 4\n        }\n    }\n]"}],"_postman_id":"915ab210-bae3-4ba9-9503-5136fd50d4ce"},{"name":"6 -Store device","id":"37ca164a-e666-42d4-85ee-aa85a0892b56","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"iPhone X\",\r\n  \"model\": \"A3090\",\r\n  \"device_unique_id\": \"IPH15-MIL-05\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost/api/devices","urlObject":{"protocol":"http","path":["api","devices"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"5b48399e-fd90-4132-9ae4-6bae51a18595","name":"Store device Example","originalRequest":{"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"iPhone X\",\r\n  \"model\": \"A3090\",\r\n  \"device_unique_id\": \"IPH15-MILICA-05\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost/api/devices"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":[{"key":"Host","value":"localhost"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.2.29"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Fri, 01 Aug 2025 16:41:00 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"57"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"name\": \"iPhone X\",\n    \"model\": \"A3090\",\n    \"device_unique_id\": \"IPH15-MILICA-05\",\n    \"updated_at\": \"2025-08-01T16:41:00.000000Z\",\n    \"created_at\": \"2025-08-01T16:41:00.000000Z\",\n    \"id\": 3\n}"},{"id":"00e2530e-dc65-42bf-aca4-a5ff175ddfc7","name":"Device Unique error Example","originalRequest":{"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"iPhone X\",\r\n  \"model\": \"A3090\",\r\n  \"device_unique_id\": \"IPH15-MIL-05\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost/api/devices"},"status":"Unprocessable Content","code":422,"_postman_previewlanguage":null,"header":[{"key":"Host","value":"localhost"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.2.29"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Fri, 01 Aug 2025 16:49:18 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"The given data was invalid.\",\n    \"errors\": {\n        \"device_unique_id\": [\n            \"The device unique id has already been taken.\"\n        ]\n    }\n}"}],"_postman_id":"37ca164a-e666-42d4-85ee-aa85a0892b56"},{"name":"6 - Update device","id":"99f65399-dc17-4130-917b-d0aa66b0b79b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PUT","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"iPhone X - updated\",\r\n    \"model\": \"A3090 - updated\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost/api/devices/2","urlObject":{"protocol":"http","path":["api","devices","2"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"e8b15674-4871-49d0-9eac-df5216e77a1b","name":"Update device Example","originalRequest":{"method":"PUT","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"iPhone X - updated\",\r\n    \"model\": \"A3090 - updated\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost/api/devices/2"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Host","value":"localhost"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.2.29"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Fri, 01 Aug 2025 16:55:37 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 2,\n    \"name\": \"iPhone X - updated\",\n    \"model\": \"A3090 - updated\",\n    \"device_unique_id\": \"IPH15-MILICA-0022\",\n    \"created_at\": \"2025-08-01T16:39:19.000000Z\",\n    \"updated_at\": \"2025-08-01T16:55:37.000000Z\",\n    \"pivot\": {\n        \"user_id\": 2,\n        \"device_id\": 2\n    }\n}"}],"_postman_id":"99f65399-dc17-4130-917b-d0aa66b0b79b"},{"name":"6 - Get user device by id","id":"09049c54-2a0b-479d-838f-7db1d85ef8c3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost/api/devices/2","urlObject":{"protocol":"http","path":["api","devices","2"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"479d7026-089f-466b-bdc4-4507e452b9d1","name":"Get user device by id Example","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"http://localhost/api/devices/2"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Host","value":"localhost"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.2.29"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Fri, 01 Aug 2025 16:53:03 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 2,\n    \"name\": \"iPhone X\",\n    \"model\": \"A3090\",\n    \"device_unique_id\": \"IPH15-MILICA-0022\",\n    \"created_at\": \"2025-08-01T16:39:19.000000Z\",\n    \"updated_at\": \"2025-08-01T16:39:19.000000Z\",\n    \"pivot\": {\n        \"user_id\": 2,\n        \"device_id\": 2\n    }\n}"}],"_postman_id":"09049c54-2a0b-479d-838f-7db1d85ef8c3"}]}