Hasta Backend
  1. child
  • lookup
    • Get localised seed data
      GET
    • Get core seed data
      GET
    • Get zodiac signs
      GET
    • Get subscription and pricing plans
      GET
    • Get FAQs
      GET
    • Get notification intervals
      GET
  • audit
    • Get audit logs
      GET
  • auth
    • Register device
      POST
    • Send OTP
      POST
    • Verify OTP and login
      POST
    • Resend OTP
      POST
    • Refresh access token
      POST
    • Logout
      POST
    • Google OAuth login
      POST
  • admin
    • Register admin account
      POST
    • Admin login
      POST
    • Admin logout
      POST
    • Refresh admin access token
      POST
    • Get admin profile
      GET
    • Update admin password
      PUT
    • Edit language
      PUT
    • Add language
      POST
    • Delete language
      DELETE
    • Delete user event logs
      DELETE
    • Clear lookup cache
      DELETE
    • Clear cache
      DELETE
    • List all subscription plans (admin)
      GET
    • Edit a subscription plan (admin)
      PATCH
    • Edit a subscription plan (admin)
      PATCH
    • Sync a recurring plan with Razorpay
      POST
    • Sync a recurring plan with Razorpay
      POST
    • Create a coupon (admin)
      POST
    • List coupons (admin)
      GET
    • Get a coupon (admin)
      GET
    • Get a coupon (admin)
      GET
    • Edit a coupon (admin)
      PATCH
    • Edit a coupon (admin)
      PATCH
    • List redemptions for a coupon (admin)
      GET
    • List redemptions for a coupon (admin)
      GET
    • Create a recurring scheduled notification (admin)
      POST
    • List scheduled notifications (admin)
      GET
    • Pause a scheduled notification (admin)
      PATCH
    • Resume a paused scheduled notification (admin)
      PATCH
  • blogs
    • Admin - get all blogs
    • Admin - delete a blog
    • Get all blogs
    • Get blog categories
    • Admin - get blog categories (name + slug)
    • Admin - edit a blog
    • Update blog status
    • Admin - send blog notification
    • Get blog details
    • Subscribe to blog notifications
    • Unsubscribe from blog notifications
  • feedback
    • Submit a user feedback
    • Get all queries
    • Update user query status
    • Get all reviews
    • Feature or unfeature a review
    • Get all featured reviews
  • events
    • Track a user event
    • Fetch all tracked events
  • notifications
    • Send broadcast notification
    • Send custom notification to a user
    • Send a test notification (deep link redirect check)
    • Fetch user notifications
    • Get unread notification count
    • Mark notification as read
  • reminders
    • Fetch user reminders
    • Create a reminder
    • Update a reminder
    • Delete a reminder
  • user
    • Create / complete user profile
    • Get my profile
    • Get my feature status
    • Update my intents
    • Update profile image
    • Update language preference
    • Update push notification preference
    • Update current location
    • Get my family members
    • Add a family member
    • Delete a family member
    • Update family member profile image
    • Admin - get user details with family
    • Update a family member's intents
    • Admin - list users
    • Admin - get subscribers list
    • Admin - get user details with family
    • Admin - delete user and all family members
    • Admin - update user status
  • palm
    • Get user palm reading
    • Upload user palm image
    • Upload family member palm image
    • Get family member palm reading
  • horoscopes
    • Get user kundali
    • Get family member kundali
    • Get horoscope (daily / weekly / monthly)
  • reports
    • Share a report via email
    • Get shared report PDF link
  • tarot
    • List all tarot cards
    • Get single tarot card by slug
    • Get today's daily tarot card
    • Get a 3-card tarot reading
    • Get tarot reading history
  • marriage
    • Generate marriage compatibility report
    • Get marriage compatibility report
    • List marriage report history
    • Preview the price to upgrade a compatibility report to the full Marriage Report
    • Start the compatibility -> full Marriage Report upgrade purchase
    • Consume the upgrade purchase and regenerate the full Marriage Report
  • child
    • Generate child report (baby names + birth timing)
      POST
    • Like or unlike a suggested baby name
      PATCH
    • Get child report (names + timing)
      GET
  • dashboard
    • Dashboard overview stats
    • User growth time-series
    • Subscription distribution by plan
    • Top-up & one-time sales distribution
    • Recent activity feed
  • Health
    • Liveness check
  • panchang
    • Get today's panchang for the user's current location
  • festivals
    • List festivals for the user's regions
    • Festival detail with full linked puja vidhis
  • library
    • List library items
    • Library filter options
    • Library content types
    • List my favourite library items
    • Add a library item to favourites
    • Remove a library item from favourites
    • Admin - list library items (incl. drafts)
    • Admin - create a library item
    • Admin - get a library item (incl. drafts)
    • Admin - edit / publish a library item
    • Stream a library item's audio
    • Get a library item
  • mantras
    • List mantras
    • List my favourite mantras
    • Add a mantra to favourites
    • Remove a mantra from favourites
    • Admin - list mantras (incl. drafts)
    • Admin - create a mantra
    • Admin - get a mantra (incl. drafts)
    • Admin - edit / publish a mantra
    • Stream a mantra's chanting audio
    • Get a mantra
  • nandini
    • Send a message and/or image(s)/PDF(s) to Nandini (reply is streamed over WebSocket)
    • List my Nandini conversations
    • Get a conversation's messages
    • Delete a conversation
  • payments
    • Validate a coupon code
    • Start a plan/report/topup purchase
    • Verify a completed Razorpay payment
    • Cancel a recurring subscription
    • Pause a recurring subscription
    • Resume a paused subscription
  • subscriptions
    • List my purchase history
    • Get one purchase's status
  • public
    • Get today's panchang for any location - no auth required
    • Free kundali preview - no auth, no account required
    • Search a place by name (keystroke-aware) - no auth required
    • Resolve a place_id to full location + timezone - no auth required
  • coupons
    • List currently applicable coupons
    • Get a currently applicable coupon
  • account-deletion
    • Request account & data deletion
  1. child

