Skip to main content
GET
/
custom_fields
/
{id}
Get a custom field
curl --request GET \
  --url https://api.terminal49.com/v2/custom_fields/{id} \
  --header 'Authorization: <api-key>'
import requests

url = "https://api.terminal49.com/v2/custom_fields/{id}"

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/custom_fields/{id}', 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/custom_fields/{id}",
  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/custom_fields/{id}"

	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/custom_fields/{id}")
  .header("Authorization", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.terminal49.com/v2/custom_fields/{id}")

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": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "type": "custom_field",
    "attributes": {
      "api_slug": "<string>",
      "value": "<string>",
      "display_value": "<string>"
    },
    "relationships": {
      "entity": {
        "data": {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
        }
      },
      "definition": {
        "data": {
          "type": "custom_field_definition",
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
        }
      }
    }
  },
  "links": {
    "self": "<string>"
  }
}
Use this endpoint to retrieve a single custom field value by its ID.

Path parameters

ParameterDescription
idThe unique identifier of the custom field value

Response

The response includes:
  • value - The raw stored value (type depends on the field’s data type)
  • display_value - Human-readable formatted value
  • Relationships to the associated entity (shipment or container), definition, and the user who last updated it

Data types

Custom fields support these data types, each with specific value handling:
Data typeStorageDisplay format
short_textStringAs-is
numberDecimal (precision: 18, scale: 6)Formatted per default_format
dateDateYYYY-MM-DD or custom format
datetimeDateTimeYYYY-MM-DD HH:MM:SS or custom format
booleanBooleanYes or No
enumStringOption label
enum_multiComma-separated stringComma-separated labels

Authorizations

Authorization
string
header
required

Use a Terminal49 API key in the Authorization header with the Token prefix.

Authorization: Token YOUR_API_KEY

Path Parameters

id
string
required

Custom field ID

Response

200 - application/json

OK

data
Custom field · object