Skip to main content

Method

GET /v1/ref/transportation-modes/:id

Description

Returns a single transportation mode record by its UUID. This endpoint is useful when you need the full details of a specific transportation mode after obtaining its ID from the list endpoint.

Headers

This endpoint is public and does not require authentication.

Path Parameters

id
string
required
The UUID of the transportation mode to retrieve.

Response

{
  "id": "01234567-89ab-cdef-0123-456789abcdef",
  "code": "flight",
  "name": "Flight",
  "description": "Air travel",
  "displayOrder": 1,
  "isActive": true,
  "createdAt": "2024-01-01T00:00:00.000Z",
  "updatedAt": "2024-01-01T00:00:00.000Z"
}

Error Responses

{
  "error": "Invalid ID format"
}
{
  "message": "Transportation mode not found"
}
{
  "error": "Failed to retrieve transportation mode"
}

Response Fields

id
string
required
UUID v7 identifier for the transportation mode.
code
string
required
Unique code identifier (e.g., “flight”, “train”, “bus”).
name
string
required
Human-readable name of the transportation mode.
description
string
Optional description of the transportation mode.
displayOrder
number
Order for display purposes (lower numbers appear first).
isActive
boolean
required
Whether the transportation mode is currently active.
createdAt
string
required
ISO 8601 timestamp of when the record was created.
updatedAt
string
required
ISO 8601 timestamp of when the record was last updated.

Notes

  • This endpoint returns both active and inactive transportation modes (unlike the list endpoint)
  • The ID must be a valid UUID format
  • If the transportation mode does not exist, a 404 error is returned