Example event
$id | nhs-notify-example-event.schema.json |
---|---|
$schema | https://json-schema.org/draft/2020-12/schema |
Name | Type | |
---|---|---|
type | String=uk.nhs.notify.ordering.order.read | |
source | String=/data-plane/ordering | |
subject | String | |
dataschema | String=https://nhsdigital.github.io/nhs-notify-standards/cloudevents/nhs-notify-example-event-data.schema.json | |
data | Object | |
All of: | Object (of type NHS Notify CloudEvents Profile) |
{
"specversion": "1.0",
"id": "6f1c2a53-3d54-4a0a-9a0b-0e9ae2d4c111",
"type": "uk.nhs.notify.ordering.order.read",
"source": "/data-plane/ordering",
"subject": "customer/920fca11-596a-4eca-9c47-99f624614658/order/769acdd4-6a47-496f-999f-76a6fd2c3959/item/4f5e17c0-ec57-4cee-9a86-14580cf5af7d",
"time": "2025-10-01T10:15:30.000Z",
"recordedtime": "2025-10-01T10:15:30.250Z",
"traceparent": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01",
"severitynumber": 1,
"severitytext": "DEBUG",
"dataschema": "https://nhsdigital.github.io/nhs-notify-standards/cloudevents/nhs-notify-example-event-data.schema.json",
"data": {
"notify-payload": {
"notify-data": {
"nhsNumber": "9434765919"
},
"notify-metadata": {
"teamResponsible": "Team 1",
"notifyDomain": "Ordering"
}
}
}
}
Description | Concrete event type string for this example event. | |
---|---|---|
Type | String | |
Required | Yes | |
Const | uk.nhs.notify.ordering.order.read | |
Examples |
Description | Event source for ordering domain examples. | |
---|---|---|
Type | String | |
Required | Yes | |
Const | /data-plane/ordering | |
Examples |
Description | Path in the form customer/{id}/order/{id}/item/{id} where each is a UUID (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). | |
---|---|---|
Type | String | |
Required | No | |
Pattern | ^customer/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/order/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/item/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ | |
Examples |
Description | Canonical URI of the example event's data schema. | |
---|---|---|
Type | String | |
Required | Yes | |
Const | https://nhsdigital.github.io/nhs-notify-standards/cloudevents/nhs-notify-example-event-data.schema.json | |
Examples |
Description | Example payload wrapper containing notify-payload. | |
---|---|---|
Type | Object | |
Required | Yes |
Name | Type | |
---|---|---|
notify-payload | Object |
Type | Object | |
---|---|---|
Required | No |
$id | nhs-notify-example-event-data.schema.json | |
---|---|---|
Title | Example data type | |
Description | Example data-plane object for illustrative purposes. | |
Type | Object | |
Required | No |
Description | Example patient's NHS Number (accepts canonical or formatted forms). | |
---|---|---|
Type | Any of: | String |
String | ||
Required | Yes |
Description | NHS Number (10 digits; last digit is a Modulus-11 check digit). | |
---|---|---|
Type | String | |
Format | nhs-number | |
Pattern | ^[0-9]{10}$ | |
Examples |
Description | Human-entered NHS Number (accepts 3-3-4 with optional spaces or hyphens). | |
---|---|---|
Type | String | |
Format | nhs-number | |
Pattern | ^(?:[0-9]{3}[- ]?[0-9]{3}[- ]?[0-9]{4})$ | |
Examples |
Description | Example metadata block constrained for this example. | |
---|---|---|
Type | Object | |
Required | No |
Description | Owning team for the example metadata. | |
---|---|---|
Type | String | |
Required | No | |
Const | Team 1 | |
Examples |
Description | Domain for the example metadata (Ordering). | |
---|---|---|
Type | String | |
Required | No | |
Const | Ordering | |
Examples |
{
"$id": "nhs-notify-example-event.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Example Event",
"description": "Example event",
"allOf": [
{
"$ref": "./nhs-notify-profile.schema.json"
}
],
"properties": {
"type": {
"type": "string",
"const": "uk.nhs.notify.ordering.order.read",
"description": "Concrete event type string for this example event.",
"examples": [
"uk.nhs.notify.ordering.order.read"
]
},
"source": {
"type": "string",
"const": "/data-plane/ordering",
"description": "Event source for ordering domain examples.",
"examples": [
"/data-plane/ordering"
]
},
"subject": {
"type": "string",
"pattern": "^customer/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/order/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/item/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
"description": "Path in the form customer/{id}/order/{id}/item/{id} where each is a UUID (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).",
"examples": [
"customer/920fca11-596a-4eca-9c47-99f624614658/order/769acdd4-6a47-496f-999f-76a6fd2c3959/item/4f5e17c0-ec57-4cee-9a86-14580cf5af7d"
]
},
"dataschema": {
"type": "string",
"const": "https://nhsdigital.github.io/nhs-notify-standards/cloudevents/nhs-notify-example-event-data.schema.json",
"description": "Canonical URI of the example event's data schema.",
"examples": [
"https://nhsdigital.github.io/nhs-notify-standards/cloudevents/nhs-notify-example-event-data.schema.json"
]
},
"data": {
"$ref": "#/$defs/ExamplePayload",
"description": "Example payload wrapper containing notify-payload."
}
},
"required": [
"type",
"source",
"dataschema",
"data"
],
"$defs": {
"ExamplePayload": {
"type": "object",
"description": "Wrapper for notify-payload used only in this example event schema.",
"properties": {
"notify-payload": {
"type": "object",
"properties": {
"notify-data": {
"$ref": "#/$defs/ExampleData",
"description": "Example data-plane object for illustrative purposes."
},
"notify-metadata": {
"$ref": "#/$defs/ExampleMetadata",
"description": "Example metadata block constrained for this example."
}
}
}
}
},
"ExampleData": {
"$ref": "./nhs-notify-example-event-data.schema.json",
"description": "Example data schema reference binding."
},
"ExampleMetadata": {
"$ref": "#/$defs/TeamAlphaBravoMetadata",
"description": "Example metadata schema reference binding."
},
"TeamAlphaBravoMetadata": {
"$comment": "Notify Metadata",
"type": "object",
"description": "Restricted example metadata subset used for illustrative purposes only.",
"properties": {
"teamResponsible": {
"type": "string",
"const": "Team 1",
"description": "Owning team for the example metadata.",
"examples": [
"Team 1"
]
},
"notifyDomain": {
"type": "string",
"const": "Ordering",
"description": "Domain for the example metadata (Ordering).",
"examples": [
"Ordering"
]
}
}
}
},
"examples": [
{
"specversion": "1.0",
"id": "6f1c2a53-3d54-4a0a-9a0b-0e9ae2d4c111",
"type": "uk.nhs.notify.ordering.order.read",
"source": "/data-plane/ordering",
"subject": "customer/920fca11-596a-4eca-9c47-99f624614658/order/769acdd4-6a47-496f-999f-76a6fd2c3959/item/4f5e17c0-ec57-4cee-9a86-14580cf5af7d",
"time": "2025-10-01T10:15:30.000Z",
"recordedtime": "2025-10-01T10:15:30.250Z",
"traceparent": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01",
"severitynumber": 1,
"severitytext": "DEBUG",
"dataschema": "https://nhsdigital.github.io/nhs-notify-standards/cloudevents/nhs-notify-example-event-data.schema.json",
"data": {
"notify-payload": {
"notify-data": {
"nhsNumber": "9434765919"
},
"notify-metadata": {
"teamResponsible": "Team 1",
"notifyDomain": "Ordering"
}
}
}
}
]
}