How to Add EUDR Fields to CN23 Customs API Calls

Step-by-step guide to adding DDS reference and TARIC document code fields to CN23 customs API calls before the Dec 30, 2026 EUDR deadline.

Share

DHL's Parcel API already carries the fix for the EU Deforestation Regulation (EUDR), and most integration teams haven't touched it yet. If you ship timber, rubber, cocoa, coffee, palm oil, soy or cattle-derived products into or out of the EU, your customs declaration API calls need two new fields before 30 December 2026, or the parcel sits at the border. This walkthrough shows exactly where those fields go in a CN23 customs API call, using DHL's Parcel API as the worked example, and what to do when you don't have a DDS reference yet.

Why this matters now

EUDR enforcement at customs starts on 30 December 2026, with a later date of 30 June 2027 for micro and small operators established before the end of 2024, according to the Commission's TARIC document revision of 23 September 2026 covering the 15 EUDR TARIC document codes. The rules apply from 30 December 2026, and from 30 June 2027 for micro and small operators established by 31 December 2024. After that date, a customs declaration for an Annex I product without a valid due diligence statement (DDS) reference, or a correct exemption code, doesn't get accepted. That's not a compliance footnote, it's a payload validation problem that lands in your integration layer.

DHL has already added the fields for this at the API level. On the Customs Declaration service of the Parcel API, two new optional fields sit alongside the existing customs definitions: ddsReference, a string field marked "From 30-12-2026 onwards: due diligence statement reference number", and taricDocumentCode, marked "From 30-12-2026 onwards: taric document code". They're not mandatory in the schema today, but they will gate customs clearance in five weeks. This post is about getting them into your payload correctly, not about EUDR compliance strategy in general.

What you need before starting

Three things have to exist before you touch the JSON. None of them come from DHL's API.

  • A DHL Parcel API bearer token, sandbox or production, since every call to the customs-declaration endpoint requires authorization.
  • A DDS reference number and its paired verification number, issued by the EU Information System (TRACES NT), not generated by any carrier API. The system returns a reference number and a verification number, and the reference number must appear on the customs declaration under code C716.
  • A classification decision: is the shipment in scope under Annex I of the EUDR, and if so, which TARIC document code applies — a standard DDS (C716), a simplified declaration (C717), transitional-period stock (C718), or an exemption (Y129, Y132, Y133, and others).

If your compliance team hasn't filed the DDS in TRACES yet, stop here and go sort that out first. The API fields are a pass-through, not a workaround.

Adding the fields to the customs declaration call

The new fields sit in the same Customs Definitions object you already populate for commodity code, origin, quantity, weight and value. You're not creating a new call type, you're extending the existing one.

  1. Classify the shipment first: in-scope under Annex I, exempt, or transitional-period stock. This decision determines which TARIC code you write into the payload, so don't start coding before it's made.
  2. Pull the DDS reference number and verification number from your compliance system's TRACES export, or from the EUDR Information System directly if your team files there manually.
  3. Build the customsGoods array as you do today, with description, HS code, origin country, quantity, weight and value per line item.
  4. Add ddsReference and taricDocumentCode at the declaration level, alongside accountId and customsGoods, not nested inside individual product lines.
  5. Call the endpoint against the sandbox environment first. Inspect the response and the generated attachment before you touch production.
  6. Only promote to production once a sandbox-generated CN23 shows the reference and code populated correctly.

A populated payload against the Customs Declaration service looks like this:

POST https://api-gw.dhlparcel.nl/customs/declarations
Authorization: Bearer $DHL_TOKEN
Content-Type: application/json

{
  "id": "6f2a1e3c-9b4d-4a7e-8c2a-1d4f9b7e2a11",
  "accountId": "1234567",
  "customsGoods": [
    {
      "description": "Sawn oak flooring",
      "code": "44071100",
      "origin": "LT",
      "quantity": 40,
      "value": 1200,
      "weight": 380,
      "currency": "EUR"
    }
  ],
  "ddsReference": "25NLABCDEF1234567890",
  "taricDocumentCode": "C716"
}

Equivalent curl call for a sandbox smoke test:

curl -X POST https://api-gw.dhlparcel.nl/customs/declarations \
  -H "Authorization: Bearer $DHL_TOKEN" \
  -H "Content-Type: application/json" \
  -d @customs_declaration.json

