API reference
Empty legs
Search, post and book empty legs.
Search available empty legs
GET/v1/empty-legs
- Scope
read- Quota
- Counts toward your allowance
Query parameters
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.
max_price_centsinteger0 or more.
registrationstring1 to 20 characters.
qstringUp to 120 characters.
sourcestringUp to 40 characters.
saved_operatorsbooleanDefaults to
false.operator_idUUIDsortstringDefaults 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 "$CHARTEROPS_API_URL/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 "$CHARTEROPS_API_URL/v1/empty-legs" \
--header "Authorization: Bearer $CHARTEROPS_API_KEY" \
--header "Idempotency-Key: $(uuidgen)" \
--json @body.jsonRead 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 "$CHARTEROPS_API_URL/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 "$CHARTEROPS_API_URL/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
bookedwithdrawn
Response
200 OK
Returns the empty leg object.
Errors
401Unauthorized403Forbidden404Not found409Conflict422Unprocessable content429Too many requests
Example request
curl --request POST "$CHARTEROPS_API_URL/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_nmintegerfromobject10 fields in from
citystringCan be nullcodestringcountrystringiatastringCan be nullicaostringCan be nullidUUIDlatitudenumberlongitudenumbernamestringtimezonestringCan be null
idUUIDinquiry_availablebooleanis_expiredbooleanis_ownbooleannotesstringCan be nulloperatorobjectCan be null4 fields in operator
dba_namestringCan be nulldesignatorstringidUUIDlegal_namestring
operator_phonestringCan be nulloperator_savedbooleanorganization_namestringphoto_urlstringCan be nullprice_centsintegerCan be nullseatsintegerCan be nullseller_idUUIDCan be nullsourcestringsource_namestringCan be nullsource_urlstringCan be nullstatusstringOne of
activebookedwithdrawntoobject10 fields in to
citystringCan be nullcodestringcountrystringiatastringCan be nullicaostringCan be nullidUUIDlatitudenumberlongitudenumbernamestringtimezonestringCan be null
updated_atdate-timewindow_enddate-timewindow_startdate-time