curl --request POST \
--url https://api.prets.app/v1/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": {
"postalCode": "1000 AA",
"country": "NL",
"houseNumber": "42",
"city": "Brussels",
"street": "Kerkstraat",
"houseNumberAddition": "A"
},
"contact": {
"email": "jan.jansen@example.nl",
"lastName": "Jansen",
"phoneNumber": "+31612345678",
"firstName": "Jan"
},
"currency": "EUR",
"totalInclTax": 25000,
"lineItems": [
{
"type": "battery",
"totalInclTax": 12500,
"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>",
"totalNameplateCapacity": 13500,
"totalNameplatePower": 5000
}
],
"terms": [
"subject_to_financing"
],
"expiresAt": "2024-12-31T23:59:59Z",
"sentAt": "2024-06-15T10:30:00Z",
"totalExclTax": 20661.16,
"description": "<string>",
"externalId": "QUOTE-2024-001",
"tags": [
"smartphone_only",
"less_digitally_skilled"
],
"quoteId": "<string>"
}
'import requests
url = "https://api.prets.app/v1/quotes"
payload = {
"address": {
"postalCode": "1000 AA",
"country": "NL",
"houseNumber": "42",
"city": "Brussels",
"street": "Kerkstraat",
"houseNumberAddition": "A"
},
"contact": {
"email": "jan.jansen@example.nl",
"lastName": "Jansen",
"phoneNumber": "+31612345678",
"firstName": "Jan"
},
"currency": "EUR",
"totalInclTax": 25000,
"lineItems": [
{
"type": "battery",
"totalInclTax": 12500,
"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>",
"totalNameplateCapacity": 13500,
"totalNameplatePower": 5000
}
],
"terms": ["subject_to_financing"],
"expiresAt": "2024-12-31T23:59:59Z",
"sentAt": "2024-06-15T10:30:00Z",
"totalExclTax": 20661.16,
"description": "<string>",
"externalId": "QUOTE-2024-001",
"tags": ["smartphone_only", "less_digitally_skilled"],
"quoteId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: {
postalCode: '1000 AA',
country: 'NL',
houseNumber: '42',
city: 'Brussels',
street: 'Kerkstraat',
houseNumberAddition: 'A'
},
contact: {
email: 'jan.jansen@example.nl',
lastName: 'Jansen',
phoneNumber: '+31612345678',
firstName: 'Jan'
},
currency: 'EUR',
totalInclTax: 25000,
lineItems: [
{
type: 'battery',
totalInclTax: 12500,
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>',
totalNameplateCapacity: 13500,
totalNameplatePower: 5000
}
],
terms: ['subject_to_financing'],
expiresAt: '2024-12-31T23:59:59Z',
sentAt: '2024-06-15T10:30:00Z',
totalExclTax: 20661.16,
description: '<string>',
externalId: 'QUOTE-2024-001',
tags: ['smartphone_only', 'less_digitally_skilled'],
quoteId: '<string>'
})
};
fetch('https://api.prets.app/v1/quotes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.prets.app/v1/quotes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => [
'postalCode' => '1000 AA',
'country' => 'NL',
'houseNumber' => '42',
'city' => 'Brussels',
'street' => 'Kerkstraat',
'houseNumberAddition' => 'A'
],
'contact' => [
'email' => 'jan.jansen@example.nl',
'lastName' => 'Jansen',
'phoneNumber' => '+31612345678',
'firstName' => 'Jan'
],
'currency' => 'EUR',
'totalInclTax' => 25000,
'lineItems' => [
[
'type' => 'battery',
'totalInclTax' => 12500,
'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>',
'totalNameplateCapacity' => 13500,
'totalNameplatePower' => 5000
]
],
'terms' => [
'subject_to_financing'
],
'expiresAt' => '2024-12-31T23:59:59Z',
'sentAt' => '2024-06-15T10:30:00Z',
'totalExclTax' => 20661.16,
'description' => '<string>',
'externalId' => 'QUOTE-2024-001',
'tags' => [
'smartphone_only',
'less_digitally_skilled'
],
'quoteId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.prets.app/v1/quotes"
payload := strings.NewReader("{\n \"address\": {\n \"postalCode\": \"1000 AA\",\n \"country\": \"NL\",\n \"houseNumber\": \"42\",\n \"city\": \"Brussels\",\n \"street\": \"Kerkstraat\",\n \"houseNumberAddition\": \"A\"\n },\n \"contact\": {\n \"email\": \"jan.jansen@example.nl\",\n \"lastName\": \"Jansen\",\n \"phoneNumber\": \"+31612345678\",\n \"firstName\": \"Jan\"\n },\n \"currency\": \"EUR\",\n \"totalInclTax\": 25000,\n \"lineItems\": [\n {\n \"type\": \"battery\",\n \"totalInclTax\": 12500,\n \"externalId\": \"QUOTE-2024-001-PV\",\n \"totalExclTax\": 10330.58,\n \"unitPrice\": 250,\n \"productIdentifiers\": {\n \"brand\": \"Enphase\",\n \"manufacturerPartNumber\": \"SE7600H-US\",\n \"globalTradeItemNumber\": \"0885629362058\"\n },\n \"incentiveCodes\": [\n \"ISDE-2024-WP\",\n \"PROV-NH-2024\"\n ],\n \"description\": \"<string>\",\n \"totalNameplateCapacity\": 13500,\n \"totalNameplatePower\": 5000\n }\n ],\n \"terms\": [\n \"subject_to_financing\"\n ],\n \"expiresAt\": \"2024-12-31T23:59:59Z\",\n \"sentAt\": \"2024-06-15T10:30:00Z\",\n \"totalExclTax\": 20661.16,\n \"description\": \"<string>\",\n \"externalId\": \"QUOTE-2024-001\",\n \"tags\": [\n \"smartphone_only\",\n \"less_digitally_skilled\"\n ],\n \"quoteId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.prets.app/v1/quotes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": {\n \"postalCode\": \"1000 AA\",\n \"country\": \"NL\",\n \"houseNumber\": \"42\",\n \"city\": \"Brussels\",\n \"street\": \"Kerkstraat\",\n \"houseNumberAddition\": \"A\"\n },\n \"contact\": {\n \"email\": \"jan.jansen@example.nl\",\n \"lastName\": \"Jansen\",\n \"phoneNumber\": \"+31612345678\",\n \"firstName\": \"Jan\"\n },\n \"currency\": \"EUR\",\n \"totalInclTax\": 25000,\n \"lineItems\": [\n {\n \"type\": \"battery\",\n \"totalInclTax\": 12500,\n \"externalId\": \"QUOTE-2024-001-PV\",\n \"totalExclTax\": 10330.58,\n \"unitPrice\": 250,\n \"productIdentifiers\": {\n \"brand\": \"Enphase\",\n \"manufacturerPartNumber\": \"SE7600H-US\",\n \"globalTradeItemNumber\": \"0885629362058\"\n },\n \"incentiveCodes\": [\n \"ISDE-2024-WP\",\n \"PROV-NH-2024\"\n ],\n \"description\": \"<string>\",\n \"totalNameplateCapacity\": 13500,\n \"totalNameplatePower\": 5000\n }\n ],\n \"terms\": [\n \"subject_to_financing\"\n ],\n \"expiresAt\": \"2024-12-31T23:59:59Z\",\n \"sentAt\": \"2024-06-15T10:30:00Z\",\n \"totalExclTax\": 20661.16,\n \"description\": \"<string>\",\n \"externalId\": \"QUOTE-2024-001\",\n \"tags\": [\n \"smartphone_only\",\n \"less_digitally_skilled\"\n ],\n \"quoteId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prets.app/v1/quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": {\n \"postalCode\": \"1000 AA\",\n \"country\": \"NL\",\n \"houseNumber\": \"42\",\n \"city\": \"Brussels\",\n \"street\": \"Kerkstraat\",\n \"houseNumberAddition\": \"A\"\n },\n \"contact\": {\n \"email\": \"jan.jansen@example.nl\",\n \"lastName\": \"Jansen\",\n \"phoneNumber\": \"+31612345678\",\n \"firstName\": \"Jan\"\n },\n \"currency\": \"EUR\",\n \"totalInclTax\": 25000,\n \"lineItems\": [\n {\n \"type\": \"battery\",\n \"totalInclTax\": 12500,\n \"externalId\": \"QUOTE-2024-001-PV\",\n \"totalExclTax\": 10330.58,\n \"unitPrice\": 250,\n \"productIdentifiers\": {\n \"brand\": \"Enphase\",\n \"manufacturerPartNumber\": \"SE7600H-US\",\n \"globalTradeItemNumber\": \"0885629362058\"\n },\n \"incentiveCodes\": [\n \"ISDE-2024-WP\",\n \"PROV-NH-2024\"\n ],\n \"description\": \"<string>\",\n \"totalNameplateCapacity\": 13500,\n \"totalNameplatePower\": 5000\n }\n ],\n \"terms\": [\n \"subject_to_financing\"\n ],\n \"expiresAt\": \"2024-12-31T23:59:59Z\",\n \"sentAt\": \"2024-06-15T10:30:00Z\",\n \"totalExclTax\": 20661.16,\n \"description\": \"<string>\",\n \"externalId\": \"QUOTE-2024-001\",\n \"tags\": [\n \"smartphone_only\",\n \"less_digitally_skilled\"\n ],\n \"quoteId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"quoteId": "qot_01ARZ3NDEKTSV4RRFFQ69G5AV",
"opportunity": {
"opportunityId": "opp_01ARZ3NDEKTSV4RRFFQ69G5AV"
},
"createdAt": "2024-06-15T10:30:00.000Z",
"updatedAt": "2024-06-15T10:30:00.000Z",
"address": {
"postalCode": "1000 AA",
"country": "NL",
"houseNumber": "42",
"city": "Brussels",
"street": "Kerkstraat",
"houseNumberAddition": "A"
},
"contact": {
"email": "jan.jansen@example.nl",
"lastName": "Jansen",
"phoneNumber": "+31612345678",
"firstName": "Jan"
},
"currency": "EUR",
"totalInclTax": 25000,
"financing": {
"subStatus": {
"type": "none"
},
"method": [
"loan",
"subsidy"
],
"statusChangedAt": "2024-06-15T10:30:00.000Z"
},
"lineItems": [
{
"type": "battery",
"totalInclTax": 12500,
"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>",
"totalNameplateCapacity": 13500,
"totalNameplatePower": 5000
}
],
"terms": [
"subject_to_financing"
],
"expiresAt": "2024-12-31T23:59:59Z",
"sentAt": "2024-06-15T10:30:00Z",
"totalExclTax": 20661.16,
"description": "<string>",
"externalId": "QUOTE-2024-001",
"tags": [
"smartphone_only",
"less_digitally_skilled"
]
},
"links": {
"portalQuote": "https://my.prets.app/orgs/acme/quotes/qot_01ARZ3NDEKTSV4RRFFQ69G5AV",
"session": "https://app.prets.io/session?ticket=abc123"
}
}Create a quote
curl --request POST \
--url https://api.prets.app/v1/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": {
"postalCode": "1000 AA",
"country": "NL",
"houseNumber": "42",
"city": "Brussels",
"street": "Kerkstraat",
"houseNumberAddition": "A"
},
"contact": {
"email": "jan.jansen@example.nl",
"lastName": "Jansen",
"phoneNumber": "+31612345678",
"firstName": "Jan"
},
"currency": "EUR",
"totalInclTax": 25000,
"lineItems": [
{
"type": "battery",
"totalInclTax": 12500,
"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>",
"totalNameplateCapacity": 13500,
"totalNameplatePower": 5000
}
],
"terms": [
"subject_to_financing"
],
"expiresAt": "2024-12-31T23:59:59Z",
"sentAt": "2024-06-15T10:30:00Z",
"totalExclTax": 20661.16,
"description": "<string>",
"externalId": "QUOTE-2024-001",
"tags": [
"smartphone_only",
"less_digitally_skilled"
],
"quoteId": "<string>"
}
'import requests
url = "https://api.prets.app/v1/quotes"
payload = {
"address": {
"postalCode": "1000 AA",
"country": "NL",
"houseNumber": "42",
"city": "Brussels",
"street": "Kerkstraat",
"houseNumberAddition": "A"
},
"contact": {
"email": "jan.jansen@example.nl",
"lastName": "Jansen",
"phoneNumber": "+31612345678",
"firstName": "Jan"
},
"currency": "EUR",
"totalInclTax": 25000,
"lineItems": [
{
"type": "battery",
"totalInclTax": 12500,
"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>",
"totalNameplateCapacity": 13500,
"totalNameplatePower": 5000
}
],
"terms": ["subject_to_financing"],
"expiresAt": "2024-12-31T23:59:59Z",
"sentAt": "2024-06-15T10:30:00Z",
"totalExclTax": 20661.16,
"description": "<string>",
"externalId": "QUOTE-2024-001",
"tags": ["smartphone_only", "less_digitally_skilled"],
"quoteId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: {
postalCode: '1000 AA',
country: 'NL',
houseNumber: '42',
city: 'Brussels',
street: 'Kerkstraat',
houseNumberAddition: 'A'
},
contact: {
email: 'jan.jansen@example.nl',
lastName: 'Jansen',
phoneNumber: '+31612345678',
firstName: 'Jan'
},
currency: 'EUR',
totalInclTax: 25000,
lineItems: [
{
type: 'battery',
totalInclTax: 12500,
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>',
totalNameplateCapacity: 13500,
totalNameplatePower: 5000
}
],
terms: ['subject_to_financing'],
expiresAt: '2024-12-31T23:59:59Z',
sentAt: '2024-06-15T10:30:00Z',
totalExclTax: 20661.16,
description: '<string>',
externalId: 'QUOTE-2024-001',
tags: ['smartphone_only', 'less_digitally_skilled'],
quoteId: '<string>'
})
};
fetch('https://api.prets.app/v1/quotes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.prets.app/v1/quotes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => [
'postalCode' => '1000 AA',
'country' => 'NL',
'houseNumber' => '42',
'city' => 'Brussels',
'street' => 'Kerkstraat',
'houseNumberAddition' => 'A'
],
'contact' => [
'email' => 'jan.jansen@example.nl',
'lastName' => 'Jansen',
'phoneNumber' => '+31612345678',
'firstName' => 'Jan'
],
'currency' => 'EUR',
'totalInclTax' => 25000,
'lineItems' => [
[
'type' => 'battery',
'totalInclTax' => 12500,
'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>',
'totalNameplateCapacity' => 13500,
'totalNameplatePower' => 5000
]
],
'terms' => [
'subject_to_financing'
],
'expiresAt' => '2024-12-31T23:59:59Z',
'sentAt' => '2024-06-15T10:30:00Z',
'totalExclTax' => 20661.16,
'description' => '<string>',
'externalId' => 'QUOTE-2024-001',
'tags' => [
'smartphone_only',
'less_digitally_skilled'
],
'quoteId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.prets.app/v1/quotes"
payload := strings.NewReader("{\n \"address\": {\n \"postalCode\": \"1000 AA\",\n \"country\": \"NL\",\n \"houseNumber\": \"42\",\n \"city\": \"Brussels\",\n \"street\": \"Kerkstraat\",\n \"houseNumberAddition\": \"A\"\n },\n \"contact\": {\n \"email\": \"jan.jansen@example.nl\",\n \"lastName\": \"Jansen\",\n \"phoneNumber\": \"+31612345678\",\n \"firstName\": \"Jan\"\n },\n \"currency\": \"EUR\",\n \"totalInclTax\": 25000,\n \"lineItems\": [\n {\n \"type\": \"battery\",\n \"totalInclTax\": 12500,\n \"externalId\": \"QUOTE-2024-001-PV\",\n \"totalExclTax\": 10330.58,\n \"unitPrice\": 250,\n \"productIdentifiers\": {\n \"brand\": \"Enphase\",\n \"manufacturerPartNumber\": \"SE7600H-US\",\n \"globalTradeItemNumber\": \"0885629362058\"\n },\n \"incentiveCodes\": [\n \"ISDE-2024-WP\",\n \"PROV-NH-2024\"\n ],\n \"description\": \"<string>\",\n \"totalNameplateCapacity\": 13500,\n \"totalNameplatePower\": 5000\n }\n ],\n \"terms\": [\n \"subject_to_financing\"\n ],\n \"expiresAt\": \"2024-12-31T23:59:59Z\",\n \"sentAt\": \"2024-06-15T10:30:00Z\",\n \"totalExclTax\": 20661.16,\n \"description\": \"<string>\",\n \"externalId\": \"QUOTE-2024-001\",\n \"tags\": [\n \"smartphone_only\",\n \"less_digitally_skilled\"\n ],\n \"quoteId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.prets.app/v1/quotes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": {\n \"postalCode\": \"1000 AA\",\n \"country\": \"NL\",\n \"houseNumber\": \"42\",\n \"city\": \"Brussels\",\n \"street\": \"Kerkstraat\",\n \"houseNumberAddition\": \"A\"\n },\n \"contact\": {\n \"email\": \"jan.jansen@example.nl\",\n \"lastName\": \"Jansen\",\n \"phoneNumber\": \"+31612345678\",\n \"firstName\": \"Jan\"\n },\n \"currency\": \"EUR\",\n \"totalInclTax\": 25000,\n \"lineItems\": [\n {\n \"type\": \"battery\",\n \"totalInclTax\": 12500,\n \"externalId\": \"QUOTE-2024-001-PV\",\n \"totalExclTax\": 10330.58,\n \"unitPrice\": 250,\n \"productIdentifiers\": {\n \"brand\": \"Enphase\",\n \"manufacturerPartNumber\": \"SE7600H-US\",\n \"globalTradeItemNumber\": \"0885629362058\"\n },\n \"incentiveCodes\": [\n \"ISDE-2024-WP\",\n \"PROV-NH-2024\"\n ],\n \"description\": \"<string>\",\n \"totalNameplateCapacity\": 13500,\n \"totalNameplatePower\": 5000\n }\n ],\n \"terms\": [\n \"subject_to_financing\"\n ],\n \"expiresAt\": \"2024-12-31T23:59:59Z\",\n \"sentAt\": \"2024-06-15T10:30:00Z\",\n \"totalExclTax\": 20661.16,\n \"description\": \"<string>\",\n \"externalId\": \"QUOTE-2024-001\",\n \"tags\": [\n \"smartphone_only\",\n \"less_digitally_skilled\"\n ],\n \"quoteId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prets.app/v1/quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": {\n \"postalCode\": \"1000 AA\",\n \"country\": \"NL\",\n \"houseNumber\": \"42\",\n \"city\": \"Brussels\",\n \"street\": \"Kerkstraat\",\n \"houseNumberAddition\": \"A\"\n },\n \"contact\": {\n \"email\": \"jan.jansen@example.nl\",\n \"lastName\": \"Jansen\",\n \"phoneNumber\": \"+31612345678\",\n \"firstName\": \"Jan\"\n },\n \"currency\": \"EUR\",\n \"totalInclTax\": 25000,\n \"lineItems\": [\n {\n \"type\": \"battery\",\n \"totalInclTax\": 12500,\n \"externalId\": \"QUOTE-2024-001-PV\",\n \"totalExclTax\": 10330.58,\n \"unitPrice\": 250,\n \"productIdentifiers\": {\n \"brand\": \"Enphase\",\n \"manufacturerPartNumber\": \"SE7600H-US\",\n \"globalTradeItemNumber\": \"0885629362058\"\n },\n \"incentiveCodes\": [\n \"ISDE-2024-WP\",\n \"PROV-NH-2024\"\n ],\n \"description\": \"<string>\",\n \"totalNameplateCapacity\": 13500,\n \"totalNameplatePower\": 5000\n }\n ],\n \"terms\": [\n \"subject_to_financing\"\n ],\n \"expiresAt\": \"2024-12-31T23:59:59Z\",\n \"sentAt\": \"2024-06-15T10:30:00Z\",\n \"totalExclTax\": 20661.16,\n \"description\": \"<string>\",\n \"externalId\": \"QUOTE-2024-001\",\n \"tags\": [\n \"smartphone_only\",\n \"less_digitally_skilled\"\n ],\n \"quoteId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"quoteId": "qot_01ARZ3NDEKTSV4RRFFQ69G5AV",
"opportunity": {
"opportunityId": "opp_01ARZ3NDEKTSV4RRFFQ69G5AV"
},
"createdAt": "2024-06-15T10:30:00.000Z",
"updatedAt": "2024-06-15T10:30:00.000Z",
"address": {
"postalCode": "1000 AA",
"country": "NL",
"houseNumber": "42",
"city": "Brussels",
"street": "Kerkstraat",
"houseNumberAddition": "A"
},
"contact": {
"email": "jan.jansen@example.nl",
"lastName": "Jansen",
"phoneNumber": "+31612345678",
"firstName": "Jan"
},
"currency": "EUR",
"totalInclTax": 25000,
"financing": {
"subStatus": {
"type": "none"
},
"method": [
"loan",
"subsidy"
],
"statusChangedAt": "2024-06-15T10:30:00.000Z"
},
"lineItems": [
{
"type": "battery",
"totalInclTax": 12500,
"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>",
"totalNameplateCapacity": 13500,
"totalNameplatePower": 5000
}
],
"terms": [
"subject_to_financing"
],
"expiresAt": "2024-12-31T23:59:59Z",
"sentAt": "2024-06-15T10:30:00Z",
"totalExclTax": 20661.16,
"description": "<string>",
"externalId": "QUOTE-2024-001",
"tags": [
"smartphone_only",
"less_digitally_skilled"
]
},
"links": {
"portalQuote": "https://my.prets.app/orgs/acme/quotes/qot_01ARZ3NDEKTSV4RRFFQ69G5AV",
"session": "https://app.prets.io/session?ticket=abc123"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Target merchant organization slug.
"prets"
Optional client-generated UUID for idempotent retries. If omitted, a key is derived from the request body.
"550e8400-e29b-41d4-a716-446655440000"
Query Parameters
Include a single-use session URL in the response
true
Body
Create a new quote for sustainability home improvements
Installation address (Dutch or international format based on country)
- Option 1
- Option 2
Show child attributes
Show child attributes
Contact payload without server-assigned id (e.g. quote create/update body)
Show child attributes
Show child attributes
Quote currency (currently EUR only)
EUR "EUR"
Total quote amount including tax in EUR
0 <= x <= 25000025000
Line items for the quote (at least one required)
1Battery storage system line item
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
Show child attributes
Show child attributes
Quote terms and conditions
1Quote term and condition
subject_to_financing ["subject_to_financing"]
Quote expiration timestamp (ISO 8601)
"2024-12-31T23:59:59Z"
Timestamp when quote was sent to customer (ISO 8601)
"2024-06-15T10:30:00Z"
Total quote amount excluding tax in EUR
0 <= x <= 25000020661.16
Description of the quote
1External reference ID for merchant's system (quote level)
1"QUOTE-2024-001"
Tags describing customer context and support needs to help ops team provide appropriate service
1Special circumstances and support requirements that ops team should be aware of
smartphone_only, landline_only, less_digitally_skilled, financially_complex, moderately_complex_finances, prefers_phone_contact, prefers_email_contact ["smartphone_only", "less_digitally_skilled"]
Client-generated id (qot_{ULID}). When provided the server uses this as the canonical quote ID, enabling optimistic UI on the client.
^qot_[0-9A-HJKMNP-TV-Z]{26}$Was this page helpful?