API reference
Client files
Keep a document on a client you sent once, to copy onto each of their trip requests, and list or remove it. A file is never read back through the API.
List a client's files
GET/v1/clients/{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/clients/$ID/files" \
--header "Authorization: Bearer $CHARTEROPS_API_KEY"Add a file to a client
POST/v1/clients/{id}/files
- Scope
write- Quota
- Counts toward your allowance
Path parameters
idUUIDRequired
Headers
Idempotency-KeystringRequired1 to 200 characters.
Request body
filefileRequired
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/clients/$ID/files" \
--header "Authorization: Bearer $CHARTEROPS_API_KEY" \
--header "Idempotency-Key: $(uuidgen)" \
--form "file=@file.pdf"Remove a client's file
DELETE/v1/clients/{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/clients/$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