This tables contains all the API requests with information about the URL, short description, type, typical response with the corresponding HTML status code
Categories | Requests | Summary | Type | Response | Code |
Login | /authentication/login | Create token | POST | Login token | 201 |
Container | /containers | Return all containers | GET | List of containers | 200 |
/containers/{containerId} | Return container by container_number | GET | Single container | 200 | |
Shipment | /shipments | Return all shipments | GET | List of shipments | 200 |
/shipments | Create new shipment | POST | Single shipment | 201 | |
/shipments/{shipmentId} | Return shipment by id | GET | Single shipment | 200 | |
/shipments/{shipmentId} | Update an existing shipment by id | PUT | 200 | ||
/shipments/{shipmentId} | Delete an existing shipment by id | DELETE | 200 | ||
Vessel | /vessels | Return all vessels | GET | List of vessels | 200 |
Locode | /locodes | Return all locodes | GET | List of locodes | 200 |
/locodes/{locodeId} | Return locode by id | GET | Single locode | 200 | |
Port | /ports | Return all ports | GET | List of ports | 200 |
/ports/{portId} | Return port by id | GET | Single port | 200 |
Invalid user_id or password will result in 400 response (bad request), which the following format.
The server could not understand the request due to invalid syntax.
{
"message": "401 Unauthorized",
"error_code":
}
Missing x-api-key results in 403 response (forbidden) with one property warped in the body shown here
The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401, the client’s identity is known to the server.
{
"message": "Forbidden"
}
Incorrect URL results in 404 response (not found) with two property warped in the json body shown here
The server can not find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 to hide the existence of a resource from an unauthorized client. This response code is probably the most famous one due to its frequent occurrence on the web.
{
"message": "The requested information was not found.",
"error_code": 1000
}