> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://catena.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://catena.ferndocs.com/_mcp/server.

# 🧪 List Loads

GET https://api.catenatelematics.com/v2/telematics/tms-loads

Get a paginated list of TMS loads accessible to your organization.

Reference: https://catena.ferndocs.com/api-reference/telematics/tms/list-loads

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `tms_connection_id` (string, optional, nullable) — Limit results to a specific TMS connection. This is the UUID assigned by Catena when your TMS account connects to a TMS.
- `from_datetime` (datetime, optional) — Return only records that occurred on or after this date and time. **Format:** ISO 8601 (UTC) **Applies filter:** `occurred_at >= from_datetime` **Default value:** `now() - 1 day` **Restriction:** `to_datetime - from_datetime` cannot exceed 45 days
- `to_datetime` (datetime, optional) — Return only records that occurred before this date and time. **Format:** ISO 8601 (UTC) **Applies filter:** `occurred_at < to_datetime` **Default value:** `now()` **Restriction:** `to_datetime - from_datetime` cannot exceed 45 days
- `include_source_data` (boolean, optional, default: false) — Include the raw data from the telematics provider. *Useful for auditing or accessing fields not normalized by Catena*
- `source_ids` (list of string, optional, nullable) — Limit results to specific resources using the identifier provided by the TSP. **Maximum:** 100 IDs To specify multiple values, repeat the parameter for each value (e.g., `?source_ids=id1&source_ids=id2`).
- `sort_by` (string, optional, nullable) — The name of the field to sort results by. If not provided, results will be ordered by `occurred_at`.
- `sort_order` (enum, optional, default: asc) — The order of sorting, either `asc` for ascending or `desc` for descending. Defaults to `asc` if `sort_by` is provided without `sort_order`.
  - Allowed values: `asc`, `desc`
- `cursor` (string, optional, nullable) — Cursor for the next page
- `size` (integer, optional, default: 300) — Page size

## Response

### 200

Successful Response

- `items` (list of LoadRead, required)
- `total` (integer, required)
- `current_page` (string, optional, nullable) — Cursor to refetch the current page
- `current_page_backwards` (string, optional, nullable) — Cursor to refetch the current page starting from the last item
- `previous_page` (string, optional, nullable) — Cursor for the previous page
- `next_page` (string, optional, nullable) — Cursor for the next page

## Errors

### 400 Bad Request Error

Bad Request

- `code` (integer, optional, default: 400)
- `message` (string, optional, default: Bad Request)
- `detail` (string, optional, nullable)

### 401 Unauthorized Error

Unauthorized

- `code` (integer, optional, default: 401)
- `message` (string, optional, default: Unauthorized)
- `detail` (string, optional, nullable)

### 403 Forbidden Error

Forbidden

- `code` (integer, optional, default: 403)
- `message` (string, optional, default: Forbidden)
- `detail` (string, optional, nullable)

### 404 Not Found Error

Not Found

- `code` (integer, optional, default: 404)
- `message` (string, optional, default: Not Found)
- `detail` (string, optional, nullable)

### 405 Method Not Allowed Error

Method Not Allowed

- `code` (integer, optional, default: 405)
- `message` (string, optional, default: Method Not Allowed)
- `detail` (string, optional, nullable)

### 409 Conflict Error

Conflict

- `code` (integer, optional, default: 409)
- `message` (string, optional, default: Conflict)
- `detail` (string, optional, nullable)

### 422 Unprocessable Entity Error

Unprocessable Entity

- `code` (integer, optional, default: 422)
- `message` (string, optional, default: Invalid Request Body)
- `detail` (list of ValidationErrorDetail, optional, nullable)

### 429 Too Many Requests Error

Too Many Requests

- `code` (integer, optional, default: 429)
- `message` (string, optional, default: Too Many Requests)
- `detail` (RetryAfterDetail, optional, nullable)

### 500 Internal Server Error

Internal Server Error

- `message` (string, optional, default: Internal Server Error)

### 501 Not Implemented Error

Not Implemented

- `code` (integer, optional, default: 501)
- `message` (string, optional, default: Not Implemented)
- `detail` (string, optional, nullable)

## Types

### LoadRead

Load model for API responses.

- `id` (string, required) — Unique identifier of the record at Catena Telematics.
- `created_at` (datetime, required) — Immutable: The datetime the record was ingested into Catena Telematics.
- `updated_at` (datetime, required) — The datetime the record was last modified in Catena Telematics.
- `tms_connection_id` (string, required) — Unique identifier of the connection at Catena Telematics through which this record was ingested. A TMS connection represents a TmsAccount/TMS pairing. No foreign key: TmsConnection lives in telematics-integrations-service's own database, so this is a logical reference only.
- `source_name` (enum, required) — The underlying TMS platform that provided this data (e.g., `tms_simulator`).
  - Allowed values: `tms_simulator`
