# Puja booking that schedules from the panchang

> A puja or temple-booking platform has to answer three questions before checkout: why this rite for this person, where it is traditionally performed, and when. The API answers the first two from the devotee's chart and its temple catalog; the third comes from the panchang at the temple, because the tradition names tithis, not calendar dates.

Source: https://astronode.dev/use-cases/puja-booking · Updated: 2026-12-02

**Plan needed:** Plan: **Free** covers the recommendation and the panchang date search; the dosha context and choghadiya slotting are **Hobby**. Every puja and gemstone entry carries `review_status: "pending_astrologer_pass"` - present them as tradition with their sources, never as a promised outcome.

## The mistake that bites first: `next_dates` is empty when the tradition names a tithi

`/v1/remedies/puja` returns a `temple_guide` for the top-ranked rite: up to three temples in different regions with `official_url`s, the yatras that cover it, a `good_day` rule and `next_dates`. A weekday rule fills `next_dates`; a tithi rule does not. For our test chart the top rite was Pitra-paksh-shraddha with `good_day: { kind: "tithi", tithi: 30, label: "Amavasya" }` and `next_dates: []`. You resolve the date yourself: loop `/v1/panchang` over the coming weeks at the temple's coordinates and keep days whose `tithi.index` is 30 - in New Delhi that gives 7 January and 6 February 2027. Also note `next_dates` is computed from the server's current date, so cache it for a day, not a season.

## 1. Why this rite

Show the reason next to the product. In our test chart `prioritized` came back as the whole 42-rite catalog in rank order, so take the top few and show their `addresses` and `source`; `timing_pointers` are prose from the texts ("Purnima of any month"), not computed dates.

- [`POST /v1/remedies/puja`](https://astronode.dev/capabilities/remedies/remedies-puja) - Rites ranked by active doshas, then the running mahadasha, lagna lord and afflicted planets - plus `temple_guide` and a `disclaimer` to display.
- [`POST /v1/dosha/pitra`](https://astronode.dev/capabilities/vedic/dosha-pitra) - The detail behind a Pitra recommendation, for the product page.
- [`POST /v1/dosha/kaal-sarp`](https://astronode.dev/capabilities/vedic/dosha-kaal-sarp) - Kaal Sarp detection - the reason behind the most-booked shanti rites.
- [`POST /v1/dasha/lookup`](https://astronode.dev/capabilities/vedic/dasha-lookup) - Which mahadasha is running now, when a rite is ranked for the period rather than a dosha.

## 2. Where

The `temple_guide.temples` list is pan-India by design - the endpoint takes no location. Link out to each `official_url`; the API recommends places, it does not book them. If your platform has its own partner temples, map them to the guide's ids rather than replacing the list.

- [`POST /v1/remedies/puja`](https://astronode.dev/capabilities/remedies/remedies-puja) - The same response: `temple_guide.temples` (with `name_hi`), `yatras` with day ranges, and `reason`.

## 3. When - resolved at the temple

Tithi boundaries are instants, and which tithi holds at sunrise depends on where the sunrise is. Search with the temple's coordinates, not the devotee's, then offer a slot inside that day.

- [`POST /v1/panchang`](https://astronode.dev/capabilities/vedic/panchang) - One date per call: `tithi.index` (30 = Amavasya, 15 = Purnima), `paksha`, and the tithi's own start and end.
- [`POST /v1/muhurta/choghadiya`](https://astronode.dev/capabilities/vedic/muhurta-choghadiya) - Day and night windows on the chosen date, to place the booking slot.

## Quick answers

**Which endpoints does a temple & puja booking build use?**

6 endpoints across 3 stages: Puja Recommendation (`POST /v1/remedies/puja`); Pitra Dosha (`POST /v1/dosha/pitra`); Kaal Sarp Dosha (`POST /v1/dosha/kaal-sarp`); Current Dasha Lookup (`POST /v1/dasha/lookup`); Panchang (`POST /v1/panchang`); Choghadiya (`POST /v1/muhurta/choghadiya`).

**Which plan does it need?**

Plan: **Free** covers the recommendation and the panchang date search; the dosha context and choghadiya slotting are **Hobby**. Every puja and gemstone entry carries `review_status: "pending_astrologer_pass"` - present them as tradition with their sources, never as a promised outcome.

**What goes wrong first?**

`next_dates` is empty when the tradition names a tithi. `/v1/remedies/puja` returns a `temple_guide` for the top-ranked rite: up to three temples in different regions with `official_url`s, the yatras that cover it, a `good_day` rule and `next_dates`. A weekday rule fills `next_dates`; a tithi rule does not. For our test chart the top rite was Pitra-paksh-shraddha with `good_day: { kind: "tithi", tithi: 30, label: "Amavasya" }` and `next_dates: []`. You resolve the date yourself: loop `/v1/panchang` over the coming weeks at the temple's coordinates and keep days whose `tithi.index` is 30 - in New Delhi that gives 7 January and 6 February 2027. Also note `next_dates` is computed from the server's current date, so cache it for a day, not a season.

## Go deeper

- [Recipe: the remedies recommendation flow](https://astronode.dev/recipes/remedies-recommendation-flow)
- [Recipe: daily panchang for a city](https://astronode.dev/recipes/daily-panchang-for-a-city)
- [Guide: panchang and the sunrise convention](https://astronode.dev/guides/panchang-sunrise-conventions)
- [Reference: tithi, nakshatra, yoga and karana indexes](https://astronode.dev/reference/panchang-elements)
- [Reference: the doshas the API detects](https://astronode.dev/reference/doshas)
