Named, versioned events for what happens in DrootERP. Every event has the same envelope - type, version,
occurredAt (ISO time), company (the record's company, or null), actor (kind, id) and data - and is
thin: ids, keys and what changed, never the record's values. Read the record through API v1 with your own
grants. Delivery (webhooks, the transactional outbox, retries, replay) arrives in phase E2.
A change to an event's data needs a new version; a breaking one is published next to the old version for the
deprecation window (api-versioning.md).
| Event | Version | Stability | Title |
|---|---|---|---|
record.created |
1 | stable | Record Created |
record.updated |
1 | stable | Record Updated |
record.deleted |
1 | stable | Record Deleted |
record.restored |
1 | beta | Record Restored |
record.purged |
1 | beta | Record Purged |
record.transitioned |
1 | stable | Record Transitioned |
approval.requested |
1 | stable | Approval Requested |
approval.decided |
1 | stable | Approval Decided |
document.issued |
1 | stable | Document Issued |
journal.posted |
2 | beta | Journal Posted |
stock.moved |
1 | beta | Stock Moved |
webform.submitted |
1 | beta | Web Form Submitted |
payment.received |
2 | beta | Payment Received |
privacy.erased |
1 | beta | Personal Data Erased |
job.finished |
1 | beta | Job Finished |
record.created v1
A record of any model was created (by a person, an API client, an import or the system).
- Stability: stable, since 0.1.0
Example data:
{
"modelKey": "crm.lead",
"recordId": "6650c0ffee0000000000a001",
"fields": [
"name",
"value"
]
}
JSON schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "record.created"
},
"version": {
"type": "number",
"const": 1
},
"occurredAt": {
"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))$"
},
"company": {
"type": [
"string",
"null"
]
},
"actor": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"user",
"system",
"api-key"
]
},
"id": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
},
"data": {
"type": "object",
"properties": {
"modelKey": {
"type": "string",
"minLength": 1
},
"recordId": {
"type": "string",
"minLength": 1
},
"fields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"modelKey",
"recordId",
"fields"
],
"additionalProperties": false
}
},
"required": [
"type",
"version",
"occurredAt",
"company",
"actor",
"data"
],
"additionalProperties": false
}
record.updated v1
A record was changed. changedFields names the fields the write set; read the record for values.
- Stability: stable, since 0.1.0
Example data:
{
"modelKey": "crm.lead",
"recordId": "6650c0ffee0000000000a001",
"changedFields": [
"value"
]
}
JSON schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "record.updated"
},
"version": {
"type": "number",
"const": 1
},
"occurredAt": {
"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))$"
},
"company": {
"type": [
"string",
"null"
]
},
"actor": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"user",
"system",
"api-key"
]
},
"id": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
},
"data": {
"type": "object",
"properties": {
"modelKey": {
"type": "string",
"minLength": 1
},
"recordId": {
"type": "string",
"minLength": 1
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"modelKey",
"recordId",
"changedFields"
],
"additionalProperties": false
}
},
"required": [
"type",
"version",
"occurredAt",
"company",
"actor",
"data"
],
"additionalProperties": false
}
record.deleted v1
A record was deleted (soft delete: it stays restorable and audited).
- Stability: stable, since 0.1.0
Example data:
{
"modelKey": "crm.lead",
"recordId": "6650c0ffee0000000000a001"
}
JSON schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "record.deleted"
},
"version": {
"type": "number",
"const": 1
},
"occurredAt": {
"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))$"
},
"company": {
"type": [
"string",
"null"
]
},
"actor": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"user",
"system",
"api-key"
]
},
"id": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
},
"data": {
"type": "object",
"properties": {
"modelKey": {
"type": "string",
"minLength": 1
},
"recordId": {
"type": "string",
"minLength": 1
}
},
"required": [
"modelKey",
"recordId"
],
"additionalProperties": false
}
},
"required": [
"type",
"version",
"occurredAt",
"company",
"actor",
"data"
],
"additionalProperties": false
}
record.restored v1
A deleted record was restored from the recycle bin: it is live again with its values and files.
- Stability: beta, since 0.1.0
Example data:
{
"modelKey": "crm.lead",
"recordId": "6650c0ffee0000000000a001"
}
JSON schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "record.restored"
},
"version": {
"type": "number",
"const": 1
},
"occurredAt": {
"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))$"
},
"company": {
"type": [
"string",
"null"
]
},
"actor": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"user",
"system",
"api-key"
]
},
"id": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
},
"data": {
"type": "object",
"properties": {
"modelKey": {
"type": "string",
"minLength": 1
},
"recordId": {
"type": "string",
"minLength": 1
}
},
"required": [
"modelKey",
"recordId"
],
"additionalProperties": false
}
},
"required": [
"type",
"version",
"occurredAt",
"company",
"actor",
"data"
],
"additionalProperties": false
}
record.purged v1
A deleted record was purged: its values are gone for good and only a tombstone (who, when, why) remains.
- Stability: beta, since 0.1.0
Example data:
{
"modelKey": "crm.lead",
"recordId": "6650c0ffee0000000000a001"
}
JSON schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "record.purged"
},
"version": {
"type": "number",
"const": 1
},
"occurredAt": {
"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))$"
},
"company": {
"type": [
"string",
"null"
]
},
"actor": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"user",
"system",
"api-key"
]
},
"id": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
},
"data": {
"type": "object",
"properties": {
"modelKey": {
"type": "string",
"minLength": 1
},
"recordId": {
"type": "string",
"minLength": 1
}
},
"required": [
"modelKey",
"recordId"
],
"additionalProperties": false
}
},
"required": [
"type",
"version",
"occurredAt",
"company",
"actor",
"data"
],
"additionalProperties": false
}
record.transitioned v1
A record moved along a flow (a stage change), by hand, by an approval outcome or automatically.
- Stability: stable, since 0.1.0
Example data:
{
"modelKey": "crm.lead",
"recordId": "6650c0ffee0000000000a001",
"flowKey": "crm.lead-flow",
"transitionKey": "qualify",
"from": "new",
"to": "qualified"
}
JSON schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "record.transitioned"
},
"version": {
"type": "number",
"const": 1
},
"occurredAt": {
"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))$"
},
"company": {
"type": [
"string",
"null"
]
},
"actor": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"user",
"system",
"api-key"
]
},
"id": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
},
"data": {
"type": "object",
"properties": {
"modelKey": {
"type": "string",
"minLength": 1
},
"recordId": {
"type": "string",
"minLength": 1
},
"flowKey": {
"type": "string"
},
"transitionKey": {
"type": "string"
},
"from": {
"type": "string"
},
"to": {
"type": "string"
}
},
"required": [
"modelKey",
"recordId",
"flowKey",
"transitionKey",
"from",
"to"
],
"additionalProperties": false
}
},
"required": [
"type",
"version",
"occurredAt",
"company",
"actor",
"data"
],
"additionalProperties": false
}
approval.requested v1
An approval started on a record (its first level is waiting for approvers).
- Stability: stable, since 0.1.0
Example data:
{
"modelKey": "procurement.order",
"recordId": "6650c0ffee0000000000b001",
"instanceId": "6650c0ffee0000000000c001",
"matrixKey": "procurement.po-approval"
}
JSON schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "approval.requested"
},
"version": {
"type": "number",
"const": 1
},
"occurredAt": {
"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))$"
},
"company": {
"type": [
"string",
"null"
]
},
"actor": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"user",
"system",
"api-key"
]
},
"id": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
},
"data": {
"type": "object",
"properties": {
"modelKey": {
"type": "string",
"minLength": 1
},
"recordId": {
"type": "string",
"minLength": 1
},
"instanceId": {
"type": "string",
"minLength": 1
},
"matrixKey": {
"type": "string"
}
},
"required": [
"modelKey",
"recordId",
"instanceId",
"matrixKey"
],
"additionalProperties": false
}
},
"required": [
"type",
"version",
"occurredAt",
"company",
"actor",
"data"
],
"additionalProperties": false
}
approval.decided v1
An approver approved or rejected. outcome is set when the decision completed the approval.
- Stability: stable, since 0.1.0
Example data:
{
"modelKey": "procurement.order",
"recordId": "6650c0ffee0000000000b001",
"instanceId": "6650c0ffee0000000000c001",
"matrixKey": "procurement.po-approval",
"decision": "approved",
"outcome": "approved"
}
JSON schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "approval.decided"
},
"version": {
"type": "number",
"const": 1
},
"occurredAt": {
"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))$"
},
"company": {
"type": [
"string",
"null"
]
},
"actor": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"user",
"system",
"api-key"
]
},
"id": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
},
"data": {
"type": "object",
"properties": {
"modelKey": {
"type": "string",
"minLength": 1
},
"recordId": {
"type": "string",
"minLength": 1
},
"instanceId": {
"type": "string",
"minLength": 1
},
"matrixKey": {
"type": "string"
},
"decision": {
"type": "string",
"enum": [
"approved",
"rejected"
]
},
"outcome": {
"anyOf": [
{
"type": "string",
"enum": [
"approved",
"rejected"
]
},
{
"type": "null"
}
]
}
},
"required": [
"modelKey",
"recordId",
"instanceId",
"matrixKey",
"decision",
"outcome"
],
"additionalProperties": false
}
},
"required": [
"type",
"version",
"occurredAt",
"company",
"actor",
"data"
],
"additionalProperties": false
}
document.issued v1
A document (invoice, order, certificate…) was issued from a template and archived for the record.
- Stability: stable, since 0.1.0
Example data:
{
"modelKey": "sales.invoice",
"recordId": "6650c0ffee0000000000d001",
"outputId": "6650c0ffee0000000000e001",
"templateKey": "sales.invoice-standard",
"templateVersion": 3,
"format": "pdf"
}
JSON schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "document.issued"
},
"version": {
"type": "number",
"const": 1
},
"occurredAt": {
"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))$"
},
"company": {
"type": [
"string",
"null"
]
},
"actor": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"user",
"system",
"api-key"
]
},
"id": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
},
"data": {
"type": "object",
"properties": {
"modelKey": {
"type": "string",
"minLength": 1
},
"recordId": {
"type": "string",
"minLength": 1
},
"outputId": {
"type": "string",
"minLength": 1
},
"templateKey": {
"type": "string"
},
"templateVersion": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"format": {
"type": "string",
"enum": [
"html",
"pdf"
]
}
},
"required": [
"modelKey",
"recordId",
"outputId",
"templateKey",
"templateVersion",
"format"
],
"additionalProperties": false
}
},
"required": [
"type",
"version",
"occurredAt",
"company",
"actor",
"data"
],
"additionalProperties": false
}
journal.posted v2
A journal was posted to the ledger. Payments, invoices and bills post through journals: source names the document (filter on it for payments). total is the journal's debit total in currency, a decimal string in major units.
- Stability: beta, since 0.1.0
Example data:
{
"journalId": "6650c0ffee0000000000f001",
"number": "JV-0001",
"date": "2026-10-07",
"documentType": "payment",
"total": "1250.00",
"currency": "EUR",
"source": {
"modelKey": "accounting.payment",
"recordId": "6650c0ffee0000000000f101"
}
}
JSON schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "journal.posted"
},
"version": {
"type": "number",
"const": 2
},
"occurredAt": {
"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))$"
},
"company": {
"type": [
"string",
"null"
]
},
"actor": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"user",
"system",
"api-key"
]
},
"id": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
},
"data": {
"type": "object",
"properties": {
"journalId": {
"type": "string",
"minLength": 1
},
"number": {
"type": "string"
},
"date": {
"type": "string"
},
"documentType": {
"type": [
"string",
"null"
]
},
"total": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
},
"currency": {
"type": [
"string",
"null"
]
},
"source": {
"anyOf": [
{
"type": "object",
"properties": {
"modelKey": {
"type": "string",
"minLength": 1
},
"recordId": {
"type": "string",
"minLength": 1
}
},
"required": [
"modelKey",
"recordId"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"journalId",
"number",
"date",
"documentType",
"total",
"currency",
"source"
],
"additionalProperties": false
}
},
"required": [
"type",
"version",
"occurredAt",
"company",
"actor",
"data"
],
"additionalProperties": false
}
stock.moved v1
A stock movement was posted (receipt, issue, transfer or adjustment).
- Stability: beta, since 0.1.0
Example data:
{
"modelKey": "inventory.stock-movement",
"recordId": "6650c0ffee0000000000aa01",
"kind": "receipt",
"lineCount": 2
}
JSON schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "stock.moved"
},
"version": {
"type": "number",
"const": 1
},
"occurredAt": {
"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))$"
},
"company": {
"type": [
"string",
"null"
]
},
"actor": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"user",
"system",
"api-key"
]
},
"id": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
},
"data": {
"type": "object",
"properties": {
"modelKey": {
"type": "string",
"minLength": 1
},
"recordId": {
"type": "string",
"minLength": 1
},
"kind": {
"type": "string"
},
"lineCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"modelKey",
"recordId",
"kind",
"lineCount"
],
"additionalProperties": false
}
},
"required": [
"type",
"version",
"occurredAt",
"company",
"actor",
"data"
],
"additionalProperties": false
}
webform.submitted v1
A public web form created a record (a service request, an enquiry): form is the form's key, files how many files came with it.
- Stability: beta, since 1.25.0
Example data:
{
"modelKey": "service.ticket",
"recordId": "6650c0ffee0000000000cc01",
"form": "service-request",
"files": 1
}
JSON schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "webform.submitted"
},
"version": {
"type": "number",
"const": 1
},
"occurredAt": {
"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))$"
},
"company": {
"type": [
"string",
"null"
]
},
"actor": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"user",
"system",
"api-key"
]
},
"id": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
},
"data": {
"type": "object",
"properties": {
"modelKey": {
"type": "string",
"minLength": 1
},
"recordId": {
"type": "string",
"minLength": 1
},
"form": {
"type": "string"
},
"files": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"modelKey",
"recordId",
"form",
"files"
],
"additionalProperties": false
}
},
"required": [
"type",
"version",
"occurredAt",
"company",
"actor",
"data"
],
"additionalProperties": false
}
payment.received v2
A customer paid through a payment link on a gateway's hosted page: the record is the invoice or quotation the link was for.
- Stability: beta, since 1.25.0
Example data:
{
"modelKey": "sales.invoice",
"recordId": "6650c0ffee0000000000d001",
"paymentId": "6650c0ffee0000000000dd01",
"gateway": "stripe-main",
"amount": "1180.00",
"currency": "EUR",
"status": "captured"
}
JSON schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "payment.received"
},
"version": {
"type": "number",
"const": 2
},
"occurredAt": {
"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))$"
},
"company": {
"type": [
"string",
"null"
]
},
"actor": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"user",
"system",
"api-key"
]
},
"id": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
},
"data": {
"type": "object",
"properties": {
"modelKey": {
"type": "string",
"minLength": 1
},
"recordId": {
"type": "string",
"minLength": 1
},
"paymentId": {
"type": "string",
"minLength": 1
},
"gateway": {
"type": "string"
},
"amount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
},
"currency": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"captured",
"refunded"
]
}
},
"required": [
"modelKey",
"recordId",
"paymentId",
"gateway",
"amount",
"currency",
"status"
],
"additionalProperties": false
}
},
"required": [
"type",
"version",
"occurredAt",
"company",
"actor",
"data"
],
"additionalProperties": false
}
privacy.erased v1
A person's personal data was erased (a confirmed erasure request): model and recordId name the record (platform.user for a user), entityId its company, requestId the request. Apps erase their own copies (app.privacy.on("erased")).
- Stability: beta, since 2.6.0
Example data:
{
"model": "crm.lead",
"recordId": "6650c0ffee0000000000ee01",
"entityId": "acme-eu",
"requestId": "6650c0ffee0000000000ee02"
}
JSON schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "privacy.erased"
},
"version": {
"type": "number",
"const": 1
},
"occurredAt": {
"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))$"
},
"company": {
"type": [
"string",
"null"
]
},
"actor": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"user",
"system",
"api-key"
]
},
"id": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
},
"data": {
"type": "object",
"properties": {
"model": {
"type": "string",
"minLength": 1
},
"recordId": {
"type": "string",
"minLength": 1
},
"entityId": {
"type": [
"string",
"null"
]
},
"requestId": {
"type": "string",
"minLength": 1
}
},
"required": [
"model",
"recordId",
"entityId",
"requestId"
],
"additionalProperties": false
}
},
"required": [
"type",
"version",
"occurredAt",
"company",
"actor",
"data"
],
"additionalProperties": false
}
job.finished v1
A scheduled or manual job run reached its end: completed, failed (after its last attempt) or skipped.
- Stability: beta, since 0.1.0
Example data:
{
"job": "accounting.depreciation",
"runId": "6650c0ffee0000000000bb01",
"status": "completed"
}
JSON schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "job.finished"
},
"version": {
"type": "number",
"const": 1
},
"occurredAt": {
"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))$"
},
"company": {
"type": [
"string",
"null"
]
},
"actor": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"user",
"system",
"api-key"
]
},
"id": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
},
"data": {
"type": "object",
"properties": {
"job": {
"type": "string"
},
"runId": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"completed",
"failed",
"skipped"
]
}
},
"required": [
"job",
"runId",
"status"
],
"additionalProperties": false
}
},
"required": [
"type",
"version",
"occurredAt",
"company",
"actor",
"data"
],
"additionalProperties": false
}