{
  "info": {
    "name": "API do Faturamento Automático (v1.0.0)",
    "description": "Você que é dev, divirta-se! ✨\n\n> **Índice da documentação** — acesse o índice completo em [https://docs.billing.kobana.com.br/llms.txt](https://docs.billing.kobana.com.br/llms.txt). Use este arquivo para descobrir todas as páginas disponíveis antes de explorar.\n\n> **Atenção às versões da API** — você está na documentação da **v1.0** da API do Faturamento Automático, que cobre os endpoints de **Assinaturas** (criação, alteração de plano, pausa, cancelamento, faturamento manual, sincronização de itens) e recursos correlatos. Recursos como **Pagamentos, Transferências, Extrato e Recebimento por Pix** seguem disponíveis em outras APIs da Kobana — use o seletor de produto no menu superior para acessá-las.\n\n## Formato\n\nA API aceita apenas o formato `JSON`. Todas as requisições devem usar `Content-Type: application/json`. Todas as respostas usam `snake_case`.\n\n| Tipo de Campo | Formato |\n| :--- | :--- |\n| **DateTime** | Formato [ISO8601](https://pt.wikipedia.org/wiki/ISO_8601). Exemplos — Data: `2026-01-24`. Data e Hora: `2026-01-24T10:07Z` |\n| **Money (`_cents`)** | Inteiro em centavos (÷100). Ex.: `10000` = R$ 100,00 |\n| **Money (`_subcents`)** | Inteiro em subcentavos (÷10000), usado em precificação. Ex.: `1000000` = R$ 100,00 |\n| **UUID** | Identificadores de recursos no formato UUID v4 |\n\n## Convenções\n\nConvenções usadas nesta documentação:\n\n| Convenção | Descrição |\n| :--- | :--- |\n| **`:variable`** | Nome de variável que precisa ser substituída em uma URL. |\n| **`#{variable}`** | Nome de variável que precisa ser substituída por valores da sua conta. |\n| **`...`** | Conteúdo da resposta truncado para facilitar a leitura. |\n| **`$KOBANA_TOKEN`** | Token de acesso. Para testes em linha de comando, exporte-o: `export KOBANA_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxx` e cole os comandos da documentação no terminal. |\n\n## Códigos de Retorno\n\nA API retorna códigos HTTP padrão:\n\n| | Código | Descrição |\n| :--- | :--- | :--- |\n| ✅ | **200 OK** | Requisição bem-sucedida com corpo de resposta. |\n| ✅ | **201 Created** | Recurso criado com sucesso. |\n| ✅ | **204 No Content** | Requisição bem-sucedida, sem corpo de resposta. |\n| ❌ | **400 Bad Request** | Requisição inválida, em geral conteúdo mal formado. |\n| ❌ | **401 Unauthorized** | Token de acesso ausente ou inválido. |\n| ❌ | **403 Forbidden** | Acesso à API bloqueado ou usuário sem permissão. |\n| ❌ | **404 Not Found** | Endereço acessado não existe. |\n| ❌ | **422 Unprocessable Entity** | Requisição válida, mas os dados enviados não são. |\n| ❌ | **429 Too Many Requests** | Limite de requisições atingido. |\n| ❌ | **500 Internal Server Error** | Erro interno no processamento. Consulte o [status dos servidores](https://status.kobana.com.br). |\n\n## ID das Requisições (Request ID)\n\nCada requisição possui um identificador associado, disponível no cabeçalho `Request-Id` da resposta. Esse valor ajuda na depuração e auditoria — as requisições e seus IDs podem ser consultadas no painel do sistema. O log de requisições fica disponível por **30 dias**. Ao abrir um chamado de suporte sobre uma requisição específica, informe o `Request-Id` para acelerar a investigação.\n\n## Segurança\n\nA API da Kobana usa certificados **SSL 2048 bits**. Toda requisição deve ser feita via **HTTPS** — chamadas na porta 80 são redirecionadas para 443.\n\nOs clientes devem suportar `TLSv1.2` ou `TLSv1.3` com uma das cifras: `TLS_AES_128_GCM_SHA256`, `TLS_AES_256_GCM_SHA384`, `TLS_CHACHA20_POLY1305_SHA256`, `ECDHE-RSA-AES128-GCM-SHA256`, `ECDHE-RSA-AES128-SHA256`, `ECDHE-RSA-AES256-GCM-SHA384`, `ECDHE-RSA-CHACHA20-POLY1305`, `ECDHE-RSA-AES256-SHA384`. `TLSv1` e `TLSv1.1` não são suportados.\n\n## Cache HTTP\n\nUse os cabeçalhos HTTP de cache para reduzir carga e ganhar velocidade. A maioria das respostas inclui `ETag` e/ou `Last-Modified` — armazene esses valores e reenvie nas próximas requisições via `If-None-Match` e `If-Modified-Since`. Se o recurso não mudou, a resposta será `304 Not Modified`, sem corpo e sem reprocessamento. Mais informações: [HTTP Cache Docs](http://www.mnot.net/cache_docs/).\n\n## Tratamento de Erros\n\nErros 5xx indicam falhas no servidor: **500 Internal Server Error** (aplicação indisponível), **502 Bad Gateway**, **503 Service Unavailable** e **504 Gateway Timeout** (falhas pontuais de infraestrutura). Sua aplicação deve identificar esses códigos e reagendar a requisição após alguns minutos com backoff. Status dos servidores: [https://status.kobana.com.br](https://status.kobana.com.br).\n\n## Valores monetários\n\nValores monetários seguem duas convenções: campos com sufixo `_cents` (÷100) e campos de precificação com sufixo `_subcents` (÷10000). Use estas convenções para converter para reais (BRL) antes de exibir ao usuário final.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{bearerToken}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.billing.kobana.com.br",
      "type": "string",
      "description": "https://api.billing.kobana.com.br — Produção. Substituído em tempo de execução quando `API_V1_PUBLIC_URL` é definido.\nhttps://api.billing.sandbox.kobana.com.br — Sandbox — ambiente de testes isolado da produção."
    },
    {
      "key": "bearerToken",
      "value": "",
      "type": "string",
      "description": "JWT (HS512) usado no header Authorization: Bearer."
    }
  ],
  "item": [
    {
      "name": "Assinaturas",
      "item": [
        {
          "name": "Listar assinaturas",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/subscriptions?page=1&per_page=20&sort_by=&sort_order=asc&status=draft&plan_id=00000000-0000-0000-0000-000000000000&billing_cycle=monthly&billing_account_id=00000000-0000-0000-0000-000000000000&search=&date_from=2026-01-01T00:00:00Z&date_to=2026-01-01T00:00:00Z",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "subscriptions"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "draft",
                  "disabled": true
                },
                {
                  "key": "plan_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "billing_cycle",
                  "value": "monthly",
                  "disabled": true
                },
                {
                  "key": "billing_account_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "date_from",
                  "value": "2026-01-01T00:00:00Z",
                  "disabled": true
                },
                {
                  "key": "date_to",
                  "value": "2026-01-01T00:00:00Z",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada das assinaturas da organização atual."
          },
          "response": []
        },
        {
          "name": "Criar assinatura",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/subscriptions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "subscriptions"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"billing_account_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"company_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"plan_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"product_group_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"billing_cycle\": \"monthly\",\n  \"collection_method\": \"charge_automatically\",\n  \"trial_end\": \"2026-01-01T00:00:00Z\",\n  \"trial_period_days\": 0,\n  \"discount_code_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"proration_behavior\": \"create_prorations\",\n  \"nfe_issuance_policy\": \"disabled\",\n  \"items\": [\n    {\n      \"product_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"price_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"quantity\": 1,\n      \"unit_amount_subcents\": 0\n    }\n  ],\n  \"notes\": \"\",\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria uma assinatura. É obrigatório enviar `plan_id` ou `items`."
          },
          "response": []
        },
        {
          "name": "Obter assinatura",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/subscriptions/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "subscriptions",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar assinatura",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/subscriptions/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "subscriptions",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"plan_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"billing_cycle\": \"monthly\",\n  \"collection_method\": \"charge_automatically\",\n  \"cancel_at_period_end\": false,\n  \"discount_code_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"discount_percent\": 0,\n  \"proration_behavior\": \"create_prorations\",\n  \"nfe_issuance_policy\": \"disabled\",\n  \"allow_pause\": false,\n  \"allow_cancel\": false,\n  \"notes\": \"\",\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Cancelar e remover assinatura (soft delete)",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/subscriptions/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "subscriptions",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Pausar assinatura",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/subscriptions/:id/pause",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "subscriptions",
                ":id",
                "pause"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"behavior\": \"mark_uncollectible\",\n  \"resumes_at\": \"2026-01-01T00:00:00Z\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Suspende a cobrança mantendo a assinatura aberta. `behavior` controla como faturas geradas durante a pausa são tratadas."
          },
          "response": []
        },
        {
          "name": "Retomar assinatura pausada",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/subscriptions/:id/resume",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "subscriptions",
                ":id",
                "resume"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Cancelar assinatura",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/subscriptions/:id/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "subscriptions",
                ":id",
                "cancel"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"cancel_at_period_end\": false,\n  \"reason\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cancela imediatamente, ou agenda para o fim do período quando `cancel_at_period_end=true`."
          },
          "response": []
        },
        {
          "name": "Ativar assinatura em rascunho/confirmada",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/subscriptions/:id/activate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "subscriptions",
                ":id",
                "activate"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Trocar o plano da assinatura",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/subscriptions/:id/change-plan",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "subscriptions",
                ":id",
                "change-plan"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"plan_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"timing\": \"immediate\",\n  \"reason\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Upgrade ou downgrade. A proração segue o `proration_behavior` da assinatura."
          },
          "response": []
        },
        {
          "name": "Reverter assinatura para o estado confirmado",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/subscriptions/:id/revert-to-confirmed",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "subscriptions",
                ":id",
                "revert-to-confirmed"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Gerar uma fatura avulsa para a assinatura",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/subscriptions/:id/create-invoice",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "subscriptions",
                ":id",
                "create-invoice"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Listar itens da assinatura",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/subscriptions/:id/items",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "subscriptions",
                ":id",
                "items"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Ressincronizar itens com o plano atual",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/subscriptions/:id/sync-plan-items",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "subscriptions",
                ":id",
                "sync-plan-items"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Realinha os itens da assinatura com o template de plan-items (reconciliação manual)."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Contas de Cobrança",
      "item": [
        {
          "name": "Listar contas de cobrança",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/billing_accounts?page=1&per_page=20&sort_by=&sort_order=asc&status=active&search=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "billing_accounts"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "active",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada das contas de cobrança da organização atual."
          },
          "response": []
        },
        {
          "name": "Criar conta de cobrança",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/billing_accounts",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "billing_accounts"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"customer\": {\n    \"id\": \"\",\n    \"external_id\": \"\",\n    \"document_number\": \"\",\n    \"name\": \"\",\n    \"nickname\": \"\",\n    \"legal_name\": \"\",\n    \"kind\": \"individual\",\n    \"birthday\": \"\",\n    \"email\": \"user@example.com\",\n    \"phone\": \"\",\n    \"notes\": \"\",\n    \"addresses\": {},\n    \"phones\": {},\n    \"emails\": {},\n    \"websites\": {},\n    \"tags\": [\n      \"\"\n    ],\n    \"custom_metadata\": {}\n  },\n  \"external_id\": \"\",\n  \"billing_email\": \"user@example.com\",\n  \"payment_terms_days\": 0,\n  \"auto_collection\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria uma conta de cobrança associada a um customer. O bloco `customer` localiza um customer existente por `id`, `external_id` ou `document_number`; quando não encontrado, cria um novo (exige `name` e `document_number`)."
          },
          "response": []
        },
        {
          "name": "Obter conta de cobrança",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/billing_accounts/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "billing_accounts",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar conta de cobrança",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/billing_accounts/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "billing_accounts",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"email\": \"user@example.com\",\n  \"phone\": \"\",\n  \"address\": {},\n  \"billing_email\": \"user@example.com\",\n  \"payment_terms_days\": 0,\n  \"auto_collection\": false,\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Fechar conta de cobrança",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/billing_accounts/:id?reason=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "billing_accounts",
                ":id"
              ],
              "query": [
                {
                  "key": "reason",
                  "value": "",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Encerra a conta de cobrança (equivalente a `POST /billing_accounts/{id}/close`)."
          },
          "response": []
        },
        {
          "name": "Fechar conta de cobrança (POST /close)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/billing_accounts/:id/close",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "billing_accounts",
                ":id",
                "close"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reason\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Encerra a conta de cobrança. O motivo (`reason`) é registrado no audit log."
          },
          "response": []
        },
        {
          "name": "Suspender conta de cobrança",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/billing_accounts/:id/suspend",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "billing_accounts",
                ":id",
                "suspend"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reason\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Suspende a conta. O motivo (`reason`) é registrado no audit log."
          },
          "response": []
        },
        {
          "name": "Reativar conta de cobrança",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/billing_accounts/:id/reactivate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "billing_accounts",
                ":id",
                "reactivate"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Reativa uma conta de cobrança suspensa."
          },
          "response": []
        },
        {
          "name": "Listar faturas da conta",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/billing_accounts/:id/invoices?page=1&per_page=20&sort_by=&sort_order=asc",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "billing_accounts",
                ":id",
                "invoices"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Retorna uma lista paginada das faturas da conta de cobrança."
          },
          "response": []
        },
        {
          "name": "Listar assinaturas da conta",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/billing_accounts/:id/subscriptions?page=1&per_page=20&sort_by=&sort_order=asc",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "billing_accounts",
                ":id",
                "subscriptions"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Retorna uma lista paginada das assinaturas da conta de cobrança."
          },
          "response": []
        },
        {
          "name": "Listar créditos da conta",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/billing_accounts/:id/credits?page=1&per_page=20&sort_by=&sort_order=asc&include_expired=true",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "billing_accounts",
                ":id",
                "credits"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "include_expired",
                  "value": "true",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Retorna uma lista paginada dos créditos da conta de cobrança."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Clientes",
      "item": [
        {
          "name": "Listar clientes",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/customers?page=1&per_page=20&sort_by=&sort_order=asc&search=&kind=natural",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "customers"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "kind",
                  "value": "natural",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada dos clientes da organização atual."
          },
          "response": []
        },
        {
          "name": "Criar cliente",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/customers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "customers"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"external_id\": \"\",\n  \"nickname\": \"\",\n  \"legal_name\": \"\",\n  \"document_number\": \"\",\n  \"kind\": \"natural\",\n  \"birthday\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"notes\": \"\",\n  \"addresses\": [\n    {\n      \"kind\": \"\",\n      \"street\": \"\",\n      \"number\": \"\",\n      \"complement\": \"\",\n      \"neighborhood\": \"\",\n      \"city\": \"\",\n      \"state\": \"\",\n      \"postal_code\": \"\",\n      \"country\": \"\"\n    }\n  ],\n  \"phones\": [\n    {\n      \"kind\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"emails\": [\n    {\n      \"kind\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"websites\": [\n    {\n      \"kind\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"tags\": [\n    \"\"\n  ],\n  \"custom_metadata\": {},\n  \"create_billing_account\": false,\n  \"billing_email\": \"\",\n  \"payment_terms_days\": 0,\n  \"auto_collection\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria um cliente e, por padrão, uma conta de cobrança associada. Use `create_billing_account=false` para criar apenas o cliente."
          },
          "response": []
        },
        {
          "name": "Obter cliente",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/customers/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "customers",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "<id>"
                }
              ]
            },
            "description": "O parâmetro `{id}` aceita o UUID do cliente ou o `external_id`."
          },
          "response": []
        },
        {
          "name": "Atualizar cliente",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/customers/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "customers",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "<id>"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"external_id\": \"\",\n  \"nickname\": \"\",\n  \"legal_name\": \"\",\n  \"document_number\": \"\",\n  \"kind\": \"natural\",\n  \"birthday\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"notes\": \"\",\n  \"addresses\": [\n    {\n      \"kind\": \"\",\n      \"street\": \"\",\n      \"number\": \"\",\n      \"complement\": \"\",\n      \"neighborhood\": \"\",\n      \"city\": \"\",\n      \"state\": \"\",\n      \"postal_code\": \"\",\n      \"country\": \"\"\n    }\n  ],\n  \"phones\": [\n    {\n      \"kind\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"emails\": [\n    {\n      \"kind\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"websites\": [\n    {\n      \"kind\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"tags\": [\n    \"\"\n  ],\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "O parâmetro `{id}` aceita o UUID do cliente ou o `external_id`."
          },
          "response": []
        },
        {
          "name": "Remover cliente (soft delete)",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/customers/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "customers",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "<id>"
                }
              ]
            },
            "description": "Marca o cliente como removido sem apagar registros históricos."
          },
          "response": []
        },
        {
          "name": "Listar extrato financeiro do cliente",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/customers/:id/statement?page=1&per_page=20&sort_by=&sort_order=asc&billing_account_id=00000000-0000-0000-0000-000000000000",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "customers",
                ":id",
                "statement"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "billing_account_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "<id>"
                }
              ]
            },
            "description": "Retorna os lançamentos do extrato (faturas, pagamentos, aplicações de crédito) da conta de cobrança do cliente. Quando o cliente possui múltiplas contas, informe `billing_account_id`."
          },
          "response": []
        },
        {
          "name": "Reconstruir o extrato a partir do histórico",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/customers/:id/statement/sync",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "customers",
                ":id",
                "statement",
                "sync"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "<id>"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"billing_account_id\": \"00000000-0000-0000-0000-000000000000\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Recria os itens do extrato a partir das faturas, pagamentos e aplicações de crédito existentes. Retorna o resumo do que foi criado."
          },
          "response": []
        },
        {
          "name": "Recalcular o MRR do cliente",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/customers/:id/recalculate-mrr",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "customers",
                ":id",
                "recalculate-mrr"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "<id>"
                }
              ]
            },
            "description": "Recalcula o MRR (Monthly Recurring Revenue) das contas de cobrança do cliente a partir das assinaturas ativas."
          },
          "response": []
        },
        {
          "name": "Listar usuários do portal do cliente",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/customers/:id/users?page=1&per_page=20&sort_by=&sort_order=asc&status=active",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "customers",
                ":id",
                "users"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "active",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "<id>"
                }
              ]
            },
            "description": "Retorna usuários com acesso ao portal vinculados à conta de cobrança do cliente."
          },
          "response": []
        },
        {
          "name": "Convidar usuário do portal",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/customers/:id/users",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "customers",
                ":id",
                "users"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "<id>"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria um convite de acesso ao portal para o e-mail informado. O convite expira em 7 dias."
          },
          "response": []
        },
        {
          "name": "Convidar usuário do portal (verbo)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/customers/:id/users/invite",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "customers",
                ":id",
                "users",
                "invite"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "<id>"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Equivalente ao `POST /customers/{id}/users`. Disponível como rota de verbo para SDKs que preferem URLs descritivas."
          },
          "response": []
        },
        {
          "name": "Obter usuário do portal",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/customers/:id/users/:user_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "customers",
                ":id",
                "users",
                ":user_id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "<id>"
                },
                {
                  "key": "user_id",
                  "value": "<user_id>"
                }
              ]
            },
            "description": "O parâmetro `{user_id}` aceita o UUID ou o `external_id` do usuário."
          },
          "response": []
        },
        {
          "name": "Atualizar usuário do portal",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/customers/:id/users/:user_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "customers",
                ":id",
                "users",
                ":user_id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "<id>"
                },
                {
                  "key": "user_id",
                  "value": "<user_id>"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"\",\n  \"external_id\": \"\",\n  \"sso_only\": false,\n  \"status\": \"active\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Atualiza `email`, `external_id`, `sso_only` e `status`. Transições de status permitidas: `active` ↔ `suspended`."
          },
          "response": []
        },
        {
          "name": "Remover usuário do portal",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/customers/:id/users/:user_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "customers",
                ":id",
                "users",
                ":user_id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "<id>"
                },
                {
                  "key": "user_id",
                  "value": "<user_id>"
                }
              ]
            },
            "description": "Convites pendentes são removidos definitivamente; usuários ativos são suspensos."
          },
          "response": []
        },
        {
          "name": "Pré-visualizar e-mail do usuário do portal",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/customers/:id/users/:user_id/email-preview",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "customers",
                ":id",
                "users",
                ":user_id",
                "email-preview"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "<id>"
                },
                {
                  "key": "user_id",
                  "value": "<user_id>"
                }
              ]
            },
            "description": "Retorna o assunto e mensagem do e-mail de convite ou verificação que seria enviado ao usuário, sem disparar o envio. Disponível apenas para usuários `pending_invitation` ou `pending_verification`."
          },
          "response": []
        },
        {
          "name": "Reenviar e-mail de convite ou verificação",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/customers/:id/users/:user_id/resend",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "customers",
                ":id",
                "users",
                ":user_id",
                "resend"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "<id>"
                },
                {
                  "key": "user_id",
                  "value": "<user_id>"
                }
              ]
            },
            "description": "Reenvia o e-mail de convite (para `pending_invitation`, com rotação de token) ou de verificação (para `pending_verification`). Demais status retornam 400."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Planos",
      "item": [
        {
          "name": "Listar planos",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plans?page=1&per_page=20&sort_by=&sort_order=asc&status=draft&plan_type=standard&visibility=public&plan_group_id=00000000-0000-0000-0000-000000000000&company_id=00000000-0000-0000-0000-000000000000&billing_account_id=00000000-0000-0000-0000-000000000000&search=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plans"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "draft",
                  "disabled": true
                },
                {
                  "key": "plan_type",
                  "value": "standard",
                  "disabled": true
                },
                {
                  "key": "visibility",
                  "value": "public",
                  "disabled": true
                },
                {
                  "key": "plan_group_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "company_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "billing_account_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada dos planos da organização atual."
          },
          "response": []
        },
        {
          "name": "Criar plano",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plans",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plans"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"company_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"plan_group_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"name\": \"\",\n  \"slug\": \"\",\n  \"description\": \"\",\n  \"status\": \"draft\",\n  \"plan_type\": \"standard\",\n  \"billing_account_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"visibility\": \"public\",\n  \"features\": [\n    \"\"\n  ],\n  \"limits\": {\n    \"users\": 0,\n    \"subaccounts\": 0,\n    \"operationsPerMonth\": 0,\n    \"apiRequestsPerDay\": 0\n  },\n  \"trial_period_days\": 0,\n  \"default_billing_cycle\": \"monthly\",\n  \"available_billing_cycles\": [\n    \"monthly\"\n  ],\n  \"items\": [\n    {\n      \"product_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"price_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"quantity\": 1,\n      \"included\": true\n    }\n  ],\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria um plano para a organização autenticada."
          },
          "response": []
        },
        {
          "name": "Obter plano",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plans/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plans",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar plano",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plans/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plans",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"company_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"plan_group_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"name\": \"\",\n  \"slug\": \"\",\n  \"description\": \"\",\n  \"status\": \"draft\",\n  \"plan_type\": \"standard\",\n  \"billing_account_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"visibility\": \"public\",\n  \"features\": [\n    \"\"\n  ],\n  \"limits\": {\n    \"users\": 0,\n    \"subaccounts\": 0,\n    \"operationsPerMonth\": 0,\n    \"apiRequestsPerDay\": 0\n  },\n  \"trial_period_days\": 0,\n  \"default_billing_cycle\": \"monthly\",\n  \"available_billing_cycles\": [\n    \"monthly\"\n  ],\n  \"items\": [\n    {\n      \"product_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"price_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"quantity\": 1,\n      \"included\": true\n    }\n  ],\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Arquivar ou excluir plano",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plans/:id?hard=false",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plans",
                ":id"
              ],
              "query": [
                {
                  "key": "hard",
                  "value": "false",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Por padrão arquiva o plano (soft delete). Use `?hard=true` para excluir permanentemente um plano em rascunho."
          },
          "response": []
        },
        {
          "name": "Duplicar plano",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plans/:id/duplicate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plans",
                ":id",
                "duplicate"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Cria uma cópia do plano (incluindo seus itens) no estado de rascunho."
          },
          "response": []
        },
        {
          "name": "Listar itens do plano",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plans/:id/items",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plans",
                ":id",
                "items"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Substituir itens do plano",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plans/:id/items",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plans",
                ":id",
                "items"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"items\": [\n    {\n      \"product_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"price_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"quantity\": 1,\n      \"included\": true\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Substitui de forma atômica todos os itens do plano. Apenas produtos raiz são aceitos e cada `product_id` deve ser único na lista."
          },
          "response": []
        },
        {
          "name": "Arquivar planos em lote",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plans/bulk-archive",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plans",
                "bulk-archive"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Excluir planos em lote",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plans/bulk-delete",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plans",
                "bulk-delete"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Exclui permanentemente os planos informados. Planos com assinaturas ativas são pulados e retornados em `skipped_ids`."
          },
          "response": []
        },
        {
          "name": "Mover planos para outro grupo em lote",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plans/bulk-move-group",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plans",
                "bulk-move-group"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ],\n  \"plan_group_id\": \"00000000-0000-0000-0000-000000000000\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Grupos de Plano",
      "item": [
        {
          "name": "Listar grupos de planos",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plan_groups?search=&include_archived=true",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plan_groups"
              ],
              "query": [
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "include_archived",
                  "value": "true",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna todos os grupos de planos da organização atual ordenados por `display_order`."
          },
          "response": []
        },
        {
          "name": "Criar grupo de planos",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plan_groups",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plan_groups"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"slug\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Obter grupo de planos",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plan_groups/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plan_groups",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar grupo de planos",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plan_groups/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plan_groups",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"slug\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Remover grupo de planos",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plan_groups/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plan_groups",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Reordenar grupos de planos",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plan_groups/reorder",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plan_groups",
                "reorder"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"group_ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Atualiza o `display_order` dos grupos conforme a ordem do array `group_ids`. Todos os grupos devem pertencer à organização atual."
          },
          "response": []
        },
        {
          "name": "Arquivar grupo de planos",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plan_groups/:id/archive",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plan_groups",
                ":id",
                "archive"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Marca o grupo como arquivado preenchendo `archived_at`. Grupos arquivados ficam ocultos das listagens padrão."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Produtos",
      "item": [
        {
          "name": "Listar produtos",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/products?page=1&per_page=20&sort_by=&sort_order=asc&status=all&visibility=public&productType=base&productGroupId=00000000-0000-0000-0000-000000000000&companyId=00000000-0000-0000-0000-000000000000&parentProductId=00000000-0000-0000-0000-000000000000&rootOnly=false&search=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "products"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "all",
                  "disabled": true
                },
                {
                  "key": "visibility",
                  "value": "public",
                  "disabled": true
                },
                {
                  "key": "productType",
                  "value": "base",
                  "disabled": true
                },
                {
                  "key": "productGroupId",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "companyId",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "parentProductId",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "rootOnly",
                  "value": "false",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada dos produtos da organização atual."
          },
          "response": []
        },
        {
          "name": "Criar produto",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/products",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "products"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"slug\": \"\",\n  \"description\": \"\",\n  \"productType\": \"base\",\n  \"visibility\": \"public\",\n  \"unitLabel\": \"\",\n  \"increment\": 0,\n  \"websiteUrl\": \"https://example.com\",\n  \"isRequired\": false,\n  \"parentProductId\": \"00000000-0000-0000-0000-000000000000\",\n  \"productGroupId\": \"00000000-0000-0000-0000-000000000000\",\n  \"companyId\": \"00000000-0000-0000-0000-000000000000\",\n  \"customMetadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Obter produto",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/products/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "products",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar produto",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/products/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "products",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"slug\": \"\",\n  \"description\": \"\",\n  \"status\": \"draft\",\n  \"productType\": \"base\",\n  \"visibility\": \"public\",\n  \"unitLabel\": \"\",\n  \"increment\": 0,\n  \"websiteUrl\": \"https://example.com\",\n  \"isRequired\": false,\n  \"parentProductId\": \"00000000-0000-0000-0000-000000000000\",\n  \"productGroupId\": \"00000000-0000-0000-0000-000000000000\",\n  \"companyId\": \"00000000-0000-0000-0000-000000000000\",\n  \"customMetadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Arquivar produto (soft delete)",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/products/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "products",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Arquiva o produto. Retorna 422 quando o produto está em uso por assinaturas ativas."
          },
          "response": []
        },
        {
          "name": "Arquivar produto",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/products/:id/archive",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "products",
                ":id",
                "archive"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Arquiva o produto. Retorna 422 quando o produto está em uso por assinaturas ativas ou já está arquivado."
          },
          "response": []
        },
        {
          "name": "Publicar produto",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/products/:id/publish",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "products",
                ":id",
                "publish"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Promove um produto em rascunho para o status ativo."
          },
          "response": []
        },
        {
          "name": "Restaurar produto arquivado",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/products/:id/restore",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "products",
                ":id",
                "restore"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Restaura um produto arquivado de volta para o status ativo."
          },
          "response": []
        },
        {
          "name": "Reordenar produtos",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/products/reorder",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "products",
                "reorder"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"product_ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Atualiza a ordem de exibição dos produtos. O índice 0 do array vira o primeiro item da lista."
          },
          "response": []
        },
        {
          "name": "Reordenar produtos (PUT /reorder)",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/products/reorder",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "products",
                "reorder"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"product_ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Alias `PUT` para `/products/reorder`. Mesmo comportamento da versão `POST`."
          },
          "response": []
        },
        {
          "name": "Arquivar produtos em lote",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/products/bulk-archive",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "products",
                "bulk-archive"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Arquiva múltiplos produtos. IDs em uso por assinaturas ativas ou já arquivados são ignorados e reportados na resposta."
          },
          "response": []
        },
        {
          "name": "Excluir produtos em lote",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/products/bulk-delete",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "products",
                "bulk-delete"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Exclui permanentemente múltiplos produtos. IDs em uso por assinaturas ativas são ignorados e reportados na resposta."
          },
          "response": []
        },
        {
          "name": "Alterar visibilidade em lote",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/products/bulk-visibility",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "products",
                "bulk-visibility"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ],\n  \"visibility\": \"public\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Atualiza a visibilidade (`public` ou `private`) de múltiplos produtos."
          },
          "response": []
        },
        {
          "name": "Mover produtos para outro grupo",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/products/bulk-move-group",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "products",
                "bulk-move-group"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ],\n  \"product_group_id\": \"00000000-0000-0000-0000-000000000000\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Move múltiplos produtos para um grupo de produto. Envie `product_group_id: null` para remover do grupo atual."
          },
          "response": []
        },
        {
          "name": "Trocar empresa de produtos em lote",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/products/bulk-change-company",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "products",
                "bulk-change-company"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ],\n  \"company_id\": \"00000000-0000-0000-0000-000000000000\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Reatribui múltiplos produtos a outra empresa. Envie `company_id: null` para limpar o vínculo."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Grupos de Produto",
      "item": [
        {
          "name": "Listar grupos de produto",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/product_groups?page=1&per_page=20&sort_by=&sort_order=asc&search=&company_id=00000000-0000-0000-0000-000000000000&include_archived=false",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "product_groups"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "company_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "include_archived",
                  "value": "false",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada dos grupos de produto da organização atual."
          },
          "response": []
        },
        {
          "name": "Criar grupo de produto",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/product_groups",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "product_groups"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"slug\": \"\",\n  \"company_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"proposal_template_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"service_item_id\": \"00000000-0000-0000-0000-000000000000\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Obter grupo de produto",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/product_groups/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "product_groups",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar grupo de produto",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/product_groups/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "product_groups",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"slug\": \"\",\n  \"company_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"proposal_template_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"service_item_id\": \"00000000-0000-0000-0000-000000000000\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Remover grupo de produto",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/product_groups/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "product_groups",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Arquivar grupo de produto",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/product_groups/:id/archive",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "product_groups",
                ":id",
                "archive"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Desarquivar grupo de produto",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/product_groups/:id/archive",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "product_groups",
                ":id",
                "archive"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Reordenar grupos de produto",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/product_groups/reorder",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "product_groups",
                "reorder"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"group_ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Atualiza a ordem de exibição dos grupos de produto. O array `group_ids` define a nova ordem — índice 0 vira o primeiro grupo."
          },
          "response": []
        },
        {
          "name": "Reordenar grupos de produto (alias PUT)",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/product_groups/reorder",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "product_groups",
                "reorder"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"group_ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Alias `PUT` para `POST /product_groups/reorder`. Mesmo contrato."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Organização",
      "item": [
        {
          "name": "Obter organização atual",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/organization",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "organization"
              ]
            },
            "description": "Retorna os dados da organização à qual o token autenticado pertence. Não há parâmetro `:id` — a organização é sempre resolvida a partir da chave da API."
          },
          "response": []
        },
        {
          "name": "Atualizar organização atual",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/organization",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "organization"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"email\": \"user@example.com\",\n  \"phone\": \"\",\n  \"addresses\": [\n    {}\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Atualiza o perfil cadastral da organização autenticada. Apenas os campos abaixo podem ser modificados — identidade (`id`, `external_id`, `status`) não é alterável por este endpoint."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Empresas",
      "item": [
        {
          "name": "Listar empresas",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/companies?page=1&per_page=20&sort_by=&sort_order=asc&status=active&search=&is_default=true&parent_company_id=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "companies"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "active",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "is_default",
                  "value": "true",
                  "disabled": true
                },
                {
                  "key": "parent_company_id",
                  "value": "",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada das empresas (matrizes e filiais) da organização atual."
          },
          "response": []
        },
        {
          "name": "Criar empresa",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/companies",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "companies"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"parent_company_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"name\": \"\",\n  \"legal_name\": \"\",\n  \"document_type\": \"cpf\",\n  \"document_number\": \"\",\n  \"email\": \"user@example.com\",\n  \"phone\": \"\",\n  \"addresses\": [\n    {}\n  ],\n  \"emails\": [\n    {}\n  ],\n  \"phones\": [\n    {}\n  ],\n  \"websites\": [\n    {}\n  ],\n  \"is_default\": false,\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria uma empresa (matriz ou filial). Para criar uma filial, informe `parent_company_id` — o CNPJ deve compartilhar o mesmo prefixo da matriz. Apenas empresas com CNPJ podem ter filiais. A primeira empresa criada na organização é marcada como `is_default` automaticamente."
          },
          "response": []
        },
        {
          "name": "Listar matrizes",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/companies/matriz",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "companies",
                "matriz"
              ]
            },
            "description": "Lista as empresas matrizes (sem `parent_company_id`) ativas da organização. Útil para selecionar a matriz ao criar uma filial. Apenas empresas com CNPJ aparecem aqui."
          },
          "response": []
        },
        {
          "name": "Obter empresa",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/companies/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "companies",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar empresa",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/companies/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "companies",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"legal_name\": \"\",\n  \"email\": \"user@example.com\",\n  \"phone\": \"\",\n  \"addresses\": [\n    {}\n  ],\n  \"emails\": [\n    {}\n  ],\n  \"phones\": [\n    {}\n  ],\n  \"websites\": [\n    {}\n  ],\n  \"is_default\": false,\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Desativar empresa",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/companies/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "companies",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Desativa a empresa (soft delete — equivalente a `POST /companies/{id}/deactivate`). Não é possível desativar a única empresa ativa nem uma empresa com assinaturas ativas ou em período de teste."
          },
          "response": []
        },
        {
          "name": "Definir empresa padrão",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/companies/:id/set-default",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "companies",
                ":id",
                "set-default"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Marca a empresa como padrão da organização. A empresa padrão anterior é desmarcada na mesma transação."
          },
          "response": []
        },
        {
          "name": "Desativar empresa (POST /deactivate)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/companies/:id/deactivate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "companies",
                ":id",
                "deactivate"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Desativa a empresa. Não é possível desativar a única empresa ativa, nem uma empresa com assinaturas ativas ou em período de teste. Se a empresa desativada era a padrão, outra empresa ativa é promovida automaticamente."
          },
          "response": []
        },
        {
          "name": "Reativar empresa",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/companies/:id/reactivate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "companies",
                ":id",
                "reactivate"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Reativa uma empresa previamente desativada. Retorna **422** quando a empresa já está ativa."
          },
          "response": []
        },
        {
          "name": "Obter perfil fiscal",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/companies/:id/fiscal",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "companies",
                ":id",
                "fiscal"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Retorna o perfil fiscal da empresa, ou `null` quando ainda não foi configurado."
          },
          "response": []
        },
        {
          "name": "Atualizar perfil fiscal",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/companies/:id/fiscal",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "companies",
                ":id",
                "fiscal"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"taxation_regime\": \"simple_national\",\n  \"simples_annex\": \"annex_iii\",\n  \"rbt12_cents\": 0,\n  \"factor_r\": 0,\n  \"cpp_inside_das\": false,\n  \"presumption_rate\": 0,\n  \"iss_municipality\": \"\",\n  \"iss_rate\": 0,\n  \"pis_rate\": 0,\n  \"cofins_rate\": 0,\n  \"csll_rate\": 0,\n  \"irpj_rate\": 0,\n  \"cbs_ibs_enabled\": false,\n  \"cbs_rate\": 0,\n  \"ibs_rate\": 0,\n  \"cbs_ibs_mode\": \"informative\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria ou atualiza (upsert) o perfil fiscal da empresa. Inclui regime tributário, alíquotas (ISS, PIS, COFINS, CSLL, IRPJ) e configurações de CBS/IBS."
          },
          "response": []
        },
        {
          "name": "Obter perfil fiscal (alias)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/companies/:id/fiscal-profile",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "companies",
                ":id",
                "fiscal-profile"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Alias de `GET /companies/{id}/fiscal` — mesma representação e comportamento."
          },
          "response": []
        },
        {
          "name": "Atualizar perfil fiscal (alias)",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/companies/:id/fiscal-profile",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "companies",
                ":id",
                "fiscal-profile"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"taxation_regime\": \"simple_national\",\n  \"simples_annex\": \"annex_iii\",\n  \"rbt12_cents\": 0,\n  \"factor_r\": 0,\n  \"cpp_inside_das\": false,\n  \"presumption_rate\": 0,\n  \"iss_municipality\": \"\",\n  \"iss_rate\": 0,\n  \"pis_rate\": 0,\n  \"cofins_rate\": 0,\n  \"csll_rate\": 0,\n  \"irpj_rate\": 0,\n  \"cbs_ibs_enabled\": false,\n  \"cbs_rate\": 0,\n  \"ibs_rate\": 0,\n  \"cbs_ibs_mode\": \"informative\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Alias de `PATCH /companies/{id}/fiscal` — mesma representação e comportamento."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Certificados",
      "item": [
        {
          "name": "Listar certificados digitais",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/certificates?page=1&per_page=20&sort_by=&sort_order=asc&status=active&search=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "certificates"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "active",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada dos certificados digitais (A1) da organização atual. Por segurança, a resposta **nunca** inclui a chave privada nem a senha do PFX — apenas metadados extraídos do certificado."
          },
          "response": []
        },
        {
          "name": "Enviar certificado digital",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/certificates",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "certificates"
              ]
            },
            "description": "Envia um certificado digital A1 via `multipart/form-data`. A chave privada e a senha são criptografadas em repouso e **nunca** retornadas pela API. O endpoint detecta duplicidade pelo `thumbprint` e associa automaticamente a um `person` pelo CNPJ/CPF extraído.\n\nValores aceitos para `type`:\n- `pfx` — envia `file` (PFX/P12 binário) e `password`.\n- `cert_key` — envia `cert_file` (PEM do certificado) e `key_file` (PEM da chave).\n- `combined_pem` — envia `file` (PEM contendo certificado + chave).\n- `cert_key_password` — envia `cert_file`, `key_file` e `password` (chave protegida por senha)."
          },
          "response": []
        },
        {
          "name": "Obter certificado",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/certificates/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "certificates",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Remover certificado",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/certificates/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "certificates",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Remove o certificado por **soft delete**. Os dados criptografados permanecem no banco apenas para fins de auditoria."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Cupons",
      "item": [
        {
          "name": "Listar cupons",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/coupons?page=1&per_page=20&sort_by=&sort_order=asc&is_active=true&search=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "coupons"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "is_active",
                  "value": "true",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada dos cupons da organização atual."
          },
          "response": []
        },
        {
          "name": "Criar cupom",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/coupons",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "coupons"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"code\": \"\",\n  \"name\": \"\",\n  \"description\": \"\",\n  \"discount_type\": \"percentage\",\n  \"discount_value\": 0,\n  \"currency\": \"\",\n  \"min_purchase_cents\": 0,\n  \"max_discount_cents\": 0,\n  \"usage_limit\": 0,\n  \"usage_limit_per_user\": 0,\n  \"valid_from\": \"\",\n  \"valid_until\": \"\",\n  \"applies_to\": {\n    \"planIds\": [\n      \"00000000-0000-0000-0000-000000000000\"\n    ],\n    \"productIds\": [\n      \"00000000-0000-0000-0000-000000000000\"\n    ]\n  },\n  \"excludes\": {},\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria um cupom de desconto. O `code` deve ser único por organização. Use `discount_type=percentage` com `discount_value` entre `0` e `100`, ou `discount_type=fixed_amount` com `discount_value` em centavos (÷100 → BRL)."
          },
          "response": []
        },
        {
          "name": "Obter cupom",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/coupons/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "coupons",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar cupom",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/coupons/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "coupons",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"description\": \"\",\n  \"usage_limit\": 0,\n  \"usage_limit_per_user\": 0,\n  \"valid_from\": \"\",\n  \"valid_until\": \"\",\n  \"applies_to\": {\n    \"planIds\": [\n      \"00000000-0000-0000-0000-000000000000\"\n    ],\n    \"productIds\": [\n      \"00000000-0000-0000-0000-000000000000\"\n    ]\n  },\n  \"excludes\": {},\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Atualiza campos editáveis do cupom. `code`, `discount_type`, `discount_value` e `currency` são imutáveis depois da criação."
          },
          "response": []
        },
        {
          "name": "Excluir cupom",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/coupons/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "coupons",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Exclui o cupom permanentemente. Só é permitido enquanto o cupom **não tiver resgates registrados** — caso contrário, use `POST /coupons/{id}/deactivate` para preservar o histórico."
          },
          "response": []
        },
        {
          "name": "Desativar cupom",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/coupons/:id/deactivate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "coupons",
                ":id",
                "deactivate"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Desativa o cupom: novos resgates passam a ser bloqueados, mas os resgates anteriores são preservados."
          },
          "response": []
        },
        {
          "name": "Listar resgates do cupom",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/coupons/:id/redemptions?page=1&per_page=20&sort_by=&sort_order=asc",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "coupons",
                ":id",
                "redemptions"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Retorna uma lista paginada dos resgates registrados para o cupom."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Créditos",
      "item": [
        {
          "name": "Listar créditos",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/credits?page=1&per_page=20&sort_by=&sort_order=asc&billing_account_id=00000000-0000-0000-0000-000000000000&company_id=00000000-0000-0000-0000-000000000000&type=promotional&usage=available&include_expired=true&date_from=2026-01-01T00:00:00Z&date_to=2026-01-01T00:00:00Z",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "credits"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "billing_account_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "company_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "type",
                  "value": "promotional",
                  "disabled": true
                },
                {
                  "key": "usage",
                  "value": "available",
                  "disabled": true
                },
                {
                  "key": "include_expired",
                  "value": "true",
                  "disabled": true
                },
                {
                  "key": "date_from",
                  "value": "2026-01-01T00:00:00Z",
                  "disabled": true
                },
                {
                  "key": "date_to",
                  "value": "2026-01-01T00:00:00Z",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada dos créditos da organização atual. Por padrão, créditos expirados são omitidos — use `usage` ou `include_expired` para incluí-los."
          },
          "response": []
        },
        {
          "name": "Adicionar crédito",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/credits",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "credits"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"billing_account_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"company_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"type\": \"promotional\",\n  \"amount_cents\": 10000,\n  \"description\": \"\",\n  \"expires_at\": \"2026-01-01T00:00:00Z\",\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Adiciona um crédito a uma conta de cobrança. O valor é creditado no `balance_cents` da `BillingAccount` e fica disponível para abater faturas futuras. Quando `company_id` é informado, o crédito só pode ser aplicado a faturas da mesma `company`."
          },
          "response": []
        },
        {
          "name": "Obter crédito",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/credits/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "credits",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar crédito",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/credits/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "credits",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"type\": \"promotional\",\n  \"amount_cents\": 0,\n  \"description\": \"\",\n  \"expires_at\": \"2026-01-01T00:00:00Z\",\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Ajusta o crédito (tipo, valor, descrição ou data de expiração). O `amount_cents` só pode ser alterado se nenhum centavo do crédito tiver sido consumido — caso contrário a API responde `400`."
          },
          "response": []
        },
        {
          "name": "Excluir crédito",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/credits/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "credits",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Remove o crédito e estorna o saldo correspondente da conta de cobrança. Só é permitido se nenhum centavo do crédito tiver sido consumido — caso contrário a API responde `400`."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Faturas",
      "item": [
        {
          "name": "Listar faturas",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices?page=1&per_page=20&sort_by=&sort_order=asc&status=draft&billing_account_id=00000000-0000-0000-0000-000000000000&company_id=00000000-0000-0000-0000-000000000000&subscription_id=00000000-0000-0000-0000-000000000000&due_date_from=&due_date_to=&date_from=&date_to=&search=&total_cents=0&document_number=&without_payments=true&plan_filter=all",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "draft",
                  "disabled": true
                },
                {
                  "key": "billing_account_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "company_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "subscription_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "due_date_from",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "due_date_to",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "date_from",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "date_to",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "total_cents",
                  "value": "0",
                  "disabled": true
                },
                {
                  "key": "document_number",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "without_payments",
                  "value": "true",
                  "disabled": true
                },
                {
                  "key": "plan_filter",
                  "value": "all",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada de faturas da organização atual."
          },
          "response": []
        },
        {
          "name": "Criar fatura",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"billing_account_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"company_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"subscription_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"product_group_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"collection_method\": \"charge_automatically\",\n  \"due_date\": \"\",\n  \"description\": \"\",\n  \"footer\": \"\",\n  \"line_items\": [\n    {\n      \"description\": \"\",\n      \"quantity\": 0,\n      \"unit_amount_cents\": 0,\n      \"product_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"price_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"service_item_id\": \"00000000-0000-0000-0000-000000000000\"\n    }\n  ],\n  \"discount_cents\": 0,\n  \"discount_description\": \"\",\n  \"installments\": [\n    {\n      \"amount_cents\": 0,\n      \"due_date\": \"\"\n    }\n  ],\n  \"nfe_issuance_policy\": \"disabled\",\n  \"period_start\": \"\",\n  \"period_end\": \"\",\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria uma fatura para uma conta de cobrança. Aceita itens de linha, parcelas opcionais (`installments`, mínimo 2) e política de emissão de NFe."
          },
          "response": []
        },
        {
          "name": "Listar faturas com pagamento pendente",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/pending-payment?page=1&per_page=20&sort_by=&sort_order=asc&billing_account_id=00000000-0000-0000-0000-000000000000",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                "pending-payment"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "billing_account_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna faturas finalizadas (`status = open`) cuja `due_date` já passou."
          },
          "response": []
        },
        {
          "name": "Listar faturas com NFe pendente",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/pending-nfe?page=1&per_page=20&sort_by=&sort_order=asc&billing_account_id=00000000-0000-0000-0000-000000000000",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                "pending-nfe"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "billing_account_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna faturas pagas, mas com emissão de NFe pendente — sem NFe, ou com NFe em status `pending`, `processing` ou `error`."
          },
          "response": []
        },
        {
          "name": "Obter fatura",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar fatura",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"company_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"collection_method\": \"charge_automatically\",\n  \"due_date\": \"\",\n  \"description\": \"\",\n  \"footer\": \"\",\n  \"line_items\": [\n    {\n      \"id\": \"00000000-0000-0000-0000-000000000000\",\n      \"description\": \"\",\n      \"quantity\": 0,\n      \"unit_amount_cents\": 0\n    }\n  ],\n  \"nfe_issuance_policy\": \"disabled\",\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Excluir fatura",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Exclui uma fatura em rascunho (`draft`). Faturas finalizadas devem ser canceladas via `POST /invoices/{id}/void`."
          },
          "response": []
        },
        {
          "name": "Finalizar fatura",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/:id/finalize",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                ":id",
                "finalize"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Finaliza uma fatura em rascunho (`draft` → `open`)."
          },
          "response": []
        },
        {
          "name": "Cancelar (void) fatura",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/:id/void",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                ":id",
                "void"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reason\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cancela uma fatura aberta (`open` → `void`). O motivo (`reason`) é registrado no audit log."
          },
          "response": []
        },
        {
          "name": "Desfazer pagamento da fatura",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/:id/undo-payment",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                ":id",
                "undo-payment"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reason\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Reverte o pagamento da fatura (`paid` → `open`). O motivo (`reason`) é registrado no audit log."
          },
          "response": []
        },
        {
          "name": "Pagar fatura",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/:id/pay",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                ":id",
                "pay"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"payment_method\": \"pix\",\n  \"payment_method_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"card\": {\n    \"card_token\": \"\",\n    \"holder_name\": \"\"\n  },\n  \"amount_cents\": 0,\n  \"installment_ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Dois modos: (a) quando `payment_method` é informado, cria um pagamento via gateway (`pix`, `bank_slip` ou `card`) e retorna os artefatos do método (QR code, código de barras ou status do cartão); (b) quando omitido, marca a fatura como paga manualmente (reconciliação)."
          },
          "response": []
        },
        {
          "name": "Enviar lembrete de cobrança",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/:id/send-reminder",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                ":id",
                "send-reminder"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Envia por e-mail um lembrete de cobrança da fatura para o `billing_email` da conta."
          },
          "response": []
        },
        {
          "name": "Emitir NFe para fatura",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/:id/issue-nfe",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                ":id",
                "issue-nfe"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Dispara a emissão da NFe (Nota Fiscal Eletrônica) para a fatura."
          },
          "response": []
        },
        {
          "name": "Aplicar créditos na fatura",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/:id/apply-credits",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                ":id",
                "apply-credits"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"credit_ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ],\n  \"amount_cents\": 0\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Aplica créditos da conta de cobrança em uma fatura aberta (`status = open`)."
          },
          "response": []
        },
        {
          "name": "Remover créditos aplicados",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/:id/remove-credits",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                ":id",
                "remove-credits"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Remove todos os créditos aplicados na fatura, devolvendo-os à conta de cobrança. Só funciona em faturas abertas (`status = open`)."
          },
          "response": []
        },
        {
          "name": "Baixar PDF da fatura",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/:id/pdf",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                ":id",
                "pdf"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Gera e baixa o PDF da fatura como anexo binário (`application/pdf`)."
          },
          "response": []
        },
        {
          "name": "Listar métodos de pagamento disponíveis",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/:id/payment-methods",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                ":id",
                "payment-methods"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Lista os métodos de pagamento que podem ser usados para pagar esta fatura, com base nos gateways ativos da organização e nas configurações do portal."
          },
          "response": []
        },
        {
          "name": "Listar parcelas da fatura",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/:id/installments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                ":id",
                "installments"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Criar/atualizar parcelamento",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/:id/installments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                ":id",
                "installments"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"installments\": [\n    {\n      \"amount_cents\": 0,\n      \"due_date\": \"\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria ou substitui o cronograma de parcelas da fatura. Mínimo de 2 parcelas."
          },
          "response": []
        },
        {
          "name": "Marcar parcela como paga",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/:id/installments/:installmentId/mark-paid",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                ":id",
                "installments",
                ":installmentId",
                "mark-paid"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                },
                {
                  "key": "installmentId",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Marca manualmente uma parcela como paga (reconciliação, sem chamada ao gateway)."
          },
          "response": []
        },
        {
          "name": "Pagar parcela",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/:id/installments/:installmentId/pay",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                ":id",
                "installments",
                ":installmentId",
                "pay"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                },
                {
                  "key": "installmentId",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"payment_method\": \"pix\",\n  \"payment_method_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"card\": {\n    \"card_token\": \"\",\n    \"holder_name\": \"\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Processa o pagamento de uma parcela via gateway. A parcela anterior deve estar paga."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Pagamentos",
      "item": [
        {
          "name": "Listar pagamentos",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payments?page=1&per_page=20&sort_by=&sort_order=asc&status=pending&invoiceId=00000000-0000-0000-0000-000000000000&billingAccountId=00000000-0000-0000-0000-000000000000&dateFrom=&dateTo=&paidDateFrom=&paidDateTo=&invoiceFilter=all&paymentMethodType=card&amountMinCents=0&amountMaxCents=0&search=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payments"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "pending",
                  "disabled": true
                },
                {
                  "key": "invoiceId",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "billingAccountId",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "dateFrom",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "dateTo",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "paidDateFrom",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "paidDateTo",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "invoiceFilter",
                  "value": "all",
                  "disabled": true
                },
                {
                  "key": "paymentMethodType",
                  "value": "card",
                  "disabled": true
                },
                {
                  "key": "amountMinCents",
                  "value": "0",
                  "disabled": true
                },
                {
                  "key": "amountMaxCents",
                  "value": "0",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada dos pagamentos da organização atual."
          },
          "response": []
        },
        {
          "name": "Processar pagamento",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payments"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoiceId\": \"00000000-0000-0000-0000-000000000000\",\n  \"paymentMethodId\": \"00000000-0000-0000-0000-000000000000\",\n  \"paymentMethod\": {\n    \"type\": \"card\",\n    \"card\": {\n      \"cardToken\": \"\",\n      \"number\": \"\",\n      \"expMonth\": 0,\n      \"expYear\": 0,\n      \"cvv\": \"\",\n      \"holderName\": \"\"\n    }\n  },\n  \"amountCents\": 0,\n  \"customMetadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Processa um pagamento para uma fatura existente. Aceita um `payment_method_id` previamente registrado **ou** um bloco `payment_method` com dados de cartão/PIX/boleto. Quando `amount_cents` é omitido, cobra o saldo aberto da fatura."
          },
          "response": []
        },
        {
          "name": "Reatribuir pagamentos a outra fatura",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payments/bulk-update-invoice",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payments",
                "bulk-update-invoice"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"payment_ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ],\n  \"invoice_id\": \"00000000-0000-0000-0000-000000000000\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Atualiza em massa a fatura associada aos pagamentos informados. Útil para corrigir vínculos quando pagamentos chegaram apontando para a fatura errada."
          },
          "response": []
        },
        {
          "name": "Obter pagamento",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payments/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payments",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Excluir pagamento",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payments/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payments",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Remove um pagamento. Pagamentos já confirmados não podem ser excluídos — use `cancel` ou `refund`."
          },
          "response": []
        },
        {
          "name": "Cancelar pagamento",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payments/:id/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payments",
                ":id",
                "cancel"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reason\": \"\",\n  \"cancel_on_gateway\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cancela um pagamento em aberto. Quando `cancel_on_gateway` é `true` (padrão), o cancelamento é propagado ao gateway."
          },
          "response": []
        },
        {
          "name": "Tentar pagamento novamente",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payments/:id/retry",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payments",
                ":id",
                "retry"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"card\": {\n    \"cardToken\": \"\",\n    \"holderName\": \"\"\n  },\n  \"payment_method_id\": \"00000000-0000-0000-0000-000000000000\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Reprocessa um pagamento falho. Pode opcionalmente trocar para um cartão novo (via `card`) ou para um meio de pagamento salvo (`payment_method_id`)."
          },
          "response": []
        },
        {
          "name": "Trocar cartão do pagamento",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payments/:id/change-card",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payments",
                ":id",
                "change-card"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"credit_card_id\": \"00000000-0000-0000-0000-000000000000\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Troca o cartão de crédito de um pagamento falho processado pelo Pagar.me. O novo cartão precisa estar registrado previamente em `payment_methods`."
          },
          "response": []
        },
        {
          "name": "Alterar vencimento do boleto",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payments/:id/change-due-date",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payments",
                ":id",
                "change-due-date"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"due_date\": \"2026-08-15\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Altera o vencimento de um pagamento em boleto pendente emitido via gateway Kobana. A nova data precisa ser futura."
          },
          "response": []
        },
        {
          "name": "Enviar boleto por e-mail",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payments/:id/send-email",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payments",
                ":id",
                "send-email"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"user@example.com\",\n  \"message\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Envia o link do boleto por e-mail para o destinatário informado. Disponível apenas para pagamentos em boleto pendentes."
          },
          "response": []
        },
        {
          "name": "Sincronizar pagamento com gateway",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payments/:id/sync",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payments",
                ":id",
                "sync"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Sincroniza o status do pagamento com o gateway upstream (PIX/boleto Kobana ou estorno Pagar.me). Retorna o pagamento atualizado."
          },
          "response": []
        },
        {
          "name": "Estornar pagamento",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payments/:id/refund",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payments",
                ":id",
                "refund"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount_cents\": 0,\n  \"reason\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Estorna um pagamento bem-sucedido. Sem `amount_cents`, estorna o valor total; com valor parcial, gera estorno parcial."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Métodos de Pagamento",
      "item": [
        {
          "name": "Listar métodos de pagamento",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payment_methods?page=1&per_page=20&sort_by=&sort_order=asc&billingAccountId=00000000-0000-0000-0000-000000000000&type=card&status=active",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payment_methods"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "billingAccountId",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "type",
                  "value": "card",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "active",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada dos métodos de pagamento da organização atual. Filtros opcionais: `billing_account_id`, `type`, `status`."
          },
          "response": []
        },
        {
          "name": "Criar método de pagamento",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payment_methods",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payment_methods"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"billingAccountId\": \"00000000-0000-0000-0000-000000000000\",\n  \"type\": \"card\",\n  \"isDefault\": false,\n  \"card\": {\n    \"cardToken\": \"\",\n    \"holderName\": \"\"\n  },\n  \"bankAccount\": {\n    \"bankCode\": \"341\",\n    \"agency\": \"\",\n    \"account\": \"\",\n    \"accountType\": \"checking\",\n    \"holderName\": \"\",\n    \"holderDocument\": \"\"\n  },\n  \"billingDetails\": {\n    \"name\": \"\",\n    \"email\": \"user@example.com\",\n    \"phone\": \"\",\n    \"address\": {\n      \"street\": \"\",\n      \"number\": \"\",\n      \"complement\": \"\",\n      \"neighborhood\": \"\",\n      \"city\": \"\",\n      \"state\": \"\",\n      \"zipCode\": \"\",\n      \"country\": \"\"\n    }\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria um método de pagamento associado a uma conta de cobrança. Para `type=card`, envie o bloco `card` com o `cardToken` gerado pela tokenização client-side. Para `type=bank_transfer`, envie o bloco `bankAccount`. Para `bank_slip` e `pix`, basta o `type` — o gateway padrão é resolvido pela organização."
          },
          "response": []
        },
        {
          "name": "Obter método de pagamento",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payment_methods/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payment_methods",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar validade do cartão",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payment_methods/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payment_methods",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"exp_month\": 0,\n  \"exp_year\": 0\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Atualiza apenas mês e ano de validade do cartão associado ao método. Falha quando `type` não é `card`."
          },
          "response": []
        },
        {
          "name": "Remover método de pagamento",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payment_methods/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payment_methods",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Soft delete do método de pagamento (marca como `removed`). Falha quando há pagamentos pendentes ou em processamento. Se era o padrão, outro método ativo é promovido automaticamente."
          },
          "response": []
        },
        {
          "name": "Definir método como padrão",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payment_methods/:id/set-default",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payment_methods",
                ":id",
                "set-default"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Marca o método como padrão da conta de cobrança e desmarca os anteriores. Falha quando o método não está `active`."
          },
          "response": []
        }
      ]
    },
    {
      "name": "NF-e",
      "item": [
        {
          "name": "Listar NFes",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes?page=1&per_page=20&sort_by=&sort_order=asc&billingAccountId=00000000-0000-0000-0000-000000000000&companyId=00000000-0000-0000-0000-000000000000&invoiceId=00000000-0000-0000-0000-000000000000&status=draft&invoiceFilter=with&dateFrom=&dateTo=&issueDateFrom=&issueDateTo=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "billingAccountId",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "companyId",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "invoiceId",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "draft",
                  "disabled": true
                },
                {
                  "key": "invoiceFilter",
                  "value": "with",
                  "disabled": true
                },
                {
                  "key": "dateFrom",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "dateTo",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "issueDateFrom",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "issueDateTo",
                  "value": "",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada de NFes (Notas Fiscais Eletrônicas) da organização atual."
          },
          "response": []
        },
        {
          "name": "Criar NFe (rascunho)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"billing_account_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"company_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"invoice_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"transaction_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"amount_cents\": 0,\n  \"service_code\": \"\",\n  \"service_description\": \"\",\n  \"lc116_code\": \"\",\n  \"cnae_code\": \"\",\n  \"nbs_code\": \"\",\n  \"rps_number\": 0,\n  \"rps_serial_number\": \"\",\n  \"customer\": {\n    \"name\": \"\",\n    \"email\": \"user@example.com\",\n    \"document_type\": \"cpf\",\n    \"document_number\": \"\",\n    \"phone\": \"\",\n    \"address\": {\n      \"street\": \"\",\n      \"number\": \"\",\n      \"complement\": \"\",\n      \"neighborhood\": \"\",\n      \"city\": \"\",\n      \"city_code\": \"\",\n      \"state\": \"\",\n      \"zip_code\": \"\",\n      \"country\": \"\"\n    }\n  },\n  \"taxes\": {\n    \"iss_rate\": 0,\n    \"pis_rate\": 0,\n    \"cofins_rate\": 0,\n    \"csll_rate\": 0,\n    \"ir_rate\": 0,\n    \"inss_rate\": 0\n  },\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria uma NFe em rascunho (`draft`) para emissão posterior via `POST /nfes/{id}/issue`. Aceita dados do tomador (`customer`) e alíquotas opcionais."
          },
          "response": []
        },
        {
          "name": "Sincronizar NFes da organização",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes/sync",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes",
                "sync"
              ]
            },
            "description": "Dispara um job em background para sincronizar todas as NFes da organização com o provedor (atualiza status, baixa PDFs/XMLs pendentes). Retorna o `job_id` para acompanhamento. Recusa se já existir uma sync ativa."
          },
          "response": []
        },
        {
          "name": "Atualizar NFes em lote",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes/bulk",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes",
                "bulk"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"nfe_ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ],\n  \"invoice_id\": \"00000000-0000-0000-0000-000000000000\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Atualiza várias NFes de uma vez. Hoje suporta vincular ou desvincular uma fatura (`invoice_id`) em até 100 NFes por requisição."
          },
          "response": []
        },
        {
          "name": "Excluir NFes em lote",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes/bulk-delete",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes",
                "bulk-delete"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Exclui até 100 NFes de uma vez. Todas devem estar em status `draft` e pertencer à organização atual."
          },
          "response": []
        },
        {
          "name": "Listar tentativas de requisição (organização)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes/request-tries?page=1&per_page=20&sort_by=&sort_order=asc",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes",
                "request-tries"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                }
              ]
            },
            "description": "Lista todas as tentativas de requisição ao provedor de NFe da organização, paginadas e ordenadas por data decrescente."
          },
          "response": []
        },
        {
          "name": "Buscar NFS-e no ADN (SEFAZ)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes/fetch-from-sefaz",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes",
                "fetch-from-sefaz"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"access_key\": \"\",\n  \"certificate_id\": \"\",\n  \"ambiente\": 1\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Busca uma NFS-e no Ambiente de Dados Nacional (ADN) usando uma chave de acesso de 50 dígitos e um certificado digital previamente cadastrado (autenticação mTLS)."
          },
          "response": []
        },
        {
          "name": "Buscar NFS-e em Barueri",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes/fetch-barueri",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes",
                "fetch-barueri"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"codigo_autenticidade\": \"\",\n  \"cnpj_tomador\": \"\",\n  \"ambiente\": \"production\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Busca uma NFS-e no endpoint municipal de Barueri usando o `codigo_autenticidade` impresso no DANFSE e o CPF/CNPJ do tomador. Retorna o XML cru e, quando encontrada, a NFe já existente na organização."
          },
          "response": []
        },
        {
          "name": "Importar NFS-e Barueri",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes/import-barueri",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes",
                "import-barueri"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"xml\": \"\",\n  \"codigo_autenticidade\": \"\",\n  \"cnpj_tomador\": \"\",\n  \"ambiente\": \"production\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Importa uma NFS-e de Barueri para o banco. Aceita um XML cru (retornado por `POST /nfes/fetch-barueri`) ou o `codigo_autenticidade` + `cnpj_tomador` para re-buscar antes de importar. Cria a `BillingAccount` do tomador quando ainda não existir."
          },
          "response": []
        },
        {
          "name": "Obter NFe",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar NFe (rascunho)",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"service_code\": \"\",\n  \"service_description\": \"\",\n  \"amount_cents\": 0,\n  \"lc116_code\": \"\",\n  \"cnae_code\": \"\",\n  \"nbs_code\": \"\",\n  \"ncm_code\": \"\",\n  \"rps_number\": 0,\n  \"rps_serial_number\": \"\",\n  \"customer_snapshot\": {},\n  \"taxes\": {},\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Atualiza campos da NFe. Apenas NFes em `draft` aceitam mudanças nos valores e códigos fiscais."
          },
          "response": []
        },
        {
          "name": "Excluir NFe",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Exclui uma NFe. Permitido apenas para os status `draft`, `pending`, `processing`, `error` ou `canceled`. NFes `issued` devem ser canceladas via `POST /nfes/{id}/cancel`."
          },
          "response": []
        },
        {
          "name": "Emitir NFe",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes/:id/issue",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes",
                ":id",
                "issue"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Emite uma NFe em rascunho (`draft`) ou retenta uma NFe em `pending`/`error`. Envia a requisição para o provedor configurado na organização."
          },
          "response": []
        },
        {
          "name": "Cancelar NFe",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes/:id/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes",
                ":id",
                "cancel"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reason\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cancela uma NFe emitida. Enfileira o cancelamento de forma assíncrona junto ao provedor. O motivo (`reason`) deve ter no mínimo 15 caracteres e é registrado no audit log."
          },
          "response": []
        },
        {
          "name": "Retentar cancelamento da NFe",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes/:id/retry-cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes",
                ":id",
                "retry-cancel"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Retenta o cancelamento de uma NFe travada em `pending_cancel`, `canceling` ou `error`. Reenfileira o job de cancelamento."
          },
          "response": []
        },
        {
          "name": "Sincronizar PDF/XML da NFe",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes/:id/sync",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes",
                ":id",
                "sync"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Baixa do provedor o PDF e o XML da NFe e persiste no banco de dados."
          },
          "response": []
        },
        {
          "name": "Baixar PDF da NFe",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes/:id/pdf",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes",
                ":id",
                "pdf"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Baixa o PDF da NFe (DANFE) como anexo binário (`application/pdf`). Serve do banco quando disponível; caso contrário, busca no provedor."
          },
          "response": []
        },
        {
          "name": "Baixar XML da NFe",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes/:id/xml",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes",
                ":id",
                "xml"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Baixa o XML da NFe como anexo binário (`application/xml`). Serve do banco quando disponível; caso contrário, busca no provedor."
          },
          "response": []
        },
        {
          "name": "Listar tentativas de requisição da NFe",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes/:id/request-tries",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes",
                ":id",
                "request-tries"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Lista as tentativas (`NfeRequestTry`) feitas ao provedor para esta NFe — uma entrada por chamada, com endpoint, status HTTP, duração e mensagens de erro."
          },
          "response": []
        },
        {
          "name": "Listar requisições externas da NFe",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes/:id/requests?page=1&per_page=20&sort_by=&sort_order=asc&direction=outbound",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes",
                ":id",
                "requests"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "direction",
                  "value": "outbound",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Lista as requisições HTTP capturadas para esta NFe (chamadas ao provedor e webhooks recebidos), com paginação. Use `direction` para filtrar entre `outbound` e `inbound`."
          },
          "response": []
        },
        {
          "name": "Obter requisição externa",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes/:id/requests/:requestId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes",
                ":id",
                "requests",
                ":requestId"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                },
                {
                  "key": "requestId",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Validar NFS-e Barueri",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/nfes/:id/validate-barueri",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nfes",
                ":id",
                "validate-barueri"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Re-busca a NFS-e na prefeitura de Barueri e compara com o registro local, devolvendo a lista de diferenças e o XML atualizado para reaplicação via `POST /nfes/import-barueri`."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Propostas",
      "item": [
        {
          "name": "Listar propostas",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals?page=1&per_page=20&sort_by=&sort_order=asc&status=draft&billing_account_id=00000000-0000-0000-0000-000000000000&prospect_id=00000000-0000-0000-0000-000000000000&company_id=00000000-0000-0000-0000-000000000000&template_id=00000000-0000-0000-0000-000000000000&search=&expires_after=&expires_before=&date_from=&date_to=&accepted_from=&accepted_to=&setup_amount_min=0&setup_amount_max=0&monthly_amount_min=0&monthly_amount_max=0",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "draft",
                  "disabled": true
                },
                {
                  "key": "billing_account_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "prospect_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "company_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "template_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "expires_after",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "expires_before",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "date_from",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "date_to",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "accepted_from",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "accepted_to",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "setup_amount_min",
                  "value": "0",
                  "disabled": true
                },
                {
                  "key": "setup_amount_max",
                  "value": "0",
                  "disabled": true
                },
                {
                  "key": "monthly_amount_min",
                  "value": "0",
                  "disabled": true
                },
                {
                  "key": "monthly_amount_max",
                  "value": "0",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada de propostas comerciais da organização atual."
          },
          "response": []
        },
        {
          "name": "Criar proposta",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"company_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"title\": \"\",\n  \"description\": \"\",\n  \"billing_account_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"prospect_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"contact_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"prospect_data\": {\n    \"document\": \"\",\n    \"name\": \"\",\n    \"legal_name\": \"\",\n    \"nickname\": \"\",\n    \"email\": \"user@example.com\",\n    \"phone\": \"\"\n  },\n  \"contact_data\": {\n    \"name\": \"\",\n    \"email\": \"user@example.com\",\n    \"phone\": \"\"\n  },\n  \"coupon_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"template_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"expires_at\": \"\",\n  \"notes\": \"\",\n  \"items\": [\n    {\n      \"product_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"price_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"quantity\": 0,\n      \"unit_amount_subcents\": 0,\n      \"custom_metadata\": {}\n    }\n  ],\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria uma proposta comercial. É obrigatório informar `billing_account_id`, `prospect_id` ou `prospect_data` (criação inline do prospect)."
          },
          "response": []
        },
        {
          "name": "Obter estatísticas de propostas",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/stats",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                "stats"
              ]
            },
            "description": "Retorna contagens de propostas por status (`draft`, `sent`, `viewed`, `accepted`, `rejected`, `expired`, `canceled`) para a organização atual."
          },
          "response": []
        },
        {
          "name": "Cancelar propostas em lote",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/bulk-cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                "bulk-cancel"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cancela várias propostas de uma vez (até 100). Retorna contagens de sucesso/falha e erros por id."
          },
          "response": []
        },
        {
          "name": "Excluir propostas em lote",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/bulk-delete",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                "bulk-delete"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Exclui várias propostas de uma vez (até 100). Retorna contagens de sucesso/falha e erros por id."
          },
          "response": []
        },
        {
          "name": "Enviar propostas em lote",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/bulk-send",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                "bulk-send"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Envia várias propostas de uma vez (até 100). Retorna contagens de sucesso/falha e erros por id."
          },
          "response": []
        },
        {
          "name": "Obter proposta",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar proposta",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"company_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"title\": \"\",\n  \"description\": \"\",\n  \"billing_account_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"prospect_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"contact_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"prospect_data\": {\n    \"document\": \"\",\n    \"name\": \"\",\n    \"legal_name\": \"\",\n    \"nickname\": \"\",\n    \"email\": \"user@example.com\",\n    \"phone\": \"\"\n  },\n  \"contact_data\": {\n    \"name\": \"\",\n    \"email\": \"user@example.com\",\n    \"phone\": \"\"\n  },\n  \"coupon_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"template_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"expires_at\": \"\",\n  \"notes\": \"\",\n  \"items\": [\n    {\n      \"product_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"price_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"quantity\": 0,\n      \"unit_amount_subcents\": 0,\n      \"custom_metadata\": {}\n    }\n  ],\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Excluir proposta",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Aceitar proposta",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/:id/accept",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                ":id",
                "accept"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"cycle\": \"monthly\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Aceita a proposta e cria (ou confirma) a assinatura correspondente no ciclo informado."
          },
          "response": []
        },
        {
          "name": "Cancelar proposta",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/:id/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                ":id",
                "cancel"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Cancela a proposta (`status → canceled`)."
          },
          "response": []
        },
        {
          "name": "Duplicar proposta",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/:id/duplicate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                ":id",
                "duplicate"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Cria uma nova proposta a partir da proposta original (rascunho), preservando itens e configurações."
          },
          "response": []
        },
        {
          "name": "Enviar proposta por e-mail",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/:id/send",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                ":id",
                "send"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"subject\": \"\",\n  \"message\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Envia (ou reenvia) a proposta por e-mail ao destinatário. Estados aceitos: `draft`, `sent` ou `viewed`. Opcionalmente, é possível customizar `subject` e `message` (HTML)."
          },
          "response": []
        },
        {
          "name": "Publicar proposta",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/:id/publish",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                ":id",
                "publish"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Publica a proposta (`draft → sent`) sem disparar o e-mail, tornando-a acessível no portal."
          },
          "response": []
        },
        {
          "name": "Despublicar proposta",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/:id/unpublish",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                ":id",
                "unpublish"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Volta a proposta para rascunho (`sent`/`viewed` → `draft`)."
          },
          "response": []
        },
        {
          "name": "Desfazer aceite da proposta",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/:id/undo-accept",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                ":id",
                "undo-accept"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Desfaz a aceitação: remove a assinatura vinculada e volta o status para `sent`."
          },
          "response": []
        },
        {
          "name": "Gerar PDF da proposta",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/:id/generate-pdf",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                ":id",
                "generate-pdf"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Gera (ou regenera) o PDF da proposta via Google App Scripts. Requer um `template` com `app_script_url` configurado."
          },
          "response": []
        },
        {
          "name": "Obter snapshot JSON da proposta",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/:id/json",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                ":id",
                "json"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Retorna o snapshot completo dos dados usados para renderizar o template do PDF (espelha o que o AppScript recebe)."
          },
          "response": []
        },
        {
          "name": "Obter cálculo de preço da proposta",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/:id/pricing",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                ":id",
                "pricing"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Retorna o detalhamento de preços por ciclo de cobrança (mensal, trimestral, semestral, anual), com setup e descontos aplicados."
          },
          "response": []
        },
        {
          "name": "Listar itens da proposta",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/:id/items",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                ":id",
                "items"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Adicionar item à proposta",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/:id/items",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                ":id",
                "items"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"product_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"price_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"quantity\": 0,\n  \"unit_amount_subcents\": 0,\n  \"metadata\": {},\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Obter item da proposta",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/:id/items/:itemId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                ":id",
                "items",
                ":itemId"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                },
                {
                  "key": "itemId",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar item da proposta",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/:id/items/:itemId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                ":id",
                "items",
                ":itemId"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                },
                {
                  "key": "itemId",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"quantity\": 0,\n  \"unit_amount_subcents\": 0,\n  \"setup_amount_subcents\": 0,\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Atualiza um item. Só é permitido em propostas em rascunho (`status = draft`)."
          },
          "response": []
        },
        {
          "name": "Excluir item da proposta",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposals/:id/items/:itemId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposals",
                ":id",
                "items",
                ":itemId"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                },
                {
                  "key": "itemId",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Remove um item. Só é permitido em propostas em rascunho (`status = draft`)."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Templates de Proposta",
      "item": [
        {
          "name": "Listar templates de proposta",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposal_templates?page=1&per_page=20&sort_by=&sort_order=asc&search=&isActive=false",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposal_templates"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "isActive",
                  "value": "false",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada dos templates de proposta da organização atual."
          },
          "response": []
        },
        {
          "name": "Criar template de proposta",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposal_templates",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposal_templates"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"description\": \"\",\n  \"documentType\": \"google_doc\",\n  \"googleDocId\": \"\",\n  \"appScriptUrl\": \"https://example.com\",\n  \"googleDriveFolderId\": \"\",\n  \"isDefault\": false,\n  \"isActive\": false,\n  \"customMetadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria um template de proposta vinculado a um Google Doc ou Google Slides. O `google_doc_id` precisa ser único por organização."
          },
          "response": []
        },
        {
          "name": "Obter template de proposta",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposal_templates/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposal_templates",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar template de proposta",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposal_templates/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposal_templates",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"description\": \"\",\n  \"documentType\": \"google_doc\",\n  \"googleDocId\": \"\",\n  \"appScriptUrl\": \"https://example.com\",\n  \"googleDriveFolderId\": \"\",\n  \"isDefault\": false,\n  \"isActive\": false,\n  \"customMetadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Excluir template de proposta",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposal_templates/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposal_templates",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Ativar template de proposta",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposal_templates/:id/activate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposal_templates",
                ":id",
                "activate"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Ativa um template de proposta previamente desativado, tornando-o disponível para uso em novas propostas."
          },
          "response": []
        },
        {
          "name": "Desativar template de proposta",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposal_templates/:id/deactivate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposal_templates",
                ":id",
                "deactivate"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Desativa um template de proposta. Templates desativados não podem ser usados em novas propostas, mas as propostas já criadas permanecem inalteradas."
          },
          "response": []
        },
        {
          "name": "Duplicar template de proposta",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposal_templates/:id/duplicate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposal_templates",
                ":id",
                "duplicate"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Cria uma cópia do template informado, mantendo configuração e metadados. O novo template recebe um nome derivado e nunca herda a flag `is_default`."
          },
          "response": []
        },
        {
          "name": "Definir template como padrão",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/proposal_templates/:id/set-default",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "proposal_templates",
                ":id",
                "set-default"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Marca o template informado como padrão da organização e remove a flag dos demais. Apenas um template pode ser padrão por vez."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Mudanças de Plano",
      "item": [
        {
          "name": "Listar mudanças de plano",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plan_changes?page=1&per_page=20&sort_by=&sort_order=asc&subscription_id=00000000-0000-0000-0000-000000000000&change_type=upgrade&status=pending",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plan_changes"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "subscription_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "change_type",
                  "value": "upgrade",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "pending",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna o histórico paginado de mudanças de plano (upgrades, downgrades e laterais) da organização atual."
          },
          "response": []
        },
        {
          "name": "Executar mudança de plano",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plan_changes",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plan_changes"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"subscription_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"to_plan_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"timing\": \"immediate\",\n  \"reason\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Executa uma mudança de plano para uma assinatura existente. O `timing` controla se a mudança é aplicada imediatamente (com proração) ou no fim do período atual. Quando bem-sucedido, retorna os UUIDs do `plan_change`, da fatura de proração (se houver) e do crédito gerado (se houver)."
          },
          "response": []
        },
        {
          "name": "Estatísticas de mudanças de plano",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plan_changes/stats?days=30",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plan_changes",
                "stats"
              ],
              "query": [
                {
                  "key": "days",
                  "value": "30",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna agregados de mudanças de plano (totais por tipo, por status, créditos e cobranças de proração) para uma janela em dias."
          },
          "response": []
        },
        {
          "name": "Obter configuração de mudança de plano",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plan_changes/config",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plan_changes",
                "config"
              ]
            },
            "description": "Retorna a configuração padrão da organização para upgrades e downgrades — comportamento de proração, timing e geração de crédito/refund."
          },
          "response": []
        },
        {
          "name": "Atualizar configuração de mudança de plano",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plan_changes/config",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plan_changes",
                "config"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"allow_upgrade\": false,\n  \"allow_downgrade\": false,\n  \"upgrade_proration\": \"full_proration\",\n  \"downgrade_proration\": \"full_proration\",\n  \"upgrade_timing\": \"immediate\",\n  \"downgrade_timing\": \"immediate\",\n  \"refund_on_downgrade\": false,\n  \"credit_on_downgrade\": false,\n  \"apply_discount_on_change\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Atualiza parcialmente (PATCH) a configuração de mudança de plano da organização. Todos os campos são opcionais."
          },
          "response": []
        },
        {
          "name": "Listar regras de mudança de plano",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plan_changes/rules",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plan_changes",
                "rules"
              ]
            },
            "description": "Lista as regras customizadas que sobrescrevem o comportamento padrão para transições específicas entre planos."
          },
          "response": []
        },
        {
          "name": "Criar regra de mudança de plano",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plan_changes/rules",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plan_changes",
                "rules"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"from_plan_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"to_plan_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"change_type\": \"upgrade\",\n  \"allowed\": false,\n  \"timing\": \"immediate\",\n  \"proration_method\": \"full_proration\",\n  \"discount_percent\": 0,\n  \"bonus_days\": 0,\n  \"message\": \"\",\n  \"priority\": 0\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria uma nova regra para uma transição entre planos. Permite bloquear/permitir a transição, definir timing, proração, descontos e dias bônus."
          },
          "response": []
        },
        {
          "name": "Obter regra de mudança de plano",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plan_changes/rules/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plan_changes",
                "rules",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar regra de mudança de plano",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plan_changes/rules/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plan_changes",
                "rules",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"allowed\": false,\n  \"timing\": \"immediate\",\n  \"proration_method\": \"full_proration\",\n  \"discount_percent\": 0,\n  \"bonus_days\": 0,\n  \"message\": \"\",\n  \"priority\": 0,\n  \"is_active\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Excluir regra de mudança de plano",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plan_changes/rules/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plan_changes",
                "rules",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Obter mudança de plano",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plan_changes/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plan_changes",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Mudanças de Assinatura",
      "item": [
        {
          "name": "Obter configuração de mudanças de assinatura",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/subscription_changes/config",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "subscription_changes",
                "config"
              ]
            },
            "description": "Retorna a configuração da organização para mudanças em itens de assinaturas — operações permitidas (incluir/remover/alterar quantidade/trocar preço), método de proporção (proration) por operação, momento de aplicação (`immediate` ou `end_of_period`), reembolso/crédito na remoção e self-service no portal. Se ainda não existir, é criada com os defaults na primeira leitura."
          },
          "response": []
        },
        {
          "name": "Atualizar configuração de mudanças de assinatura",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/subscription_changes/config",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "subscription_changes",
                "config"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"allow_item_add\": false,\n  \"allow_item_remove\": false,\n  \"allow_quantity_change\": false,\n  \"allow_price_swap\": false,\n  \"add_proration\": \"full_proration\",\n  \"remove_proration\": \"full_proration\",\n  \"quantity_up_proration\": \"full_proration\",\n  \"quantity_down_proration\": \"full_proration\",\n  \"add_timing\": \"immediate\",\n  \"remove_timing\": \"immediate\",\n  \"quantity_up_timing\": \"immediate\",\n  \"quantity_down_timing\": \"immediate\",\n  \"refund_on_remove\": false,\n  \"credit_on_remove\": false,\n  \"portal_self_service\": false,\n  \"portal_require_confirmation\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Atualiza parcialmente a configuração. Apenas os campos enviados são alterados. `refund_on_remove` exige que `credit_on_remove` também esteja habilitado — reembolso é uma variante de crédito."
          },
          "response": []
        },
        {
          "name": "Listar mudanças de itens de assinatura",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/subscription_item_changes?page=1&per_page=20&sort_by=&sort_order=asc&subscription_id=00000000-0000-0000-0000-000000000000&status=pending",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "subscription_item_changes"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "subscription_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "pending",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada das mudanças aplicadas (ou agendadas) sobre itens de assinaturas da organização — adições, remoções, alterações de quantidade e trocas de preço. Cada registro inclui o snapshot das operações, os valores de proporção (proration) em **subcents** (÷10000 → BRL) e os ponteiros para a fatura/credit gerados."
          },
          "response": []
        },
        {
          "name": "Obter mudança de item de assinatura",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/subscription_item_changes/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "subscription_item_changes",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Uso (Metered)",
      "item": [
        {
          "name": "Listar registros de uso",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/usage?subscription_item_id=00000000-0000-0000-0000-000000000000&product_slug=&customer_id=&start_date=&end_date=&limit=0&offset=0",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "usage"
              ],
              "query": [
                {
                  "key": "subscription_item_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "product_slug",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "customer_id",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "start_date",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "end_date",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "0",
                  "disabled": true
                },
                {
                  "key": "offset",
                  "value": "0",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna os registros de uso (metered) de um item de assinatura. Identifique o item por `subscription_item_id` **ou** pela combinação `product_slug` + `customer_id`. Suporta filtros por intervalo de datas e janela com `limit`/`offset`."
          },
          "response": []
        },
        {
          "name": "Reportar uso (metered)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/usage",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "usage"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"subscription_item_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"product_slug\": \"\",\n  \"customer_id\": \"\",\n  \"quantity\": 5,\n  \"action\": \"increment\",\n  \"timestamp\": \"2026-01-01T00:00:00Z\",\n  \"idempotency_key\": \"\",\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Reporta uso para faturamento metered. Aceita um registro único **ou** um lote `{ records: [...] }` com até **100** itens. Cada registro precisa identificar o item de assinatura por `subscription_item_id` **ou** por `product_slug` + `customer_id` (recomendado para integrações externas). O preço/produto deve estar configurado como `usage_type=metered` e a assinatura precisa estar `active` ou `trialing`. Use `idempotency_key` para evitar duplicidade — em caso de chave já vista, a resposta marca `duplicate: true`. Lotes com falhas parciais retornam **207 Multi-Status**."
          },
          "response": []
        },
        {
          "name": "Resumo de uso do período",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/usage/summary?subscription_item_id=00000000-0000-0000-0000-000000000000&product_slug=&customer_id=&period_start=&period_end=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "usage",
                "summary"
              ],
              "query": [
                {
                  "key": "subscription_item_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "product_slug",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "customer_id",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "period_start",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "period_end",
                  "value": "",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna a agregação de uso de um item de assinatura no período de cobrança vigente (ou em um período arbitrário via `period_start`/`period_end`). Considera registros `set` (substituem) e somatórios de `increment` posteriores. Quando o preço é tiered ou unitário, calcula um custo estimado em `estimated_cost_cents` (÷100 → BRL)."
          },
          "response": []
        },
        {
          "name": "Listar snapshots diários de uso",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/usage/snapshots/daily?billing_account_id=00000000-0000-0000-0000-000000000000&product_id=00000000-0000-0000-0000-000000000000&start_date=&end_date=&limit=0&offset=0",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "usage",
                "snapshots",
                "daily"
              ],
              "query": [
                {
                  "key": "billing_account_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "product_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "start_date",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "end_date",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "0",
                  "disabled": true
                },
                {
                  "key": "offset",
                  "value": "0",
                  "disabled": true
                }
              ]
            },
            "description": "Lista os snapshots diários de uso da organização. Filtros opcionais: `billing_account_id`, `product_id` e janela `start_date`/`end_date`. Suporta paginação por `limit`/`offset`."
          },
          "response": []
        },
        {
          "name": "Criar snapshots diários de uso",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/usage/snapshots/daily",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "usage",
                "snapshots",
                "daily"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"billing_account_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"billing_account_public_id\": \"\",\n  \"product_group_slug\": \"\",\n  \"product_slug\": \"\",\n  \"product_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"snapshot_date\": \"2026-03-15\",\n  \"quantity\": 0,\n  \"idempotency_key\": \"\",\n  \"calculated_at\": \"2026-01-01T00:00:00Z\",\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria snapshots diários de uso, registro único **ou** em lote `{ records: [...] }` com até **100** itens. O conjunto natural (organização, conta de cobrança, produto, data) é único: se já existir, o snapshot é sobrescrito (`overwritten: true`). Resolva a conta por `billing_account_id` **ou** `billing_account_public_id` e o produto por `product_slug` **ou** `product_id` dentro do `product_group_slug` informado. Lotes com falhas parciais retornam **207 Multi-Status**."
          },
          "response": []
        },
        {
          "name": "Listar snapshots mensais de uso",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/usage/snapshots/monthly?billing_account_id=00000000-0000-0000-0000-000000000000&product_id=00000000-0000-0000-0000-000000000000&start_month=&end_month=&limit=0&offset=0",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "usage",
                "snapshots",
                "monthly"
              ],
              "query": [
                {
                  "key": "billing_account_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "product_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "start_month",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "end_month",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "0",
                  "disabled": true
                },
                {
                  "key": "offset",
                  "value": "0",
                  "disabled": true
                }
              ]
            },
            "description": "Lista os snapshots mensais de uso da organização. Filtros opcionais: `billing_account_id`, `product_id` e janela `start_month`/`end_month`. Suporta paginação por `limit`/`offset`."
          },
          "response": []
        },
        {
          "name": "Criar snapshots mensais de uso",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/usage/snapshots/monthly",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "usage",
                "snapshots",
                "monthly"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"billing_account_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"billing_account_public_id\": \"\",\n  \"product_group_slug\": \"\",\n  \"product_slug\": \"\",\n  \"product_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"month\": \"2026-03-01\",\n  \"total_quantity\": 0,\n  \"avg_daily_quantity\": 0,\n  \"days_with_usage\": 0,\n  \"plan_limit\": 0,\n  \"excess_quantity\": 0,\n  \"idempotency_key\": \"\",\n  \"calculated_at\": \"2026-01-01T00:00:00Z\",\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria snapshots mensais de uso, registro único **ou** em lote `{ records: [...] }` com até **100** itens. O conjunto natural (organização, conta de cobrança, produto, mês) é único: se já existir, o snapshot é sobrescrito (`overwritten: true`). Resolva a conta por `billing_account_id` **ou** `billing_account_public_id` e o produto por `product_slug` **ou** `product_id` dentro do `product_group_slug`. Lotes com falhas parciais retornam **207 Multi-Status**."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Regras Tributárias",
      "item": [
        {
          "name": "Listar regras tributárias",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/tax_rules?page=1&per_page=20&sort_by=&sort_order=asc&scope=global&company_id=00000000-0000-0000-0000-000000000000&service_item_id=00000000-0000-0000-0000-000000000000&billing_account_id=00000000-0000-0000-0000-000000000000&is_active=true&search=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "tax_rules"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "scope",
                  "value": "global",
                  "disabled": true
                },
                {
                  "key": "company_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "service_item_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "billing_account_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "is_active",
                  "value": "true",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada das regras tributárias da organização atual. Use os filtros de `scope`, `company_id`, `service_item_id`, `billing_account_id` e `is_active` para restringir o resultado."
          },
          "response": []
        },
        {
          "name": "Criar regra tributária",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/tax_rules",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "tax_rules"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"description\": \"\",\n  \"scope\": \"global\",\n  \"priority\": 0,\n  \"company_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"service_item_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"billing_account_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"customer_tax_type\": \"pessoa_fisica\",\n  \"municipality\": \"\",\n  \"operation_type\": \"interno\",\n  \"effective_from\": \"2026-01-01T00:00:00Z\",\n  \"effective_to\": \"2026-01-01T00:00:00Z\",\n  \"items\": [\n    {\n      \"tax_type\": \"iss\",\n      \"rate\": 5,\n      \"is_withheld\": false,\n      \"base_type\": \"service_value\",\n      \"is_exempt\": false,\n      \"exemption_reason\": \"\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria uma nova regra tributária com seus itens (alíquotas por tributo). O `scope` define o nível de aplicação e a `priority` define a precedência — regras de maior prioridade sobrescrevem as menores. É obrigatório informar ao menos um item em `items`."
          },
          "response": []
        },
        {
          "name": "Obter regra tributária",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/tax_rules/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "tax_rules",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar regra tributária",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/tax_rules/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "tax_rules",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"description\": \"\",\n  \"priority\": 0,\n  \"is_active\": false,\n  \"effective_to\": \"2026-01-01T00:00:00Z\",\n  \"items\": [\n    {\n      \"tax_type\": \"iss\",\n      \"rate\": 5,\n      \"is_withheld\": false,\n      \"base_type\": \"service_value\",\n      \"is_exempt\": false,\n      \"exemption_reason\": \"\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Atualiza campos editáveis da regra. Quando `items` é informado, **substitui** integralmente a lista de itens existente."
          },
          "response": []
        },
        {
          "name": "Excluir regra tributária",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/tax_rules/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "tax_rules",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Períodos Tributários",
      "item": [
        {
          "name": "Listar períodos tributários",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/tax_periods?page=1&per_page=20&sort_by=&sort_order=asc&company_id=00000000-0000-0000-0000-000000000000&period_type=monthly&year=&status=open",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "tax_periods"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "company_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "period_type",
                  "value": "monthly",
                  "disabled": true
                },
                {
                  "key": "year",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "open",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada dos períodos tributários (mensais ou trimestrais) da organização. Permite filtrar por empresa, tipo de período, ano e status."
          },
          "response": []
        },
        {
          "name": "Processar período tributário mensal",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/tax_periods",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "tax_periods"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"company_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"year\": 2026,\n  \"month\": 6\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria (ou recupera) o período tributário mensal informado e calcula os impostos devidos (ISS, PIS, COFINS, IRPJ, CSLL, CBS, IBS) com base nas NFes emitidas e nas retenções a compensar. Quando `company_id` é omitido, usa a empresa padrão da organização."
          },
          "response": []
        },
        {
          "name": "Obter período tributário",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/tax_periods/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "tax_periods",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Executar ação no período tributário",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/tax_periods/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "tax_periods",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"action\": \"recalculate\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Aplica uma ação sobre o período: `recalculate` recalcula os impostos (somente períodos mensais), `close` encerra o período e `reopen` o reabre."
          },
          "response": []
        },
        {
          "name": "Excluir período tributário",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/tax_periods/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "tax_periods",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Remove permanentemente o período tributário. Use com cautela — períodos encerrados normalmente não devem ser excluídos."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Retenções",
      "item": [
        {
          "name": "Listar retenções",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/withholdings?page=1&per_page=20&sort_by=&sort_order=asc&taxType=iss&status=retained&withholderId=00000000-0000-0000-0000-000000000000&invoiceId=00000000-0000-0000-0000-000000000000&nfeId=00000000-0000-0000-0000-000000000000&competenceYear=0&competenceMonth=0",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "withholdings"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "taxType",
                  "value": "iss",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "retained",
                  "disabled": true
                },
                {
                  "key": "withholderId",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "invoiceId",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "nfeId",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "competenceYear",
                  "value": "0",
                  "disabled": true
                },
                {
                  "key": "competenceMonth",
                  "value": "0",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada das retenções tributárias da organização atual. Suporta filtros por tipo de tributo, status, retentor, fatura, NF-e e competência."
          },
          "response": []
        },
        {
          "name": "Converter retenções pendentes em créditos (em lote)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/withholdings/convert-to-credits",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "withholdings",
                "convert-to-credits"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tax_type\": \"iss\",\n  \"competence_year\": 0,\n  \"competence_month\": 0\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Converte todas as retenções pendentes da organização — opcionalmente restritas por `tax_type` e/ou competência — em créditos. Retorna a lista de créditos gerados, a quantidade total convertida e o valor total em centavos."
          },
          "response": []
        },
        {
          "name": "Obter retenção",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/withholdings/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "withholdings",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Converter retenção em crédito",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/withholdings/:id/convert-to-credit",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "withholdings",
                ":id",
                "convert-to-credit"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount_cents\": 0\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Converte uma retenção (total ou parcialmente) em um crédito na conta de cobrança derivada da fatura associada — ou, na ausência dela, do próprio retentor. Quando `amount_cents` é omitido, converte o saldo pendente da retenção."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Itens de Serviço (LC 116)",
      "item": [
        {
          "name": "Listar itens de serviço",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/service_items?page=1&per_page=20&sort_by=&sort_order=asc&company_id=00000000-0000-0000-0000-000000000000&search=&is_active=true&lc116_code=&nbs_code=&c_class_trib=&indop_code=&simples_annex=annex_iii",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "service_items"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "company_id",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "is_active",
                  "value": "true",
                  "disabled": true
                },
                {
                  "key": "lc116_code",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "nbs_code",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "c_class_trib",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "indop_code",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "simples_annex",
                  "value": "annex_iii",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada dos itens de serviço (catálogo LC 116/2003) da organização atual. Use os filtros para restringir por empresa, código LC 116, NBS, classificação tributária, indicador de operação ou anexo do Simples."
          },
          "response": []
        },
        {
          "name": "Criar item de serviço",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/service_items",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "service_items"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"company_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"name\": \"\",\n  \"description\": \"\",\n  \"internal_code\": \"\",\n  \"lc116_code\": \"01.05\",\n  \"municipal_code\": \"\",\n  \"nbs_code\": \"\",\n  \"cnae_code\": \"\",\n  \"simples_annex\": \"annex_iii\",\n  \"default_iss_rate\": 2.5,\n  \"subject_to_irrf\": false,\n  \"subject_to_csrf\": false,\n  \"subject_to_inss\": false,\n  \"subject_to_iss_withholding\": false,\n  \"c_class_trib\": \"\",\n  \"cbs_ibs_category\": \"\",\n  \"indop_code\": \"\",\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria um item de serviço no catálogo LC 116/2003. O `internal_code` é o identificador interno do item e o `lc116_code` deve seguir o catálogo da Lei Complementar 116/2003 (ex.: `01.05`). Quando `company_id` for informado, a empresa precisa pertencer à organização autenticada."
          },
          "response": []
        },
        {
          "name": "Obter item de serviço",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/service_items/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "service_items",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar item de serviço",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/service_items/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "service_items",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"company_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"name\": \"\",\n  \"description\": \"\",\n  \"lc116_code\": \"\",\n  \"municipal_code\": \"\",\n  \"nbs_code\": \"\",\n  \"cnae_code\": \"\",\n  \"simples_annex\": \"annex_iii\",\n  \"default_iss_rate\": 0,\n  \"subject_to_irrf\": false,\n  \"subject_to_csrf\": false,\n  \"subject_to_inss\": false,\n  \"subject_to_iss_withholding\": false,\n  \"c_class_trib\": \"\",\n  \"cbs_ibs_category\": \"\",\n  \"indop_code\": \"\",\n  \"is_active\": false,\n  \"custom_metadata\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Atualiza campos editáveis do item de serviço. O `internal_code` é imutável depois da criação. Use `is_active=false` para desativar o item sem excluí-lo."
          },
          "response": []
        },
        {
          "name": "Excluir item de serviço",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/service_items/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "service_items",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Exclui o item de serviço permanentemente. Para preservar o histórico em faturas ou NFS-e já emitidas, prefira desativar o item (`PATCH` com `is_active=false`)."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Administração da Conta",
      "item": [
        {
          "name": "Listar usuários do dashboard",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/dashboard_users?page=1&per_page=20&sort_by=&sort_order=asc&search=&status=all&role=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "dashboard_users"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "all",
                  "disabled": true
                },
                {
                  "key": "role",
                  "value": "",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna uma lista paginada dos usuários do dashboard (membros do time) da organização atual."
          },
          "response": []
        },
        {
          "name": "Convidar usuário do dashboard",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/dashboard_users",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "dashboard_users"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"user@example.com\",\n  \"name\": \"\",\n  \"external_id\": \"\",\n  \"role_ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ],\n  \"permissions\": [\n    \"\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Convida um novo membro para o time da organização. É obrigatório informar `email` e ao menos um papel em `role_ids`. O usuário recebe um convite por e-mail e entra com status `pending_invitation`."
          },
          "response": []
        },
        {
          "name": "Obter usuário do dashboard",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/dashboard_users/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "dashboard_users",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar usuário do dashboard",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/dashboard_users/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "dashboard_users",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"picture\": \"\",\n  \"status\": \"active\",\n  \"permissions\": [\n    \"\"\n  ],\n  \"role_ids\": [\n    \"00000000-0000-0000-0000-000000000000\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Atualiza nome, foto, status, permissões e/ou papéis do usuário. Apenas os campos enviados são alterados."
          },
          "response": []
        },
        {
          "name": "Remover usuário do dashboard",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/dashboard_users/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "dashboard_users",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Remove o usuário do dashboard da organização. Ação irreversível — o usuário precisa ser convidado novamente para recuperar o acesso."
          },
          "response": []
        },
        {
          "name": "Listar papéis do time",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/team_roles?page=1&per_page=20&sort_by=&sort_order=asc&search=&is_active=false&is_system=false",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "team_roles"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "sort_by",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort_order",
                  "value": "asc",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "is_active",
                  "value": "false",
                  "disabled": true
                },
                {
                  "key": "is_system",
                  "value": "false",
                  "disabled": true
                }
              ]
            },
            "description": "Retorna a lista paginada de papéis (roles) configurados para o time da organização. Inclui tanto papéis de sistema (`is_system = true`) quanto papéis customizados."
          },
          "response": []
        },
        {
          "name": "Criar papel customizado",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/team_roles",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "team_roles"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"slug\": \"billing_manager\",\n  \"description\": \"\",\n  \"permissions\": [\n    \"\"\n  ],\n  \"is_active\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cria um papel customizado. O `slug` deve começar com letra minúscula e conter apenas letras minúsculas, números e `_`."
          },
          "response": []
        },
        {
          "name": "Obter papel",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/team_roles/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "team_roles",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar papel",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/team_roles/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "team_roles",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"slug\": \"\",\n  \"description\": \"\",\n  \"permissions\": [\n    \"\"\n  ],\n  \"is_active\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Atualiza os campos do papel. Apenas os campos enviados são alterados. Papéis de sistema têm restrições adicionais."
          },
          "response": []
        },
        {
          "name": "Remover papel",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "User-Agent",
                "value": "Kevin Mitnick <kmitnick@kobana.com.br>",
                "type": "text"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "00000000-0000-0000-0000-000000000000",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/team_roles/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "team_roles",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "00000000-0000-0000-0000-000000000000"
                }
              ]
            },
            "description": "Realiza soft delete do papel. Papéis de sistema (`is_system = true`) não podem ser removidos."
          },
          "response": []
        }
      ]
    }
  ]
}
