Params | Data Type | Description | Example |
p_day | int | Date of Birth | 15 |
p_month | int | Month of Birth | 9 |
p_year | int | Year of Birth | 1994 |
p_hour | int | Hour of Birth | 12 |
p_min | int | Min of Birth | 30 |
p_lat | float | Latitude of Birth Place | 28.6139 |
p_lon | float | Longitude of Birth Place | 77.1025 |
p_tzone | float | Timezone of Birth Place | 5.5 |
s_day | int | Date of Birth | 11 |
s_month | int | Month of Birth | 10 |
s_year | int | Year of Birth | 1996 |
s_hour | int | Hour of Birth | 12 |
s_min | int | Min of Birth | 30 |
s_lat | float | Latitude of Birth Place | 28.6139 |
s_lon | float | Longitude of Birth Place | 77.1025 |
s_tzone | float | Timezone of Birth Place | 5.5 |
# cURL Request Example
curl --location --request POST 'https://json.apireports.com/v1/synastry_horoscope' \
-u '{YourUserID}:{YourApiKey}'\
--header 'Accept-Language: en' \
--header 'Content-Type: application/json' \
--data-raw '{
"p_day": 15,
"p_month": 9,
"p_year": 1994,
"p_hour": 12,
"p_min": 30,
"p_lat": 28.61390000000000100044417195022106170654296875,
"p_lon": 77.1025000000000062527760746888816356658935546875,
"p_tzone": 5.5,
"s_day": 11,
"s_month": 10,
"s_year": 1996,
"s_hour": 12,
"s_min": 30,
"s_lat": 28.61390000000000100044417195022106170654296875,
"s_lon": 77.1025000000000062527760746888816356658935546875,
"s_tzone": 5.5
}'
# END
/* JavaScript Request Example */
var apiEndPoint = "synastry_horoscope";
var userId = "{YourUserID}";
var apiKey = "{YourApiKey}";
var language = "en";
var data = {
"p_day": 15,
"p_month": 9,
"p_year": 1994,
"p_hour": 12,
"p_min": 30,
"p_lat": 28.61390000000000100044417195022106170654296875,
"p_lon": 77.1025000000000062527760746888816356658935546875,
"p_tzone": 5.5,
"s_day": 11,
"s_month": 10,
"s_year": 1996,
"s_hour": 12,
"s_min": 30,
"s_lat": 28.61390000000000100044417195022106170654296875,
"s_lon": 77.1025000000000062527760746888816356658935546875,
"s_tzone": 5.5
};
var url = 'https://json.apireports.com/v1/'+apiEndPoint;
var request = $.ajax({
url: url,
method: "POST",
dataType:'json',
headers: {
"Authorization": "Basic " + btoa(userId+":"+apiKey),
"Accept-Language": "en",
"Content-Type":'application/json'
},
data:JSON.stringify(data)
});
request.then(
function(resp){
console.log(resp);
},
function(err){
console.log(err);
}
);
/* END */
<?php
/* PHP Request Example */
$apiEndPoint = "synastry_horoscope";
$userId = "{YourUserID}";
$apiKey = "{YourApiKey}";
$url = "https://json.apireports.com/v1/";
$data = array(
"p_day" => 15,
"p_month" => 9,
"p_year" => 1994,
"p_hour" => 12,
"p_min" => 30,
"p_lat" => 28.6139,
"p_lon" => 77.1025,
"p_tzone" => 5.5,
"s_day" => 11,
"s_month" => 10,
"s_year" => 1996,
"s_hour" => 12,
"s_min" => 30,
"s_lat" => 28.6139,
"s_lon" => 77.1025,
"s_tzone" => 5.5
);
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url.$apiEndPoint);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
$header[] = 'Authorization: Basic '. base64_encode($userId.":".$apiKey);
$header[] = 'Accept-Language: en';
$header[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
$error = curl_error($ch);
$http_code = curl_getinfo($ch ,CURLINFO_HTTP_CODE);
curl_close($ch);
echo $response;
/* END */
# Python Request Example
import requests
import json
apiEndPoint = "synastry_horoscope";
userId = "{YourUserID}";
apiKey = "{YourApiKey}";
url = "https://json.apireports.com/v1/"+apiEndPoint
data = json.dumps({
"p_day": 15,
"p_month": 9,
"p_year": 1994,
"p_hour": 12,
"p_min": 30,
"p_lat": 28.61390000000000100044417195022106170654296875,
"p_lon": 77.1025000000000062527760746888816356658935546875,
"p_tzone": 5.5,
"s_day": 11,
"s_month": 10,
"s_year": 1996,
"s_hour": 12,
"s_min": 30,
"s_lat": 28.61390000000000100044417195022106170654296875,
"s_lon": 77.1025000000000062527760746888816356658935546875,
"s_tzone": 5.5
})
headers = {
'Accept-Language': 'en',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, auth=(userId, apiKey),data=data)
print(response.text)
# END
/* NodeJS Request Example */
var request = require('request');
var apiEndPoint = "synastry_horoscope";
var userId = "{YourUserID}";
var apiKey = "{YourApiKey}";
var url = 'https://json.apireports.com/v1/'+apiEndPoint;
var options = {
'method': 'POST',
'url': url,
'auth': {
'user': userId,
'password': apiKey
},
'headers': {
'Accept-Language': 'en',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"p_day": 15,
"p_month": 9,
"p_year": 1994,
"p_hour": 12,
"p_min": 30,
"p_lat": 28.61390000000000100044417195022106170654296875,
"p_lon": 77.1025000000000062527760746888816356658935546875,
"p_tzone": 5.5,
"s_day": 11,
"s_month": 10,
"s_year": 1996,
"s_hour": 12,
"s_min": 30,
"s_lat": 28.61390000000000100044417195022106170654296875,
"s_lon": 77.1025000000000062527760746888816356658935546875,
"s_tzone": 5.5
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
/* END */