Skip to main content
POST
/
v1
/
quotes
Create a quote
curl --request POST \
  --url https://api.prets.io/v1/quotes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "address": {
    "postalCode": "1000AA",
    "country": "NL",
    "houseNumber": "42",
    "streetAddress": "Rue de la Loi 200",
    "streetAddress2": "Apt 4B",
    "city": "Brussels",
    "street": "Kerkstraat",
    "houseNumberAddition": "A"
  },
  "contact": {
    "email": "jan.jansen@example.nl",
    "firstName": "Jan",
    "lastName": "Jansen",
    "phoneNumber": "+31612345678"
  },
  "currency": "EUR",
  "totalInclTax": 25000,
  "lineItems": [
    {
      "type": "battery",
      "totalInclTax": 12500,
      "totalNameplateCapacity": 13500,
      "totalNameplatePower": 5000,
      "externalId": "QUOTE-2024-001-PV",
      "totalExclTax": 10330.58,
      "unitPrice": 250,
      "productIdentifiers": {
        "brand": "Enphase",
        "manufacturerPartNumber": "SE7600H-US",
        "globalTradeItemNumber": "0885629362058"
      },
      "incentiveCodes": [
        "ISDE-2024-WP",
        "PROV-NH-2024"
      ],
      "description": "<string>"
    }
  ],
  "terms": [
    "subject_to_financing"
  ],
  "expiresAt": "2024-12-31T23:59:59Z",
  "sentAt": "2024-06-15T10:30:00Z",
  "totalExclTax": 20661.16,
  "description": "<string>",
  "tags": [
    "smartphone_only",
    "less_digitally_skilled"
  ],
  "quoteId": "<string>"
}
'
{
  "data": {
    "quoteId": "01ARZ3NDEKTSV4RRFFQ69G5AV",
    "createdAt": "2024-06-15T10:30:00.000Z",
    "updatedAt": "2024-06-15T10:30:00.000Z",
    "address": {
      "postalCode": "1000AA",
      "country": "NL",
      "houseNumber": "42",
      "streetAddress": "Rue de la Loi 200",
      "streetAddress2": "Apt 4B",
      "city": "Brussels",
      "street": "Kerkstraat",
      "houseNumberAddition": "A"
    },
    "contact": {
      "email": "jan.jansen@example.nl",
      "firstName": "Jan",
      "lastName": "Jansen",
      "phoneNumber": "+31612345678"
    },
    "currency": "EUR",
    "totalInclTax": 25000,
    "financing": {
      "status": "on_hold",
      "reason": "customer_unreachable"
    },
    "lineItems": [
      {
        "type": "battery",
        "totalInclTax": 12500,
        "totalNameplateCapacity": 13500,
        "totalNameplatePower": 5000,
        "lineItemId": "<string>",
        "externalId": "QUOTE-2024-001-PV",
        "totalExclTax": 10330.58,
        "unitPrice": 250,
        "productIdentifiers": {
          "brand": "Enphase",
          "manufacturerPartNumber": "SE7600H-US",
          "globalTradeItemNumber": "0885629362058"
        },
        "incentiveCodes": [
          "ISDE-2024-WP",
          "PROV-NH-2024"
        ],
        "description": "<string>"
      }
    ],
    "terms": [
      "subject_to_financing"
    ],
    "expiresAt": "2024-12-31T23:59:59Z",
    "sentAt": "2024-06-15T10:30:00Z",
    "totalExclTax": 20661.16,
    "description": "<string>",
    "tags": [
      "smartphone_only",
      "less_digitally_skilled"
    ]
  },
  "links": {
    "session": "https://app.prets.io/session?ticket=abc123"
  }
}

Authorizations

Authorization
string
header
required

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

Headers

Prets-Organization
string

The organization slug to create the quote for.

Example:

"prets"

Idempotency-Key
string<ulid>

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

Example:

"01ARZ3NDEKTSV4RRFFQ69G5AV"

Query Parameters

session
boolean | null
default:false

Include a single-use session URL in the response

Example:

true

Body

application/json

Create a new quote for sustainability home improvements

address
Dutch Address · object
required

Installation address (Dutch or international format based on country)

contact
object
required

Contact payload without server-assigned id (e.g. quote create/update body)

currency
enum<string>
required

Quote currency (currently EUR only)

Available options:
EUR
Example:

"EUR"

totalInclTax
number
required

Total quote amount including tax in EUR

Required range: x >= 0
Example:

25000

lineItems
(Battery · object | PV Solar Panels · object | Heat Pump · object | Wall Insulation · object | Sloped Roof Insulation · object | Flat Roof Insulation · object | Floor Insulation · object | Windows · object)[]
required

Line items for the quote (at least one required)

Minimum array length: 1

Battery storage system line item

terms
enum<string>[]

Quote terms and conditions

Available options:
subject_to_financing
Example:
["subject_to_financing"]
expiresAt
string<date>

Quote expiration timestamp (ISO 8601)

Example:

"2024-12-31T23:59:59Z"

sentAt
string<date>

Timestamp when quote was sent to customer (ISO 8601)

Example:

"2024-06-15T10:30:00Z"

totalExclTax
number

Total quote amount excluding tax in EUR

Required range: x >= 0
Example:

20661.16

description
string

Description of the quote

tags
enum<string>[]

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

Special circumstances and support requirements that ops team should be aware of

Available options:
smartphone_only,
landline_only,
less_digitally_skilled,
financially_complex,
moderately_complex_finances,
prefers_phone_contact,
prefers_email_contact
Example:
["smartphone_only", "less_digitally_skilled"]
quoteId
string<ulid>

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

Response

Quote created successfully

Quote creation response

data
object
required

A quote for sustainability home improvements

Hypermedia navigation links