API reference
Trip files
Add your client's travel documents to a trip request you sent, or copy one from the client, and list or remove them. A file is never read back through the API.
List a trip's files
GET/v1/trip-requests/{id}/files
- Scope
read- Quota
- Counts toward your allowance
Path parameters
idUUIDRequired
Response
200 OK
Returns an array of record file objects.
Errors
401Unauthorized403Forbidden404Not found422Unprocessable content429Too many requests
Example request
curl "https://api.charterops.com/v1/trip-requests/$ID/files" \
--header "Authorization: Bearer $CHARTEROPS_API_KEY"Add a file to a trip
POST/v1/trip-requests/{id}/files
- Scope
write- Quota
- Counts toward your allowance
Path parameters
idUUIDRequired
Headers
Idempotency-KeystringRequired1 to 200 characters.
Request body
client_file_idUUIDA file on the request's client to copy onto the request instead.
filefileThe file to add. Send this or client_file_id.
filenamestringThe file's name on the request. By default, the file's own name. 1 to 200 characters.
Response
201 Created
Returns the record file object.
Errors
401Unauthorized403Forbidden404Not found409Conflict413Content too large415Unsupported media type422Unprocessable content429Too many requests503Service unavailable
Example request
curl --request POST "https://api.charterops.com/v1/trip-requests/$ID/files" \
--header "Authorization: Bearer $CHARTEROPS_API_KEY" \
--header "Idempotency-Key: $(uuidgen)" \
--form "file=@file.pdf"Remove a trip's file
DELETE/v1/trip-requests/{id}/files/{file_id}
- Scope
write- Quota
- Counts toward your allowance
Path parameters
idUUIDRequiredfile_idUUIDRequired
Response
204 No content
Errors
401Unauthorized403Forbidden404Not found422Unprocessable content429Too many requests
Example request
curl --request DELETE "https://api.charterops.com/v1/trip-requests/$ID/files/$FILE_ID" \
--header "Authorization: Bearer $CHARTEROPS_API_KEY"Objects
Record file
content_typestringcreated_atdate-timefilenamestringidUUIDsize_bytesintegeruploaded_byobjectCan be null3 fields in uploaded_by
avatar_urlstringCan be nulldisplay_namestringuser_idUUIDCan be null
uploaded_by_key_namestringCan be null