Documentation

JSONCargo Container & Vessel Tracking API gives you real-time shipment and vessel tracking data from the world's major shipping lines. This reference covers every endpoint, parameter, and response field.

Quick Start
Get your API key from the pricing page, then pass it as the x-api-key header in every request.

Authentication

All API requests must include your API key in the request header. You can obtain a key by subscribing to any plan on our pricing page - your key will arrive by email immediately after subscribing.

Header Parameter

x-api-key: YOUR_API_KEY

Shipping Line Compatibility

Container tracking is currently supported for the shipping lines listed below. Use the API Parameter value exactly as shown when specifying shipping_line in requests.

Shipping LineAlternate NameAPI Parameter
A.P. Moller - MaerskMaerskMAERSK
Hapag-LloydHapag-LloydHAPAG_LLOYD
Hyundai Merchant MarineHMMHMM
Ocean Network ExpressONEONE
Evergreen Marine CorpEvergreenEVERGREEN
Mediterranean Shipping CompanyMSCMSC
Compagnie Maritime d'Affretement
Compagnie Generale Maritime
CMA CGMCMA_CGM
COSCO SHIPPING Lines CoCoscoCOSCO
Zim Integrated Shipping ServicesZIMZIM
YangMing Marine Transport CorpYang MingYANG_MING
Pacific International LinesPILPIL

This list is not final. We are continuously working to expand shipping line support. If you have specific lines you'd like to see added, send your feedback to info@jsoncargo.com

API Usage

Each API request to our system counts as one API call, regardless of whether it's for a new or previously tracked container or vessel.

Per Request
1
API call per container or vessel lookup
Example Monthly
6,495
500 containers x 3/week x 4.33 weeks

Upon reaching your monthly limit, you can upgrade to a higher plan or wait until renewal. Check your current usage anytime via Endpoint 10: API Key Stats.

Common Errors

If you are experiencing issues with your API requests, check the following common causes before reaching out to support.

#
Incorrect Container Number
Make sure the container number includes the four-letter prefix (e.g. ABCD1234567).
≈
Incorrect Shipping Line Name
If tracking a third-party prefix, the shipping line must match the API parameter exactly.
✕
Missing, Invalid or Expired API Key
Verify your API key is included in the x-api-key header and is still active. A request without the header returns 401; a key that does not exist returns 403.
↯
Rate Limit Exceeded
A 429 means the key exceeded its per-minute or monthly quota (type=MINUTE or type=MONTHLY in the title). Retry after the limit window passes, and check usage via the API Key Stats endpoint.
⦸
Expired Subscription
Ensure your subscription is active and your payment method is up to date.
↻
Tracking Data Temporarily Unavailable
A 502 means tracking data for this container or Bill of Lading can't be returned right now. Retry later if the response says "retryable": true.

Error Format

Container and Bill of Lading errors carry three fields: code, a stable machine-readable value to build your logic on; title, a human-readable message; and retryable, which is true if the same request may succeed later and false if it will fail the same way until the input changes. Apart from invalid_request, each code always returns the same title, so match on code, not on the text.

JSON
{
  "error": {
    "code": "upstream_unavailable",
    "title": "Tracking data is temporarily unavailable. Please try again later.",
    "retryable": true
  }
}
codeHTTPRetryableMeaning
invalid_request400NoThe request is malformed: a missing or invalid parameter, or an unsupported shipping line. title explains what to fix.
unknown_resource404NoNo tracking data was found for this number and shipping line.
internal_error500YesAn unexpected error on our side.
content_unavailable502NoTracking data for this request is not available.
upstream_unavailable502YesTracking data is temporarily unavailable. Retry later.

API-key errors (401, 403, 429) can come from any endpoint and contain title only. Errors from the vessel, port and API key endpoints also contain title only.

Still experiencing issues? Contact us at support@jsoncargo.com

Endpoint 1: Get Container Details

Fetches details of a container using the tracking number.

GET https://api.jsoncargo.com/api/v1/containers/{tracking_number}/

Path Parameters

