Corporate Clients

Available webhook types: corporate_client.created, corporate_client.updated

Here's a JSON Schema that describes the available corporate clients webhooks:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Corporate Client Audit Event Schemas",
  "description": "JSON schemas for Corporate Client audit events (Created and Updated)",
  "definitions": {
    "AccountStatus": {
      "type": "string",
      "enum": [
        "APPROVED",
        "WAITING_FOR_REVIEW", 
        "IN_REVIEW",
        "REJECTED",
        "OFF_BOARDED",
        "FROZEN",
        "PENDING_DOCUMENTS",
        "CLOSED_BY_CLIENT"
      ],
      "description": "Current account status of the corporate client"
    },
    "ActivityStatus": {
      "type": "string", 
      "enum": ["ACTIVE", "NOT_ACTIVE"],
      "description": "Current activity status of the corporate client"
    },
    "RiskLevel": {
      "type": "string",
      "enum": ["LOW", "MEDIUM", "HIGH"],
      "description": "Risk level label based on the score"
    },
    "CorporateClientCustomFieldDataCategory": {
      "type": "string",
      "enum": ["GENERAL", "ADDRESS", "BUSINESS", "APPLICATION", "OTHER"],
      "description": "Category of the custom field"
    },
    "ClientRiskDto": {
      "type": "object",
      "description": "Risk assessment information",
      "required": ["score", "calculatedAt"],
      "properties": {
        "score": {
          "type": "number",
          "minimum": 0,
          "maximum": 100,
          "description": "Risk score value for the client. The score is a number between 0 and 100. 0-49 is low, 50-74 is medium, 75-100 is high",
          "example": 75
        },
        "level": {
          "$ref": "#/definitions/RiskLevel"
        },
        "reason": {
          "type": "string",
          "description": "Explanation for the assigned risk score",
          "example": "Multiple high-value transactions in high-risk jurisdictions"
        },
        "calculatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "ISO timestamp when the risk was calculated",
          "example": "2023-08-15T14:30:00Z"
        }
      }
    },
    "CreateOrUpdateRiskDto": {
      "type": "object",
      "description": "Risk assessment data for creating or updating",
      "required": ["score"],
      "properties": {
        "score": {
          "type": "number",
          "minimum": 0,
          "maximum": 100,
          "description": "Risk score value for the client. The score is a number between 0 and 100. 0-49 is low, 50-74 is medium, 75-100 is high",
          "example": 75
        },
        "level": {
          "$ref": "#/definitions/RiskLevel"
        },
        "reason": {
          "type": "string",
          "description": "Explanation for the assigned risk score",
          "example": "Multiple high-value transactions in high-risk jurisdictions"
        }
      }
    },
    "CorporateClientAddressLineDto": {
      "type": "object",
      "description": "Address line information",
      "properties": {
        "country": {
          "type": "string",
          "description": "Country code of the address",
          "example": "USA"
        },
        "city": {
          "type": "string",
          "description": "City name",
          "example": "London"
        },
        "postalCode": {
          "type": "string",
          "description": "Postal code",
          "example": "SW1A 1AA"
        },
        "addressLine1": {
          "type": "string",
          "description": "First line of the address",
          "example": "10 Downing Street"
        },
        "addressLine2": {
          "type": "string",
          "description": "Second line of the address (optional)",
          "example": "Westminster"
        }
      }
    },
    "CorporateClientAddressDto": {
      "type": "object",
      "description": "Address information of the corporate client",
      "properties": {
        "registrationAddress": {
          "$ref": "#/definitions/CorporateClientAddressLineDto",
          "description": "Registration address details of the corporate client"
        },
        "businessAddress": {
          "$ref": "#/definitions/CorporateClientAddressLineDto",
          "description": "Business address details if different from registration address"
        }
      }
    },
    "CorporateClientGeneralDto": {
      "type": "object",
      "description": "General information about the corporate client",
      "properties": {
        "legalEntityName": {
          "type": "string",
          "description": "Legal registered name of the corporate entity",
          "example": "Acme Corporation Ltd"
        },
        "dateOfIncorporation": {
          "type": "string",
          "format": "date",
          "description": "Date when the company was incorporated",
          "example": "2020-01-01"
        },
        "countryOfIncorporation": {
          "type": "string",
          "description": "Country where the company is incorporated",
          "example": "USA"
        }
      }
    },
    "CorporateClientBusinessDto": {
      "type": "object",
      "description": "Business-related information",
      "properties": {
        "industry": {
          "type": "string",
          "description": "Primary industry sector of the business",
          "example": "Technology"
        },
        "description": {
          "type": "string",
          "description": "Description of the business",
          "example": "A technology company"
        }
      }
    },
    "CorporateClientApplicationDto": {
      "type": "object",
      "description": "Application and onboarding information",
      "properties": {
        "submittedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The date when the client application was submitted",
          "example": "2023-01-01T00:00:00Z"
        },
        "onboardedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The date when the client was successfully onboarded",
          "example": "2023-01-15T00:00:00Z"
        },
        "nextPeriodicReview": {
          "type": "string",
          "format": "date-time",
          "description": "ISO Date of the next scheduled periodic review",
          "example": "2024-01-15T00:00:00Z"
        }
      }
    },
    "CorporateClientCustomFieldDataDto": {
      "type": "object",
      "description": "Custom field data for corporate clients",
      "required": ["label", "value", "category"],
      "properties": {
        "label": {
          "type": "string",
          "description": "Label of the custom field",
          "example": "Annual Revenue"
        },
        "value": {
          "oneOf": [
            {"type": "string"},
            {"type": "number"},
            {"type": "boolean"}
          ],
          "description": "Value of the custom field. Can be string, number, or boolean",
          "example": "1000000"
        },
        "category": {
          "$ref": "#/definitions/CorporateClientCustomFieldDataCategory"
        }
      }
    },
    "CorporateClientDto": {
      "type": "object",
      "description": "Complete Corporate Client entity",
      "required": [
        "id",
        "accountStatus",
        "activityStatus", 
        "address",
        "application",
        "business",
        "general",
        "riskHistory",
        "tags",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Unique identifier of the corporate client",
          "example": "123e4567-e89b-12d3-a456-426614174000"
        },
        "referenceId": {
          "type": "string",
          "description": "External reference ID for the client",
          "example": "CLIENT_REF_001"
        },
        "accountStatus": {
          "$ref": "#/definitions/AccountStatus"
        },
        "activityStatus": {
          "$ref": "#/definitions/ActivityStatus"
        },
        "address": {
          "$ref": "#/definitions/CorporateClientAddressDto"
        },
        "alerts": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "description": "List of alert IDs associated with the client",
          "example": ["123e4567-e89b-12d3-a456-426614174000"]
        },
        "application": {
          "$ref": "#/definitions/CorporateClientApplicationDto"
        },
        "business": {
          "$ref": "#/definitions/CorporateClientBusinessDto"
        },
        "controls": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of control measures applied to the client",
          "example": ["ENHANCED_DUE_DILIGENCE", "MONTHLY_MONITORING"]
        },
        "currentRisk": {
          "$ref": "#/definitions/ClientRiskDto"
        },
        "onboardingRisk": {
          "$ref": "#/definitions/ClientRiskDto"
        },
        "customFields": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/CorporateClientCustomFieldDataDto"
          },
          "description": "Custom fields data for the client",
          "example": {
            "annualRevenue": {
              "label": "Annual Revenue",
              "value": 5000000,
              "category": "BUSINESS"
            }
          }
        },
        "financialOperations": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "description": "List of financial operation IDs associated with the client",
          "example": ["123e4567-e89b-12d3-a456-426614174000"]
        },
        "general": {
          "$ref": "#/definitions/CorporateClientGeneralDto"
        },
        "riskHistory": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ClientRiskDto"
          },
          "description": "Historical risk assessments of the client"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Tags associated with the client",
          "example": ["high-value", "tech-company"]
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "ISO timestamp of creation",
          "example": "2023-08-15T10:30:00Z"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time", 
          "description": "ISO timestamp of last update",
          "example": "2023-08-20T14:30:00Z"
        }
      }
    },
    "UpdateCorporateClientDto": {
      "type": "object",
      "description": "Fields that can be updated in a corporate client",
      "properties": {
        "activityStatus": {
          "$ref": "#/definitions/ActivityStatus"
        },
        "accountStatus": {
          "$ref": "#/definitions/AccountStatus"
        },
        "general": {
          "$ref": "#/definitions/CorporateClientGeneralDto"
        },
        "currentRisk": {
          "$ref": "#/definitions/CreateOrUpdateRiskDto"
        },
        "onboardingRisk": {
          "$ref": "#/definitions/CreateOrUpdateRiskDto"
        },
        "address": {
          "$ref": "#/definitions/CorporateClientAddressDto"
        },
        "business": {
          "$ref": "#/definitions/CorporateClientBusinessDto"
        },
        "application": {
          "$ref": "#/definitions/CorporateClientApplicationDto"
        },
        "customFields": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/CorporateClientCustomFieldDataDto"
          },
          "description": "Custom fields data for the corporate client",
          "example": {
            "annualRevenue": {
              "label": "Annual Revenue", 
              "value": 5000000,
              "category": "BUSINESS"
            }
          }
        },
        "tagsToAdd": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Tags to add to the corporate client"
        },
        "tagsToRemove": {
          "type": "array", 
          "items": {
            "type": "string"
          },
          "description": "Tags to remove from the corporate client"
        },
        "controlsToAdd": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Controls to add to the corporate client"
        },
        "controlsToRemove": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Controls to remove from the corporate client"
        }
      }
    }
  },
  "oneOf": [
    {
      "title": "Corporate Client Created Audit Event",
      "description": "Audit event payload for when a corporate client is created",
      "type": "object",
      "required": ["id", "entity"],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The ID of the corporate client",
          "example": "123e4567-e89b-12d3-a456-426614174000"
        },
        "referenceId": {
          "type": "string",
          "description": "The reference ID of the corporate client",
          "example": "CORP123"
        },
        "entity": {
          "$ref": "#/definitions/CorporateClientDto",
          "description": "The complete corporate client entity that was created"
        }
      },
      "additionalProperties": false,
      "examples": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "referenceId": "CORP-001",
          "entity": {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "referenceId": "CORP-001",
            "accountStatus": "APPROVED",
            "activityStatus": "ACTIVE",
            "address": {
              "registrationAddress": {
                "country": "USA",
                "city": "New York",
                "postalCode": "10001",
                "addressLine1": "123 Corporate Plaza",
                "addressLine2": "Suite 500"
              },
              "businessAddress": {
                "country": "USA",
                "city": "New York",
                "postalCode": "10001",
                "addressLine1": "123 Corporate Plaza",
                "addressLine2": "Suite 500"
              }
            },
            "alerts": ["456e7890-f12b-34c5-d678-901234567890"],
            "application": {
              "submittedAt": "2023-08-15T10:30:00Z",
              "onboardedAt": "2023-08-20T14:30:00Z",
              "nextPeriodicReview": "2024-08-20T14:30:00Z"
            },
            "business": {
              "industry": "Technology",
              "description": "Software development and technology consulting services"
            },
            "controls": ["enhanced-due-diligence", "monthly-review"],
            "currentRisk": {
              "score": 45,
              "level": "LOW",
              "reason": "Low risk profile based on initial assessment",
              "calculatedAt": "2023-08-20T14:30:00Z"
            },
            "onboardingRisk": {
              "score": 50,
              "level": "MEDIUM",
              "reason": "Standard onboarding risk assessment",
              "calculatedAt": "2023-08-15T10:30:00Z"
            },
            "customFields": {
              "taxId": {
                "label": "Tax ID",
                "value": "123-45-6789",
                "category": "GENERAL"
              },
              "annualRevenue": {
                "label": "Annual Revenue",
                "value": 5000000,
                "category": "BUSINESS"
              },
              "employeeCount": {
                "label": "Number of Employees",
                "value": 150,
                "category": "BUSINESS"
              }
            },
            "financialOperations": ["789e0123-f45b-67c8-d901-234567890123"],
            "general": {
              "legalEntityName": "Acme Corporation Ltd",
              "dateOfIncorporation": "2020-01-01",
              "countryOfIncorporation": "USA"
            },
            "riskHistory": [
              {
                "score": 50,
                "level": "MEDIUM",
                "reason": "Initial onboarding assessment",
                "calculatedAt": "2023-08-15T10:30:00Z"
              }
            ],
            "tags": ["high-value", "tech-company"],
            "createdAt": "2023-08-15T10:30:00Z",
            "updatedAt": "2023-08-20T14:30:00Z"
          }
        }
      ]
    },
    {
      "title": "Corporate Client Updated Audit Event",
      "description": "Audit event payload for when a corporate client is updated",
      "type": "object",
      "required": ["id", "updated"],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The ID of the corporate client",
          "example": "123e4567-e89b-12d3-a456-426614174000"
        },
        "referenceId": {
          "type": "string",
          "description": "The reference ID of the corporate client",
          "example": "CORP123"
        },
        "updated": {
          "$ref": "#/definitions/UpdateCorporateClientDto",
          "description": "The fields that were updated in the corporate client"
        },
        "previousValues": {
          "type": "object",
          "description": "The previous values of the updated fields",
          "additionalProperties": true
        }
      },
      "additionalProperties": false,
      "examples": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "referenceId": "CORP-001",
          "updated": {
            "accountStatus": "IN_REVIEW",
            "address": {
              "businessAddress": {
                "country": "USA",
                "city": "Los Angeles",
                "postalCode": "90210",
                "addressLine1": "456 Business Avenue",
                "addressLine2": "Floor 10"
              }
            },
            "business": {
              "industry": "Financial Technology",
              "description": "Fintech solutions and digital banking services"
            }
          },
          "previousValues": {
            "accountStatus": "APPROVED",
            "address": {
              "businessAddress": {
                "country": "USA",
                "city": "New York",
                "postalCode": "10001",
                "addressLine1": "123 Corporate Plaza",
                "addressLine2": "Suite 500"
              }
            },
            "business": {
              "industry": "Technology",
              "description": "Software development and technology consulting services"
            }
          }
        },
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "referenceId": "CORP-001",
          "updated": {
            "currentRisk": {
              "score": 75,
              "level": "HIGH",
              "reason": "Updated risk assessment due to regulatory compliance issues",
              "calculatedAt": "2023-08-25T16:00:00Z"
            },
            "tagsToAdd": ["high-risk", "requires-review"],
            "controlsToAdd": ["enhanced-monitoring", "quarterly-reporting"],
            "activityStatus": "NOT_ACTIVE"
          },
          "previousValues": {
            "currentRisk": {
              "score": 45,
              "level": "LOW",
              "reason": "Low risk profile based on initial assessment",
              "calculatedAt": "2023-08-20T14:30:00Z"
            },
            "activityStatus": "ACTIVE"
          }
        }
      ]
    }
  ]
}