Preview proposal
curl --request POST \
--url https://api.vollna.com/v1/proposal-templates/{id}/preview \
--header 'Content-Type: application/json' \
--header 'X-API-TOKEN: <api-key>' \
--data '
{
"job": "<string>",
"draft": {}
}
'import requests
url = "https://api.vollna.com/v1/proposal-templates/{id}/preview"
payload = {
"job": "<string>",
"draft": {}
}
headers = {
"X-API-TOKEN": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-TOKEN': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({job: '<string>', draft: {}})
};
fetch('https://api.vollna.com/v1/proposal-templates/{id}/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.vollna.com/v1/proposal-templates/{id}/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([
'job' => '<string>',
'draft' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-TOKEN: <api-key>"
],
]);
$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.vollna.com/v1/proposal-templates/{id}/preview"
payload := strings.NewReader("{\n \"job\": \"<string>\",\n \"draft\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-TOKEN", "<api-key>")
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.vollna.com/v1/proposal-templates/{id}/preview")
.header("X-API-TOKEN", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"job\": \"<string>\",\n \"draft\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vollna.com/v1/proposal-templates/{id}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-TOKEN"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"job\": \"<string>\",\n \"draft\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"status": "ok",
"letter": "<string>",
"variant": "<string>",
"answers": [
{}
],
"template": {
"id": 123,
"name": "<string>",
"draft": true
},
"job": {
"projectId": 123,
"title": "<string>",
"url": "<string>"
},
"quota": {
"usedToday": 123,
"dailyLimit": 123,
"usedMonth": 123,
"monthlyLimit": 123
}
}
}{
"error": "Validation failed",
"message": "<string>",
"fields": {}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "Validation failed",
"message": "<string>",
"fields": {}
}{
"error": "Validation failed",
"message": "<string>",
"fields": {}
}{
"error": "Validation failed",
"message": "<string>",
"fields": {}
}{
"error": "preview_failed",
"status": "failed",
"message": "<string>",
"template": {},
"job": {},
"quota": {}
}Proposal Templates
Preview proposal
Writes a cover letter for one real job with the template, as the template editor’s preview does, and waits for it. That can take a few minutes. draft takes template fields to try without saving, in the PATCH /proposal-templates/ shape. Spends one preview from the plan’s preview quota
POST
/
proposal-templates
/
{id}
/
preview
Preview proposal
curl --request POST \
--url https://api.vollna.com/v1/proposal-templates/{id}/preview \
--header 'Content-Type: application/json' \
--header 'X-API-TOKEN: <api-key>' \
--data '
{
"job": "<string>",
"draft": {}
}
'import requests
url = "https://api.vollna.com/v1/proposal-templates/{id}/preview"
payload = {
"job": "<string>",
"draft": {}
}
headers = {
"X-API-TOKEN": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-TOKEN': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({job: '<string>', draft: {}})
};
fetch('https://api.vollna.com/v1/proposal-templates/{id}/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.vollna.com/v1/proposal-templates/{id}/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([
'job' => '<string>',
'draft' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-TOKEN: <api-key>"
],
]);
$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.vollna.com/v1/proposal-templates/{id}/preview"
payload := strings.NewReader("{\n \"job\": \"<string>\",\n \"draft\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-TOKEN", "<api-key>")
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.vollna.com/v1/proposal-templates/{id}/preview")
.header("X-API-TOKEN", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"job\": \"<string>\",\n \"draft\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vollna.com/v1/proposal-templates/{id}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-TOKEN"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"job\": \"<string>\",\n \"draft\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"status": "ok",
"letter": "<string>",
"variant": "<string>",
"answers": [
{}
],
"template": {
"id": 123,
"name": "<string>",
"draft": true
},
"job": {
"projectId": 123,
"title": "<string>",
"url": "<string>"
},
"quota": {
"usedToday": 123,
"dailyLimit": 123,
"usedMonth": 123,
"monthlyLimit": 123
}
}
}{
"error": "Validation failed",
"message": "<string>",
"fields": {}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "Validation failed",
"message": "<string>",
"fields": {}
}{
"error": "Validation failed",
"message": "<string>",
"fields": {}
}{
"error": "Validation failed",
"message": "<string>",
"fields": {}
}{
"error": "preview_failed",
"status": "failed",
"message": "<string>",
"template": {},
"job": {},
"quota": {}
}Authorizations
API token for authentication
Path Parameters
Template ID
Body
application/json
Response
Successful operation
Show child attributes
Show child attributes
Was this page helpful?