{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://bigoc.com.br/integration/bigoc-site-go-context.schema.json",
  "title": "Bi.Go.C Site → Go Context",
  "description": "Envelope técnico sem dados pessoais para preservar a origem e a intenção de um encaminhamento do website.",
  "type": "object",
  "additionalProperties": false,
  "required": ["contractVersion", "protocol", "externalChannel", "intentId", "routeCode", "pillarId", "source", "createdAt"],
  "properties": {
    "contractVersion": { "const": "2026-08-21.2" },
    "protocol": { "type": "string", "pattern": "^BIGOC-WEB-[A-Z0-9-]{8,64}$", "maxLength": 80 },
    "externalChannel": { "const": "whatsapp" },
    "intentId": { "type": "string", "enum": ["case01", "arquitetura", "construcao", "metodologia", "software", "outro"] },
    "routeCode": { "type": "string", "enum": ["PROJECTS-CASE01-COMERCIAL", "ARQUITETURA-PROJETO", "CONSTRUCAO-CASAL-CASTRO", "BUILD-SYSTEM", "BUILD-OS", "ECOSSISTEMA-GERAL"] },
    "pillarId": { "type": "string", "enum": ["bi", "go", "c", "ecossistema"] },
    "source": { "type": "string", "minLength": 1, "maxLength": 120 },
    "landingPage": { "type": "string", "maxLength": 240 },
    "cta": { "type": "string", "maxLength": 120 },
    "utmSource": { "type": "string", "maxLength": 120 },
    "utmMedium": { "type": "string", "maxLength": 120 },
    "utmCampaign": { "type": "string", "maxLength": 160 },
    "projectId": { "type": "string", "maxLength": 100 },
    "unitId": { "type": "string", "maxLength": 100 },
    "createdAt": { "type": "string", "format": "date-time" }
  }
}
