Get Presigned Upload URL
Get Presigned Upload URL
Generate a pre-signed S3 URL to upload a large transport route file directly
POST
Get Presigned Upload URL
Get Presigned Upload URL
Generate a pre-signed Amazon S3 URL that lets you upload a transport route file directly from the client to S3 — bypassing the API server entirely. This is the recommended approach for files larger than a few MB.Two-Step Upload Flow
- Call this endpoint to receive a
upload_urland afile_id. - PUT the raw file bytes to
upload_url. No authentication headers are needed for the S3 PUT — the signature is embedded in the URL.
Request
Headers
API key for authentication. Either this header or
Authorization is required.Example: sk_live_1234567890abcdefBearer token for authentication. Either this header or
x-api-key is required.Example: Bearer sk_live_1234567890abcdefYour organization UUID.Example:
a8315ef3-dd50-43f8-b7ce-d839e68d51faMust be
application/json.Body (JSON)
The name of the file being uploaded. Must end with
.csv, .xls, or .xlsx.Example: "q1_transport_routes.xlsx"The GHG Protocol scope 3 direction of these transport routes.
downstream— transport paid by your organization after the sale (Category 9)upstream— inbound transport paid by your organization (Category 4)
Response
Pre-signed S3 URL. Send the raw file bytes as the body of an HTTP
PUT request to this URL. The URL is time-limited — use it promptly after receiving it.Example: "https://dcycle-heavy-files.s3.eu-west-1.amazonaws.com/transport-and-distribution-downstream/...?X-Amz-Signature=..."UUID that identifies this upload batch. Use it to filter routes after processing via
GET /v1/transports?file_id=<file_id>.Example: "c4e8f2a1-5b6d-49e0-c7f9-2345678901bc"Sanitized version of the file name (alphanumeric characters only, extension preserved).Example:
"q1_transport_routes"The S3 object key where the file will be stored. Useful for audit trails or debugging.Example:
"heavy-files/transport-and-distribution-downstream/partner/org-uuid/c4e8f2a1.../user-uuid/q1_transport_routes.xlsx"Human-readable confirmation.Example:
"Upload pre-signed url generated"Example
Successful Response (Step 1)
Asynchronous Processing
After the S3 PUT completes, Dcycle picks up the file and processes it in the background:- Rows are parsed from the spreadsheet.
- Origin and destination addresses are geocoded.
- Emission factors are resolved and CO2e values are calculated.
file_id:
pending → active (success) or error as processing completes.
Common Errors
401 Unauthorized
Cause: Missing or invalid API key / Bearer token.422 Unprocessable Entity
Cause:file_name has an unsupported extension, or transport_direction is invalid.
file_name ends with .csv, .xls, or .xlsx, and that transport_direction is downstream or upstream.
S3 PUT Errors
If the S3 PUT returns a403 Forbidden, the presigned URL may have expired. Request a new URL and retry.
Related Endpoints
Direct File Upload
Upload smaller files directly through the API (multipart/form-data)
List Transport Routes
Retrieve transport routes, filter by file_id to track batch processing
Transport Combinations
Explore valid transport type and method combinations before creating routes
Transport Overview
Learn the full Transport API data model and workflow

