v1

latestOpenAPI 3.0.32026-07-131435187.6 KB
Departures

Send a message related to a departure

Send a message to the customs office of departure about a departure.

For example, if you want to cancel a ‘Declaration Data’ E_DEC_DAT (IE015) message, you must send a ‘Declaration Invalidation Request’ E_DEC_INV (IE014) message to the office of departure. <br/><br/> If you use this endpoint to send a small message (up to 5MB), a successful response will contain a URI, a departure ID, and a message ID related to the departure that you can use to get the message status. <br/><br/> If you use this endpoint to send a large message (up to 8MB), a successful response will include:

  • a URL and additional metadata that you must use when uploading your file
  • a departure ID, specifying the departure to return
  • a message ID that allows you track the status of that specific message

Note: If an Economic Operators Registration and Identification (EORI) number has not been assigned to you, an HTTP 403 Forbidden error is returned.

post/customs/transits/movements/departures/{departureId}/messages

Path parameters

departureIdstring required

The departure ID specifying the departure to return.

Headers

Accept'application/vnd.hmrc.3.0+json' required

Specifies the response format and the version of the API to be used.

Content-Type'application/json' | 'application/xml' required

Specifies the format of the request body, which must be XML or JSON, using UTF-8 character encoding.

Response

Accepted

OR

Example response

{
  "_links": {
    "self": {
      "href": "/customs/transits/movements/departures/6365135ba5e821ee/messages/634982098f02f00a"
    },
    "departure": {
      "href": "/customs/transits/movements/departures/6365135ba5e821ee"
    }
  },
  "departureId": "6365135ba5e821ee",
  "messageId": "634982098f02f00a"
}