{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/es/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Formato de respuesta común","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-respuesta-común","__idx":0},"children":["Formato de respuesta común"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Todas las respuestas de la API MoreLogin siguen un formato JSON estándar."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"estructura-de-respuesta","__idx":1},"children":["Estructura de respuesta"]},{"$$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":"Descripción"},"children":["Descripción"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CODIGO_PH_0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CODIGO_PH_0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Código de resultado. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]}," = éxito, otros valores indican errores"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CODIGO_PH_0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cadena| nulo"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mensaje de error. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}," cuando tiene éxito"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CODIGO_PH_0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["objeto| matriz | nulo"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Carga útil de respuesta. La estructura varía según el punto final"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CODIGO_PH_0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CODIGO_PH_0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Identificador de solicitud único. Incluya esto cuando se comunique con el soporte"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"respuesta-exitosa","__idx":2},"children":["Respuesta exitosa"]},{"$$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":"respuesta-de-error","__idx":3},"children":["Respuesta de error"]},{"$$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":"respuestas-paginadas","__idx":4},"children":["Respuestas paginadas"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Los puntos finales de lista devuelven datos paginados en este 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":"Descripción"},"children":["Descripción"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CODIGO_PH_0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Número total de registros"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CODIGO_PH_0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Número de página actual"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CODIGO_PH_0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Número total de páginas"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CODIGO_PH_0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Matriz de registros para la página actual"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"códigos-de-estado-http","__idx":5},"children":["Códigos de estado 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":"Descripción"},"children":["Descripción"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CODIGO_PH_0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Solicitud procesada exitosamente (verifique el campo ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}," para ver el resultado comercial)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CODIGO_PH_0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No autorizado: token de acceso no válido o caducado"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CODIGO_PH_0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Prohibido: permisos insuficientes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CODIGO_PH_0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Demasiadas solicitudes: se superó el límite de tarifa"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CODIGO_PH_0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Error interno del servidor: póngase en contacto con el soporte técnico"]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Consejo"]},": Siempre verifique el campo ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}," en el cuerpo de la respuesta, no solo el código de estado HTTP. Un estado HTTP ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]}," con ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code: 99001"]}," significa que la solicitud se recibió pero no se pudo realizar la validación."]}]}]},"headings":[{"value":"Formato de respuesta común","id":"formato-de-respuesta-común","depth":1},{"value":"Estructura de respuesta","id":"estructura-de-respuesta","depth":2},{"value":"Respuesta exitosa","id":"respuesta-exitosa","depth":2},{"value":"Respuesta de error","id":"respuesta-de-error","depth":2},{"value":"Respuestas paginadas","id":"respuestas-paginadas","depth":2},{"value":"Códigos de estado HTTP","id":"códigos-de-estado-http","depth":2}],"frontmatter":{"seo":{"title":"Formato de respuesta común"}},"lastModified":"2026-06-10T11:47:34.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/es/api-reference/getting-started/response-format","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}