Pacejet

Troubleshooting Failed API Imports

Overview

Transmitting a shipment to Pacejet through the RestFul API can fail for a variety of reasons, such as missing required data or corrupted request contents. Because failed transmissions can be difficult to track, Version 2 of the Pacejet API introduces a Shipments GET method to help integrations report more user-friendly error messages to end users. As described in this section, failed transmissions will be marked with a status of Processing in the GET Shipments response, and additional detail on errors provided in the response content.

In this example, to cause a shipment to not import using Post Shipment, a comma instead of a decimal for the weight for the Package has been entered for the field value:

{
        "Weight": "60,1",
        "Dimensions": {
          "Length": "25",
          "Width": "10",
          "Height": "12",
          "Units": "IN"
          },      


Using Get Shipments

After the request is sent, the response comes back with a transaction id: D000174. Instead of waiting for a user to notice an issue, your integration can use the Get Shipments call to 1) verify that a shipment was received successfully or in error and 2) display a more user-friendly error message if the shipment transmission fails.

mceclip1.png

Status

Since the import never made it into Pacejet, it will have a status of Processing. Also, in this case, many of the fields are null due to not being imported into the system. Further down the response there is a field named messageList that may display a helpful message to start troubleshooting.

"messageList": [
    {
      "name": "IMPORT_ERROR",
      "value": "Error (SaaS_RateQuote) 3: There is an error in XML document (1, 6846)."
    },
    {
      "name": "IMPORT_ERROR",
      "value": "Error (SaaS_RateQuote) 3: Input string was not in a correct format."
    } 


If a shipment imported successfully, Get Shipments can also inform users what stage the shipment is in such as Planned, Complete, or Error along with any additional information on the shipment.