API Reference (v2)Parts
Update part
Update a part's number or name. Identifies the part by its current number in the URL with case-insensitive matching.
Access
| API Key | Access Level | Description |
|---|---|---|
| User | Full | Users can update parts |
| Station | Unauthorized | Stations cannot update parts |
Endpoint
PATCH
/v2/parts/{number}AuthorizationBearer <token>
API key for authentication. Use format: Bearer YOUR_API_KEY
In: header
Path Parameters
numberstring
Part number of the part to update.
new_number?string
New unique identifier number for the part.
Match
^[a-zA-Z0-9_.:+-]+$Length
1 <= length <= 60name?string
New human-readable name for the part.
Length
1 <= length <= 255Response Body
from tofupilot.v2 import TofuPilot
# Initialize the TofuPilot client
client = TofuPilot()
# Execute the operation
result = client.parts.update(
number="string"
)
# Handle response
print(result){
"id": "550e8400-e29b-41d4-a716-446655440000",
"number": "PCB-V3.0",
"name": "Updated PCB Board",
"updated_at": "2024-01-15T10:30:00.000Z"
}{
"message": "Unauthorized",
"code": "UNAUTHORIZED",
"issues": []
}{
"message": "Not found",
"code": "NOT_FOUND",
"issues": []
}{
"message": "Conflict",
"code": "CONFLICT",
"issues": []
}{
"message": "Internal server error",
"code": "INTERNAL_SERVER_ERROR",
"issues": []
}How is this guide?
List and filter parts GET
Retrieve a paginated list of parts and components in your organization. Filter and search by part name, number, or revision number for inventory management.
Delete part DELETE
Permanently delete a part and all its revisions. This removes all associated data and cannot be undone.