tracking_numberstringrequiredThe full container number including the 4-letter prefix (e.g. MEDU9091004).

Query Parameters

shipping_linestringrequiredShipping line for this tracking request, for example ONE, MAERSK, MSC, COSCO, YANG_MING. See the Shipping Lines table.

Responses

200 Container details retrieved successfully+
FieldType
container_idstring
container_typestring
container_statusstring
shipping_line_namestring
tarestring
shipped_fromstring
shipped_from_terminalstring
shipped_tostring
shipped_to_terminalstring
atd_origindatetime
eta_final_destinationdatetime
last_locationstring
last_location_terminalstring
next_locationstring
next_location_terminalstring
atd_last_locationdatetime
eta_next_destinationdatetime
timestamp_of_last_locationdatetime
last_movement_timestampdatetime
loading_portstring
discharging_portstring
last_vessel_namestring
last_voyage_numberstring
current_vessel_namestring
current_voyage_numberstring
last_updateddatetime
400 Invalid request+

invalid_request, not retryable. The only error whose title varies: it tells you what to fix. Values in {braces} are filled in from your request.

Whentitle
Tracking number is not 11 charactersInvalid tracking number {tracking_number}.
shipping_line missingMissing required parameter shipping_line. Please provide shipping_line to select the carrier for tracking number {tracking_number}.
Unknown shipping lineShipping line {shipping_line} for tracking number {tracking_number} is not recognized. Supported shipping_line values are: {list}.
Shipping line not enabledShipping line {shipping_line} for tracking number {tracking_number} is not supported. Supported shipping_line values are: {list}.
Any other invalid inputThe request is invalid.
Example
{
  "error": {
    "code": "invalid_request",
    "title": "Shipping line NOT_A_CARRIER for tracking number ABCD1234567 is not recognized. Supported shipping_line values are: MSC, ONE, COSCO, YANG_MING, EVERGREEN, CMA_CGM, MAERSK, HAPAG_LLOYD, HMM, ZIM, PIL.",
    "retryable": false
  }
}
401 Missing API key+

Returned by the API-key check, so the body has title only.

{
  "error": {
    "title": "API key header is missing."
  }
}
403 Invalid API key+

Returned by the API-key check, so the body has title only. {api_key} is the key you sent.

API key not found
{
  "error": {
    "title": "API key {api_key} does not exist."
  }
}
Key lacks admin permission
{
  "error": {
    "title": "API key {api_key} does not have admin permissions."
  }
}
404 Not found+

unknown_resource, not retryable: no tracking data was found for this container number and shipping line.

{
  "error": {
    "code": "unknown_resource",
    "title": "The requested resource was not found.",
    "retryable": false
  }
}
429 Rate limit exceeded+

The API key exceeded its per-minute or monthly quota. Returned by the API-key check, so the body has title only. Retry after the limit window passes.

Per-minute limit
{
  "error": {
    "title": "API key exceeded its rate limit (type=MINUTE)."
  }
}
Monthly limit
{
  "error": {
    "title": "API key exceeded its rate limit (type=MONTHLY)."
  }
}
500 Internal server error+

internal_error, retryable: an unexpected error on our side.

{
  "error": {
    "code": "internal_error",
    "title": "An unexpected error occurred.",
    "retryable": true
  }
}
502 Tracking data unavailable+

upstream_unavailable (retryable) or content_unavailable (not retryable): tracking data for this request is temporarily unavailable, or is not available for this shipment.

Temporarily unavailable (retryable)
{
  "error": {
    "code": "upstream_unavailable",
    "title": "Tracking data is temporarily unavailable. Please try again later.",
    "retryable": true
  }
}
Data not available (not retryable)
{
  "error": {
    "code": "content_unavailable",
    "title": "Data for this request is currently unavailable.",
    "retryable": false
  }
}

Response Sample

