API reference

Kundli Report API

A complete Vedic kundli for one person, with your company branding. Returns the report as JSON in English and Hindi, and delivers it as a ready-made PDF.

POSThttps://astrologyapis.ratnoveda.com/pdf/v1/kundli_report

Overview

The report has ten parts:

01 · Basic details02 · Kundli03 · KP04 · Ashtakvarga05 · Charts06 · Dasha07 · Predictions08 · Remedies09 · Dosha analysis10 · Lal Kitab

Your company details from Dashboard → Company are printed on every PDF page.

Parameters

Send a JSON body with your API key in the X-API-Key header.

Birth details

ParameterTypeDescription
dayrequiredintDay of birth, 1–31.
monthrequiredintMonth of birth, 1–12.
yearrequiredintYear of birth, for example 1990.
houroptionalintHour of birth, 0–23 (24-hour clock). Defaults to 0.
minoptionalintMinute of birth, 0–59. Defaults to 0.
latituderequiredfloatLatitude of the birth place in decimal degrees; north is positive.
longituderequiredfloatLongitude of the birth place in decimal degrees; east is positive.
timezonerequiredfloat | stringThe birth place's timezone: a name such as Asia/Kolkata (from the Geo Location API's place search), and we apply the UTC offset in force on the birth date; or the offset itself in hours, e.g. 5.5.
nameoptionalstringName of the person, printed on the cover.
genderoptionalstringmale or female.
placeoptionalstringBirth place as text, for example New Delhi, India.

Report options

ParameterTypeDescription
languageoptionalstringMain language: en (default) or hi. The other language is always included.
chart_styleoptionalstringNORTH_INDIAN (default), SOUTH_INDIAN or EAST_INDIAN.
formatoptionalstringjson (default) returns the report and a PDF link. pdf returns the PDF files directly.
current_latitudeoptionalfloatCurrent place of the person, for the KP ruling planets. Defaults to the birth place.
current_longitudeoptionalfloatLongitude of the current place.
current_timezoneoptionalfloat | stringTimezone of the current place: a name such as Asia/Kolkata, or the UTC offset in hours.

Branding (optional)

Saved company details are used automatically. These fields only fill in what is not saved.

ParameterTypeDescription
company_nameoptionalstringCompany name at the top of every page.
company_infooptionalstringOne-line tagline under the company name, up to 300 characters.
logo_urloptionalstringPublic https link to your logo on your own storage (JPEG, PNG or WebP).
company_emailoptionalstringContact email in the page footer.
company_mobileoptionalstringContact mobile number.
company_landlineoptionalstringContact landline number.
domain_urloptionalstringYour website, for example https://yourcompany.com.
footer_linkoptionalstringLink printed at the bottom of every page.

Example request

# 1. Generate the report (JSON). Keep "download_url" from the answer.
curl -X POST 'https://astrologyapis.ratnoveda.com/pdf/v1/kundli_report' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Asha Sharma","gender":"female","day":10,"month":5,"year":1990,"hour":19,"min":55,"latitude":28.6139,"longitude":77.209,"timezone":5.5,"place":"New Delhi, India","language":"en","chart_style":"NORTH_INDIAN"}'

# 2. When the PDF is wanted: POST to that download_url, exactly as given.
#    No API key needed. Add &language=hi for the Hindi PDF.
curl -X POST '<download_url>'

Response

200 OK · shortened
{
  "status": 1,
  "success": true,
  "message": "PDF report generated successfully.",
  "response": {
    "language": "en",
    "languages": ["en", "hi"],
    "reports": {
      "en": {
        "title": "Kundli Report",
        "subtitle": "Complete Vedic birth-chart analysis",
        "cover_rows": [["Name", "Asha Sharma"], …],
        "sections": [
          {
            "title": "…",
            "part": [1, "Basic"],
            "blocks": [
              { "type": "keyvalue", "rows": [["Ascendant", "…"], …] },
              { "type": "table", "columns": ["Planet", "Sign", "Degree", …], "rows": [ … ] }
            ]
          },
          …
        ]
      },
      "hi": { … }
    },
    "branding": { "company_name": "…", "logo_data_url": "data:image/png;base64,…", … },
    "company_required": false,
    "download_url": "https://astrologyapis.ratnoveda.com/pdf/reports/<draft_id>/download?exp=…&sig=…",
    "pdf_price": { "rupees": 5.0, "credits": 25.0 }
  }
}

Response fields

ParameterTypeDescription
reportsrequiredobjectThe report per language (en, hi): title, cover rows and numbered sections. Each section is a list of blocks (heading, text, keyvalue, keygrid, table, chart) you can draw in your own design.
download_urlrequiredstringSigned link that delivers the report as PDF files. See PDF delivery below.
pdf_pricerequiredobjectPrice of the first PDF download, in rupees and credits.
company_requiredrequiredbooleantrue when your company details are not saved yet; the PDF download needs them.
brandingrequiredobjectCompany details that will be printed, with the logo as a data URL.

PDF delivery

Send a POST to the download_url exactly as returned, with no API key and no body. You receive one PDF per language. Add &language=hi to make Hindi the main file. The first download is charged at the PDF price; repeat downloads are free. The link is valid for 7 days.

200 OK
{
  "status": true,
  "pdf_url": "https://astrologyapis.ratnoveda.com/pdf/files/<file_id>.pdf?…",
  "pdf_urls": { "en": "…", "hi": "…" },
  "credits_charged": 25
}

To get the PDF in a single call instead, send "format": "pdf"; the response then holds pdf_url and pdf_urls.

Errors

StatusCodeMeaning
401INVALID_API_KEYMissing, wrong or revoked API key
402INSUFFICIENT_CREDITSNot enough credits; top up and retry
422VALIDATION_ERRORA missing or invalid field, such as a latitude out of range
422COMPANY_DETAILS_REQUIREDPDF requested before your company details are saved
403Invalid or expired report linkThe PDF link was changed or is older than 7 days; generate the report again