TofuPilotTofuPilot
API Reference (v2)PartsRevisions

Update part revision

Update a part revision's number or image. Identifies the revision by part number and revision number in the URL.

PATCH/v2/parts/{part_number}/revisions/{revision_number}
AuthorizationBearer <token>

API key for authentication. Use format: Bearer YOUR_API_KEY

In: header

Path Parameters

part_numberstring

Part number that the revision belongs to.

revision_numberstring

Current revision number to update.

number?string

New revision number to set.

Match^[a-zA-Z0-9_.:+-]+$
Length1 <= length <= 60
image_id?string

Upload ID for the revision image, or empty string to remove image

Response Body

from tofupilot.v2 import TofuPilot

# Initialize the TofuPilot client
client = TofuPilot()

# Execute the operation
result = client.parts.revisions.update(
    part_number="string",
    revision_number="string"
)

# Handle response
print(result)
{
  "id": "550e8400-e29b-41d4-a716-446655440000"
}
{
  "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?