Error Body Formats

Overview

The PB Shipping APIs return application-specific error messages in response bodies. For error codes, see Error Codes.

Error Body Format 1

This format applies to seven-digit error codes, which run from 1000002 to 1209999, and to some ledger errors.

[
    {
        "errorCode": "1021141",
        "message": "Invalid combination of Service Id and Parcel type.",
        "additionalInfo": "Invalid Combination of service, option and rate type. (NAE)"
    }
]

The error body can return the following fields. The body might not include all the fields below.

Field Type Description
errorCode String The error code.
message String Optional. The reason for the failure.
additionalInfo String Optional. Additional information associated with the failure.
parameter array[String] Optional. List of parameters indicating the fields in the request that might be incorrect.
moreInfo String Optional. Link to the error documentation.
supplementaryErrorCode String Optional. Error code for identifying the field that caused error.

Error Body Format 2

This format applies to the following types of error codes:

{
    "status": "ERROR",
    "errors": [
        {
            "errorCode": "40000072",
            "errorDescription": "Invalid value for renderType."
        }
    ]
}
Field Description
status This is always set to ERROR.
errors Contains the error.
    errorCode The error code.
    errorDescription The reason for the failure.

Error Body Format 3

This format applies to some merchant registry errors.

[
    {
        "key": "address.not.verified",
        "message": "Address could not be verified!"
    }
]
Field Description
key The error code.
message The reason for the failure.

Error Body Format 4

This format applies to ledger errors and transaction report errors.

[
    {
        "errorCode": "invalid.date.time",
        "errorMessage": "Provided Date/time ___ is invalid, valid format is YYYY-MM-DDThh:mm:ss.sZ",
        "invalidFields": null
    }
]
Field Description
errorCode The error code.
errorMessage The reason for the failure.
invalidFields List of fields in the request that might be incorrect.