{
  "info": {
    "name": "Emitoo API",
    "description": "API pública de Emitoo para integraciones (API keys). Autentícate con el header `X-API-Key: fpk_…`. Solo expone comprobantes (facturas, guías de remisión, retenciones, notas de crédito/débito, liquidaciones de compra), compras, cobros, pagos a proveedores, cuentas de dinero, personas/empresas y servicios.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Facturas",
      "item": [
        {
          "name": "Listar Facturas",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/facturas/?desde=&hasta=&estado=&limit=&offset=0&format=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "facturas",
                ""
              ],
              "query": [
                {
                  "key": "desde",
                  "value": "",
                  "description": "Desde",
                  "disabled": true
                },
                {
                  "key": "hasta",
                  "value": "",
                  "description": "Hasta",
                  "disabled": true
                },
                {
                  "key": "estado",
                  "value": "",
                  "description": "Estado",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Limit",
                  "disabled": true
                },
                {
                  "key": "offset",
                  "value": "0",
                  "description": "Offset",
                  "disabled": true
                },
                {
                  "key": "format",
                  "value": "",
                  "description": "Format",
                  "disabled": true
                }
              ]
            },
            "description": "Listado para la tabla del dashboard, acotado por el scope del rol.\n\nSin parámetros responde igual que antes (últimas 100). `desde`/`hasta`\nfiltran por `fecha_emision`, `estado` por `EstadoFactura` exacto.\n`?format=csv` devuelve el mismo listado como CSV (ver\n`routes/cobros.py::estado_cuenta`, mismo estilo de `StreamingResponse`).\nEl CSV es un export contable: sin `limit` explícito no se trunca a 100\n(tope de seguridad 50000), para que \"ventas del mes\" salga completo."
          },
          "response": []
        },
        {
          "name": "Crear Factura",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/facturas/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "facturas",
                ""
              ]
            },
            "description": "Crea la factura. El procesamiento ante el SRI lo hace el WORKER (durable).\n\nRetorna de inmediato con estado PENDIENTE (o BORRADOR): el documento queda\nencolado en la BD y el worker lo procesa en segundos. El frontend consulta\n/facturas/{id}/status para ver AUTORIZADO / RECHAZADO.\n\nIdempotencia: reintentar el POST con la misma `Idempotency-Key` (header o\ncampo del body) devuelve la MISMA factura (200), sin duplicar ni gastar otro\nsecuencial.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tipo_identificacion\": \"04\",\n  \"identificacion\": \"0991234567001\",\n  \"razon_social\": \"ACME S.A.\",\n  \"direccion\": \"Av. Principal 123 y Secundaria\",\n  \"email\": \"facturacion@acme.example\",\n  \"detalles\": [\n    {\n      \"codigo_principal\": \"LIC-1\",\n      \"descripcion\": \"Licencia mensual\",\n      \"cantidad\": 1,\n      \"precio_unitario\": 75.0,\n      \"descuento\": 0,\n      \"tarifa_iva\": 15,\n      \"iva_codigo\": \"string\"\n    }\n  ],\n  \"sucursal_id\": 1,\n  \"es_borrador\": false,\n  \"idempotency_key\": \"orden-8912\",\n  \"pagos\": [\n    {\n      \"forma_pago\": \"01\",\n      \"total\": 1.0,\n      \"plazo\": 30,\n      \"unidad_tiempo\": \"dias\"\n    }\n  ],\n  \"condicion_pago\": \"contado\",\n  \"fecha_vencimiento\": \"2026-01-15\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Exportar Xml",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/facturas/export-xml?anio=&mes=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "facturas",
                "export-xml"
              ],
              "query": [
                {
                  "key": "anio",
                  "value": "",
                  "description": "Anio",
                  "disabled": false
                },
                {
                  "key": "mes",
                  "value": "",
                  "description": "Mes",
                  "disabled": false
                }
              ]
            },
            "description": "ZIP en memoria con el `xml_firmado` de las facturas AUTORIZADO del\ntenant emitidas en (anio, mes) — un archivo `{clave_acceso}.xml` por\nfactura."
          },
          "response": []
        },
        {
          "name": "Obtener Factura",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/facturas/:factura_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "facturas",
                ":factura_id"
              ],
              "variable": [
                {
                  "key": "factura_id",
                  "value": "177",
                  "description": "Factura Id"
                }
              ]
            },
            "description": "Obtener Factura"
          },
          "response": []
        },
        {
          "name": "Estado Factura",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/facturas/:factura_id/status",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "facturas",
                ":factura_id",
                "status"
              ],
              "variable": [
                {
                  "key": "factura_id",
                  "value": "177",
                  "description": "Factura Id"
                }
              ]
            },
            "description": "Polling del estado de procesamiento ante el SRI."
          },
          "response": []
        },
        {
          "name": "Reenviar Factura",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/facturas/:factura_id/reenviar",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "facturas",
                ":factura_id",
                "reenviar"
              ],
              "variable": [
                {
                  "key": "factura_id",
                  "value": "177",
                  "description": "Factura Id"
                }
              ]
            },
            "description": "Re-encola la factura para el worker.\n\n- Si fue DEVUELTA/RECHAZADO (falló de verdad): se re-emite con clave NUEVA.\n- Si está colgada (PENDIENTE/EN_PROCESO/timeout): se CONSERVA la clave y el\n  worker solo re-consulta la autorización (idempotente, sin duplicar)."
          },
          "response": []
        },
        {
          "name": "Obtener Ride",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/facturas/:factura_id/ride",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "facturas",
                ":factura_id",
                "ride"
              ],
              "variable": [
                {
                  "key": "factura_id",
                  "value": "177",
                  "description": "Factura Id"
                }
              ]
            },
            "description": "Genera y devuelve el RIDE en PDF de la factura."
          },
          "response": []
        },
        {
          "name": "Obtener Xml",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/facturas/:factura_id/xml",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "facturas",
                ":factura_id",
                "xml"
              ],
              "variable": [
                {
                  "key": "factura_id",
                  "value": "177",
                  "description": "Factura Id"
                }
              ]
            },
            "description": "Descarga el XML firmado de la factura."
          },
          "response": []
        },
        {
          "name": "Enviar Email Factura",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/facturas/:factura_id/email?to=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "facturas",
                ":factura_id",
                "email"
              ],
              "query": [
                {
                  "key": "to",
                  "value": "",
                  "description": "To",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "factura_id",
                  "value": "177",
                  "description": "Factura Id"
                }
              ]
            },
            "description": "Envía la factura por email al destinatario del comprobante (o `to`)."
          },
          "response": []
        },
        {
          "name": "Anular Factura",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/facturas/:factura_id/anular",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "facturas",
                ":factura_id",
                "anular"
              ],
              "variable": [
                {
                  "key": "factura_id",
                  "value": "177",
                  "description": "Factura Id"
                }
              ]
            },
            "description": "Anula localmente la factura (no se emite al SRI). Solo permitido desde AUTORIZADO.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"motivo\": \"Anulación por error\",\n  \"fecha\": \"2026-01-15T10:00:00\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Personas/Empresas",
      "item": [
        {
          "name": "Listar",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/personas-empresas/?q=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "personas-empresas",
                ""
              ],
              "query": [
                {
                  "key": "q",
                  "value": "",
                  "description": "Q",
                  "disabled": true
                }
              ]
            },
            "description": "Listar"
          },
          "response": []
        },
        {
          "name": "Crear",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/personas-empresas/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "personas-empresas",
                ""
              ]
            },
            "description": "Crear",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tipo_identificacion\": \"04\",\n  \"identificacion\": \"0991234567001\",\n  \"razon_social\": \"ACME S.A.\",\n  \"nombre_comercial\": \"string\",\n  \"telefono\": \"string\",\n  \"email\": \"facturacion@acme.example\",\n  \"direccion\": \"Av. Principal 123 y Secundaria\",\n  \"es_cliente\": true,\n  \"es_proveedor\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Lookup",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/personas-empresas/lookup/:identificacion",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "personas-empresas",
                "lookup",
                ":identificacion"
              ],
              "variable": [
                {
                  "key": "identificacion",
                  "value": "0991234567001",
                  "description": "Identificacion"
                }
              ]
            },
            "description": "Busca por RUC/cédula: primero local (de SU empresa), luego el catastro SRI."
          },
          "response": []
        },
        {
          "name": "Obtener",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/personas-empresas/:pe_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "personas-empresas",
                ":pe_id"
              ],
              "variable": [
                {
                  "key": "pe_id",
                  "value": "123",
                  "description": "Pe Id"
                }
              ]
            },
            "description": "Obtener"
          },
          "response": []
        },
        {
          "name": "Actualizar",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/personas-empresas/:pe_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "personas-empresas",
                ":pe_id"
              ],
              "variable": [
                {
                  "key": "pe_id",
                  "value": "123",
                  "description": "Pe Id"
                }
              ]
            },
            "description": "Actualizar",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tipo_identificacion\": \"04\",\n  \"identificacion\": \"0991234567001\",\n  \"razon_social\": \"ACME S.A.\",\n  \"nombre_comercial\": \"string\",\n  \"telefono\": \"string\",\n  \"email\": \"facturacion@acme.example\",\n  \"direccion\": \"Av. Principal 123 y Secundaria\",\n  \"es_cliente\": true,\n  \"es_proveedor\": false,\n  \"activo\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Eliminar",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/personas-empresas/:pe_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "personas-empresas",
                ":pe_id"
              ],
              "variable": [
                {
                  "key": "pe_id",
                  "value": "123",
                  "description": "Pe Id"
                }
              ]
            },
            "description": "Eliminar"
          },
          "response": []
        }
      ]
    },
    {
      "name": "Servicios",
      "item": [
        {
          "name": "Listar",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/servicios/?q=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "servicios",
                ""
              ],
              "query": [
                {
                  "key": "q",
                  "value": "",
                  "description": "Q",
                  "disabled": true
                }
              ]
            },
            "description": "Listar"
          },
          "response": []
        },
        {
          "name": "Crear",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/servicios/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "servicios",
                ""
              ]
            },
            "description": "Crear",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"codigo\": \"001\",\n  \"nombre\": \"Banco Pichincha\",\n  \"descripcion\": \"Licencia mensual\",\n  \"tipo\": \"banco\",\n  \"precio\": 0,\n  \"tarifa_iva\": 15,\n  \"iva_codigo\": \"string\",\n  \"precio_variable\": false,\n  \"categoria\": \"servicios básicos\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Obtener",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/servicios/:servicio_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "servicios",
                ":servicio_id"
              ],
              "variable": [
                {
                  "key": "servicio_id",
                  "value": "12",
                  "description": "Servicio Id"
                }
              ]
            },
            "description": "Obtener"
          },
          "response": []
        },
        {
          "name": "Actualizar",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/servicios/:servicio_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "servicios",
                ":servicio_id"
              ],
              "variable": [
                {
                  "key": "servicio_id",
                  "value": "12",
                  "description": "Servicio Id"
                }
              ]
            },
            "description": "Actualizar",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"codigo\": \"001\",\n  \"nombre\": \"Banco Pichincha\",\n  \"descripcion\": \"Licencia mensual\",\n  \"tipo\": \"banco\",\n  \"precio\": 0,\n  \"tarifa_iva\": 15,\n  \"iva_codigo\": \"string\",\n  \"precio_variable\": false,\n  \"categoria\": \"servicios básicos\",\n  \"activo\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Eliminar",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/servicios/:servicio_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "servicios",
                ":servicio_id"
              ],
              "variable": [
                {
                  "key": "servicio_id",
                  "value": "12",
                  "description": "Servicio Id"
                }
              ]
            },
            "description": "Eliminar"
          },
          "response": []
        }
      ]
    },
    {
      "name": "GuiasRemision",
      "item": [
        {
          "name": "Listar",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/guias-remision/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "guias-remision",
                ""
              ]
            },
            "description": "Listar"
          },
          "response": []
        },
        {
          "name": "Crear",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/guias-remision/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "guias-remision",
                ""
              ]
            },
            "description": "Crear",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"dir_partida\": \"Dir Partida\",\n  \"transportista_tipo_id\": \"04\",\n  \"transportista_identificacion\": \"Transportista Identificacion\",\n  \"transportista_razon_social\": \"Transportista Razon Social\",\n  \"placa\": \"Placa\",\n  \"fecha_ini_transporte\": \"2026-01-15T10:00:00\",\n  \"fecha_fin_transporte\": \"2026-01-15T10:00:00\",\n  \"destinatarios\": [\n    {\n      \"identificacion\": \"0991234567001\",\n      \"razon_social\": \"ACME S.A.\",\n      \"direccion\": \"Av. Principal 123 y Secundaria\",\n      \"motivo_traslado\": \"Motivo Traslado\",\n      \"cod_doc_sustento\": \"string\",\n      \"num_doc_sustento\": \"string\",\n      \"num_aut_doc_sustento\": \"string\",\n      \"fecha_emision_doc_sustento\": \"2026-01-15T10:00:00\",\n      \"detalles\": []\n    }\n  ],\n  \"sucursal_id\": 1,\n  \"es_borrador\": false,\n  \"idempotency_key\": \"orden-8912\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Obtener",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/guias-remision/:guia_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "guias-remision",
                ":guia_id"
              ],
              "variable": [
                {
                  "key": "guia_id",
                  "value": "501",
                  "description": "Guia Id"
                }
              ]
            },
            "description": "Obtener"
          },
          "response": []
        },
        {
          "name": "Estado",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/guias-remision/:guia_id/status",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "guias-remision",
                ":guia_id",
                "status"
              ],
              "variable": [
                {
                  "key": "guia_id",
                  "value": "501",
                  "description": "Guia Id"
                }
              ]
            },
            "description": "Estado"
          },
          "response": []
        },
        {
          "name": "Obtener Ride",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/guias-remision/:guia_id/ride",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "guias-remision",
                ":guia_id",
                "ride"
              ],
              "variable": [
                {
                  "key": "guia_id",
                  "value": "501",
                  "description": "Guia Id"
                }
              ]
            },
            "description": "Obtener Ride"
          },
          "response": []
        },
        {
          "name": "Obtener Xml",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/guias-remision/:guia_id/xml",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "guias-remision",
                ":guia_id",
                "xml"
              ],
              "variable": [
                {
                  "key": "guia_id",
                  "value": "501",
                  "description": "Guia Id"
                }
              ]
            },
            "description": "Descarga el XML firmado de la guía de remisión."
          },
          "response": []
        },
        {
          "name": "Enviar Email Guia",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/guias-remision/:guia_id/email?to=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "guias-remision",
                ":guia_id",
                "email"
              ],
              "query": [
                {
                  "key": "to",
                  "value": "",
                  "description": "To",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "guia_id",
                  "value": "501",
                  "description": "Guia Id"
                }
              ]
            },
            "description": "Enviar Email Guia"
          },
          "response": []
        },
        {
          "name": "Anular Guia",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/guias-remision/:guia_id/anular",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "guias-remision",
                ":guia_id",
                "anular"
              ],
              "variable": [
                {
                  "key": "guia_id",
                  "value": "501",
                  "description": "Guia Id"
                }
              ]
            },
            "description": "Anular Guia",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"motivo\": \"Anulación por error\",\n  \"fecha\": \"2026-01-15T10:00:00\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Retenciones",
      "item": [
        {
          "name": "Listar",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/retenciones/?desde=&hasta=&estado=&periodo_fiscal=&limit=&offset=0&format=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "retenciones",
                ""
              ],
              "query": [
                {
                  "key": "desde",
                  "value": "",
                  "description": "Desde",
                  "disabled": true
                },
                {
                  "key": "hasta",
                  "value": "",
                  "description": "Hasta",
                  "disabled": true
                },
                {
                  "key": "estado",
                  "value": "",
                  "description": "Estado",
                  "disabled": true
                },
                {
                  "key": "periodo_fiscal",
                  "value": "",
                  "description": "Periodo Fiscal",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Limit",
                  "disabled": true
                },
                {
                  "key": "offset",
                  "value": "0",
                  "description": "Offset",
                  "disabled": true
                },
                {
                  "key": "format",
                  "value": "",
                  "description": "Format",
                  "disabled": true
                }
              ]
            },
            "description": "Sin parámetros responde igual que antes. `desde`/`hasta` filtran por\n`fecha_emision`, `estado` por `EstadoFactura`, `periodo_fiscal` exacto.\n`?format=csv` devuelve el mismo listado como CSV (export contable: sin\n`limit` explícito no se trunca a 100; tope de seguridad 50000)."
          },
          "response": []
        },
        {
          "name": "Crear",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/retenciones/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "retenciones",
                ""
              ]
            },
            "description": "Crear",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sujeto_tipo_id\": \"04\",\n  \"sujeto_identificacion\": \"Sujeto Identificacion\",\n  \"sujeto_razon_social\": \"Sujeto Razon Social\",\n  \"periodo_fiscal\": \"Periodo Fiscal\",\n  \"parte_rel\": \"NO\",\n  \"docs_sustento\": [\n    {\n      \"cod_sustento\": \"01\",\n      \"cod_doc_sustento\": \"01\",\n      \"num_doc_sustento\": \"Num Doc Sustento\",\n      \"fecha_emision_sustento\": \"2026-01-15T10:00:00\",\n      \"total_sin_impuestos\": 1.0,\n      \"importe_total\": 1.0,\n      \"impuestos\": [],\n      \"lineas\": []\n    }\n  ],\n  \"sucursal_id\": 1,\n  \"es_borrador\": false,\n  \"idempotency_key\": \"orden-8912\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Obtener",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/retenciones/:ret_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "retenciones",
                ":ret_id"
              ],
              "variable": [
                {
                  "key": "ret_id",
                  "value": "401",
                  "description": "Ret Id"
                }
              ]
            },
            "description": "Obtener"
          },
          "response": []
        },
        {
          "name": "Estado",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/retenciones/:ret_id/status",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "retenciones",
                ":ret_id",
                "status"
              ],
              "variable": [
                {
                  "key": "ret_id",
                  "value": "401",
                  "description": "Ret Id"
                }
              ]
            },
            "description": "Estado"
          },
          "response": []
        },
        {
          "name": "Obtener Ride",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/retenciones/:ret_id/ride",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "retenciones",
                ":ret_id",
                "ride"
              ],
              "variable": [
                {
                  "key": "ret_id",
                  "value": "401",
                  "description": "Ret Id"
                }
              ]
            },
            "description": "Obtener Ride"
          },
          "response": []
        },
        {
          "name": "Obtener Xml",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/retenciones/:ret_id/xml",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "retenciones",
                ":ret_id",
                "xml"
              ],
              "variable": [
                {
                  "key": "ret_id",
                  "value": "401",
                  "description": "Ret Id"
                }
              ]
            },
            "description": "Descarga el XML firmado de la retención."
          },
          "response": []
        },
        {
          "name": "Enviar Email Retencion",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/retenciones/:ret_id/email?to=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "retenciones",
                ":ret_id",
                "email"
              ],
              "query": [
                {
                  "key": "to",
                  "value": "",
                  "description": "To",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "ret_id",
                  "value": "401",
                  "description": "Ret Id"
                }
              ]
            },
            "description": "Enviar Email Retencion"
          },
          "response": []
        },
        {
          "name": "Anular Retencion",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/retenciones/:ret_id/anular",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "retenciones",
                ":ret_id",
                "anular"
              ],
              "variable": [
                {
                  "key": "ret_id",
                  "value": "401",
                  "description": "Ret Id"
                }
              ]
            },
            "description": "Anular Retencion",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"motivo\": \"Anulación por error\",\n  \"fecha\": \"2026-01-15T10:00:00\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "NotasCredito",
      "item": [
        {
          "name": "Listar",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/notas-credito/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "notas-credito",
                ""
              ]
            },
            "description": "Listar"
          },
          "response": []
        },
        {
          "name": "Crear",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/notas-credito/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "notas-credito",
                ""
              ]
            },
            "description": "Crea una nota de crédito. Procesamiento async ante el SRI (mismo pipeline\ndurable que la factura). Idempotencia: misma key → misma NC.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tipo_identificacion\": \"04\",\n  \"identificacion\": \"0991234567001\",\n  \"razon_social\": \"ACME S.A.\",\n  \"direccion\": \"Av. Principal 123 y Secundaria\",\n  \"email\": \"facturacion@acme.example\",\n  \"factura_id\": 1,\n  \"cod_doc_sustento\": \"01\",\n  \"doc_sustento_numero\": \"\",\n  \"doc_sustento_fecha\": \"2026-01-15T10:00:00\",\n  \"motivo\": \"Anulación por error\",\n  \"detalles\": [\n    {\n      \"codigo_principal\": \"LIC-1\",\n      \"descripcion\": \"Licencia mensual\",\n      \"cantidad\": 1,\n      \"precio_unitario\": 75.0,\n      \"descuento\": 0,\n      \"tarifa_iva\": 15,\n      \"iva_codigo\": \"string\"\n    }\n  ],\n  \"sucursal_id\": 1,\n  \"es_borrador\": false,\n  \"idempotency_key\": \"orden-8912\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Obtener",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/notas-credito/:nc_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "notas-credito",
                ":nc_id"
              ],
              "variable": [
                {
                  "key": "nc_id",
                  "value": "201",
                  "description": "Nc Id"
                }
              ]
            },
            "description": "Obtener"
          },
          "response": []
        },
        {
          "name": "Estado",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/notas-credito/:nc_id/status",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "notas-credito",
                ":nc_id",
                "status"
              ],
              "variable": [
                {
                  "key": "nc_id",
                  "value": "201",
                  "description": "Nc Id"
                }
              ]
            },
            "description": "Estado"
          },
          "response": []
        },
        {
          "name": "Reenviar",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/notas-credito/:nc_id/reenviar",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "notas-credito",
                ":nc_id",
                "reenviar"
              ],
              "variable": [
                {
                  "key": "nc_id",
                  "value": "201",
                  "description": "Nc Id"
                }
              ]
            },
            "description": "Re-encola la NC: si fue DEVUELTA/RECHAZADO re-emite con clave nueva."
          },
          "response": []
        },
        {
          "name": "Obtener Ride",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/notas-credito/:nc_id/ride",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "notas-credito",
                ":nc_id",
                "ride"
              ],
              "variable": [
                {
                  "key": "nc_id",
                  "value": "201",
                  "description": "Nc Id"
                }
              ]
            },
            "description": "Obtener Ride"
          },
          "response": []
        },
        {
          "name": "Obtener Xml",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/notas-credito/:nc_id/xml",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "notas-credito",
                ":nc_id",
                "xml"
              ],
              "variable": [
                {
                  "key": "nc_id",
                  "value": "201",
                  "description": "Nc Id"
                }
              ]
            },
            "description": "Descarga el XML firmado de la nota de crédito."
          },
          "response": []
        },
        {
          "name": "Enviar Email Nc",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/notas-credito/:nc_id/email?to=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "notas-credito",
                ":nc_id",
                "email"
              ],
              "query": [
                {
                  "key": "to",
                  "value": "",
                  "description": "To",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "nc_id",
                  "value": "201",
                  "description": "Nc Id"
                }
              ]
            },
            "description": "Envía la NC por email (a `to` o al email del comprador)."
          },
          "response": []
        },
        {
          "name": "Anular Nc",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/notas-credito/:nc_id/anular",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "notas-credito",
                ":nc_id",
                "anular"
              ],
              "variable": [
                {
                  "key": "nc_id",
                  "value": "201",
                  "description": "Nc Id"
                }
              ]
            },
            "description": "Anular Nc",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"motivo\": \"Anulación por error\",\n  \"fecha\": \"2026-01-15T10:00:00\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "NotasDebito",
      "item": [
        {
          "name": "Listar",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/notas-debito/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "notas-debito",
                ""
              ]
            },
            "description": "Listar"
          },
          "response": []
        },
        {
          "name": "Crear",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/notas-debito/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "notas-debito",
                ""
              ]
            },
            "description": "Crea una nota de débito. Procesamiento async ante el SRI.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tipo_identificacion\": \"04\",\n  \"identificacion\": \"0991234567001\",\n  \"razon_social\": \"ACME S.A.\",\n  \"direccion\": \"Av. Principal 123 y Secundaria\",\n  \"email\": \"facturacion@acme.example\",\n  \"factura_id\": 1,\n  \"cod_doc_sustento\": \"01\",\n  \"doc_sustento_numero\": \"\",\n  \"doc_sustento_fecha\": \"2026-01-15T10:00:00\",\n  \"tarifa_iva\": 15,\n  \"iva_codigo\": \"string\",\n  \"motivos\": [\n    {\n      \"razon\": \"Razon\",\n      \"valor\": 1.0\n    }\n  ],\n  \"pagos\": [\n    {\n      \"forma_pago\": \"01\",\n      \"total\": 1.0,\n      \"plazo\": 30,\n      \"unidad_tiempo\": \"dias\"\n    }\n  ],\n  \"sucursal_id\": 1,\n  \"es_borrador\": false,\n  \"idempotency_key\": \"orden-8912\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Obtener",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/notas-debito/:nd_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "notas-debito",
                ":nd_id"
              ],
              "variable": [
                {
                  "key": "nd_id",
                  "value": "202",
                  "description": "Nd Id"
                }
              ]
            },
            "description": "Obtener"
          },
          "response": []
        },
        {
          "name": "Estado",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/notas-debito/:nd_id/status",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "notas-debito",
                ":nd_id",
                "status"
              ],
              "variable": [
                {
                  "key": "nd_id",
                  "value": "202",
                  "description": "Nd Id"
                }
              ]
            },
            "description": "Estado"
          },
          "response": []
        },
        {
          "name": "Reenviar",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/notas-debito/:nd_id/reenviar",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "notas-debito",
                ":nd_id",
                "reenviar"
              ],
              "variable": [
                {
                  "key": "nd_id",
                  "value": "202",
                  "description": "Nd Id"
                }
              ]
            },
            "description": "Re-encola la ND: si fue DEVUELTA/RECHAZADO re-emite con clave nueva."
          },
          "response": []
        },
        {
          "name": "Obtener Ride",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/notas-debito/:nd_id/ride",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "notas-debito",
                ":nd_id",
                "ride"
              ],
              "variable": [
                {
                  "key": "nd_id",
                  "value": "202",
                  "description": "Nd Id"
                }
              ]
            },
            "description": "Obtener Ride"
          },
          "response": []
        },
        {
          "name": "Obtener Xml",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/notas-debito/:nd_id/xml",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "notas-debito",
                ":nd_id",
                "xml"
              ],
              "variable": [
                {
                  "key": "nd_id",
                  "value": "202",
                  "description": "Nd Id"
                }
              ]
            },
            "description": "Descarga el XML firmado de la nota de débito."
          },
          "response": []
        },
        {
          "name": "Enviar Email Nd",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/notas-debito/:nd_id/email?to=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "notas-debito",
                ":nd_id",
                "email"
              ],
              "query": [
                {
                  "key": "to",
                  "value": "",
                  "description": "To",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "nd_id",
                  "value": "202",
                  "description": "Nd Id"
                }
              ]
            },
            "description": "Enviar Email Nd"
          },
          "response": []
        },
        {
          "name": "Anular Nd",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/notas-debito/:nd_id/anular",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "notas-debito",
                ":nd_id",
                "anular"
              ],
              "variable": [
                {
                  "key": "nd_id",
                  "value": "202",
                  "description": "Nd Id"
                }
              ]
            },
            "description": "Anular Nd",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"motivo\": \"Anulación por error\",\n  \"fecha\": \"2026-01-15T10:00:00\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Liquidaciones",
      "item": [
        {
          "name": "Listar",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/liquidaciones-compra/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "liquidaciones-compra",
                ""
              ]
            },
            "description": "Listar"
          },
          "response": []
        },
        {
          "name": "Crear",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/liquidaciones-compra/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "liquidaciones-compra",
                ""
              ]
            },
            "description": "Crea una liquidación. Procesamiento async ante el SRI.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"proveedor_id\": 45,\n  \"proveedor_tipo_id\": \"04\",\n  \"proveedor_identificacion\": \"Proveedor Identificacion\",\n  \"proveedor_razon_social\": \"Proveedor Razon Social\",\n  \"proveedor_direccion\": \"string\",\n  \"email\": \"facturacion@acme.example\",\n  \"cod_doc_sustento\": \"string\",\n  \"doc_sustento_numero\": \"string\",\n  \"doc_sustento_fecha\": \"2026-01-15T10:00:00\",\n  \"detalles\": [\n    {\n      \"codigo_principal\": \"LIC-1\",\n      \"descripcion\": \"Licencia mensual\",\n      \"cantidad\": 1,\n      \"precio_unitario\": 75.0,\n      \"descuento\": 0,\n      \"tarifa_iva\": 15,\n      \"iva_codigo\": \"string\"\n    }\n  ],\n  \"pagos\": [\n    {\n      \"forma_pago\": \"01\",\n      \"total\": 1.0,\n      \"plazo\": 30,\n      \"unidad_tiempo\": \"dias\"\n    }\n  ],\n  \"condicion_pago\": \"contado\",\n  \"fecha_vencimiento\": \"2026-01-15\",\n  \"sucursal_id\": 1,\n  \"es_borrador\": false,\n  \"idempotency_key\": \"orden-8912\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Obtener",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/liquidaciones-compra/:lc_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "liquidaciones-compra",
                ":lc_id"
              ],
              "variable": [
                {
                  "key": "lc_id",
                  "value": "301",
                  "description": "Lc Id"
                }
              ]
            },
            "description": "Obtener"
          },
          "response": []
        },
        {
          "name": "Estado",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/liquidaciones-compra/:lc_id/status",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "liquidaciones-compra",
                ":lc_id",
                "status"
              ],
              "variable": [
                {
                  "key": "lc_id",
                  "value": "301",
                  "description": "Lc Id"
                }
              ]
            },
            "description": "Estado"
          },
          "response": []
        },
        {
          "name": "Reenviar",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/liquidaciones-compra/:lc_id/reenviar",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "liquidaciones-compra",
                ":lc_id",
                "reenviar"
              ],
              "variable": [
                {
                  "key": "lc_id",
                  "value": "301",
                  "description": "Lc Id"
                }
              ]
            },
            "description": "Re-encola la liquidación: si fue DEVUELTA/RECHAZADO re-emite con clave nueva."
          },
          "response": []
        },
        {
          "name": "Obtener Ride",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/liquidaciones-compra/:lc_id/ride",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "liquidaciones-compra",
                ":lc_id",
                "ride"
              ],
              "variable": [
                {
                  "key": "lc_id",
                  "value": "301",
                  "description": "Lc Id"
                }
              ]
            },
            "description": "Obtener Ride"
          },
          "response": []
        },
        {
          "name": "Obtener Xml",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/liquidaciones-compra/:lc_id/xml",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "liquidaciones-compra",
                ":lc_id",
                "xml"
              ],
              "variable": [
                {
                  "key": "lc_id",
                  "value": "301",
                  "description": "Lc Id"
                }
              ]
            },
            "description": "Descarga el XML firmado de la liquidación."
          },
          "response": []
        },
        {
          "name": "Enviar Email Lc",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/liquidaciones-compra/:lc_id/email?to=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "liquidaciones-compra",
                ":lc_id",
                "email"
              ],
              "query": [
                {
                  "key": "to",
                  "value": "",
                  "description": "To",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "lc_id",
                  "value": "301",
                  "description": "Lc Id"
                }
              ]
            },
            "description": "Enviar Email Lc"
          },
          "response": []
        },
        {
          "name": "Anular Lc",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/liquidaciones-compra/:lc_id/anular",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "liquidaciones-compra",
                ":lc_id",
                "anular"
              ],
              "variable": [
                {
                  "key": "lc_id",
                  "value": "301",
                  "description": "Lc Id"
                }
              ]
            },
            "description": "Anular Lc",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"motivo\": \"Anulación por error\",\n  \"fecha\": \"2026-01-15T10:00:00\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Compras",
      "item": [
        {
          "name": "Listar",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/compras/?q=&estado_pago=&proveedor_id=&include_inactivos=False&desde=&hasta=&limit=&offset=0&format=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "compras",
                ""
              ],
              "query": [
                {
                  "key": "q",
                  "value": "",
                  "description": "Q",
                  "disabled": true
                },
                {
                  "key": "estado_pago",
                  "value": "",
                  "description": "Estado Pago",
                  "disabled": true
                },
                {
                  "key": "proveedor_id",
                  "value": "",
                  "description": "Proveedor Id",
                  "disabled": true
                },
                {
                  "key": "include_inactivos",
                  "value": "False",
                  "description": "Include Inactivos",
                  "disabled": true
                },
                {
                  "key": "desde",
                  "value": "",
                  "description": "Desde",
                  "disabled": true
                },
                {
                  "key": "hasta",
                  "value": "",
                  "description": "Hasta",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Limit",
                  "disabled": true
                },
                {
                  "key": "offset",
                  "value": "0",
                  "description": "Offset",
                  "disabled": true
                },
                {
                  "key": "format",
                  "value": "",
                  "description": "Format",
                  "disabled": true
                }
              ]
            },
            "description": "Sin parámetros responde igual que antes. `desde`/`hasta` filtran por\n`fecha_emision`. `?format=csv` devuelve el mismo listado como CSV (export\ncontable: sin `limit` explícito no se trunca a 200; tope 50000)."
          },
          "response": []
        },
        {
          "name": "Crear",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/compras",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "compras"
              ]
            },
            "description": "Crear",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"total\": 1.0,\n  \"proveedor_id\": 45,\n  \"proveedor_tipo_id\": \"04\",\n  \"proveedor_identificacion\": \"Proveedor Identificacion\",\n  \"proveedor_razon_social\": \"Proveedor Razon Social\",\n  \"proveedor_direccion\": \"string\",\n  \"email\": \"facturacion@acme.example\",\n  \"tipo_doc\": \"01\",\n  \"numero_doc\": \"Numero Doc\",\n  \"fecha_emision\": \"2026-01-15T10:00:00\",\n  \"clave_acceso\": \"string\",\n  \"fecha_vencimiento\": \"2026-01-15\",\n  \"categoria\": \"servicios básicos\",\n  \"notas\": \"string\",\n  \"detalles\": [\n    {\n      \"codigo_principal\": \"LIC-1\",\n      \"descripcion\": \"Licencia mensual\",\n      \"cantidad\": 1,\n      \"precio_unitario\": 75.0,\n      \"descuento\": 0,\n      \"tarifa_iva\": 15,\n      \"iva_codigo\": \"string\"\n    }\n  ],\n  \"sucursal_id\": 1,\n  \"xml_original\": \"string\",\n  \"subtotal_0\": 0,\n  \"subtotal_5\": 0,\n  \"subtotal_15\": 0,\n  \"subtotal_no_objeto\": 0,\n  \"subtotal_exento\": 0,\n  \"iva\": 0\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Obtener",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/compras/:c_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "compras",
                ":c_id"
              ],
              "variable": [
                {
                  "key": "c_id",
                  "value": "1",
                  "description": "C Id"
                }
              ]
            },
            "description": "Obtener"
          },
          "response": []
        },
        {
          "name": "Actualizar",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/compras/:c_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "compras",
                ":c_id"
              ],
              "variable": [
                {
                  "key": "c_id",
                  "value": "1",
                  "description": "C Id"
                }
              ]
            },
            "description": "Actualizar",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"categoria\": \"servicios básicos\",\n  \"notas\": \"string\",\n  \"fecha_vencimiento\": \"2026-01-15\",\n  \"sucursal_id\": 1,\n  \"detalles\": [\n    {\n      \"codigo_principal\": \"LIC-1\",\n      \"descripcion\": \"Licencia mensual\",\n      \"cantidad\": 1,\n      \"precio_unitario\": 75.0,\n      \"descuento\": 0,\n      \"tarifa_iva\": 15,\n      \"iva_codigo\": \"string\"\n    }\n  ],\n  \"proveedor_direccion\": \"string\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Eliminar",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/compras/:c_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "compras",
                ":c_id"
              ],
              "variable": [
                {
                  "key": "c_id",
                  "value": "1",
                  "description": "C Id"
                }
              ]
            },
            "description": "Baja lógica: marca activo=False. NO borra físicamente."
          },
          "response": []
        },
        {
          "name": "Listar Categorias",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/compras/_meta/categorias",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "compras",
                "_meta",
                "categorias"
              ]
            },
            "description": "Autocompletar: lista las categorías ya usadas por el tenant."
          },
          "response": []
        },
        {
          "name": "Importar Xml",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/compras/importar-xml",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "compras",
                "importar-xml"
              ]
            },
            "description": "Recibe un XML (multipart) y devuelve un CompraInPreview. NO persiste:\nel cliente revisa y confirma con POST /compras/.\n\nAcepta tanto el envoltorio SRI (`<autorizacion><comprobante>...`) como\nel XML plano (`<factura id=\"comprobante\">...`).",
            "body": {
              "mode": "formdata",
              "formdata": []
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Cobros",
      "item": [
        {
          "name": "Listar",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/cobros/?cliente_id=&desde=&hasta=&limit=50&offset=0",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "cobros",
                ""
              ],
              "query": [
                {
                  "key": "cliente_id",
                  "value": "",
                  "description": "Cliente Id",
                  "disabled": true
                },
                {
                  "key": "desde",
                  "value": "",
                  "description": "Desde",
                  "disabled": true
                },
                {
                  "key": "hasta",
                  "value": "",
                  "description": "Hasta",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "50",
                  "description": "Limit",
                  "disabled": true
                },
                {
                  "key": "offset",
                  "value": "0",
                  "description": "Offset",
                  "disabled": true
                }
              ]
            },
            "description": "Listar"
          },
          "response": []
        },
        {
          "name": "Crear",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/cobros/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "cobros",
                ""
              ]
            },
            "description": "Crear",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"cliente_id\": 123,\n  \"fecha\": \"2026-01-15T10:00:00\",\n  \"medio\": \"01\",\n  \"monto\": 100.0,\n  \"referencia\": \"string\",\n  \"notas\": \"string\",\n  \"cuenta_dinero_id\": 1,\n  \"aplicaciones\": [\n    {\n      \"factura_id\": 1,\n      \"monto_aplicado\": 100.0\n    }\n  ],\n  \"sucursal_id\": 1\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Cartera",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/cobros/cartera",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "cobros",
                "cartera"
              ]
            },
            "description": "Cartera"
          },
          "response": []
        },
        {
          "name": "Estado Cuenta",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/cobros/estado-cuenta/:cliente_id?format=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "cobros",
                "estado-cuenta",
                ":cliente_id"
              ],
              "query": [
                {
                  "key": "format",
                  "value": "",
                  "description": "Format",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "cliente_id",
                  "value": "123",
                  "description": "Cliente Id"
                }
              ]
            },
            "description": "Estado Cuenta"
          },
          "response": []
        },
        {
          "name": "Estado Cuenta Pdf",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/cobros/estado-cuenta/:cliente_id/pdf",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "cobros",
                "estado-cuenta",
                ":cliente_id",
                "pdf"
              ],
              "variable": [
                {
                  "key": "cliente_id",
                  "value": "123",
                  "description": "Cliente Id"
                }
              ]
            },
            "description": "Estado Cuenta Pdf"
          },
          "response": []
        },
        {
          "name": "Obtener",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/cobros/:cobro_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "cobros",
                ":cobro_id"
              ],
              "variable": [
                {
                  "key": "cobro_id",
                  "value": "701",
                  "description": "Cobro Id"
                }
              ]
            },
            "description": "Obtener"
          },
          "response": []
        },
        {
          "name": "Anular",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/cobros/:cobro_id/anular",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "cobros",
                ":cobro_id",
                "anular"
              ],
              "variable": [
                {
                  "key": "cobro_id",
                  "value": "701",
                  "description": "Cobro Id"
                }
              ]
            },
            "description": "Anular",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"motivo\": \"Anulación por error\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "PagosProveedor",
      "item": [
        {
          "name": "Listar",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/pagos-proveedor/?proveedor_id=&desde=&hasta=&limit=50&offset=0",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "pagos-proveedor",
                ""
              ],
              "query": [
                {
                  "key": "proveedor_id",
                  "value": "",
                  "description": "Proveedor Id",
                  "disabled": true
                },
                {
                  "key": "desde",
                  "value": "",
                  "description": "Desde",
                  "disabled": true
                },
                {
                  "key": "hasta",
                  "value": "",
                  "description": "Hasta",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "50",
                  "description": "Limit",
                  "disabled": true
                },
                {
                  "key": "offset",
                  "value": "0",
                  "description": "Offset",
                  "disabled": true
                }
              ]
            },
            "description": "Listar"
          },
          "response": []
        },
        {
          "name": "Crear",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/pagos-proveedor/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "pagos-proveedor",
                ""
              ]
            },
            "description": "Crear",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"proveedor_id\": 45,\n  \"fecha\": \"2026-01-15T10:00:00\",\n  \"medio\": \"01\",\n  \"monto\": 100.0,\n  \"referencia\": \"string\",\n  \"notas\": \"string\",\n  \"cuenta_dinero_id\": 1,\n  \"aplicaciones\": [\n    {\n      \"compra_id\": 1,\n      \"monto_aplicado\": 100.0\n    }\n  ],\n  \"sucursal_id\": 1\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Agenda",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/pagos-proveedor/agenda",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "pagos-proveedor",
                "agenda"
              ]
            },
            "description": "Agenda"
          },
          "response": []
        },
        {
          "name": "Obtener",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/pagos-proveedor/:pago_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "pagos-proveedor",
                ":pago_id"
              ],
              "variable": [
                {
                  "key": "pago_id",
                  "value": "801",
                  "description": "Pago Id"
                }
              ]
            },
            "description": "Obtener"
          },
          "response": []
        },
        {
          "name": "Anular",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/pagos-proveedor/:pago_id/anular",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "pagos-proveedor",
                ":pago_id",
                "anular"
              ],
              "variable": [
                {
                  "key": "pago_id",
                  "value": "801",
                  "description": "Pago Id"
                }
              ]
            },
            "description": "Anular",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"motivo\": \"Anulación por error\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "CuentasDinero",
      "item": [
        {
          "name": "Listar",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/cuentas-dinero/?incluir_inactivas=False",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "cuentas-dinero",
                ""
              ],
              "query": [
                {
                  "key": "incluir_inactivas",
                  "value": "False",
                  "description": "Incluir Inactivas",
                  "disabled": true
                }
              ]
            },
            "description": "Listar"
          },
          "response": []
        },
        {
          "name": "Crear",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/cuentas-dinero/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "cuentas-dinero",
                ""
              ]
            },
            "description": "Crear",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"nombre\": \"Banco Pichincha\",\n  \"tipo\": \"banco\",\n  \"banco\": \"string\",\n  \"numero_mascarado\": \"string\",\n  \"saldo_inicial\": 0\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Transferir",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/cuentas-dinero/transferencias",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "cuentas-dinero",
                "transferencias"
              ]
            },
            "description": "Transferir",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"origen_id\": 1,\n  \"destino_id\": 2,\n  \"monto\": 100.0,\n  \"fecha\": \"2026-01-15T10:00:00\",\n  \"descripcion\": \"Licencia mensual\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Obtener",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/cuentas-dinero/:cuenta_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "cuentas-dinero",
                ":cuenta_id"
              ],
              "variable": [
                {
                  "key": "cuenta_id",
                  "value": "1",
                  "description": "Cuenta Id"
                }
              ]
            },
            "description": "Obtener"
          },
          "response": []
        },
        {
          "name": "Actualizar",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/cuentas-dinero/:cuenta_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "cuentas-dinero",
                ":cuenta_id"
              ],
              "variable": [
                {
                  "key": "cuenta_id",
                  "value": "1",
                  "description": "Cuenta Id"
                }
              ]
            },
            "description": "Actualizar",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"nombre\": \"Banco Pichincha\",\n  \"tipo\": \"banco\",\n  \"banco\": \"string\",\n  \"numero_mascarado\": \"string\",\n  \"saldo_inicial\": 1.0,\n  \"activo\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Eliminar",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/cuentas-dinero/:cuenta_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "cuentas-dinero",
                ":cuenta_id"
              ],
              "variable": [
                {
                  "key": "cuenta_id",
                  "value": "1",
                  "description": "Cuenta Id"
                }
              ]
            },
            "description": "Eliminar"
          },
          "response": []
        },
        {
          "name": "Listar Movimientos",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/cuentas-dinero/:cuenta_id/movimientos?desde=&hasta=&tipo=&limit=100&offset=0",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "cuentas-dinero",
                ":cuenta_id",
                "movimientos"
              ],
              "query": [
                {
                  "key": "desde",
                  "value": "",
                  "description": "Desde",
                  "disabled": true
                },
                {
                  "key": "hasta",
                  "value": "",
                  "description": "Hasta",
                  "disabled": true
                },
                {
                  "key": "tipo",
                  "value": "",
                  "description": "Tipo",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "100",
                  "description": "Limit",
                  "disabled": true
                },
                {
                  "key": "offset",
                  "value": "0",
                  "description": "Offset",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "cuenta_id",
                  "value": "1",
                  "description": "Cuenta Id"
                }
              ]
            },
            "description": "Listar Movimientos"
          },
          "response": []
        },
        {
          "name": "Crear Movimiento",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/cuentas-dinero/:cuenta_id/movimientos",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "cuentas-dinero",
                ":cuenta_id",
                "movimientos"
              ],
              "variable": [
                {
                  "key": "cuenta_id",
                  "value": "1",
                  "description": "Cuenta Id"
                }
              ]
            },
            "description": "Crear Movimiento",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tipo\": \"banco\",\n  \"monto\": 100.0,\n  \"fecha\": \"2026-01-15T10:00:00\",\n  \"descripcion\": \"Licencia mensual\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Sucursales",
      "item": [
        {
          "name": "Listar",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/sucursales/?tenant_id=&q=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "sucursales",
                ""
              ],
              "query": [
                {
                  "key": "tenant_id",
                  "value": "",
                  "description": "Tenant Id",
                  "disabled": true
                },
                {
                  "key": "q",
                  "value": "",
                  "description": "Q",
                  "disabled": true
                }
              ]
            },
            "description": "Listar"
          },
          "response": []
        },
        {
          "name": "Crear",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/sucursales/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "sucursales",
                ""
              ]
            },
            "description": "Crear",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"codigo\": \"001\",\n  \"nombre\": \"Banco Pichincha\",\n  \"direccion\": \"Av. Principal 123 y Secundaria\",\n  \"punto_emision\": \"001\",\n  \"tenant_id\": 1\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Actualizar",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/sucursales/:sucursal_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "sucursales",
                ":sucursal_id"
              ],
              "variable": [
                {
                  "key": "sucursal_id",
                  "value": "1",
                  "description": "Sucursal Id"
                }
              ]
            },
            "description": "Actualizar",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"codigo\": \"001\",\n  \"nombre\": \"Banco Pichincha\",\n  \"direccion\": \"Av. Principal 123 y Secundaria\",\n  \"punto_emision\": \"001\",\n  \"tenant_id\": 1\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Eliminar",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/sucursales/:sucursal_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "sucursales",
                ":sucursal_id"
              ],
              "variable": [
                {
                  "key": "sucursal_id",
                  "value": "1",
                  "description": "Sucursal Id"
                }
              ]
            },
            "description": "Eliminar"
          },
          "response": []
        }
      ]
    },
    {
      "name": "Eventos",
      "item": [
        {
          "name": "Listar",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/eventos/?desde_id=&evento=&documento_tipo=&documento_id=&limit=100",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "eventos",
                ""
              ],
              "query": [
                {
                  "key": "desde_id",
                  "value": "",
                  "description": "Cursor: devuelve eventos con id MAYOR a este, en orden ascendente. Guarda el último id procesado para reconciliar.",
                  "disabled": true
                },
                {
                  "key": "evento",
                  "value": "",
                  "description": "Evento",
                  "disabled": true
                },
                {
                  "key": "documento_tipo",
                  "value": "",
                  "description": "Documento Tipo",
                  "disabled": true
                },
                {
                  "key": "documento_id",
                  "value": "",
                  "description": "Documento Id",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "100",
                  "description": "Limit",
                  "disabled": true
                }
              ]
            },
            "description": "Lista eventos de TU empresa. Con `desde_id` pagina hacia adelante (para\nreconciliar); sin él, devuelve los últimos (diagnóstico)."
          },
          "response": []
        },
        {
          "name": "Obtener",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/eventos/:evento_id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "eventos",
                ":evento_id"
              ],
              "variable": [
                {
                  "key": "evento_id",
                  "value": "1",
                  "description": "Evento Id"
                }
              ]
            },
            "description": "Obtener"
          },
          "response": []
        }
      ]
    }
  ],
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "X-API-Key",
        "type": "string"
      },
      {
        "key": "value",
        "value": "{{api_key}}",
        "type": "string"
      },
      {
        "key": "in",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://api.emitoo.io",
      "type": "string"
    },
    {
      "key": "api_key",
      "value": "fpk_tu_api_key_aqui",
      "type": "string"
    }
  ]
}