Upload a quote attachment
to try read requests with your account, or paste an API key into the Authorization field. Create an API key in the Partner Portal.
Starts uploading a file, such as the signed quote or an invoice, to a quote. Upload the file bytes with an HTTP PUT to links.upload, sending the same Content-Type; Prets then attaches the file to the quote.
Returns the new attachment id and a presigned upload URL that expires after one hour (data.expiresAt). Returns 404 when the quote does not exist or is not visible to you.
quoteId*stringQuote ID
^qot_[0-9A-HJKMNP-TV-Z]{26}$application/json- body
Metadata for a quote attachment upload. Returns a short-lived presigned PUT URL; the client uploads the file bytes separately.
filename*stringName of the file to upload
1 <= length <= 255contentType*stringMIME type of the file
"application/pdf""image/jpeg""image/png""image/webp"contentLength*integerSize of the file in bytes (max 25MB). The limit accommodates high-resolution scans and multi-page documents while preventing abuse. Typical quote PDFs are 1-5MB.
0 < value <= 26214400attachmentType?stringType of attachment for categorization. quote_copy: original quote/offer document sent to customer; nwf_installers_declarations: NWF (Dutch subsidy) installer declaration forms; invoice: final invoice or billing document
"quote_copy""nwf_installers_declarations""invoice"The attachment id and a presigned URL to upload the file to
application/json- response
Presigned upload URL and metadata, aligned with other quote API responses
data*Attachment resource and upload constraints
links*Hypermedia links for the attachment upload flow
bearerAuthAuthorizationBearer <token>curl -X POST 'https://api.prets.app/v1/quotes/qot_01ARZ3NDEKTSV4RRFFQ69G5FAV/attachments' \ -H 'Content-Type: application/json' \ -d '{ "filename": "contract.pdf", "contentType": "application/pdf", "contentLength": 1048576}'{ "data": { "attachmentId": "att_01HQZX3Y8N9ABCDEFGHMJK1234", "expiresAt": "2024-12-31T14:30:00.000Z", "contentType": "application/pdf" }, "links": { "upload": "https://bucket.s3.amazonaws.com/key?X-Amz-..." }}