Skip to main content
GET
/
v1
/
declarations
/
{id}
/
customs-messages
Get customs messages
curl --request GET \
  --url https://sandbox-api.easecustoms.com/v1/declarations/{id}/customs-messages \
  --header 'Authorization: Bearer <token>'
[
  {
    "id": 1,
    "declarationId": 42,
    "direction": "OUT",
    "messageType": "DMS_SUB",
    "timestamp": "2026-06-22T10:00:00Z",
    "status": "SENT",
    "payload": "<xml>...</xml>"
  },
  {
    "id": 2,
    "declarationId": 42,
    "direction": "IN",
    "messageType": "DMS_REJ",
    "timestamp": "2026-06-22T10:05:00Z",
    "status": "RECEIVED",
    "payload": "<xml>...</xml>"
  }
]
Get customs message history for an accessible declaration.

Path Parameters

id
number
required
The unique declaration ID.
[
  {
    "id": 1,
    "declarationId": 42,
    "direction": "OUT",
    "messageType": "DMS_SUB",
    "timestamp": "2026-06-22T10:00:00Z",
    "status": "SENT",
    "payload": "<xml>...</xml>"
  },
  {
    "id": 2,
    "declarationId": 42,
    "direction": "IN",
    "messageType": "DMS_REJ",
    "timestamp": "2026-06-22T10:05:00Z",
    "status": "RECEIVED",
    "payload": "<xml>...</xml>"
  }
]