Перейти до вмісту
AstroWay/api v2.19.0 · docs
усі системи в нормі
UA EN

Preview White-label Report

POST
/whitelabel/preview

Render a sample natal report PDF using the authenticated user’s white-label configuration (colours, font, footer, logo). Pass chart to use your own birth data; omit to use the bundled Kyiv 1990 sample.

curl -X POST https://api.astroway.info/v1/whitelabel/preview \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json" \
-d '{ "language": "uk" }'
object
chart
nullable
language
string
Allowed values: uk en de ru pl es pt hi fr ko it ja id tr nl ro cs vi ar el hu
Example
{
"language": "uk"
}

Successful calculation

object
ok
boolean
Example
true
data
object
url
string
storage_key
string
byte_length
number
page_count
number
duration_ms
number
expires_at
string
preview
boolean
Example
{
"ok": true,
"data": {
"url": "https://api.astroway.info/reports/abc-wl-preview.pdf",
"storage_key": "reports/abc-wl-preview.pdf",
"byte_length": 124350,
"page_count": 1,
"duration_ms": 3210,
"expires_at": "2026-05-09T07:00:00Z",
"preview": true
}
}

Validation error

Example
{
"ok": false,
"error": {
"code": "INVALID_INPUT",
"message": "Validation failed: date: Date must be YYYY-MM-DD",
"details": [
{
"path": "date",
"message": "Date must be YYYY-MM-DD"
}
]
}
}

Missing or invalid API key

Example
{
"ok": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid API key"
}
}
Корисно?