OpenCRVS · Schema

EventDocument

CompanyOpen SourceCivilRegistrationGovernment

Properties

Name Type Description
id string Unique identifier of the event.
type string Type of the event (e.g. birth, death, marriage).
createdAt string Timestamp indicating when the event was created.
updatedAt string Timestamp of the last update, excluding changes from actions.
actions array Ordered list of actions associated with the event.
trackingId string System-generated tracking identifier used to look up the event.
View JSON Schema on GitHub

JSON Schema

opencrvs-org-event-document-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/opencrvs-org/json-schema/opencrvs-org-event-document-schema.json",
  "title": "EventDocument",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/events-openapi.yml#/components/schemas/EventDocument",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "Unique identifier of the event."
    },
    "type": {
      "type": "string",
      "description": "Type of the event (e.g. birth, death, marriage)."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
      "description": "Timestamp indicating when the event was created."
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
      "description": "Timestamp of the last update, excluding changes from actions."
    },
    "actions": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/ActionDocument"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Unique identifier of the action."
              },
              "transactionId": {
                "type": "string",
                "description": "Unique identifier of the transaction."
              },
              "createdByUserType": {
                "type": "string",
                "enum": [
                  "user",
                  "system"
                ],
                "description": "Indicates whether the action was created by a human-user or by a system-user."
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                "description": "Timestamp indicating when the action was created."
              },
              "createdBy": {
                "type": "string",
                "description": "Identifier of the user who created the action."
              },
              "createdByRole": {
                "description": "Role of the user who created the action.",
                "type": "string"
              },
              "createdBySignature": {
                "description": "Reference to the signature of the user who created the action.",
                "anyOf": [
                  {
                    "type": "string",
                    "description": "A relative path within the S3 bucket, never starting with /. e.g. document-id.jpg or directory/document-id.jpg. The document service constructs the full /bucket/path internally."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAtLocation": {
                "description": "Reference to the location of the user who created the action.",
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "type": "string",
                "const": "Rejected"
              },
              "originalActionId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Reference to the original action asynchronously accepted or rejected by a third-party integration."
              },
              "type": {
                "type": "string",
                "enum": [
                  "NOTIFY",
                  "DECLARE",
                  "EDIT",
                  "REGISTER",
                  "REJECT",
                  "ARCHIVE",
                  "PRINT_CERTIFICATE",
                  "REQUEST_CORRECTION",
                  "APPROVE_CORRECTION",
                  "REJECT_CORRECTION",
                  "CUSTOM"
                ]
              }
            },
            "required": [
              "id",
              "transactionId",
              "createdByUserType",
              "createdAt",
              "createdBy",
              "status",
              "type"
            ],
            "additionalProperties": false
          }
        ]
      },
      "description": "Ordered list of actions associated with the event."
    },
    "trackingId": {
      "type": "string",
      "description": "System-generated tracking identifier used to look up the event."
    }
  },
  "required": [
    "id",
    "type",
    "createdAt",
    "updatedAt",
    "actions",
    "trackingId"
  ],
  "additionalProperties": false,
  "$defs": {
    "ActionDocument": {
      "oneOf": [
        {
          "$ref": "#/$defs/CreatedAction"
        },
        {
          "$ref": "#/$defs/RejectAction"
        },
        {
          "$ref": "#/$defs/DuplicateDetectedAction"
        },
        {
          "$ref": "#/$defs/MarkNotDuplicateAction"
        },
        {
          "$ref": "#/$defs/MarkAsDuplicateAction"
        },
        {
          "$ref": "#/$defs/ArchiveAction"
        },
        {
          "$ref": "#/$defs/NotifiedAction"
        },
        {
          "$ref": "#/$defs/RegisterAction"
        },
        {
          "$ref": "#/$defs/DeclareAction"
        },
        {
          "$ref": "#/$defs/AssignedAction"
        },
        {
          "$ref": "#/$defs/RequestedCorrectionAction"
        },
        {
          "$ref": "#/$defs/ApprovedCorrectionAction"
        },
        {
          "$ref": "#/$defs/RejectedCorrectionAction"
        },
        {
          "$ref": "#/$defs/UnassignedAction"
        },
        {
          "$ref": "#/$defs/PrintCertificateAction"
        },
        {
          "$ref": "#/$defs/ReadAction"
        },
        {
          "$ref": "#/$defs/EditAction"
        },
        {
          "$ref": "#/$defs/CustomAction"
        }
      ],
      "type": "object"
    },
    "ApprovedCorrectionAction": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
          "description": "Unique identifier of the action."
        },
        "transactionId": {
          "type": "string",
          "description": "Unique identifier of the transaction."
        },
        "createdByUserType": {
          "type": "string",
          "enum": [
            "user",
            "system"
          ],
          "description": "Indicates whether the action was created by a human-user or by a system-user."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
          "description": "Timestamp indicating when the action was created."
        },
        "createdBy": {
          "type": "string",
          "description": "Identifier of the user who created the action."
        },
        "createdByRole": {
          "description": "Role of the user who created the action.",
          "type": "string"
        },
        "createdBySignature": {
          "description": "Reference to the signature of the user who created the action.",
          "anyOf": [
            {
              "type": "string",
              "description": "A relative path within the S3 bucket, never starting with /. e.g. document-id.jpg or directory/document-id.jpg. The document service constructs the full /bucket/path internally."
            },
            {
              "type": "null"
            }
          ]
        },
        "createdAtLocation": {
          "description": "Reference to the location of the user who created the action.",
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        },
        "declaration": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "description": "Value that matches exactly one of the possible schema types (TextValue, DateValue, DateRangeFieldValue). The best matching schema is chosen by priority."
          },
          "description": "Declaration data defined by the ActionConfig. Supports partial updates."
        },
        "annotation": {
          "anyOf": [
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "description": "Value that matches exactly one of the possible schema types (TextValue, DateValue, DateRangeFieldValue). The best matching schema is chosen by priority."
              },
              "description": "Record of field-level changes made by an action. Supports partial updates and nullable values."
            },
            {
              "type": "null"
            }
          ],
          "description": "Action-specific metadata used to annotate the event."
        },
        "status": {
          "type": "string",
          "enum": [
            "Requested",
            "Accepted",
            "Rejected"
          ],
          "description": "Current status of the action. Actions may be validated asynchronously by third-party integrations."
        },
        "originalActionId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ],
          "description": "Reference to the original action asynchronously accepted or rejected by a third-party integration."
        },
        "type": {
          "type": "string",
          "const": "APPROVE_CORRECTION"
        },
        "requestId": {
          "type": "string"
        },
        "content": {
          "type": "object",
          "properties": {
            "immediateCorrection": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        }
      },
      "required": [
        "id",
        "transactionId",
        "createdByUserType",
        "createdAt",
        "createdBy",
        "declaration",
        "status",
        "type",
        "requestId"
      ],
      "additionalProperties": false
    },
    "ArchiveAction": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
          "description": "Unique identifier of the action."
        },
        "transactionId": {
          "type": "string",
          "description": "Unique identifier of the transaction."
        },
        "createdByUserType": {
          "type": "string",
          "enum": [
            "user",
            "system"
          ],
          "description": "Indicates whether the action was created by a human-user or by a system-user."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
          "description": "Timestamp indicating when the action was created."
        },
        "createdBy": {
          "type": "string",
          "description": "Identifier of the user who created the action."
        },
        "createdByRole": {
          "description": "Role of the user who created the action.",
          "type": "string"
        },
        "createdBySignature": {
          "description": "Reference to the signature of the user who created the action.",
          "anyOf": [
            {
              "type": "string",
              "description": "A relative path within the S3 bucket, never starting with /. e.g. document-id.jpg or directory/document-id.jpg. The document service constructs the full /bucket/path internally."
            },
            {
              "type": "null"
            }
          ]
        },
        "createdAtLocation": {
          "description": "Reference to the location of the user who created the action.",
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        },
        "declaration": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "description": "Value that matches exactly one of the possible schema types (TextValue, DateValue, DateRangeFieldValue). The best matching schema is chosen by priority."
          },
          "description": "Declaration data defined by the ActionConfig. Supports partial updates."
        },
        "annotation": {
          "anyOf": [
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "description": "Value that matches exactly one of the possible schema types (TextValue, DateValue, DateRangeFieldValue). The best matching schema is chosen by priority."
              },
              "description": "Record of field-level changes made by an action. Supports partial updates and nullable values."
            },
            {
              "type": "null"
            }
          ],
          "description": "Action-specific metadata used to annotate the event."
        },
        "status": {
          "type": "string",
          "enum": [
            "Requested",
            "Accepted",
            "Rejected"
          ],
          "description": "Current status of the action. Actions may be validated asynchronously by third-party integrations."
        },
        "originalActionId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ],
          "description": "Reference to the original action asynchronously accepted or rejected by a third-party integration."
        },
        "type": {
          "type": "string",
          "const": "ARCHIVE"
        },
        "content": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "minLength": 1,
              "description": "Message describing the reason for rejecting or archiving the event."
            }
          },
          "required": [
            "reason"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "id",
        "transactionId",
        "createdByUserType",
        "createdAt",
        "createdBy",
        "declaration",
        "status",
        "type",
        "content"
      ],
      "additionalProperties": false
    },
    "AssignedAction": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
          "description": "Unique identifier of the action."
        },
        "transactionId": {
          "type": "string",
          "description": "Unique identifier of the transaction."
        },
        "createdByUserType": {
          "type": "string",
          "enum": [
            "user",
            "system"
          ],
          "description": "Indicates whether the action was created by a human-user or by a system-user."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
          "description": "Timestamp indicating when the action was created."
        },
        "createdBy": {
          "type": "string",
          "description": "Identifier of the user who created the action."
        },
        "createdByRole": {
          "description": "Role of the user who created the action.",
          "type": "string"
        },
        "createdBySignature": {
          "description": "Reference to the signature of the user who created the action.",
          "anyOf": [
            {
              "type": "string",
              "description": "A relative path within the S3 bucket, never starting with /. e.g. document-id.jpg or directory/document-id.jpg. The document service constructs the full /bucket/path internally."
            },
            {
              "type": "null"
            }
          ]
        },
        "createdAtLocation": {
          "description": "Reference to the location of the user who created the action.",
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        },
        "declaration": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "description": "Value that matches exactly one of the possible schema types (TextValue, DateValue, DateRangeFieldValue). The best matching schema is chosen by priority."
          },
          "description": "Declaration data defined by the ActionConfig. Supports partial updates."
        },
        "annotation": {
          "anyOf": [
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "description": "Value that matches exactly one of the possible schema types (TextValue, DateValue, DateRangeFieldValue). The best matching schema is chosen by priority."
              },
              "description": "Record of field-level changes made by an action. Supports partial updates and nullable values."
            },
            {
              "type": "null"
            }
          ],
          "description": "Action-specific metadata used to annotate the event."
        },
        "status": {
          "type": "string",
          "enum": [
            "Requested",
            "Accepted",
            "Rejected"
          ],
          "description": "Current status of the action. Actions may be validated asynchronously by third-party integrations."
        },
        "originalActionId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ],
          "description": "Reference to the original action asynchronously accepted or rejected by a third-party integration."
        },
        "type": {
          "type": "string",
          "const": "ASSIGN"
        },
        "assignedTo": {
          "type": "string",
          "description": "Identifier of the user to whom the action is assigned."
        }
      },
      "required": [
        "id",
        "transactionId",
        "createdByUserType",
        "createdAt",
        "createdBy",
        "declaration",
        "status",
        "type",
        "assignedTo"
      ],
      "additionalProperties": false
    },
    "CreatedAction": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
          "description": "Unique identifier of the action."
        },
        "transactionId": {
          "type": "string",
          "description": "Unique identifier of the transaction."
        },
        "createdByUserType": {
          "type": "string",
          "enum": [
            "user",
            "system"
          ],
          "description": "Indicates whether the action was created by a human-user or by a system-user."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
          "description": "Timestamp indicating when the action was created."
        },
        "createdBy": {
          "type": "string",
          "description": "Identifier of the user who created the action."
        },
        "createdByRole": {
          "description": "Role of the user who created the action.",
          "type": "string"
        },
        "createdBySignature": {
          "description": "Reference to the signature of the user who created the action.",
          "anyOf": [
            {
              "type": "string",
              "description": "A relative path within the S3 bucket, never starting with /. e.g. document-id.jpg or directory/document-id.jpg. The document service constructs the full /bucket/path internally."
            },
            {
              "type": "null"
            }
          ]
        },
        "createdAtLocation": {
          "description": "Reference to the location of the user who created the action.",
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        },
        "declaration": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "description": "Value that matches exactly one of the possible schema types (TextValue, DateValue, DateRangeFieldValue). The best matching schema is chosen by priority."
          },
          "description": "Declaration data defined by the ActionConfig. Supports partial updates."
        },
        "annotation": {
          "anyOf": [
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "description": "Value that matches exactly one of the possible schema types (TextValue, DateValue, DateRangeFieldValue). The best matching schema is chosen by priority."
              },
              "description": "Record of field-level changes made by an action. Supports partial updates and nullable values."
            },
            {
              "type": "null"
            }
          ],
          "description": "Action-specific metadata used to annotate the event."
        },
        "status": {
          "type": "string",
          "enum": [
            "Requested",
            "Accepted",
            "Rejected"
          ],
          "description": "Current status of the action. Actions may be validated asynchronously by third-party integrations."
        },
        "originalActionId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ],
          "description": "Reference to the original action asynchronously accepted or rejected by a third-party integration."
        },
        "type": {
          "type": "string",
          "const": "CREATE"
        }
      },
      "required": [
        "id",
        "transactionId",
        "createdByUserType",
        "createdAt",
        "createdBy",
        "declaration",
        "status",
        "type"
      ],
      "additionalProperties": false
    },
    "CustomAction": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
          "description": "Unique identifier of the action."
        },
        "transactionId": {
          "type": "string",
          "description": "Unique identifier of the transaction."
        },
        "createdByUserType": {
          "type": "string",
          "enum": [
            "user",
            "system"
          ],
          "description": "Indicates whether the action was created by a human-user or by a system-user."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
          "description": "Timestamp indicating when the action was created."
        },
        "createdBy": {
          "type": "string",
          "description": "Identifier of the user who created the action."
        },
        "createdByRole": {
          "description": "Role of the user who created the action.",
          "type": "string"
        },
        "createdBySignature": {
          "description": "Reference to the signature of the user who created the action.",
          "anyOf": [
            {
              "type": "string",
              "description": "A relative path within the S3 bucket, never starting with /. e.g. document-id.jpg or directory/document-id.jpg. The document service constructs the full /bucket/path internally."
            },
            {
              "type": "null"
            }
          ]
        },
        "createdAtLocation": {
          "description": "Reference to the location of the user who created the action.",
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        },
        "declaration": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "description": "Value that matches exactly one of the possible schema types (TextValue, DateValue, DateRangeFieldValue). The best matching schema is chosen by priority."
          },
          "description": "Declaration data defined by the ActionConfig. Supports partial updates."
        },
        "annotation": {
          "anyOf": [
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "description": "Value that matches exactly one of the possible schema types (TextValue, DateValue, DateRangeFieldValue). The best matching schema is chosen by priority."
              },
              "description": "Record of field-level changes made by an action. Supports partial updates and nullable values."
            },
            {
              "type": "null"
            }
          ],
          "description": "Action-specific metadata used to annotate the event."
        },
        "status": {
          "type": "string",
          "enum": [
            "Requested",
            "Accepted",
            "Rejected"
          ],
          "description": "Current status of the action. Actions may be validated asynchronously by third-party integrations."
        },
        "originalActionId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
 

# --- truncated at 32 KB (97 KB total) ---
# Full source: https://artifacts.apis.io/opencrvs-org/json-schema/opencrvs-org-event-document-schema.json

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/opencrvs-org-event-document"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.