Update part
PATCH
/api/v1/parts/{part_id}
const url = 'https://app.ayna.com/api/v1/parts/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"part_name":"example","manufacturer":"example","model":"example","serial_number":"example","purchase_date":"2026-04-15","installation_date":"2026-04-15","removal_date":"2026-04-15","total_cycles":1,"total_hours":1,"max_cycles":1,"max_hours":1,"last_inspection_date":"2026-04-15","next_inspection_due":"2026-04-15","status":"example","health_status":"example","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 PATCH \ --url https://app.ayna.com/api/v1/parts/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "part_name": "example", "manufacturer": "example", "model": "example", "serial_number": "example", "purchase_date": "2026-04-15", "installation_date": "2026-04-15", "removal_date": "2026-04-15", "total_cycles": 1, "total_hours": 1, "max_cycles": 1, "max_hours": 1, "last_inspection_date": "2026-04-15", "next_inspection_due": "2026-04-15", "status": "example", "health_status": "example", "notes": "example", "specifications": {} }'Update a part.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”part_id
required
Part Id
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
PartUpdateRequest
object
Example generated
{ "part_name": "example", "manufacturer": "example", "model": "example", "serial_number": "example", "purchase_date": "2026-04-15", "installation_date": "2026-04-15", "removal_date": "2026-04-15", "total_cycles": 1, "total_hours": 1, "max_cycles": 1, "max_hours": 1, "last_inspection_date": "2026-04-15", "next_inspection_due": "2026-04-15", "status": "example", "health_status": "example", "notes": "example", "specifications": {}}Responses
Section titled “Responses”OK
Media typeapplication/json
Response
object
key
additional properties
any
Example generated
{}