Common API Error Responses

Common API Error Responses

MachShip does its best to return meaningful error messages when there is something wrong with the API calls.

If there is any error, MachShip will return a response that looks similar to the one below:

{  
   "object":null,
   "errors":[  
      {  
         "validationType":"Error",
         "memberNames":[  

         ],
         "errorMessage":"ConsignmentIds are required"
      }
   ]
}

 

Below is a list of common error messages:

Error Message (returned in the errorMessage field)

Error explanation
[Field Name](s) is/are requiredRequired field(s) are missing from the request
An unexpected error has occurred. The MachShip team has been notifiedCould be a provided value does not exist in MachShip
Unable to find [Entity Name] or you do not have accessThe given ID might exist in MachShip but the current user doesn't have access/privilege to see it
No [Entity Name] were foundCannot find an object by the given criteria
String is not a valid email addressEmail field is assigned an invalid email value
Cannot set both ReceiverAccountCode and ReceiverAccountIdOnly need to provide one of them
From/To Location is invalid. Check that the location ID that was entered is a valid Location IDLocation can be specified by either Location ID or a combination of Suburb and Post Code. When a Location ID is provided, it needs to be a valid one
From/To Location is invalid. Check that the suburb/postcode combination is correctLocation can be specified by either Location ID or a combination of Suburb and Post Code. When the latter is provided, it needs to be correct
No prices were foundNo available routes/prices found based on the request's data
Item quantity is required and must be greater than 0Any quantity field is required and it must be greater than 0
Newtonsoft.Json.JsonReaderException: After parsing a value an unexpected character was encountered...The JSON request is invalid
No Consignment IDs have been provided. Ensure that you are passing in an array of IDs

When the endpoints expect to get a list of Consignment IDs and there are none

Cannot manifest as some of these consignments are no longer unmanifested. Please review the selected unmanifested consignments and try againIt is a specific error when using Manifest endpoints
Dangerous Goods / No Dangerous Goods must be declaredWhen a company has DG enabled, every request to create a consignment will need to declare whether DGs are included or not
Route is not Dangerous Goods route yet Dangerous Goods have been declaredIt is when the service you choose doesn't allow DG but you have specified a DG in the item list
No routes were found using your carrier accounts No routes available for the selected carrier account(s)
    • Related Articles

    • Machship API Integration Workflow Guide

      The objective of this article is to give you a quick-start guide in working with our API to achieve common integration workflows, and how that affects which API endpoints you wish to use. API Authentication & Documentation Our API accepts and returns ...
    • API introduction and authentication

      Our API documentation is designed to be used as a guide for integrating your system directly into MachShip. This documentation describes the technical details of dealing with MachShip’s API layer, the security requirements and provides links to ...
    • RESTful API Integration and Set up

      RESTful API The restful API is a layer of a programming architecture that exposes a fixed, documented set of GET and POST methods that can be used to integrate advanced backend customer systems with MachShip. This layer of integration is the most ...
    • Creating Pending Consignments using the MachShip API

      One of the key efficiency targets for any business is to cut out manual tasks and automate as many processes as possible. In the Supply Chain and Logistics sector, a key blocker to this achievement is having prior knowledge of the final shipping ...
    • How to Generate and Revoke an API Token

      All requests to MachShip API require a valid API token. This token can be generated by logging in to MachShip and adding a new token to your user account. How to Create an API Token The My API Tokens option lets users create/generate their own API ...