API reference
Empty legs
Search empty legs, and post, edit and withdraw your own.
Search available empty legs
GET/v1/empty-legs
- Scope
read- Quota
- Counts toward your allowance
Query parameters
departure_continentstringDeparture airport's OurAirports continent; All includes unknown airports.
One of
AFANASEUNAOCSAdeparture_countrystringDeparture airport's country; All includes unknown airports. Matches
^[A-Z]{2}$.fromstring1 to 20 characters.
tostring1 to 20 characters.
near_fromstringnear_tostringradius_nmnumberMore than 0 and up to 500. Defaults to
50.from_datedateto_datedatecategory[]array of stringsOne of
pistonturboproplightmidsizesuper_midsizeheavyultra_long_rangehelicopterseats_minintegerMore than 0.
seats_maxintegerMore than 0.
min_price_centsinteger0 or more.
max_price_centsinteger0 or more.
registrationstring1 to 20 characters.
qstringUp to 120 characters.
sourcestringUp to 40 characters.
saved_operatorsbooleanDefaults to
false.operator_idUUIDposted_bystring1 to 200 characters.
created_afterdate-timesortstringDefaults to
window_start.One of
window_start-window_startprice_cents-price_centsroute-routecategory-categoryaircraft-aircraftseats-seatsoperator-operatorcursorstringUp to 2,000 characters.
limitintegerFrom 1 to 100. Defaults to
25.
Response
200 OK
Returns a page of empty leg objects in items, with next_cursor and total.
Errors
401Unauthorized403Forbidden404Not found409Conflict422Unprocessable content429Too many requests
Example request
curl "https://api.charterops.com/v1/empty-legs" \
--header "Authorization: Bearer $CHARTEROPS_API_KEY"Post an empty leg
POST/v1/empty-legs
- Scope
write- Quota
- Does not count
Headers
Idempotency-KeystringRequired1 to 200 characters.
Request body
aircraft_typestringRequired1 to 20 characters.
fromstringRequired1 to 20 characters.
tostringRequired1 to 20 characters.
window_enddate-timeRequiredwindow_startdate-timeRequirednotesstringUp to 2,000 characters.
operator_idUUIDprice_centsinteger0 or more.
registrationstring1 to 20 characters.
seatsintegerMore than 0.
Response
201 Created
Returns the empty leg object.
Errors
401Unauthorized403Forbidden404Not found409Conflict422Unprocessable content429Too many requests
Example request
curl --request POST "https://api.charterops.com/v1/empty-legs" \
--header "Authorization: Bearer $CHARTEROPS_API_KEY" \
--header "Idempotency-Key: $(uuidgen)" \
--json @body.jsonList the companies with empty legs on offer
GET/v1/empty-legs/posters
- Scope
read- Quota
- Counts toward your allowance
Query parameters
qstringUp to 120 characters.
limitintegerMore than 0 and up to 50. Defaults to
20.
Response
200 OK
Returns an array of poster objects.
Errors
401Unauthorized403Forbidden404Not found409Conflict422Unprocessable content429Too many requests
Example request
curl "https://api.charterops.com/v1/empty-legs/posters" \
--header "Authorization: Bearer $CHARTEROPS_API_KEY"Read an empty leg
GET/v1/empty-legs/{id}
- Scope
read- Quota
- Counts toward your allowance
Path parameters
idUUIDRequired
Response
200 OK
Returns the empty leg object.
Errors
401Unauthorized403Forbidden404Not found409Conflict422Unprocessable content429Too many requests
Example request
curl "https://api.charterops.com/v1/empty-legs/$ID" \
--header "Authorization: Bearer $CHARTEROPS_API_KEY"Update an available empty leg
PATCH/v1/empty-legs/{id}
- Scope
write- Quota
- Does not count
Path parameters
idUUIDRequired
Request body
aircraft_typestring1 to 20 characters.
fromstring1 to 20 characters.
notesstringUp to 2,000 characters.
operator_idUUIDprice_centsinteger0 or more.
registrationstring1 to 20 characters.
seatsintegerMore than 0.
tostring1 to 20 characters.
window_enddate-timewindow_startdate-time
Response
200 OK
Returns the empty leg object.
Errors
401Unauthorized403Forbidden404Not found409Conflict422Unprocessable content429Too many requests
Example request
curl --request PATCH "https://api.charterops.com/v1/empty-legs/$ID" \
--header "Authorization: Bearer $CHARTEROPS_API_KEY" \
--json @body.jsonBook or withdraw an empty leg
POST/v1/empty-legs/{id}/transitions
- Scope
write- Quota
- Does not count
Path parameters
idUUIDRequired
Headers
Idempotency-KeystringRequired1 to 200 characters.
Request body
tostringRequiredOne of
activebookedwithdrawn
Response
200 OK
Returns the empty leg object.
Errors
401Unauthorized403Forbidden404Not found409Conflict422Unprocessable content429Too many requests
Example request
curl --request POST "https://api.charterops.com/v1/empty-legs/$ID/transitions" \
--header "Authorization: Bearer $CHARTEROPS_API_KEY" \
--header "Idempotency-Key: $(uuidgen)" \
--json @body.jsonObjects
Empty leg
aircraftobjectCan be null3 fields in aircraft
idUUIDregistrationstringtypeobjectCan be null5 fields in type
categorystringOne of
pistonturboproplightmidsizesuper_midsizeheavyultra_long_rangehelicoptericao_designatorstringidUUIDmanufacturerstringmodelstring
aircraft_typeobject5 fields in aircraft_type
categorystringOne of
pistonturboproplightmidsizesuper_midsizeheavyultra_long_rangehelicoptericao_designatorstringidUUIDmanufacturerstringmodelstring
created_atdate-timecurrencystringdistance_nmintegerfromobject11 fields in from
citystringCan be nullcodestringcountrystringiatastringCan be nullicaostringCan be nullidUUIDlatitudenumberlongitudenumbernamestringregionstringCan be nulltimezonestringCan be null
idUUIDinquiry_availablebooleanis_expiredbooleanis_ownbooleannotesstringCan be nulloperatorobjectCan be null5 fields in operator
dba_namestringCan be nulldesignatorstringidUUIDlegal_namestringslugstringCan be null
operator_phonestringCan be nulloperator_savedbooleanorganization_namestringphoto_urlstringCan be nullphotosarray of objects6 fields in photos
heightintegeridUUIDseqintegerthumbnail_urlstringurlstringwidthinteger
price_centsintegerCan be nullseatsintegerCan be nullseller_idUUIDCan be nullslugstringCan be nullsourcestringCan be nullsource_namestringCan be nullsource_urlstringCan be nullstatusstringOne of
activebookedwithdrawntoobject11 fields in to
citystringCan be nullcodestringcountrystringiatastringCan be nullicaostringCan be nullidUUIDlatitudenumberlongitudenumbernamestringregionstringCan be nulltimezonestringCan be null
updated_atdate-timewindow_enddate-timewindow_startdate-time
Poster
legsintegernamestring