- `source_id` (string, required) — Unique identifier of the record in the TMS. **Note: we generate a deterministic composite key based on available fields if the TMS does not provide a unique ID.**
- `source_data_hash` (string, required) — SHA-256 hash of the source data payload. **Note: we use it internally for idempotence and deduplication.**
- `tms_account_id` (string, optional, nullable) — The TMS account that owns this record's tms_connection_id.
- `deleted_at` (datetime, optional, nullable) — The datetime the record was logically deleted from Catena Telematics.
- `tms_id` (string, optional, nullable) — Unique identifier of the TMS at Catena Telematics from which this record was ingested.
- `tms_slug` (string, optional, nullable) — Human readable slug of the TMS at Catena Telematics from which this record was ingested.
- `source_data` (map from string to any, optional) — Raw source payload as ingested from the TMS. **Note: use it for audit/debugging.**
- `occurred_at` (datetime, optional, nullable) — Datetime of when the underlying event/observation occurred, as reported by the TMS, or the moment it was ingested by us if not available in the source data.
- `extras` (map from string to any, optional, nullable) — Additional data available in the TMS that doesn't fit into the model (this field captures those extra attributes in a flexible way).
- `execution_id` (string, optional, nullable) — Unique identifier for the execution that ingested this record into Catena Telematics. **Note: useful for tracing.** Stamped by upsert_data() onto every record regardless of resource domain (functions/upsert/src/upsert.py), so this is populated the same way it is for TSP tables even though there is no TMS Schedule/Execution pipeline yet.
- `schedule_id` (string, optional, nullable) — Unique identifier for schedule that triggered this record's execution. **Note: useful for tracing.**
- `load_number` (string, optional, nullable) — Load/shipment number as provided by the TMS.
- `status` (string, optional, nullable) — TMS-provided load status (e.g., 'booked', 'in_transit', 'delivered'). Not normalized across TMS providers.
- `source_customer_id` (string, optional, nullable) — External source system customer identifier (from the TMS).
- `customer_id` (string, optional, nullable) — Internal customer identifier (Catena), deterministically derived from source_customer_id. No foreign key: no standalone Customer resource table exists yet.
- `customer_name` (string, optional, nullable) — Customer name as provided by the TMS.
- `source_carrier_id` (string, optional, nullable) — External source system carrier identifier (from the TMS).
- `carrier_id` (string, optional, nullable) — Internal carrier identifier (Catena), deterministically derived from source_carrier_id. No foreign key: no standalone Carrier resource table exists yet.
- `carrier_name` (string, optional, nullable) — Carrier name as provided by the TMS.
- `stops` (list of map from string to any, optional) — Ordered pickup/delivery stops within the load (see LoadStop for the expected shape). Stored as JSON-safe dicts rather than list[LoadStop]: SQLAlchemy's JSONB column serializes with the stdlib json encoder, which can't handle Pydantic model instances or datetimes, so callers must pass `stop.model_dump(mode='json')` rather than a LoadStop instance (mirrors why functions/upsert/src/upsert.py's _normalize_jsonb_columns exists for the ingestion path).

### ValidationErrorDetail

- `path` (string, required)
- `input` (string, required)
- `message` (string, required)
- `error_type` (string, required)

### RetryAfterDetail

- `retry_after_seconds` (integer, required)
- `message` (string, required)

## Examples

**Response**

```json
{
  "items": [
    {
      "id": "string",
      "created_at": "2024-01-15T09:30:00Z",
      "updated_at": "2024-01-15T09:30:00Z",
      "tms_connection_id": "string",
      "source_name": "tms_simulator",
      "source_id": "string",
      "source_data_hash": "string",
      "tms_account_id": "string",
      "deleted_at": "2024-01-15T09:30:00Z",
      "tms_id": "string",
      "tms_slug": "string",
      "source_data": {},
      "occurred_at": "2024-01-15T09:30:00Z",
      "extras": {},
      "execution_id": "string",
      "schedule_id": "string",
      "load_number": "string",
      "status": "string",
      "source_customer_id": "string",
      "customer_id": "string",
      "customer_name": "string",
      "source_carrier_id": "string",
      "carrier_id": "string",
      "carrier_name": "string",
      "stops": [
        {}
      ]
    }
  ],
  "total": 1,
  "current_page": "string",
  "current_page_backwards": "string",
  "previous_page": "string",
  "next_page": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.catenatelematics.com/v2/telematics/tms-loads"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.catenatelematics.com/v2/telematics/tms-loads';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.catenatelematics.com/v2/telematics/tms-loads"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.catenatelematics.com/v2/telematics/tms-loads")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.catenatelematics.com/v2/telematics/tms-loads")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.catenatelematics.com/v2/telematics/tms-loads', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.catenatelematics.com/v2/telematics/tms-loads");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.catenatelematics.com/v2/telematics/tms-loads")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```