This articles gives you some examples of possible error messages from the Shipment Server API.
API request error list
Basically, if 0 then everything is fine. For all the other values something is wrong and the request failed.
0 = Success
1 = ErrorServiceLevelNotFound
2 = NoValidProductsFound
3 = FatalError
4 = UserCanceled
5 = Ambiguous
6 = NoShippingRulesDefined
7 = BadXMLFile
8 = SuccessAlternativesReturned
9 = SuccesEditBeforeSubmit
10 = ShippingDisabledByCondition
11 = UserConfirm
12 = 4PLProductValidationFailed
Error messages 1-12 are configuration issues or bad data. If you get an error message with a validation issue, eg. missing or invalid postcode, then try to change the data.
If you get an error message from a carrier with an error code, you should contact the carrier and inform them about the error code. They may ask for an example of your request.
You may also contact nShift Customer service for help. Remember to save your request code for later. nShift doesn't save this data.
Examples of common error messages
{"ErrorMessages":["Shipment validation failed","[#000000002] a value is required (Receiver - Name1)"]}
Name 1 in the receiver address is missing. This field is usually mandatory so the request will fail if it is missing. This is a typical nShift validation.
{ "ErrorMessages": [ "Shipment submit failure: Shipment booking failed. The system could not verify your shipping account number. Please correct this number and resubmit. For assistance call DHL customer services. Code: SV012a The system could not verify your billing account number. Please correct this number and resubmit. For assistance call DHL customer services. Code: SV014a " ] }
This is an example of a carrier webservice message. If we get an error message from the carrier's webservice it will be displayed like this. In this case, the account number is not correct. Contact the carrier for more information about their error codes.
{"ErrorMessages":["Sender address postcode is invalid"]}
The sender postcode is not valid and should be corrected. Change the sender postcode to a valid postcode.
{"ErrorMessages":["Cannot use a deleted stack"]}
The stack you're trying to submit the shipment to no longer exists and you must use a different one. The stack is the folder in Outbox where the shipment is placed until it is transmitted to the carrier.
{"ErrorMessages":["Shipment validation failed","Sender address1: Max 35 characters. (Sender - Address1)"]}
The sender address 1 in the request exceeded more than 35 characters. Be aware that many carriers have a maximum number of characters allowed in address fields.
{"ErrorMessages":["Shipment validation failed","[#000000057] Product not allowed for this country (Receiver - Country)"]}
You can't use this product for the given receiver country. You must use another product to send to this country.
{"ErrorMessages":["Cannot find given OrderNo"]}
You will get this message if you are trying to retrieve a Shipment from Inbox using an order number that doesn't exist on any of the shipments in Inbox.
{"ErrorMessages":["Cannot find given shipment ID"]}
If you are trying to retrieve a shipment from Inbox using shipment ID that doesn't exist or it has already been produced or deleted, you will get this error. Once a shipment is transmitted it can no longer be retrieved.
{"ErrorMessages":["Shipment validation failed","Receiver city is mandatory. (Receiver - City)"]}
A mandatory field, in this case Receiver city, is missing. You must add receiver city to the request.
{"ErrorMessages":["Invalid Country Code:"]}
You have used a wrong country code. The country code must be the official ISO alpha-2 code. Examples: SE, DK, NO, DE, etc.
{"ErrorMessages":["No Product ID given"]}
The product ID is mandatory in the request. The product ID refers to the specific product you are using like PostNord Parcel, DHL Euroconnect, Bring Pickup Parcel, etc.
{"ErrorMessages":["One or more shipments specified have been already transmitted (ID = xxxxxxxx)"]}
If you are trying to submit a shipment that has already been submitted, you will see this error. A shipment can only be transmitted (sent to the carrier) once.
{"ErrorMessages":["Cannot delete a shipment that has already been transmitted: xxxxxxxx"]}
You're trying to delete a shipment that was transmitted previously. You can never delete a shipment that has already been transmitted to the carrier.
Using the Shipment Server test bench to test requests
You can use our Shipment Server test bench to test your requests. Load the page with your key and actor ID. Add your request to the data field and click Submit Request. You'll get back the response in the JSON Response ( From Server) field. If you get back an error, you can try to modify the request and submit it again.