Skip to Content
Prets Developer Portal

Create a quote

POST
/v1/quotes

to try read requests with your account, or paste an API key into the Authorization field. Create an API key in the Partner Portal.

Creates a quote, or an indicative quote when terms includes indicative. Optional indicativeQuoteId links that indicative quote to the opportunity this quote creates or reuses, in the same write; a newly created opportunity then starts at Engaged when that quote's consumer submits this quote or already chose a preferred scenario. Add session=true to also get a consumer session URL. An indicative quote's session link opens its orientation page.

Returns the created quote. A retry with the same Idempotency-Key (or, without one, the same body) within 24 hours returns the original quote instead of creating another; links.session is present only when session=true.

Quote or indicative quote

A quote is the installer's final offer: a fixed amount for a specific product, which the consumer signs. This is the default. Existing integrations keep working unchanged.

An indicative quote is an estimate: an amount and a product, sent before a final quote exists. Add indicative to terms to create one, for example "terms": ["indicative"]. Only do this when you don't have a final quote yet.

Quote (default)Indicative quote
How to send itLeave indicative out of termsInclude indicative in terms
What it isFinal offerEstimate
Financing application can completeYesNo, Prets waits for a quote
financing.status after createnew_customerorientation

You can only mark a quote as indicative when you create it. While it is indicative, terms in the response includes indicative. If Prets later changes the quote's status, indicative disappears from terms; any other terms you sent stay.

More context: Indicative quotes.

Query Parameters

session?|

Include a single-use consumer session URL in links.session. An indicative quote's session link opens its orientation page.

Defaultfalse

Header Parameters

Idempotency-Key?string

Optional client-generated UUID for idempotent retries. If omitted, a key is derived from the request body.

Formatuuid

Request Body

application/json
  1. body

Create a new quote for sustainability home improvements

merchant?

Merchant that issued this quote, from Quote__c Merchant_Account__r.

address*|

Installation address (Dutch or international format based on country)

contact*

Contact payload on quote create. A blank firstName is treated as absent.

currency*"EUR"

Quote currency (currently EUR only)

Value in"EUR"
terms?array<>

Quote terms and conditions. Include indicative on create for a non-binding offer.

Items1 <= items
expiresAt?string

Quote expiration date (ISO 8601 calendar date)

Formatdate
sentAt?string

Date the quote was sent to the customer (ISO 8601 calendar date)

Formatdate
totalInclTax*number

Total quote amount including tax in EUR

Range0 <= value <= 250000
totalExclTax?number

Total quote amount excluding tax in EUR

Range0 <= value <= 250000
description?string

Description of the quote

Length1 <= length
intakeNote?string

Merchant context for Prets at quote handover

Length1 <= length
installer?

The installer the submitting merchant expects to do this job. Not necessarily the only contender, and not the merchant on this quote. Omitted when unknown.

externalId?string

External reference ID for merchant's system (quote level)

Length1 <= length
tags?array<>

Tags describing customer context and support needs to help ops team provide appropriate service

Items1 <= items
lineItems*array<|||||||||||||||||||||||||>

Line items for the quote (at least one required)

Items1 <= items
quoteId?string

Client-generated id (qot_{ULID}). When provided the server uses this as the canonical quote ID, enabling optimistic UI on the client.

Match^qot_[0-9A-HJKMNP-TV-Z]{26}$
indicativeQuoteId?string

Links that indicative quote to the opportunity this quote creates or reuses, in the same write.

Match^qot_[0-9A-HJKMNP-TV-Z]{26}$

Response Body

Quote created successfully

application/json
  1. response

Quote creation response

data*

A quote for sustainability home improvements

links?

Hypermedia navigation links

Authorization

bearerAuth
headerAuthorizationBearer <token>
Example Request
curl -X POST 'https://api.prets.app/v1/quotes' \  -H 'Content-Type: application/json' \  -d '{  "address": {    "country": "NL",    "postalCode": "1000 AA",    "houseNumber": "42"  },  "contact": {    "email": "jan.jansen@example.nl",    "lastName": "Jansen",    "phoneNumber": "+31612345678"  },  "currency": "EUR",  "totalInclTax": 25000,  "lineItems": [    {      "type": "battery",      "totalInclTax": 12500    }  ]}'
Example Response
{  "data": {    "quoteId": "qot_01ARZ3NDEKTSV4RRFFQ69G5FAV",    "opportunity": {      "opportunityId": "opp_01ARZ3NDEKTSV4RRFFQ69G5FAV"    },    "merchant": {      "name": "Test merchant",      "merchantId": "mer_01ARZ3NDEKTSV4RRFFQ69G5FAV",      "slug": "test-merchant"    },    "progressSummary": "The financing application is under review at the lender. Prets will follow up when an offer is available.",    "createdAt": "2024-06-15T10:30:00.000Z",    "updatedAt": "2024-06-15T10:30:00.000Z",    "address": {      "country": "NL",      "postalCode": "1000 AA",      "city": "Amsterdam",      "street": "Kerkstraat",      "houseNumber": "42",      "houseNumberAddition": "A",      "municipality": "Amsterdam"    },    "contact": {      "email": "jan.jansen@example.nl",      "firstName": "Jan",      "lastName": "Jansen",      "phoneNumber": "+31612345678"    },    "currency": "EUR",    "terms": [      "subject_to_financing"    ],    "expiresAt": "2024-12-31",    "sentAt": "2024-06-15",    "totalInclTax": 25000,    "totalExclTax": 20661.16,    "description": "Quote for residential solar panel installation.",    "intakeNote": "Partner must co-sign; installer visit booked for 12 March.",    "installer": {      "name": "Warmte Comfort B.V."    },    "externalId": "QUOTE-2024-001",    "tags": [      "smartphone_only",      "less_digitally_skilled"    ],    "financing": {      "phase": "new",      "status": "under_review",      "subStatus": {        "type": "none"      },      "method": [        "loan",        "subsidy"      ],      "waitingOn": "merchant",      "statusChangedAt": "2024-06-15T10:30:00.000Z"    },    "lineItems": [      {        "type": "battery",        "externalId": "QUOTE-2024-001-PV",        "totalInclTax": 12500,        "totalExclTax": 10330.58,        "unitPrice": 250,        "productIdentifiers": {          "brand": "Enphase",          "manufacturerPartNumber": "SE7600H-US",          "globalTradeItemNumber": "0885629362058"        },        "incentiveCodes": [          "ISDE-2024-WP",          "PROV-NH-2024"        ],        "description": "Including installation and commissioning",        "totalNameplateCapacity": 13500,        "totalNameplatePower": 5000,        "lineItemId": "lit_01ARZ3NDEKTSV4RRFFQ69G5FAV"      }    ]  },  "links": {    "portalQuote": "https://my.prets.app/organizations/acme/quotes/qot_01ARZ3NDEKTSV4RRFFQ69G5FAV",    "session": "https://prets.app/r/01ARZ3NDEKTSV4RRFFQ69G5FAV"  }}