---
title: "Get Available Template Variables"
method: GET
path: "/v1/templates/variables"
tags: ["templates"]
---

# Get Available Template Variables

`GET /v1/templates/variables`

## Request

- Base URL: `https://api.mentium.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mentium.io/v1/templates/variables`
- Auth: HTTP bearer

Get all available template variables from LoadSchema and CarrierSchema.

Use these variables in templates with {{variable_path}} syntax.

Example variables:
- {{load.external_reference_id}}
- {{load.weight}}
- {{carrier.name}}
- {{load.customer.name}}
- {{load.stops.0.city}} (first stop)
- {{carrier.contacts.0.primary_email}} (first contact)

This endpoint is useful for:
- Building variable picker UI in template editor
- Autocomplete suggestions
- Documentation of available fields

## Headers

- `mentium-workspace-id` string, nullable

## Response `200`

Successful Response

- TemplateVariableSchema: Complete schema of available template variables
  - `load_fields` TemplateVariableInfo[], required: Load-related variables
    - `path` string, required: Dot-notation path (e.g., 'load.weight')
    - `field_name` string, required: Field name from Pydantic schema
    - `field_type` string, required: Python type (str, int, float, datetime, etc.)
    - `description` string, nullable: Field description
    - `example` unknown
    - `is_nested` boolean: Whether this is a nested object
    - `is_array` boolean: Whether this is an array field
  - `carrier_fields` TemplateVariableInfo[], required: Carrier-related variables
    - `path` string, required: Dot-notation path (e.g., 'load.weight')
    - `field_name` string, required: Field name from Pydantic schema
    - `field_type` string, required: Python type (str, int, float, datetime, etc.)
    - `description` string, nullable: Field description
    - `example` unknown
    - `is_nested` boolean: Whether this is a nested object
    - `is_array` boolean: Whether this is an array field
  - `offer_fields` TemplateVariableInfo[], required: Offer-related variables
    - `path` string, required: Dot-notation path (e.g., 'load.weight')
    - `field_name` string, required: Field name from Pydantic schema
    - `field_type` string, required: Python type (str, int, float, datetime, etc.)
    - `description` string, nullable: Field description
    - `example` unknown
    - `is_nested` boolean: Whether this is a nested object
    - `is_array` boolean: Whether this is an array field
  - `organization_fields` TemplateVariableInfo[]: Organization-related variables
    - `path` string, required: Dot-notation path (e.g., 'load.weight')
    - `field_name` string, required: Field name from Pydantic schema
    - `field_type` string, required: Python type (str, int, float, datetime, etc.)
    - `description` string, nullable: Field description
    - `example` unknown
    - `is_nested` boolean: Whether this is a nested object
    - `is_array` boolean: Whether this is an array field

## Other responses

- `404`: Not found
- `422`: Validation Error

---

[API](https://skmtc.dev/mentium/apis/mentium-api.md) - [All operations](https://skmtc.dev/mentium/apis/mentium-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mentium/apis/mentium-api/revisions/b4ed8e59432e?raw)
