Overview
After uploading a file via TUS, you can call any API endpoint that supports post-upload processing. The same delegation token used for the upload authenticates the processing request.This endpoint pattern replaces the previous webhook-based flow. Your frontend now calls processing endpoints directly after upload, giving you immediate control over when processing occurs.
Authentication
Use the same delegation token that was used for the TUS upload:merchant_id used for billing, so no additional authentication is required.
Processing Flow
1
Upload Complete
After the TUS upload completes, your frontend receives the file URL.
2
Call Processing Endpoint
Your frontend sends a POST request with the file URL and delegation token to any supported endpoint.
3
Internal Fetch
The API fetches the file from storage using the provided URL.
4
Parsing
The parser extracts structured data from the uploaded file.
5
Usage Recording
Usage is recorded against the merchant’s ledger (from the JWT). See Usage & Billing.
6
Processing
The endpoint processes the extracted data (validation, classification, enrichment, etc.).
7
Response
Processed data and usage information are returned directly to your frontend.
Discovering Available Endpoints
Use the route discovery endpoint to find all endpoints that support post-upload processing:Example: Species Name Validation
This example shows how to validate botanical names from an uploaded file.Request
Headers:
Request Body:
Example Request
Example Response
Example: Pot Size Validation
This example shows how to classify pot sizes from an uploaded file.Request
Response
Error Responses
Token Reuse
The delegation token serves dual purposes:
- Upload authentication — Authorizes the TUS upload
- Processing authentication — Authorizes processing endpoints and identifies the merchant for billing
Best Practices
Call immediately after upload
Call immediately after upload
For the best user experience, call the processing endpoint as soon as the TUS upload completes. The delegation token has a 5-minute expiration, so don’t delay processing.
Handle the response in your UI
Handle the response in your UI
Since the data is returned directly, you can display results to your users immediately without waiting for webhooks or polling.
Use route discovery
Use route discovery
Call
/v1/routes/from-upload to dynamically discover available processing endpoints and their capabilities, rather than hardcoding endpoint paths.Check accepted file types
Check accepted file types
Each endpoint specifies which file types it can process. Use the
accepted_file_types field from route discovery to validate files before upload.Complete Integration Example
Related Documentation
- Upload Delegation — How to obtain delegation tokens
- Usage & Billing — How usage is tracked and billed
- Route Discovery — Endpoint to discover available processing routes