How you know it worked

Retrieve the generated declaration and its attachment. The DHL docs confirm this flow explicitly: when a customsDeclaration is provided, the generated customsDeclarationId is included in the response, which can be used to retrieve the declaration and generated documents through Get customs declaration by id. Open that attachment and check the documents section for the TARIC code and reference number you submitted. If you're testing an exemption path instead of a live DDS, confirm the Y-code and the absence of a reference number, since exemption codes don't carry one.

If the field round-trips correctly — code and number present, matching what you sent — you're done with the plumbing. What's left is operational: making sure the right code reaches the right shipment every time.

Failure mode: no DDS reference yet

This is the case most teams will hit first, because compliance teams file DDSs in batches and engineering ships continuously. If a shipment is lodged on or after 30 December 2026 for an Annex I product with no ddsReference and no applicable exemption code, the declaration doesn't clear. DHL Express has already told customers this directly: DHL Express asks the shipper or importer for the reference number or the TARIC document code, and for exempt goods the exemption code, electronically through its shipping systems when the shipment is created, and shipments without this entry cannot be cleared through customs. The date that counts is customs release, not the date you printed the label.

The fix belongs in your integration layer, not in a manual queue. Fail closed: block CN23 and label generation for in-scope SKUs if ddsReference is null and no exemption code applies, rather than letting an incomplete declaration reach the carrier and bounce back days later. For transitional-period stock placed on the market before the regulation's application date, there's a documented fallback: code C718 paired with the conventional reference number 99EU9999999999, which the Commission FAQ names specifically for goods that predate individual DDS filings. That's the one case where you can hardcode a value instead of waiting on a real reference.

Practically, this means your compliance team's DDS filing speed now gates your shipping API's success rate for EU-bound parcels. If that dependency isn't visible on a dashboard somewhere, put it there before December.

TARIC codes at a glance

CodeWhen to use itReference number requiredImport / export
C716Standard case: operator holds its own DDSYes, the DDS reference from TRACESBoth
C717Simplified declaration by a micro or small primary operatorYes, the simplified declaration identifierBoth
C718Transitional-period goods, now exported or re-importedConventional number 99EU9999999999Export / re-import
Y129Goods fall under an "ex" code in Annex I but aren't the covered productNoneBoth
Y132Product produced before 29 June 2023NoneBoth
Y133Used products, waste, recovered productsNoneBoth

Source for the code set and conditions: use C716 with the due diligence statement reference number in the standard case, C717 with the identifier of a simplified declaration, or a Y code such as Y129, Y132 or Y133 when the goods are exempt, per iCustoms' breakdown of the 2026 TARIC update.

Beyond DHL: the same two fields are missing almost everywhere else

DHL isn't alone in touching this, but it's ahead. DHL's eCommerce UK API documented the equivalent change on its own timeline: API Schema Enhancements added a new object with two fields (ddsReferenceNumber and documentCode) to support EU and Northern Ireland regulatory requirements. That's a different product line than the Parcel API, with different field names for the same concept, which tells you something important: even within one carrier, EUDR fields aren't standardized yet.

Outside DHL, the picture is thinner. Sendcloud's customs_information object has grown steadily, picking up fields like goods_description for carrier customs clearance, but its published changelog doesn't show a dedicated EUDR reference or TARIC code field as of its latest update. Shippo and ShipStation's customs objects are worth checking against your own sandbox before you assume support exists. If you're integrating multiple carriers, this is exactly the kind of per-carrier field drift that multi-carrier platforms like nShift, EasyPost, ShippyPro, Sendcloud, and Cargoson exist to abstract, mapping one set of internal fields to whatever each carrier's native API happens to call them this quarter. Whether any of them have mapped ddsReference and taricDocumentCode yet is worth testing directly rather than taking on marketing copy alone.

Open questions we're tracking

A few things aren't settled yet and we'll update this post as they land. Will DPD, GLS and PostNL publish equivalent fields on their own APIs before the December deadline, or will shippers using those carriers be stuck filing paper customs forms manually? Will sandbox environments actually enforce the 30 December 2026 rule ahead of time, or will the first real test happen in production on day one? If you've run a sandbox test against DHL's ddsReference field, or found the equivalent field on another carrier's API, send us your payload and response. We'll fold verified results into a follow-up benchmark.