{
  "info": {
    "_postman_id": "sat-api-v1",
    "name": "SAT API v1",
    "description": "API REST para datos del SAT. Documentación: https://api.cfdi4.com/docs/",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{sat_api_key}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://api.cfdi4.com",
      "type": "string"
    },
    {
      "key": "sat_api_key",
      "value": "sat_PEGAR_AQUI_TU_API_KEY",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Health",
      "item": [
        {
          "name": "GET /health.php",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/health.php",
              "host": ["{{base_url}}"],
              "path": ["health.php"]
            },
            "auth": {
              "type": "noauth"
            }
          }
        }
      ]
    },
    {
      "name": "Usuario",
      "item": [
        {
          "name": "Datos fiscales",
          "request": {
            "method": "POST",
            "header": [
              { "key": "User-Agent", "value": "Postman/1.0" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"rfc\": \"XAXX010101000\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/usuario/datos-fiscales",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "usuario", "datos-fiscales"]
            }
          }
        }
      ]
    },
    {
      "name": "SAT — Opiniones",
      "item": [
        {
          "name": "Opinión de cumplimiento (32D)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "User-Agent", "value": "Postman/1.0" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"rfc\": \"XAXX010101000\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/sat/opinion-cumplimiento",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "sat", "opinion-cumplimiento"]
            }
          }
        },
        {
          "name": "Opinión de cumplimiento con FIEL",
          "request": {
            "method": "POST",
            "header": [
              { "key": "User-Agent", "value": "Postman/1.0" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"rfc\": \"XAXX010101000\",\n  \"firma\": \"base64_encoded_fiel\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/sat/opinion-cumplimiento-fiel",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "sat", "opinion-cumplimiento-fiel"]
            }
          }
        },
        {
          "name": "Opinión de cumplimiento IMSS",
          "request": {
            "method": "POST",
            "header": [
              { "key": "User-Agent", "value": "Postman/1.0" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"rfc\": \"XAXX010101000\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/sat/opinion-cumplimiento-imss",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "sat", "opinion-cumplimiento-imss"]
            }
          }
        }
      ]
    },
    {
      "name": "SAT — Constancias",
      "item": [
        {
          "name": "Constancia de situación fiscal (CSF)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "User-Agent", "value": "Postman/1.0" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"rfc\": \"XAXX010101000\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/sat/constancia-situacion-fiscal",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "sat", "constancia-situacion-fiscal"]
            }
          }
        },
        {
          "name": "CSF con FIEL",
          "request": {
            "method": "POST",
            "header": [
              { "key": "User-Agent", "value": "Postman/1.0" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"rfc\": \"XAXX010101000\",\n  \"firma\": \"base64_encoded_fiel\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/sat/constancia-situacion-fiscal-fiel",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "sat", "constancia-situacion-fiscal-fiel"]
            }
          }
        }
      ]
    },
    {
      "name": "SAT — Facturas y descarga",
      "item": [
        {
          "name": "Listar facturas",
          "request": {
            "method": "POST",
            "header": [
              { "key": "User-Agent", "value": "Postman/1.0" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"rfc\": \"XAXX010101000\",\n  \"tipo\": \"emitidas\",\n  \"fecha_inicio\": \"2026-01-01\",\n  \"fecha_fin\": \"2026-12-31\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/sat/facturas",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "sat", "facturas"]
            }
          }
        },
        {
          "name": "Solicitar paquete de descarga (3 créditos)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "User-Agent", "value": "Postman/1.0" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"rfc\": \"XAXX010101000\",\n  \"tipo\": \"emitidas\",\n  \"fecha_inicio\": \"2026-01-01\",\n  \"fecha_fin\": \"2026-12-31\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/descarga/solicitar",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "descarga", "solicitar"]
            }
          }
        },
        {
          "name": "Verificar descarga",
          "request": {
            "method": "POST",
            "header": [
              { "key": "User-Agent", "value": "Postman/1.0" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"solicitud_id\": \"uuid-de-solicitud\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/descarga/verificar",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "descarga", "verificar"]
            }
          }
        }
      ]
    },
    {
      "name": "EFOS y REPSE",
      "item": [
        {
          "name": "Consultar lista negra EFOS",
          "request": {
            "method": "POST",
            "header": [
              { "key": "User-Agent", "value": "Postman/1.0" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"rfc\": \"XAXX010101000\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/efos/consultar",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "efos", "consultar"]
            }
          }
        },
        {
          "name": "Consultar REPSE",
          "request": {
            "method": "POST",
            "header": [
              { "key": "User-Agent", "value": "Postman/1.0" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"rfc\": \"XAXX010101000\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/repse/consultar",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "repse", "consultar"]
            }
          }
        }
      ]
    }
  ]
}