JSON
{
  "data": {
    "container_id": "MEDU9091004",
    "container_type": "40' HIGH CUBE REEFER",
    "container_status": "Empty received at CY",
    "shipping_line_name": "Mediterranean Shipping Company",
    "tare": null,
    "shipped_from": "GUAYAQUIL, EC",
    "shipped_from_terminal": "NAPORTEC TERMINAL - BANANAPUERTO ",
    "shipped_to": "TRIPOLI, LY",
    "shipped_to_terminal": "SPCO ( SOCIALIST PORTS CO UNDER MINISTRY OF TRANSPORT ) ",
    "atd_origin": "2024-07-09 00:00",
    "eta_final_destination": null,
    "last_location": "TRIPOLI, LY",
    "last_location_terminal": "SPCO ( SOCIALIST PORTS CO UNDER MINISTRY OF TRANSPORT ) ",
    "next_location": null,
    "next_location_terminal": null,
    "atd_last_location": "2024-08-11 00:00",
    "eta_next_destination": null,
    "timestamp_of_last_location": "2024-08-13 00:00",
    "last_movement_timestamp": "2024-08-17 00:00",
    "loading_port": "GUAYAQUIL, EC",
    "discharging_port": "TRIPOLI, LY",
    "last_vessel_name": "MSC LENA F",
    "last_voyage_number": "YF432A",
    "current_vessel_name": null,
    "current_voyage_number": null,
    "last_updated": "2024-09-09 18:34"
  }
}

Endpoint 2: Get Bill of Lading Containers

Fetches the container numbers associated with a Bill of Lading (B/L) number.

GET https://api.jsoncargo.com/api/v1/containers/bol/{bol_number}/

Path Parameters

bol_numberstringrequiredBill of Lading number. Alphanumeric characters only.

Query Parameters

shipping_linestringrequiredShipping line for this request, for example MAERSK, COSCO, CMA_CGM, YANG_MING. See the Shipping Lines table.

Responses

200 Bill of Lading containers retrieved successfully+
FieldType
bill_of_ladingstring
shipping_line_namestring
associated_containersinteger
associated_container_numbersarray of strings
last_updatedstring
400 Invalid request+

invalid_request, not retryable. The only error whose title varies: it tells you what to fix. Values in {braces} are filled in from your request.

Whentitle
B/L number has non-alphanumeric charactersBill of Lading {bol_number} is invalid. Must contain only alphanumeric characters.
shipping_line missingMissing required parameter shipping_line. Please provide shipping_line to select the carrier for Bill of Lading {bol_number}.
Unknown shipping lineShipping line {shipping_line} for Bill of Lading {bol_number} is not recognized. Supported shipping_line values are: {list}.
Shipping line not enabledShipping line {shipping_line} for Bill of Lading {bol_number} is not supported. Supported shipping_line values are: {list}.
Any other invalid inputThe request is invalid.
Example
{
  "error": {
    "code": "invalid_request",
    "title": "Missing required parameter shipping_line. Please provide shipping_line to select the carrier for Bill of Lading 6464150910.",
    "retryable": false
  }
}
401 Missing API key+

Returned by the API-key check, so the body has title only.

{
  "error": {
    "title": "API key header is missing."
  }
}
403 Invalid API key+

Returned by the API-key check, so the body has title only. {api_key} is the key you sent.

API key not found
{
  "error": {
    "title": "API key {api_key} does not exist."
  }
}
Key lacks admin permission
{
  "error": {
    "title": "API key {api_key} does not have admin permissions."
  }
}
404 Not found+

unknown_resource, not retryable: no data was found for this Bill of Lading number and shipping line.

{
  "error": {
    "code": "unknown_resource",
    "title": "The requested resource was not found.",
    "retryable": false
  }
}
429 Rate limit exceeded+

The API key exceeded its per-minute or monthly quota. Returned by the API-key check, so the body has title only. Retry after the limit window passes.

Per-minute limit
{
  "error": {
    "title": "API key exceeded its rate limit (type=MINUTE)."
  }
}
Monthly limit
{
  "error": {
    "title": "API key exceeded its rate limit (type=MONTHLY)."
  }
}
500 Internal server error+

internal_error, retryable: an unexpected error on our side.

