Divisional Charts (Varga) APIs
1. Divisional Chart (Vargas D1 to D60)
1. Name
Divisional Chart (Vargas D1 to D60)
2. Purpose
Calculates specific harmonic divisional charts. Supports the full 16 classical Parashari Vargas (Shodashavarga) plus D5 (Panchamsha), D6 (Shashthamsha), D8 (Ashtamsha), and D11 (Rudramsha) for a total of 20 Vargas. Used by frontend when rendering divisional chart tabs.
3. Endpoint
POST /api/v1/vargas/{varga_id}
4. Auth
Type: None / API Key
Header Example: X-API-Key: sk_live_5f6f2e0a690a45fae957c026cbd820c83bb55461bfad3b94
5. Request Headers
| Header | Required | Description |
|---|---|---|
Content-Type |
Yes | Must be application/json. |
X-API-Key |
No | API Key required for authenticated access. |
6. Request Payload
{
"name": "Santhosh Murthy R",
"datetime": "1983-10-01T20:50",
"timezone": "Asia/Kolkata",
"latitude": 11.3410,
"longitude": 77.7172
}
7. Request Params Table
| Field | Type | Required | Description | Allowed Values | Validation | Example |
|---|---|---|---|---|---|---|
varga_id |
string | Yes (Path) | Divisional chart key in URL path | d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d16, d20, d24, d27, d30, d40, d45, d60 |
URL Path Segment | "d9" |
name |
string | No | Subject name | String | Max 200 chars | "Santhosh" |
datetime |
string | Yes | Birth local datetime | ISO string | YYYY-MM-DDTHH:MM |
"1983-10-01T20:50" |
timezone |
string | No | IANA timezone | Valid IANA TZ | Default: "UTC" |
"Asia/Kolkata" |
latitude |
float | Yes | Latitude | -90.0 to +90.0 |
Float | 11.3410 |
longitude |
float | Yes | Longitude | -180.0 to +180.0 |
Float | 77.7172 |
8. Request Example
{
"name": "Santhosh Murthy R",
"datetime": "1983-10-01T20:50",
"timezone": "Asia/Kolkata",
"latitude": 11.3410,
"longitude": 77.7172
}
9. Success Response
Status: 200 OK
{
"status": "success",
"message": "Calculated D9 chart successfully",
"data": {
"varga": "D9",
"lagna": {
"sign_id": 9
},
"planets": [
{
"id": "Sun",
"name": "Sun",
"sign_id": 1
},
{
"id": "Moon",
"name": "Moon",
"sign_id": 4
}
]
}
}
10. Response Fields Table
| Field | Type | Description | Nullable | Example |
|---|---|---|---|---|
status |
string | Result status | No | "success" |
message |
string | Success message | No | "Calculated D9 chart successfully" |
data.varga |
string | Requested Varga identifier | No | "D9" |
data.lagna.sign_id |
integer | Zodiac sign ID of Ascendant in Varga (1=Aries ... 12=Pisces) | No | 9 |
data.planets[].id |
string | Planet identifier | No | "Sun" |
data.planets[].name |
string | Planet display name | No | "Sun" |
data.planets[].sign_id |
integer | Zodiac sign ID occupied by planet in Varga | No | 1 |
11. Status Codes Table
| Code | Meaning | When Returned |
|---|---|---|
200 |
OK | Varga chart calculated. |
400 |
Bad Request | Invalid Varga requested in URL or missing parameters. |
500 |
Internal Error | Calculation exception. |
12. Error Examples
{
"status": "error",
"message": "Invalid Varga requested: D99. Valid options: D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D16, D20, D24, D27, D30, D40, D45, D60",
"data": null
}
- Explanation: The client requested an invalid divisional chart
D99that does not exist in the engine's 20-Varga system.
13. Frontend Usage Notes
- Call
/api/v1/vargas/d9when displaying the Navamsa wheel. - Call
/api/v1/vargas/d10when rendering career/profession analysis.
14. Validation Rules
varga_idmust be one of the 20 valid Varga keys: the 16 Parashari Shodashavarga (d1–d60in their set) plus extended chartsd5,d6,d8,d11.
15. Business Rules
- Uses classical Parashari division algorithms for the 16 Shodashavarga charts.
- D5, D6, D8, and D11 use extended classical algorithms implemented in
VargaCalculator.php.
16. Security Notes
- Safe endpoint; standard rate-limiting.
17. Performance Notes
- Fast calculation (< 30ms).
18. Related APIs
POST /api/v1/chartPOST /api/v1/chara-dasha
19. Example Frontend Flow
- User clicks "Navamsa (D9)" tab in Varga Grid.
- App sends
POST /api/v1/vargas/d9. - App draws the 12-house D9 divisional chart.
20. Complete Example
Request:
POST /api/v1/vargas/d9 HTTP/1.1
Host: api.rbos.in
Content-Type: application/json
{
"name": "Santhosh",
"datetime": "1983-10-01T20:50",
"timezone": "Asia/Kolkata",
"latitude": 11.3410,
"longitude": 77.7172
}
Response:
{
"status": "success",
"message": "Calculated D9 chart successfully",
"data": {
"varga": "D9",
"lagna": { "sign_id": 9 },
"planets": [{ "id": "Sun", "name": "Sun", "sign_id": 1 }]
}
}
Explanation: Calculates D9 Navamsa chart for the birth details.