TofuPilotTofuPilot
v2 Reference (Preview)/Batches

Create batch

Create a new batch without any units attached. Batch numbers are matched case-insensitively (e.g., "BATCH-001" and "batch-001" are considered the same).

API v2 Preview

The TofuPilot API v2.0 is currently in public preview and is subject to change as we stabilize until release (planned for Aug 2025).

Access

API KeyAccess LevelDescription
UserFullUsers can create batches
StationFullStations can create batches

Endpoint

POST/v2/batches
AuthorizationBearer <token>

API key for authentication. Use format: Bearer YOUR_API_KEY

In: header

numberstring

The batch number identifier

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

Response Body

from tofupilot.v2 import TofuPilot

# Initialize the TofuPilot client
client = TofuPilot()

# Execute the operation
result = client.batches.create(
    number="string"
)

# Handle response
print(result)
{
  "id": "string"
}
{
  "code": "BAD_REQUEST",
  "message": "Procedure name is required",
  "issues": []
}
{
  "code": "CONFLICT",
  "message": "A version with this tag already exists for the procedure",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

How is this guide?