Steps for API Testing
1. Starting the Trial and Getting Your API Key
- Visit divineapi.com: Explore a wide array of Vedic astrology APIs.
- Start a 7-day trial and create an account: Gain access to the Planetary Position API and others with a trial.
- API Key: Locate your API key on the dashboard after logging in, necessary for making requests.
2. Importing the Postman Collection
- Collection Link: Access the Postman collection specifically designed for the Planetary Position API.
- Import Process: Importing this collection into Postman streamlines your API testing process.
Authentication
Secure your API requests:
- Authorization Tab: In Postman, navigate to the Authorization tab.
- Type: Select "Bearer Token" from the dropdown list.
- Token Field: Enter your bearer token to authenticate your requests.
3. Testing the Planetary Positions API
Set up your request for festival details:
- Method: POST - Suitable for submitting data requests.
- URL: https://astroapi-4.divineapi.com/western-api/v1/planetary-positions - The endpoint for Planetary Position API details.
- Headers:
- Content-Type: application/json - Specifies the request's media type.
- Authorization: Bearer <your_access_token> - Authenticates the request.
- Request Parameters:
- api_key: “<Your_API_Key>” - Your unique API subscription identifier.
- full_name: “Rahul Kumar” - Enter name.
- day: “24” - Enter the date of birth.
- month: “05” - Enter the month of birth.
- year: "2023" - The year of interest.
- hour: “14” - Enter the hour.
- min: “40” - Enter the minute.
- sec: “43” - Enter the second.
- gender: “male” - Enter the gender.
- place: "New Delhi" - The name of the city.
- lat: "28.6139" - Latitude for location-specific details.
- lon: "77.2090" - Longitude for accurate location insights.
- tzone: "5.5" - Timezone offset from UTC.
- lan: “pt” - Enter the language.
4. How to change the language:
- We can change the language by using the below table.
- Example : If we enter “pt” in the request parameters language section, the response will be in the "Portuguese Language".
Use translator for other language:
Update translator: https://divineapi.com/translator
en For English
hi For Hindi
pt For Portuguese
fr For French
es For Spanish
ru For Russian
de For German
nl For Dutch
it For Italian
pl For Polish
ar For Arabic
ja For Japanese
zh For Chinese
Example Request Body:
api_key:<Your_API_Key>
full_name:Rahul Kumar
day:24
month:05
year:2023
hour:14
min:40
sec:43
gender:male
place:New Delhi
lat:28.7041
lon:77.1025
tzone:5.5
lan:en
Correct Response Body:
{
"success": 1,
"data": [
{
"name": "Ascendente",
"full_degree": "177.9927066",
"sign": "Virgem",
"sign_no": 6,
"longitude": "27:59:34",
"speed": "317.9347319",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 1,
"element": "Terra",
"modality": "Mutável"
},
{
"name": "Sol",
"full_degree": "62.9440708",
"sign": "Gêmeos",
"sign_no": 3,
"longitude": "2:56:39",
"speed": "0.9614465",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 9,
"element": "Ar",
"modality": "Mutável"
},
{
"name": "Lua",
"full_degree": "117.0089337",
"sign": "Câncer",
"sign_no": 4,
"longitude": "27:0:32",
"speed": "12.0140248",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 10,
"element": "Água",
"modality": "Cardinal"
},
{
"name": "Marte",
"full_degree": "122.1226286",
"sign": "Leão",
"sign_no": 5,
"longitude": "2:7:21",
"speed": "0.5736119",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 11,
"element": "Fogo",
"modality": "Fixo"
},
{
"name": "Mercúrio",
"full_degree": "39.0104745",
"sign": "Touro",
"sign_no": 2,
"longitude": "9:0:38",
"speed": "0.6640240",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 8,
"element": "Terra",
"modality": "Fixo"
},
{
"name": "Vênus",
"full_degree": "107.8773971",
"sign": "Câncer",
"sign_no": 4,
"longitude": "17:52:39",
"speed": "1.0292856",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 10,
"element": "Água",
"modality": "Cardinal"
},
{
"name": "Júpiter",
"full_degree": "31.7231984",
"sign": "Touro",
"sign_no": 2,
"longitude": "1:43:24",
"speed": "0.2225073",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 8,
"element": "Terra",
"modality": "Fixo"
},
{
"name": "Saturno",
"full_degree": "336.7253161",
"sign": "Peixes",
"sign_no": 12,
"longitude": "6:43:31",
"speed": "0.0394147",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 6,
"element": "Água",
"modality": "Mutável"
},
{
"name": "Nó Norte",
"full_degree": "32.6124259",
"sign": "Touro",
"sign_no": 2,
"longitude": "2:36:45",
"speed": "-0.0529291",
"is_retro": "true",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 8,
"element": "Terra",
"modality": "Fixo"
},
{
"name": "Nó Sul",
"full_degree": 212.6124259,
"sign": "Escorpião",
"sign_no": 8,
"longitude": "2:36:45",
"speed": "-0.0529291",
"is_retro": "true",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 2,
"element": "Água",
"modality": "Fixo"
},
{
"name": "Urano",
"full_degree": "49.7724910",
"sign": "Touro",
"sign_no": 2,
"longitude": "19:46:21",
"speed": "0.0568129",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 8,
"element": "Terra",
"modality": "Fixo"
},
{
"name": "Netuno",
"full_degree": "357.3103729",
"sign": "Peixes",
"sign_no": 12,
"longitude": "27:18:37",
"speed": "0.0196941",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 6,
"element": "Água",
"modality": "Mutável"
},
{
"name": "Plutão",
"full_degree": "300.2467929",
"sign": "Aquário",
"sign_no": 11,
"longitude": "0:14:48",
"speed": "-0.0101805",
"is_retro": "true",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 5,
"element": "Ar",
"modality": "Fixo"
},
{
"name": "Meio do Céu",
"full_degree": "87.9089189",
"sign": "Gêmeos",
"sign_no": 3,
"longitude": "27:54:32",
"speed": "331.2832986",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 9,
"element": "Ar",
"modality": "Mutável"
},
{
"name": "Chiron",
"full_degree": "18.4939254",
"sign": "Áries",
"sign_no": 1,
"longitude": "18:29:38",
"speed": "0.0453592",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 7,
"element": "Fogo",
"modality": "Cardinal"
},
{
"name": "Part of fortune",
"full_degree": 232.05756949999997,
"sign": "Escorpião",
"sign_no": 8,
"longitude": "22:3:27",
"speed": "Áries",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 2,
"element": "Água",
"modality": "Fixo"
}
]
}
Error Handling and Tips for Troubleshooting
- 401 Unauthorized: Ensure the accuracy of your API key and bearer token.
- 400 Bad Request: Double-check the completeness and accuracy of all parameters.
- 429 Too Many Requests: Be mindful of the API's request rate limits.
- 500 Internal Server Error: Server-side issue; attempt your request again later.
- 404 Not Found: Verify the request URL's correctness.
Conclusion
We hope this guide has provided you with the necessary information to effectively use our API. Should you encounter any issues or have further questions, please refer to our comprehensive documentation or reach out to our support team. We are committed to ensuring your experience with Divine API is smooth and successful. Thank you for choosing our services!
Resources
Postman link: https://astroapi-4.divineapi.com/western-api/v1/planetary-positions
Documentation link: https://developers.divineapi.com/divine-api/reference/api-reference/western-api/natal-astrology/planetary-positions