---
title: Get Containers
slug: get-containers
icon: 🔍
createdAt: 2022-08-17T10:30:14.000Z
---

This API enables users to track different details of the cargo that the particular user has subscribed. Furthermore, users can also retrieve filtered cargo details of specific container\_number or mbl\_number  using the query parameters.

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://tnt-api.rpalabs.io/api/v1/track_and_trace/ocean/containers",
  "name": "Get Container",
  "method": "GET",
  "request": {
    "pathParameters": [],
    "queryParameters": [
      {
        "kind": "optional",
        "name": "container",
        "type": "String",
        "description": "filter the query and retrive the data having specific container_number, shows empty list if not found"
      },
      {
        "kind": "optional",
        "name": "mbl",
        "type": "string",
        "description": "filter the query and retrive the data having specific mbl_number, shows empty list if not found"
      }
    ],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Authorization",
        "type": "string",
        "children": [],
        "description": "Bearer access token from login api"
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "rZjAwUKvoxfExaTglEwZe",
        "code": "{\n    \"containers\": [\n        {\n            \"tracking_events\": [\n                {\n                    \"event_location\": \"CONSTANTA, RO\",\n                    \"vessel_name\": \"\",\n                    \"event_location_code\": \"ROCND\",\n                    \"voyage_number\": \"\",\n                    \"is_estimated\": false,\n                    \"event_description\": \"Export received at CY\",\n                    \"event_time\": \"2021/12/15 0:00:00\"\n                },\n                {\n                    \"event_location\": \"CONSTANTA, RO\",\n                    \"vessel_name\": \"MSC NILGUN\",\n                    \"event_location_code\": \"ROCND\",\n                    \"voyage_number\": \"AC150R\",\n                    \"is_estimated\": false,\n                    \"event_description\": \"Export Loaded on Vessel\",\n                    \"event_time\": \"2022/1/4 0:00:00\"\n                },\n                {\n                    \"event_location\": \"GIOIA TAURO, IT\",\n                    \"vessel_name\": \"MSC NILGUN\",\n                    \"event_location_code\": \"ITGIT\",\n                    \"voyage_number\": \"AC203A\",\n                    \"is_estimated\": false,\n                    \"event_description\": \"Full Transshipment Discharged\",\n                    \"event_time\": \"2022/1/24 0:00:00\"\n                },\n                {\n                    \"event_location\": \"GIOIA TAURO, IT\",\n                    \"vessel_name\": \"MSC NILGUN\",\n                    \"event_location_code\": \"ITGIT\",\n                    \"voyage_number\": \"AC203A\",\n                    \"is_estimated\": true,\n                    \"event_description\": \"BOARD ARRIVE\",\n                    \"event_time\": \"2022/1/24 0:00:00\"\n                },\n                {\n                    \"event_location\": \"GIOIA TAURO, IT\",\n                    \"vessel_name\": \"MSC NILGUN\",\n                    \"event_location_code\": \"ITGIT\",\n                    \"voyage_number\": \"AC203A\",\n                    \"is_estimated\": false,\n                    \"event_description\": \"BOARD ARRIVE\",\n                    \"event_time\": \"2022/1/24 0:00:00\"\n                },\n                {\n                    \"event_location\": \"GIOIA TAURO, IT\",\n                    \"vessel_name\": \"MSC JUDITH\",\n                    \"event_location_code\": \"ITGIT\",\n                    \"voyage_number\": \"XA207A\",\n                    \"is_estimated\": false,\n                    \"event_description\": \"Full Transshipment Loaded\",\n                    \"event_time\": \"2022/2/15 0:00:00\"\n                },\n                {\n                    \"event_location\": \"GIOIA TAURO, IT\",\n                    \"vessel_name\": \"MSC JUDITH\",\n                    \"event_location_code\": \"ITGIT\",\n                    \"voyage_number\": \"207A\",\n                    \"is_estimated\": true,\n                    \"event_description\": \"DEPARTURE FROM LOAD PORT\",\n                    \"event_time\": \"2022/2/15 0:00:00\"\n                },\n                {\n                    \"event_location\": \"GIOIA TAURO, IT\",\n                    \"vessel_name\": \"MSC JUDITH\",\n                    \"event_location_code\": \"ITGIT\",\n                    \"voyage_number\": \"207A\",\n                    \"is_estimated\": false,\n                    \"event_description\": \"DEPARTURE FROM LOAD PORT\",\n                    \"event_time\": \"2022/2/15 0:00:00\"\n                },\n                {\n                    \"event_location\": \"SAVANNAH, US\",\n                    \"vessel_name\": \"MSC JUDITH\",\n                    \"event_location_code\": \"USSAV\",\n                    \"voyage_number\": \"207A\",\n                    \"is_estimated\": false,\n                    \"event_description\": \"Carrier release\",\n                    \"event_time\": \"2022/2/25 0:00:00\"\n                },\n                {\n                    \"event_location\": \"SAVANNAH, US\",\n                    \"vessel_name\": \"MSC JUDITH\",\n                    \"event_location_code\": \"USSAV\",\n                    \"voyage_number\": \"207A\",\n                    \"is_estimated\": false,\n                    \"event_description\": \"Import Discharged from Vessel\",\n                    \"event_time\": \"2022/3/8 0:00:00\"\n                },\n                {\n                    \"event_location\": \"SAVANNAH, US\",\n                    \"vessel_name\": \"\",\n                    \"event_location_code\": \"USSAV\",\n                    \"voyage_number\": \"\",\n                    \"is_estimated\": false,\n                    \"event_description\": \"Import Loaded on Rail\",\n                    \"event_time\": \"2022/3/9 0:00:00\"\n                },\n                {\n                    \"event_location\": \"SAVANNAH, US\",\n                    \"vessel_name\": \"\",\n                    \"event_location_code\": \"USSAV\",\n                    \"voyage_number\": \"\",\n                    \"is_estimated\": false,\n                    \"event_description\": \"Import Rail Departure\",\n                    \"event_time\": \"2022/3/12 0:00:00\"\n                },\n                {\n                    \"event_location\": \"NASHVILLE, US\",\n                    \"vessel_name\": \"\",\n                    \"event_location_code\": \"USBNA\",\n                    \"voyage_number\": \"\",\n                    \"is_estimated\": true,\n                    \"event_description\": \"Import estimated to arrive at ramp\",\n                    \"event_time\": \"2022/3/14 0:00:00\"\n                },\n                {\n                    \"event_location\": \"NASHVILLE, US\",\n                    \"vessel_name\": \"\",\n                    \"event_location_code\": \"USBNA\",\n                    \"voyage_number\": \"\",\n                    \"is_estimated\": false,\n                    \"event_description\": \"Import Arrived at Destination Rail Ramp\",\n                    \"event_time\": \"2022/3/15 0:00:00\"\n                },\n                {\n                    \"event_location\": \"NASHVILLE, US\",\n                    \"vessel_name\": \"\",\n                    \"event_location_code\": \"USBNA\",\n                    \"voyage_number\": \"\",\n                    \"is_estimated\": false,\n                    \"event_description\": \"Full Available for Delivery\",\n                    \"event_time\": \"2022/3/16 0:00:00\"\n                },\n                {\n                    \"event_location\": \"NASHVILLE, US\",\n                    \"vessel_name\": \"\",\n                    \"event_location_code\": \"USBNA\",\n                    \"voyage_number\": \"\",\n                    \"is_estimated\": false,\n                    \"event_description\": \"Import Unloaded from Rail\",\n                    \"event_time\": \"2022/3/16 0:00:00\"\n                },\n                {\n                    \"event_location\": \"NASHVILLE, US\",\n                    \"vessel_name\": \"\",\n                    \"event_location_code\": \"USBNA\",\n                    \"voyage_number\": \"\",\n                    \"is_estimated\": false,\n                    \"event_description\": \" Free Time to Expire\",\n                    \"event_time\": \"2022/3/18 0:00:00\"\n                },\n                {\n                    \"event_location\": \"NASHVILLE, US\",\n                    \"vessel_name\": \"\",\n                    \"event_location_code\": \"USBNA\",\n                    \"voyage_number\": \"\",\n                    \"is_estimated\": false,\n                    \"event_description\": \"Import to consignee\",\n                    \"event_time\": \"2022/4/1 0:00:00\"\n                },\n                {\n                    \"event_location\": \"PORTLAND, US\",\n                    \"vessel_name\": \"\",\n                    \"event_location_code\": \"USPDX\",\n                    \"voyage_number\": \"\",\n                    \"is_estimated\": false,\n                    \"event_description\": \"Full Delivered to Consignee\",\n                    \"event_time\": \"2022/4/9 0:00:00\"\n                },\n                {\n                    \"event_location\": \"NASHVILLE, US\",\n                    \"vessel_name\": \"\",\n                    \"event_location_code\": \"USBNA\",\n                    \"voyage_number\": \"\",\n                    \"is_estimated\": false,\n                    \"event_description\": \"Empty received at CY\",\n                    \"event_time\": \"2022/4/9 0:00:00\"\n                }\n            ],\n            \"vessel\": {\n                \"vessel_name\": \"MSC JUDITH\",\n                \"carrier_code\": \"MEDU\",\n                \"voyage_number\": \"207A\"\n            },\n            \"id\": \"62bc3e889efa9e2d96aa2fd9\",\n            \"updated_at\": \"2022/3/29 23:31:48\",\n            \"mbl_number\": \"MEDURO431163\",\n            \"container_number\": \"MSMU6202330\",\n            \"tracking_finished_time\": \"2022/4/13 7:39:26\",\n            \"port\": {\n                \"port_of_discharge\": \"SAVANNAH, US\",\n                \"place_of_delivery\": \"PORTLAND, US\",\n                \"place_of_receipt\": \"SLATINA, RO\",\n                \"place_of_delivery_code\": \"USPDX\",\n                \"port_of_discharge_code\": \"USSAV\",\n                \"port_of_loading\": \"CONSTANTA, RO\",\n                \"place_of_receipt_code\": \"ROSLA\",\n                \"port_of_loading_code\": \"ROCND\"\n            }\n        }\n    ]\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "rZjAwUKvoxfExaTglEwZe"
  },
  "examples": {
    "languages": [
      {
        "id": "p8LW7RAoyklyDIIA0VdeS",
        "code": "curl --location --request GET 'https://tnt-api.rpalabs.io/api/v1/track_and_trace/ocean/containers?container=String&mbl=string' \\\n--header 'Accept: application/json'",
        "language": "curl",
        "customLabel": ""
      },
      {
        "id": "-y--4_itnBFzBz5d-TkEI",
        "code": "var request = require('request');\nvar options = {\n   'method': 'GET',\n   'url': 'https://tnt-api.rpalabs.io/api/v1/track_and_trace/ocean/containers?container=String&mbl=string',\n   'headers': {\n      'Accept': 'application/json'\n   }\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "language": "nodejs",
        "customLabel": ""
      },
      {
        "id": "nILNS5ZnpkpeCVjiZlTEf",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://tnt-api.rpalabs.io/api/v1/track_and_trace/ocean/containers?container=String&mbl=string\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "language": "javascript",
        "customLabel": ""
      },
      {
        "id": "mzyl-Ey5VambGEgORHAXE",
        "code": "import http.client\n\nconn = http.client.HTTPSConnection(\"tnt-api.rpalabs.io\")\npayload = ''\nheaders = {\n   'Accept': 'application/json'\n}\nconn.request(\"GET\", \"/api/v1/track_and_trace/ocean/containers?container=String&mbl=string\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))",
        "language": "python",
        "customLabel": ""
      },
      {
        "id": "xzpLFtmNISOBWDhuhV8D6",
        "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://tnt-api.rpalabs.io/api/v1/track_and_trace/ocean/containers?container=String&mbl=string\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Accept\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n",
        "language": "ruby",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "p8LW7RAoyklyDIIA0VdeS"
  },
  "description": "Get container details by container_number and mbl_number",
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  }
}
```
:::

:::hint{type="danger"}
See the [Error Handling page](https://developers.rpalabs.io/error-handling) for troubleshooting any errors.
:::

### ✉️ Need some help?

If you encounter a problem or require assistance, please contact our support team with details regarding your request at [support@rippey.ai.](support@rippey.ai) A representative will connect with you soon. 😊
