{
  "info": {
    "name": "StitsSign API v1.0 Collection",
    "_postman_id": "stitssign-api-v1-collection",
    "description": "Coleção oficial de requisições REST da API StitsSign para gestão de clientes, geração de contratos com Smart Templates e recebimento de Webhooks.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{API_KEY}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "BASE_URL",
      "value": "https://stitssign.fidycard.com.br/api",
      "type": "string"
    },
    {
      "key": "API_KEY",
      "value": "stits_live_key_exemplo_12345",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "1. Clientes",
      "item": [
        {
          "name": "Cadastrar Cliente",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Mariana Souza Santos\",\n  \"email\": \"mariana.souza@email.com\",\n  \"phone\": \"5511999998888\",\n  \"document\": \"123.456.789-00\",\n  \"rg\": \"12.345.678-9\",\n  \"profession\": \"Engenheira de Software\",\n  \"civilStatus\": \"Solteira\",\n  \"address\": \"Av. Paulista, 1000, Apto 42 - São Paulo / SP\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/clients",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "clients"
              ]
            }
          }
        },
        {
          "name": "Listar Clientes",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{BASE_URL}}/clients",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "clients"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "2. Contratos",
      "item": [
        {
          "name": "Criar e Disparar Contrato",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"title\": \"Contrato de Prestação de Serviços de TI\",\n  \"clientId\": \"cl_9812739812\",\n  \"content\": \"CONTRATO CELEBRADO ENTRE A EMPRESA X E {{NOME_CLIENTE}}, INSCRITO SOB O CPF {{DOCUMENTO_CLIENTE}}...\",\n  \"additionalSigners\": [\n    {\n      \"name\": \"Carlos Eduardo\",\n      \"email\": \"carlos@empresa.com\",\n      \"phone\": \"5511988887777\",\n      \"role\": \"Testemunha\"\n    }\n  ]\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/contracts",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "contracts"
              ]
            }
          }
        },
        {
          "name": "Listar Todos os Contratos",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{BASE_URL}}/contracts",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "contracts"
              ]
            }
          }
        },
        {
          "name": "Obter Dados de Download do PDF",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{BASE_URL}}/contracts/:id/pdf",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "contracts",
                ":id",
                "pdf"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "cm081239812000001",
                  "description": "ID do Contrato"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "3. Assinatura Pública",
      "item": [
        {
          "name": "Assinar Documento via Token",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"token\": \"tok_signed_981239812\",\n  \"signerName\": \"Mariana Souza Santos\",\n  \"signatureImage\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==\",\n  \"latitude\": -23.55052,\n  \"longitude\": -46.633308\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/sign",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "sign"
              ]
            }
          }
        }
      ]
    }
  ]
}