{
"id": "social.passports.travel.leg",
"defs": {
"main": {
"key": "tid",
"type": "record",
"record": {
"type": "object",
"required": [
"originRef",
"destinationRef",
"transportation",
"createdAt"
],
"properties": {
"carrier": {
"type": "string",
"maxLength": 100,
"description": "Carrier name, e.g. 'Japan Airlines' or 'Amtrak'."
},
"endDate": {
"type": "string",
"maxLength": 10,
"description": "Arrival date in YYYY-MM-DD format."
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"originRef": {
"ref": "com.atproto.repo.strongRef",
"type": "ref",
"description": "Reference to the origin social.passports.place record."
},
"startDate": {
"type": "string",
"maxLength": 10,
"description": "Departure date in YYYY-MM-DD format. Stored as a date string rather than datetime to avoid timezone ambiguity — travel dates are calendar-day concepts."
},
"carrierCode": {
"type": "string",
"maxLength": 10,
"description": "Transport-agnostic carrier code — IATA airline code for flights (e.g. 'JL'), route abbreviation for non-IATA carriers (e.g. 'ACE' for Acela)."
},
"description": {
"type": "string",
"maxLength": 3000,
"description": "Free-text notes about this leg."
},
"serviceNumber": {
"type": "string",
"maxLength": 20,
"description": "Flight number, train number, or equivalent service identifier, e.g. 'JL006' or 'Acela 2151'."
},
"destinationRef": {
"ref": "com.atproto.repo.strongRef",
"type": "ref",
"description": "Reference to the destination social.passports.place record."
},
"transportation": {
"type": "string",
"description": "Mode of transportation.",
"knownValues": [
"flight",
"train",
"bus",
"car",
"ferry",
"walking",
"cycling",
"other"
]
},
"originTransportCode": {
"type": "string",
"maxLength": 10,
"description": "Terminal code at origin — IATA airport code for flights (e.g. 'JFK'), station code for rail (e.g. 'NYP'), etc. Overrides the place record's transport_code for this specific leg."
},
"destinationTransportCode": {
"type": "string",
"maxLength": 10,
"description": "Terminal code at destination — IATA airport code for flights (e.g. 'CDG'), station code for rail, etc. Overrides the place record's transport_code for this specific leg."
}
}
},
"description": "One transport segment of a trip — a single origin-to-destination movement. Part of a social.passports.travel.trip."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}