{"info":{"_postman_id":"126f90b8-a52e-430e-92b8-3d7850e268bb","name":"API - Gerenciamento De Produtos Smartphones","description":"<html><head></head><body><h2 id=\"contexto\">Contexto</h2>\n<p>Esta API permite gerenciar um catálogo de produtos smartphones, oferecendo funcionalidades para criar, listar, atualizar e excluir produtos. Ela foi projetada para permitir a integração com sistemas de e-commerce, inventário ou qualquer aplicação que precise manipular dados relacionados a produtos.</p>\n<p>A API trabalha com as seguintes operações principais:</p>\n<ul>\n<li><p><strong>Criar Produtos</strong>: Adicione novos celulares ao catálogo especificando detalhes como título, descrição, quantidade e preço.</p>\n</li>\n<li><p><strong>Listar Produtos</strong>: Consulte a lista completa dos celulares ou obtenha informações detalhadas de um produto específico.</p>\n</li>\n<li><p><strong>Atualizar Produtos</strong>: Modifique as informações de produtos existentes.</p>\n</li>\n<li><p><strong>Excluir Produtos</strong>: Remova produtos do catálogo.</p>\n</li>\n</ul>\n<h2 id=\"estrutura-do-produto\">Estrutura do Produto</h2>\n<p>Cada produto armazenado na API possui a seguinte estrutura de dados:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": \"unique-id\",\n  \"title\": \"Product Title\",\n  \"description\": \"Product Description\",\n  \"quantity\": 10,\n  \"price\": 99.99\n}\n\n</code></pre>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"19569624","collectionId":"126f90b8-a52e-430e-92b8-3d7850e268bb","publishedId":"2sAXxS9XN8","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-10-26T02:21:59.000Z"},"item":[{"name":"1. Documentação da API para Desenvolvimento Local (JSON)","item":[{"name":"Create Product","event":[{"listen":"test","script":{"id":"da2e5b08-c765-4fae-819a-68fec6842530","exec":["pm.test(\"Successful POST request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 201]);","});",""],"type":"text/javascript","packages":{}}}],"id":"87cb37a6-3b98-4cb1-8874-f4524dfdb41b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"Samsung Galaxy S23\",\n      \"description\": \"Samsung Galaxy S23 com 256GB e câmera de 108MP para fotos incríveis.\",\n      \"quantity\": 15,\n      \"price\": 5.999\n}    ","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/products","description":"<ul>\n<li><p><strong>Descrição: Esta requisição cria um novo \"produto\" com os dados fornecidos no corpo da requisição.</strong></p>\n</li>\n<li><p><strong>Método: POST</strong></p>\n</li>\n<li><p><strong>URL:</strong> <strong><code>http://localhost:3000/api/products</code></strong></p>\n</li>\n<li><p><strong>Resposta:</strong></p>\n<ul>\n<li><p><strong>201 OK: Sucesso.</strong></p>\n</li>\n<li><p><strong>404 Not Found: Produto não encontrado.</strong></p>\n</li>\n</ul>\n</li>\n<li><p><strong>Corpo da requisição:</strong></p>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"3000","path":["api","products"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"891bb232-b7e0-49a8-9bbb-a209049dd729","name":"Create Product","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"title\": \"iPhone 16 Pro\",\n        \"description\": \"O iPhone 16 Pro apresenta um design elegante com bordas retas e está equipado com o poderoso chip A18 Pro, proporcionando desempenho excepcional.\",\n        \"quantity\": 10,\n        \"price\": 7.999\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/products"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"223"},{"key":"ETag","value":"W/\"df-XdXIaMEo9+yiCbet7Y5Jcy28X0I\""},{"key":"Date","value":"Fri, 11 Oct 2024 19:44:06 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"title\": \"iPhone 16 Pro\",\n    \"description\": \"O iPhone 16 Pro apresenta um design elegante com bordas retas e está equipado com o poderoso chip A18 Pro, proporcionando desempenho excepcional.\",\n    \"quantity\": 10,\n    \"price\": 7.999,\n    \"id\": 1\n}"}],"_postman_id":"87cb37a6-3b98-4cb1-8874-f4524dfdb41b"},{"name":"All Products","event":[{"listen":"test","script":{"id":"c089026f-ab2e-4582-9c79-866151649c48","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","packages":{}}}],"id":"3528d5a6-4664-46ce-8188-f6a3ab4b66f2","request":{"method":"GET","header":[],"url":"http://localhost:3000/api/products","description":"<ul>\n<li><p><strong>Descrição: Retorna todos os produtos.</strong></p>\n</li>\n<li><p><strong>Método: GET</strong></p>\n</li>\n<li><p><strong>URL:</strong> <strong><code>http://localhost:3000/api/products</code></strong></p>\n</li>\n<li><p><strong>Resposta:</strong></p>\n<ul>\n<li><p><strong>200 OK: Sucesso.</strong></p>\n</li>\n<li><p><strong>404 Not Found: Produto não encontrado.</strong></p>\n</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"3000","path":["api","products"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"005bd2e5-afb8-456e-a129-75c5c6c88d34","name":"All Products","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/api/products"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"805"},{"key":"ETag","value":"W/\"325-5cSkT5+/W+czoTgrAjSk9OO9zDM\""},{"key":"Date","value":"Fri, 11 Oct 2024 20:13:16 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"title\": \"iPhone 16 Pro\",\n        \"description\": \"O iPhone 16 Pro apresenta um design elegante com bordas retas e está equipado com o poderoso chip A18 Pro, proporcionando desempenho excepcional.\",\n        \"quantity\": 10,\n        \"price\": 7.999,\n        \"id\": 1\n    },\n    {\n        \"title\": \"Samsung Galaxy S24 Ultra\",\n        \"description\": \"O Samsung Galaxy S24 Ultra destaca-se com sua tela Dynamic AMOLED 2X de 6,8 polegadas e resolução QHD+.\",\n        \"quantity\": 10,\n        \"price\": 6.499,\n        \"id\": 2\n    },\n    {\n        \"title\": \"Samsung Galaxy S24\",\n        \"description\": \"O Samsung Galaxy S24 combina design moderno com desempenho robusto, graças ao processador Exynos 2400.\",\n        \"quantity\": 10,\n        \"price\": 4999,\n        \"id\": 3\n    },\n    {\n        \"title\": \" iPhone 15 Pro\",\n        \"description\": \"O iPhone 15 Pro conta com um design em titânio, tela Super Retina XDR de 6,1 chip A17 Bionic e câmeras triplas de 48 MP.\",\n        \"quantity\": 10,\n        \"price\": 9.499,\n        \"id\": 4\n    }\n]"}],"_postman_id":"3528d5a6-4664-46ce-8188-f6a3ab4b66f2"},{"name":"Product ById","id":"9cdb83da-cea1-4ba9-9e1e-3fe4451888b2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/api/products/1","description":"<ul>\n<li><p><strong>Descrição: Retorna um produto específico pelo ID.</strong></p>\n</li>\n<li><p><strong>Método: GET</strong></p>\n</li>\n<li><p><strong>URL:</strong> <strong><code>http://localhost:3000/api/products/{id}</code></strong></p>\n</li>\n<li><p><strong>Resposta:</strong></p>\n<ul>\n<li><p><strong>200 OK: Sucesso.</strong></p>\n</li>\n<li><p><strong>404 Not Found: Produto não encontrado.</strong></p>\n</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"3000","path":["api","products","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"9386aec8-f5f3-4f03-b2fc-4fca26a9e93b","name":"Product ById","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/api/products/3"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"184"},{"key":"ETag","value":"W/\"b8-A9TmOqBZJyeqqPIg7H7+QMyYSn8\""},{"key":"Date","value":"Fri, 11 Oct 2024 20:15:02 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"title\": \"Samsung Galaxy S24\",\n    \"description\": \"O Samsung Galaxy S24 combina design moderno com desempenho robusto, graças ao processador Exynos 2400.\",\n    \"quantity\": 10,\n    \"price\": 4999,\n    \"id\": 3\n}"}],"_postman_id":"9cdb83da-cea1-4ba9-9e1e-3fe4451888b2"},{"name":"Update Product/ID","event":[{"listen":"test","script":{"id":"e50cc2fd-efdc-4960-99e8-bf65f315f58d","exec":["pm.test(\"Successful PUT request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 201, 204]);","});",""],"type":"text/javascript","packages":{}}}],"id":"1ebf752c-def9-4ebb-ac25-f5a00e7c758e","request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n     \"title\": \"Samsung Galaxy S24 Ultra\",\n        \"description\": \"O Samsung Galaxy S24 Ultra destaca-se com sua tela Dynamic AMOLED 2X de 6,8 polegadas e resolução QHD+.\",\n        \"quantity\": 9,\n        \"price\": 6.499\n       \n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/products/2","description":"<ul>\n<li><p><strong>Descrição: Atualiza um produto existente.</strong></p>\n</li>\n<li><p><strong>Método: PUT.</strong></p>\n</li>\n<li><p><strong>URL</strong>: <code>http://localhost:3000/api/products/{id}</code></p>\n</li>\n<li><p><strong>Resposta:</strong></p>\n<ul>\n<li><p><strong>200 OK: Produto atualizado com sucesso.</strong></p>\n</li>\n<li><p><strong>404 Not Found: Produto não encontrado.</strong></p>\n</li>\n</ul>\n</li>\n<li><p><strong>Corpo da requisição:</strong></p>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"3000","path":["api","products","2"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"4b7fddf3-9dac-4bcf-b1d6-717fd410bdeb","name":"Update Product/ID","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"Samsung Galaxy S24\",\n        \"description\": \"O Samsung Galaxy S24 combina design moderno com desempenho robusto, graças ao processador Exynos 2400.\",\n        \"quantity\": 9,\n        \"price\": 4.999\n       \n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/products/3"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"240"},{"key":"ETag","value":"W/\"f0-CZjKgZPlMt+pfHKzAnGtNwEdsbU\""},{"key":"Date","value":"Sun, 13 Oct 2024 23:14:25 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Produto atualizado com sucesso!\",\n    \"product\": {\n        \"title\": \"Samsung Galaxy S24\",\n        \"description\": \"O Samsung Galaxy S24 combina design moderno com desempenho robusto, graças ao processador Exynos 2400.\",\n        \"quantity\": 9,\n        \"price\": 4.999,\n        \"id\": 3\n    }\n}"}],"_postman_id":"1ebf752c-def9-4ebb-ac25-f5a00e7c758e"},{"name":"Delete Product/ID","id":"a1b2fa4f-dce3-474c-aa01-0b435c14cfc5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:3000/api/products/6","description":"<ul>\n<li><p><strong>Descrição:</strong> Exclui um produto do arquivo JSON.<strong>.</strong></p>\n</li>\n<li><p><strong>Método: DELETE.</strong></p>\n</li>\n<li><p><strong>URL</strong>: <code>http://localhost:3000/api/products/{id}</code></p>\n</li>\n<li><p><strong>Resposta:</strong></p>\n<ul>\n<li><p><strong>204 No Content: Sucesso.</strong></p>\n</li>\n<li><p><strong>404 Not Found: Produto não encontrado.</strong></p>\n</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"3000","path":["api","products","6"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"203b26ba-6f49-4640-b2b5-70a631158adc","name":"Delete Product/ID","originalRequest":{"method":"DELETE","header":[],"url":"http://localhost:3000/api/products/4"},"status":"No Content","code":204,"_postman_previewlanguage":"plain","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Date","value":"Tue, 15 Oct 2024 12:41:16 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"a1b2fa4f-dce3-474c-aa01-0b435c14cfc5"}],"id":"f326ccc8-8a73-48df-a968-cbab21981557","description":"<h3 id=\"11-descrição-geral\"><strong>1.1. Descrição Geral</strong></h3>\n<p>Nesta versão, a API utiliza um arquivo local JSON como banco de dados. Ela oferece endpoints para criar, listar, atualizar e excluir produtos.</p>\n<h3 id=\"12-requisitos\"><strong>1.2. Requisitos</strong></h3>\n<ul>\n<li><p>Node.js instalado localmente.</p>\n</li>\n<li><p>Arquivo <code>products.json</code> armazenado localmente para persistir os dados.</p>\n</li>\n<li><p>Dependências (como Express, Mongoose, e File System) devem estar instaladas via <code>npm install</code>.</p>\n</li>\n<li><p>Vai criar e gerenciar o campo <code>id</code> manualmente</p>\n</li>\n</ul>\n<p><strong>1.3. Endpoints👇</strong></p>\n","_postman_id":"f326ccc8-8a73-48df-a968-cbab21981557"},{"name":"2. Documentação da API para Produção (MongoDB no Vercel)","item":[{"name":"Create Product","event":[{"listen":"test","script":{"id":"da2e5b08-c765-4fae-819a-68fec6842530","exec":["pm.test(\"Successful POST request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 201]);","});",""],"type":"text/javascript","packages":{}}}],"id":"66eeb0e5-5af5-4108-98b9-6039896e6c8f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n \"title\": \"Samsung Galaxy S23\",\n      \"description\": \"Samsung Galaxy S23 com 256GB e câmera de 108MP para fotos incríveis.\",\n      \"quantity\": 15,\n      \"price\": 5.999\n}    ","options":{"raw":{"language":"json"}}},"url":"https://raizertech.vercel.app/api/products","description":"<ul>\n<li><p><strong>Descrição: Esta requisição cria um novo \"produto\" com os dados fornecidos no corpo da requisição.</strong></p>\n</li>\n<li><p><strong>Método: POST</strong></p>\n</li>\n<li><p><strong>URL:</strong> <a href=\"https://raizertech.vercel.app/api/products\">https://raizertech.vercel.app/api/products</a></p>\n</li>\n<li><p><strong>Resposta:</strong></p>\n<ul>\n<li><p><strong>201 OK: Sucesso.</strong></p>\n</li>\n<li><p><strong>404 Not Found: Produto não encontrado.</strong></p>\n</li>\n</ul>\n</li>\n<li><p><strong>Corpo da requisição:</strong></p>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","products"],"host":["raizertech","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"8ec3f3b7-9d80-4e15-956a-318deac81219","name":"Create Product","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n \"title\": \"Samsung Galaxy S23\",\n      \"description\": \"Samsung Galaxy S23 com 256GB e câmera de 108MP para fotos incríveis.\",\n      \"quantity\": 15,\n      \"price\": 5.999\n}    ","options":{"raw":{"language":"json"}}},"url":"https://raizertech.vercel.app/api/products"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"public, max-age=0, must-revalidate"},{"key":"Content-Length","value":"186"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Wed, 11 Dec 2024 21:56:09 GMT"},{"key":"Etag","value":"W/\"ba-yKYp1Tcsw0Fgk383HCFVD2v0H40\""},{"key":"Server","value":"Vercel"},{"key":"Strict-Transport-Security","value":"max-age=63072000; includeSubDomains; preload"},{"key":"X-Powered-By","value":"Express"},{"key":"X-Vercel-Cache","value":"MISS"},{"key":"X-Vercel-Id","value":"iad1::iad1::vslwv-1733954163285-32788054288b"}],"cookie":[],"responseTime":null,"body":"{\n    \"title\": \"Samsung Galaxy S23\",\n    \"description\": \"Samsung Galaxy S23 com 256GB e câmera de 108MP para fotos incríveis.\",\n    \"quantity\": 15,\n    \"price\": 5.999,\n    \"_id\": \"675a0a7356d072d5490e4e87\",\n    \"__v\": 0\n}"}],"_postman_id":"66eeb0e5-5af5-4108-98b9-6039896e6c8f"},{"name":"All Products","event":[{"listen":"test","script":{"id":"c089026f-ab2e-4582-9c79-866151649c48","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","packages":{}}}],"id":"4ce04778-b93d-4d03-8947-120eee4c9632","request":{"method":"GET","header":[],"url":"https://raizertech.vercel.app/api/products","description":"<ul>\n<li><p><strong>Descrição: Retorna todos os produtos.</strong></p>\n</li>\n<li><p><strong>Método: GET</strong></p>\n</li>\n<li><p><strong>URL:</strong> <a href=\"https://raizertech.vercel.app/api/products\">https://raizertech.vercel.app/api/products</a></p>\n</li>\n<li><p><strong>Resposta:</strong></p>\n<ul>\n<li><p><strong>200 OK: Sucesso.</strong></p>\n</li>\n<li><p><strong>404 Not Found: Produto não encontrado.</strong></p>\n</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","products"],"host":["raizertech","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"5cd76f59-0fa4-4e0c-b318-34da039cd65e","name":"All Products","originalRequest":{"method":"GET","header":[],"url":"https://raizertechdev.vercel.app/api/products"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Age","value":"0"},{"key":"Cache-Control","value":"public, max-age=0, must-revalidate"},{"key":"Content-Length","value":"487"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 14 Oct 2024 00:06:20 GMT"},{"key":"Etag","value":"W/\"1e7-H+6VFXd9Sp9NI4XzOmKvzjtAm5M\""},{"key":"Server","value":"Vercel"},{"key":"Strict-Transport-Security","value":"max-age=63072000; includeSubDomains; preload"},{"key":"X-Powered-By","value":"Express"},{"key":"X-Vercel-Cache","value":"MISS"},{"key":"X-Vercel-Id","value":"gru1::iad1::27h4r-1728864379948-6b618965a644"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"_id\": \"670c5e6034bd700de1b84057\",\n        \"title\": \"iPhone 16 Pro\",\n        \"description\": \"O iPhone 16 Pro apresenta um design elegante com bordas retas e está equipado com o poderoso chip A18 Pro, proporcionando desempenho excepcional.\",\n        \"quantity\": 10,\n        \"price\": 7.999,\n        \"__v\": 0\n    },\n    {\n        \"_id\": \"670c60007c7f298768bb41b3\",\n        \"title\": \"Samsung Galaxy S24 Ultra\",\n        \"description\": \"O Samsung Galaxy S24 Ultra destaca-se com sua tela Dynamic AMOLED 2X de 6,8 polegadas e resolução QHD+.\",\n        \"quantity\": 10,\n        \"price\": 6.499,\n        \"__v\": 0\n    }\n]"}],"_postman_id":"4ce04778-b93d-4d03-8947-120eee4c9632"},{"name":"Product ById","id":"621103fe-ea33-4318-bafb-bd7fc5d109f0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://raizertech.vercel.app/api/products/671becafe4e2859eaa83524e","description":"<ul>\n<li><p><strong>Descrição: Retorna um produto específico pelo ID.</strong></p>\n</li>\n<li><p><strong>Método: GET</strong></p>\n</li>\n<li><p><strong>URL:</strong><a href=\"https://raizertech.vercel.app/api/products/671becafe4e2859eaa83524e\">https://raizertech.vercel.app/api/products/{id}</a></p>\n</li>\n<li><p><strong>Resposta:</strong></p>\n<ul>\n<li><p><strong>200 OK: Sucesso.</strong></p>\n</li>\n<li><p><strong>404 Not Found: Produto não encontrado.</strong></p>\n</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","products","671becafe4e2859eaa83524e"],"host":["raizertech","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"2e7b8128-836f-4256-ba5f-63acd2c0f0e5","name":"Product ById","originalRequest":{"method":"GET","header":[],"url":"https://raizertech.vercel.app/api/products/671becafe4e2859eaa83524e"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Age","value":"0"},{"key":"Cache-Control","value":"public, max-age=0, must-revalidate"},{"key":"Content-Length","value":"186"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sat, 26 Oct 2024 00:40:24 GMT"},{"key":"Etag","value":"W/\"ba-HN9hZ/FPFQdNRyUCtf4w9xfZ4/s\""},{"key":"Server","value":"Vercel"},{"key":"Strict-Transport-Security","value":"max-age=63072000; includeSubDomains; preload"},{"key":"X-Powered-By","value":"Express"},{"key":"X-Vercel-Cache","value":"MISS"},{"key":"X-Vercel-Id","value":"iad1::iad1::xpbns-1729903224623-7dde97455db5"}],"cookie":[],"responseTime":null,"body":"{\n    \"_id\": \"671becafe4e2859eaa83524e\",\n    \"title\": \"Samsung Galaxy S23\",\n    \"description\": \"Samsung Galaxy S23 com 256GB e câmera de 108MP para fotos incríveis.\",\n    \"quantity\": 15,\n    \"price\": 5.999,\n    \"__v\": 0\n}"}],"_postman_id":"621103fe-ea33-4318-bafb-bd7fc5d109f0"},{"name":"Update Product/ID","event":[{"listen":"test","script":{"id":"e50cc2fd-efdc-4960-99e8-bf65f315f58d","exec":["pm.test(\"Successful PUT request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 201, 204]);","});",""],"type":"text/javascript","packages":{}}}],"id":"7c1414a3-386f-48aa-b217-fd5cbac65ba9","request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"iPhone 14\",\n    \"description\": \"Apple iPhone 14 com 128GB de armazenamento e câmera de alta resolução.\",\n    \"quantity\": 8, \n    \"price\": 7.499\n       \n}","options":{"raw":{"language":"json"}}},"url":"https://raizertech.vercel.app/api/products/671becafe4e2859eaa83524e","description":"<ul>\n<li><p><strong>Descrição: Atualiza um produto existente.</strong></p>\n</li>\n<li><p><strong>Método: PUT.</strong></p>\n</li>\n<li><p><strong>URL</strong>: <a href=\"https://raizertech.vercel.app/api/products/671becafe4e2859eaa83524e\">https://raizertech.vercel.app/api/products/{id}</a></p>\n</li>\n<li><p><strong>Resposta:</strong></p>\n<ul>\n<li><p><strong>200 OK: Produto atualizado com sucesso.</strong></p>\n</li>\n<li><p><strong>404 Not Found: Produto não encontrado.</strong></p>\n</li>\n</ul>\n</li>\n<li><p><strong>Corpo da requisição:</strong></p>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","products","671becafe4e2859eaa83524e"],"host":["raizertech","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"7041eb4e-09f2-4417-864c-e4fdee7100e2","name":"Update Product/ID","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"iPhone 14\",\n    \"description\": \"Apple iPhone 14 com 128GB de armazenamento e câmera de alta resolução.\",\n    \"quantity\": 8, \n    \"price\": 7.499\n       \n}","options":{"raw":{"language":"json"}}},"url":"https://raizertech.vercel.app/api/products/671becafe4e2859eaa83524e"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"public, max-age=0, must-revalidate"},{"key":"Content-Length","value":"235"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sat, 26 Oct 2024 02:05:37 GMT"},{"key":"Etag","value":"W/\"eb-L0Axz5O+Vi5Xv9ypUlny30b9NbE\""},{"key":"Server","value":"Vercel"},{"key":"Strict-Transport-Security","value":"max-age=63072000; includeSubDomains; preload"},{"key":"X-Powered-By","value":"Express"},{"key":"X-Vercel-Cache","value":"MISS"},{"key":"X-Vercel-Id","value":"iad1::iad1::bhhbt-1729908337304-5c68cc02a17d"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Produto atualizado com sucesso!\",\n    \"product\": {\n        \"_id\": \"671becafe4e2859eaa83524e\",\n        \"title\": \"iPhone 14\",\n        \"description\": \"Apple iPhone 14 com 128GB de armazenamento e câmera de alta resolução.\",\n        \"quantity\": 8,\n        \"price\": 7.499,\n        \"__v\": 0\n    }\n}"}],"_postman_id":"7c1414a3-386f-48aa-b217-fd5cbac65ba9"},{"name":"Delete Product","event":[{"listen":"test","script":{"id":"f43aeca0-0912-477c-a09d-34c43cb3eaab","exec":["pm.test(\"Successful DELETE request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 202, 204]);","});",""],"type":"text/javascript","packages":{}}}],"id":"9fc5a212-cedd-48d2-b5cb-bd3d510bffba","request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://raizertech.vercel.app/api/products/671c14092148e5986d0d8cab","description":"<ul>\n<li><p><strong>Descrição</strong>: Deleta um produto existente.</p>\n</li>\n<li><p><strong>Método</strong>: DELETE</p>\n</li>\n<li><p><strong>URL</strong>: <a href=\"https://raizertech.vercel.app/api/products\">https://raizertech.vercel.app/api/product/{id}</a></p>\n</li>\n<li><p><strong>Resposta:</strong></p>\n<ul>\n<li><p><strong>204 No Content: Sucesso.</strong></p>\n</li>\n<li><p><strong>404 Not Found: Produto não encontrado.</strong></p>\n</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","products","671c14092148e5986d0d8cab"],"host":["raizertech","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"c9dc30a5-4a18-4bf9-a036-1bfa5284693b","name":"Delete Product","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://raizertech.vercel.app/api/products/670dadeccd0349e7f31de96f"},"status":"No Content","code":204,"_postman_previewlanguage":"plain","header":[{"key":"Cache-Control","value":"public, max-age=0, must-revalidate"},{"key":"Date","value":"Tue, 15 Oct 2024 12:45:39 GMT"},{"key":"Server","value":"Vercel"},{"key":"Strict-Transport-Security","value":"max-age=63072000; includeSubDomains; preload"},{"key":"X-Powered-By","value":"Express"},{"key":"X-Vercel-Cache","value":"MISS"},{"key":"X-Vercel-Id","value":"gru1::iad1::9nzjp-1728996339329-95fbeccc3489"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"9fc5a212-cedd-48d2-b5cb-bd3d510bffba"}],"id":"4f7a9027-fea8-46e3-b96b-f6d678567f2b","description":"<h3 id=\"21-descrição-geral\"><strong>2.1. Descrição Geral</strong></h3>\n<p>Na produção, a API utiliza o MongoDB como banco de dados, gerenciado por meio da plataforma Vercel. A API oferece os mesmos endpoints, mas agora os dados são persistidos no MongoDB.</p>\n<h3 id=\"22-requisitos\"><strong>2.2. Requisitos</strong></h3>\n<ul>\n<li><p>Configurar o banco de dados MongoDB Atlas.</p>\n</li>\n<li><p>Variáveis de ambiente configuradas no Vercel (<code>MONGODB_URI</code>).</p>\n</li>\n<li><p>Vai gerar automaticamente o campo <code>_id</code> em vez de <code>id</code>.</p>\n</li>\n</ul>\n<h3 id=\"23-endpoints\"><strong>2.3. Endpoints</strong></h3>\n<p>Os endpoints e a estrutura de resposta/solicitação são os mesmos da versão local, com a diferença de que agora os dados são armazenados no MongoDB.</p>\n","_postman_id":"4f7a9027-fea8-46e3-b96b-f6d678567f2b"}],"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""]}},{"listen":"test","script":{"type":"text/javascript","exec":[""]}}],"variable":[{"id":"05806922-35de-41e8-a7b7-bc2920d1c2d4","key":"id","value":"1"},{"id":"58959698-c60f-4bd1-988f-27291af7e97a","key":"base_url","value":"https://postman-rest-api-learner.glitch.me/"}]}