Get a quote
curl --request GET \
--url https://api.prets.app/v1/quotes/{quoteId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.prets.app/v1/quotes/{quoteId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.prets.app/v1/quotes/{quoteId}', 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/{quoteId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.prets.app/v1/quotes/{quoteId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.prets.app/v1/quotes/{quoteId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prets.app/v1/quotes/{quoteId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
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"
}
}Quotes
Get a quote
GET
/
v1
/
quotes
/
{quoteId}
Get a quote
curl --request GET \
--url https://api.prets.app/v1/quotes/{quoteId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.prets.app/v1/quotes/{quoteId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.prets.app/v1/quotes/{quoteId}', 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/{quoteId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.prets.app/v1/quotes/{quoteId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.prets.app/v1/quotes/{quoteId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prets.app/v1/quotes/{quoteId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
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"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the quote
Pattern:
^qot_[0-9A-HJKMNP-TV-Z]{26}$Example:
"qot_01ARZ3NDEKTSV4RRFFQ69G5AV"
Was this page helpful?
⌘I