{
  "info": {
    "_postman_id": "dgii-api-cloud-collection",
    "name": "DGII API Cloud",
    "description": "Colección oficial para consultar RNC, Cédulas, NCF y datos fiscales de RD en tiempo real. NO afiliada a la DGII oficial. Configura tu API key en la variable {{apiKey}}.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://pptonanntevatndjyzmk.supabase.co/functions/v1/dgii-api",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "TU_API_KEY_AQUI",
      "type": "string"
    },
    {
      "key": "rnc_ejemplo",
      "value": "130123456",
      "type": "string"
    },
    {
      "key": "cedula_ejemplo",
      "value": "00112345678",
      "type": "string"
    }
  ],
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "X-API-Key",
        "type": "string"
      },
      {
        "key": "value",
        "value": "{{apiKey}}",
        "type": "string"
      },
      {
        "key": "in",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "item": [
    {
      "name": "Sistema",
      "item": [
        {
          "name": "Health Check",
          "request": {
            "method": "GET",
            "auth": {
              "type": "noauth"
            },
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/health",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "health"
              ]
            },
            "description": "Verifica el estado operacional del servicio. No requiere autenticación."
          }
        }
      ]
    },
    {
      "name": "RNC (Empresas)",
      "item": [
        {
          "name": "Consultar RNC",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/rnc/{{rnc_ejemplo}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "rnc",
                "{{rnc_ejemplo}}"
              ]
            },
            "description": "Devuelve razón social, estado, actividad económica y régimen."
          }
        },
        {
          "name": "Autocompletar RNC",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/autocomplete?q=banco&limit=10",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "autocomplete"
              ],
              "query": [
                {
                  "key": "q",
                  "value": "banco"
                },
                {
                  "key": "limit",
                  "value": "10"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Cédula (Personas)",
      "item": [
        {
          "name": "Consultar Cédula",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/cedula/{{cedula_ejemplo}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "cedula",
                "{{cedula_ejemplo}}"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Búsqueda",
      "item": [
        {
          "name": "Búsqueda Unificada",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/search?q=banco&limit=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "search"
              ],
              "query": [
                {
                  "key": "q",
                  "value": "banco"
                },
                {
                  "key": "limit",
                  "value": "20"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "NCF",
      "item": [
        {
          "name": "Validar NCF",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/ncf/validate?rnc={{rnc_ejemplo}}&ncf=B0100000001",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "ncf",
                "validate"
              ],
              "query": [
                {
                  "key": "rnc",
                  "value": "{{rnc_ejemplo}}"
                },
                {
                  "key": "ncf",
                  "value": "B0100000001"
                }
              ]
            }
          }
        }
      ]
    }
  ]
}