Skip to content

Get CDS declaration status

Reads HMRC’s current status of a CDS declaration by MRN: acceptance, release, rejection or invalidation. HMRC answers for declarations from the last 180 days.

@lainstack/hmrc/get-cds-declaration-status · Customs · Available on Lainstack Cloud

Get CDS declaration status asks HMRC’s Customs Declarations Information API for the current status of one declaration, by MRN. It only reads. Use it to check a declaration sent earlier, by an automation or another system, for example on a schedule.

@lainstack/hmrc/send-cds-import-declaration already waits for acceptance or release of what it sends, so you do not need this block right after it.

  • declaration.status is the furthest step HMRC reports: received, accepted, released, rejected or invalidated. The output also carries the latest version, LRN, DUCR, UCR, declaration type and HMRC’s ROE, ICS and IRC codes.
  • Found: HMRC described the declaration.
  • Not found: HMRC has no declaration with this MRN from the last 180 days that this trader can see.
  • HMRC unavailable: a timeout, network failure, rate limit or HMRC outage (HTTP 408, 429, 500, 502, 503 or 504). hmrcProblem says which. A later check may succeed.
  • HMRC shows a trader only the declarations that trader submitted. Connect HMRC as that trader, with an EORI enrolled for CDS.
  • A refused authorisation fails the step with advice to reconnect the HMRC Connection. A missing API subscription, or any other refusal, fails the step with HMRC’s message.
  • The MRN is trimmed and upper-cased, and must be 1 to 35 letters and digits.
  • A sandbox Connection reads HMRC’s test environment. environment says which one answered.
Setting Key Type Details
HMRC connection (required) credentialId Connection The trader’s HMRC Customs Declarations connection. HMRC shows only the declarations this trader submitted. At most 160 characters.
MRN (required) mrn Text The Movement Reference Number HMRC issued when it accepted the declaration.
Output Path Type
Outcome outcome Choice
Summary summary Text
MRN mrn Text
Environment environment Text
Checked At checkedAt Text
HMRC Problem hmrcProblem Text
Declaration > MRN declaration.mrn Text
Declaration > Version ID declaration.versionId Text
Declaration > LRN declaration.lrn Text
Declaration > Type Code declaration.typeCode Text
Declaration > Submitter EORI declaration.submitterEori Text
Declaration > DUCR declaration.ducr Text
Declaration > UCR declaration.ucr Text
Declaration > Status declaration.status Choice
Declaration > Received At declaration.receivedAt Text
Declaration > Accepted At declaration.acceptedAt Text
Declaration > Goods Released At declaration.goodsReleasedAt Text
Declaration > Rejected At declaration.rejectedAt Text
Declaration > Invalidated At declaration.invalidatedAt Text
Declaration > Route Of Entry declaration.routeOfEntry Text
Declaration > Import Clearance Status declaration.importClearanceStatus Text
Declaration > Inventory Return Code declaration.inventoryReturnCode Text
Exit Port Notes
Found out
Not found notFound
HMRC unavailable unavailable