Register a part
POST
/api/v1/parts/
const url = 'https://app.ayna.com/api/v1/parts/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"aircraft_id":"example","drone_id":"example","part_type":"example","part_name":"example","manufacturer":"example","model":"example","serial_number":"example","purchase_date":"2026-04-15","installation_date":"2026-04-15","max_cycles":1,"max_hours":1,"notes":"example","specifications":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.ayna.com/api/v1/parts/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "aircraft_id": "example", "drone_id": "example", "part_type": "example", "part_name": "example", "manufacturer": "example", "model": "example", "serial_number": "example", "purchase_date": "2026-04-15", "installation_date": "2026-04-15", "max_cycles": 1, "max_hours": 1, "notes": "example", "specifications": {} }'Register a new part on a drone.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
PartCreateRequest
object
part_type
required
Part Type
Battery, motor, propeller, gps, camera, esc, frame, controller, sensor, other
string
Example generated
{ "aircraft_id": "example", "drone_id": "example", "part_type": "example", "part_name": "example", "manufacturer": "example", "model": "example", "serial_number": "example", "purchase_date": "2026-04-15", "installation_date": "2026-04-15", "max_cycles": 1, "max_hours": 1, "notes": "example", "specifications": {}}Responses
Section titled “Responses”Created
Media typeapplication/json
Response
object
key
additional properties
any
Example generated
{}