{
  "info": {
    "_postman_id": "demo-rendiciones-api-v1-complete-20260821",
    "name": "demoRendiciones API v1 — Completa",
    "description": "# demoRendiciones — Colección completa `/api/v1`\n\nCubre Auth, Companies, FormConfig, Users/Import, Notifications, Reports, Reimbursements (standard + APSV), Workflows, AI, Circuito Gastos (missions/person-settlements) e integración por API Key.\n\n## Setup\n1. Importá este archivo en Postman.\n2. Ajustá `baseUrl` (default `http://127.0.0.1:3010`).\n3. Ejecutá **Auth → Login Empleado Sur** (guarda `token`, `companyId`, `userId`).\n4. Para APSV: **Auth → Login Solicitante APSV**.\n5. Multipart: apuntá archivos a `database/seeds/fixtures/comprobante-demo.txt` (o PNGs del seed).\n\n## Password demo\n`Demo123!` — ver `database/seeds/README.md`\n\n## Variables\n`baseUrl`, `token`, `apiKey`, `companyId`, `userId`, `reimbursementId`, `attachmentId`, `templateId`, `notificationId`, `missionId`, `personSettlementId`, `expenseTypeId`, `apsvCompanyId`\n\nOpenAPI: `/api-docs` · Wiki: `/wiki` · Guía: `docs/api/API.md`",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "http://127.0.0.1:3010"
    },
    {
      "key": "token",
      "value": ""
    },
    {
      "key": "apiKey",
      "value": "demo-api-key-holding-001"
    },
    {
      "key": "companyId",
      "value": "2"
    },
    {
      "key": "apsvCompanyId",
      "value": "4"
    },
    {
      "key": "userId",
      "value": ""
    },
    {
      "key": "userEmail",
      "value": ""
    },
    {
      "key": "userRole",
      "value": ""
    },
    {
      "key": "reimbursementId",
      "value": "1"
    },
    {
      "key": "attachmentId",
      "value": "1"
    },
    {
      "key": "templateId",
      "value": "1"
    },
    {
      "key": "notificationId",
      "value": "1"
    },
    {
      "key": "missionId",
      "value": "1"
    },
    {
      "key": "personSettlementId",
      "value": "1"
    },
    {
      "key": "expenseTypeId",
      "value": "1"
    },
    {
      "key": "reportCode",
      "value": "solicitudes_pendientes"
    },
    {
      "key": "year",
      "value": "2026"
    },
    {
      "key": "month",
      "value": "8"
    }
  ],
  "item": [
    {
      "name": "00 · Health & Docs",
      "item": [
        {
          "name": "GET Health",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/health",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "health"
              ]
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('ok', () => pm.response.to.have.status(200));"
                ]
              }
            }
          ]
        },
        {
          "name": "GET OpenAPI JSON",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/openapi.json",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "openapi.json"
              ]
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('openapi', () => { const j=pm.response.json(); pm.expect(j.openapi).to.eql('3.0.3'); });"
                ]
              }
            }
          ]
        },
        {
          "name": "GET Docs hub",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/docs/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "docs"
              ]
            }
          }
        },
        {
          "name": "GET Wiki HTML",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/wiki",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "wiki"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "01 · Auth",
      "item": [
        {
          "name": "Login Empleado Sur",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/auth/login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "auth",
                "login"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"empleado@sur.demo\",\n  \"password\": \"Demo123!\"\n}"
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status 200', () => pm.response.to.have.status(200));",
                  "const j = pm.response.json();",
                  "pm.test('Token presente', () => pm.expect(j.data && j.data.token).to.be.a('string'));",
                  "if (j.data && j.data.token) {",
                  "  pm.collectionVariables.set('token', j.data.token);",
                  "  if (j.data.user) {",
                  "    pm.collectionVariables.set('companyId', String(j.data.user.companyId));",
                  "    pm.collectionVariables.set('userId', String(j.data.user.id));",
                  "    pm.collectionVariables.set('userEmail', j.data.user.email || '');",
                  "    pm.collectionVariables.set('userRole', j.data.user.role || '');",
                  "  }",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Login Empleado 2 Sur",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/auth/login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "auth",
                "login"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"empleado2@sur.demo\",\n  \"password\": \"Demo123!\"\n}"
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status 200', () => pm.response.to.have.status(200));",
                  "const j = pm.response.json();",
                  "pm.test('Token presente', () => pm.expect(j.data && j.data.token).to.be.a('string'));",
                  "if (j.data && j.data.token) {",
                  "  pm.collectionVariables.set('token', j.data.token);",
                  "  if (j.data.user) {",
                  "    pm.collectionVariables.set('companyId', String(j.data.user.companyId));",
                  "    pm.collectionVariables.set('userId', String(j.data.user.id));",
                  "    pm.collectionVariables.set('userEmail', j.data.user.email || '');",
                  "    pm.collectionVariables.set('userRole', j.data.user.role || '');",
                  "  }",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Login Aprobador L1 Sur",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/auth/login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "auth",
                "login"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"aprobador1@sur.demo\",\n  \"password\": \"Demo123!\"\n}"
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status 200', () => pm.response.to.have.status(200));",
                  "const j = pm.response.json();",
                  "pm.test('Token presente', () => pm.expect(j.data && j.data.token).to.be.a('string'));",
                  "if (j.data && j.data.token) {",
                  "  pm.collectionVariables.set('token', j.data.token);",
                  "  if (j.data.user) {",
                  "    pm.collectionVariables.set('companyId', String(j.data.user.companyId));",
                  "    pm.collectionVariables.set('userId', String(j.data.user.id));",
                  "    pm.collectionVariables.set('userEmail', j.data.user.email || '');",
                  "    pm.collectionVariables.set('userRole', j.data.user.role || '');",
                  "  }",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Login Aprobador L2 Sur",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/auth/login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "auth",
                "login"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"aprobador2@sur.demo\",\n  \"password\": \"Demo123!\"\n}"
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status 200', () => pm.response.to.have.status(200));",
                  "const j = pm.response.json();",
                  "pm.test('Token presente', () => pm.expect(j.data && j.data.token).to.be.a('string'));",
                  "if (j.data && j.data.token) {",
                  "  pm.collectionVariables.set('token', j.data.token);",
                  "  if (j.data.user) {",
                  "    pm.collectionVariables.set('companyId', String(j.data.user.companyId));",
                  "    pm.collectionVariables.set('userId', String(j.data.user.id));",
                  "    pm.collectionVariables.set('userEmail', j.data.user.email || '');",
                  "    pm.collectionVariables.set('userRole', j.data.user.role || '');",
                  "  }",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Login Admin Sur",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/auth/login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "auth",
                "login"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"admin@sur.demo\",\n  \"password\": \"Demo123!\"\n}"
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status 200', () => pm.response.to.have.status(200));",
                  "const j = pm.response.json();",
                  "pm.test('Token presente', () => pm.expect(j.data && j.data.token).to.be.a('string'));",
                  "if (j.data && j.data.token) {",
                  "  pm.collectionVariables.set('token', j.data.token);",
                  "  if (j.data.user) {",
                  "    pm.collectionVariables.set('companyId', String(j.data.user.companyId));",
                  "    pm.collectionVariables.set('userId', String(j.data.user.id));",
                  "    pm.collectionVariables.set('userEmail', j.data.user.email || '');",
                  "    pm.collectionVariables.set('userRole', j.data.user.role || '');",
                  "  }",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Login Empleado Norte",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/auth/login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "auth",
                "login"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"empleado@norte.demo\",\n  \"password\": \"Demo123!\"\n}"
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status 200', () => pm.response.to.have.status(200));",
                  "const j = pm.response.json();",
                  "pm.test('Token presente', () => pm.expect(j.data && j.data.token).to.be.a('string'));",
                  "if (j.data && j.data.token) {",
                  "  pm.collectionVariables.set('token', j.data.token);",
                  "  if (j.data.user) {",
                  "    pm.collectionVariables.set('companyId', String(j.data.user.companyId));",
                  "    pm.collectionVariables.set('userId', String(j.data.user.id));",
                  "    pm.collectionVariables.set('userEmail', j.data.user.email || '');",
                  "    pm.collectionVariables.set('userRole', j.data.user.role || '');",
                  "  }",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Login Admin Norte",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/auth/login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "auth",
                "login"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"admin@norte.demo\",\n  \"password\": \"Demo123!\"\n}"
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status 200', () => pm.response.to.have.status(200));",
                  "const j = pm.response.json();",
                  "pm.test('Token presente', () => pm.expect(j.data && j.data.token).to.be.a('string'));",
                  "if (j.data && j.data.token) {",
                  "  pm.collectionVariables.set('token', j.data.token);",
                  "  if (j.data.user) {",
                  "    pm.collectionVariables.set('companyId', String(j.data.user.companyId));",
                  "    pm.collectionVariables.set('userId', String(j.data.user.id));",
                  "    pm.collectionVariables.set('userEmail', j.data.user.email || '');",
                  "    pm.collectionVariables.set('userRole', j.data.user.role || '');",
                  "  }",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Login Admin Holding",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/auth/login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "auth",
                "login"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"admin@holding.demo\",\n  \"password\": \"Demo123!\"\n}"
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status 200', () => pm.response.to.have.status(200));",
                  "const j = pm.response.json();",
                  "pm.test('Token presente', () => pm.expect(j.data && j.data.token).to.be.a('string'));",
                  "if (j.data && j.data.token) {",
                  "  pm.collectionVariables.set('token', j.data.token);",
                  "  if (j.data.user) {",
                  "    pm.collectionVariables.set('companyId', String(j.data.user.companyId));",
                  "    pm.collectionVariables.set('userId', String(j.data.user.id));",
                  "    pm.collectionVariables.set('userEmail', j.data.user.email || '');",
                  "    pm.collectionVariables.set('userRole', j.data.user.role || '');",
                  "  }",
                  "}",
                  "pm.test('Scope multiempresa', () => pm.expect(pm.response.json().data.user.scopeCompanyIds.length).to.be.above(1));"
                ]
              }
            }
          ]
        },
        {
          "name": "Login Solicitante APSV",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/auth/login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "auth",
                "login"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"solicitante@apsv.demo\",\n  \"password\": \"Demo123!\"\n}"
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status 200', () => pm.response.to.have.status(200));",
                  "const j = pm.response.json();",
                  "pm.test('Token presente', () => pm.expect(j.data && j.data.token).to.be.a('string'));",
                  "if (j.data && j.data.token) {",
                  "  pm.collectionVariables.set('token', j.data.token);",
                  "  if (j.data.user) {",
                  "    pm.collectionVariables.set('companyId', String(j.data.user.companyId));",
                  "    pm.collectionVariables.set('userId', String(j.data.user.id));",
                  "    pm.collectionVariables.set('userEmail', j.data.user.email || '');",
                  "    pm.collectionVariables.set('userRole', j.data.user.role || '');",
                  "  }",
                  "}",
                  "pm.collectionVariables.set('apsvCompanyId', String(pm.response.json().data.user.companyId));"
                ]
              }
            }
          ]
        },
        {
          "name": "Login Jefe APSV",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/auth/login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "auth",
                "login"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"jefe@apsv.demo\",\n  \"password\": \"Demo123!\"\n}"
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status 200', () => pm.response.to.have.status(200));",
                  "const j = pm.response.json();",
                  "pm.test('Token presente', () => pm.expect(j.data && j.data.token).to.be.a('string'));",
                  "if (j.data && j.data.token) {",
                  "  pm.collectionVariables.set('token', j.data.token);",
                  "  if (j.data.user) {",
                  "    pm.collectionVariables.set('companyId', String(j.data.user.companyId));",
                  "    pm.collectionVariables.set('userId', String(j.data.user.id));",
                  "    pm.collectionVariables.set('userEmail', j.data.user.email || '');",
                  "    pm.collectionVariables.set('userRole', j.data.user.role || '');",
                  "  }",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Login Gerente APSV",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/auth/login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "auth",
                "login"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"gerente@apsv.demo\",\n  \"password\": \"Demo123!\"\n}"
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status 200', () => pm.response.to.have.status(200));",
                  "const j = pm.response.json();",
                  "pm.test('Token presente', () => pm.expect(j.data && j.data.token).to.be.a('string'));",
                  "if (j.data && j.data.token) {",
                  "  pm.collectionVariables.set('token', j.data.token);",
                  "  if (j.data.user) {",
                  "    pm.collectionVariables.set('companyId', String(j.data.user.companyId));",
                  "    pm.collectionVariables.set('userId', String(j.data.user.id));",
                  "    pm.collectionVariables.set('userEmail', j.data.user.email || '');",
                  "    pm.collectionVariables.set('userRole', j.data.user.role || '');",
                  "  }",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Login Admin APSV",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/auth/login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "auth",
                "login"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"admin@apsv.demo\",\n  \"password\": \"Demo123!\"\n}"
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status 200', () => pm.response.to.have.status(200));",
                  "const j = pm.response.json();",
                  "pm.test('Token presente', () => pm.expect(j.data && j.data.token).to.be.a('string'));",
                  "if (j.data && j.data.token) {",
                  "  pm.collectionVariables.set('token', j.data.token);",
                  "  if (j.data.user) {",
                  "    pm.collectionVariables.set('companyId', String(j.data.user.companyId));",
                  "    pm.collectionVariables.set('userId', String(j.data.user.id));",
                  "    pm.collectionVariables.set('userEmail', j.data.user.email || '');",
                  "    pm.collectionVariables.set('userRole', j.data.user.role || '');",
                  "  }",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "02 · Companies",
      "item": [
        {
          "name": "List companies",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/companies",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "companies"
              ]
            }
          }
        },
        {
          "name": "List companies tree",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/companies",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "companies"
              ],
              "query": [
                {
                  "key": "tree",
                  "value": "1"
                }
              ]
            }
          }
        },
        {
          "name": "Get company",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/companies/{{companyId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "companies",
                "{{companyId}}"
              ]
            }
          }
        },
        {
          "name": "Get company tree",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/companies/{{companyId}}/tree",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "companies",
                "{{companyId}}",
                "tree"
              ]
            }
          }
        },
        {
          "name": "Create company (admin)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/companies",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "companies"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Subempresa Postman\",\n  \"code\": \"POSTMAN-SUB\",\n  \"parentId\": 2,\n  \"active\": true\n}"
            },
            "description": "Requiere token admin. Ajustá parentId al scope."
          }
        },
        {
          "name": "Update company (admin)",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/companies/{{companyId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "companies",
                "{{companyId}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Sucursal Sur\"\n}"
            }
          }
        },
        {
          "name": "Delete company soft (admin)",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/companies/{{companyId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "companies",
                "{{companyId}}"
              ]
            },
            "description": "Cuidado en demo: desactiva. Preferí no correr en seed canónico."
          }
        },
        {
          "name": "Get form-config",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/companies/{{companyId}}/form-config",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "companies",
                "{{companyId}}",
                "form-config"
              ]
            }
          }
        },
        {
          "name": "Get form-config APSV",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/companies/{{apsvCompanyId}}/form-config",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "companies",
                "{{apsvCompanyId}}",
                "form-config"
              ]
            }
          }
        },
        {
          "name": "Put form-config (admin)",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/companies/{{companyId}}/form-config",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "companies",
                "{{companyId}}",
                "form-config"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"formCode\": \"standard\",\n  \"active\": true,\n  \"schemaJson\": {\n    \"version\": 1\n  },\n  \"viaticoRulesJson\": null\n}"
            }
          }
        }
      ]
    },
    {
      "name": "03 · Users & Menu",
      "item": [
        {
          "name": "List users",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/users",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "users"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "pageSize",
                  "value": "50"
                },
                {
                  "key": "companyId",
                  "value": "{{companyId}}"
                }
              ]
            }
          }
        },
        {
          "name": "Create user (admin)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/users",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "users"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"postman.nuevo@sur.demo\",\n  \"firstName\": \"Postman\",\n  \"lastName\": \"Nuevo\",\n  \"role\": \"employee\",\n  \"companyId\": 2,\n  \"password\": \"Demo123!\",\n  \"active\": true\n}"
            }
          }
        },
        {
          "name": "Import users JSON (admin)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/users/import",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "users",
                "import"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"continueOnError\": true,\n  \"upsert\": true,\n  \"users\": [\n    {\n      \"email\": \"import.postman@sur.demo\",\n      \"firstName\": \"Import\",\n      \"lastName\": \"Postman\",\n      \"role\": \"employee\",\n      \"companyId\": 2,\n      \"password\": \"Demo123!\"\n    }\n  ]\n}"
            }
          }
        },
        {
          "name": "Import users file CSV (admin)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/users/import/file",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "users",
                "import",
                "file"
              ]
            },
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "file",
                  "type": "file",
                  "src": "database/seeds/people-import-sample.csv",
                  "description": "Ajustá path local al CSV del seed · Path relativo al repo; en Postman seleccioná el archivo local."
                },
                {
                  "key": "continueOnError",
                  "type": "text",
                  "value": "true",
                  "description": ""
                },
                {
                  "key": "upsert",
                  "type": "text",
                  "value": "true",
                  "description": ""
                }
              ]
            }
          }
        },
        {
          "name": "Menu catalog (admin)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/menu-catalog",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "menu-catalog"
              ]
            }
          }
        },
        {
          "name": "Get user menu (admin)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/users/{{userId}}/menu",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "users",
                "{{userId}}",
                "menu"
              ]
            }
          }
        },
        {
          "name": "Put user menu (admin)",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/users/{{userId}}/menu",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "users",
                "{{userId}}",
                "menu"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"items\": [\n    \"reimbursements\",\n    \"companies\",\n    \"reports\"\n  ]\n}"
            }
          }
        }
      ]
    },
    {
      "name": "04 · Notifications",
      "item": [
        {
          "name": "List notifications",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/notifications",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "notifications"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "pageSize",
                  "value": "20"
                },
                {
                  "key": "unreadOnly",
                  "value": "0"
                }
              ]
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('200', () => pm.response.to.have.status(200));",
                  "try {",
                  "  const j = pm.response.json();",
                  "  const rows = (j.data && j.data.rows) || [];",
                  "  if (rows[0] && rows[0].id) pm.collectionVariables.set('notificationId', String(rows[0].id));",
                  "} catch (e) {}"
                ]
              }
            }
          ]
        },
        {
          "name": "List unread only",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/notifications",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "notifications"
              ],
              "query": [
                {
                  "key": "unreadOnly",
                  "value": "1"
                }
              ]
            }
          }
        },
        {
          "name": "Mark notification read",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/notifications/{{notificationId}}/read",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "notifications",
                "{{notificationId}}",
                "read"
              ]
            }
          }
        },
        {
          "name": "Mark all read",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/notifications/read-all",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "notifications",
                "read-all"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "05 · Reports",
      "item": [
        {
          "name": "List report catalog",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reports",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reports"
              ]
            }
          }
        },
        {
          "name": "Export report by code",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reports/{{reportCode}}/export",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reports",
                "{{reportCode}}",
                "export"
              ],
              "query": [
                {
                  "key": "from",
                  "value": "2026-01-01"
                },
                {
                  "key": "to",
                  "value": "2026-12-31"
                },
                {
                  "key": "companyId",
                  "value": "{{companyId}}"
                }
              ]
            }
          }
        },
        {
          "name": "Person-month report JSON",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reports/person-month",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reports",
                "person-month"
              ],
              "query": [
                {
                  "key": "year",
                  "value": "{{year}}"
                },
                {
                  "key": "month",
                  "value": "{{month}}"
                }
              ]
            }
          }
        },
        {
          "name": "Person-month export Excel",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reports/person-month/export",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reports",
                "person-month",
                "export"
              ],
              "query": [
                {
                  "key": "year",
                  "value": "{{year}}"
                },
                {
                  "key": "month",
                  "value": "{{month}}"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "06 · Reimbursements · Standard",
      "item": [
        {
          "name": "List reimbursements",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "pageSize",
                  "value": "50"
                },
                {
                  "key": "companyId",
                  "value": "{{companyId}}"
                }
              ]
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('200', () => pm.response.to.have.status(200));",
                  "try {",
                  "  const j = pm.response.json();",
                  "  const rows = j.data || [];",
                  "  if (rows[0] && rows[0].id) pm.collectionVariables.set('reimbursementId', String(rows[0].id));",
                  "} catch (e) {}"
                ]
              }
            }
          ]
        },
        {
          "name": "List inbox aprobación",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements"
              ],
              "query": [
                {
                  "key": "inbox",
                  "value": "1"
                }
              ]
            }
          }
        },
        {
          "name": "Get by id",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/{{reimbursementId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "{{reimbursementId}}"
              ]
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('200', () => pm.response.to.have.status(200));",
                  "try {",
                  "  const j = pm.response.json();",
                  "  const atts = (j.data && j.data.attachments) || [];",
                  "  if (atts[0] && atts[0].id) pm.collectionVariables.set('attachmentId', String(atts[0].id));",
                  "} catch (e) {}"
                ]
              }
            }
          ]
        },
        {
          "name": "List events",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/{{reimbursementId}}/events",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "{{reimbursementId}}",
                "events"
              ]
            }
          }
        },
        {
          "name": "Download PDF",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/{{reimbursementId}}/pdf",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "{{reimbursementId}}",
                "pdf"
              ]
            }
          }
        },
        {
          "name": "Download attachment",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/{{reimbursementId}}/attachments/{{attachmentId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "{{reimbursementId}}",
                "attachments",
                "{{attachmentId}}"
              ]
            }
          }
        },
        {
          "name": "Export Excel",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/export",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "export"
              ],
              "query": [
                {
                  "key": "format",
                  "value": "xlsx"
                },
                {
                  "key": "companyId",
                  "value": "{{companyId}}"
                }
              ]
            }
          }
        },
        {
          "name": "Export CSV",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/export",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "export"
              ],
              "query": [
                {
                  "key": "format",
                  "value": "csv"
                },
                {
                  "key": "companyId",
                  "value": "{{companyId}}"
                }
              ]
            }
          }
        },
        {
          "name": "Create multipart (standard)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements"
              ]
            },
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "companyId",
                  "type": "text",
                  "value": "{{companyId}}",
                  "description": ""
                },
                {
                  "key": "date",
                  "type": "text",
                  "value": "2026-08-15",
                  "description": ""
                },
                {
                  "key": "amount",
                  "type": "text",
                  "value": "1250.50",
                  "description": ""
                },
                {
                  "key": "observation",
                  "type": "text",
                  "value": "Gasto demo Postman",
                  "description": ""
                },
                {
                  "key": "currency",
                  "type": "text",
                  "value": "ARS",
                  "description": ""
                },
                {
                  "key": "merchantName",
                  "type": "text",
                  "value": "Comercio Demo",
                  "description": ""
                },
                {
                  "key": "files",
                  "type": "file",
                  "src": "database/seeds/fixtures/comprobante-demo.txt",
                  "description": "Ajustá path local · Path relativo al repo; en Postman seleccioná el archivo local."
                }
              ]
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('OK', () => pm.expect(pm.response.code).to.be.oneOf([200,201]));",
                  "try {",
                  "  const j = pm.response.json();",
                  "  const id = j.data && (j.data.id || (j.data.reimbursement && j.data.reimbursement.id));",
                  "  if (id) pm.collectionVariables.set('reimbursementId', String(id));",
                  "} catch (e) {}"
                ]
              }
            }
          ]
        },
        {
          "name": "Update multipart",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/{{reimbursementId}}/update",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "{{reimbursementId}}",
                "update"
              ]
            },
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "observation",
                  "type": "text",
                  "value": "Observación actualizada Postman",
                  "description": ""
                },
                {
                  "key": "amount",
                  "type": "text",
                  "value": "1300.00",
                  "description": ""
                }
              ]
            }
          }
        },
        {
          "name": "Approve level",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/{{reimbursementId}}/approve",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "{{reimbursementId}}",
                "approve"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"approve\": true,\n  \"motive\": \"OK Postman\"\n}"
            },
            "description": "Usá token de aprobador del nivel activo o admin."
          }
        },
        {
          "name": "Reject level",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/{{reimbursementId}}/approve",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "{{reimbursementId}}",
                "approve"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"approve\": false,\n  \"motive\": \"Rechazo demo Postman\"\n}"
            }
          }
        },
        {
          "name": "Signature",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/{{reimbursementId}}/signature",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "{{reimbursementId}}",
                "signature"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"signature\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==\"\n}"
            }
          }
        },
        {
          "name": "Pay (admin)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/{{reimbursementId}}/pay",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "{{reimbursementId}}",
                "pay"
              ]
            },
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "paymentReference",
                  "type": "text",
                  "value": "TRX-POSTMAN-001",
                  "description": ""
                },
                {
                  "key": "motive",
                  "type": "text",
                  "value": "Pago demo",
                  "description": ""
                }
              ]
            }
          }
        },
        {
          "name": "Cancel",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/{{reimbursementId}}/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "{{reimbursementId}}",
                "cancel"
              ]
            }
          }
        },
        {
          "name": "Delete",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/{{reimbursementId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "{{reimbursementId}}"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "07 · Reimbursements · APSV",
      "description": "Flujo: login solicitante APSV → create DRAFT → update → submit → approve×N → settlement → observe? → liquidate",
      "item": [
        {
          "name": "Create draft APSV",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements"
              ]
            },
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "companyId",
                  "type": "text",
                  "value": "{{apsvCompanyId}}",
                  "description": ""
                },
                {
                  "key": "destination",
                  "type": "text",
                  "value": "Rosario",
                  "description": ""
                },
                {
                  "key": "motive",
                  "type": "text",
                  "value": "Comisión técnica Postman",
                  "description": ""
                },
                {
                  "key": "startAt",
                  "type": "text",
                  "value": "2026-08-10",
                  "description": ""
                },
                {
                  "key": "endAt",
                  "type": "text",
                  "value": "2026-08-12",
                  "description": ""
                },
                {
                  "key": "officialVehicle",
                  "type": "text",
                  "value": "no",
                  "description": ""
                },
                {
                  "key": "observation",
                  "type": "text",
                  "value": "Borrador APSV Postman",
                  "description": ""
                },
                {
                  "key": "agents",
                  "type": "text",
                  "value": "[{\"name\":\"Solicitante Demo\",\"role\":\"agente\"}]",
                  "description": ""
                }
              ]
            },
            "description": "Token: solicitante@apsv.demo. Crea DRAFT (formCode viaticos_apsv)."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('OK', () => pm.expect(pm.response.code).to.be.oneOf([200,201]));",
                  "try {",
                  "  const j = pm.response.json();",
                  "  const id = j.data && (j.data.id || (j.data.reimbursement && j.data.reimbursement.id));",
                  "  if (id) pm.collectionVariables.set('reimbursementId', String(id));",
                  "} catch (e) {}"
                ]
              }
            }
          ]
        },
        {
          "name": "Update draft APSV",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/{{reimbursementId}}/update",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "{{reimbursementId}}",
                "update"
              ]
            },
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "destination",
                  "type": "text",
                  "value": "Córdoba",
                  "description": ""
                },
                {
                  "key": "motive",
                  "type": "text",
                  "value": "Comisión actualizada",
                  "description": ""
                }
              ]
            }
          }
        },
        {
          "name": "Submit APSV",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/{{reimbursementId}}/submit",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "{{reimbursementId}}",
                "submit"
              ]
            },
            "description": "DRAFT → SUBMITTED + workflow 3 niveles"
          }
        },
        {
          "name": "Approve L1 (Jefe)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/{{reimbursementId}}/approve",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "{{reimbursementId}}",
                "approve"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"approve\": true\n}"
            },
            "description": "Login jefe@apsv.demo antes"
          }
        },
        {
          "name": "Approve L2 (Gerente)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/{{reimbursementId}}/approve",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "{{reimbursementId}}",
                "approve"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"approve\": true\n}"
            },
            "description": "Login gerente@apsv.demo antes"
          }
        },
        {
          "name": "Approve L3 (Admin)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/{{reimbursementId}}/approve",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "{{reimbursementId}}",
                "approve"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"approve\": true\n}"
            },
            "description": "Login admin@apsv.demo → PENDING_SETTLEMENT"
          }
        },
        {
          "name": "Settlement",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/{{reimbursementId}}/settlement",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "{{reimbursementId}}",
                "settlement"
              ]
            },
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "viaticoLines",
                  "type": "text",
                  "value": "[{\"direction\":\"ida\",\"days\":2,\"quota\":15000,\"amount\":30000},{\"direction\":\"regreso\",\"days\":1,\"quota\":15000,\"amount\":15000}]",
                  "description": ""
                },
                {
                  "key": "expenseLines",
                  "type": "text",
                  "value": "[{\"date\":\"2026-08-11\",\"amount\":8500,\"concept\":\"Peaje\",\"observation\":\"Autopista\"}]",
                  "description": ""
                },
                {
                  "key": "files",
                  "type": "file",
                  "src": "database/seeds/fixtures/comprobante-demo.txt",
                  "description": "Path relativo al repo; en Postman seleccioná el archivo local."
                }
              ]
            }
          }
        },
        {
          "name": "Observe (admin)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/{{reimbursementId}}/observe",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "{{reimbursementId}}",
                "observe"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"motive\": \"Falta ticket de peaje legible\"\n}"
            }
          }
        },
        {
          "name": "Liquidate (admin)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements/{{reimbursementId}}/liquidate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements",
                "{{reimbursementId}}",
                "liquidate"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "08 · Workflow Templates",
      "item": [
        {
          "name": "List templates",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/workflow-templates",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "workflow-templates"
              ]
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('200', () => pm.response.to.have.status(200));",
                  "try { const rows=pm.response.json().data||[]; if(rows[0]) pm.collectionVariables.set('templateId', String(rows[0].id)); } catch(e){}"
                ]
              }
            }
          ]
        },
        {
          "name": "Get template",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/workflow-templates/{{templateId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "workflow-templates",
                "{{templateId}}"
              ]
            }
          }
        },
        {
          "name": "Create template (admin)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/workflow-templates",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "workflow-templates"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"companyId\": 2,\n  \"name\": \"Plantilla Postman 2 niveles\",\n  \"active\": true,\n  \"levels\": [\n    {\n      \"level\": 1,\n      \"userId\": 0,\n      \"label\": \"Jefe\"\n    },\n    {\n      \"level\": 2,\n      \"userId\": 0,\n      \"label\": \"Gerente\"\n    }\n  ]\n}"
            },
            "description": "Reemplazá userId por IDs reales de aprobadores del seed."
          }
        },
        {
          "name": "Update template (admin)",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/workflow-templates/{{templateId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "workflow-templates",
                "{{templateId}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Plantilla actualizada Postman\",\n  \"active\": true\n}"
            }
          }
        },
        {
          "name": "Delete template (admin)",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/workflow-templates/{{templateId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "workflow-templates",
                "{{templateId}}"
              ]
            },
            "description": "No ejecutar sobre plantillas del seed si necesitás el flujo demo."
          }
        }
      ]
    },
    {
      "name": "09 · Person Workflows",
      "item": [
        {
          "name": "List person workflows",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/person-workflows",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "person-workflows"
              ]
            }
          }
        },
        {
          "name": "Get person workflow",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/person-workflows/person/{{userId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "person-workflows",
                "person",
                "{{userId}}"
              ],
              "query": [
                {
                  "key": "companyId",
                  "value": "{{companyId}}"
                }
              ]
            }
          }
        },
        {
          "name": "Upsert person workflow",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/person-workflows/person/{{userId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "person-workflows",
                "person",
                "{{userId}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"companyId\": 2,\n  \"levels\": [\n    {\n      \"level\": 1,\n      \"userId\": 0,\n      \"label\": \"Override L1\"\n    },\n    {\n      \"level\": 2,\n      \"userId\": 0,\n      \"label\": \"Override L2\"\n    }\n  ]\n}"
            }
          }
        },
        {
          "name": "Delete person workflow",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/person-workflows/person/{{userId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "person-workflows",
                "person",
                "{{userId}}"
              ],
              "query": [
                {
                  "key": "companyId",
                  "value": "{{companyId}}"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "10 · AI",
      "item": [
        {
          "name": "Analyze suggest",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/ai/analyze",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "ai",
                "analyze"
              ]
            },
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "companyId",
                  "type": "text",
                  "value": "{{companyId}}",
                  "description": ""
                },
                {
                  "key": "mode",
                  "type": "text",
                  "value": "suggest",
                  "description": ""
                },
                {
                  "key": "files",
                  "type": "file",
                  "src": "database/seeds/fixtures/comprobante-demo.txt",
                  "description": "Path relativo al repo; en Postman seleccioná el archivo local."
                }
              ]
            },
            "description": "Requiere AI_ENABLED + aiScanEnabled en la empresa (Sur=true en seed)."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('2xx o 503/403 esperado sin AI', () => pm.expect(pm.response.code).to.be.oneOf([200,403,422,503]));"
                ]
              }
            }
          ]
        },
        {
          "name": "Analyze and create",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/ai/analyze-and-create",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "ai",
                "analyze-and-create"
              ]
            },
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "companyId",
                  "type": "text",
                  "value": "{{companyId}}",
                  "description": ""
                },
                {
                  "key": "observation",
                  "type": "text",
                  "value": "Creado vía IA Postman",
                  "description": ""
                },
                {
                  "key": "files",
                  "type": "file",
                  "src": "database/seeds/fixtures/comprobante-demo.txt",
                  "description": "Path relativo al repo; en Postman seleccioná el archivo local."
                }
              ]
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('respuesta', () => pm.expect(pm.response.code).to.be.oneOf([200,400,403,422,503]));",
                  "try { const j=pm.response.json(); if(j.data&&j.data.reimbursement&&j.data.reimbursement.id) pm.collectionVariables.set('reimbursementId', String(j.data.reimbursement.id)); } catch(e){}"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "11 · Circuito Gastos · Types & Rates",
      "item": [
        {
          "name": "List expense types",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/expense-types",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "expense-types"
              ]
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('200', () => pm.response.to.have.status(200));",
                  "try { const rows=pm.response.json().data||[]; if(rows[0]) pm.collectionVariables.set('expenseTypeId', String(rows[0].id)); } catch(e){}"
                ]
              }
            }
          ]
        },
        {
          "name": "Create expense type (admin)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/expense-types",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "expense-types"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"code\": \"POSTMAN\",\n  \"slug\": \"postman\",\n  \"label\": \"Tipo Postman\",\n  \"active\": true,\n  \"sortOrder\": 99,\n  \"allowsDecimalQty\": true\n}"
            }
          }
        },
        {
          "name": "Update expense type (admin)",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/expense-types/{{expenseTypeId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "expense-types",
                "{{expenseTypeId}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"label\": \"Tipo actualizado Postman\",\n  \"active\": true\n}"
            }
          }
        },
        {
          "name": "List monthly rates",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/expense-types/monthly-rates",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "expense-types",
                "monthly-rates"
              ],
              "query": [
                {
                  "key": "year",
                  "value": "{{year}}"
                },
                {
                  "key": "month",
                  "value": "{{month}}"
                }
              ]
            }
          }
        },
        {
          "name": "Put monthly rates",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/expense-types/monthly-rates",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "expense-types",
                "monthly-rates"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"year\": 2026,\n  \"month\": 8,\n  \"rates\": [\n    {\n      \"expenseTypeId\": 1,\n      \"unitRate\": 15000\n    }\n  ]\n}"
            },
            "description": "Ajustá expenseTypeId a IDs reales del listado."
          }
        },
        {
          "name": "List delegations",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/delegations",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "delegations"
              ]
            }
          }
        },
        {
          "name": "List persons",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/persons",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "persons"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "12 · Circuito Gastos · Missions",
      "item": [
        {
          "name": "List missions",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/missions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "missions"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "pageSize",
                  "value": "20"
                }
              ]
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('200', () => pm.response.to.have.status(200));",
                  "try { const items=(pm.response.json().data&&pm.response.json().data.items)||[]; if(items[0]) pm.collectionVariables.set('missionId', String(items[0].id)); } catch(e){}"
                ]
              }
            }
          ]
        },
        {
          "name": "Create mission DRAFT",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/missions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "missions"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"destination\": \"Santa Fe\",\n  \"motive\": \"Misión Postman\",\n  \"startAt\": \"2026-08-20\",\n  \"endAt\": \"2026-08-22\",\n  \"officialMobility\": \"no\",\n  \"observations\": \"Creada desde Postman\",\n  \"agents\": [\n    {\n      \"name\": \"Agente Demo\"\n    }\n  ],\n  \"selectedTypeIds\": [\n    1\n  ]\n}"
            },
            "description": "Ajustá selectedTypeIds con IDs de GET /expense-types"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('OK', () => pm.expect(pm.response.code).to.be.oneOf([200,201]));",
                  "try {",
                  "  const j = pm.response.json();",
                  "  if (j.data && j.data.id) pm.collectionVariables.set('missionId', String(j.data.id));",
                  "} catch (e) {}"
                ]
              }
            }
          ]
        },
        {
          "name": "Get mission",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/missions/{{missionId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "missions",
                "{{missionId}}"
              ]
            }
          }
        },
        {
          "name": "Update mission",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/missions/{{missionId}}/update",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "missions",
                "{{missionId}}",
                "update"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"destination\": \"Paraná\",\n  \"motive\": \"Misión actualizada\",\n  \"agents\": [\n    {\n      \"name\": \"Agente Demo\"\n    }\n  ],\n  \"selectedTypeIds\": [\n    1\n  ]\n}"
            }
          }
        },
        {
          "name": "Submit mission",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/missions/{{missionId}}/submit",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "missions",
                "{{missionId}}",
                "submit"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "13 · Circuito Gastos · Person Settlements",
      "item": [
        {
          "name": "List person settlements",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/person-settlements",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "person-settlements"
              ],
              "query": [
                {
                  "key": "year",
                  "value": "{{year}}"
                },
                {
                  "key": "month",
                  "value": "{{month}}"
                }
              ]
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('OK', () => pm.expect([200,201].includes(pm.response.code)).to.be.true);",
                  "try {",
                  "  const j = pm.response.json();",
                  "  const row = Array.isArray(j.data) ? j.data[0] : (j.data && j.data[0]) || j.data;",
                  "  const id = row && row.id;",
                  "  if (id) pm.collectionVariables.set('personSettlementId', String(id));",
                  "} catch (e) {}"
                ]
              }
            }
          ]
        },
        {
          "name": "Get person settlement",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/person-settlements/{{personSettlementId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "person-settlements",
                "{{personSettlementId}}"
              ]
            }
          }
        },
        {
          "name": "Approve person settlement",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/person-settlements/{{personSettlementId}}/approve",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "person-settlements",
                "{{personSettlementId}}",
                "approve"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"approve\": true,\n  \"motive\": \"OK\"\n}"
            }
          }
        },
        {
          "name": "Patch quantities",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/person-settlements/{{personSettlementId}}/quantities",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "person-settlements",
                "{{personSettlementId}}",
                "quantities"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"lines\": [\n    {\n      \"expenseTypeId\": 1,\n      \"quantity\": 2\n    }\n  ]\n}"
            }
          }
        },
        {
          "name": "Add attachments",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/person-settlements/{{personSettlementId}}/attachments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "person-settlements",
                "{{personSettlementId}}",
                "attachments"
              ]
            },
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "files",
                  "type": "file",
                  "src": "database/seeds/fixtures/comprobante-demo.txt",
                  "description": "Path relativo al repo; en Postman seleccioná el archivo local."
                }
              ]
            }
          }
        },
        {
          "name": "Download attachment",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/person-settlements/{{personSettlementId}}/attachments/{{attachmentId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "person-settlements",
                "{{personSettlementId}}",
                "attachments",
                "{{attachmentId}}"
              ]
            }
          }
        },
        {
          "name": "Observe",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/person-settlements/{{personSettlementId}}/observe",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "person-settlements",
                "{{personSettlementId}}",
                "observe"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"motive\": \"Observación Postman\"\n}"
            }
          }
        },
        {
          "name": "Liquidate",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/person-settlements/{{personSettlementId}}/liquidate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "person-settlements",
                "{{personSettlementId}}",
                "liquidate"
              ]
            }
          }
        },
        {
          "name": "Unliquidate",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/person-settlements/{{personSettlementId}}/unliquidate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "person-settlements",
                "{{personSettlementId}}",
                "unliquidate"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}"
            }
          }
        },
        {
          "name": "Download PDF",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/person-settlements/{{personSettlementId}}/pdf",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "person-settlements",
                "{{personSettlementId}}",
                "pdf"
              ]
            }
          }
        },
        {
          "name": "Certify signature",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/signatures/certify",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "signatures",
                "certify"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"signature\": \"stub-postman\",\n  \"context\": \"person-settlement\"\n}"
            }
          }
        }
      ]
    },
    {
      "name": "14 · Integración API Key",
      "item": [
        {
          "name": "List reimbursements (API Key)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "pageSize",
                  "value": "10"
                }
              ]
            }
          }
        },
        {
          "name": "Create reimbursement (API Key)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/reimbursements",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "reimbursements"
              ]
            },
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "companyId",
                  "type": "text",
                  "value": "2",
                  "description": ""
                },
                {
                  "key": "userId",
                  "type": "text",
                  "value": "3",
                  "description": "Obligatorio con API Key — ID empleado Sur"
                },
                {
                  "key": "date",
                  "type": "text",
                  "value": "2026-08-15",
                  "description": ""
                },
                {
                  "key": "amount",
                  "type": "text",
                  "value": "500",
                  "description": ""
                },
                {
                  "key": "observation",
                  "type": "text",
                  "value": "Alta vía API Key Postman",
                  "description": ""
                },
                {
                  "key": "files",
                  "type": "file",
                  "src": "database/seeds/fixtures/comprobante-demo.txt",
                  "description": "Path relativo al repo; en Postman seleccioná el archivo local."
                }
              ]
            },
            "description": "Header X-API-Key. Ajustá userId al empleado real del seed."
          }
        },
        {
          "name": "List companies (API Key)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/companies",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "companies"
              ]
            }
          }
        }
      ]
    }
  ]
}