{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/pt/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Formato de resposta comum","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"formato-de-resposta-comum","__idx":0},"children":["Formato de resposta comum"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Todas as respostas da API MoreLogin seguem um formato JSON padrão."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"estrutura-de-resposta","__idx":1},"children":["Estrutura de Resposta"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"code\": 0,\n  \"msg\": null,\n  \"data\": {},\n  \"requestId\": \"unique-request-id\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Campo"},"children":["Campo"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Tipo"},"children":["Tipo"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Descrição"},"children":["Descrição"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["integer"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Código de resultado. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]}," = sucesso, outros valores indicam erros"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["msg"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string| nulo"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mensagem de erro. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}," quando bem-sucedido"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["objeto | matriz | nulo"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Carga útil de resposta. A estrutura varia de acordo com o endpoint"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["requestId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Identificador de solicitação exclusivo. Inclua isso ao entrar em contato com o suporte"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"resposta-de-sucesso","__idx":2},"children":["Resposta de sucesso"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"code\": 0,\n  \"msg\": null,\n  \"data\": {\n    \"id\": 1234567890\n  },\n  \"requestId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"resposta-de-erro","__idx":3},"children":["Resposta de erro"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"code\": 99001,\n  \"msg\": \"Invalid parameters\",\n  \"data\": null,\n  \"requestId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"respostas-paginadas","__idx":4},"children":["Respostas paginadas"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Os endpoints da lista retornam dados paginados neste formato:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"code\": 0,\n  \"msg\": null,\n  \"data\": {\n    \"total\": 100,\n    \"current\": 1,\n    \"pages\": 10,\n    \"dataList\": [\n      { ... },\n      { ... }\n    ]\n  },\n  \"requestId\": \"...\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Campo"},"children":["Campo"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Descrição"},"children":["Descrição"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["total"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Número total de registros"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["current"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Número da página atual"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pages"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Número total de páginas"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dataList"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Matriz de registros para a página atual"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"códigos-de-status-http","__idx":5},"children":["Códigos de status HTTP"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Estado"},"children":["Estado"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Descrição"},"children":["Descrição"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Solicitação processada com sucesso (verifique o campo ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}," para ver o resultado comercial)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Não autorizado – token de acesso inválido ou expirado"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Proibido – permissões insuficientes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["429"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Muitas solicitações — limite de taxa excedido"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Erro interno do servidor – entre em contato com o suporte"]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Dica"]},": sempre verifique o campo ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}," no corpo da resposta, não apenas o código de status HTTP. Um status HTTP ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]}," com ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code: 99001"]}," significa que a solicitação foi recebida, mas falhou na validação."]}]}]},"headings":[{"value":"Formato de resposta comum","id":"formato-de-resposta-comum","depth":1},{"value":"Estrutura de Resposta","id":"estrutura-de-resposta","depth":2},{"value":"Resposta de sucesso","id":"resposta-de-sucesso","depth":2},{"value":"Resposta de erro","id":"resposta-de-erro","depth":2},{"value":"Respostas paginadas","id":"respostas-paginadas","depth":2},{"value":"Códigos de status HTTP","id":"códigos-de-status-http","depth":2}],"frontmatter":{"seo":{"title":"Formato de resposta comum"}},"lastModified":"2026-06-10T11:47:34.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/pt/api-reference/getting-started/response-format","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}