API


Reports

The Reports endpoints give you interpretation texts for all the zodiac signs or a particular sign. These can be weekly, monthly or yearly.

Basic Flow

To generate a Report from the AstroAPI, the system (your implementation) makes a POST-request to or /api/weekly-reports, /api/monthly-reports, /api/yearly-reports, /api/ascendant-yearly-reports endpoint with the necessary parameters. With correct parameters the AstroAPI will provide the texts or text depending on whether you sent the Sign Id too.

Generating a Report

POST /api/weekly-reports

Header Value
Accept-Encoding application/json
Content-Type application/json
Authorization Bearer [accessToken]


body

{
    "week": 8,
    "year": 2021
}


{
    "week": 8,
    "year": 2021,
    "sign_id": 0
}


Params explanation

Header Value
week The week of the year the interpretation report is for
year The year the interpretation report is for
sign_id (optional) The sign the Report is for (Aries = 0, Pisces the last element = 11), so 0 → 11

Response

Example response


JSON-object Explanation Custom Text
week The week the Report was made for -
year The year the Report was made for -
sign_id The Sign id: 0 → 11 (Aries to Pisces) -
sign_name The Sign name -
intro Introtext for the Report Yes
text Text for the Report Yes


{
    "reports": [
        {
            "weekly": 1,
            "week": 8,
            "year": 2021,
            "sign_id": 0,
            "sign_name": "Aries",
            "intro": "Your custom intro",
            "text": "<p>Your custom text</p>"
        },
        {
            "weekly": 1,
            "week": 8,
            "year": 2021,
            "sign_id": 1,
            "sign_name": "Taurus",
            "intro": "Your custom intro",
            "text": "<p>Your custom text</p>"
        }
    ]
}


Or with Sign Id

{
    "weekly": 1,
    "week": 8,
    "year": 2021,
    "sign_id": 0,
    "sign_name": "Aries",
    "intro": "[Your custom intro]",
    "text": "<p>[Your custom text]</p>"
}

POST /api/monthly-reports

Header Value
Accept-Encoding application/json
Content-Type application/json
Authorization Bearer [accessToken]


body

{
    "month": 7,
    "year": 2021
}


{
    "month": 7,
    "year": 2021,
    "sign_id": 0
}


Params explanation

Header Value
month The month of the year the interpretation report is for: 1 → 12
year The year the interpretation report is for
sign_id (optional) The sign the Report is for (Aries = 0, Pisces the last element = 11), so 0 → 11

Response

Example response


JSON-object Explanation Custom Text
month The month the Report was made for -
year The year the Report was made for -
sign_id The Sign id: 0 → 11 (Aries to Pisces) -
sign_name The Sign name -
intro Introtext for the Report Yes
text Text for the Report Yes


{
    "reports": [
        {
            "monthly": 1,
            "month": 7,
            "year": 2021,
            "sign_id": 0,
            "sign_name": "Aries",
            "intro": "[Your custom intro]",
            "text": "<p>[Your custom text]</p>"
        }
    ]
}


Or with Sign Id

{
    "monthly": 1,
    "month": 7,
    "year": 2021,
    "sign_id": 0,
    "sign_name": "Aries",
    "intro": "[Your custom intro]",
    "text": "<p>[Your custom text]</p>"
}

POST /api/yearly-reports

Header Value
Accept-Encoding application/json
Content-Type application/json
Authorization Bearer [accessToken]


body

{
    "year": 2021
}


{
    "year": 2021,
    "sign_id": 0
}


Params explanation

Header Value
year The year the interpretation report is for
sign_id (optional) The sign the Report is for (Aries = 0, Pisces the last element = 11), so 0 → 11

Response

Example response


JSON-object Explanation Custom Text
year The year the Report was made for -
sign_id The Sign id: 0 → 11 (Aries to Pisces) -
sign_name The Sign name -
intro Introtext for the Report Yes
text Text for the Report Yes


{
    "reports": [
        {
            "yearly": 1,
            "year": 2021,
            "sign_id": 0,
            "sign_name": "Aries",
            "intro": "[Your custom intro]",
            "text": "<p>[Your custom text]</p>"
        }
    ]
}


Or with Sign Id

{
    "yearly": 1,
    "year": 2021,
    "sign_id": 0,
    "sign_name": "Aries",
    "intro": "[Your custom intro]",
    "text": "<p>[Your custom text]</p>"
}

Ascendant Yearly Reports

POST /api/ascendant-yearly-reports

Header Value
Accept-Encoding application/json
Content-Type application/json
Authorization Bearer [accessToken]


body

{
    "year": 2021
}


{
    "year": 2021,
    "sign_id": 0
}


Params explanation

Header Value
year The year the interpretation report is for
sign_id (optional) The sign the Report is for (Aries = 0, Pisces the last element = 11), so 0 → 11

Response

Example response


JSON-object Explanation Custom Text
year The year the Report was made for -
sign_id The Sign id: 0 → 11 (Aries to Pisces) -
sign_name The Sign name -
intro Introtext for the Report Yes
text Text for the Report Yes


{
    "reports": [
        {
            "yearly": 1,
            "year": 2021,
            "sign_id": 0,
            "sign_name": "Aries",
            "intro": "[Your custom intro]",
            "text": "<p>[Your custom text]</p>"
        }
    ]
}


Or with Sign Id

{
    "yearly": 1,
    "year": 2021,
    "sign_id": 0,
    "sign_name": "Aries",
    "intro": "[Your custom intro]",
    "text": "<p>[Your custom text]</p>"
}