{ "info": { "_postman_id": "385c0e34-a414-4987-9f55-cf650e80f25c", "name": "Orius", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "41558252" }, "item": [ { "name": "Administrativo", "item": [ { "name": "Usuário", "item": [ { "name": "Login", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript", "packages": {} } }, { "listen": "test", "script": { "exec": [ "const response = pm.response.json();\r", "\r", "// Salvando em variáveis da *collection*\r", "pm.collectionVariables.set(\"BearerToken\", response.data.token);\r", "\r", "pm.test(\"Status code é 201 ou 200\", function () {\r", " pm.expect(pm.response.code).to.be.oneOf([200, 201]);\r", "});\r", "\r", "pm.test(\"Resposta contém ID ou confirmação\", function () {\r", " const jsonData = pm.response.json();\r", " pm.expect(jsonData).to.have.any.keys(\"id\", \"message\", \"status\");\r", "});\r", "\r", "pm.test(\"Mensagem indica sucesso\", function () {\r", " const jsonData = pm.response.json();\r", " pm.expect(jsonData.message || \"\").to.match(/sucesso|criado|registrado/i);\r", "});" ], "type": "text/javascript", "packages": {} } } ], "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{BearerToken}}", "type": "string" } ] }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"login\" : \"keven\",\r\n \"senha_api\" : \"123\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{BaseUrlV1}}administrativo/usuarios/login", "host": [ "{{BaseUrlV1}}administrativo" ], "path": [ "usuarios", "login" ] } }, "response": [] }, { "name": "All", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript", "packages": {} } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code é 201 ou 200\", function () {\r", " pm.expect(pm.response.code).to.be.oneOf([200, 201]);\r", "});\r", "\r", "pm.test(\"Resposta contém ID ou confirmação\", function () {\r", " const jsonData = pm.response.json();\r", " pm.expect(jsonData).to.have.any.keys(\"id\", \"message\", \"status\");\r", "});\r", "\r", "pm.test(\"Mensagem indica sucesso\", function () {\r", " const jsonData = pm.response.json();\r", " pm.expect(jsonData.message || \"\").to.match(/sucesso|criado|registrado/i);\r", "});" ], "type": "text/javascript", "packages": {} } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{BearerToken}}", "type": "string" } ] }, "method": "GET", "header": [], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{BaseUrlV1}}administrativo/usuarios", "host": [ "{{BaseUrlV1}}administrativo" ], "path": [ "usuarios" ] } }, "response": [] }, { "name": "Me", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript", "packages": {} } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code é 201 ou 200\", function () {\r", " pm.expect(pm.response.code).to.be.oneOf([200, 201]);\r", "});\r", "\r", "pm.test(\"Resposta contém ID ou confirmação\", function () {\r", " const jsonData = pm.response.json();\r", " pm.expect(jsonData).to.have.any.keys(\"id\", \"message\", \"status\");\r", "});\r", "\r", "pm.test(\"Mensagem indica sucesso\", function () {\r", " const jsonData = pm.response.json();\r", " pm.expect(jsonData.message || \"\").to.match(/sucesso|criado|registrado/i);\r", "});\r", "" ], "type": "text/javascript", "packages": {} } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{BearerToken}}", "type": "string" } ] }, "method": "GET", "header": [], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{BaseUrlV1}}administrativo/usuarios/me", "host": [ "{{BaseUrlV1}}administrativo" ], "path": [ "usuarios", "me" ] } }, "response": [] } ] }, { "name": "Caixa", "item": [ { "name": "All", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript", "packages": {} } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code é 201 ou 200\", function () {\r", " pm.expect(pm.response.code).to.be.oneOf([200, 201]);\r", "});\r", "\r", "pm.test(\"Resposta contém ID ou confirmação\", function () {\r", " const jsonData = pm.response.json();\r", " pm.expect(jsonData).to.have.any.keys(\"id\", \"message\", \"status\");\r", "});\r", "\r", "pm.test(\"Mensagem indica sucesso\", function () {\r", " const jsonData = pm.response.json();\r", " pm.expect(jsonData.message || \"\").to.match(/sucesso|criado|registrado/i);\r", "});\r", "" ], "type": "text/javascript", "packages": {} } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{BearerToken}}", "type": "string" } ] }, "method": "GET", "header": [], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{BaseUrlV1}}administrativo/caixa", "host": [ "{{BaseUrlV1}}administrativo" ], "path": [ "caixa" ] } }, "response": [] }, { "name": "Create", "event": [ { "listen": "prerequest", "script": { "exec": [ "\r", "" ], "type": "text/javascript", "packages": {} } }, { "listen": "test", "script": { "exec": [ "const response = pm.response.json();\r", "\r", "// Salvando em variáveis da *collection*\r", "pm.collectionVariables.set(\"caixaItemId\", response.data.caixa_item_id);\r", "\r", "pm.test(\"Status code é 201 ou 200\", function () {\r", " pm.expect(pm.response.code).to.be.oneOf([200, 201]);\r", "});\r", "\r", "pm.test(\"Resposta contém ID ou confirmação\", function () {\r", " const jsonData = pm.response.json();\r", " pm.expect(jsonData).to.have.any.keys(\"id\", \"message\", \"status\");\r", "});\r", "\r", "pm.test(\"Mensagem indica sucesso\", function () {\r", " const jsonData = pm.response.json();\r", " pm.expect(jsonData.message || \"\").to.match(/sucesso|criado|registrado/i);\r", "});\r", "" ], "type": "text/javascript", "packages": {} } } ], "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{BearerToken}}", "type": "string" } ] }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"especie_pagamento\": \"D\",\r\n \"caixa_servico_id\": 2,\r\n \"usuario_servico_id\": 123456,\r\n \"usuario_caixa_id\": 123456,\r\n \"descricao\": \"{{$randomProductName}}\",\r\n \"data_pagamento\": \"2025-07-07 00:00:00.000\", \r\n \"situacao\": \"4\",\r\n \"tipo_documento\": \"C\",\r\n \"tipo_transacao\": \"C\",\r\n \"valor_servico\": {{$randomPrice}},\r\n \"valor_pago\": {{$randomPrice}},\r\n \"observacao\": \"{{$randomJobDescriptor}}\",\r\n \"hora_pagamento\": \"12:58\",\r\n \"tipo_servico\": \"25\",\r\n \"registrado\": \"3\"\r\n}\r\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{BaseUrlV1}}administrativo/caixa", "host": [ "{{BaseUrlV1}}administrativo" ], "path": [ "caixa" ] } }, "response": [] }, { "name": "Get", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code é 201 ou 200\", function () {\r", " pm.expect(pm.response.code).to.be.oneOf([200, 201]);\r", "});\r", "\r", "pm.test(\"Resposta contém ID ou confirmação\", function () {\r", " const jsonData = pm.response.json();\r", " pm.expect(jsonData).to.have.any.keys(\"id\", \"message\", \"status\");\r", "});\r", "\r", "pm.test(\"Mensagem indica sucesso\", function () {\r", " const jsonData = pm.response.json();\r", " pm.expect(jsonData.message || \"\").to.match(/sucesso|criado|registrado/i);\r", "});\r", "" ], "type": "text/javascript", "packages": {} } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{BearerToken}}", "type": "string" } ] }, "method": "GET", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "username", "value": "keven@softwiki.com.br", "type": "text" }, { "key": "password", "value": "123", "type": "text" } ] }, "url": { "raw": "{{BaseUrlV1}}administrativo/caixa/{{caixaItemId}}", "host": [ "{{BaseUrlV1}}administrativo" ], "path": [ "caixa", "{{caixaItemId}}" ] } }, "response": [] }, { "name": "Delete", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code é 201 ou 200\", function () {\r", " pm.expect(pm.response.code).to.be.oneOf([200, 201]);\r", "});\r", "\r", "pm.test(\"Resposta contém ID ou confirmação\", function () {\r", " const jsonData = pm.response.json();\r", " pm.expect(jsonData).to.have.any.keys(\"id\", \"message\", \"status\");\r", "});\r", "\r", "pm.test(\"Mensagem indica sucesso\", function () {\r", " const jsonData = pm.response.json();\r", " pm.expect(jsonData.message || \"\").to.match(/sucesso|criado|registrado/i);\r", "});\r", "" ], "type": "text/javascript", "packages": {} } } ], "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{BearerToken}}", "type": "string" } ] }, "method": "DELETE", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "username", "value": "keven@softwiki.com.br", "type": "text" }, { "key": "password", "value": "123", "type": "text" } ] }, "url": { "raw": "{{BaseUrlV1}}administrativo/caixa/{{caixaItemId}}", "host": [ "{{BaseUrlV1}}administrativo" ], "path": [ "caixa", "{{caixaItemId}}" ] } }, "response": [] } ] } ] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "packages": {}, "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "packages": {}, "exec": [ "" ] } } ], "variable": [ { "key": "BaseUrlV1", "value": "http://127.0.0.1:8000/api/v1/", "type": "string" }, { "key": "BearerToken", "value": "", "type": "string" }, { "key": "caixaItemId", "value": "", "type": "string" } ] }