{
  "error": {
    "code": "internal_error",
    "title": "An unexpected error occurred.",
    "retryable": true
  }
}
502 Tracking data unavailable+

upstream_unavailable (retryable) or content_unavailable (not retryable): tracking data for this request is temporarily unavailable, or is not available for this shipment.

Temporarily unavailable (retryable)
{
  "error": {
    "code": "upstream_unavailable",
    "title": "Tracking data is temporarily unavailable. Please try again later.",
    "retryable": true
  }
}
Data not available (not retryable)
{
  "error": {
    "code": "content_unavailable",
    "title": "Data for this request is currently unavailable.",
    "retryable": false
  }
}

Response Sample

JSON
{
  "data": {
    "bill_of_lading": "6464150910",
    "shipping_line_name": "COSCO SHIPPING Lines Co",
    "associated_containers": 1,
    "associated_container_numbers": [
      "OOLU9372428"
    ],
    "last_updated": "2026-09-28 09:30"
  }
}

Endpoint 3: Get Basic Live Vessel Tracking Details

Fetches basic live position and status for a vessel using UUID, MMSI, or IMO as the identifier.

GET https://api.jsoncargo.com/api/v1/vessel/basic

Query Parameters

uuidstringone required
mmsistringone required
imostringone required

Responses

200 Basic vessel details retrieved successfully+
FieldType
uuidstring
namestring
mmsistring
imostring
enistring
country_isostring
typestring
type_specificstring
latnumber
lonnumber
speednumber
coursenumber
headingnumber
navigation_statusstring
destinationstring
last_position_epochinteger
last_position_UTCstring
eta_epochinteger
eta_UTCstring
400 Invalid request+
{
  "error": {
    "title": "Invalid request"
  }
}
404 Vessel not found+
{
  "error": {
    "title": "Vessel not found"
  }
}
429 Too many requests+
{
  "error": {
    "title": "Too many requests"
  }
}
500 Internal server error+
{
  "error": {
    "title": "Internal server error"
  }
}

Response Sample

JSON
{
  "data": {
    "uuid": "b8625b67-7142-cfd1-7b85-595cebfe4191",
    "name": "MAERSK CHENNAI",
    "mmsi": "566093000",
    "imo": "9525338",
    "eni": null,
    "country_iso": "SG",
    "type": "Cargo - Hazard A (Major)",
    "type_specific": "Container Ship",
    "lat": 5.51935,
    "lon": 0.02906167,
    "speed": 0.1,
    "course": 256,
    "heading": 144,
    "navigation_status": null,
    "destination": "CGPNR>GHTEM",
    "last_position_epoch": 1721842560,
    "last_position_UTC": "2024-07-24T17:36:00Z",
    "eta_epoch": 1721633940,
    "eta_UTC": "2024-07-22T07:39:00Z"
  }
}

Endpoint 4: Get Pro Live Vessel Tracking Details

Fetches pro details of a vessel using UUID, MMSI, or IMO: departure/arrival port details, draught, timezone, and more. All Basic fields plus the additional ones below.

GET https://api.jsoncargo.com/api/v1/vessel/pro

Accepts the same query parameters as Endpoint 3 (uuid, mmsi or imo). Returns all Basic fields plus:

Additional FieldType
current_draughtnumber
dest_port_uuidstring
dest_portstring
dest_port_unlocodestring
dep_port_uuidstring
dep_portstring
dep_port_unlocodestring
atd_epochinteger
atd_UTCstring
timezone_offset_secinteger
timezonestring

Responses

400 Invalid request+
{
  "error": {
    "title": "Invalid request"
  }
}
404 Vessel not found+
{
  "error": {
    "title": "Vessel not found"
  }
}
429 Too many requests+
{
  "error": {
    "title": "Too many requests"
  }
}
500 Internal server error+
{
  "error": {
    "title": "Internal server error"
  }
}

Response Sample

