Pull Notifications API
Available in Sandbox | Yes |
---|---|
Sandbox base URL | https://test-api.service.hmrc.gov.uk |
Available in Production | Yes |
Production base URL | https://api.service.hmrc.gov.uk |
Overview
Use this API to “pull” business event notifications that CDS generates in response to requests submitted using the CDS APIs.
When a declaration is submitted to a CDS API a HTTP status code 202 is returned. As the declaration is processed notifications are generated.
If a callback URL was provided when subscribing to the CDS API the notifications are pushed to that URL.
If a callback URL was not provided when subscribing to the CDS API the notifications are sent to this pull queue.
Pull notifications remain queued for 14 days after which they are deleted from the queue automatically.
You can get all of the notifications for your application, or you can get them for a given conversation. We recommend getting them by conversation.
Getting notifications for a given conversation
Get a list of unpulled notification identifiers for a given conversation by calling
GET /notifications/conversationId/{conversationId}/unpulled
Iterate over this list of notification identifiers and get each unpulled notification from the unpulled queue by calling
GET /notifications/unpulled/{notificationId}
. When you get a notification from the unpulled queue, it will move to the pulled queue.To get a notification again after you have retrieved it, get it from the pulled queue by calling
GET /notifications/pulled/{notificationId}
Errors
Testing
You can use the sandbox environment to test this API.
Versioning
Endpoints
View API endpointsWhy do these endpoints look different?
The endpoints for this API now use the Open API Specification (OAS).
The API has not changed. You do not need to make any updates to your application if you already use this API.