Skip to main content
POST
/
v1
/
quotes
/
{quoteId}
/
attachments
Upload a quote attachment
curl --request POST \
  --url https://api.prets.io/v1/quotes/{quoteId}/attachments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filename": "contract.pdf",
  "contentType": "application/pdf",
  "contentLength": 1048576,
  "attachmentType": "invoice"
}
'
{
  "data": {
    "attachmentId": "att_01HQZX3Y8N9ABCDEFGHIJK1234",
    "expiresAt": "2024-12-31T14:30:00.000Z",
    "contentType": "application/pdf"
  },
  "links": {
    "upload": "https://bucket.s3.amazonaws.com/key?X-Amz-..."
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.prets.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

quoteId
string
required

Quote ID

Pattern: ^qot_[0-9A-HJKMNP-TV-Z]{26}$
Example:

"qot_01ARZ3NDEKTSV4RRFFQ69G5AV"

Body

application/json
filename
string
required

Name of the file to upload

Required string length: 1 - 255
Example:

"contract.pdf"

contentType
enum<string>
required

MIME type of the file

Available options:
application/pdf,
image/jpeg,
image/png,
image/webp
Example:

"application/pdf"

contentLength
integer
required

Size 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.

Required range: x <= 26214400
Example:

1048576

attachmentType
enum<string>

Type 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

Available options:
quote_copy,
nwf_installers_declarations,
invoice
Example:

"invoice"

Response

Presigned URL created successfully

Presigned upload URL and metadata, aligned with other quote API responses

data
object
required

Attachment resource and upload constraints

Hypermedia links for the attachment upload flow