JSON
{
  "data": {
    "uuid": "b8625b67-7142-cfd1-7b85-595cebfe4191",
    "name": "MAERSK CHENNAI",
    "mmsi": "566093000",
    "imo": "9525338",
    "eni": null,
    "country_iso": "SG",
    "type": "Cargo - Hazard A (Major)",
    "type_specific": "Container Ship",
    "lat": 5.519612,
    "lon": 0.02949333,
    "speed": 0.1,
    "course": 133,
    "heading": 161,
    "current_draught": 12.9,
    "navigation_status": null,
    "destination": "CGPNR>GHTEM",
    "dest_port_uuid": "4e16eec7-c821-423f-7a61-31ca9cdd4601",
    "dest_port": "TEMA",
    "dest_port_unlocode": "GHTEM",
    "dep_port_uuid": "11ccc7a1-cb91-bfd8-fefd-520b892be1da",
    "dep_port": "POINTE NOIRE",
    "dep_port_unlocode": "CGPNR",
    "last_position_epoch": 1721925300,
    "last_position_UTC": "2024-07-25T16:35:00Z",
    "atd_epoch": 1721391180,
    "atd_UTC": "2024-07-19T12:13:00Z",
    "eta_epoch": 1721633940,
    "eta_UTC": "2024-07-22T07:39:00Z",
    "timezone_offset_sec": 0,
    "timezone": "GMT"
  }
}

Endpoint 5: Get Bulk Live Vessel Tracking Details

Fetches details of up to 100 vessels in a single request using their identifiers (UUID, MMSI, or IMO).

GET https://api.jsoncargo.com/api/v1/vessel/bulk

Query Parameters

Repeat the parameter once per vessel, for example ?imo=9525338&imo=9249403 (up to 100 vessels). Returns data as an array of vessel objects with the same fields as Endpoint 3.

uuidarray of stringsone required
mmsiarray of stringsone required
imoarray of stringsone required

Responses

400 Invalid request+
{
  "error": {
    "title": "Invalid request"
  }
}
404 Vessel not found+
{
  "error": {
    "title": "Vessel not found"
  }
}
429 Too many requests+
{
  "error": {
    "title": "Too many requests"
  }
}
500 Internal server error+
{
  "error": {
    "title": "Internal server error"
  }
}

Response Sample

JSON
{
  "data": [
    {
      "uuid": "b8625b67-7142-cfd1-7b85-595cebfe4191",
      "name": "MAERSK CHENNAI",
      "mmsi": "566093000",
      "imo": "9525338",
      "eni": null,
      "country_iso": "SG",
      "type": "Cargo - Hazard A (Major)",
      "type_specific": "Container Ship",
      "lat": 5.519552,
      "lon": 0.0297,
      "speed": 0,
      "course": 0,
      "heading": 169,
      "navigation_status": null,
      "destination": "CGPNR>GHT",
      "last_position_epoch": 1721927100,
      "last_position_UTC": "2024-07-25T17:05:00Z",
      "eta_epoch": null,
      "eta_UTC": null
    },
    {
      "uuid": "17959a4c-f5a9-ed71-1a42-5bfab00670ef",
      "name": "GARGANO",
      "mmsi": "235362000",
      "imo": "9249403",
      "eni": null,
      "country_iso": "GB",
      "type": "Other",
      "type_specific": "Supply Vessel",
      "lat": 54.01164,
      "lon": 6.747243,
      "speed": 0,
      "course": 218,
      "heading": 269,
      "navigation_status": null,
      "destination": "RWE OWF",
      "last_position_epoch": 1721927100,
      "last_position_UTC": "2024-07-25T17:05:00Z",
      "eta_epoch": null,
      "eta_UTC": null
    }
  ]
}

Endpoint 6: Vessel Finder API

Fetches static ship data. Search and filter vessels by name, type, flag state, tonnage, dimensions, and build year.

GET https://api.jsoncargo.com/api/v1/vessel/finder

Query Parameters

ParameterType
namestring
fuzzyinteger
typestring
type_specificstring
country_isostring
gross_tonnage_min / gross_tonnage_maxinteger
deadweight_min / deadweight_maxinteger
length_min / length_maxnumber
breadth_min / breadth_maxnumber
year_built_min / year_built_maxinteger
nextstring

