# Birth data → request JSON builder

> Pick an endpoint, type a birth date, time and city, and get the exact JSON body the API validates against - plus the same request as curl, Node.js `fetch` and Python `requests`. Nothing is sent; copy it into your code or terminal.

Source: https://astronode.dev/tools/request-json-builder · Updated: 2026-12-01

The interactive tool runs in the browser at https://astronode.dev/tools/request-json-builder; this file is its explanation.

## The birth input, field by field

*Birth input fields (engine BirthInputSchema)*

| Field | Type | Rule | Example |
| --- | --- | --- | --- |
| `date` | string | `YYYY-MM-DD`, the LOCAL calendar date | `"1973-04-24"` |
| `time` | string | `HH:MM` or `HH:MM:SS`, 24-hour, LOCAL | `"17:25:00"` |
| `tz_offset_minutes` | integer | -840..840, east-positive | `330` |
| `lat` | number | -90..90, north-positive | `19.076` |
| `lng` | number | -180..180, east-positive | `72.8777` |

The schema is **strict**: any field it does not declare is rejected with `400 VALIDATION_ERROR`, not ignored. That is deliberate - a silently dropped `ayanamsa` or `timezone` field would return a chart computed under assumptions you did not ask for. The builder warns before you hit it.

## Endpoints that take more than a birth

Many endpoints add their own fields next to the five birth fields: `division` for a varga chart, `levels` for dasha depth, `house_system` for Western houses, `year` for Varshphal, `transit_at` for transits. The builder pre-fills those from the endpoint's own sample request - the payload the [playground](https://astronode.dev/playground) sends upstream - and lists every other field the endpoint accepts, marking the required ones.

A few endpoints (muhurta and other day-level calculations) take a date and a place but no time; the builder drops `time` for those. Couple endpoints (`person_a`, `person_b`) nest two birth inputs and are not covered here - build each person with this tool and wrap them.

## What comes back

Every success response is the same envelope:

```json
{
  "request_id": "...",
  "data": { },
  "interpretation": null,
  "meta": { "engine_version": "...", "computed_at": "..." }
}
```

Your result is always under `data`. The Node and Python snippets destructure it for you. Errors use `{ request_id, error: { code, message, details } }` instead; paste either into the [response explorer](https://astronode.dev/tools/response-json-explorer) to see what each field means.

## Common mistakes

- **Sending a UTC time with a local offset.** `time` is the local wall-clock time; the API does the UTC conversion with your offset. Converting first and then sending `tz_offset_minutes: 330` shifts the chart by 5.5 hours.
- **Numbers as strings.** `"lat": "19.07"` fails validation; send JSON numbers.
- **Single-digit parts.** `"7:05"` and `"1973-4-24"` fail the patterns. Pad to `07:05` and `1973-04-24`.
- **Coordinates rounded too hard.** Four decimal places of latitude is about 11 m and two is about 1 km, both fine. One decimal (about 11 km) or a region's centre instead of the town shifts the ascendant measurably.
- **Putting the key in client code.** The snippets read `ASTRONODE_API_KEY` from the environment. Call the API from your server, never from a browser or mobile bundle.

## FAQ

**Can I choose the ayanamsa or zodiac in the request?**

No. Each endpoint family uses its tradition's convention (Lahiri for Vedic, KP-Newcomb for `/v1/kp/*`, tropical for Western) and reports it in the response. See the [ayanamsa calculator](https://astronode.dev/tools/ayanamsa-calculator).

**Are seconds required in time?**

No - `HH:MM` and `HH:MM:SS` are both accepted. The builder always sends seconds so the body is unambiguous.

**Which keys do the snippets use?**

The curl uses an `aie_test_` placeholder and the code reads `ASTRONODE_API_KEY` from the environment. Test keys come with every account; live keys need a paid plan.

## Related endpoints

- [`POST /v1/charts/birth`](https://astronode.dev/capabilities/vedic/charts-birth) - Birth Chart (Kundli) API
- [`POST /v1/charts/varga`](https://astronode.dev/capabilities/vedic/charts-varga) - Divisional Charts (Navamsa, D1-D60) API
- [`POST /v1/dasha/vimshottari`](https://astronode.dev/capabilities/vedic/dasha-vimshottari) - Vimshottari Dasha API
- [`POST /v1/western/natal/chart`](https://astronode.dev/capabilities/western/western-natal-chart) - Western Natal Chart API
