Home Template HTTP Status Codes

HTTP Status Codes

This tables contains all the API requests with information about the URL, short description, type, typical response with the corresponding HTML status code

Login/authentication/loginCreate tokenPOSTLogin token201
Container/containersReturn all containersGETList of containers200
/containers/{containerId}Return container by container_numberGETSingle container200
Shipment/shipmentsReturn all shipmentsGETList of shipments200
/shipmentsCreate new shipmentPOSTSingle shipment201
/shipments/{shipmentId}Return shipment by idGETSingle shipment200
/shipments/{shipmentId}Update an existing shipment by idPUT200
/shipments/{shipmentId}Delete an existing shipment by idDELETE200
Vessel/vesselsReturn all vesselsGETList of vessels200
Locode/locodesReturn all locodesGETList of locodes200
/locodes/{locodeId}Return locode by idGETSingle locode200
Port/portsReturn all portsGETList of ports200
/ports/{portId}Return port by idGETSingle port200

400 HTTP Status Codes

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",

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
Updated on 05 May, 2021