Results are paged. The response includes meta.next; pass it as next to fetch the following page. It is null on the last page.

Responses

400 Invalid request+
{
  "error": {
    "title": "Invalid request"
  }
}
404 Vessel not found+
{
  "error": {
    "title": "Vessel not found"
  }
}
429 Too many requests+
{
  "error": {
    "title": "Too many requests"
  }
}
500 Internal server error+
{
  "error": {
    "title": "Internal server error"
  }
}

Response Sample

JSON
{
  "data": [
    {
      "uuid": "335087a4-d70f-58ba-7e51-d8c0e26f069c",
      "name": "ERIC",
      "name_ais": "ERIC",
      "mmsi": "244700187",
      "imo": null,
      "eni": "2000604",
      "country_iso": "NL",
      "country_name": "Netherlands",
      "callsign": "PH5504",
      "type": "Tug",
      "type_specific": "Inland, Passenger Ship without Accommodation",
      "gross_tonnage": null,
      "deadweight": null,
      "teu": null,
      "liquid_gas": null,
      "length": 19.3,
      "breadth": 3.2,
      "draught_avg": null,
      "draught_max": null,
      "speed_avg": 6.7,
      "speed_max": 9,
      "year_built": null,
      "is_navaid": false,
      "home_port": null
    }
  ],
  "meta": {
    "next": null
  }
}

Endpoint 7: Vessel Specs Details API

Fetch static technical specifications for a vessel by UUID, MMSI, or IMO.

GET https://api.jsoncargo.com/api/v1/vessel/specs

Query Parameters

Provide one of uuid, mmsi or imo.

uuidstringone required
mmsistringone required
imostringone required

Responses

400 Invalid request+
{
  "error": {
    "title": "Invalid request"
  }
}
404 Vessel not found+
{
  "error": {
    "title": "Vessel not found"
  }
}
429 Too many requests+
{
  "error": {
    "title": "Too many requests"
  }
}
500 Internal server error+
{
  "error": {
    "title": "Internal server error"
  }
}

Response Sample

JSON
{
  "data": {
    "uuid": "b8625b67-7142-cfd1-7b85-595cebfe4191",
    "name": "MAERSK CHENNAI",
    "name_ais": "MAERSK CHENNAI",
    "mmsi": "566093000",
    "imo": "9525338",
    "eni": null,
    "country_iso": "SG",
    "country_name": "Singapore",
    "callsign": "9V9409",
    "type": "Cargo - Hazard A (Major)",
    "type_specific": "Container Ship",
    "gross_tonnage": 50869,
    "deadweight": 68898,
    "teu": "4500",
    "liquid_gas": null,
    "length": 249.12,
    "breadth": 37.4,
    "draught_avg": 10.021295387634936,
    "draught_max": 14.2,
    "speed_avg": 7.4,
    "speed_max": 20,
    "year_built": "2011",
    "is_navaid": false,
    "home_port": "SINGAPORE"
  }
}

Endpoint 8: Port Finder

Fetches port details by coordinates and radius, name, country code, or port type. At least one parameter must be provided.

GET https://api.jsoncargo.com/api/v1/port/find

Query Parameters

ParameterType
latnumber
lonnumber
radiusnumber
namestring
country_isostring
port_typestring
fuzzyinteger

Responses

400 Invalid request+
{
  "error": {
    "title": "Invalid request"
  }
}
404 Port not found+
{
  "error": {
    "title": "Port not found"
  }
}
429 Too many requests+
{
  "error": {
    "title": "Too many requests"
  }
}
500 Internal server error+
{
  "error": {
    "title": "Internal server error"
  }
}

Response Sample

