Operation: Get Subscription Status
Specification
This specification is based on the FHIR R5 Backport specification.
Usage
Get Subscription Status Request
`Get [base]/Subscription/[id]/$status`
where [id] is the logical id of the existing Subscription resource.
Get Subscription Status Response
The server returns a 200 OK HTTP status code.
Interaction Sequence Diagram
Example Subscription Status Message
While this $status operation is defined in FHIR R5 for the Subscription resource, it has also been backported to FHIR R4, functioning in the exact same way.
`GET /fhir/SubscriptionStatus/{id}/$status`
`Host: example-fhir-server.com`
`Accept: application/fhir+json`
`Authorization: Bearer <token>`
Response Message Body
{ "resourceType": "Parameters", "id": "sub-status-12345", "status": "active", "type": "event-notification", "subscription": { "reference": "Subscription/sub-12345" }, { "name" : "topic", "valueCanonical" : 'http://hl7.org/SubscriptionTopic/admission' }, "eventsSinceSubscriptionStart": "42", "notificationEvent": [ { "eventNumber": "41", "timestamp": "2025-02-12T14:30:00Z" }, { "eventNumber": "42", "timestamp": "2025-02-12T14:31:00Z" } ] }
Expected Bahaviour
Case | Scenario Description | HTTP Status Code | Response Payload |
---|---|---|---|
1 | The request was successful, and the SubscriptionStatus resource is returned in the response body | HTTP 200 OK | Returns the Submission Status resource. |
2 | The Subscription Status Not Modified | HTTP 304 | The subscription status has not changed since the last request . |
3 | The submitted Subscription cannot be validated as it does not conform to the specification | HTTP 400 | Bad Request. Returns an OperationOutcome resource indicating an issue. The client must fix the request and try again. |
4 | Subsciprtion API validates the request but cannot return a valid response due to internal issues. | HTTP 500 | Internal Server Error. Returns an OperationOutcome resource indicating an issue. |
Please see the $status Operation Definition page from the R5 Subscriptions Backport for details on the $status operation used for the Ontario Health Subscriptions service.