v1

latestOpenAPI 3.0.32026-07-23519181.2 KB
Endpoints

Submit a Customs Declaration

Allows submission of a Customs Declaration.

Error scenarios

<table> <tbody> <tr> <td><b>Scenario</b></td> <td><b>HTTP Status</b></td> <td><b>Code</b></td> </tr> <tr> <td>Invalid XML Payload</td> <td>400 (Bad Request)</td> <td>BAD_REQUEST</td> </tr> <tr> <td>A firewall rejected the request</td> <td>403 (Payload Forbidden)</td> <td>PAYLOAD_FORBIDDEN</td> </tr> <tr> <td>Internal server error</td> <td>500 (Internal Server Error)</td> <td>INTERNAL_SERVER_ERROR</td> </tr> </tbody> </table>

For error scenarios that are common across all APIs, and for error formats, see our reference guide for more on errors.

post/customs/declarations/

Headers

Acceptstring required
Example:application/vnd.hmrc.2.0+xml

Specifies the version of the API that you want to call. See versioning.

Content-Typestring required
Example:application/xml; charset=UTF-8

Specifies the format of the request body. Must be "application/xml; charset=UTF-8" or the request will be rejected with HTTP status code 415.

X-Badge-Identifierstring
Example:ABC123

Represents the end-user who is interacting with the subscribed application.

CSPs must have an X-Badge-Identifier or X-Submitter-Identifier.

Must be 6 to 12 characters, consisting of any combination of numeric digits and/or upper-case letters.

X-Submitter-Identifierstring
Example:GB123456789000

The EORI associated with the originating owner of the declaration.

CSPs must have an X-Badge-Identifier or X-Submitter-Identifier.

Must have a maximum length of 17 characters, consisting of any combination of numeric digits and/or letters.

All 5 operations