Deprecated. Use POST /v2/vehicles: the vehicles as JSON records in the request, all or nothing, idempotent, with no file to upload. This endpoint keeps working; its responses carry Deprecation and Link: </v2/vehicles>; rel="successor-version" headers. Its responses also carry Sunset: Fri, 30 Apr 2027 00:00:00 GMT: the endpoint is retired on April 30, 2027 (see the changelog).
Generate a presigned S3 upload URL for bulk importing vehicles via CSV file. After uploading the CSV to the returned URL, the system processes the file asynchronously and creates the vehicles.
Request
Headers
string
required
Your API key for authenticationExample:sk_live_1234567890abcdef
string
required
Your organization UUIDExample:a8315ef3-dd50-43f8-b7ce-d839e68d51fa
Body Parameters
string
required
Name of the CSV file to upload (must end in .csv)Example:fleet-vehicles-2025.csv
Response
string
Presigned S3 URL to upload the CSV file via PUT request
string
The file name as stored
string
UUID of the created file record for tracking
string
S3 key where the file will be stored
string
Confirmation message
Example
# Step 1: Get presigned upload URLRESPONSE=$(curl -s -X POST "https://api.dcycle.io/v1/vehicles/bulk/csv" \ -H "x-api-key: ${DCYCLE_API_KEY}" \ -H "x-organization-id: ${DCYCLE_ORG_ID}" \ -H "Content-Type: application/json" \ -d '{"file_name": "fleet-vehicles-2025.csv"}')UPLOAD_URL=$(echo $RESPONSE | jq -r '.upload_url')# Step 2: Upload the CSV to the presigned URLcurl -X PUT "$UPLOAD_URL" \ -H "Content-Type: text/csv" \ --data-binary @fleet-vehicles-2025.csv
import requestsimport osheaders = { "x-api-key": os.getenv("DCYCLE_API_KEY"), "x-organization-id": os.getenv("DCYCLE_ORG_ID"), "Content-Type": "application/json",}# Step 1: Get presigned upload URLresponse = requests.post( "https://api.dcycle.io/v1/vehicles/bulk/csv", headers=headers, json={"file_name": "fleet-vehicles-2025.csv"},)result = response.json()upload_url = result["upload_url"]print(f"File ID: {result['file_id']}")# Step 2: Upload the CSVwith open("fleet-vehicles-2025.csv", "rb") as f: requests.put(upload_url, data=f, headers={"Content-Type": "text/csv"})print("Upload complete — processing will begin shortly")