Get Quote PDF
curl --request GET \
--url https://qwoty.app/api/projects/{id}/pdf \
--header 'Authorization: <authorization>'import requests
url = "https://qwoty.app/api/projects/{id}/pdf"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://qwoty.app/api/projects/{id}/pdf', 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://qwoty.app/api/projects/{id}/pdf",
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: <authorization>"
],
]);
$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://qwoty.app/api/projects/{id}/pdf"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://qwoty.app/api/projects/{id}/pdf")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://qwoty.app/api/projects/{id}/pdf")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body(binary PDF file)
{
"error": "Project not found"
}
{
"error": "Failed to prepare PDF"
}
Quotes
Get Quote PDF
Download a quote PDF (signed when available, otherwise unsigned)
GET
/
api
/
projects
/
{id}
/
pdf
Get Quote PDF
curl --request GET \
--url https://qwoty.app/api/projects/{id}/pdf \
--header 'Authorization: <authorization>'import requests
url = "https://qwoty.app/api/projects/{id}/pdf"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://qwoty.app/api/projects/{id}/pdf', 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://qwoty.app/api/projects/{id}/pdf",
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: <authorization>"
],
]);
$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://qwoty.app/api/projects/{id}/pdf"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://qwoty.app/api/projects/{id}/pdf")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://qwoty.app/api/projects/{id}/pdf")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body(binary PDF file)
{
"error": "Project not found"
}
{
"error": "Failed to prepare PDF"
}
Authorization
string
required
Bearer token for authentication. Format:
Bearer qwoty_your_tokenPath Parameters
string
required
UUID of the project
Query Parameters
boolean
default:"false"
Force PDF regeneration before download. Use
true to bypass freshness checks.Behavior
- If the project is
acceptedand a signed PDF exists, the signed file is returned. - Otherwise, an unsigned PDF is returned (generated on demand if needed).
- The response is a file download with
application/pdfcontent type.
src/app/api/projects/[id]/pdf/route.ts (kept outside app/api/(bff)/ as a documented, tool-friendly HTTP contract).
Examples
curl --request GET \
--url "https://qwoty.app/api/projects/550e8400-e29b-41d4-a716-446655440000/pdf?force=false" \
--header "Authorization: Bearer qwoty_your_token" \
--output quote.pdf
const projectId = '550e8400-e29b-41d4-a716-446655440000'
const response = await fetch(
`https://qwoty.app/api/projects/${projectId}/pdf?force=false`,
{
headers: {
Authorization: 'Bearer qwoty_your_token',
},
},
)
if (!response.ok) {
const error = await response.json()
throw new Error(error.error)
}
const blob = await response.blob()
import requests
project_id = '550e8400-e29b-41d4-a716-446655440000'
response = requests.get(
f'https://qwoty.app/api/projects/{project_id}/pdf?force=false',
headers={
'Authorization': 'Bearer qwoty_your_token'
}
)
if response.status_code != 200:
raise Exception(response.json().get('error', 'Request failed'))
with open('quote.pdf', 'wb') as f:
f.write(response.content)
Response
string
Always
application/pdf on success.string
Attachment filename. Example:
quote-Q-2024-001.pdf or
quote-Q-2024-001-signed.pdf.(binary PDF file)
{
"error": "Project not found"
}
{
"error": "Failed to prepare PDF"
}
Was this page helpful?

