Flights
Attachments are how you share things in Protocol — they allow you to send all sorts of files to your contacts and groups. On this page, we'll dive into the different attachment endpoints you can use to manage attachments programmatically. We'll look at how to query, upload, update, and delete attachments.
The flight model
The flight model contains all the information about the flight events available.
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the attachment.
- Name
OAGFlight
- Type
- string
- Description
Unique identifier for the message associated with the attachment.
- Name
Location
- Type
- string
- Description
The filename for the attachment.
- Name
CameraID
- Type
- string
- Description
The URL for the attached file.
- Name
Gate
- Type
- string
- Description
The MIME type of the attached file.
- Name
FlightType
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
Flight
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
Airport
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
TailNumber
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
Category
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
Ddate
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
FlightDateTime
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
LandedDateTime
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
FlightId
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
ADHoldOutStart
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
ADHoldOutEnd
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
AircraftArrivingStart
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
AircraftArrivingEnd
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
AircraftDepartingStart
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
AircraftDepartingEnd
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
AircraftRunwayEnd
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
AircraftStationaryStart
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
AircraftStationaryEnd
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
BeltLoaderStart
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
BeltLoaderEnd
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
CateringTruckStart
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
CateringTruckEnd
- Type
- integer
- Description
The file size of the attachment in bytes.
- Name
created_at
- Type
- timestamp
- Description
Timestamp of when the attachment was created.
List all flights
This endpoint allows you to retrieve a paginated list of all your flights. By default, a maximum of 100 flights are shown per page.
Optional attributes
- Name
gate
- Type
- string
- Description
Limit to attachments from a given Gate.
- Name
tailNumber
- Type
- string
- Description
Limit to flights from a given Tail.
- Name
flightNumber
- Type
- string
- Description
Limit to attachments from a given Flight Number.
- Name
location
- Type
- string
- Description
Limit the number of flights for a given Airport Code.
- Name
departureDate
- Type
- string
- Description
Limit the number of flights for a date.
- Name
offset
- Type
- integer
- Description
Limit the number of flights to starting past a specific starting offset (i.e., starting page number). Defaults to 0.
- Name
limit
- Type
- integer
- Description
Limit the number of flights. Defaults to 25.
Minimum Requirements Request with more flights per page
curl -G https://api.synapticaviation.io/v2/flights \
-H "Authorization: Bearer {token}" \
-d offset=0 \
-d limit=100
Request for location
curl -G https://api.synapticaviation.io/v2/flights \
-H "Authorization: Bearer {token}" \
-d location="FLL" \
-d offset=0 \
-d limit=100
Detailed Request for specific flight
curl -G https://api.synapticaviation.io/v2/flights \
-H "Authorization: Bearer {token}" \
-d tailNumber="NK234" \
-d flightNumber="1234"
-d gate="G13" \
-d location="FLL" \
-d departureDate="2023-01-05" \
-d offset=0 \
-d limit=100
Response
{
"has_more": false,
"data": [
{
"id": 20499923,
"OAGFlight": 56051275,
"Location": 20,
"CameraID": 79,
"Gate": "G13",
"FlightType": "ARRIVAL",
"Flight": "615",
"Airport": "FLL",
"TailNumber": "N526NK",
"Category": "TURNAROUND",
"Ddate": "2022-10-31",
"FlightDateTime": "2022-11-01T00:34:00.000Z",
"LandedDateTime": "2022-11-01T00:28:00.000Z",
"FlightId": "1",
"ACHoldOutStart": null,
"ACHoldOutEnd": null,
"AircraftArrivingStart": "2022-11-01T00:34:04.000Z",
"AircraftArrivingEnd": "2022-11-01T00:34:21.000Z",
"AircraftDepartingStart": "2022-11-01T05:53:27.000Z",
"AircraftDepartingEnd": "2022-11-01T05:54:15.000Z",
"AircraftRunwayEnd": null,
"AircraftStationaryStart": "2022-11-01T00:34:25.000Z",
"AircraftStationaryEnd": "2022-11-01T05:53:12.000Z",
"BeltLoaderStart": "2022-11-01T04:34:11.000Z",
"BeltLoaderEnd": "2022-11-01T05:28:19.000Z",
"CateringTruckStart": null,
"CateringTruckEnd": null,
"ChocksOnStart": "2022-11-01T00:34:36.000Z",
"ChocksOnEnd": "2022-11-01T00:35:07.000Z",
"FuelhoseConnectedStart": "2022-11-01T05:06:20.000Z",
"FuelhoseConnectedEnd": "2022-11-01T05:15:19.000Z",
"GPUConnectedStart": "2022-11-01T04:34:34.000Z",
"GPUConnectedEnd": "2022-11-01T05:27:14.000Z",
"JBExtendA3Start": null,
"JBExtendA3End": null,
"JetbridgeExtendingStart": "2022-11-01T00:34:55.000Z",
"JetbridgeExtendingEnd": "2022-11-01T00:35:10.000Z",
"JetbridgeRetractingStart": "2022-11-01T05:50:57.000Z",
"JetbridgeRetractingEnd": "2022-11-01T05:51:27.000Z",
"PCAConnectedStart": "2022-11-01T04:19:36.000Z",
"PCAConnectedEnd": "2022-11-01T05:36:37.000Z",
"PersonInEnvelopeStart": "2022-11-01T00:34:04.000Z",
"PersonInEnvelopeEnd": "2022-11-01T05:52:12.000Z",
"SuitecaseStart": "2022-11-01T04:37:17.000Z",
"SuitecaseEnd": "2022-11-01T05:28:23.000Z",
"PushTruckConnectedStart": "2022-11-01T04:36:39.000Z",
"PushTruckConnectedEnd": "2022-11-01T05:53:26.000Z",
"AirlineCode": "NK"
}
]
}
Get Flight with Video Attachments by Flight ID
This endpoint retrieves a flight by its ID. The response includes the flight details and the video attachments.
Request
Parameters
- id: Flight ID
Response
{
"has_more": false,
"data": [
{
"id": 20499923,
"OAGFlight": 56051275,
"Location": 20,
"CameraID": 79,
"Gate": "G13",
"FlightType": "ARRIVAL",
"Flight": "615",
"Airport": "FLL",
"TailNumber": "N526NK",
"Category": "TURNAROUND",
"Ddate": "2022-10-31",
"FlightDateTime": "2022-11-01T00:34:00.000Z",
"LandedDateTime": "2022-11-01T00:28:00.000Z",
"FlightId": "1",
"ACHoldOutStart": null,
"ACHoldOutEnd": null,
"AircraftArrivingStart": "2022-11-01T00:34:04.000Z",
"AircraftArrivingEnd": "2022-11-01T00:34:21.000Z",
"AircraftDepartingStart": "2022-11-01T05:53:27.000Z",
"AircraftDepartingEnd": "2022-11-01T05:54:15.000Z",
"AircraftRunwayEnd": null,
"AircraftStationaryStart": "2022-11-01T00:34:25.000Z",
"AircraftStationaryEnd": "2022-11-01T05:53:12.000Z",
"BeltLoaderStart": "2022-11-01T04:34:11.000Z",
"BeltLoaderEnd": "2022-11-01T05:28:19.000Z",
"CateringTruckStart": null,
"CateringTruckEnd": null,
"ChocksOnStart": "2022-11-01T00:34:36.000Z",
"ChocksOnEnd": "2022-11-01T00:35:07.000Z",
"FuelhoseConnectedStart": "2022-11-01T05:06:20.000Z",
"FuelhoseConnectedEnd": "2022-11-01T05:15:19.000Z",
"GPUConnectedStart": "2022-11-01T04:34:34.000Z",
"GPUConnectedEnd": "2022-11-01T05:27:14.000Z",
"JBExtendA3Start": null,
"JBExtendA3End": null,
"JetbridgeExtendingStart": "2022-11-01T00:34:55.000Z",
"JetbridgeExtendingEnd": "2022-11-01T00:35:10.000Z",
"JetbridgeRetractingStart": "2022-11-01T05:50:57.000Z",
"JetbridgeRetractingEnd": "2022-11-01T05:51:27.000Z",
"PCAConnectedStart": "2022-11-01T04:19:36.000Z",
"PCAConnectedEnd": "2022-11-01T05:36:37.000Z",
"PersonInEnvelopeStart": "2022-11-01T00:34:04.000Z",
"PersonInEnvelopeEnd": "2022-11-01T05:52:12.000Z",
"SuitecaseStart": "2022-11-01T04:37:17.000Z",
"SuitecaseEnd": "2022-11-01T05:28:23.000Z",
"PushTruckConnectedStart": "2022-11-01T04:36:39.000Z",
"PushTruckConnectedEnd": "2022-11-01T05:53:26.000Z",
"AirlineCode": "NK",
"Videos": [
{
"VideoUrl": "videourl.mp4",
"VideoType": "mp4",
"DateAdded": "2022-11-01T00:34:04.000Z",
}
...
]
}
]
}
Get Video by Flight ID and Flight Event Property
This endpoint retrieves a video by its flight ID and flight event property.
Request
Parameters
- id: Flight ID
- flightProperty: Flight event property
Response
{
"has_more": false,
"data":
{
"VideoUrl": "videourl.mp4",
"VideoType": "mp4",
"DateAdded": "2022-11-01T00:34:04.000Z",
}
}