JSON
{
  "data": [
    {
      "port_name": "LONDON",
      "port_code": null,
      "country": null,
      "lat": 51.49743,
      "lon": -0.04960075,
      "port_type": "Port",
      "size": null,
      "area": null,
      "city": null,
      "unlocode": "GBLON"
    },
    {
      "port_name": "NEW LONDON",
      "port_code": null,
      "country": null,
      "lat": 41.35305,
      "lon": -72.08705,
      "port_type": "Port",
      "size": null,
      "area": null,
      "city": null,
      "unlocode": "USNED"
    }
  ]
}

Endpoint 9: Terminal Finder API

Retrieve terminal details using a UN/LOCODE.

GET https://api.jsoncargo.com/api/v1/terminal/

Query Parameters

unlocodestringrequiredMinimum 2 characters. UN/LOCODE of the port (e.g. CNCQI).
page / limitstringoptional

Response Sample

JSON
{
    "data": [{
        "unlocode": "CNCQI",
        "alt_unlocode": "CNCHQ",
        "code": "CUNTAN",
        "terminal_name": "CUNTAN TERMINAL",
        "company_name": "CHONGQING INTERNATIONAL CONTAINER TERMINAL CO., LTD.",
        "lat": "29.618056",
        "lon": "106.591667",
        "url": "http://www.cqgj.com.cn/",
        "address": "No. 306, Hai'er Road, Jiangbei District, Chongqing, China"
    }]
}

Endpoint 10: Get API Key Usage Stats

Check your current plan, total requests, requests used, and requests remaining.

GET https://api.jsoncargo.com/api/v1/api_key/stats

No query parameters required. The response is based on the API key provided in the request header.

Responses

404 API key stats not found+
{
  "error": {
    "title": "API key stats not found"
  }
}
429 Too many requests+
{
  "error": {
    "title": "Too many requests"
  }
}
500 Internal server error+
{
  "error": {
    "title": "Internal server error"
  }
}

Response Sample

JSON
{
  "data": {
    "plan": "MARINER",
    "requests_total": 10000,
    "requests_made": 6,
    "requests_available": 9994
  }
}

Code Examples

The examples below call the Get Container Details endpoint for container MEDU9091004 at MSC. The same pattern applies to all endpoints.

cURL
curl --location 'https://api.jsoncargo.com/api/v1/containers/MEDU9091004/?shipping_line=MSC' \
  --header 'x-api-key: YOUR_API_KEY'
const axios = require('axios');
axios.get('https://api.jsoncargo.com/api/v1/containers/MEDU9091004/?shipping_line=MSC', {
  headers: { 'x-api-key': 'YOUR_API_KEY' }
}).then(res => console.log(res.data));
import requests
response = requests.get(
  'https://api.jsoncargo.com/api/v1/containers/MEDU9091004/?shipping_line=MSC',
  headers={'x-api-key': 'YOUR_API_KEY'}
)
print(response.json())
package main
import ("fmt"; "io"; "net/http")
func main() {
  req, _ := http.NewRequest("GET", "https://api.jsoncargo.com/api/v1/containers/MEDU9091004/?shipping_line=MSC", nil)
  req.Header.Add("x-api-key", "YOUR_API_KEY")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
<?php
$curl = curl_init();
curl_setopt_array($curl, [
  CURLOPT_URL => 'https://api.jsoncargo.com/api/v1/containers/MEDU9091004/?shipping_line=MSC',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['x-api-key: YOUR_API_KEY'],
]);
echo curl_exec($curl);
curl_close($curl);
require "uri"; require "net/http"
url = URI("https://api.jsoncargo.com/api/v1/containers/MEDU9091004/?shipping_line=MSC")
req = Net::HTTP::Get.new(url)
req["x-api-key"] = "YOUR_API_KEY"
puts Net::HTTP.start(url.host){ |h| h.request(req) }.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
  .url("https://api.jsoncargo.com/api/v1/containers/MEDU9091004/?shipping_line=MSC")
  .addHeader("x-api-key", "YOUR_API_KEY")
  .build();
System.out.println(client.newCall(request).execute().body().string());

Need Help or Have Questions?

If you need help or have questions about the API, our team is ready to assist.

🛠
Technical Support
support@jsoncargo.com
💬
General Inquiries
info@jsoncargo.com