Generate child report (baby names + birth timing)

POST
https://uat-api.hastaai.in/api/v1/child/generate
child
Last modified:2026-08-20 11:43:27
Starts ONE combined report that always produces both baby name suggestions and child-birth timing. The result is rendered as two tabs on the frontend. Generation runs in the background - you will be notified when ready.
Request: Bearer token | application/json

Partner resolution (the report needs a spouse)#

Provide the partner in one of three ways (checked in this order):
1.
family_key - reuse an existing family member as the partner.
2.
partner_name + partner_dob (+ optional partner_birth_time, partner_birth_place, partner_latitude, partner_longitude, partner_timezone) - the partner is added to the family as Wife (user is M) / Husband (user is F) and their kundali is generated.
3.
Nothing - the existing spouse already in the family list is auto-detected.

Baby details (all-or-nothing) → picks Case A vs Case B#

Case A - send baby_birth_date and all of baby_birth_time, baby_birth_place, baby_birth_latitude, baby_birth_longitude, baby_birth_timezone, baby_gender. Names come from the baby's nakshatra; since the baby is already born, the timing tab gives a warm, positive reading of the birth moment (blessings and strengths of the chart, never a good/bad verdict); the baby is added to the family list as Son/Daughter with its own kundali.
Case B - send no baby_* fields. The timing tab predicts auspicious birth windows from both parents' charts, and names are generated from both parents' nakshatras.
Sending baby_birth_date without the other baby fields → 422.

One report per user#

Only one child report can exist at a time. To generate a new one, remove the spouse from the family list (which soft-deletes the existing report).
Success: 200 - returns request_key (Baby-XXXXX) and a message. Poll GET /child/result/{request_key}. Also returns 200 with success: false and code: PLAN_LIMIT (not an HTTP error) when header X-Enforce-Paywall: true is sent and no unconsumed child-report purchase credit exists for this partner (get one via POST /subscriptions/checkout with slug child-name-timing first - checkout never generates the report itself, this endpoint is always the separate step-2 call, paid or free-via-coupon). If a purchase is still pending (paid moments ago, webhook not yet processed), this call reconciles it against Razorpay live before deciding - if confirmed paid the credit activates and generation proceeds normally; if not, the message is "We're still verifying your payment..." instead of the plain "this report needs to be purchased" text shown when no attempt exists at all
Retry after a failed report (2026-08-20): unlike palm/marriage, a failed child report still blocks (409) - the only recovery path is removing the spouse from the family list (soft-deletes the report) and re-adding them, then calling this endpoint again. As of 2026-08-20 that regenerate DOES reuse the original already-paid credit automatically - a credit only counts as spent once a report actually reaches done, so removing/re-adding the spouse after a failure no longer requires a fresh purchase. It's always safe to call POST /subscriptions/checkout (slug child-name-timing) again first too - it will report requires_payment: false and hand back the same purchase.
Errors:
401 - invalid/expired token
404 - family_key does not match a family member of this user
409 - a child report already exists (remove the spouse to regenerate)
422 - no spouse available (none in family and no partner details), inline partner details sent while a spouse already exists, or partial baby details

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/jsonRequired

Examples
{
    "family_key": "Family-12345",
    "baby_birth_date": "2026-03-15",
    "baby_birth_time": "08:30",
    "baby_birth_place": "Mumbai, India",
    "baby_birth_latitude": 19.076,
    "baby_birth_longitude": 72.8777,
    "baby_birth_timezone": "UTC+5.5",
    "baby_gender": "M"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://uat-api.hastaai.in/api/v1/child/generate' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "family_key": "Family-12345",
    "baby_birth_date": "2026-03-15",
    "baby_birth_time": "08:30",
    "baby_birth_place": "Mumbai, India",
    "baby_birth_latitude": 19.076,
    "baby_birth_longitude": 72.8777,
    "baby_birth_timezone": "UTC+5.5",
    "baby_gender": "M"
}'

Responses

🟢200OK
application/json
Successful Response
Bodyapplication/json

Example
{
    "success": true,
    "message": "Success",
    "data": {
        "request_key": "Baby-12345",
        "message": "Report generation started. You will be notified when ready."
    }
}
🟠401Unauthorized
🟠404Record Not Found
🟠409Record Not Found
🟠422Parameter Error
Modified at 2026-08-20 11:43:27
Previous
Consume the upgrade purchase and regenerate the full Marriage Report
Next
Like or unlike a suggested baby name
Built with