AstrologyAPI

Partner Report

POSThttps://json.astrologyapi.com/v1/partner_report
Copy

get partner report in detail.

POST/partner_report
Copy
1import requests
2import json
3
4# Your API key
5api_key = "<YOUR_API_KEY>"
6
7# API endpoint URL
8api_url = "https://json.astrologyapi.com/v1/partner_report"
9
10# Request data
11data = {
12        "you_date": 27,
13        "you_month": 6,
14        "you_year": 2000,
15        "you_gender": "male",
16        "match_date": 26,
17        "match_month": 9,
18        "match_year": 1995,
19        "match_gender": "female",
20        "match_name": "Jessica"
21    }
22
23headers = {
24    'x-astrologyapi-key': api_key,
25    'Content-Type': 'application/json'
26    # Add 'Accept-Language': '<language_code>' if needed
27}
28
29try:
30    response = requests.post(api_url, headers=headers, json=data)
31    response.raise_for_status()  # Raise an exception for bad status codes (4xx or 5xx)
32
33    # Process the response
34    response_data = response.json()
35    print(json.dumps(response_data, indent=4))
36
37except requests.exceptions.RequestException as e:
38    print(f"Error making API request: {e}")
39    if hasattr(e, 'response') and e.response is not None:
40        try:
41            print(f"Error response: {e.response.json()}")
42        except json.JSONDecodeError:
43             print(f"Error response (non-JSON): {e.response.text}")
44
45
200Response
Copy
1{
2  "title": "You and Sofia share similar vibrations and attractions.",
3  "msg": "Your presence makes a big difference to the other. You are emotionally sympathetic and understanding toward each other. You both have a strong desire for transforming the relationship in some way that is beneficial for both. The relationship will be interesting and long lasting.",
4  "tags": ""
5}

Request Headers

Authorization

string

required

Basic Authorization via header

Accept-Language

string

Preferred language for the response content

Properties

English - en

Request Parameters

you_date

int

required

Your birth day, eg: 27

you_month

int

required

Your birth month, eg: 6

you_year

int

required

Your birth year, eg: 2000

you_gender

string

required

Your gender, eg: male

match_date

int

required

Match's birth day, eg: 26

match_month

int

required

Match's birth month, eg: 9

match_year

int

required

Match's birth year, eg: 1995

match_gender

string

required

Match's gender, eg: female

match_name

string

required

Match's name, eg: Jessica

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.