# Error codes

> The Container Tracking API answers 200 with a message when the shipping line returns no tracking data, and 400, 405 or 500 when it cannot query the shipping line — requests ending in 400 or 500 are not charged.

The Container Tracking API reports two kinds of failure. A `200` response with an error message means the API reached the shipping line, but the shipping line returned no tracking data. A `400`, `405` or `500` response means the API could not query the shipping line at all.

## 200 responses without tracking data

A `200` response with one of these messages means the shipping line was detected and answered, but its answer contains no tracking data.

| HTTP status | Message                      | Meaning                                                                      |
| ----------- | ---------------------------- | ---------------------------------------------------------------------------- |
| `200`       | `SEALINE_HASNT_PROVIDE_INFO` | The request completed. The shipping line replied that nothing was found for this shipment. |
| `200`       | `SEALINE_CANCELED_SHIPMENT`  | The request completed. The shipment is cancelled.                            |

`SEALINE_HASNT_PROVIDE_INFO` is often temporary: retry the request later, most of these shipments return results once the shipping line publishes their data.

## 400, 405 and 500 responses

A `400`, `405` or `500` response means the API could not query the information from the shipping line. A request ending in one of these errors is not charged.

| HTTP status | Message                                                     | Meaning                                                                                                     |
| ----------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `400`       | `BAD_REQUEST`                                               | Required parameters are missing from the request.                                                           |
| `400`       | `Param: shipmentNumber cannot be null or empty`             | The `shipmentNumber` parameter is missing or empty.                                                         |
| `400`       | `WRONG_NUMBER`                                              | The container, bill of lading or booking number is invalid.                                                 |
| `400`       | `WRONG_SEALINE`                                             | The carrier SCAC code is invalid.                                                                           |
| `400`       | `WRONG_TYPE`                                                | The shipment type is invalid.                                                                               |
| `400`       | `Cannot convert value: {value} into request type: Boolean`  | A boolean parameter, such as `route` or `ais`, received a value other than `true` or `false`.               |
| `400`       | `SEALINE_NO_RESPONSE`                                       | An error occurred while executing the request: the shipping line is not responding.                         |
| `400`       | `SEALINE_TEMPORARY_DISABLED`                                | The shipping line is temporarily disabled. Try again later.                                                 |
| `400`       | `AUTO_CANT_DETECT_SEALINE`                                  | The shipping line could not be autodetected. Set the `sealine` parameter.                                   |
| `400`       | `AUTO_CANT_DETECT_TYPE`                                     | The shipment type could not be autodetected. Set the `shipmentType` parameter.                              |
| `400`       | `AUTO_CANT_FIND_INFO`                                       | No information could be autodetected for this number. Set both the `sealine` and `shipmentType` parameters. |
| `400`       | `SEALINE_NOT_SUPPORTED`                                     | The SCAC code is not supported. `GET /sealines` lists the supported shipping lines and their SCAC codes.    |
| `400`       | `TYPE_NOT_SUPPORTED_FOR_SEALINE`                            | The shipping line does not support this shipment type. `GET /sealines` lists the types each line supports.  |
| `400`       | `WRONG_PARAMETERS`                                          | The request parameters are invalid.                                                                         |
| `400`       | `SEALINE_UNDER_MAINTENANCE`                                 | The shipping line is under maintenance. Try again later.                                                    |
| `405`       | `Method POST is not allowed`                                | The endpoint was called with an HTTP method it does not accept.                                             |
| `500`       | `An unexpected error has occurred`                          | An unexpected error occurred on the server side.                                                            |

## React to an error

When a request fails, retry it, and set the optional parameters you know — the `sealine` SCAC code above all, then the `shipmentType`. The endpoint [`GET /sealines`](/en/api/container-tracking/reference/get-sea-line-details) returns the supported shipping lines, their SCAC codes and the shipment types each one accepts.

To test how an integration handles these errors, the free test shipments `ZZZZ0000001` (`AUTO_CANT_DETECT_SEALINE`) and `ZZZZ0000002` (`SEALINE_HASNT_PROVIDE_INFO`) return them on every request. The [Sandbox and test shipments](/en/api/container-tracking/guides/sandbox) page lists every test shipment.
