curl --request POST \
--url https://api.dairo.app/v1/letters/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pdfBase64": "<string>",
"file": {
"attachmentId": "<string>",
"messageId": "<string>",
"objectId": "<string>"
},
"templateId": "<string>",
"templateData": {},
"to": {
"country": "<string>",
"name": "<string>",
"company": "<string>",
"street": "<string>",
"houseNumber": "<string>",
"poBox": "<string>",
"addressLine2": "<string>",
"postalCode": "<string>",
"city": "<string>"
},
"from": {
"country": "<string>",
"name": "<string>",
"company": "<string>",
"street": "<string>",
"houseNumber": "<string>",
"poBox": "<string>",
"addressLine2": "<string>",
"postalCode": "<string>",
"city": "<string>"
},
"print": {},
"maxPages": 2,
"payment": {
"creditor": {
"name": "<string>",
"iban": "<string>",
"country": "<string>",
"bic": "<string>",
"street": "<string>",
"houseNumber": "<string>",
"postalCode": "<string>",
"city": "<string>"
},
"amount": 123,
"reference": "<string>",
"message": "<string>",
"debtor": {
"name": "<string>",
"street": "<string>",
"houseNumber": "<string>",
"postalCode": "<string>",
"city": "<string>",
"country": "<string>"
}
}
}
'import requests
url = "https://api.dairo.app/v1/letters/verify"
payload = {
"pdfBase64": "<string>",
"file": {
"attachmentId": "<string>",
"messageId": "<string>",
"objectId": "<string>"
},
"templateId": "<string>",
"templateData": {},
"to": {
"country": "<string>",
"name": "<string>",
"company": "<string>",
"street": "<string>",
"houseNumber": "<string>",
"poBox": "<string>",
"addressLine2": "<string>",
"postalCode": "<string>",
"city": "<string>"
},
"from": {
"country": "<string>",
"name": "<string>",
"company": "<string>",
"street": "<string>",
"houseNumber": "<string>",
"poBox": "<string>",
"addressLine2": "<string>",
"postalCode": "<string>",
"city": "<string>"
},
"print": {},
"maxPages": 2,
"payment": {
"creditor": {
"name": "<string>",
"iban": "<string>",
"country": "<string>",
"bic": "<string>",
"street": "<string>",
"houseNumber": "<string>",
"postalCode": "<string>",
"city": "<string>"
},
"amount": 123,
"reference": "<string>",
"message": "<string>",
"debtor": {
"name": "<string>",
"street": "<string>",
"houseNumber": "<string>",
"postalCode": "<string>",
"city": "<string>",
"country": "<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({
pdfBase64: '<string>',
file: {attachmentId: '<string>', messageId: '<string>', objectId: '<string>'},
templateId: '<string>',
templateData: {},
to: {
country: '<string>',
name: '<string>',
company: '<string>',
street: '<string>',
houseNumber: '<string>',
poBox: '<string>',
addressLine2: '<string>',
postalCode: '<string>',
city: '<string>'
},
from: {
country: '<string>',
name: '<string>',
company: '<string>',
street: '<string>',
houseNumber: '<string>',
poBox: '<string>',
addressLine2: '<string>',
postalCode: '<string>',
city: '<string>'
},
print: {},
maxPages: 2,
payment: {
creditor: {
name: '<string>',
iban: '<string>',
country: '<string>',
bic: '<string>',
street: '<string>',
houseNumber: '<string>',
postalCode: '<string>',
city: '<string>'
},
amount: 123,
reference: '<string>',
message: '<string>',
debtor: {
name: '<string>',
street: '<string>',
houseNumber: '<string>',
postalCode: '<string>',
city: '<string>',
country: '<string>'
}
}
})
};
fetch('https://api.dairo.app/v1/letters/verify', 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.dairo.app/v1/letters/verify",
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([
'pdfBase64' => '<string>',
'file' => [
'attachmentId' => '<string>',
'messageId' => '<string>',
'objectId' => '<string>'
],
'templateId' => '<string>',
'templateData' => [
],
'to' => [
'country' => '<string>',
'name' => '<string>',
'company' => '<string>',
'street' => '<string>',
'houseNumber' => '<string>',
'poBox' => '<string>',
'addressLine2' => '<string>',
'postalCode' => '<string>',
'city' => '<string>'
],
'from' => [
'country' => '<string>',
'name' => '<string>',
'company' => '<string>',
'street' => '<string>',
'houseNumber' => '<string>',
'poBox' => '<string>',
'addressLine2' => '<string>',
'postalCode' => '<string>',
'city' => '<string>'
],
'print' => [
],
'maxPages' => 2,
'payment' => [
'creditor' => [
'name' => '<string>',
'iban' => '<string>',
'country' => '<string>',
'bic' => '<string>',
'street' => '<string>',
'houseNumber' => '<string>',
'postalCode' => '<string>',
'city' => '<string>'
],
'amount' => 123,
'reference' => '<string>',
'message' => '<string>',
'debtor' => [
'name' => '<string>',
'street' => '<string>',
'houseNumber' => '<string>',
'postalCode' => '<string>',
'city' => '<string>',
'country' => '<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.dairo.app/v1/letters/verify"
payload := strings.NewReader("{\n \"pdfBase64\": \"<string>\",\n \"file\": {\n \"attachmentId\": \"<string>\",\n \"messageId\": \"<string>\",\n \"objectId\": \"<string>\"\n },\n \"templateId\": \"<string>\",\n \"templateData\": {},\n \"to\": {\n \"country\": \"<string>\",\n \"name\": \"<string>\",\n \"company\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"poBox\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\"\n },\n \"from\": {\n \"country\": \"<string>\",\n \"name\": \"<string>\",\n \"company\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"poBox\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\"\n },\n \"print\": {},\n \"maxPages\": 2,\n \"payment\": {\n \"creditor\": {\n \"name\": \"<string>\",\n \"iban\": \"<string>\",\n \"country\": \"<string>\",\n \"bic\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\"\n },\n \"amount\": 123,\n \"reference\": \"<string>\",\n \"message\": \"<string>\",\n \"debtor\": {\n \"name\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\"\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.dairo.app/v1/letters/verify")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pdfBase64\": \"<string>\",\n \"file\": {\n \"attachmentId\": \"<string>\",\n \"messageId\": \"<string>\",\n \"objectId\": \"<string>\"\n },\n \"templateId\": \"<string>\",\n \"templateData\": {},\n \"to\": {\n \"country\": \"<string>\",\n \"name\": \"<string>\",\n \"company\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"poBox\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\"\n },\n \"from\": {\n \"country\": \"<string>\",\n \"name\": \"<string>\",\n \"company\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"poBox\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\"\n },\n \"print\": {},\n \"maxPages\": 2,\n \"payment\": {\n \"creditor\": {\n \"name\": \"<string>\",\n \"iban\": \"<string>\",\n \"country\": \"<string>\",\n \"bic\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\"\n },\n \"amount\": 123,\n \"reference\": \"<string>\",\n \"message\": \"<string>\",\n \"debtor\": {\n \"name\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dairo.app/v1/letters/verify")
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 \"pdfBase64\": \"<string>\",\n \"file\": {\n \"attachmentId\": \"<string>\",\n \"messageId\": \"<string>\",\n \"objectId\": \"<string>\"\n },\n \"templateId\": \"<string>\",\n \"templateData\": {},\n \"to\": {\n \"country\": \"<string>\",\n \"name\": \"<string>\",\n \"company\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"poBox\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\"\n },\n \"from\": {\n \"country\": \"<string>\",\n \"name\": \"<string>\",\n \"company\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"poBox\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\"\n },\n \"print\": {},\n \"maxPages\": 2,\n \"payment\": {\n \"creditor\": {\n \"name\": \"<string>\",\n \"iban\": \"<string>\",\n \"country\": \"<string>\",\n \"bic\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\"\n },\n \"amount\": 123,\n \"reference\": \"<string>\",\n \"message\": \"<string>\",\n \"debtor\": {\n \"name\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"object": "letter_verification",
"valid": true,
"checks": [
{
"id": "<string>",
"status": "pass",
"message": "<string>",
"expected": "<unknown>",
"actual": "<unknown>"
}
],
"pageCount": 123,
"pageSize": {
"widthMm": 123,
"heightMm": 123
},
"addressPlacement": "left",
"addressLines": [
"<string>"
],
"summary": "<string>",
"agentHint": "<string>"
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}Verify a letter PDF's layout before sending
Verify a letter PDF’s layout before sending
curl --request POST \
--url https://api.dairo.app/v1/letters/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pdfBase64": "<string>",
"file": {
"attachmentId": "<string>",
"messageId": "<string>",
"objectId": "<string>"
},
"templateId": "<string>",
"templateData": {},
"to": {
"country": "<string>",
"name": "<string>",
"company": "<string>",
"street": "<string>",
"houseNumber": "<string>",
"poBox": "<string>",
"addressLine2": "<string>",
"postalCode": "<string>",
"city": "<string>"
},
"from": {
"country": "<string>",
"name": "<string>",
"company": "<string>",
"street": "<string>",
"houseNumber": "<string>",
"poBox": "<string>",
"addressLine2": "<string>",
"postalCode": "<string>",
"city": "<string>"
},
"print": {},
"maxPages": 2,
"payment": {
"creditor": {
"name": "<string>",
"iban": "<string>",
"country": "<string>",
"bic": "<string>",
"street": "<string>",
"houseNumber": "<string>",
"postalCode": "<string>",
"city": "<string>"
},
"amount": 123,
"reference": "<string>",
"message": "<string>",
"debtor": {
"name": "<string>",
"street": "<string>",
"houseNumber": "<string>",
"postalCode": "<string>",
"city": "<string>",
"country": "<string>"
}
}
}
'import requests
url = "https://api.dairo.app/v1/letters/verify"
payload = {
"pdfBase64": "<string>",
"file": {
"attachmentId": "<string>",
"messageId": "<string>",
"objectId": "<string>"
},
"templateId": "<string>",
"templateData": {},
"to": {
"country": "<string>",
"name": "<string>",
"company": "<string>",
"street": "<string>",
"houseNumber": "<string>",
"poBox": "<string>",
"addressLine2": "<string>",
"postalCode": "<string>",
"city": "<string>"
},
"from": {
"country": "<string>",
"name": "<string>",
"company": "<string>",
"street": "<string>",
"houseNumber": "<string>",
"poBox": "<string>",
"addressLine2": "<string>",
"postalCode": "<string>",
"city": "<string>"
},
"print": {},
"maxPages": 2,
"payment": {
"creditor": {
"name": "<string>",
"iban": "<string>",
"country": "<string>",
"bic": "<string>",
"street": "<string>",
"houseNumber": "<string>",
"postalCode": "<string>",
"city": "<string>"
},
"amount": 123,
"reference": "<string>",
"message": "<string>",
"debtor": {
"name": "<string>",
"street": "<string>",
"houseNumber": "<string>",
"postalCode": "<string>",
"city": "<string>",
"country": "<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({
pdfBase64: '<string>',
file: {attachmentId: '<string>', messageId: '<string>', objectId: '<string>'},
templateId: '<string>',
templateData: {},
to: {
country: '<string>',
name: '<string>',
company: '<string>',
street: '<string>',
houseNumber: '<string>',
poBox: '<string>',
addressLine2: '<string>',
postalCode: '<string>',
city: '<string>'
},
from: {
country: '<string>',
name: '<string>',
company: '<string>',
street: '<string>',
houseNumber: '<string>',
poBox: '<string>',
addressLine2: '<string>',
postalCode: '<string>',
city: '<string>'
},
print: {},
maxPages: 2,
payment: {
creditor: {
name: '<string>',
iban: '<string>',
country: '<string>',
bic: '<string>',
street: '<string>',
houseNumber: '<string>',
postalCode: '<string>',
city: '<string>'
},
amount: 123,
reference: '<string>',
message: '<string>',
debtor: {
name: '<string>',
street: '<string>',
houseNumber: '<string>',
postalCode: '<string>',
city: '<string>',
country: '<string>'
}
}
})
};
fetch('https://api.dairo.app/v1/letters/verify', 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.dairo.app/v1/letters/verify",
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([
'pdfBase64' => '<string>',
'file' => [
'attachmentId' => '<string>',
'messageId' => '<string>',
'objectId' => '<string>'
],
'templateId' => '<string>',
'templateData' => [
],
'to' => [
'country' => '<string>',
'name' => '<string>',
'company' => '<string>',
'street' => '<string>',
'houseNumber' => '<string>',
'poBox' => '<string>',
'addressLine2' => '<string>',
'postalCode' => '<string>',
'city' => '<string>'
],
'from' => [
'country' => '<string>',
'name' => '<string>',
'company' => '<string>',
'street' => '<string>',
'houseNumber' => '<string>',
'poBox' => '<string>',
'addressLine2' => '<string>',
'postalCode' => '<string>',
'city' => '<string>'
],
'print' => [
],
'maxPages' => 2,
'payment' => [
'creditor' => [
'name' => '<string>',
'iban' => '<string>',
'country' => '<string>',
'bic' => '<string>',
'street' => '<string>',
'houseNumber' => '<string>',
'postalCode' => '<string>',
'city' => '<string>'
],
'amount' => 123,
'reference' => '<string>',
'message' => '<string>',
'debtor' => [
'name' => '<string>',
'street' => '<string>',
'houseNumber' => '<string>',
'postalCode' => '<string>',
'city' => '<string>',
'country' => '<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.dairo.app/v1/letters/verify"
payload := strings.NewReader("{\n \"pdfBase64\": \"<string>\",\n \"file\": {\n \"attachmentId\": \"<string>\",\n \"messageId\": \"<string>\",\n \"objectId\": \"<string>\"\n },\n \"templateId\": \"<string>\",\n \"templateData\": {},\n \"to\": {\n \"country\": \"<string>\",\n \"name\": \"<string>\",\n \"company\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"poBox\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\"\n },\n \"from\": {\n \"country\": \"<string>\",\n \"name\": \"<string>\",\n \"company\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"poBox\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\"\n },\n \"print\": {},\n \"maxPages\": 2,\n \"payment\": {\n \"creditor\": {\n \"name\": \"<string>\",\n \"iban\": \"<string>\",\n \"country\": \"<string>\",\n \"bic\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\"\n },\n \"amount\": 123,\n \"reference\": \"<string>\",\n \"message\": \"<string>\",\n \"debtor\": {\n \"name\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\"\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.dairo.app/v1/letters/verify")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pdfBase64\": \"<string>\",\n \"file\": {\n \"attachmentId\": \"<string>\",\n \"messageId\": \"<string>\",\n \"objectId\": \"<string>\"\n },\n \"templateId\": \"<string>\",\n \"templateData\": {},\n \"to\": {\n \"country\": \"<string>\",\n \"name\": \"<string>\",\n \"company\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"poBox\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\"\n },\n \"from\": {\n \"country\": \"<string>\",\n \"name\": \"<string>\",\n \"company\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"poBox\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\"\n },\n \"print\": {},\n \"maxPages\": 2,\n \"payment\": {\n \"creditor\": {\n \"name\": \"<string>\",\n \"iban\": \"<string>\",\n \"country\": \"<string>\",\n \"bic\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\"\n },\n \"amount\": 123,\n \"reference\": \"<string>\",\n \"message\": \"<string>\",\n \"debtor\": {\n \"name\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dairo.app/v1/letters/verify")
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 \"pdfBase64\": \"<string>\",\n \"file\": {\n \"attachmentId\": \"<string>\",\n \"messageId\": \"<string>\",\n \"objectId\": \"<string>\"\n },\n \"templateId\": \"<string>\",\n \"templateData\": {},\n \"to\": {\n \"country\": \"<string>\",\n \"name\": \"<string>\",\n \"company\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"poBox\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\"\n },\n \"from\": {\n \"country\": \"<string>\",\n \"name\": \"<string>\",\n \"company\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"poBox\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\"\n },\n \"print\": {},\n \"maxPages\": 2,\n \"payment\": {\n \"creditor\": {\n \"name\": \"<string>\",\n \"iban\": \"<string>\",\n \"country\": \"<string>\",\n \"bic\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\"\n },\n \"amount\": 123,\n \"reference\": \"<string>\",\n \"message\": \"<string>\",\n \"debtor\": {\n \"name\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"object": "letter_verification",
"valid": true,
"checks": [
{
"id": "<string>",
"status": "pass",
"message": "<string>",
"expected": "<unknown>",
"actual": "<unknown>"
}
],
"pageCount": 123,
"pageSize": {
"widthMm": 123,
"heightMm": 123
},
"addressPlacement": "left",
"addressLines": [
"<string>"
],
"summary": "<string>",
"agentHint": "<string>"
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}Authorizations
Dairo API key, e.g. dairo_test_... or dairo_live_...
Body
Exactly one document source must be provided: pdfBase64, file, or templateId (with templateData + to — the render composites the recipient). Passing to is strongly recommended: it enables the printed-address match check.
Base64-encoded PDF to verify (max 4 MB for verification).
Reuse a PDF already stored in Dairo as the letter — no re-upload. Provide EXACTLY ONE of attachmentId (an email attachment) or objectId (a storage object from the buckets API). Providing both, or neither, is a 400.
Show child attributes
Show child attributes
Verify a stored template's render. Requires to.
The intended recipient — enables the printed-address match check. Required with templateId.
Show child attributes
Show child attributes
Optional return address (template path only).
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Optional page-count ceiling enforced as a fail check.
x >= 1Pass the SAME delivery class you will send with. registered letters use a DIFFERENT address geometry — the carrier prints its registered-mail label into y=50–67mm, so the recipient block must sit in y=67–90mm — and are verified against it.
economy, priority, registered, bulk, premium The structured payment object the create will carry. Template letters are rendered WITH the generated slip so the verified PDF is the exact PDF the create would mail. Template-path only (mirrors the create's rule).
Show child attributes
Show child attributes
Response
Success
The structured layout verdict for a letter PDF.
letter_verification True when NO check failed. Warnings may still be present.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The window where the recipient address was detected, or null when none was found.
left, right, null The text lines detected inside the address window, top to bottom.
The recommended next step.