curl --request GET \
--url https://api.terminal49.com/v2/me \
--header 'Authorization: <api-key>'import requests
url = "https://api.terminal49.com/v2/me"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.terminal49.com/v2/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.terminal49.com/v2/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.terminal49.com/v2/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.terminal49.com/v2/me")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.terminal49.com/v2/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "8c1d2f3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f",
"type": "credential",
"attributes": {
"kind": "user",
"channel": "mcp",
"name": null,
"features": {
"data_out_api": {
"status": "available"
},
"custom_fields": {
"status": "available"
},
"routing_data": {
"status": "available"
},
"rail_data": {
"status": "not_enabled"
},
"stop_tracking": {
"status": "available"
},
"trade_intel": {
"status": "not_enabled"
}
}
},
"relationships": {
"account": {
"data": {
"id": "b7e2c9a1-5d3f-4e8b-9c0a-1f2e3d4c5b6a",
"type": "account"
}
},
"user": {
"data": {
"id": "8c1d2f3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f",
"type": "user"
}
}
}
},
"included": [
{
"id": "b7e2c9a1-5d3f-4e8b-9c0a-1f2e3d4c5b6a",
"type": "account",
"attributes": {
"company_name": "Acme Logistics",
"company_type": "freight_forwarder",
"scac": "ACML",
"abbr_name": "ACME",
"city": "Oakland",
"state_abbr": "CA",
"country": "United States",
"plan": "customer",
"tracking_slots": null
}
},
{
"id": "8c1d2f3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f",
"type": "user",
"attributes": {
"email": "ops@example.com",
"name": "Jordan Lee",
"role": "account_manager",
"job_role": "forwarder",
"job_title": "Operations lead",
"admin": false
},
"relationships": {
"accounts": {
"data": [
{
"id": "b7e2c9a1-5d3f-4e8b-9c0a-1f2e3d4c5b6a",
"type": "account"
}
]
}
}
}
]
}Get the current credential
Identify the API key or signed-in user behind a request, the Terminal49 account it is scoped to, and which gated features that credential can use on that account.
curl --request GET \
--url https://api.terminal49.com/v2/me \
--header 'Authorization: <api-key>'import requests
url = "https://api.terminal49.com/v2/me"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.terminal49.com/v2/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.terminal49.com/v2/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.terminal49.com/v2/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.terminal49.com/v2/me")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.terminal49.com/v2/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "8c1d2f3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f",
"type": "credential",
"attributes": {
"kind": "user",
"channel": "mcp",
"name": null,
"features": {
"data_out_api": {
"status": "available"
},
"custom_fields": {
"status": "available"
},
"routing_data": {
"status": "available"
},
"rail_data": {
"status": "not_enabled"
},
"stop_tracking": {
"status": "available"
},
"trade_intel": {
"status": "not_enabled"
}
}
},
"relationships": {
"account": {
"data": {
"id": "b7e2c9a1-5d3f-4e8b-9c0a-1f2e3d4c5b6a",
"type": "account"
}
},
"user": {
"data": {
"id": "8c1d2f3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f",
"type": "user"
}
}
}
},
"included": [
{
"id": "b7e2c9a1-5d3f-4e8b-9c0a-1f2e3d4c5b6a",
"type": "account",
"attributes": {
"company_name": "Acme Logistics",
"company_type": "freight_forwarder",
"scac": "ACML",
"abbr_name": "ACME",
"city": "Oakland",
"state_abbr": "CA",
"country": "United States",
"plan": "customer",
"tracking_slots": null
}
},
{
"id": "8c1d2f3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f",
"type": "user",
"attributes": {
"email": "ops@example.com",
"name": "Jordan Lee",
"role": "account_manager",
"job_role": "forwarder",
"job_title": "Operations lead",
"admin": false
},
"relationships": {
"accounts": {
"data": [
{
"id": "b7e2c9a1-5d3f-4e8b-9c0a-1f2e3d4c5b6a",
"type": "account"
}
]
}
}
}
]
}Authorizations
Use a Terminal49 API key in the Authorization header with the Token prefix.
Authorization: Token YOUR_API_KEY
Headers
Select an account accessible to the signed-in user. Defaults to the user's primary account. API keys remain scoped to their own account.
Response
OK
The credential that authenticated the current request. Returned only by GET /me.
Show child attributes
Show child attributes
Includes the current account, the linked user when present, and every account in that user's accounts relationship. Linked resources are always included.
1An account as GET /me describes it. Narrower than the account relationship elsewhere in the API.
- Credential account
- Credential user
Show child attributes
Show child attributes
Was this page helpful?