{
  "openapi": "3.0.3",
  "info": {
    "title": "Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer",
    "version": "3.0.0",
    "description": "Stateless (100% LGPD compliant) ANS TISS 4.03.00 XML medical billing validator, automatic MD5 hash recalculator, and TUSS 8-digit procedure code auditor to prevent health insurance billing rejections (Glosas).\n\n### Enterprise B2B Value Proposition (Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer)\n- **Target B2B Buyers:** Hospital Revenue Cycle Management (RCM) Systems, HealthTech Insurers, and Medical Billing Platforms.\n- **Zero External API Keys Required:** Connects directly to authoritative government, regulatory, and financial primary registries with built-in retry/backoff and deterministic schema normalization.\n- **Quantitative Scoring & RAG Briefs:** Every record is enriched with a quantitative 0-100 risk/viability score and an LLM-ready Markdown executive brief (`TISS 4.03.00 XML Lot Validated & Hash Repaired`).\n- **Backend Proxy Secret Injection:** RapidAPI Studio and Zyla API Hub inject `Authorization: Bearer <APIFY_API_TOKEN>` invisibly at the proxy layer when forwarding synchronous calls to `https://api.apify.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items`.\n- **Marketplace Categories:** RapidAPI `Medical` | Zyla API Hub `Healthcare`.\n- **Subscription Tiers (USD):** `BASIC` ($0.00/mo, 15 req/mo hard cap), `PRO` ($19.00/mo, 1,000 req/mo + $0.02/extra), `ULTRA` ($49.00/mo, 5,000 req/mo + $0.015/extra), `MEGA` ($149.00/mo, 25,000 req/mo + $0.010/extra).\n- **SEO Keywords:** healthcare-billing, ans-tiss-xml, medical-claims, glosa-prevention, tuss-validator, epilogo-hash, hospital-rcm.",
    "termsOfService": "https://jesleytassili-glitch.github.io/b2b-quant-mcp-n8n-suite/",
    "contact": {
      "name": "B2B Quant APIs (@b2b-quant-apis)",
      "email": "jesleytassili@gmail.com",
      "url": "https://apify.com/b2b-quant-apis/healthcare-tiss-xml-validator"
    },
    "license": {
      "name": "Commercial B2B API Subscription (RapidAPI & Zyla Hub)",
      "url": "https://apify.com/b2b-quant-apis/healthcare-tiss-xml-validator"
    },
    "x-category": "Medical",
    "x-rapidapi-category": "Medical",
    "x-zyla-category": "Healthcare",
    "x-seo-tags": [
      "healthcare-billing",
      "ans-tiss-xml",
      "medical-claims",
      "glosa-prevention",
      "tuss-validator",
      "epilogo-hash",
      "hospital-rcm"
    ],
    "x-payout-destination": "Wise #890361113",
    "x-pricing-plans": {
      "BASIC": {
        "tier": "BASIC",
        "label": "Freemium Developer Trial",
        "monthlyPriceUsd": 0.0,
        "monthlyQuotaRequests": 15,
        "overagePricePerRequestUsd": 0.0,
        "hardLimit": true
      },
      "PRO": {
        "tier": "PRO",
        "label": "Startup & RevOps Pipeline",
        "monthlyPriceUsd": 19.0,
        "monthlyQuotaRequests": 1000,
        "overagePricePerRequestUsd": 0.02,
        "hardLimit": false
      },
      "ULTRA": {
        "tier": "ULTRA",
        "label": "Mid-Market Automation Cluster",
        "monthlyPriceUsd": 49.0,
        "monthlyQuotaRequests": 5000,
        "overagePricePerRequestUsd": 0.015,
        "hardLimit": false
      },
      "MEGA": {
        "tier": "MEGA",
        "label": "Enterprise High-Throughput SLA",
        "monthlyPriceUsd": 149.0,
        "monthlyQuotaRequests": 25000,
        "overagePricePerRequestUsd": 0.01,
        "hardLimit": false
      }
    },
    "x-code-snippets": {
      "cURL": "# Primary Synchronous Endpoint: https://healthcare-tiss-xml-validator.p.rapidapi.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items (Gateway Route: https://b2b-quant-rapidapi-gateway.jesleytassili.workers.dev/v1/healthcare-tiss-xml-validator)\ncurl --request POST \\\n  --url \"https://healthcare-tiss-xml-validator.p.rapidapi.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items\" \\\n  --header \"Content-Type: application/json\" \\\n  --header \"X-RapidAPI-Host: healthcare-tiss-xml-validator.p.rapidapi.com\" \\\n  --header \"X-RapidAPI-Key: <YOUR_RAPIDAPI_OR_ZYLA_KEY>\" \\\n  --data '{\"tissXmlPayloads\": [\"<ans:mensagemTISS xmlns:ans=\\\"http://www.ans.gov.br/padroes/tiss/schemas\\\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans:guiasTISS></ans:loteGuias></ans:prestadorParaOperadora><ans:epilogo><ans:hash>INVALID_HASH_000</ans:hash></ans:epilogo></ans:mensagemTISS>\"], \"autoFixHash\": true}'",
      "Python": "import httpx\n\n# Primary Synchronous Endpoint (Gateway Route: https://b2b-quant-rapidapi-gateway.jesleytassili.workers.dev/v1/healthcare-tiss-xml-validator)\nurl = \"https://healthcare-tiss-xml-validator.p.rapidapi.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items\"\npayload = {\n    \"tissXmlPayloads\": [\n        \"<ans:mensagemTISS xmlns:ans=\\\"http://www.ans.gov.br/padroes/tiss/schemas\\\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans:guiasTISS></ans:loteGuias></ans:prestadorParaOperadora><ans:epilogo><ans:hash>INVALID_HASH_000</ans:hash></ans:epilogo></ans:mensagemTISS>\"\n    ],\n    \"autoFixHash\": true\n}\nheaders = {\n    \"Content-Type\": \"application/json\",\n    \"X-RapidAPI-Host\": \"healthcare-tiss-xml-validator.p.rapidapi.com\",\n    \"X-RapidAPI-Key\": \"<YOUR_RAPIDAPI_OR_ZYLA_KEY>\",\n}\n\nwith httpx.Client(timeout=30.0) as client:\n    response = client.post(url, json=payload, headers=headers)\n    response.raise_for_status()\n    print(response.json())\n",
      "Node.js": "// Primary Synchronous Endpoint (Gateway Route: https://b2b-quant-rapidapi-gateway.jesleytassili.workers.dev/v1/healthcare-tiss-xml-validator)\nconst url = \"https://healthcare-tiss-xml-validator.p.rapidapi.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items\";\nconst options = {\n  method: \"POST\",\n  headers: {\n    \"Content-Type\": \"application/json\",\n    \"X-RapidAPI-Host\": \"healthcare-tiss-xml-validator.p.rapidapi.com\",\n    \"X-RapidAPI-Key\": \"<YOUR_RAPIDAPI_OR_ZYLA_KEY>\"\n  },\n  body: JSON.stringify({\"tissXmlPayloads\": [\"<ans:mensagemTISS xmlns:ans=\\\"http://www.ans.gov.br/padroes/tiss/schemas\\\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans:guiasTISS></ans:loteGuias></ans:prestadorParaOperadora><ans:epilogo><ans:hash>INVALID_HASH_000</ans:hash></ans:epilogo></ans:mensagemTISS>\"], \"autoFixHash\": true})\n};\n\nconst response = await fetch(url, options);\nconst data = await response.json();\nconsole.log(data);\n"
    },
    "x-primary-backend-url": "https://api.apify.com",
    "x-primary-backend-base-url": "https://api.apify.com",
    "x-apify-sync-endpoint": "https://api.apify.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items",
    "x-apify-health-endpoint": "https://api.apify.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator",
    "x-backend-secret-header": {
      "name": "Authorization",
      "valueTemplate": "Bearer <APIFY_API_TOKEN>",
      "headerName": "Authorization",
      "headerValueTemplate": "Bearer <APIFY_API_TOKEN>",
      "injectedByProxy": true,
      "hiddenFromSubscriber": true,
      "description": "Secret Header injected invisibly by RapidAPI Studio and Zyla API Hub proxy when calling https://api.apify.com."
    },
    "x-openapi-spec-url": "https://jesleytassili-glitch.github.io/specs_openapi_31/healthcare-tiss-xml-validator.json",
    "x-openapi-suite-spec-url": "https://jesleytassili-glitch.github.io/b2b-quant-mcp-n8n-suite/specs_openapi_31/healthcare-tiss-xml-validator.json",
    "x-apis-json-url": "https://jesleytassili-glitch.github.io/apis.json",
    "x-github-release-tag": "v2.2.0"
  },
  "externalDocs": {
    "description": "Official B2B Documentation & Schema Reference for Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer",
    "url": "https://jesleytassili-glitch.github.io/b2b-quant-mcp-n8n-suite/actors/healthcare-tiss-xml-validator.html"
  },
  "servers": [
    {
      "url": "https://api.apify.com",
      "description": "Primary Apify Cloud Synchronous Execution Cluster (Real HTTP 200/201 POST & GET)"
    },
    {
      "url": "https://api.apify.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items",
      "description": "Direct Apify Actor Synchronous Execution Endpoint (healthcare-tiss-xml-validator)"
    },
    {
      "url": "https://b2b-quant-rapidapi-gateway.jesleytassili.workers.dev",
      "description": "Anti-Bypass Stateless B2B Gateway (RapidAPI & Zyla Hub Proxy)"
    }
  ],
  "tags": [
    {
      "name": "Medical",
      "description": "RapidAPI Hub primary category: Medical (Zyla Hub: Healthcare)"
    },
    {
      "name": "healthcare-billing",
      "description": "B2B SEO Search Tag: healthcare-billing"
    },
    {
      "name": "ans-tiss-xml",
      "description": "B2B SEO Search Tag: ans-tiss-xml"
    },
    {
      "name": "medical-claims",
      "description": "B2B SEO Search Tag: medical-claims"
    },
    {
      "name": "glosa-prevention",
      "description": "B2B SEO Search Tag: glosa-prevention"
    },
    {
      "name": "tuss-validator",
      "description": "B2B SEO Search Tag: tuss-validator"
    },
    {
      "name": "epilogo-hash",
      "description": "B2B SEO Search Tag: epilogo-hash"
    },
    {
      "name": "hospital-rcm",
      "description": "B2B SEO Search Tag: hospital-rcm"
    }
  ],
  "security": [
    {
      "ApifyCloudBearerAuth": []
    },
    {
      "RapidAPIProxySecret": []
    },
    {
      "ZylaProxySecret": []
    },
    {
      "RapidAPISubscriberKey": []
    }
  ],
  "paths": {
    "/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run_sync_healthcare_tiss_xml_validator",
        "summary": "Execute Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer (Apify Cloud Synchronous POST)",
        "description": "Synchronous stateless execution of **Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer**. RapidAPI Studio and Zyla API Hub inject the backend secret header `Authorization: Bearer <APIFY_API_TOKEN>` invisibly to the end user, validate `X-RapidAPI-Proxy-Secret` / `X-Zyla-Proxy-Secret` in constant time (`hmac.compare_digest`), inject quota headers (`X-RateLimit-Remaining`, `X-Engine-Version`), and return deterministic JSON records.",
        "tags": [
          "Medical",
          "healthcare-billing",
          "ans-tiss-xml",
          "medical-claims",
          "glosa-prevention",
          "tuss-validator"
        ],
        "x-codeSamples": [
          {
            "lang": "cURL",
            "label": "cURL",
            "source": "# Primary Synchronous Endpoint: https://healthcare-tiss-xml-validator.p.rapidapi.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items (Gateway Route: https://b2b-quant-rapidapi-gateway.jesleytassili.workers.dev/v1/healthcare-tiss-xml-validator)\ncurl --request POST \\\n  --url \"https://healthcare-tiss-xml-validator.p.rapidapi.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items\" \\\n  --header \"Content-Type: application/json\" \\\n  --header \"X-RapidAPI-Host: healthcare-tiss-xml-validator.p.rapidapi.com\" \\\n  --header \"X-RapidAPI-Key: <YOUR_RAPIDAPI_OR_ZYLA_KEY>\" \\\n  --data '{\"tissXmlPayloads\": [\"<ans:mensagemTISS xmlns:ans=\\\"http://www.ans.gov.br/padroes/tiss/schemas\\\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans:guiasTISS></ans:loteGuias></ans:prestadorParaOperadora><ans:epilogo><ans:hash>INVALID_HASH_000</ans:hash></ans:epilogo></ans:mensagemTISS>\"], \"autoFixHash\": true}'"
          },
          {
            "lang": "Python",
            "label": "Python (httpx)",
            "source": "import httpx\n\n# Primary Synchronous Endpoint (Gateway Route: https://b2b-quant-rapidapi-gateway.jesleytassili.workers.dev/v1/healthcare-tiss-xml-validator)\nurl = \"https://healthcare-tiss-xml-validator.p.rapidapi.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items\"\npayload = {\n    \"tissXmlPayloads\": [\n        \"<ans:mensagemTISS xmlns:ans=\\\"http://www.ans.gov.br/padroes/tiss/schemas\\\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans:guiasTISS></ans:loteGuias></ans:prestadorParaOperadora><ans:epilogo><ans:hash>INVALID_HASH_000</ans:hash></ans:epilogo></ans:mensagemTISS>\"\n    ],\n    \"autoFixHash\": true\n}\nheaders = {\n    \"Content-Type\": \"application/json\",\n    \"X-RapidAPI-Host\": \"healthcare-tiss-xml-validator.p.rapidapi.com\",\n    \"X-RapidAPI-Key\": \"<YOUR_RAPIDAPI_OR_ZYLA_KEY>\",\n}\n\nwith httpx.Client(timeout=30.0) as client:\n    response = client.post(url, json=payload, headers=headers)\n    response.raise_for_status()\n    print(response.json())\n"
          },
          {
            "lang": "Node.js",
            "label": "Node.js (fetch)",
            "source": "// Primary Synchronous Endpoint (Gateway Route: https://b2b-quant-rapidapi-gateway.jesleytassili.workers.dev/v1/healthcare-tiss-xml-validator)\nconst url = \"https://healthcare-tiss-xml-validator.p.rapidapi.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items\";\nconst options = {\n  method: \"POST\",\n  headers: {\n    \"Content-Type\": \"application/json\",\n    \"X-RapidAPI-Host\": \"healthcare-tiss-xml-validator.p.rapidapi.com\",\n    \"X-RapidAPI-Key\": \"<YOUR_RAPIDAPI_OR_ZYLA_KEY>\"\n  },\n  body: JSON.stringify({\"tissXmlPayloads\": [\"<ans:mensagemTISS xmlns:ans=\\\"http://www.ans.gov.br/padroes/tiss/schemas\\\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans:guiasTISS></ans:loteGuias></ans:prestadorParaOperadora><ans:epilogo><ans:hash>INVALID_HASH_000</ans:hash></ans:epilogo></ans:mensagemTISS>\"], \"autoFixHash\": true})\n};\n\nconst response = await fetch(url, options);\nconst data = await response.json();\nconsole.log(data);\n"
          }
        ],
        "x-snippets": {
          "cURL": "# Primary Synchronous Endpoint: https://healthcare-tiss-xml-validator.p.rapidapi.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items (Gateway Route: https://b2b-quant-rapidapi-gateway.jesleytassili.workers.dev/v1/healthcare-tiss-xml-validator)\ncurl --request POST \\\n  --url \"https://healthcare-tiss-xml-validator.p.rapidapi.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items\" \\\n  --header \"Content-Type: application/json\" \\\n  --header \"X-RapidAPI-Host: healthcare-tiss-xml-validator.p.rapidapi.com\" \\\n  --header \"X-RapidAPI-Key: <YOUR_RAPIDAPI_OR_ZYLA_KEY>\" \\\n  --data '{\"tissXmlPayloads\": [\"<ans:mensagemTISS xmlns:ans=\\\"http://www.ans.gov.br/padroes/tiss/schemas\\\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans:guiasTISS></ans:loteGuias></ans:prestadorParaOperadora><ans:epilogo><ans:hash>INVALID_HASH_000</ans:hash></ans:epilogo></ans:mensagemTISS>\"], \"autoFixHash\": true}'",
          "Python": "import httpx\n\n# Primary Synchronous Endpoint (Gateway Route: https://b2b-quant-rapidapi-gateway.jesleytassili.workers.dev/v1/healthcare-tiss-xml-validator)\nurl = \"https://healthcare-tiss-xml-validator.p.rapidapi.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items\"\npayload = {\n    \"tissXmlPayloads\": [\n        \"<ans:mensagemTISS xmlns:ans=\\\"http://www.ans.gov.br/padroes/tiss/schemas\\\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans:guiasTISS></ans:loteGuias></ans:prestadorParaOperadora><ans:epilogo><ans:hash>INVALID_HASH_000</ans:hash></ans:epilogo></ans:mensagemTISS>\"\n    ],\n    \"autoFixHash\": true\n}\nheaders = {\n    \"Content-Type\": \"application/json\",\n    \"X-RapidAPI-Host\": \"healthcare-tiss-xml-validator.p.rapidapi.com\",\n    \"X-RapidAPI-Key\": \"<YOUR_RAPIDAPI_OR_ZYLA_KEY>\",\n}\n\nwith httpx.Client(timeout=30.0) as client:\n    response = client.post(url, json=payload, headers=headers)\n    response.raise_for_status()\n    print(response.json())\n",
          "Node.js": "// Primary Synchronous Endpoint (Gateway Route: https://b2b-quant-rapidapi-gateway.jesleytassili.workers.dev/v1/healthcare-tiss-xml-validator)\nconst url = \"https://healthcare-tiss-xml-validator.p.rapidapi.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items\";\nconst options = {\n  method: \"POST\",\n  headers: {\n    \"Content-Type\": \"application/json\",\n    \"X-RapidAPI-Host\": \"healthcare-tiss-xml-validator.p.rapidapi.com\",\n    \"X-RapidAPI-Key\": \"<YOUR_RAPIDAPI_OR_ZYLA_KEY>\"\n  },\n  body: JSON.stringify({\"tissXmlPayloads\": [\"<ans:mensagemTISS xmlns:ans=\\\"http://www.ans.gov.br/padroes/tiss/schemas\\\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans:guiasTISS></ans:loteGuias></ans:prestadorParaOperadora><ans:epilogo><ans:hash>INVALID_HASH_000</ans:hash></ans:epilogo></ans:mensagemTISS>\"], \"autoFixHash\": true})\n};\n\nconst response = await fetch(url, options);\nconst data = await response.json();\nconsole.log(data);\n"
        },
        "x-backend-secret-header": {
          "name": "Authorization",
          "value": "Bearer <APIFY_API_TOKEN>",
          "visibleToSubscriber": false
        },
        "requestBody": {
          "required": true,
          "description": "Structured JSON parameters for `healthcare-tiss-xml-validator`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HealthcareTissXmlValidatorRequest"
              },
              "example": {
                "tissXmlPayloads": [
                  "<ans:mensagemTISS xmlns:ans=\"http://www.ans.gov.br/padroes/tiss/schemas\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans:guiasTISS></ans:loteGuias></ans:prestadorParaOperadora><ans:epilogo><ans:hash>INVALID_HASH_000</ans:hash></ans:epilogo></ans:mensagemTISS>"
                ],
                "autoFixHash": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful synchronous execution of `healthcare-tiss-xml-validator` returning enriched B2B JSON records.",
            "headers": {
              "X-RateLimit-Remaining": {
                "description": "Remaining requests in the subscriber's monthly plan quota (BASIC=15, PRO=1000, ULTRA=5000, MEGA=25000).",
                "schema": {
                  "type": "integer",
                  "example": 999
                }
              },
              "X-Engine-Version": {
                "description": "Deterministic B2B engine release version.",
                "schema": {
                  "type": "string",
                  "example": "3.0.0"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthcareTissXmlValidatorResponseEnvelope"
                },
                "example": {
                  "status": "succeeded",
                  "actor": "healthcare-tiss-xml-validator",
                  "engineVersion": "3.0.0",
                  "count": 1,
                  "data": [
                    {
                      "loteNumero": "202610",
                      "registroANS": "326305",
                      "tissVersion": "4.03.00",
                      "guiasCount": 1,
                      "valorTotalLoteBRL": 180.0,
                      "statusConformidade": "CORRIGIDO_PRONTO_ENVIO",
                      "originalHash": "INVALID_HASH_000",
                      "calculatedAnsMd5Hash": "9aaabf2776dab3e0da33d63354db4298",
                      "hashWasRepaired": true,
                      "errorsFoundCount": 1,
                      "glosaRiskAlerts": [
                        "REJEIÇÃO DE LOTE (Hash MD5 Inválido): O XML contém <hash>INVALID_HASH_000</hash>, mas o cálculo oficial ANS dos dados é '9aaabf2776dab3e0da33d63354db4298'."
                      ],
                      "warnings": [
                        "Auto-Fix Aplicado: Tag <hash> atualizada automaticamente para '9aaabf2776dab3e0da33d63354db4298'."
                      ],
                      "proceduresAudited": [
                        {
                          "guia": "G-001",
                          "codigoTUSS": "10101012",
                          "descricaoReferencia": "Consulta em consultório (no horário normal ou preestabelecido)",
                          "valorBRL": 180.0,
                          "valido8Digitos": true
                        }
                      ],
                      "lgpdCompliance": "STATELESS_RAM_ONLY (Zero Patient PII Persisted)",
                      "repairedXml": "<ans:mensagemTISS xmlns:ans=\"http://www.ans.gov.br/padroes/tiss/schemas\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans..."
                    }
                  ]
                }
              }
            }
          },
          "201": {
            "description": "Synchronous dataset created and returned for `healthcare-tiss-xml-validator` on Apify Cloud (`HTTP 201`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthcareTissXmlValidatorResponseEnvelope"
                },
                "example": {
                  "status": "succeeded",
                  "actor": "healthcare-tiss-xml-validator",
                  "engineVersion": "3.0.0",
                  "count": 1,
                  "data": [
                    {
                      "loteNumero": "202610",
                      "registroANS": "326305",
                      "tissVersion": "4.03.00",
                      "guiasCount": 1,
                      "valorTotalLoteBRL": 180.0,
                      "statusConformidade": "CORRIGIDO_PRONTO_ENVIO",
                      "originalHash": "INVALID_HASH_000",
                      "calculatedAnsMd5Hash": "9aaabf2776dab3e0da33d63354db4298",
                      "hashWasRepaired": true,
                      "errorsFoundCount": 1,
                      "glosaRiskAlerts": [
                        "REJEIÇÃO DE LOTE (Hash MD5 Inválido): O XML contém <hash>INVALID_HASH_000</hash>, mas o cálculo oficial ANS dos dados é '9aaabf2776dab3e0da33d63354db4298'."
                      ],
                      "warnings": [
                        "Auto-Fix Aplicado: Tag <hash> atualizada automaticamente para '9aaabf2776dab3e0da33d63354db4298'."
                      ],
                      "proceduresAudited": [
                        {
                          "guia": "G-001",
                          "codigoTUSS": "10101012",
                          "descricaoReferencia": "Consulta em consultório (no horário normal ou preestabelecido)",
                          "valorBRL": 180.0,
                          "valido8Digitos": true
                        }
                      ],
                      "lgpdCompliance": "STATELESS_RAM_ONLY (Zero Patient PII Persisted)",
                      "repairedXml": "<ans:mensagemTISS xmlns:ans=\"http://www.ans.gov.br/padroes/tiss/schemas\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans..."
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Invalid JSON payload or schema validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": "error",
                  "code": 400,
                  "message": "Invalid JSON request body."
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — Missing or invalid `X-RapidAPI-Proxy-Secret` / `X-Zyla-Proxy-Secret` header (Anti-Bypass Protection).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": "forbidden",
                  "code": 403,
                  "message": "Direct access denied. Requests must originate from RapidAPI Hub or Zyla API Hub with a valid Proxy-Secret."
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — Monthly plan quota exceeded (e.g., BASIC Freemium 15 req/month hard limit).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": "quota_exceeded",
                  "code": 429,
                  "message": "Monthly request quota exceeded for BASIC plan (15 req/month hard limit). Upgrade to PRO ($19/mo), ULTRA ($49/mo), or MEGA ($149/mo)."
                }
              }
            }
          }
        }
      }
    },
    "/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator": {
      "get": {
        "operationId": "status_healthcare_tiss_xml_validator",
        "summary": "Actor Metadata & Live Connectivity Check for Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer",
        "description": "Immediate `HTTP 200` status and metadata health check for `healthcare-tiss-xml-validator` on RapidAPI Studio and Zyla API Hub (`GET https://api.apify.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator` and `GET /v1/healthcare-tiss-xml-validator/health`) without starting a container build or run.",
        "tags": [
          "Medical"
        ],
        "responses": {
          "200": {
            "description": "Engine online and ready (`HTTP 200 JSON`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "ok"
                    },
                    "actor": {
                      "type": "string",
                      "example": "healthcare-tiss-xml-validator"
                    },
                    "engineVersion": {
                      "type": "string",
                      "example": "3.0.0"
                    },
                    "category": {
                      "type": "string",
                      "example": "Medical"
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "example": {
                        "name": "healthcare-tiss-xml-validator",
                        "username": "b2b-quant-apis",
                        "isPublic": true
                      }
                    }
                  }
                },
                "example": {
                  "status": "ok",
                  "actor": "healthcare-tiss-xml-validator",
                  "engineVersion": "3.0.0",
                  "category": "Medical",
                  "data": {
                    "name": "healthcare-tiss-xml-validator",
                    "username": "b2b-quant-apis",
                    "isPublic": true
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/healthcare-tiss-xml-validator": {
      "post": {
        "operationId": "execute_healthcare_tiss_xml_validator",
        "summary": "Execute Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer",
        "description": "Synchronous stateless execution of **Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer**. RapidAPI Studio and Zyla API Hub inject the backend secret header `Authorization: Bearer <APIFY_API_TOKEN>` invisibly to the end user, validate `X-RapidAPI-Proxy-Secret` / `X-Zyla-Proxy-Secret` in constant time (`hmac.compare_digest`), inject quota headers (`X-RateLimit-Remaining`, `X-Engine-Version`), and return deterministic JSON records.",
        "tags": [
          "Medical",
          "healthcare-billing",
          "ans-tiss-xml",
          "medical-claims",
          "glosa-prevention",
          "tuss-validator"
        ],
        "x-codeSamples": [
          {
            "lang": "cURL",
            "label": "cURL",
            "source": "# Primary Synchronous Endpoint: https://healthcare-tiss-xml-validator.p.rapidapi.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items (Gateway Route: https://b2b-quant-rapidapi-gateway.jesleytassili.workers.dev/v1/healthcare-tiss-xml-validator)\ncurl --request POST \\\n  --url \"https://healthcare-tiss-xml-validator.p.rapidapi.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items\" \\\n  --header \"Content-Type: application/json\" \\\n  --header \"X-RapidAPI-Host: healthcare-tiss-xml-validator.p.rapidapi.com\" \\\n  --header \"X-RapidAPI-Key: <YOUR_RAPIDAPI_OR_ZYLA_KEY>\" \\\n  --data '{\"tissXmlPayloads\": [\"<ans:mensagemTISS xmlns:ans=\\\"http://www.ans.gov.br/padroes/tiss/schemas\\\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans:guiasTISS></ans:loteGuias></ans:prestadorParaOperadora><ans:epilogo><ans:hash>INVALID_HASH_000</ans:hash></ans:epilogo></ans:mensagemTISS>\"], \"autoFixHash\": true}'"
          },
          {
            "lang": "Python",
            "label": "Python (httpx)",
            "source": "import httpx\n\n# Primary Synchronous Endpoint (Gateway Route: https://b2b-quant-rapidapi-gateway.jesleytassili.workers.dev/v1/healthcare-tiss-xml-validator)\nurl = \"https://healthcare-tiss-xml-validator.p.rapidapi.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items\"\npayload = {\n    \"tissXmlPayloads\": [\n        \"<ans:mensagemTISS xmlns:ans=\\\"http://www.ans.gov.br/padroes/tiss/schemas\\\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans:guiasTISS></ans:loteGuias></ans:prestadorParaOperadora><ans:epilogo><ans:hash>INVALID_HASH_000</ans:hash></ans:epilogo></ans:mensagemTISS>\"\n    ],\n    \"autoFixHash\": true\n}\nheaders = {\n    \"Content-Type\": \"application/json\",\n    \"X-RapidAPI-Host\": \"healthcare-tiss-xml-validator.p.rapidapi.com\",\n    \"X-RapidAPI-Key\": \"<YOUR_RAPIDAPI_OR_ZYLA_KEY>\",\n}\n\nwith httpx.Client(timeout=30.0) as client:\n    response = client.post(url, json=payload, headers=headers)\n    response.raise_for_status()\n    print(response.json())\n"
          },
          {
            "lang": "Node.js",
            "label": "Node.js (fetch)",
            "source": "// Primary Synchronous Endpoint (Gateway Route: https://b2b-quant-rapidapi-gateway.jesleytassili.workers.dev/v1/healthcare-tiss-xml-validator)\nconst url = \"https://healthcare-tiss-xml-validator.p.rapidapi.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items\";\nconst options = {\n  method: \"POST\",\n  headers: {\n    \"Content-Type\": \"application/json\",\n    \"X-RapidAPI-Host\": \"healthcare-tiss-xml-validator.p.rapidapi.com\",\n    \"X-RapidAPI-Key\": \"<YOUR_RAPIDAPI_OR_ZYLA_KEY>\"\n  },\n  body: JSON.stringify({\"tissXmlPayloads\": [\"<ans:mensagemTISS xmlns:ans=\\\"http://www.ans.gov.br/padroes/tiss/schemas\\\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans:guiasTISS></ans:loteGuias></ans:prestadorParaOperadora><ans:epilogo><ans:hash>INVALID_HASH_000</ans:hash></ans:epilogo></ans:mensagemTISS>\"], \"autoFixHash\": true})\n};\n\nconst response = await fetch(url, options);\nconst data = await response.json();\nconsole.log(data);\n"
          }
        ],
        "x-snippets": {
          "cURL": "# Primary Synchronous Endpoint: https://healthcare-tiss-xml-validator.p.rapidapi.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items (Gateway Route: https://b2b-quant-rapidapi-gateway.jesleytassili.workers.dev/v1/healthcare-tiss-xml-validator)\ncurl --request POST \\\n  --url \"https://healthcare-tiss-xml-validator.p.rapidapi.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items\" \\\n  --header \"Content-Type: application/json\" \\\n  --header \"X-RapidAPI-Host: healthcare-tiss-xml-validator.p.rapidapi.com\" \\\n  --header \"X-RapidAPI-Key: <YOUR_RAPIDAPI_OR_ZYLA_KEY>\" \\\n  --data '{\"tissXmlPayloads\": [\"<ans:mensagemTISS xmlns:ans=\\\"http://www.ans.gov.br/padroes/tiss/schemas\\\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans:guiasTISS></ans:loteGuias></ans:prestadorParaOperadora><ans:epilogo><ans:hash>INVALID_HASH_000</ans:hash></ans:epilogo></ans:mensagemTISS>\"], \"autoFixHash\": true}'",
          "Python": "import httpx\n\n# Primary Synchronous Endpoint (Gateway Route: https://b2b-quant-rapidapi-gateway.jesleytassili.workers.dev/v1/healthcare-tiss-xml-validator)\nurl = \"https://healthcare-tiss-xml-validator.p.rapidapi.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items\"\npayload = {\n    \"tissXmlPayloads\": [\n        \"<ans:mensagemTISS xmlns:ans=\\\"http://www.ans.gov.br/padroes/tiss/schemas\\\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans:guiasTISS></ans:loteGuias></ans:prestadorParaOperadora><ans:epilogo><ans:hash>INVALID_HASH_000</ans:hash></ans:epilogo></ans:mensagemTISS>\"\n    ],\n    \"autoFixHash\": true\n}\nheaders = {\n    \"Content-Type\": \"application/json\",\n    \"X-RapidAPI-Host\": \"healthcare-tiss-xml-validator.p.rapidapi.com\",\n    \"X-RapidAPI-Key\": \"<YOUR_RAPIDAPI_OR_ZYLA_KEY>\",\n}\n\nwith httpx.Client(timeout=30.0) as client:\n    response = client.post(url, json=payload, headers=headers)\n    response.raise_for_status()\n    print(response.json())\n",
          "Node.js": "// Primary Synchronous Endpoint (Gateway Route: https://b2b-quant-rapidapi-gateway.jesleytassili.workers.dev/v1/healthcare-tiss-xml-validator)\nconst url = \"https://healthcare-tiss-xml-validator.p.rapidapi.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator/run-sync-get-dataset-items\";\nconst options = {\n  method: \"POST\",\n  headers: {\n    \"Content-Type\": \"application/json\",\n    \"X-RapidAPI-Host\": \"healthcare-tiss-xml-validator.p.rapidapi.com\",\n    \"X-RapidAPI-Key\": \"<YOUR_RAPIDAPI_OR_ZYLA_KEY>\"\n  },\n  body: JSON.stringify({\"tissXmlPayloads\": [\"<ans:mensagemTISS xmlns:ans=\\\"http://www.ans.gov.br/padroes/tiss/schemas\\\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans:guiasTISS></ans:loteGuias></ans:prestadorParaOperadora><ans:epilogo><ans:hash>INVALID_HASH_000</ans:hash></ans:epilogo></ans:mensagemTISS>\"], \"autoFixHash\": true})\n};\n\nconst response = await fetch(url, options);\nconst data = await response.json();\nconsole.log(data);\n"
        },
        "x-backend-secret-header": {
          "name": "Authorization",
          "value": "Bearer <APIFY_API_TOKEN>",
          "visibleToSubscriber": false
        },
        "requestBody": {
          "required": true,
          "description": "Structured JSON parameters for `healthcare-tiss-xml-validator`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HealthcareTissXmlValidatorRequest"
              },
              "example": {
                "tissXmlPayloads": [
                  "<ans:mensagemTISS xmlns:ans=\"http://www.ans.gov.br/padroes/tiss/schemas\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans:guiasTISS></ans:loteGuias></ans:prestadorParaOperadora><ans:epilogo><ans:hash>INVALID_HASH_000</ans:hash></ans:epilogo></ans:mensagemTISS>"
                ],
                "autoFixHash": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful synchronous execution of `healthcare-tiss-xml-validator` returning enriched B2B JSON records.",
            "headers": {
              "X-RateLimit-Remaining": {
                "description": "Remaining requests in the subscriber's monthly plan quota (BASIC=15, PRO=1000, ULTRA=5000, MEGA=25000).",
                "schema": {
                  "type": "integer",
                  "example": 999
                }
              },
              "X-Engine-Version": {
                "description": "Deterministic B2B engine release version.",
                "schema": {
                  "type": "string",
                  "example": "3.0.0"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthcareTissXmlValidatorResponseEnvelope"
                },
                "example": {
                  "status": "succeeded",
                  "actor": "healthcare-tiss-xml-validator",
                  "engineVersion": "3.0.0",
                  "count": 1,
                  "data": [
                    {
                      "loteNumero": "202610",
                      "registroANS": "326305",
                      "tissVersion": "4.03.00",
                      "guiasCount": 1,
                      "valorTotalLoteBRL": 180.0,
                      "statusConformidade": "CORRIGIDO_PRONTO_ENVIO",
                      "originalHash": "INVALID_HASH_000",
                      "calculatedAnsMd5Hash": "9aaabf2776dab3e0da33d63354db4298",
                      "hashWasRepaired": true,
                      "errorsFoundCount": 1,
                      "glosaRiskAlerts": [
                        "REJEIÇÃO DE LOTE (Hash MD5 Inválido): O XML contém <hash>INVALID_HASH_000</hash>, mas o cálculo oficial ANS dos dados é '9aaabf2776dab3e0da33d63354db4298'."
                      ],
                      "warnings": [
                        "Auto-Fix Aplicado: Tag <hash> atualizada automaticamente para '9aaabf2776dab3e0da33d63354db4298'."
                      ],
                      "proceduresAudited": [
                        {
                          "guia": "G-001",
                          "codigoTUSS": "10101012",
                          "descricaoReferencia": "Consulta em consultório (no horário normal ou preestabelecido)",
                          "valorBRL": 180.0,
                          "valido8Digitos": true
                        }
                      ],
                      "lgpdCompliance": "STATELESS_RAM_ONLY (Zero Patient PII Persisted)",
                      "repairedXml": "<ans:mensagemTISS xmlns:ans=\"http://www.ans.gov.br/padroes/tiss/schemas\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans..."
                    }
                  ]
                }
              }
            }
          },
          "201": {
            "description": "Synchronous dataset created and returned for `healthcare-tiss-xml-validator` on Apify Cloud (`HTTP 201`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthcareTissXmlValidatorResponseEnvelope"
                },
                "example": {
                  "status": "succeeded",
                  "actor": "healthcare-tiss-xml-validator",
                  "engineVersion": "3.0.0",
                  "count": 1,
                  "data": [
                    {
                      "loteNumero": "202610",
                      "registroANS": "326305",
                      "tissVersion": "4.03.00",
                      "guiasCount": 1,
                      "valorTotalLoteBRL": 180.0,
                      "statusConformidade": "CORRIGIDO_PRONTO_ENVIO",
                      "originalHash": "INVALID_HASH_000",
                      "calculatedAnsMd5Hash": "9aaabf2776dab3e0da33d63354db4298",
                      "hashWasRepaired": true,
                      "errorsFoundCount": 1,
                      "glosaRiskAlerts": [
                        "REJEIÇÃO DE LOTE (Hash MD5 Inválido): O XML contém <hash>INVALID_HASH_000</hash>, mas o cálculo oficial ANS dos dados é '9aaabf2776dab3e0da33d63354db4298'."
                      ],
                      "warnings": [
                        "Auto-Fix Aplicado: Tag <hash> atualizada automaticamente para '9aaabf2776dab3e0da33d63354db4298'."
                      ],
                      "proceduresAudited": [
                        {
                          "guia": "G-001",
                          "codigoTUSS": "10101012",
                          "descricaoReferencia": "Consulta em consultório (no horário normal ou preestabelecido)",
                          "valorBRL": 180.0,
                          "valido8Digitos": true
                        }
                      ],
                      "lgpdCompliance": "STATELESS_RAM_ONLY (Zero Patient PII Persisted)",
                      "repairedXml": "<ans:mensagemTISS xmlns:ans=\"http://www.ans.gov.br/padroes/tiss/schemas\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans..."
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Invalid JSON payload or schema validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": "error",
                  "code": 400,
                  "message": "Invalid JSON request body."
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — Missing or invalid `X-RapidAPI-Proxy-Secret` / `X-Zyla-Proxy-Secret` header (Anti-Bypass Protection).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": "forbidden",
                  "code": 403,
                  "message": "Direct access denied. Requests must originate from RapidAPI Hub or Zyla API Hub with a valid Proxy-Secret."
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — Monthly plan quota exceeded (e.g., BASIC Freemium 15 req/month hard limit).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": "quota_exceeded",
                  "code": 429,
                  "message": "Monthly request quota exceeded for BASIC plan (15 req/month hard limit). Upgrade to PRO ($19/mo), ULTRA ($49/mo), or MEGA ($149/mo)."
                }
              }
            }
          }
        }
      }
    },
    "/v1/healthcare-tiss-xml-validator/health": {
      "get": {
        "operationId": "health_healthcare_tiss_xml_validator",
        "summary": "Health & SLA Check for Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer",
        "description": "Immediate `HTTP 200` status and metadata health check for `healthcare-tiss-xml-validator` on RapidAPI Studio and Zyla API Hub (`GET https://api.apify.com/v2/acts/b2b-quant-apis~healthcare-tiss-xml-validator` and `GET /v1/healthcare-tiss-xml-validator/health`) without starting a container build or run.",
        "tags": [
          "Medical"
        ],
        "responses": {
          "200": {
            "description": "Engine online and ready (`HTTP 200 JSON`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "ok"
                    },
                    "actor": {
                      "type": "string",
                      "example": "healthcare-tiss-xml-validator"
                    },
                    "engineVersion": {
                      "type": "string",
                      "example": "3.0.0"
                    },
                    "category": {
                      "type": "string",
                      "example": "Medical"
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "example": {
                        "name": "healthcare-tiss-xml-validator",
                        "username": "b2b-quant-apis",
                        "isPublic": true
                      }
                    }
                  }
                },
                "example": {
                  "status": "ok",
                  "actor": "healthcare-tiss-xml-validator",
                  "engineVersion": "3.0.0",
                  "category": "Medical",
                  "data": {
                    "name": "healthcare-tiss-xml-validator",
                    "username": "b2b-quant-apis",
                    "isPublic": true
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApifyCloudBearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "APIFY_API_TOKEN",
        "description": "Backend Secret Header (`Authorization: Bearer <APIFY_API_TOKEN>`) injected invisibly by RapidAPI Studio and Zyla API Hub proxy when calling https://api.apify.com."
      },
      "RapidAPIProxySecret": {
        "type": "apiKey",
        "in": "header",
        "name": "X-RapidAPI-Proxy-Secret",
        "description": "RapidAPI Hub shared proxy secret verified in constant time via hmac.compare_digest."
      },
      "ZylaProxySecret": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Zyla-Proxy-Secret",
        "description": "Zyla API Hub shared proxy secret verified in constant time via hmac.compare_digest."
      },
      "RapidAPISubscriberKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-RapidAPI-Key",
        "description": "Subscriber API Key injected by RapidAPI Hub or Zyla API Hub."
      }
    },
    "schemas": {
      "HealthcareTissXmlValidatorRequest": {
        "type": "object",
        "title": "Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer Request Schema",
        "description": "Input parameters for Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer.",
        "properties": {
          "tissXmlPayloads": {
            "type": "array",
            "title": "TISS XML Batch Payloads (Raw XML Strings)",
            "description": "List of ANS TISS XML strings to validate structure, check 8-digit TUSS codes, and recalculate the mandatory <epilogo><hash> MD5 checksum.",
            "items": {
              "type": "string"
            },
            "default": [
              "<ans:mensagemTISS xmlns:ans=\"http://www.ans.gov.br/padroes/tiss/schemas\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans:guiasTISS></ans:loteGuias></ans:prestadorParaOperadora><ans:epilogo><ans:hash>INVALID_HASH_000</ans:hash></ans:epilogo></ans:mensagemTISS>"
            ],
            "example": [
              "<ans:mensagemTISS xmlns:ans=\"http://www.ans.gov.br/padroes/tiss/schemas\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans:guiasTISS></ans:loteGuias></ans:prestadorParaOperadora><ans:epilogo><ans:hash>INVALID_HASH_000</ans:hash></ans:epilogo></ans:mensagemTISS>"
            ]
          },
          "autoFixHash": {
            "type": "boolean",
            "title": "Auto-Recalculate and Repair ANS MD5 Hash",
            "description": "If true, recalculates the official ANS TISS MD5 hash over the XML body content and outputs the repaired XML ready for health insurer upload.",
            "default": true,
            "example": true
          }
        },
        "example": {
          "tissXmlPayloads": [
            "<ans:mensagemTISS xmlns:ans=\"http://www.ans.gov.br/padroes/tiss/schemas\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans:guiasTISS></ans:loteGuias></ans:prestadorParaOperadora><ans:epilogo><ans:hash>INVALID_HASH_000</ans:hash></ans:epilogo></ans:mensagemTISS>"
          ],
          "autoFixHash": true
        }
      },
      "HealthcareTissXmlValidatorRecord": {
        "type": "object",
        "title": "Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer Output Record",
        "description": "Enriched B2B dataset item returned by `healthcare-tiss-xml-validator`.",
        "properties": {
          "loteNumero": {
            "type": "string",
            "title": "Batch #",
            "description": "Batch # extracted and validated by Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer.",
            "example": "202610"
          },
          "registroANS": {
            "type": "string",
            "title": "ANS Insurer ID",
            "description": "ANS Insurer ID extracted and validated by Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer.",
            "example": "326305"
          },
          "tissVersion": {
            "type": "string",
            "title": "TISS Version",
            "description": "TISS Version extracted and validated by Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer.",
            "example": "4.03.00"
          },
          "guiasCount": {
            "type": "integer",
            "title": "Guides Count",
            "description": "Guides Count extracted and validated by Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer.",
            "example": 1
          },
          "valorTotalLoteBRL": {
            "type": "number",
            "title": "Batch Total (BRL)",
            "description": "Batch Total (BRL) extracted and validated by Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer.",
            "example": 180.0
          },
          "statusConformidade": {
            "type": "string",
            "title": "Compliance Status",
            "description": "Compliance Status extracted and validated by Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer.",
            "example": "CORRIGIDO_PRONTO_ENVIO"
          },
          "originalHash": {
            "type": "string",
            "title": "Original Hash",
            "description": "Original Hash extracted and validated by Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer.",
            "example": "INVALID_HASH_000"
          },
          "calculatedAnsMd5Hash": {
            "type": "string",
            "title": "Valid ANS MD5 Hash",
            "description": "Valid ANS MD5 Hash extracted and validated by Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer.",
            "example": "9aaabf2776dab3e0da33d63354db4298"
          },
          "errorsFoundCount": {
            "type": "integer",
            "title": "Glosa Risks Found",
            "description": "Glosa Risks Found extracted and validated by Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer.",
            "example": 1
          },
          "hashWasRepaired": {
            "type": "boolean",
            "title": "hashWasRepaired",
            "description": "hashWasRepaired validated by Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer.",
            "example": true
          },
          "glosaRiskAlerts": {
            "type": "array",
            "title": "glosaRiskAlerts",
            "description": "glosaRiskAlerts array returned by Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer.",
            "items": {
              "type": "string"
            },
            "example": [
              "REJEIÇÃO DE LOTE (Hash MD5 Inválido): O XML contém <hash>INVALID_HASH_000</hash>, mas o cálculo oficial ANS dos dados é '9aaabf2776dab3e0da33d63354db4298'."
            ]
          },
          "warnings": {
            "type": "array",
            "title": "warnings",
            "description": "warnings array returned by Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer.",
            "items": {
              "type": "string"
            },
            "example": [
              "Auto-Fix Aplicado: Tag <hash> atualizada automaticamente para '9aaabf2776dab3e0da33d63354db4298'."
            ]
          },
          "proceduresAudited": {
            "type": "array",
            "title": "proceduresAudited",
            "description": "proceduresAudited array returned by Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer.",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "example": [
              {
                "guia": "G-001",
                "codigoTUSS": "10101012",
                "descricaoReferencia": "Consulta em consultório (no horário normal ou preestabelecido)",
                "valorBRL": 180.0,
                "valido8Digitos": true
              }
            ]
          },
          "lgpdCompliance": {
            "type": "string",
            "title": "lgpdCompliance",
            "description": "lgpdCompliance returned by Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer.",
            "example": "STATELESS_RAM_ONLY (Zero Patient PII Persisted)"
          },
          "repairedXml": {
            "type": "string",
            "title": "repairedXml",
            "description": "repairedXml returned by Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer.",
            "example": "<ans:mensagemTISS xmlns:ans=\"http://www.ans.gov.br/padroes/tiss/schemas\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans..."
          }
        },
        "example": {
          "loteNumero": "202610",
          "registroANS": "326305",
          "tissVersion": "4.03.00",
          "guiasCount": 1,
          "valorTotalLoteBRL": 180.0,
          "statusConformidade": "CORRIGIDO_PRONTO_ENVIO",
          "originalHash": "INVALID_HASH_000",
          "calculatedAnsMd5Hash": "9aaabf2776dab3e0da33d63354db4298",
          "hashWasRepaired": true,
          "errorsFoundCount": 1,
          "glosaRiskAlerts": [
            "REJEIÇÃO DE LOTE (Hash MD5 Inválido): O XML contém <hash>INVALID_HASH_000</hash>, mas o cálculo oficial ANS dos dados é '9aaabf2776dab3e0da33d63354db4298'."
          ],
          "warnings": [
            "Auto-Fix Aplicado: Tag <hash> atualizada automaticamente para '9aaabf2776dab3e0da33d63354db4298'."
          ],
          "proceduresAudited": [
            {
              "guia": "G-001",
              "codigoTUSS": "10101012",
              "descricaoReferencia": "Consulta em consultório (no horário normal ou preestabelecido)",
              "valorBRL": 180.0,
              "valido8Digitos": true
            }
          ],
          "lgpdCompliance": "STATELESS_RAM_ONLY (Zero Patient PII Persisted)",
          "repairedXml": "<ans:mensagemTISS xmlns:ans=\"http://www.ans.gov.br/padroes/tiss/schemas\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans..."
        }
      },
      "HealthcareTissXmlValidatorResponseEnvelope": {
        "type": "object",
        "title": "Brazil Healthcare TISS 4.03.00 XML Validator & Hash Fixer Synchronous Response Envelope",
        "required": [
          "status",
          "actor",
          "count",
          "data"
        ],
        "properties": {
          "status": {
            "type": "string",
            "example": "succeeded"
          },
          "actor": {
            "type": "string",
            "example": "healthcare-tiss-xml-validator"
          },
          "marketplace": {
            "type": "string",
            "example": "rapidapi_zyla_hub"
          },
          "engineVersion": {
            "type": "string",
            "example": "3.0.0"
          },
          "count": {
            "type": "integer",
            "example": 1
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HealthcareTissXmlValidatorRecord"
            }
          }
        },
        "example": {
          "status": "succeeded",
          "actor": "healthcare-tiss-xml-validator",
          "engineVersion": "3.0.0",
          "count": 1,
          "data": [
            {
              "loteNumero": "202610",
              "registroANS": "326305",
              "tissVersion": "4.03.00",
              "guiasCount": 1,
              "valorTotalLoteBRL": 180.0,
              "statusConformidade": "CORRIGIDO_PRONTO_ENVIO",
              "originalHash": "INVALID_HASH_000",
              "calculatedAnsMd5Hash": "9aaabf2776dab3e0da33d63354db4298",
              "hashWasRepaired": true,
              "errorsFoundCount": 1,
              "glosaRiskAlerts": [
                "REJEIÇÃO DE LOTE (Hash MD5 Inválido): O XML contém <hash>INVALID_HASH_000</hash>, mas o cálculo oficial ANS dos dados é '9aaabf2776dab3e0da33d63354db4298'."
              ],
              "warnings": [
                "Auto-Fix Aplicado: Tag <hash> atualizada automaticamente para '9aaabf2776dab3e0da33d63354db4298'."
              ],
              "proceduresAudited": [
                {
                  "guia": "G-001",
                  "codigoTUSS": "10101012",
                  "descricaoReferencia": "Consulta em consultório (no horário normal ou preestabelecido)",
                  "valorBRL": 180.0,
                  "valido8Digitos": true
                }
              ],
              "lgpdCompliance": "STATELESS_RAM_ONLY (Zero Patient PII Persisted)",
              "repairedXml": "<ans:mensagemTISS xmlns:ans=\"http://www.ans.gov.br/padroes/tiss/schemas\"><ans:cabecalho><ans:identificacaoTransacao><ans:tipoTransacao>ENVIO_LOTE_GUIAS</ans:tipoTransacao><ans:sequencialTransacao>1042</ans:sequencialTransacao></ans:identificacaoTransacao><ans:destino><ans:registroANS>326305</ans:registroANS></ans:destino><ans:Padrao>4.03.00</ans:Padrao></ans:cabecalho><ans:prestadorParaOperadora><ans:loteGuias><ans:numeroLote>202610</ans:numeroLote><ans:guiasTISS><ans:guiaConsulta><ans:numeroGuiaPrestador>G-001</ans:numeroGuiaPrestador><ans:dadosBeneficiario><ans:numeroCarteira>009988776655</ans:numeroCarteira></ans:dadosBeneficiario><ans:dadosAtendimento><ans:procedimento><ans:codigoTabela>22</ans:codigoTabela><ans:codigoProcedimento>10101012</ans:codigoProcedimento><ans:valorProcedimento>180.00</ans:valorProcedimento></ans:procedimento></ans:dadosAtendimento></ans:guiaConsulta></ans..."
            }
          ]
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "status",
          "code",
          "message"
        ],
        "properties": {
          "status": {
            "type": "string",
            "example": "error"
          },
          "code": {
            "type": "integer",
            "example": 403
          },
          "message": {
            "type": "string",
            "example": "Direct access denied."
          }
        }
      }
    }
  }
}