Asynchronous validation errors
If a submission did not have any validation errors that led to immediate rejection (synchronous validation errors), the submission will be processed further. Validation errors can still occur later, during further processing. These will then be returned as a response to calls to the corresponding "/validation-status" endpoint when processing is complete. Validation errors are linked to the "requestId" value returned on the original submission, and returned as asynchronous validation errors.
Content format for asynchronous validation errors
If validation errors are found when
asynchronous validation is complete, the response to
the "/validation-status" endpoint will
return HTTP code 202 with content where the field
"status" has the value
"FAILURE".
Validation errors are returned as one or more
objects in a list,
"validationErrorList". The content of the
list is object(s) that point to the path of the
field(s) that caused the validation error indicated
in the field "pointer.messageElementPath"
and the cause of the error indicated in the field
"description".
Until processing is complete, the response to the endpoint will give HTTP code 404.
If there are no validation errors, and the submission is successful, the field "status" will have the value "SUCCESS"
{ "status": "FAILURE", "requestId": "${requestIdForSubmission}", "notificationDate": "${dateTimeResultWasReady}", "validationErrorList": [ { "description": "${validationErrorCauseOne}", "pointer": { "messageElementPath": "${pathToFieldWithErrorOne}" } }, { "description": "${validationErrorCauseTwo}", "pointer": { "messageElementPath": "${pathToFieldWithErrorTwo}" } } ] }
The field must have a value specified by the code list
Response
{ "status": "FAILURE", "requestId": "${requestIdForSubmission}", "notificationDate": "${dateTimeResultWasReady}" "validationErrorList": [ { "description": "Invalid code. Expected codes are one of [${codeOne}, ${codeTwo}]", "pointer": { "messageElementPath": "${pathToFieldWithError}" } } ] }
Cause
The field specified in "messageElementPath" had a value that was not found in the code list (table of valid values). One of the code list values, as specified in ["codeOne", "codeTwo"...], is required for the field.
Correction
Change the field to have a value corresponding to a valid code list code as required for the field. Resubmit. Use the new "requestId" returned for the new submission and verify that asynchronous validation for this returns the field "status" with the value "SUCCESS" when new processing is complete.
Country code not valid
Response
{ "status": "FAILURE", "requestId": "${requestIdForSubmission}", "notificationDate": "${dateTimeResultWasReady}" "validationErrorList": [ { "description": "Country is invalid", "pointer": { "messageElementPath": "${pathToFieldWithError}" } } ] }
Cause
The field specified in "messageElementPath" has a country code that was not found among valid ISO-3166 Alpha-2 codes.
Correction
Change the field to use a valid ISO-3166 Alpha-2 code. Resubmit. Use the new "requestId" returned for the new submission and verify that asynchronous validation for this returns the field "status" with the value "SUCCESS" when new processing is complete.
Invalid MRN format for the specified export type
Response
{ "status": "FAILURE", "requestId": "${requestIdForSubmission}", "notificationDate": "${dateTimeResultWasReady}", "validationErrorList": [ { "description": "Invalid MRN format for export of type ${typeOfExport}", "pointer": { "messageElementPath": "consignmentHouseLevel.exportFromEU[${indexInList}].exportId" } } ] }
Cause
The MRN for the field "exportId" specified in "messageElementPath" is provided in a format that is not valid for the specified export type ("typeOfExport").
Correction
Change the field value to use a valid MRN format. Resubmit. Use the new "requestId" returned for the new submission and verify that asynchronous validation for this returns the field "status" with the value "SUCCESS" when new processing is complete.
Road transport only (road-API): Export of type AES_EXPORT not found or has wrong status in AES
Response
{ "status": "FAILURE", "requestId": "${requestIdForSubmission}", "notificationDate": "${dateTimeResultWasReady}", "validationErrorList": [ { "description": "Export of type AES_EXPORT is not found or has wrong status in AES.", "pointer": { "messageElementPath": "consignmentHouseLevel.exportFromEU[${indexInList}].exportId" } } ] }
Cause
The export is of type AES_EXPORT but the exportId was not found, or has the wrong status in AES. In addition to the export declaration not being found with the specified ID, the cause may be:
- The export declaration exists but has not been released from the departure customs office
- The export declaration exists but has already been registered for export
Correction
Verify and, if necessary, change so that the exportId
is correct and has the right status in AES.
Resubmit. Use the new "requestId" returned
for the new submission and verify that asynchronous
validation for this returns the field
"status" with the value
"SUCCESS" when new processing is
complete.
If the value indicating the procedure the consignment was under until crossing the border into Norway ("outgoing procedure") is provided, it must be one of the codes allowed in the code list
Response
{ "status": "FAILURE", "requestId": "${requestIdForSubmission}", "notificationDate": "${dateTimeResultWasReady}", "validationErrorList": [ { "description": "When field is provided, it has to be one of ${outgoingProcedureCodes}", "pointer": { "messageElementPath": "consignmentHouseLevel.importProcedure.outgoingProcedure" } } ] }
Cause
The value for the field outgoingProcedure was not found among the valid codes in the OutgoingProcedure code list mo-kodeverk-EN.html#outgoingprocedure.
Correction
Change the value to one of the values in the OutgoingProcedure code list. Resubmit. Use the new "requestId" returned for the new submission and verify that asynchronous validation for this returns the field "status" with the value "SUCCESS" when new processing is complete.
Cannot submit exportFromEU list if the procedure the consignment was under until crossing the border into Norway ("outgoing procedure") is Transit (TRA)
Response
{ "status": "FAILURE", "requestId": "${requestIdForSubmission}", "validationErrorList": [ { "description": "Invalid code. Expected valid UNLOCODE", "pointer": { "messageElementPath": "${pathToFieldWithError}" } } ] }
Cause
There are several fields in the messages where the value to be provided is based on the UN location codes, "UNLOCODE". The field specified in "messageElementPath" has a submitted value that was not found in the CL144 UNLOCODE code list.
Correction
Change the value to one of the values in the CL144 UNLOCODE code list. Resubmit. Use the new "requestId" returned for the new submission and verify that asynchronous validation for this returns the field "status" with the value "SUCCESS" when new processing is complete.
Cannot submit exportFromEU list if the procedure the consignment was under until crossing the border into Norway ("outgoing procedure") is Transit (TRA)
Response
{ "status": "FAILURE", "requestId": "${requestIdForSubmission}", "notificationDate": "${dateTimeResultWasReady}", "validationErrorList": [ { "description": "Field cannot have values when consignmentHouseLevel.importProcedure.outgoingProcedure is TRA", "pointer": { "messageElementPath": "consignmentHouseLevel.exportFromEU" } } ] }
Cause
If the procedure the consignment was under until crossing the border into Norway (in the field outgoingProcedure) has the value TRA (for transit), you cannot submit a reference to export from the EU (exportFromEU).
Correction
Remove exportFromEU from the import procedure or
change outgoingProcedure. Resubmit.
Use the new
"requestId" returned for the new
submission and verify that asynchronous validation
for this returns the field "status" with
the value "SUCCESS" when new processing is
complete.
If neither address nor location is specified, the UN location code ("UNLOCODE") is required
Response
{ "status": "FAILURE", "requestId": "${requestIdForSubmission}", "validationErrorList": [ { "description": "If location AND address is not provided, then unloCode is required", "pointer": { "messageElementPath": "consignmentHouseLevel.placeOfDelivery.unloCode" } } ] }
Cause
The object specified in
"messageElementPath" has neither address
("address") nor location
("location") provided. Therefore, the
field "unloCode" must be provided and have
a value for this object.
This applies to the
place of loading ("placeOfLoading"), place
of unloading ("placeOfUnloading"), place
of acceptance ("placeOfAcceptance") and
place of delivery ("placeOfDelivery").
Correction
Add a valid "unloCode", or add "address" and/or "location" to the object. Resubmit. Use the new "requestId" returned for the new submission and verify that asynchronous validation for this returns the field "status" with the value "SUCCESS" when new processing is complete.
Reference to transit ("typeOfReference" equal to "N820") refers to transit that does not have valid status
Response
{ "status": "FAILURE", "requestId": "${requestIdForSubmission}", "notificationDate": "${dateTimeResultWasReady}", "validationErrorList": [ { "description": "Document with typeOfReference N820 contains a referenceNumber in wrong state", "pointer": { "messageElementPath": "${pathToFieldWithError}" } } ] }
Cause
A reference to a transit where the type of reference is "N820" ("typeOfReference" equal to "N820") has been provided. This transit is not in the correct status. The requirement for the correct status in this context is that it is declared with a Norwegian border crossing customs office and a Norwegian destination customs office in the transit declaration and that the transit has been released from the departure customs office.
The document of type N820 specified in "messageElementPath" has the wrong status in the transit system.
Correction
Check that the transit declaration is in accordance with the description above.
Resubmit. Use the new "requestId" returned for the new submission and verify that asynchronous validation for this returns the field "status" with the value "SUCCESS" when new processing is complete.
VOEC goods item ("goodsItem") has a value that exceeds NOK 3,000, therefore an import declaration must be used instead
Response
{ "status": "FAILURE", "requestId": "${requestIdForSubmission}", "notificationDate": "${dateTimeResultWasReady}", "validationErrorList": [ { "description": "When item value exceeds NOK 3000, a regular import declaration has to be submitted", "pointer": { "messageElementPath": "${pathToFieldWithError}" } } ] }
Cause
VOEC has a maximum value per item of NOK 3,000. The goods item ("goodsItem") with the specified VOEC number ("vatIdentificationNumber") has a value per item ("itemAmountInvoicedVOEC") that exceeds the maximum limit of 3,000 kroner.
Correction
Create a regular import declaration for the item(s)
and use this. Note that if one or more of the items
the recipient has purchased has a value exceeding
3,000 NOK, all items must be cleared through customs
in the usual
way. See https://www.skatteetaten.no/bedrift-og-organisasjon/avgifter/mva/utland/e-handel-voec/sending-av-pakker-i-voec-ordningen/.
Resubmit. Use the new "requestId" returned
for the new submission and verify that asynchronous
validation for this returns the field
"status" with the value
"SUCCESS" when new processing is
complete.
No permissions found for the VOEC number specified on the VOEC goods item ("goodsItem")
Response
{ "status": "FAILURE", "requestId": "${requestIdForSubmission}", "notificationDate": "${dateTimeResultWasReady}", "validationErrorList": [ { "description": "Unknown vatIdentificationNumber", "pointer": { "messageElementPath": "${pathToFieldWithError}" } } ] }
Cause
No valid VOEC permissions found for the VOEC number ("vatIdentificationNumber") specified on the VOEC goods item ("goodsItem"). A VOEC number has been provided that we cannot verify as valid. It may be an incorrect VOEC number, or the validity of the VOEC number has expired.
Correction
Change the VOEC number to a valid number. If a valid
VOEC number cannot be obtained, the items must be
declared with a regular import declaration.
Resubmit. Use the new "requestId" returned
for the new submission and verify that asynchronous
validation for this returns the field
"status" with the value
"SUCCESS" when new processing is
complete.
Cannot submit a list of VOEC goods items ("goodsItem") if the selected customs procedure ("importProcedure") for the consignment is not VOEC ("IMMEDIATE_RELEASE_VOEC")
Response
If consignmentHouseLevel.importProcedure.importProcedure is not IMMEDIATE_RELEASE_VOEC, it should not be provided.
>{ "status": "FAILURE", "requestId": "${requestIdForSubmission}", "notificationDate": "${dateTimeResultWasReady}", "validationErrorList": [ { "description": "If consignmentHouseLevel.importProcedure.importProcedure is not IMMEDIATE_RELEASE_VOEC, it should not be provided.", "pointer": { "messageElementPath": "consignmentHouseLevel.goodsItem" } } ] }
Cause
You cannot submit VOEC goods items ("goodsItem" list) unless you have specified that the customs procedure for the consignment ("importProcedure") is VOEC (has the value "IMMEDIATE_RELEASE_VOEC").
Correction
Remove the "goodsItem" list, or set "importProcedure" to "IMMEDIATE_RELEASE_VOEC". Resubmit. Use the new "requestId" returned for the new submission and verify that asynchronous validation for this returns the field "status" with the value "SUCCESS" when new processing is complete.
Code for the referenced customs office is invalid
Response
{ "status": "FAILURE", "requestId": "${requestIdForSubmission}", "notificationDate": "${dateTimeResultWasReady}" "validationErrorList": [ { "description": "Must be a valid customs office", "pointer": { "messageElementPath": "customsOfficeOfFirstEntry.referenceNumber" } } ] }
Cause
The reference number provided for "customsOfficeOfFirstEntry" does not refer to a valid customs office. Use CL141 Customs office reference number from the code list mo-kodeverk-EN.html#cl141.
Correction
Provide a valid reference number for a customs office. Resubmit. Use the new "requestId" returned for the new submission and verify that asynchronous validation for this returns the field "status" with the value "SUCCESS" when new processing is complete.
Specified field cannot have a value when a specified customs procedure ("importProcedure" is X) is provided
Response
{ "status": "FAILURE", "requestId": "${requestIdForSubmission}", "notificationDate": "${dateTimeResultWasReady}" "validationErrorList": [ { "description": "Field cannot be filled out when consignmentHouseLevel.importProcedure is ${importProcedureType}", "pointer": { "messageElementPath": "consignmentHouseLevel.previousDocuments[${indexInList}].${fieldName}" } } ] }
Cause
If a customs procedure ("importProcedure") is specified, this field, indicated in "messageElementPath", cannot be filled out. This error occurs when the specified customs procedure is different from "IMMEDIATE_RELEASE_IMPORT" while values are provided in the fields that refer to the customs declaration ("consignmentHouseLevel.previousDocuments.sequenceNumber", and/or "consignmentHouseLevel.previousDocuments.declarantNumber", and/or "consignmentHouseLevel.previousDocuments.declarationDate").
Correction
Either change the importProcedure or remove the value in this field. Resubmit. Use the new "requestId" returned for the new submission and verify that asynchronous validation for this returns the field "status" with the value "SUCCESS" when new processing is complete.
Field cannot have a value for transit ("N820") if the procedure the consignment was under until crossing the border into Norway ("outgoing procedure") is export ("EXP")
Response
{ "status": "FAILURE", "requestId": "${requestIdForSubmission}", "notificationDate": "${dateTimeResultWasReady}" "validationErrorList": [ { "description": "Field cannot have value N820 out when consignmentHouseLevel.outgoingProcedure is EXP", "pointer": { "messageElementPath": "consignmentHouseLevel.previousDocuments[${indexInList}].typeOfReference" } } ] }
Cause
If the procedure the consignment was under until
crossing the border into Norway
("outgoingProcedure") is export (with the
value "EXP"), you cannot provide the value
"N820" in this field. This applies to
references to previous customs procedures the goods
have been subject to. If the previous customs
procedure is export, you cannot refer to a transit
reference.
See the choice of customs
procedure mo-vei-EN.html#utfyllingForsend.
Correction
Either change the value in the field or the outgoingProcedure. Resubmit. Use the new "requestId" returned for the new submission and verify that asynchronous validation for this returns the field "status" with the value "SUCCESS" when new processing is complete.
When the referenced document ("typeReference") is a customs declaration ("CUDE"), the specified field is mandatory
Response
{ "status": "FAILURE", "requestId": "${requestIdForSubmission}", "notificationDate": "${dateTimeResultWasReady}" "validationErrorList": [ { "description": "Required field when typeReference is CUDE", "pointer": { "messageElementPath": "consignmentHouseLevel.previousDocuments[${indexInList}].${fieldRequired}" } } ] }
Cause
If the referenced document is a customs declaration ("typeReference" with the value "CUDE"), you must also provide a value in the specified field (the field is specified in the error message).
Correction
Either change the typeReference or provide a value for the field. Resubmit. Use the new "requestId" returned for the new submission and verify that asynchronous validation for this returns the field "status" with the value "SUCCESS" when new processing is complete.
If one or more document references ("previousDocument") are provided, the customs procedure (field "importProcedure") must be specified
Response
{ "status": "FAILURE", "requestId": "${requestIdForSubmission}", "notificationDate": "${dateTimeResultWasReady}" "validationErrorList": [ { "description": "importProcedure is required when any consignmentHouseLevel.previousDocuments[] is provided", "pointer": { "messageElementPath": "consignmentHouseLevel.importProcedure" } } ] }
Cause
You have submitted one or more document references (objects in the "previousDocuments" list) but have not specified a customs procedure (value in the "importProcedure" field).
Correction
Either provide a value for the importProcedure field or remove all objects in the previousDocuments list. Resubmit. Use the new "requestId" returned for the new submission and verify that asynchronous validation for this returns the field "status" with the value "SUCCESS" when new processing is complete.
You can only provide one document reference to a customs declaration (an object in the "previousDocuments" list) of type customs declaration (with "typeOfReference" = "CUDE")
Response
{ "status": "FAILURE", "requestId": "${requestIdForSubmission}", "notificationDate": "${dateTimeResultWasReady}" "validationErrorList": [ { "description": "PreviousDocuments can only contain one document of type CUDE", "pointer": { "messageElementPath": "consignmentHouseLevel.previousDocuments" } } ] }
Cause
You have submitted more than one customs declaration
(object in the "previousDocuments" list)
with the value "CUDE" in the
"typeOfReference" field.
Only one
customs declaration per consignment is allowed.
Correction
Ensure that you only have one object with the
typeOfReference value "CUDE" in the
previousDocuments list.
Resubmit. Use the new
"requestId" returned for the new
submission and verify that asynchronous validation
for this returns the field "status" with
the value "SUCCESS" when new processing is
complete.
If the document reference is something other than a customs declaration ("typeOfReference" <> "CUDE"), the reference must be provided in the "referenceNumber" field in the "previousDocuments" object
Response
{ "status": "FAILURE", "requestId": "${requestIdForSubmission}", "notificationDate": "${dateTimeResultWasReady}" "validationErrorList": [ { "description": "Field should have value unless typeOfReference is CUDE", "pointer": { "messageElementPath": "consignmentHouseLevel.previousDocuments[${indexInList}].referenceNumber" } } ] }
Cause
When referencing other types of documents than a
customs declaration, the "referenceNumber"
field in "previousDocuments" should be
used to provide this reference (typically MRN or
similar).
You have submitted an object in the
"previousDocuments" list with a value that
is not "CUDE" in the
"typeOfReference" field,
while not providing a value in the
"referenceNumber" field.
This field is
required to have a value unless
"typeOfReference" has the value
"CUDE".
Correction
Change the object to have the value "CUDE" in the typeOfReference field, or provide a valid value in the referenceNumber field. Resubmit. Use the new "requestId" returned for the new submission and verify that asynchronous validation for this returns the field "status" with the value "SUCCESS" when new processing is complete.
Format of document status
If the submission is complete, the field "documentStatus" will have the value "SUCCESS", otherwise it will have "INCOMPLETE". If the status is "INCOMPLETE", an "incompleteDocumentationReasonList" will be sent, listing the reason codes for why the submission was considered incomplete. Examples of values that may appear as reason codes can be found here: mo-kodeverk-EN.html#incompleteDocumentationReason.
{ "documentNumber": "${documentNumber}", "type": "${documentType}", "documentStatus": "${documentProccessingStatus}", "incompleteDocumentationReasonList": [ "${reasonsIfStatusIsIncomplete}" ] }
Document status INCOMPLETE
Response
{ "documentNumber": "${documentNumber}", "type": "${documentType}", "documentStatus": "INCOMPLETE", "incompleteDocumentationReasonList": [ "${reasonsIfStatusIsIncomplete}" ] }
Cause
You have a submission that does not meet the requirements for a complete submission for the selected customs procedure. See: mo-vei-EN.html#utfyllingForsend.
Correction
Change the submission to meet the requirements for the selected customs procedure. See: mo-vei-EN.html#utfyllingForsend. Resubmit the updated submission with the changes (HTTP PUT). Verify that "/transport-document/status" eventually returns with the status "SUCCESS" after new processing is complete.