Skip to content

Record maintenance

A maintenance record follows the work from open to completed. Your maintenance or inventory system can create the record when work is planned and close it when it’s done.

Maintenance records take the aircraft’s uuid, not its MAVLink id. Both are on the aircraft:

Terminal window
curl https://app.ayna.com/api/v1/aircraft/3E0026000B51383236363639 \
-H "Authorization: Bearer $AYNA_TOKEN"
{
"success": true,
"data": {
"id": "3E0026000B51383236363639",
"uuid": "3c1f8a2e-6b4d-4e9a-8f1c-7d2e5b9a0c3f",
"name": "Hawk-2"
}
}
Terminal window
curl -X POST https://app.ayna.com/api/v1/maintenance/ \
-H "Authorization: Bearer $AYNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"aircraft_id": "3c1f8a2e-6b4d-4e9a-8f1c-7d2e5b9a0c3f",
"title": "Replace front-left arm",
"maintenance_type": "repair",
"description": "Hairline crack found at the motor mount during post-flight inspection.",
"priority": "high",
"scheduled_date": "2026-12-03",
"cost": 84.00,
"currency": "USD"
}'

title, maintenance_type and description are required.

Field Values
maintenance_type routine, repair, inspection, upgrade, emergency
priority low, medium, high, critical
Terminal window
# When work begins
curl -X POST https://app.ayna.com/api/v1/maintenance/{record_id}/start \
-H "Authorization: Bearer $AYNA_TOKEN"
# When it's done (sets the performed date to today)
curl -X POST https://app.ayna.com/api/v1/maintenance/{record_id}/complete \
-H "Authorization: Bearer $AYNA_TOKEN"

Add what was done, the final cost or notes with PATCH /maintenance/{record_id} before or after completing.