HTTP Errors
Searoutes' APIs follow the HTTP response status codes, which indicate whether a specific HTTP request has been successfully completed. Below a summary of the most common codes you'll find in our responses:
Code | Description |
---|---|
200 | OK. Everything worked as expected. |
400 | Bad Request. The request was unacceptable, often due to missing a required parameter. |
401 | Unauthorized. No valid API key provided. |
403 | Forbidden. The API key doesn't have permissions to perform the request. |
404 | Not Found. The requested resource doesn't exist. |
429 | Too Many Requests. Too many requests hit the API too quickly. We recommend an exponential backoff of your requests. |
500 , 502 , 503 , 504 | Server Errors. Something went wrong on Searoutes' end. |
API Error Codes
In case of Bad Requests (400 status code) and Not Found (404 status code) responses, an error code is returned in the response to give more details. These error codes are listed below and can be used to map custom error messages.
Error code | Description / message |
---|---|
1000 | Default error code when a ressource has not been found. |
1010 | Port with a given name has not been found. |
1020 | Route has not been found. |
1031 | Vessel with the given IMO has not been found. |
1032 | Vessel with the given name has not been found. |
1033 | Vessel Tracking info has not been found (real time position or ETA for instance) |
1040 | Location has not been found. |
1050 | Airport has not been found. |
1060 | Area has not been found. |
1071 | Carrier with the given SCAC has not been found. |
1072 | Carrier with the given ID has not been found. |
1080 | Rail region has not been found - from/to should be in the same region. |
1090 | Road region has not been found - from/to should be in the same region. |
1110 | Itinerary for the given parameters has not been found. |
1121 | Service with the given name has not been found. |
1122 | Service with the given ID has not been found. |
2000 | Default error code when an illegal argument has been passed. |
2001 | Default error when a parameter is missing. |
2002 | Parameter name must be given to search for a service. |
2003 | Either parameter SCAC or name must be given to search for a carrier. |
2010 | Unknown container size. |
2020 | Coordinates or locode is required. |
2030 | CO2 values for rail for the combination of parameters cannot be calculated. |
2040 | CO2 values for road for the combination of parameters cannot be calculated. |
2050 | CO2 for carrier cannot be calculated. |
2060 | Could not find appropriate size of truck. |
2070 | Illegal list of sizes. |
2080 | Inland waters CO2 can not be computed. |
2090 | Wrong value or format of date. |
2110 | Illegal vessel (invalid wrong type of vessel for instance) |
3000 | Default error code when a parameter is not valid. |
3010 | 'aircraftType' parameter is invalid. |
3020 | 'weight' parameter is invalid. |
3030 | 'loadCharacteristics' parameter is invalid. |
3040 | 'size' parameter is invalid. |
3050 | 'from' / 'to' is invalid. |
3060 | 'aircraftIATA' parameter is invalid. |
3070 | 'containerSize' parameter is invalid. |
3080 | 'fuel' parameter is invalid. |
3090 | 'carrierId' parameter is invalid. |
3100 | 'fromIATA' /' toIATA' parameter is invalid. |
3110 | 'fromLocode' / 'toLocode' parameter is invalid. |
3120 | 'country' parameter is invalid. |
3130 | 'postal' parameter is invalid. |
3140 | 'vesselImo' parameter is invalid. |
3150 | 'vesselName' parameter is invalid. |
3160 | Area name ('name' parameter) is invalid. |
3170 | 'nameOrLocode' path variable is invalid. |
3180 | 'nameOrLocodeOrIata' path variable is invalid. |
3190 | Coordinates have invalid format. |
3200 | 'volume' parameter is invalid. |
3210 | From and/or to are in a blocked area. |
3220 | locationType is invalid. |
3230 | From and/or to are in a forbidden area (military base for example). |
3240 | Illegal hash format. |
3250 | Illegal carrier scac. |
3260 | 'vesselType' parameter is invalid. |
3300 | 'containerSizeTypeCode' value is invalid. |
3310 | 'containerType' value is invalid. |
3320 | Invalid date format. |
3330 | Invalid combination of parameters for historical search. |
3340 | From and to locodes must be different. |
4000 | Default error code when the request is invalid (including parsing errors). |
4001 | Type is invalid. |
4002 | JSON parse error. |
5000 | Default error code when a service is not available. |
5010 | The geocoding service is unavailable. |
5020 | The AIS service is unavailable. |
5030 | The CO2 calculation service is unavailable |
5040 | The route calculation service is unavailable. |