Western Reports V2 API
Generate detailed, fully branded PDF and HTML Western astrology reports. Reports are generated asynchronously: you receive the URLs immediately and the report is ready within 10 to 30 seconds. Each report family supports four depth tiers, so the same birth data can produce anything from a short snapshot to a comprehensive book.
Base URL
https://pdf.divineapi.comAuthentication
Every request requires two headers:
| Header | Description |
|---|---|
Authorization | Bearer {api_acc_token} - identifies the user |
x-api-key | Use api_key for live mode, test_api_key for test mode |
Live mode deducts from remaining_credits. Test mode deducts from remaining_test_credits.
Generate Report
POST /api/v1/western/reports/generateHow It Works
- Send a
POSTrequest with birth data + branding - receivereportId+ URLs immediately (status:processing) - Report generates in the background (10-30 seconds)
- Poll
GET /api/v1/reports/:reportId/statusuntil status iscompleted - HTML and PDF URLs are ready to view/download
Request Headers
Content-Type: application/json
Authorization: Bearer {api_acc_token}
x-api-key: {api_key}Request Body Parameters
Every parameter accepted by the Western Reports endpoint, with its allowed values. A field you do not send is never touched. Out of range numeric values are clamped rather than rejected, and invalid body_background, cover_pattern or colour values are ignored rather than rejected, so the report still renders without that piece.
1. Report selection
| Field | Values | Notes |
|---|---|---|
report_type | A family code (see Available Reports) | Required. Send the family code together with tier. Legacy full tier slugs still work. |
tier | snapshot | insight | advanced | comprehensive | Default comprehensive. Omitting it gives the comprehensive report. |
report_name | User input | Cover title. Defaults to the report's own name. |
2. End user birth data (all required)
| Field | Values | Notes |
|---|---|---|
full_name | User input | |
day | 1 to 31 | |
month | 1 to 12 | |
year | 1900 to 2100 | |
hour | 0 to 23 | |
min | 0 to 59 | |
sec | 0 to 59 | |
gender | male | female | Lowercase. |
place | User input | For example "New York, USA" |
lat | User input number | For example 40.7128 |
lon | User input number | For example -74.006 |
tzone | User input number | Hours offset, for example -4 |
lan | en (default). Also available: es | pt | de | fr | it | ru |
3. Report specific inputs (only the reports named)
| Field | Values | Notes |
|---|---|---|
horoscope_month | 1 to 12 | Required for western-monthly-horoscope only. Rejected with 422 on every other report. |
horoscope_year | User input, integer year | Required for western-monthly-horoscope and western-yearly-horoscope. Rejected with 422 everywhere else. The yearly report takes no month. |
4. Company branding (all required)
company_name, company_url, company_email, company_mobile, company_bio, footer_text and logo_url are all user input. logo_url must be a PNG or JPEG image URL.
5. Colours (hex #RRGGBB)
| Field | Default | Purpose |
|---|---|---|
theme_color | #af1f0f | Accents, table headers, borders and all derived artwork |
heading_color | #af1f0f | Section heading text |
text_primary_color | #000000 | Body text |
text_secondary_color | #fff6d3 | Secondary text |
background_color | #fff6d3 | Page background |
6. Typography
| Field | Values | Notes |
|---|---|---|
font_pairing | classic | modern | elegant | professional | minimal | bold | Default classic |
heading_scale | 0.8 to 1.6 | Default 1 |
7. Theme
A one shot preset that sets font, cover, backgrounds and sizing together: classic | editorial | celestial | atelier | almanac | botanic | nocturne. Anything you also send explicitly overrides the theme. A theme never touches your colours, branding, logo or report name. Omit it for the standard look.
8. Cover page
| Field | Values | Notes |
|---|---|---|
cover_preset | hero | centered | vertical | rightcol | portrait | Shorthand for the three switches below |
cover_align | left | center | right | Default center |
cover_arrange | standard | vertical | Default standard |
logo_pos | left | center | right | Default center |
cover_mode | night | light | brand | Default night. Dark, pale, or follow your colour cover. |
cover_pattern | none | nebula | aurora | dusk | ember | ink | Cover artwork tinted from theme_color |
cover_background | User input image URL | Full bleed cover photo |
cover_overlay | 0 to 100 | Darkening scrim over a cover photo or pattern |
front_image | User input image URL | Cover centre image |
front_image_size | 20 to 95 (% of page width) | Default 58 |
cover_title_size | 0.7 to 2.2 | Default 1 |
cover_meta_size | 0.7 to 1.8 | Default 1 |
logo_size | 0.7 to 2.0 | Default 1 |
cover_kicker | User input (supports tokens) | Small line above the title |
cover_subtitle | User input (supports tokens) | Line below the title |
Cover tokens for the kicker and subtitle: {name}, {dob}, {tob}, {place}, {company}, {report_name}. An empty token drops its whole segment, including the separator.
9. Body pages
| Field | Values | Notes |
|---|---|---|
section_style | stripe | banded | minimal | Omit for a plain heading with a rule |
vibrancy | subtle | balanced | bold | Default balanced. Only affects stripe. |
label_pill | true | false | Default false. Data section titles as solid pills. |
page_footer | true | false | Default false. Report name and page number in the footer. |
body_background | none or a design ID (see below) | |
body_background_strength | 0 to 100 | Default 100. Artwork opacity. |
body_image_url | User input image URL | Your own body page artwork |
body_image_url_alt | User input image URL | Alternates on even pages |
body_background_mode | full | edges | Default full |
body_scrim | 0 to 100 | Default 60. Paper veil over the reading band. |
body_background design IDs (40):
Celestial: astrolabe | lunation | constellation | orrery | corona | starchart
Geometric: aurora | meridian | sunburst | lattice | chevron | meander
Flowing: contour | marble | crossbed | herbarium | taproot | tidal | ribbon
Washes: horizon | nebula | prism | godray | gloaming | boreal | bleed
Minimal: rule | bracket | rail | ell | solstice | tessera | stele
Printed: halftone | guilloche | riso | woodcut | laid | dogear | signature
10. Advanced and less common
| Field | Values | Notes |
|---|---|---|
house_system | P (Placidus) and other standard house system codes | Default P. House division system. |
chart_style | Object | Natal wheel appearance, an optional nested object |
source_report_id | User input, a prior report id | Optional reuse for upsells. Must be the same person, and the same month and year for horoscopes, otherwise 400. |
locked | true | false | Optional. Locks the call to action and footer link. |
Example Request
curl -X POST "https://pdf.divineapi.com/api/v1/western/reports/generate" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {api_acc_token}" \
-H "x-api-key: {api_key}" \
-d '{
"report_type": "western-natal-blueprint",
"tier": "comprehensive",
"full_name": "Alex Rivera",
"day": 14,
"month": 6,
"year": 1990,
"hour": 10,
"min": 25,
"sec": 0,
"gender": "male",
"place": "New York, USA",
"lat": 40.7128,
"lon": -74.006,
"tzone": -4,
"lan": "en",
"theme_color": "#8a2b52",
"heading_color": "#3a1f38",
"text_primary_color": "#241a2e",
"text_secondary_color": "#fff6d3",
"background_color": "#f7f1e8",
"font_pairing": "classic",
"heading_scale": 1,
"report_name": "The Natal Blueprint",
"cover_kicker": "{company} presents",
"cover_subtitle": "Prepared for {name} - {dob} - {place}",
"company_name": "Astro Insights",
"footer_text": "(c) 2026 Astro Insights - All rights reserved",
"company_bio": "Astro Insights has guided over 40,000 seekers with personalised readings since 2016.",
"company_email": "hello@astroinsights.co",
"company_mobile": "+1 (415) 555-0132",
"company_url": "https://astroinsights.co",
"cover_pattern": "none",
"cover_mode": "night",
"cover_preset": "hero",
"cover_align": "left",
"cover_arrange": "standard",
"logo_pos": "left",
"cover_title_size": 1,
"cover_meta_size": 1,
"logo_size": 1,
"front_image_size": 58,
"label_pill": false,
"page_footer": false,
"body_background_strength": 100,
"section_style": "stripe",
"vibrancy": "balanced",
"logo_url": "https://astroinsights.co/logo.png"
}'Success Response
{
"reportId": "f8624bc3-71d8-4e72-bd95-895a9778fbd1",
"htmlUrl": "https://pdf.divineapi.com/reports/html/84cd6e30.html?token=6adf39ad...",
"pdfUrl": "https://pdf.divineapi.com/reports/pdfs/84cd6e30.pdf?token=df2746fe...",
"statusUrl": "https://pdf.divineapi.com/api/v1/reports/f8624bc3-.../status?token=a1b2c3d4...",
"status": "processing"
}| Field | Description |
|---|---|
reportId | Unique report identifier |
htmlUrl | URL to view the HTML report |
pdfUrl | URL to download the PDF report |
statusUrl | URL to poll for report completion status |
status | Initial status (processing) |
Error Responses
Missing Branding Fields (422)
If any required branding fields are missing:
{
"error": "Missing required branding fields",
"details": [
"Please enter company name",
"Please enter company url",
"Please enter company email",
"Please enter company mobile number",
"Please enter company bio",
"Please enter footer text",
"Please enter logo url"
]
}Invalid Color Format (400)
{
"error": "Invalid color format for theme_color. Must be hex (#RRGGBB)."
}Authentication Failed (401)
{
"error": "Bearer token required"
}{
"error": "x-api-key header required"
}{
"error": "API key does not match authenticated user"
}Insufficient Credits (402)
{
"error": "Insufficient credits"
}Rate Limit Exceeded (429)
{
"error": "Rate limit exceeded. Maximum 100 reports per hour."
}Check Report Status
GET /api/v1/reports/:reportId/status?token={token}Poll this endpoint to check when a report is ready. The statusUrl is returned by the generate endpoint - use it directly.
Response
{
"reportId": "f8624bc3-71d8-4e72-bd95-895a9778fbd1",
"status": "completed",
"htmlUrl": "https://pdf.divineapi.com/reports/html/84cd6e30.html?token=6adf39ad...",
"pdfUrl": "https://pdf.divineapi.com/reports/pdfs/84cd6e30.pdf?token=df2746fe..."
}| Status | Description |
|---|---|
processing | Report is being generated |
completed | Report is ready - HTML and PDF URLs are accessible |
Available Reports
There are 11 Western report families. Send the family code in report_type together with a tier. The bare family code on its own gives the comprehensive tier, and legacy full tier slugs still work.
| Code | Report | Languages | Tiers |
|---|---|---|---|
western-natal-blueprint | Natal Blueprint | en (English) | snapshot, insight, advanced, comprehensive |
western-love-signature | Love Signature | en (English) | snapshot, insight, advanced, comprehensive |
western-dating-mating-relating | Dating, Mating & Relating | en (English) | snapshot, insight, advanced, comprehensive |
western-inner-moon | Your Inner Moon | en (English) | snapshot, insight, advanced, comprehensive |
western-career-money | Career & Money | en (English) | snapshot, insight, advanced, comprehensive |
western-creators-spotlight | The Creator's Spotlight | en (English) | snapshot, insight, advanced, comprehensive |
western-purpose-healing | Purpose & Healing | en (English) | snapshot, insight, advanced, comprehensive |
western-year-ahead | Year Ahead | en (English) | snapshot, insight, advanced, comprehensive |
western-saturn-return | The Saturn Return Guide | en (English) | snapshot, insight, advanced, comprehensive |
western-monthly-horoscope | Monthly Horoscope | en (English) | snapshot, insight, advanced, comprehensive Also requires horoscope_month and horoscope_year. |
western-yearly-horoscope | Yearly Horoscope | en (English) | snapshot, insight, advanced, comprehensive Also requires horoscope_year. |
Tiers. Every family accepts an optional tier parameter that sets how deep the report goes: snapshot (shortest), insight, advanced, or comprehensive (fullest). If you do not send tier, the report is generated as comprehensive. Credit cost per report: snapshot 50, insight 100, advanced 150, comprehensive 200.
Languages. Pass the language in lan. English (en) is the default; es, pt, de, fr, it and ru are also available.
Font Pairings
| Value | Style |
|---|---|
classic | Traditional serif headings with clean body text |
modern | Contemporary sans-serif throughout |
elegant | Decorative headings with refined body text |
professional | Business-appropriate font combination |
minimal | Clean, lightweight fonts |
bold | Strong, impactful heading fonts |
Rate Limits
| Endpoint | Limit |
|---|---|
POST /reports/generate | 100 requests per hour per client |
GET /reports/:id/status | 300 requests per minute per IP |
Complete Flow Example
Step 1: Generate Report
curl -X POST https://pdf.divineapi.com/api/v1/western/reports/generate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {api_acc_token}" \
-H "x-api-key: {api_key}" \
-d '{
"report_type": "western-natal-blueprint",
"full_name": "Priya Singh",
"day": 22,
"month": 3,
"year": 1995,
"hour": 8,
"min": 15,
"sec": 0,
"gender": "female",
"place": "Mumbai, India",
"lat": 19.0760,
"lon": 72.8777,
"tzone": 5.5,
"lan": "en",
"company_name": "Astro Insights",
"company_url": "https://astroinsights.com",
"company_email": "info@astroinsights.com",
"company_mobile": "+91 9876543210",
"company_bio": "Your trusted source for Western astrology.",
"footer_text": "© 2026 Astro Insights",
"logo_url": "https://astroinsights.com/logo.png"
}'Response
{
"reportId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"htmlUrl": "https://pdf.divineapi.com/reports/html/xyz.html?token=abc123...",
"pdfUrl": "https://pdf.divineapi.com/reports/pdfs/xyz.pdf?token=def456...",
"statusUrl": "https://pdf.divineapi.com/api/v1/reports/f8624bc3-.../status?token=a1b2c3d4...",
"status": "processing"
}Step 2: Poll Status (wait for completion)
curl https://pdf.divineapi.com/api/v1/reports/a1b2c3d4-e5f6-7890-abcd-ef1234567890/status?token=abc123...Response (while generating)
{
"reportId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"statusUrl": "https://pdf.divineapi.com/api/v1/reports/f8624bc3-.../status?token=a1b2c3d4...",
"status": "processing"
}Response (when ready)
{
"reportId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "completed",
"htmlUrl": "https://pdf.divineapi.com/reports/html/xyz.html?token=abc123...",
"pdfUrl": "https://pdf.divineapi.com/reports/pdfs/xyz.pdf?token=def456..."
}Step 3: Download or Display
- Open
htmlUrlin a browser to view the interactive HTML report - Open
pdfUrlto download or embed the PDF report