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

Payload rules

These rules apply to every request to /erpservices/ImportDossier. The Chamber of Commerce module uses a different endpoint and structure: see Chamber of Commerce.

The fields per message type are in the message specifications and in the OpenAPI specification.

Request structure

One request is one dossier. The dossier contains one or more arrays, one per message type. Each item in an array is one declaration or notification with its own control fields.

{
"dossierNumber": "ERP_2026_000123",
"dmsExportDeclarations": [
{
"applicationReferenceId": "ERP_2026_000123_EXP_1",
"doSubmitWhenValid": false,
"doNotSaveWhenInvalid": true,
"declarationData": { },
"consignor": { "internalCode": "YOUR_CONSIGNOR_CODE" }
}
]
}

Leave out the arrays you don't use.

Dossier level

Field Type Required Description
dossierNumber string, 1 to 30 characters Yes Your number for the dossier. All declarations in the request are added to this dossier. Use underscores, not hyphens.

Message types

Array in the request Message type Array in the response
dmsExportDeclarations DMS Export dmsExportDeclarationResults
dmsImportDeclarations DMS Import dmsImportDeclarationResults
dmsEIDRWarehouseDeclarations DMS EIDR Warehouse dmsEIDRWarehouseDeclarationResults
dmsEIDRDeclarations DMS EIDR dmsEIDRDeclarationResults
transitDepartureDeclarations Transit Departure transitDepartureDeclarationResults
transitArrivalDeclarations Transit Arrival transitArrivalDeclarationResults
dvaDepartureDeclarations DVA Departure dvaDepartureDeclarationResults
dvaArrivalDeclarations DVA Arrival dvaArrivalDeclarationResults
emcsDepartureDeclarations EMCS Departure emcsDepartureDeclarationResults
swArrivalAtExitDeclarations Single Window Arrival at Exit (AES) swArrivalAtExitDeclarationResults
swProvisioningDeclarations Single Window Provisioning swProvisioningDeclarationResults
nvwaExportCertificateRequests NVWA export certificate nvwaExportResults
eBalieExportNotifications e-Balie export notification eBalieExportNotificationResults
portbaseMedNotifications Portbase MED portbaseMedNotificationResults
portbaseMidNotifications Portbase MID portbaseMidNotificationResults

CMR and A.TR documents have their own endpoints. See the articles CMR and A.TR. Chamber of Commerce documents (Certificate of Origin, EUR) use their own endpoint. See the article Chamber of Commerce.

Control fields per declaration

Field Type Required Default Description
applicationReferenceId string Yes   Your reference for this declaration. Must be unique within your system. Never reuse it, not even when you send a dataset again that you sent before. Only the endpoints that refer to an existing request use it again: UpdateCertificateRequest (NVWA) and Documents/UploadFile. Status updates use it to tell you which declaration changed.
doSubmitWhenValid boolean No false true: Shipment submits the declaration automatically when all data is valid. false: the declaration is saved and submitted manually in Shipment.
doNotSaveWhenInvalid boolean No false true: an invalid declaration is not saved, and the errors are returned in the response. false: the declaration is saved with errors. Recommended: true.
fullUserNameOfSubmitter string, max. 64 No   Name of the person who submits the declaration.

Customs messages have extra fields, such as applyChainProcedure and daysDelayBeforeSubmit. See the article Customs.

Limits

  • Maximum 10 declarations per request, across all arrays. More returns HTTP 413.
  • applicationReferenceId must be unique. Never reuse it for a new declaration or document, not even when you send the same dataset again after a correction or a rejection. A duplicate returns HTTP 409. Two endpoints refer to an existing request and therefore use its original applicationReferenceId: UpdateCertificateRequest (NVWA) and Documents/UploadFile.
  • dossierNumber: 1 to 30 characters.

Response

If the request is accepted (HTTP 200), the response contains one result per declaration, in the matching results array.

{
"dmsExportDeclarationResults": [
{
"applicationReferenceId": "ERP_2026_000123_EXP_1",
"isSaved": true,
"isSubmitted": false,
"errors": [],
"frn": "..."
}
]
}
Field Description
applicationReferenceId The reference you sent.
isSaved Whether the declaration was saved in Shipment.
isSubmitted Whether the declaration was submitted.
errors Validation errors. Empty if the declaration is valid.
frn The functional reference number generated by Shipment (DMS Export).

Important: HTTP 200 does not mean every declaration is valid. Always check isSaved, isSubmitted and errors per declaration.

HTTP status codes

Code Meaning
200 Request processed. Check the result per declaration.
400 The request body was empty or contained no declarations.
401 Missing, invalid or expired token. [VERIFY: not listed in the specification]
405 The request contains a declaration type for a module you don't have access to.
409 The request contains duplicate applicationReferenceId values.
413 More than 10 declarations in one request.
500 Unexpected error while processing the request.

Error responses (4xx and 5xx) contain a plain text message, not JSON.

Validation

Step When What is checked If it fails
1. Technical validation On receipt Valid JSON, structure, data types, limits HTTP 4xx with a text message. Nothing is saved.
2. Functional validation After receipt Required fields per declaration HTTP 200 with errors in errors. Saved or not, depending on doNotSaveWhenInvalid.
3. Customs After submitting Content according to Customs rules A status update with a rejection. See the article Troubleshooting.

Values

  • Leave out empty values. Don't send empty elements, empty arrays or empty objects. Leave the field out completely.
  • Line breaks depend on the field. See Line breaks below.
  • Underscores in references. Use _ in applicationReferenceId and dossierNumber, not hyphens.
  • Exact field names. Field names are camelCase, exactly as in the specification. [VERIFY: are unknown fields rejected or ignored?]
  • Code lists. Many fields use a code from the Customs code book, for example transactionNatureCode with code list 091 (value 11). See Dutch Customs code book.

Line breaks

Whether a text field may contain a line break depends on the message type. The OpenAPI specification shows per field how many lines and characters are allowed.

Message type Line breaks How to send text over several lines
Customs declarations and notifications (DMS, Transit, DVA, EMCS, Single Window, NVWA, Portbase) Not allowed Repeat the tag, one value per line.
CMR and A.TR documents Allowed in multi-line fields, with a maximum number of lines and characters per line Separate the lines with \n in one value.

Examples of multi-line fields in a CMR document:

Field Maximum
addressDescription (consignor, consignee, transporter) 6 lines of 50 characters
locationOfTakingOverGoods, locationOfDeliveryOfGoods 4 lines of 50 characters
instructionsConsignor 10 lines of 50 characters
specialAgreements, commentsConsignor 8 lines of 50 characters
signatureConsignor, signatureConsignee 6 lines of 32 characters
"locationOfDeliveryOfGoods": "Warehouse 3\nHarbour Road 12\n3011 AB Rotterdam"

Use \n only, not \r\n. Not every field in a CMR or A.TR document is multi-line: for example, the description of an A.TR goods item must be on one line. All fields are listed in Documents. [VERIFY: confirm the rule for customs messages, the specification does not state it explicitly for every field.]

Address book

Register each party once in the Shipment address book with an internal code, then refer to it with internalCode. Shipment completes the details, such as address and EORI number. For the consignor of a DMS Export declaration, internalCode is required.

"consignor": {
"internalCode": "YOUR_CONSIGNOR_CODE"
}

Article master data

If the article is in the Shipment article master data, link it with stockKeepingUnit and hsCode. In that case, leave out previousDocuments, additionalDocumentCode and additionalReferences completely.