curl --request POST \
--url https://api.prets.app/v1/quotes/cost/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "EUR",
"totalInclTax": 12500,
"address": {
"postalCode": "1000 AA",
"country": "NL",
"houseNumber": "42",
"city": "Brussels",
"street": "Kerkstraat",
"houseNumberAddition": "A"
},
"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": "<string>",
"totalNameplateCapacity": 13500,
"totalNameplatePower": 5000
}
]
}
'import requests
url = "https://api.prets.app/v1/quotes/cost/preview"
payload = {
"currency": "EUR",
"totalInclTax": 12500,
"address": {
"postalCode": "1000 AA",
"country": "NL",
"houseNumber": "42",
"city": "Brussels",
"street": "Kerkstraat",
"houseNumberAddition": "A"
},
"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": "<string>",
"totalNameplateCapacity": 13500,
"totalNameplatePower": 5000
}
]
}
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({
currency: 'EUR',
totalInclTax: 12500,
address: {
postalCode: '1000 AA',
country: 'NL',
houseNumber: '42',
city: 'Brussels',
street: 'Kerkstraat',
houseNumberAddition: 'A'
},
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: '<string>',
totalNameplateCapacity: 13500,
totalNameplatePower: 5000
}
]
})
};
fetch('https://api.prets.app/v1/quotes/cost/preview', 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/cost/preview",
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([
'currency' => 'EUR',
'totalInclTax' => 12500,
'address' => [
'postalCode' => '1000 AA',
'country' => 'NL',
'houseNumber' => '42',
'city' => 'Brussels',
'street' => 'Kerkstraat',
'houseNumberAddition' => 'A'
],
'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' => '<string>',
'totalNameplateCapacity' => 13500,
'totalNameplatePower' => 5000
]
]
]),
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/cost/preview"
payload := strings.NewReader("{\n \"currency\": \"EUR\",\n \"totalInclTax\": 12500,\n \"address\": {\n \"postalCode\": \"1000 AA\",\n \"country\": \"NL\",\n \"houseNumber\": \"42\",\n \"city\": \"Brussels\",\n \"street\": \"Kerkstraat\",\n \"houseNumberAddition\": \"A\"\n },\n \"lineItems\": [\n {\n \"type\": \"battery\",\n \"externalId\": \"QUOTE-2024-001-PV\",\n \"totalInclTax\": 12500,\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}")
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/cost/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"EUR\",\n \"totalInclTax\": 12500,\n \"address\": {\n \"postalCode\": \"1000 AA\",\n \"country\": \"NL\",\n \"houseNumber\": \"42\",\n \"city\": \"Brussels\",\n \"street\": \"Kerkstraat\",\n \"houseNumberAddition\": \"A\"\n },\n \"lineItems\": [\n {\n \"type\": \"battery\",\n \"externalId\": \"QUOTE-2024-001-PV\",\n \"totalInclTax\": 12500,\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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prets.app/v1/quotes/cost/preview")
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 \"currency\": \"EUR\",\n \"totalInclTax\": 12500,\n \"address\": {\n \"postalCode\": \"1000 AA\",\n \"country\": \"NL\",\n \"houseNumber\": \"42\",\n \"city\": \"Brussels\",\n \"street\": \"Kerkstraat\",\n \"houseNumberAddition\": \"A\"\n },\n \"lineItems\": [\n {\n \"type\": \"battery\",\n \"externalId\": \"QUOTE-2024-001-PV\",\n \"totalInclTax\": 12500,\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}"
response = http.request(request)
puts response.read_body{
"data": {
"currency": "EUR",
"content": [
{
"type": "text",
"name": "text_warning",
"value": "<string>"
}
],
"representativeExamples": [
{
"loanAmount": 123,
"numInstallments": 123,
"repaymentPeriodUnit": "months",
"monthlyCost": 123,
"totalPayable": 123,
"nominalAnnualRate": 123,
"annualCostRate": 123,
"lender": {
"name": "<string>"
},
"content": [
{
"type": "text",
"value": "<string>"
}
],
"lineItems": [
{
"externalId": "<string>",
"monthlyCost": 123
}
]
}
]
},
"links": {
"loanIndicationWidget": {
"png": "<string>",
"url": "<string>"
}
}
}Monthly payment preview
curl --request POST \
--url https://api.prets.app/v1/quotes/cost/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "EUR",
"totalInclTax": 12500,
"address": {
"postalCode": "1000 AA",
"country": "NL",
"houseNumber": "42",
"city": "Brussels",
"street": "Kerkstraat",
"houseNumberAddition": "A"
},
"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": "<string>",
"totalNameplateCapacity": 13500,
"totalNameplatePower": 5000
}
]
}
'import requests
url = "https://api.prets.app/v1/quotes/cost/preview"
payload = {
"currency": "EUR",
"totalInclTax": 12500,
"address": {
"postalCode": "1000 AA",
"country": "NL",
"houseNumber": "42",
"city": "Brussels",
"street": "Kerkstraat",
"houseNumberAddition": "A"
},
"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": "<string>",
"totalNameplateCapacity": 13500,
"totalNameplatePower": 5000
}
]
}
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({
currency: 'EUR',
totalInclTax: 12500,
address: {
postalCode: '1000 AA',
country: 'NL',
houseNumber: '42',
city: 'Brussels',
street: 'Kerkstraat',
houseNumberAddition: 'A'
},
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: '<string>',
totalNameplateCapacity: 13500,
totalNameplatePower: 5000
}
]
})
};
fetch('https://api.prets.app/v1/quotes/cost/preview', 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/cost/preview",
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([
'currency' => 'EUR',
'totalInclTax' => 12500,
'address' => [
'postalCode' => '1000 AA',
'country' => 'NL',
'houseNumber' => '42',
'city' => 'Brussels',
'street' => 'Kerkstraat',
'houseNumberAddition' => 'A'
],
'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' => '<string>',
'totalNameplateCapacity' => 13500,
'totalNameplatePower' => 5000
]
]
]),
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/cost/preview"
payload := strings.NewReader("{\n \"currency\": \"EUR\",\n \"totalInclTax\": 12500,\n \"address\": {\n \"postalCode\": \"1000 AA\",\n \"country\": \"NL\",\n \"houseNumber\": \"42\",\n \"city\": \"Brussels\",\n \"street\": \"Kerkstraat\",\n \"houseNumberAddition\": \"A\"\n },\n \"lineItems\": [\n {\n \"type\": \"battery\",\n \"externalId\": \"QUOTE-2024-001-PV\",\n \"totalInclTax\": 12500,\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}")
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/cost/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"EUR\",\n \"totalInclTax\": 12500,\n \"address\": {\n \"postalCode\": \"1000 AA\",\n \"country\": \"NL\",\n \"houseNumber\": \"42\",\n \"city\": \"Brussels\",\n \"street\": \"Kerkstraat\",\n \"houseNumberAddition\": \"A\"\n },\n \"lineItems\": [\n {\n \"type\": \"battery\",\n \"externalId\": \"QUOTE-2024-001-PV\",\n \"totalInclTax\": 12500,\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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prets.app/v1/quotes/cost/preview")
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 \"currency\": \"EUR\",\n \"totalInclTax\": 12500,\n \"address\": {\n \"postalCode\": \"1000 AA\",\n \"country\": \"NL\",\n \"houseNumber\": \"42\",\n \"city\": \"Brussels\",\n \"street\": \"Kerkstraat\",\n \"houseNumberAddition\": \"A\"\n },\n \"lineItems\": [\n {\n \"type\": \"battery\",\n \"externalId\": \"QUOTE-2024-001-PV\",\n \"totalInclTax\": 12500,\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}"
response = http.request(request)
puts response.read_body{
"data": {
"currency": "EUR",
"content": [
{
"type": "text",
"name": "text_warning",
"value": "<string>"
}
],
"representativeExamples": [
{
"loanAmount": 123,
"numInstallments": 123,
"repaymentPeriodUnit": "months",
"monthlyCost": 123,
"totalPayable": 123,
"nominalAnnualRate": 123,
"annualCostRate": 123,
"lender": {
"name": "<string>"
},
"content": [
{
"type": "text",
"value": "<string>"
}
],
"lineItems": [
{
"externalId": "<string>",
"monthlyCost": 123
}
]
}
]
},
"links": {
"loanIndicationWidget": {
"png": "<string>",
"url": "<string>"
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Target merchant organization slug.
1"prets"
BCP 47 language tag; defaults to nl-NL
"nl-NL"
Body
Indicative financing cost preview
Quote currency (currently EUR only)
EUR "EUR"
Quote total including tax in EUR
x >= 012500
Installation address; when omitted, eligibility may be broader where rules allow
- Option 1
- Option 2
Show child attributes
Show child attributes
Quote line items. When supplied, each representativeExample includes a lineItems[] breakdown pro-rating its monthlyCost across the lines.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
Show child attributes
Show child attributes
Response
Indicative representative examples and response-level content (text_warning). Per-example lineItems present when the request included lineItems. links.loanIndicationWidget present when merchant org context is available.
Was this page helpful?