{"info":{"_postman_id":"dbb745f8-8efd-456a-8a4c-cb5e5d63c0aa","name":"LabeEcommerce","description":"<html><head></head><body><h1 id=\"introduction\">Introduction</h1>\n<ul>\n<li>Simula a metodologia CRUD na estruturação de Sistema E-Commerce, criando e acessando informações de usuários, produtos, viagens e compras feitas, a partir de endpoints <code>GET</code> e <code>POST</code> para alimentar as demandas.</li>\n</ul>\n<h1 id=\"overview\">Overview</h1>\n<hr>\n<h1 id=\"authentication\">Authentication</h1>\n<ul>\n<li>None</li>\n</ul>\n<h1 id=\"error-codes\">Error Codes</h1>\n<ul>\n<li>400: Bad request error;</li>\n<li>422: unprocessable entity;</li>\n<li>500: Internal server error;</li>\n</ul>\n<h1 id=\"rate-limit\">Rate limit</h1>\n<ul>\n<li>None</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Introduction","slug":"introduction"},{"content":"Overview","slug":"overview"},{"content":"Authentication","slug":"authentication"},{"content":"Error Codes","slug":"error-codes"},{"content":"Rate limit","slug":"rate-limit"}],"owner":"15825773","collectionId":"dbb745f8-8efd-456a-8a4c-cb5e5d63c0aa","publishedId":"Tzz4PeRJ","public":true,"customColor":{"top-bar":"FFFFF","right-sidebar":"303","highlight":"EF5B25"},"publishDate":"2021-08-09T14:30:44.000Z"},"item":[{"name":"getAllUsers","id":"05d70e31-db40-4df4-93f8-547c30dfec22","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://labecommerce-projeto.herokuapp.com/user","description":"<ul>\n<li>Este endpoint retorna todos os usuários registrados no sistema.</li>\n</ul>\n","urlObject":{"protocol":"https","path":["user"],"host":["labecommerce-projeto","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"4a4082ac-c1fa-4454-a9f1-f9d6eaeaa3a8","name":"getAllUsers","originalRequest":{"method":"GET","header":[],"url":"https://labecommerce-projeto.herokuapp.com/user"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"users\": [\r\n        {\r\n            \"id\": \"1.55555555\",\r\n            \"name\": \"nome\",\r\n            \"email\": \"email@email.com\",\r\n            \"age\": 20\r\n        }\r\n    ]\r\n}"}],"_postman_id":"05d70e31-db40-4df4-93f8-547c30dfec22"},{"name":"getAllProductsOrderedByPrice","id":"28e22f7f-05a4-4e70-83b6-d8d78e2e4028","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://labecommerce-projeto.herokuapp.com/product?order=asc","description":"<ul>\n<li>Este endpoint retorna todos os produtos do sistema ordenados pelo preço.</li>\n<li>Os produtos podem receber o tipo de ordenamento desejado (<code>ASC</code> para ascendente e <code>DESC</code> \npara descendente) por preço do produto.</li>\n</ul>\n","urlObject":{"protocol":"https","path":["product"],"host":["labecommerce-projeto","herokuapp","com"],"query":[{"key":"order","value":"asc"}],"variable":[]}},"response":[{"id":"11967d84-be3b-4191-83b0-b7ac9fd08611","name":"getAllProductsOrderedByPrice","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://labecommerce-projeto.herokuapp.com/product?order=asc","protocol":"https","host":["labecommerce-projeto","herokuapp","com"],"path":["product"],"query":[{"key":"order","value":"asc"}]}},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"products\": [\r\n        {\r\n            \"id\": \"1.6281283732382985\",\r\n            \"name\": \"produto\",\r\n            \"description\": \"descrição\",\r\n            \"price\": 18.5\r\n        },\r\n        {\r\n            \"id\": \"1.6281762770675543\",\r\n            \"name\": \"trip\",\r\n            \"description\": \"descrição\",\r\n            \"price\": 25\r\n        },\r\n        {\r\n            \"id\": \"1.6281763134581866\",\r\n            \"name\": \"trip2\",\r\n            \"description\": \"descrição\",\r\n            \"price\": 2500\r\n        }\r\n    ]\r\n}"}],"_postman_id":"28e22f7f-05a4-4e70-83b6-d8d78e2e4028"},{"name":"getAllTrips","id":"81b31ed1-86e0-401a-b25a-17990eba52dd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://labecommerce-projeto.herokuapp.com/trip","description":"<ul>\n<li>Este endpoint retorna todas as viagens registradas no sistema.</li>\n</ul>\n","urlObject":{"protocol":"https","path":["trip"],"host":["labecommerce-projeto","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"9f036890-f61b-47a0-85bb-9d13d6a1d2ac","name":"getAllTrips","originalRequest":{"method":"GET","header":[],"url":"https://labecommerce-projeto.herokuapp.com/trip"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"trips\": [\r\n        {\r\n            \"id\": \"1.6281762770675543\",\r\n            \"name\": \"trip\",\r\n            \"description\": \"descrição\",\r\n            \"price\": 25,\r\n            \"origin\": \"Paris\",\r\n            \"destination\": \"Lisboa\"\r\n        },\r\n        {\r\n            \"id\": \"1.6281763134581866\",\r\n            \"name\": \"trip2\",\r\n            \"description\": \"descrição\",\r\n            \"price\": 2500,\r\n            \"origin\": \"Bogotá\",\r\n            \"destination\": \"Camboja\"\r\n        }\r\n    ]\r\n}"}],"_postman_id":"81b31ed1-86e0-401a-b25a-17990eba52dd"},{"name":"getAllPurchases","id":"1e315248-6048-4bb3-b99f-b396020e0fa7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://labecommerce-projeto.herokuapp.com/purchase","description":"<ul>\n<li>Este endpoint retorna todos as compras registradas no sistema.</li>\n</ul>\n","urlObject":{"protocol":"https","path":["purchase"],"host":["labecommerce-projeto","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"2898579d-458c-4b11-b751-e008ea24581f","name":"getAllPurchases","originalRequest":{"method":"GET","header":[],"url":"https://labecommerce-projeto.herokuapp.com/purchase"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"purchases\": [\r\n        {\r\n            \"id\": \"1.6282569448094355\",\r\n            \"user_id\": \"1.6281285616511747\",\r\n            \"product_id\": \"1.6281283732382985\",\r\n            \"quantity\": 2,\r\n            \"total_price\": 18.5\r\n        },\r\n        {\r\n            \"id\": \"1.6282571227781966\",\r\n            \"user_id\": \"1.6281285616511747\",\r\n            \"product_id\": \"1.6281283732382985\",\r\n            \"quantity\": 5,\r\n            \"total_price\": 92.5\r\n        }\r\n    ]\r\n}"}],"_postman_id":"1e315248-6048-4bb3-b99f-b396020e0fa7"},{"name":"getPurchasesByUserId","id":"380d6c3f-545b-4ff8-a6f3-b765cb4727f3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://labecommerce-projeto.herokuapp.com/purchase/:userId","description":"<ul>\n<li>Este endpoint busca todas as compras feitos por um usuário.</li>\n<li>É necessário passar o <code>userId</code> como query params.</li>\n</ul>\n","urlObject":{"protocol":"https","path":["purchase",":userId"],"host":["labecommerce-projeto","herokuapp","com"],"query":[],"variable":[{"type":"any","value":"1.6281285616511747","key":"userId"}]}},"response":[{"id":"b655e343-2792-4c1d-a7b4-af2cb2c3a073","name":"getPurchasesByUserId","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://labecommerce-projeto.herokuapp.com/purchase/:userId","protocol":"https","host":["labecommerce-projeto","herokuapp","com"],"path":["purchase",":userId"],"variable":[{"key":"userId","value":"1.6281285616511747"}]}},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"purchases\": [\r\n        {\r\n            \"id\": \"1.6282569448094355\",\r\n            \"user_id\": \"1.6281285616511747\",\r\n            \"product_id\": \"1.6281283732382985\",\r\n            \"quantity\": 2,\r\n            \"total_price\": 18.5\r\n        },\r\n        {\r\n            \"id\": \"1.6282571227781966\",\r\n            \"user_id\": \"1.6281285616511747\",\r\n            \"product_id\": \"1.6281283732382985\",\r\n            \"quantity\": 5,\r\n            \"total_price\": 92.5\r\n        }\r\n    ]\r\n}"}],"_postman_id":"380d6c3f-545b-4ff8-a6f3-b765cb4727f3"},{"name":"createNewUser","id":"dab708da-5c94-4618-b075-db18f421df70","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"teste3\",\r\n    \"email\": \"teste3@teste.com\",\r\n    \"age\": 48\r\n}","options":{"raw":{"language":"json"}}},"url":"https://labecommerce-projeto.herokuapp.com/user","description":"<ul>\n<li>Este endpoint cria um novo usuário no sistema.</li>\n</ul>\n","urlObject":{"protocol":"https","path":["user"],"host":["labecommerce-projeto","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"538d0fc6-ddd4-482d-8196-0f90dcbb22ae","name":"createNewUser","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"teste3\",\r\n    \"email\": \"teste3@teste.com\",\r\n    \"age\": 48\r\n}","options":{"raw":{"language":"json"}}},"url":"https://labecommerce-projeto.herokuapp.com/user"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n  \"message\": \"User created successfully!\"\r\n}"}],"_postman_id":"dab708da-5c94-4618-b075-db18f421df70"},{"name":"createNewProduct","id":"7400ee01-7545-480b-a8b9-abd15eaed52b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"produto1\",\r\n    \"description\": \"descrição1\",\r\n    \"price\": 18.50\r\n}","options":{"raw":{"language":"json"}}},"url":"https://labecommerce-projeto.herokuapp.com/product","description":"<ul>\n<li>Este endpoint cria um novo produto no sistema.</li>\n</ul>\n","urlObject":{"protocol":"https","path":["product"],"host":["labecommerce-projeto","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"86a827b9-1724-48b1-b616-1188547f9dad","name":"createNewProduct","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"produto1\",\r\n    \"description\": \"descrição1\",\r\n    \"price\": 18.50\r\n}","options":{"raw":{"language":"json"}}},"url":"https://labecommerce-projeto.herokuapp.com/product"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"message\": \"Product created successfully!\"\r\n}"}],"_postman_id":"7400ee01-7545-480b-a8b9-abd15eaed52b"},{"name":"createNewTrip","id":"dae76ff3-d1ad-4c4e-b4eb-11ba2c315a46","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"trip3\",\r\n    \"description\": \"descrição3\",\r\n    \"price\": 1500.00,\r\n    \"origin\": \"Rio de Janeiro\",\r\n    \"destination\": \"Buenos Aires\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://labecommerce-projeto.herokuapp.com/trip","description":"<ul>\n<li>Este endpoint cria uma nova viagem no sistema.</li>\n</ul>\n","urlObject":{"protocol":"https","path":["trip"],"host":["labecommerce-projeto","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"5c7e06d4-2958-4cec-86ac-278463925ed9","name":"createNewTrip","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"trip3\",\r\n    \"description\": \"descrição3\",\r\n    \"price\": 1500.00,\r\n    \"origin\": \"Rio de Janeiro\",\r\n    \"destination\": \"Buenos Aires\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://labecommerce-projeto.herokuapp.com/trip"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"message\": \"Trip created successfully!\"\r\n}"}],"_postman_id":"dae76ff3-d1ad-4c4e-b4eb-11ba2c315a46"},{"name":"createNewPurchase","id":"c89d6ed1-9a27-4a8f-b75c-2a3db3cd7c48","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"userId\": \"1.6281285616511747\",\r\n    \"productId\": \"1.6281283732382985\",\r\n    \"quantity\": 8\r\n}","options":{"raw":{"language":"json"}}},"url":"https://labecommerce-projeto.herokuapp.com/purchase","description":"<ul>\n<li>Este endpoint cria uma nova compra no sistema por um usuário.</li>\n</ul>\n","urlObject":{"protocol":"https","path":["purchase"],"host":["labecommerce-projeto","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"bc10cbbb-7386-413a-bb0d-357d1e86f41a","name":"createNewPurchase","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"userId\": \"1.6281285616511747\",\r\n    \"productId\": \"1.6281283732382985\",\r\n    \"quantity\": 8\r\n}","options":{"raw":{"language":"json"}}},"url":"https://labecommerce-projeto.herokuapp.com/purchase"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"message\": \"Purchase created successfully!\"\r\n}"}],"_postman_id":"c89d6ed1-9a27-4a8f-b75c-2a3db3cd7c48"}]}