How to fix API errors

Are you facing some troubles with API? Take a look here!

In case you get some errors during API use try to consult the following lines to solve them.

Let's start! 

 

From Integrations > API > View API Errors, it's possible to consult all the history of errors faced. This keeps track of your NOK calls and their relative error details:


​ 

What does Status 1 and 2 mean in my Shipping API response?

If you already tried to make our Shipping API call and you saw "Status": "1" or "Status": "2" in the response, here is what they mean!

  • "Status": "1" means that the call gave a positive response, therefore the label is correctly generated.

  • "Status": "2" indicates instead that the call was sent out, but the response was negative, meaning the shipping label wasn't created. You'll be able to see an error message at the bottom of the response or through the View API Errors button in Integration > API.

 

What can I do if I'm facing some issues closing my orders via API?

Are you trying to close your orders via API but you receive an error message?

In this case is possible that your Carrier hasn't been enabled to close via API yet.

You can manually proceed with the End of the Day from Shipping Labels section.

 

Why my UploadPaperlessDocumentation API call didn't attach to my label?

If you tried to attach the Paperless Documentation to your order but you faced some issues, don't panic!

In order for UploadPaperlessDocumentation API call to be successful, please do it the same day as Ship Call, better if right before it.

 

Can I add a surcharge to my shipments via API?

In case you're using API, it's not possible to add a surcharge, it can only be done if you're using a plugin.

In particular, it's necessary to add the surcharge on your own rates shown after making the Get Rates API call (therefore, in the Get Rates response).

 

How can I create labels via API without getting rates?

If you decide to directly ship via API with a Carrier including multiple services in one configuration, please make sure to employ a proper service code based on the sender and recipient address. A wrong mapping may cause wrong shipments routing.

You can retrieve the right "CarrierService" by creating a manual shipment or using our GetRates API on the API Console at least once for each shipment type (such as domestic, EU, international, return shipment).

 

"Your request contains malicious code"

If you receive this error, check if your item description contains the string file (...) , for example "nail file (1x)".

In that case, make sure to modify it by deleting either the word "file" or the brackets.

Since the description has the combination file (...), the XSS thinks this is a malicious XSS function and stops the code, it's the standard PHP check.

 

"Error": "Invalid Input Data"

If you receive this error referring to Input Data you should verify to have included the correct information in all the fields.

 

"Message": "Cannot book pickup, pickup email not set"

In this case Pickup Email field hasn't been filled in your Carrier's profile.
Add the email and try again.

 

500 Internal Server Error - try again later

Even though the labels might get correctly created, the shipping request sometimes ends in a timeout, therefore the response is 500 and not 200 as it should be.

To get around this problem, we suggest to use the API call Ship put the Async parameter as true (in this way, the request should never timeout). Set as true, you should retrive the label with the GetLabelURL API call or with Order Shipped Events Webhook. 

 

Too many duplicates for this Transaction ID. Please use the Edit API call

If you encounter this error, increase your timeout to at least 101 seconds. This adjustment helps resolve issues related to missing responses from the API server.