> ## Documentation Index
> Fetch the complete documentation index at: https://docs.primefreight.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a container

> Retrieve details of a specific container

# Get a container

Retrieves the details of a container by its ID. This endpoint returns comprehensive container information including location, status, equipment details, and related shipment data.

## Endpoint Overview

**GET** `/containers/{id}`

This endpoint retrieves detailed container information and associated relationships.

## Request Format

### Headers

| Header      | Type   | Required | Description                     |
| ----------- | ------ | -------- | ------------------------------- |
| `X-API-Key` | string | Yes      | Your API key for authentication |

### Path Parameters

| Parameter | Type   | Required | Description                            |
| --------- | ------ | -------- | -------------------------------------- |
| `id`      | string | Yes      | The unique identifier of the container |

### Query Parameters

| Parameter | Type   | Required | Description                                  |
| --------- | ------ | -------- | -------------------------------------------- |
| `include` | string | No       | Comma delimited list of relations to include |

## Response Format

### Success Response (200 OK)

```json theme={null}
{
  "data": {
    "id": "55a700e4-7005-45a9-92fd-1ff38641dbd9",
    "type": "container",
    "attributes": {
      "number": "CAIU7432986",
      "seal_number": null,
      "created_at": "2024-06-26T15:05:21Z",
      "ref_numbers": [],
      "pod_arrived_at": null,
      "pod_discharged_at": "2024-06-22T04:00:00Z",
      "final_destination_full_out_at": null,
      "holds_at_pod_terminal": [],
      "available_for_pickup": true,
      "equipment_type": "dry",
      "equipment_length": 40,
      "equipment_height": "high_cube",
      "weight_in_lbs": null,
      "pod_full_out_at": null,
      "empty_terminated_at": null,
      "terminal_checked_at": "2024-06-26T17:51:12Z",
      "fees_at_pod_terminal": [],
      "pickup_lfd": "2024-07-07T04:00:00Z",
      "pickup_appointment_at": null,
      "pod_full_out_chassis_number": null,
      "location_at_pod_terminal": "Yard - Y0709A",
      "pod_last_tracking_request_at": "2024-06-26T17:51:12Z",
      "shipment_last_tracking_request_at": "2024-06-26T15:05:20Z",
      "availability_known": true,
      "pod_timezone": "America/New_York",
      "final_destination_timezone": "US/Eastern",
      "empty_terminated_timezone": "US/Eastern",
      "pod_rail_carrier_scac": "CSXT",
      "ind_rail_carrier_scac": "CSXT",
      "pod_rail_loaded_at": null,
      "pod_rail_departed_at": null,
      "ind_eta_at": null,
      "ind_ata_at": null,
      "ind_rail_unloaded_at": null,
      "ind_facility_lfd_on": null
    },
    "relationships": {
      "shipment": {
        "data": {
          "id": "02b1bd6f-407c-45bb-8645-06e7ee34e7e3",
          "type": "shipment"
        }
      },
      "pickup_facility": {
        "data": null
      },
      "pod_terminal": {
        "data": {
          "id": "b859f5c3-8515-41da-bf20-39c0a5ada887",
          "type": "terminal"
        }
      },
      "transport_events": {
        "data": [
          {
            "id": "45b542cb-332b-4684-b915-42e3a0759823",
            "type": "transport_event"
          },
          {
            "id": "174ed528-a1a9-4002-aef0-f2c9369199da",
            "type": "transport_event"
          },
          {
            "id": "7a2f30a6-a756-4c14-9477-fbfc1c7fe2f8",
            "type": "transport_event"
          },
          {
            "id": "e7365004-175a-46e8-96cd-dbed0f3daf21",
            "type": "transport_event"
          },
          {
            "id": "7c567bf3-7f01-4a3d-a176-eaa1f7165585",
            "type": "transport_event"
          }
        ]
      },
      "raw_events": {
        "data": [
          {
            "id": "2956f71c-bfb9-4e49-b9e2-1b4d53c74cac",
            "type": "raw_event"
          },
          {
            "id": "391e0eda-65b5-4fc3-a53d-25ecd9570259",
            "type": "raw_event"
          },
          {
            "id": "74810c04-6c8a-4194-8cff-52936584a965",
            "type": "raw_event"
          },
          {
            "id": "4b1500e2-b23b-4896-87bd-c38b1d16f385",
            "type": "raw_event"
          },
          {
            "id": "8b9a7d88-720a-4304-8c1e-a3336e39f481",
            "type": "raw_event"
          },
          {
            "id": "bf1f59c5-5dd8-4013-87f9-d7056bc87114",
            "type": "raw_event"
          }
        ]
      }
    }
  }
}
```

### Response Fields

| Field                                      | Type    | Description                                    |
| ------------------------------------------ | ------- | ---------------------------------------------- |
| `data.id`                                  | string  | Unique identifier for the container            |
| `data.type`                                | string  | Resource type (always "container")             |
| `data.attributes.number`                   | string  | Container number                               |
| `data.attributes.seal_number`              | string  | Container seal number                          |
| `data.attributes.created_at`               | string  | ISO 8601 timestamp when created                |
| `data.attributes.ref_numbers`              | array   | Array of reference numbers                     |
| `data.attributes.pod_arrived_at`           | string  | Port of discharge arrival timestamp            |
| `data.attributes.pod_discharged_at`        | string  | Port of discharge discharge timestamp          |
| `data.attributes.available_for_pickup`     | boolean | Whether container is available for pickup      |
| `data.attributes.equipment_type`           | string  | Container equipment type (dry, reefer, etc.)   |
| `data.attributes.equipment_length`         | integer | Container length in feet                       |
| `data.attributes.equipment_height`         | string  | Container height (standard, high\_cube)        |
| `data.attributes.weight_in_lbs`            | integer | Container weight in pounds                     |
| `data.attributes.pickup_lfd`               | string  | Last free day for pickup                       |
| `data.attributes.location_at_pod_terminal` | string  | Current location at port of discharge terminal |
| `data.attributes.pod_timezone`             | string  | Port of discharge timezone                     |
| `data.attributes.pod_rail_carrier_scac`    | string  | Rail carrier SCAC at port of discharge         |
| `data.relationships.shipment.data`         | object  | Associated shipment object                     |
| `data.relationships.pod_terminal.data`     | object  | Port of discharge terminal object              |
| `data.relationships.transport_events.data` | array   | Array of transport event objects               |
| `data.relationships.raw_events.data`       | array   | Array of raw event objects                     |

## Status Codes

| Code | Description                             |
| ---- | --------------------------------------- |
| 200  | Container retrieved successfully        |
| 404  | Container not found                     |
| 401  | Authentication failed - invalid API key |
| 429  | Rate limit exceeded                     |
