Legacy Error Formats

Overview

If you do not use the standard error object, the APIs return errors in the legacy formats described here. Pitney Bowes recommends using the standard error object.

Error Format 1

This format is returned for seven-digit error codes and for some non-numeric errors codes.

The error returns the following fields. The error might not include all fields.

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.
parameters array[String] Optional. The fields that might be incorrect in the request.
moreInfo String Optional. Link to the error documentation.
supplementaryErrorCode String Optional. Error code for identifying the field that caused error.

Example

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

Error Format 2

This format is returned for the following error codes:

The error returns the following fields. The error might not return all fields:

Field Type Description
status String This is always set to ERROR.
errors Array[Object] Contains the error.
    errorCode String The error code.
    errorDescription String The reason for the failure.
    userMessage String This field, used PB-TRKPKG-ERR-#### error codes, contains any error information sent by the carrier.

Example

{
    "status": "ERROR",
    "errors": [
        {
            "errorCode": "40000072",
            "errorDescription": "Invalid value for renderType."
        }
    ]
}

Error Format 3

This format applies to non-numeric error codes. The error returns the following fields:

Field Type Description
key String The error code.
message String The reason for the failure.

Example

[
    {
        "key": "address.not.verified",
        "message": "Address could not be verified!"
    }
]

Error Format 4

This format applies to some non-numeric error codes. The error returns the following fields:

Field Type Description
errorCode String The error code.
errorMessage String The reason for the failure.
invalidFields String List of fields in the request that might be incorrect.

Example

[
    {
        "errorCode": "invalid.date.time",
        "errorMessage": "Provided Date/time ___ is invalid, valid format is YYYY-MM-DDThh:mm:ss.sZ",
        "invalidFields": null
    }
]