Overslaan naar inhoud
  • Er zijn geen suggesties want het zoekveld is leeg.

Common errors and solutions

These are error messages we see often, with the cause and the solution.
The general approach to troubleshooting is in the article Troubleshooting the Shipment API.
Can't solve it? See the article Getting support.

Validation errors are in the response.
The field path shows where the problem is, for example DmsExportDeclarations[0].DeclarationData.GoodsItems[1].StatisticalValue: the second goods item (counting from 0) of the first DMS Export declaration.

"An error occured while importing this declaration. Meldcode: …"

Example: An error occured while importing this declaration. Meldcode: 5fde330d-33d3-4abf-aadf-109944323c0f

Cause: an unexpected error without a field path.
In most cases (about 90%) the postal code of the consignee doesn't match the specification: it is longer than 9 characters.
Another cause is a country code that doesn't exist for Customs.

Solution:

  • Check the postal codes: at most 9 characters.
  • Check the country codes.
    For example: Guadeloupe has its own ISO code GP, but for Customs it is a French overseas department.
    Use FR in customs declarations; this applies to the other French overseas territories as well.
  • Still not solved? Send the Meldcode to support, see the article Getting support.

"…must not be shorter than … characters"

Example: "DmsExportDeclarations[0].DeclarationData.Warehouse.Type": ["De waarde van Type mag niet korter zijn dan 1 karakters."], or for GoodsItemType.Nac: not shorter than 4 characters.

Cause: the field was sent as an empty string ("").
An empty string is a value, and that value is too short.

Solution: no value? Leave the field out, or send null:

"goodsItemType": {
"hsCode": "22030009",
"additionalTaricCode1": null, ← correct: no value
"nac": "", ← wrong: leave out or null
"taricSubHeading": "" ← wrong: leave out or null
}

"Ongeldige postcode" (invalid postal code)

Example: HTTP 400 with "errors": {"Exporter.ZipCode": ["Ongeldige postcode."]}

Cause: the postal code of the party in the field path (here: the exporter) is not valid.

Solution: correct the postal code.
Dutch postal codes have the format 1234 AB.

"The field AddressDescription must match the regular expression …"

Example (CMR): "Consignee.AddressDescription": ["The field AddressDescription must match the regular expression '^.{0,50}(\n.{0,50}){0,5}$'."]

Cause: the address is longer than allowed (at most 6 lines of 50 characters), or the lines are separated with the wrong characters.
A common mistake is /n (slash) instead of \n (backslash).

Solution:

Wrong:   "addressDescription": "Straatnaam 1./nStad 5/n1234 AB Amsterdam"
Correct: "addressDescription": "Straatnaam 1.\nStad 5\n1234 AB Amsterdam"

Dates are not accepted

Example (CMR): signingDate or transportDocumentDate gives an error.

Cause: the date contains a character that looks like a hyphen but isn't one, for example a non-breaking hyphen (‑).
This happens when a date is copied from a document or a chat program.

Solution: use an ISO 8601 date and time with normal hyphens, for example 2024-10-08T14:20:17.1572631+00:00. [VERIFY: is the non-breaking hyphen the cause, or also the notation with Z instead of +00:00?]

"'Type' must be 4 characters in length"

Example: GoodsShipment.GovernmentAgencyGoodsItem[0].PreviousDocuments[0].Type: 'Type' must be 4 characters in length. You entered 3 characters.

Cause: the type of a previous document of a goods item has 3 characters.
Customs requires the 4-character code from the code list.

Solution: use the full code, including the letter, for example N830 instead of 830. The field name in the error is the name in the customs message; in the JSON it is the type of the previous document of the goods item.

"…may not be more than 16 digits, of which at most 2 decimals"

Example: "DmsExportDeclarations[0].DeclarationData.GoodsItems[1].StatisticalValue": ["Het veld StatisticalValue mag in totaal niet meer dan 16 cijfers lang zijn, waarvan maximaal 2 decimalen. De waarde bevat 7 cijfers en 3 decimalen."]

Cause: the amount has 3 decimals.

Solution: round amounts to at most 2 decimals before you send them.

"'Sender Id' must not be empty"

Example: "SenderId: 'Sender Id' must not be empty.(ErrorCode NotEmptyValidator)"

Cause: the address card of the declarant (in Dutch: aangever) in the address book of Shipment has no role for the flow (in Dutch: stroom) of this declaration.
Shipment then cannot determine who sends the declaration.

Solution: in Shipment, open Adresboek (Address book) and the address card of the declarant.
For the flow of the declaration, set whether the address card has a role and which role.
Then send the declaration again.