post
https://api.cargoai.co/solutions/ai/uploads
Request a short-lived, presigned URL for uploading a PDF or image, for use with AWB Data Extraction.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
This endpoint generates a temporary, secured URL that lets you upload a PDF without exposing your credentials.
The response contains three fields:
uploadUrl: the pre-signed URL to upload your file tos3Url: the internal reference to pass to the AWB Data Extraction endpoint once the upload is doneexpiresIn: validity in seconds (3600, i.e. 1 hour) for bothuploadUrlands3Url
Steps:
- Call this endpoint to obtain
uploadUrl,s3UrlandexpiresIn. - Send your PDF to
uploadUrlwith an HTTPPUTrequest, settingContent-Typeto PDF. No other headers are required. A successful upload returns200. - Call AWB Data Extraction with
type: PDFanddataset to thes3Urlvalue from step 1. The response returns the extracted AWB details (more details can be found in the dedicated page).
Important: the upload returns 200 as long as the URL is valid, including for an empty file or a file that is not a PDF. The content itself is only validated at the extraction step, so a 200 here confirms the transfer, not the validity of your document.
Both URLs expire 1 hour after they are issued, so the extraction call must be made within that window. If they expire, call this endpoint again to get a fresh pair and re-upload the file.
curl --request PUT \
--url '<uploadUrl>' \
--header 'Content-Disposition: attachment; filename="000-11223343.pdf"' \
--header 'content-type: application/pdf' \
--data @000-11223343.pdf