AstrologyAPI

Match Making PDF API

POSThttps://pdf.astrologyapi.com/v1/match_making_pdf
Copy

The Match Making PDF API generates Match Making PDF based on the birth details of male and female provided in the request data.

The request data also has number of other options such as border style, footer links, lord Ganesha picture style and other last page details. These options can be used to customise the PDF as per your company and brand requirement.

The PDF API in response provides you with a PDF URL from where either your user can download the PDF or you can directly send the PDF horoscope on your user’s email address. The usage of PDF horoscope can be completely customised as per your requirements.

POST/match_making_pdf
Copy
1import requests
2import json
3
4# Your API key
5api_key = "<YOUR_API_KEY>"
6
7# API endpoint URL
8api_url = "https://pdf.astrologyapi.com/v1/match_making_pdf"
9
10# Request data
11data = {
12        "m_first_name": 15,
13        "m_last_name": 15,
14        "m_day": 15,
15        "m_month": 8,
16        "m_year": 1990,
17        "m_hour": 10,
18        "m_minute": 30,
19        "m_latitude": 39.9526,
20        "m_longitude": -75.1652,
21        "m_timezone": -5,
22        "m_place": "tropical",
23        "f_first_name": 15,
24        "f_last_name": 15,
25        "f_day": 15,
26        "f_month": 8,
27        "f_year": 1990,
28        "f_hour": 10,
29        "f_minute": 30,
30        "f_latitude": 39.9526,
31        "f_longitude": -75.1652,
32        "f_timezone": -5,
33        "f_place": "tropical",
34        "language": "tropical",
35        "ashtakoot": "tropical",
36        "dashakoot": "tropical",
37        "papasamyam": "tropical",
38        "chart_style": "tropical",
39        "footer_link": "tropical",
40        "logo_url": "tropical",
41        "company_name": "tropical",
42        "company_info": "tropical",
43        "domain_url": "tropical",
44        "company_email": "tropical",
45        "company_landline": "tropical",
46        "company_mobile": "tropical"
47    }
48
49headers = {
50    'x-astrologyapi-key': api_key,
51    'Content-Type': 'application/json'
52    # Add 'Accept-Language': '<language_code>' if needed
53}
54
55try:
56    response = requests.post(api_url, headers=headers, json=data)
57    response.raise_for_status()  # Raise an exception for bad status codes (4xx or 5xx)
58
59    # Process the response
60    response_data = response.json()
61    print(json.dumps(response_data, indent=4))
62
63except requests.exceptions.RequestException as e:
64    print(f"Error making API request: {e}")
65    if hasattr(e, 'response') and e.response is not None:
66        try:
67            print(f"Error response: {e.response.json()}")
68        except json.JSONDecodeError:
69             print(f"Error response (non-JSON): {e.response.text}")
70
71
200Response
Copy
1{
2  "status": true,
3  "pdf_url": "https://s3.amazonaws.com/astrologyapi-pdfs/match_making_sample.pdf"
4}

Request Headers

Authorization

string

required

Basic Authorization via header

Accept-Language

string

Preferred language for the response content

Properties

English - enHindi - hi

Request Parameters

m_first_name

string

required

Your first name, eg: "Sanjay"

m_last_name

string

required

Your last name, eg: "Sharma"

m_day

integer

required

Birth date of your's, eg: 01

m_month

integer

required

Birth month of your's, eg: 05

m_year

integer

required

Birth year of your's, eg: 2000

m_hour

integer

required

Birth hour of your's, eg: 07

m_minute

integer

required

Birth minute of your's, eg: 10

m_latitude

float

required

Latitude of your's birth place, eg: 19.231

m_longitude

float

required

Longitude of your's birth place, eg: 72.4242

m_timezone

float

required

Timezone of your's birth place, eg: 5.5

m_place

string

required

Your's birth place, eg: "Mumbai,Maharashtra India"

f_first_name

string

required

Your first name, eg: "Sanjay"

f_last_name

string

required

Your last name, eg: "Sharma"

f_day

integer

required

Birth date of your's, eg: 01

f_month

integer

required

Birth month of your's, eg: 05

f_year

integer

required

Birth year of your's, eg: 2000

f_hour

integer

required

Birth hour of your's, eg: 07

f_minute

integer

required

Birth minute of your's, eg: 10

f_latitude

float

required

Latitude of your's birth place, eg: 19.231

f_longitude

float

required

Longitude of your's birth place, eg: 72.4242

f_timezone

float

required

Timezone of your's birth place, eg: 5.5

f_place

string

required

Your's birth place, eg: "Mumbai,Maharashtra India"

language

string

required

Pdf Language, eg :en,hi

Properties

enhi
ashtakoot

boolean

required

Want to include ashtakoot or not, Options, eg: true | false

dashakoot

boolean

required

Want to include dashakoot or not, Options, eg: true | false

papasamyam

boolean

required

Want to include papasamyam or not, Options, eg : true | false

chart_style

string

required

For south style SOUTH_INDIAN OR for eastern style EAST_INDIAN , eg: "NORTH_INDIAN"

footer_link

string

required

Your domain link , eg: "astrologyapi.com""

logo_url

string

required

Your company logo url , eg: "logo_url"

company_name

string

required

Your company name , eg: "Vedic Rishi Astro Solutions Pvt. Ltd."

company_info

string

required

NOTE- SHOULD BE LESS THAN 500 CHARACTER , eg: "Your Company Info"

domain_url

string

required

Your domain full url , eg: "https://www.astrologyapi.com"

company_email

string

required

Your company email , eg: "[email protected]"

company_landline

string

required

Your company Landline number , eg: "+91- 221232 22"

company_mobile

string

required

Your company mobile number, eg: "+91 1212 1212 12"

Matching PDF Horoscope Samples

Following are the Matching PDF horoscope samples you can download. These generated PDFs are using Vedic Rishi Astro branding and everything can be customised to suit your company branding and style.

English PDF Sample Sample
View Sample

English PDF Sample

Hindi PDF Sample Sample
View Sample

Hindi PDF Sample

Errors

400
Bad Request

Something is wrong with your request format or parameters.

401
Unauthorized

Your API key is missing or invalid.

403
Forbidden

You don't have permission to access this specific resource.

404
Not Found

The API endpoint you're trying to reach doesn't exist.

500
Internal Server Error

Our server is having a temporary glitch.