json icon

Franchise Partner Updated

v1.1.0events

The roles of a franchise partner changed - roles are the only mutable field. Carries the roles before and after. Consumed by cna-nexus itself to invalidate the economic group statistics cache.

1{
2  "$schema": "https://json-schema.org/draft/2020-12/schema",
3  "title": "FranchisePartnerUpdated payload",
4  "type": "object",
5  "additionalProperties": false,
6  "properties": {
7    "franchiseId": {
8      "type": "string",
9      "description": "Franchise id (UUID). Kafka message key."
10    },
11    "roles": {
12      "type": "array",
13      "items": {
14        "type": "string",
15        "enum": ["FRANCHISEE", "OPERATING_PARTNER"]
16      },
17      "description": "Roles after the change (FranchisePartnerRole). Never empty."
18    },
19    "previousRoles": {
20      "type": "array",
21      "items": {
22        "type": "string",
23        "enum": ["FRANCHISEE", "OPERATING_PARTNER"]
24      },
25      "description": "Roles before the change."
26    },
27    "person": {
28      "type": "object",
29      "additionalProperties": false,
30      "description": "Snapshot of the person (common.persons).",
31      "properties": {
32        "id": {
33          "type": "string",
34          "description": "Person id (UUID)."
35        },
36        "document": {
37          "type": "string",
38          "description": "Person document; format depends on documentType."
39        },
40        "documentType": {
41          "type": "string",
42          "enum": ["CPF", "CNPJ", "RNM"],
43          "description": "Document type (PersonsDocumentType)."
44        },
45        "name": {
46          "type": "string",
47          "description": "Person name."
48        },
49        "email": {
50          "type": ["string", "null"],
51          "description": "E-mail, or null."
52        },
53        "phone": {
54          "type": ["string", "null"],
55          "description": "Phone, or null."
56        },
57        "birthDate": {
58          "type": ["string", "null"],
59          "format": "date",
60          "description": "Birth date as a calendar day, YYYY-MM-DD, no time zone. Null when unknown."
61        },
62        "legalName": {
63          "type": ["string", "null"],
64          "description": "Legal name, for companies."
65        },
66        "isFranchisee": {
67          "type": "boolean",
68          "description": "Whether the person holds the FRANCHISEE role in at least one franchise (any unit, not only this one). Derived, not stored."
69        }
70      },
71      "required": ["id", "document", "documentType", "name", "isFranchisee"]
72    }
73  },
74  "required": ["franchiseId", "roles", "previousRoles", "person"]
75}
76

Details

Format
JSON Schema
Resource
events
Filename
schema.json

Versions