API


PDF Design

You can customize the design of the PDF by modifying the template files. To make this process easier, we provide an online editor at https://pdf-editor-v1-admin-ui-6xx.pages.dev/, where you can edit template files and preview the results in real time. The editor also allows you to apply custom CSS for further styling.

On the left side of the editor, you'll find a file browser to select the template file you wish to modify. The content of the selected file will appear in the center, where you can make edits. Once you're done, simply click the Save button at the bottom left corner. Your changes will be saved, and the PDF will automatically reload to reflect the updates. Additionally, the generated code will be copied to your clipboard.

To integrate the updated template with AstroAPI, include the copied code in the encodedTemplate parameter of your API request.

Synastry Horoscope

A synastry chart compares two synastry charts to analyze the relationship dynamics between two individuals.

We start by examining the aspects between the horoscope of the person requesting the analysis (the questioner) and their partner.

In the first phase, we focus on the aspects formed by the questioner’s horoscope in relation to the partner’s horoscope. The questioner is the individual who provides their birth data or requests the synastry chart.

In the next phase, we analyze the aspects formed by the partner’s horoscope in relation to the questioner’s horoscope, offering a complete picture of the interaction between the two charts.

Basic Flow

To generate a Synastry Horoscope PDF report from the AstroAPI, the system (your implementation) makes a POST-request to the /api/synastry-pdf-report endpoint with the necessary parameters. With correct parameters the AstroAPI will provide a full synastry horoscope in PDF format.

Generating a Synastry Horoscope

GET /api/synastry-pdf-report

Header Value
Accept-Encoding application/json
Content-Type application/json


Query params

{
    "name_1": "Matthias",
    "date_1": "1984-03-27",
    "time_1": "13:13",
    "place_id_1": 1250015082,

    "name_2": "Lady Gaga",
    "date_2": "1986-03-28",
    "time_2": "22:55",
    "place_id_2": 1840034016,
    "lang": "en",
    "system": "p",
    "planets": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
    "collect_text": true,
    "showLogo": true,
    "showNotes": true,
    "showEndAstroapiPage": true,
    "translations": {
      "Name:": "Naam:",
      "Date:": "Datum:"
    },
    "token": "your-access-token"
}


Example: /api/synastry-pdf-report?name=Matthias&date=1984-03-27&time=13:13&place_id=3&planets[]=0&planets[]=1&planets[]=2&planets[]=3&token=your-access-token

Params explanation

Header Value
name_1 The name of the person or event you wish to create a composite horoscope for
date_1 The (birth)date of the person or event in format YYYY-mm-dd
time_1 The (birth)time of the person or event in format HH:mm
place_id_1 The (birth)place of the person or event retrieved from the /api/places request
name_2 The name of the person or event you wish to create a composite horoscope for
date_2 The (birth)date of the person or event in format YYYY-mm-dd
time_2 The (birth)time of the person or event in format HH:mm
place_id_2 The (birth)place of the person or event retrieved from the /api/places request
lang The language you wish to receive the astrological interpretation texts associated with the horoscope in. Default: 'nl'
system The House system: or "p" (Placidus), "k" (Koch), "x" (Meridian House system) or "W" (Whole Sign)
planets An array of planets that need calculation (Sun = 0, Moon = 1, Mercury = 2, Venus = 3, Mars = 4, Jupiter = 5, Saturn = 6, Uranus = 7, Neptune = 8, Pluto = 9, Chiron = 10, Lilith = 11, ...)
collect_text Set to true if you want to retrieve the texts, false if you only want calculation
showLogo If true, shows the AstroAPI logo in the PDF. If false, the logo is hidden.
showNotes If true, a notes section is added at the end of the PDF. If false, the notes section is hidden.
showEndAstroapiPage If true, the last page of the PDF will contain the AstroAPI logo and a link to the AstroAPI website. If false, the last page is hidden.
encodedTemplate An encoded string containing the template to use for the PDF. See https://pdf-editor-v1-admin-ui-6xx.pages.dev/ for a live editor