Provide the details of an application to raise an Export Health Certificate for your consignment.
Use the online documentation to construct a payload representing your application. Optionally use the /ehc-application-example
endpoint to view example payloads to assist you.
Use the reference-data/metadata endpoint to find and search reference data lists for sub sections of the payload according to your consignment, e.g. Certifiers, Countries, Means of Transport.
Submit your constructed payload to the /ehc-application endpoint and react to the response status code accordingly.
| Name | Description |
|---|---|
| Request Body |
Details of your request for an Export Health Certificate Application. Format: application/json Parameter location: Body For example: Failed to generate sample value: generated sample is too big. |
| Code | Description |
|---|---|
| 202 |
The submitted payload has passed preliminary validation and has resulted in a Request being created. A Request is a way to track the asynchronous processing of your message. The Request is now being validated and processed in order to attempt to create an Export Health Certificate Application. You can commence polling for status changes to the Request using the Here is an example response for this RequestStatusDetails schema: {
"_links": [
{
"href": "https://defra.gov.uk/api/v1/example/123",
"rel": "status",
"method": "GET"
}
],
"requestId": "b09fb181-948d-4c0c-9928-bf6d0b7ca357",
"customerReference": "TRD-AAA111-01",
"status": "Accepted",
"createdOn": "2021-02-01T14:05:00+00:00",
"lastUpdated": "2021-02-01T16:40:00+00:00"
}
|
| 400 |
The attempt to create a Request failed preliminary validation and has not been created. Validation errors can be found in the response body and must be corrected before re-submitting. Here is an example response for this CommonProblemDetails schema: {
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "00-d55147526d044e41aa246671de874080-de7c8222d3b2684a-00",
"errors": {
"applicationName": [
"'Application Name' must not be empty."
],
"certificateQuantity": [
"'Certificate Quantity' must be greater than or equal to '1'."
]
}
}
|