Open Health Hub FHIR Implementation Guide
0.1.0 - v0.1.0
Open Health Hub FHIR Implementation Guide - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
| Official URL: https://api.openhealthhub.com/OpenHealthhub/fhir/4/StructureDefinition/ohh-subscription | Version: 0.1.0 | |||
| Active as of 2026-10-27 | Computable Name: OhhSubscription | |||
Subscriptions are used to trigger a webhook request when a resource that matches the criteria has been created or updated.
Subscription can be used to get notified about changes to resources. Currently only subscription on these resources can be created:
Usages:
You can also check for usages in the FHIR IG Statistics
Description of Profiles, Differentials, Snapshots and how the different presentations work.
This structure is derived from Subscription
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() |
|---|---|---|---|---|
![]() |
0..* | Subscription | Server push subscription criteria | |
![]() ![]() |
C | 1..1 | string | Rule for server push Constraints: ohh-subscription-criteria |
![]() ![]() |
||||
![]() ![]() ![]() |
1..1 | code | rest-hook | websocket | email | sms | message Fixed Value: rest-hook (no extensions allowed) | |
Documentation for this format | ||||
| Id | Grade | Path(s) | Description | Expression |
| ohh-subscription-criteria | error | Subscription.criteria | Criteria can only be on QuestionnaireResponse, PlanDefinition, CarePlan or Task |
matches('^(QuestionnaireResponse|PlanDefinition|CarePlan|Task).*')
|
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() |
|---|---|---|---|---|
![]() |
0..* | Subscription | Server push subscription criteria | |
![]() ![]() |
0..1 | uri | A set of rules under which this content was created | |
![]() ![]() |
0..* | Extension | Extensions that cannot be ignored | |
![]() ![]() |
1..1 | code | requested | active | error | off Binding: SubscriptionStatus (required): The status of a subscription. | |
![]() ![]() |
1..1 | string | Description of why this subscription was created | |
![]() ![]() |
C | 1..1 | string | Rule for server push Constraints: ohh-subscription-criteria |
![]() ![]() |
1..1 | BackboneElement | The channel on which to report matches to the criteria | |
![]() ![]() ![]() |
0..* | Extension | Extensions that cannot be ignored even if unrecognized | |
![]() ![]() ![]() |
1..1 | code | rest-hook | websocket | email | sms | message Binding: SubscriptionChannelType (required): The type of method used to execute a subscription. Fixed Value: rest-hook (no extensions allowed) | |
Documentation for this format | ||||
| Path | Status | Usage | ValueSet | Version | Source |
| Subscription.status | Base | required | SubscriptionStatus | 📍4.0.1 | FHIR Std. |
| Subscription.channel.type | Base | required | SubscriptionChannelType | 📍4.0.1 | FHIR Std. |
| Id | Grade | Path(s) | Description | Expression |
| dom-2 | error | Subscription | If the resource is contained in another resource, it SHALL NOT contain nested Resources |
contained.contained.empty()
|
| dom-3 | error | Subscription | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource |
contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
|
| dom-4 | error | Subscription | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated |
contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
|
| dom-5 | error | Subscription | If a resource is contained in another resource, it SHALL NOT have a security label |
contained.meta.security.empty()
|
| dom-6 | best practice | Subscription | A resource should have narrative for robust management |
text.`div`.exists()
|
| ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both |
extension.exists() != value.exists()
|
| ohh-subscription-criteria | error | Subscription.criteria | Criteria can only be on QuestionnaireResponse, PlanDefinition, CarePlan or Task |
matches('^(QuestionnaireResponse|PlanDefinition|CarePlan|Task).*')
|
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() | ||||
|---|---|---|---|---|---|---|---|---|
![]() |
0..* | Subscription | Server push subscription criteria | |||||
![]() ![]() |
0..1 | id | Logical id of this artifact | |||||
![]() ![]() |
0..1 | Meta | Metadata about the resource | |||||
![]() ![]() |
0..1 | uri | A set of rules under which this content was created | |||||
![]() ![]() |
0..1 | code | Language of the resource content Binding: CommonLanguages (preferred): A human language.
| |||||
![]() ![]() |
0..1 | Narrative | Text summary of the resource, for human interpretation This profile does not constrain the narrative in regard to content, language, or traceability to data elements | |||||
![]() ![]() |
0..* | Resource | Contained, inline Resources | |||||
![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() |
0..* | Extension | Extensions that cannot be ignored | |||||
![]() ![]() |
1..1 | code | requested | active | error | off Binding: SubscriptionStatus (required): The status of a subscription. | |||||
![]() ![]() |
0..* | ContactPoint | Contact details for source (e.g. troubleshooting) | |||||
![]() ![]() |
0..1 | instant | When to automatically delete the subscription | |||||
![]() ![]() |
1..1 | string | Description of why this subscription was created | |||||
![]() ![]() |
C | 1..1 | string | Rule for server push Constraints: ohh-subscription-criteria | ||||
![]() ![]() |
0..1 | string | Latest error note | |||||
![]() ![]() |
1..1 | BackboneElement | The channel on which to report matches to the criteria | |||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() ![]() |
0..* | Extension | Extensions that cannot be ignored even if unrecognized | |||||
![]() ![]() ![]() |
1..1 | code | rest-hook | websocket | email | sms | message Binding: SubscriptionChannelType (required): The type of method used to execute a subscription. Fixed Value: rest-hook (no extensions allowed) | |||||
![]() ![]() ![]() |
0..1 | url | Where the channel points to | |||||
![]() ![]() ![]() |
0..1 | code | MIME type to send, or omit for no payload Binding: Mime Types (required): The mime type of an attachment. Any valid mime type is allowed. | |||||
![]() ![]() ![]() |
0..* | string | Usage depends on the channel type | |||||
Documentation for this format | ||||||||
| Path | Status | Usage | ValueSet | Version | Source |
| Subscription.language | Base | preferred | Common Languages | 📍4.0.1 | FHIR Std. |
| Subscription.status | Base | required | SubscriptionStatus | 📍4.0.1 | FHIR Std. |
| Subscription.channel.type | Base | required | SubscriptionChannelType | 📍4.0.1 | FHIR Std. |
| Subscription.channel.payload | Base | required | MimeType | 📍4.0.1 | FHIR Std. |
| Id | Grade | Path(s) | Description | Expression |
| dom-2 | error | Subscription | If the resource is contained in another resource, it SHALL NOT contain nested Resources |
contained.contained.empty()
|
| dom-3 | error | Subscription | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource |
contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
|
| dom-4 | error | Subscription | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated |
contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
|
| dom-5 | error | Subscription | If a resource is contained in another resource, it SHALL NOT have a security label |
contained.meta.security.empty()
|
| dom-6 | best practice | Subscription | A resource should have narrative for robust management |
text.`div`.exists()
|
| ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both |
extension.exists() != value.exists()
|
| ohh-subscription-criteria | error | Subscription.criteria | Criteria can only be on QuestionnaireResponse, PlanDefinition, CarePlan or Task |
matches('^(QuestionnaireResponse|PlanDefinition|CarePlan|Task).*')
|
This structure is derived from Subscription
Differential View
This structure is derived from Subscription
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() |
|---|---|---|---|---|
![]() |
0..* | Subscription | Server push subscription criteria | |
![]() ![]() |
C | 1..1 | string | Rule for server push Constraints: ohh-subscription-criteria |
![]() ![]() |
||||
![]() ![]() ![]() |
1..1 | code | rest-hook | websocket | email | sms | message Fixed Value: rest-hook (no extensions allowed) | |
Documentation for this format | ||||
| Id | Grade | Path(s) | Description | Expression |
| ohh-subscription-criteria | error | Subscription.criteria | Criteria can only be on QuestionnaireResponse, PlanDefinition, CarePlan or Task |
matches('^(QuestionnaireResponse|PlanDefinition|CarePlan|Task).*')
|
Key Elements View
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() |
|---|---|---|---|---|
![]() |
0..* | Subscription | Server push subscription criteria | |
![]() ![]() |
0..1 | uri | A set of rules under which this content was created | |
![]() ![]() |
0..* | Extension | Extensions that cannot be ignored | |
![]() ![]() |
1..1 | code | requested | active | error | off Binding: SubscriptionStatus (required): The status of a subscription. | |
![]() ![]() |
1..1 | string | Description of why this subscription was created | |
![]() ![]() |
C | 1..1 | string | Rule for server push Constraints: ohh-subscription-criteria |
![]() ![]() |
1..1 | BackboneElement | The channel on which to report matches to the criteria | |
![]() ![]() ![]() |
0..* | Extension | Extensions that cannot be ignored even if unrecognized | |
![]() ![]() ![]() |
1..1 | code | rest-hook | websocket | email | sms | message Binding: SubscriptionChannelType (required): The type of method used to execute a subscription. Fixed Value: rest-hook (no extensions allowed) | |
Documentation for this format | ||||
| Path | Status | Usage | ValueSet | Version | Source |
| Subscription.status | Base | required | SubscriptionStatus | 📍4.0.1 | FHIR Std. |
| Subscription.channel.type | Base | required | SubscriptionChannelType | 📍4.0.1 | FHIR Std. |
| Id | Grade | Path(s) | Description | Expression |
| dom-2 | error | Subscription | If the resource is contained in another resource, it SHALL NOT contain nested Resources |
contained.contained.empty()
|
| dom-3 | error | Subscription | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource |
contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
|
| dom-4 | error | Subscription | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated |
contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
|
| dom-5 | error | Subscription | If a resource is contained in another resource, it SHALL NOT have a security label |
contained.meta.security.empty()
|
| dom-6 | best practice | Subscription | A resource should have narrative for robust management |
text.`div`.exists()
|
| ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both |
extension.exists() != value.exists()
|
| ohh-subscription-criteria | error | Subscription.criteria | Criteria can only be on QuestionnaireResponse, PlanDefinition, CarePlan or Task |
matches('^(QuestionnaireResponse|PlanDefinition|CarePlan|Task).*')
|
Snapshot View
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() | ||||
|---|---|---|---|---|---|---|---|---|
![]() |
0..* | Subscription | Server push subscription criteria | |||||
![]() ![]() |
0..1 | id | Logical id of this artifact | |||||
![]() ![]() |
0..1 | Meta | Metadata about the resource | |||||
![]() ![]() |
0..1 | uri | A set of rules under which this content was created | |||||
![]() ![]() |
0..1 | code | Language of the resource content Binding: CommonLanguages (preferred): A human language.
| |||||
![]() ![]() |
0..1 | Narrative | Text summary of the resource, for human interpretation This profile does not constrain the narrative in regard to content, language, or traceability to data elements | |||||
![]() ![]() |
0..* | Resource | Contained, inline Resources | |||||
![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() |
0..* | Extension | Extensions that cannot be ignored | |||||
![]() ![]() |
1..1 | code | requested | active | error | off Binding: SubscriptionStatus (required): The status of a subscription. | |||||
![]() ![]() |
0..* | ContactPoint | Contact details for source (e.g. troubleshooting) | |||||
![]() ![]() |
0..1 | instant | When to automatically delete the subscription | |||||
![]() ![]() |
1..1 | string | Description of why this subscription was created | |||||
![]() ![]() |
C | 1..1 | string | Rule for server push Constraints: ohh-subscription-criteria | ||||
![]() ![]() |
0..1 | string | Latest error note | |||||
![]() ![]() |
1..1 | BackboneElement | The channel on which to report matches to the criteria | |||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() ![]() |
0..* | Extension | Extensions that cannot be ignored even if unrecognized | |||||
![]() ![]() ![]() |
1..1 | code | rest-hook | websocket | email | sms | message Binding: SubscriptionChannelType (required): The type of method used to execute a subscription. Fixed Value: rest-hook (no extensions allowed) | |||||
![]() ![]() ![]() |
0..1 | url | Where the channel points to | |||||
![]() ![]() ![]() |
0..1 | code | MIME type to send, or omit for no payload Binding: Mime Types (required): The mime type of an attachment. Any valid mime type is allowed. | |||||
![]() ![]() ![]() |
0..* | string | Usage depends on the channel type | |||||
Documentation for this format | ||||||||
| Path | Status | Usage | ValueSet | Version | Source |
| Subscription.language | Base | preferred | Common Languages | 📍4.0.1 | FHIR Std. |
| Subscription.status | Base | required | SubscriptionStatus | 📍4.0.1 | FHIR Std. |
| Subscription.channel.type | Base | required | SubscriptionChannelType | 📍4.0.1 | FHIR Std. |
| Subscription.channel.payload | Base | required | MimeType | 📍4.0.1 | FHIR Std. |
| Id | Grade | Path(s) | Description | Expression |
| dom-2 | error | Subscription | If the resource is contained in another resource, it SHALL NOT contain nested Resources |
contained.contained.empty()
|
| dom-3 | error | Subscription | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource |
contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
|
| dom-4 | error | Subscription | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated |
contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
|
| dom-5 | error | Subscription | If a resource is contained in another resource, it SHALL NOT have a security label |
contained.meta.security.empty()
|
| dom-6 | best practice | Subscription | A resource should have narrative for robust management |
text.`div`.exists()
|
| ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both |
extension.exists() != value.exists()
|
| ohh-subscription-criteria | error | Subscription.criteria | Criteria can only be on QuestionnaireResponse, PlanDefinition, CarePlan or Task |
matches('^(QuestionnaireResponse|PlanDefinition|CarePlan|Task).*')
|
This structure is derived from Subscription
Other representations of profile: CSV, Excel, Schematron
To create a Subscription to get notified about changes you’ll need to have an endpoint/URL available that can handle the notification requests.
If you want subscriptions to only be valid until a specific time, you can specify the end value of a subscription. This can be helpful if
you specify an authorization token that has a limited lifetime in the headers. Note that you should keep track of expired subscriptions
yourself. We won’t create new subscriptions if they expire. No notifications will be sent for this subscription after the specified
timestamp. The status of the subscription will then also change to off. You can extend a subscription, or replace an expiring token in
the headers, by updating it, see Updating a Subscription.
When creating a Subscription, you can choose to also retrieve the content with the notification by setting the payload to one of the 2 allowed values [application/fhir+json, application/fhir+xml]. If you don’t want to receive the content, you’ll need to execute the request defined in the criteria to retrieve the items.
If you have set the payload to one of the allowed values, we’ll send the notifications with the (related) content of the subscribed resource in a Bundle of type history.
If your server endpoint needs specific headers in the HTTP Post request, you can add them in the channel.header field. This can, for
example, be used when the endpoint is secured with authentication. You can, for example, add an Authorization: Bearer <jwttoken> value to
the headers. When the notification is posted, these headers will be added to the request.
We currently support subscriptions on PlanDefinition, QuestionnaireResponse, CarePlan and Task:
You can register a Subscription on PlanDefinitions to receive notification when new programs for your client are published or if changes occur to a specific program by adding an _id query parameter to the criteria.
When the payload property has been set, the posted Bundle will contain the PlanDefinition that was changed/created.
You can register a Subscription on QuestionnaireResponse to receive notification when new answers for a questionnaire have become available. The criteria determine which responses you are notified about:
| Notify on | Criteria |
|---|---|
| All responses | QuestionnaireResponse |
| Responses for a program/PlanDefinition | QuestionnaireResponse?based-on.instantiates-canonical=<program UUID> |
| Responses for a CarePlan | QuestionnaireResponse?based-on=CarePlan/<CarePlan id> |
based-on and based-on.instantiates-canonical cannot be combined in one Subscription.
When the payload property has been set, the posted Bundle will contain the QuestionnaireResponse (with encrypted values) and the
Questionnaire that corresponds to this QuestionnaireResponse. If you created the Subscription via the FHIR Viewer Gateway, the gateway will
handle decryption of the QuestionnaireReponse
You can additionally narrow the Subscription to patients that have an identifier in a specific system, see Filtering on patient identifier system.
You can register a Subscription on CarePlan to receive notification when a CarePlan is created or updated, or when a questionnaire that is part of the CarePlan has been filled out. The criteria determine which CarePlans you are notified about:
| Notify on | Criteria |
|---|---|
| All CarePlans | CarePlan |
| CarePlans for a program/PlanDefinition | CarePlan?instantiates-canonical=<program UUID> |
| A single CarePlan | CarePlan?_id=<CarePlan id> |
_id and instantiates-canonical cannot be combined in one Subscription.
You can additionally narrow the Subscription to patients that have an identifier in a specific system, see Filtering on patient identifier system.
When the payload property has been set, the posted Bundle will contain the CarePlan that was updated/created.
You can register a Subscription on Task to receive a notification when a notification or call task or a questionnaire task of a CarePlan is created or changes. A notification is sent:
requested to ready, or to in-progress for a notification task.
This notification is sent within about a minute after executionPeriod.start;completed, cancelled or failed, for example when Open Health Hub has sent a notification to the patient,
a questionnaire has been filled out or a client has updated the status;completed, cancelled or failed notification is made active again;executionPeriod changes because the start of the CarePlan has been moved.A notification that Open Health Hub sends to the patient starts and is completed at about the same moment, so you can receive an
in-progress and a completed notification for it shortly after each other.
The criteria determine which tasks you are notified about:
| Notify on | Criteria |
|---|---|
| All tasks | Task |
| Tasks of a program/PlanDefinition | Task?based-on.instantiates-canonical=<program UUID> |
| Tasks of a CarePlan | Task?based-on=CarePlan/<CarePlan id> |
| A single task | Task?_id=<Task id> |
| Tasks with a specific code | Task?code=PUSH_NOTIFICATION |
| Tasks with a specific status | Task?status=in-progress |
| Notification tasks of a program that have to be sent | Task?based-on.instantiates-canonical=<program UUID>&code=PUSH_NOTIFICATION&status=in-progress |
_id, based-on and based-on.instantiates-canonical cannot be combined in one Subscription. Each of them can be combined with code
and status, each with one value.code is PUSH_NOTIFICATION, CALL_PATIENT or complete-questionnaire, optionally with its system as in the Task.status is one of requested, ready, in-progress, completed, cancelled or failed. It is matched with the status of the task
at the moment of the change, so a task that is created before its start time has the status requested.You can additionally narrow the Subscription to patients that have an identifier in a specific system, see Filtering on patient identifier system.
You receive notifications for the tasks that you can read with a GET on Task.
When the payload property has been set, the posted Bundle will contain the Task that was created or changed.
On QuestionnaireResponse, CarePlan and Task subscriptions you can add a patient.identifier query parameter to only receive notifications
for patients that have an identifier in a specific system. Use the token form with a system and an empty value, so <system>|. The | may
be written literally or percent-encoded as %7C:
CarePlan?instantiates-canonical=3b47d913-03f7-41cb-a0ed-ca3a0a44f9b5&patient.identifier=urn:oid:2.16.840.1.113883.2.4.99|
QuestionnaireResponse?patient.identifier=urn:oid:2.16.840.1.113883.2.4.99%7C
A notification is only sent when the patient of the triggering resource has at least one identifier in that system; patients without one are
skipped. Filtering on an identifier value is not supported, and neither is filtering on more than one system — create a Subscription per
system. The parameter is not supported on PlanDefinition subscriptions, because those notifications are not about a single patient; using it
there is rejected with an OperationOutcome on Subscription.criteria.
A notification is posted to the endpoint of the Subscription. Respond with a 2xx status within 60 seconds to confirm that you received
it. When processing a notification takes longer, respond first and process it afterwards, for example by putting it in a queue.
An error response (4xx or 5xx), or no response within 60 seconds, means the notification failed. Failed notifications are sent again:
A retried notification contains the content of the resource at the time of the retry, not at the time of the first attempt. When a notification for a later change of the same resource is delivered first, the earlier failed notification is no longer retried, because you already received the latest content. Notifications for changes that follow each other quickly can still arrive in a different order.
You can receive the same notification more than once, for example when your endpoint processed it but responded too late. Make sure that processing a notification twice has no unwanted effects, for example by checking whether you already processed the same content for that resource.
An existing Subscription can be updated with a PUT on Subscription/[id]. This can, for example, be used to change the endpoint, to
replace an authorization token in the headers or to change the end date of the subscription. The time of the last update is returned in
meta.lastUpdated, it is absent when the Subscription hasn’t been updated since it was created.
Every Subscription has a version, which is returned in meta.versionId and in the ETag header when reading, creating or updating it.
To prevent overwriting changes made in the meantime, send an If-Match header containing the current version, e.g. If-Match: W/"3".
The update is then only executed when this version matches the current version of the Subscription. Without an If-Match header the
update is always executed. Every successful update increases the version by one. A meta.versionId in the request body is ignored, only
the If-Match header is used.
When the update is rejected because the Subscription has been changed in the meantime, retrieve the Subscription again, apply your change to the retrieved Subscription and send the update again with the new version. Don’t just repeat the update with the new version, as this would overwrite the other change.
The ETag can also be used with an If-None-Match header when reading a Subscription. The response will then be 304 Not Modified when
the Subscription hasn’t changed. Older versions of a Subscription are not kept, so reading a specific version (_history) is not supported.
An update replaces the complete Subscription. Elements that are left out of the update are removed, e.g. leaving out channel.header
removes all headers and leaving out end makes the subscription valid indefinitely. The easiest way to update a Subscription is to
retrieve it, change the elements you want to change and send the complete Subscription back.
channel.endpoint, channel.header, channel.payload, reason and end can be changed.criteria can’t be changed. Create a new Subscription (and delete the old one) when you want to be notified about other resources.status should be requested, active or off. The status of a Subscription is derived from its end, so it doesn’t change
by an update. Use a DELETE to stop a subscription.end should be in the future. An expired subscription becomes active again when its end is updated to a time in the future.Notifications sent after the update use the updated endpoint and headers. This also applies to notifications that failed before the update and are retried afterwards, see Receiving notifications.
| Status | Reason |
|---|---|
200 OK |
The Subscription has been updated, the response contains the updated Subscription and its new version |
400 Bad Request |
The If-Match header doesn’t contain a numeric version, or the id in the body doesn’t match the id in the URL |
404 Not Found |
The Subscription doesn’t exist or has been deleted |
409 Conflict |
The Subscription was updated by another request at the same time and no If-Match header was sent, retrieve it again and retry |
412 Precondition Failed |
The version in the If-Match header is not the current version of the Subscription, also when it was updated by another request at the same time, retrieve it again and retry |
422 Unprocessable Entity |
The Subscription is not valid, e.g. the criteria or the gateway endpoint extension were changed, see the OperationOutcome for details |