Skip to content

List Locations

GET /v2/tms-api/locations

Retrieve a paginated list of locations in your organization.

Query Parameters

pageintegerdefault: 1
Page number (1-indexed)
page_sizeintegerdefault: 50
Number of items per page (max 100)
name_containsstring
Filter by name (contains search)
citystring
Filter by city
statestring
Filter by state/province
countrystring
Filter by country
sortstring
Sort field and direction. Format: `field` (ascending) or `-field` (descending). Valid fields: `name`, `city`, `state`, `created_at`, `updated_at`

Request Examples

bash
# List all locations
curl -X GET "https://api.mentium.io/v2/tms-api/locations?page=1&page_size=50" \
  -H "X-API-Key: your_api_key_here"

# Filter by state
curl -X GET "https://api.mentium.io/v2/tms-api/locations?state=IL&page=1" \
  -H "X-API-Key: your_api_key_here"

# Search by name
curl -X GET "https://api.mentium.io/v2/tms-api/locations?name_contains=Chicago" \
  -H "X-API-Key: your_api_key_here"

# Sort by name
curl -X GET "https://api.mentium.io/v2/tms-api/locations?sort=name" \
  -H "X-API-Key: your_api_key_here"
python
import requests

# List all locations
response = requests.get(
    "https://api.mentium.io/v2/tms-api/locations",
    headers={"X-API-Key": "your_api_key_here"},
    params={"page": 1, "page_size": 50}
)
print(response.json())

# Filter by state
response = requests.get(
    "https://api.mentium.io/v2/tms-api/locations",
    headers={"X-API-Key": "your_api_key_here"},
    params={"state": "IL", "page": 1}
)
print(response.json())

Response

200 OK

json
{
  "items": [
    {
      "id": "loc_abc123",
      "external_reference_id": "LOC-CHICAGO-001",
      "name": "Chicago Distribution Center",
      "address_line1": "123 Industrial Blvd",
      "city": "Chicago",
      "state": "IL",
      "postal_code": "60601",
      "country": "US",
      "latitude": 41.8781,
      "longitude": -87.6298,
      "created_at": "2026-01-15T10:30:00Z",
      "updated_at": "2026-01-29T14:20:00Z"
    },
    {
      "id": "loc_def456",
      "external_reference_id": "LOC-DETROIT-001",
      "name": "Detroit Receiving Facility",
      "address_line1": "456 Woodward Ave",
      "city": "Detroit",
      "state": "MI",
      "postal_code": "48201",
      "country": "US",
      "latitude": 42.3314,
      "longitude": -83.0458,
      "created_at": "2026-01-16T11:00:00Z",
      "updated_at": "2026-01-16T11:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "page_size": 50,
    "total": 2,
    "total_pages": 1,
    "has_more": false
  }
}

Notes

  • Pagination: Results are paginated with a default page size of 50 (max 100)
  • Filtering: Multiple filters can be combined (e.g., ?state=IL&city=Chicago)
  • Sorting: Use - prefix for descending order (e.g., sort=-created_at)

Mentium TMS API Documentation