Render offer PDF from payload
POST
/api/offers/pdf
const url = 'https://example.com/api/offers/pdf';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"offer":{"number":"example","issueDate":"2026-04-15","validUntil":"2026-04-15","currency":"example","discountPercent":0},"seller":{"name":"example","address":"example","nip":"example","contact":"example"},"buyer":{"name":"example","address":"example","nip":"example","contact":"example"},"items":[{"sku":"example","name":"example","description":"example","quantity":1,"unit":"szt.","unitPriceNet":1,"vatRate":1}],"terms":{"delivery":"example","payment":"example","notes":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/offers/pdf \ --header 'Content-Type: application/json' \ --data '{ "offer": { "number": "example", "issueDate": "2026-04-15", "validUntil": "2026-04-15", "currency": "example", "discountPercent": 0 }, "seller": { "name": "example", "address": "example", "nip": "example", "contact": "example" }, "buyer": { "name": "example", "address": "example", "nip": "example", "contact": "example" }, "items": [ { "sku": "example", "name": "example", "description": "example", "quantity": 1, "unit": "szt.", "unitPriceNet": 1, "vatRate": 1 } ], "terms": { "delivery": "example", "payment": "example", "notes": "example" } }'Request Body required
Section titled “Request Body required ”Offer document payload to render.
Media type application/json
Offer payload rendered into a PDF document.
object
offer
required
object
number
required
string
issueDate
required
string format: date
validUntil
required
string format: date
currency
required
string
discountPercent
number
seller
required
object
name
required
string
address
required
string
nip
string
contact
string
buyer
required
object
name
required
string
address
required
string
nip
string
contact
string
items
required
Array<object>
object
sku
string
name
required
string
description
string
quantity
required
number
unit
string
unitPriceNet
required
number
vatRate
required
number
terms
object
delivery
string
payment
string
notes
string
Responses
Section titled “ Responses ”The rendered offer PDF.
Media type application/pdf
The PDF payload was invalid.
Media type application/json
Standard API error payload.
object
error
required
object
code
required
string
message
required
string
issues
Array<string>
Example generated
{ "error": { "code": "example", "message": "example", "issues": [ "example" ] }}