> 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.

# Request External TSP Integration

POST https://api.catenatelematics.com/v2/orgs/external-tsps/{ext_tsp_id}/request-integration
Content-Type: application/json

Request integration for an external TSP on behalf of a fleet during onboarding.

Reference: https://catena.ferndocs.com/api-reference/orgs/tsps/request-external-tsp-integration

## Authentication

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

## Request

### Path parameters

- `ext_tsp_id` (string, required) — The ID of the external TSP to request integration for

### Body (application/json)

This endpoint expects an IntegrationRequestBody.

- `fleet_contact_name` (string, optional, nullable)
- `fleet_contact_email` (string, optional, nullable)
- `fleet_contact_notes` (string, optional, nullable)

## Response

### 201

Successful Response

- `id` (string, required) — Unique integration request identifier
- `ext_tsp_id` (string, required) — The external TSP that was requested for integration
- `ext_tsp_name` (string, required) — Name of the external TSP at the time of request
- `ext_tsp_compliance_status` (enum, required) — Compliance status at the time of request. 'compliant' = at least one device registered, 'non_compliant' = ALL devices revoked, 'unknown' = not linked to a registry
  - Allowed values: `compliant`, `non_compliant`, `unknown`
- `fleet_id` (string, required) — The fleet requesting integration
- `fleet_ref` (string, required) — External fleet identifier from the partner's system
- `partner_id` (string, required) — The partner requesting the integration
- `invitation_id` (string, required) — The related invitation for the fleet requesting the integration
- `created_at` (datetime, required) — When the integration request was created
- `updated_at` (datetime, required) — Last modification timestamp
- `fleet_contact_name` (string, optional, nullable) — Contact name provided by the fleet
- `fleet_contact_notes` (string, optional, nullable) — Notes provided by the fleet
- `integrated_tsp_ids` (list of string, optional) — List of TSP IDs that are integrated for this external TSP. Empty if not yet integrated.

## 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)

## Types

### ValidationErrorDetail

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

### RetryAfterDetail

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

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "id": "01927a3b-4c5d-7e8f-9a0b-1c2d3e4f5a6b",
  "ext_tsp_id": "dddddddd-dddd-dddd-dddd-dddddddddddd",
  "ext_tsp_name": "Samsara Inc.",
  "ext_tsp_compliance_status": "compliant",
  "fleet_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
  "fleet_ref": "EXT-FLEET-123",
  "partner_id": "cccccccc-cccc-cccc-cccc-cccccccccccc",
  "invitation_id": "eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee",
  "created_at": "2025-06-01T12:00:00Z",
  "updated_at": "2025-06-01T12:00:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://api.catenatelematics.com/v2/orgs/external-tsps/ext_tsp_id/request-integration"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.catenatelematics.com/v2/orgs/external-tsps/ext_tsp_id/request-integration';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.catenatelematics.com/v2/orgs/external-tsps/ext_tsp_id/request-integration"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	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/orgs/external-tsps/ext_tsp_id/request-integration")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

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.post("https://api.catenatelematics.com/v2/orgs/external-tsps/ext_tsp_id/request-integration")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.catenatelematics.com/v2/orgs/external-tsps/ext_tsp_id/request-integration', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.catenatelematics.com/v2/orgs/external-tsps/ext_tsp_id/request-integration");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.catenatelematics.com/v2/orgs/external-tsps/ext_tsp_id/request-integration")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```