---
updatedAt: 2026-05-27T11:57:12.000Z
agentTools:
  projectIndex: https://developers.opentrack.co/llms.txt
---

# Get Container Route

Retrieve the complete route and journey segments for a tracked container, including origin-to-destination path with all intermediate points.

The response includes:
- Current container location and status
- Journey segments (origin, ocean, destination)
- Transportation modes for each segment
- Actual vs estimated route classifications
- GeoJSON formatted location points and route paths

Each route segment contains from/to location points and the transportation path between them, allowing you to visualize the complete container journey on a map.


# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "servers": [
    {
      "description": "Production",
      "url": "https://api.opentrack.co"
    }
  ],
  "tags": [
    {
      "name": "/containers",
      "description": "Track containers."
    }
  ],
  "info": {
    "version": "v1",
    "title": "OpenTrack API",
    "contact": {
      "email": "support@opentrack.co"
    },
    "x-logo": {
      "url": "https://s3-us-west-1.amazonaws.com/opentrack.co/images/opentrack_logo_dark.png",
      "altText": "OpenTrack Logo"
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/v1/routes/{containerId}": {
      "get": {
        "summary": "Get Container Route",
        "description": "Retrieve the complete route and journey segments for a tracked container, including origin-to-destination path with all intermediate points.\n\nThe response includes:\n- Current container location and status\n- Journey segments (origin, ocean, destination)\n- Transportation modes for each segment\n- Actual vs estimated route classifications\n- GeoJSON formatted location points and route paths\n\nEach route segment contains from/to location points and the transportation path between them, allowing you to visualize the complete container journey on a map.\n",
        "operationId": "getContainerRoute",
        "x-readme": {
          "explorer-enabled": false
        },
        "tags": [
          "/containers"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ContainerId"
          }
        ],
        "responses": {
          "200": {
            "description": "Container route retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ContainerRoute"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Container not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Usage Error - From Rate Limitation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "name": "Opentrack-API-Key",
        "in": "header"
      }
    },
    "parameters": {
      "ContainerId": {
        "name": "containerId",
        "in": "path",
        "required": true,
        "description": "The ID of the tracked container",
        "schema": {
          "type": "string"
        },
        "example": "FBLU0196600"
      }
    },
    "schemas": {
      "Position": {
        "required": [
          "coordinates"
        ],
        "properties": {
          "coordinates": {
            "$ref": "#/components/schemas/Point"
          }
        }
      },
      "Point": {
        "type": "object",
        "properties": {
          "latitude": {
            "type": "number",
            "minimum": -90,
            "maximum": 90,
            "example": 40.678858019
          },
          "longitude": {
            "type": "number",
            "minimum": -180,
            "maximum": 180,
            "example": -74.118213003
          }
        }
      },
      "Status": {
        "type": "string",
        "description": "The current status of the container.  Can either be a lifecycle milestone, or a status indicating that OpenTrack is still searching for information about the container. Click <a href=\"/docs/container-voyage-milestones\" target=\"_blank\">here</a> for more information",
        "enum": [
          "DISCOVERING",
          "DISCOVERED",
          "BOOKED",
          "NOT_FOUND",
          "EMPTY_OUTGATED",
          "FULL_INGATED_AT_ORIGIN_RAIL_FACILITY",
          "LOADED_ON_RAIL_AT_ORIGIN",
          "DEPARTED_ON_RAIL_FROM_ORIGIN",
          "ARRIVED_AT_ORIGIN_PORT_RAIL_FACILITY",
          "UNLOADED_FROM_RAIL_AT_ORIGIN_PORT",
          "FULL_INGATED",
          "LOADED_ON_BARGE_AT_ORIGIN",
          "BARGE_DEPARTED_FROM_ORIGIN",
          "BARGE_BERTHED_AT_ORIGIN_PORT",
          "DISCHARGED_FROM_BARGE_AT_ORIGIN_PORT",
          "LOADED",
          "VESSEL_DEPARTED",
          "VESSEL_ARRIVED_AT_TRANSSHIPMENT_PORT",
          "VESSEL_BERTHED_AT_TRANSSHIPMENT_PORT",
          "DISCHARGED_AT_TRANSSHIPMENT_PORT",
          "LOADED_AT_TRANSSHIPMENT_PORT",
          "VESSEL_DEPARTED_FROM_TRANSSHIPMENT_PORT",
          "VESSEL_ARRIVED",
          "VESSEL_BERTHED",
          "DISCHARGED",
          "LOADED_ON_BARGE_AT_DESTINATION_PORT",
          "BARGE_DEPARTED_FROM_DESTINATION_PORT",
          "BARGE_BERTHED_AT_DESTINATION",
          "DISCHARGED_FROM_BARGE_AT_DESTINATION",
          "AVAILABLE",
          "FULL_OUTGATED",
          "FULL_INGATED_TO_RAIL_FACILITY",
          "LOADED_ON_RAIL",
          "DEPARTED_ON_RAIL",
          "ARRIVED_AT_RAIL_FACILITY",
          "UNLOADED_FROM_RAIL",
          "AVAILABLE_AT_RAIL_FACILITY",
          "FULL_OUTGATED_FROM_RAIL_FACILITY",
          "FULL_INGATED_TO_OFFDOCK_FACILITY",
          "AVAILABLE_AT_OFFDOCK_FACILITY",
          "FULL_OUTGATED_FROM_OFFDOCK_FACILITY",
          "FULL_DROPPED_OFF_AT_TRUCKER_YARD",
          "FULL_PICKED_UP_FROM_TRUCKER_YARD",
          "DELIVERED",
          "EMPTY_READY_FOR_PICKUP",
          "EMPTY_PICKED_UP_FOR_RETURN",
          "EMPTY_DROPPED_OFF_AT_TRUCKER_YARD",
          "EMPTY_PICKED_UP_FROM_TRUCKER_YARD",
          "EMPTY_RETURNED"
        ],
        "example": "AVAILABLE"
      },
      "Error": {
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ContainerRoute": {
        "required": [
          "containerId",
          "masterBillId",
          "status",
          "route"
        ],
        "properties": {
          "containerId": {
            "type": "string",
            "description": "The container identifier",
            "example": "OPNT6530996"
          },
          "masterBillId": {
            "type": "string",
            "description": "The master bill of lading identifier",
            "example": "MBOL1234567890"
          },
          "lastKnownPosition": {
            "$ref": "#/components/schemas/Position",
            "description": "The last known coordinates of the container"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "route": {
            "type": "array",
            "description": "Array of route segments representing the container journey",
            "items": {
              "$ref": "#/components/schemas/RouteLeg"
            }
          }
        }
      },
      "RouteLeg": {
        "required": [
          "from",
          "to",
          "points",
          "segment",
          "modeOfTransport",
          "eventClassifierCode"
        ],
        "properties": {
          "from": {
            "$ref": "#/components/schemas/RouteLocation"
          },
          "to": {
            "$ref": "#/components/schemas/RouteLocation"
          },
          "points": {
            "$ref": "#/components/schemas/RouteGeometry"
          },
          "segment": {
            "type": "string",
            "description": "The segment of the journey this leg represents",
            "enum": [
              "origin",
              "ocean",
              "destination"
            ],
            "example": "ocean"
          },
          "modeOfTransport": {
            "$ref": "#/components/schemas/TransportMode"
          },
          "eventClassifierCode": {
            "$ref": "#/components/schemas/EventClassifier"
          }
        }
      },
      "RouteLocation": {
        "type": "object",
        "description": "GeoJSON Feature representing a location point on the route",
        "required": [
          "type",
          "geometry",
          "properties"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "Feature"
            ],
            "example": "Feature"
          },
          "geometry": {
            "type": "object",
            "required": [
              "type",
              "coordinates"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Point"
                ],
                "example": "Point"
              },
              "coordinates": {
                "type": "array",
                "description": "Longitude, latitude coordinates",
                "items": {
                  "type": "number"
                },
                "minItems": 2,
                "maxItems": 2,
                "example": [
                  -74.118213003,
                  40.678858019
                ]
              }
            }
          },
          "properties": {
            "$ref": "#/components/schemas/RouteProperties"
          }
        }
      },
      "RouteGeometry": {
        "type": "object",
        "description": "GeoJSON Feature representing the path geometry between two points",
        "required": [
          "type",
          "geometry"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "Feature"
            ],
            "example": "Feature"
          },
          "geometry": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "type",
                  "coordinates"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "LineString"
                    ],
                    "example": "LineString"
                  },
                  "coordinates": {
                    "type": "array",
                    "description": "Array of longitude, latitude coordinate pairs",
                    "example": [
                      [
                        119.38,
                        25.72
                      ],
                      [
                        119.67,
                        26.1
                      ]
                    ],
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "number"
                      },
                      "minItems": 2,
                      "maxItems": 2
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "type",
                  "coordinates"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "MultiLineString"
                    ],
                    "example": "MultiLineString"
                  },
                  "coordinates": {
                    "type": "array",
                    "description": "Array of LineString coordinate arrays",
                    "example": [
                      [
                        [
                          121.54,
                          29.86
                        ],
                        [
                          180,
                          45.7
                        ]
                      ],
                      [
                        [
                          -180,
                          45.7
                        ],
                        [
                          -122.34,
                          47.58
                        ]
                      ]
                    ],
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "number"
                        },
                        "minItems": 2,
                        "maxItems": 2
                      },
                      "minItems": 2
                    }
                  }
                }
              }
            ]
          },
          "properties": {
            "type": "object",
            "description": "Additional properties for the geometry (may be empty)",
            "example": {}
          }
        }
      },
      "RouteProperties": {
        "type": "object",
        "description": "Properties describing a route location - can contain location information, container information, or be empty",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the location or container identifier",
            "example": "NINGBO"
          },
          "state": {
            "type": "string",
            "description": "State or province of the location",
            "example": "Zhejiang"
          },
          "country": {
            "type": "string",
            "description": "Country of the location",
            "example": "China"
          },
          "city": {
            "type": "string",
            "description": "City of the location",
            "example": "Ningbo"
          },
          "timezone": {
            "type": "string",
            "description": "Timezone of the location",
            "example": "Asia/Shanghai"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "index": {
            "type": "integer",
            "description": "Index for ordered locations like rail sightings",
            "example": 1
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp",
            "example": "2024-10-27T10:00:00Z"
          }
        }
      },
      "TransportMode": {
        "type": "string",
        "description": "The mode of transportation for this route segment",
        "enum": [
          "VESSEL",
          "BARGE",
          "TRUCK",
          "RAIL"
        ],
        "example": "VESSEL"
      },
      "EventClassifier": {
        "type": "string",
        "description": "Classification of whether the route segment is based on actual or estimated data",
        "enum": [
          "ACT",
          "EST"
        ],
        "example": "ACT"
      }
    }
  }
}
```