π€ File Upload
File Upload
Complete File Upload Workflow
Step 1: Request Presigned URL
POST /api/files/upload/presigned-url
{
"filename": "document.pdf",
"sizeBytes": 1024000,
"mimeType": "application/pdf",
"entityType": "rfq"
}
β Response: { fileId: "67eb9e88-...", presignedUrl: "...", ... }
Step 2: Upload File to Presigned URL
PUT <presignedUrl>
Content-Type: <uploadInstructions.contentType>
[File binary data]
β Response: 200 OK
Step 3: Use fileId in RFQ
POST /api/public/v1/rfqs
{
"services": [{
"serviceId": "...",
"type": "NON_LINGUISTICS",
"targetMarketIds": ["..."],
"assetFileIds": ["67eb9e88-7962-41a1-9695-f2051a968728"]
}]
}When to Upload Files
File Requirements
Using File IDs in RFQs
Upload Files for RFQ Service Assets
How It Works
Complete File Upload Workflow
Step 1: Upload File for a Specific Service
POST /api/public/v1/files/upload/presigned-url
Content-Type: multipart/form-data
- file: [binary file data]
β Response: { success: true, data: { fileId: "91cc2de4-293b-4c37-b257-5d39cd1133da" } }
Step 2: Upload Another File for a Different Service (if needed)
POST /api/public/v1/files/upload/presigned-url
Content-Type: multipart/form-data
- file: [another binary file data]
β Response: { success: true, data: { fileId: "dc68867c-beb5-46e3-b291-47978c94783b" } }
Step 3: Create or Update RFQ with fileIds in Service Objects
POST /api/public/v1/rfqs
{
"companyId": "...",
"projectName": "My Project",
"services": [
{
"serviceId": "33cecd1e-6629-41d8-bc65-f1ad832a2bd2",
"type": "NON_LINGUISTICS",
"targetMarketIds": ["03b91040-5931-4c24-9310-7a33861edde2"],
"assetFileIds": ["91cc2de4-293b-4c37-b257-5d39cd1133da"] β File for this service
},
{
"serviceId": "7ff59ce3-d3e7-4898-ac35-63b38531c17d",
"type": "NON_LINGUISTICS",
"targetMarketIds": ["55247866-be7d-4dad-8cea-5e3a71a8e2a6"],
"assetFileIds": ["dc68867c-beb5-46e3-b291-47978c94783b"] β Different file for this service
}
]
}
OR Update an existing RFQ:
PATCH /api/public/v1/rfqs/{rfqId}
{
"services": [
{
"id": "00000000-0000-0000-0000-000000000001",
"type": "NON_LINGUISTICS",
"serviceUUID": "33cecd1e-6629-41d8-bc65-f1ad832a2bd2",
"targetMarkets": [{"targetMarketId": "03b91040-5931-4c24-9310-7a33861edde2"}],
"assets": [
{
"type": "FILE",
"assetType": "SOURCE",
"fileId": "91cc2de4-293b-4c37-b257-5d39cd1133da"
}
]
}
]
}File Requirements
Using File IDs in RFQ Services
Authorizations
AuthorizationstringRequired
JWT access token obtained from POST /api/credentials/token
How to authenticate:
- Generate API credentials from the Adaptria Portal
- Exchange credentials for a token:
POST /api/credentials/token - Include the token in all requests:
Authorization: Bearer <token>
Token Expiration: 1 hour (3600 seconds)
Body
filestring Β· binaryRequired
File to upload (binary). Max size: 100MB. Supported types: PDF, Word, Excel, PowerPoint, Images, Videos, Audio, ZIP
Responses
201
File uploaded successfully. The file is uploaded internally, metadata is saved automatically, and only fileId is returned (ready to use in RFQs).
application/json
400
Invalid request (invalid file type, size too large, etc.)
401
Authentication required
403
Access denied
post
/api/public/v1/files/upload/presigned-urlLast updated