How this page was checked: Bubble was not run. The exact request the API Connector call is configured to send was executed with curl against the in-memory API - the 22/36 result, the swapped-order 21/36, the both-female case and the blank-gender 400 below are from those runs.
Add the API and keep the key private
- In the Plugins tab, install API Connector (published by Bubble), open it and add an API named
AstroNode. - Set Authentication to Private key in header. Key name
Authorization, key valueBearer aie_live_.... - If the form also offers a development key, give it a separate AstroNode key, so testing in the development version does not spend the live key's quota.
API Connector calls are sent from Bubble's servers, and the authentication value set here is never sent to the page. What can leak is a call parameter: each <placeholder> in the body gets a Private checkbox, and a parameter that is not private can be set by the page. That is what you want for the two births (they come from the form), and it is why the key must never be a parameter.
The call
| Setting | Value |
|---|---|
| Name | Gun Milan |
| Use as | Action - run it from the workflow behind your "Check match" button |
| Data type | JSON |
| Method and URL | POST https://api.astronode.dev/v1/compatibility |
| Body type | JSON, with the body below |
Body - every <name> becomes a parameter. Text values are quoted, numbers are not:
{
"person_a": { "date": "<a_date>", "time": "<a_time>", "tz_offset_minutes": <a_tz>, "lat": <a_lat>, "lng": <a_lng> },
"person_b": { "date": "<b_date>", "time": "<b_time>", "tz_offset_minutes": <b_tz>, "lat": <b_lat>, "lng": <b_lng> },
"genders": { "person_a": "<a_gender>", "person_b": "<b_gender>" }
}Bubble substitutes each value as text, exactly where the placeholder sits. Inside quotes it becomes a JSON string; outside quotes it must already be a valid number - so feed <a_lat> from a number field, not a text input that might hold 19.076 N.
Initialize call: Bubble learns the response from a real answer
Before a call can be used in a workflow, Bubble asks you to Initialize call: it sends the request once with the values typed into the parameter fields and records the shape of what comes back. Use a real pair of births, because an error response would teach Bubble the error's shape instead. The values used here:
data for 24 Apr 1973 17:25 Mumbai (male) and 18 Feb 1976 08:00 Bengaluru (female), koots trimmed to three:
{
"total": { "score": 22, "max": 36, "bucket": "Moderate" },
"koots": [
{ "name": "graha_maitri", "score": 3, "initial_score": 1, "max": 5, "pass": true,
"cancellation_note": "Maitri Dosha cancelled due to the boy's strong Moon" },
{ "name": "bhakoot", "score": 7, "initial_score": 7, "max": 7, "pass": true, "cancellation_note": "" },
{ "name": "nadi", "score": 0, "initial_score": 0, "max": 8, "pass": false, "cancellation_note": "Nadi Dosha Present" }
],
"match_percentage": 61,
"manglik_match": { "boy_present": false, "girl_present": true, "status": "caution",
"note": "Only the girl is manglik. Traditional reading flags this as a manglik mismatch." },
"slotting": { "groom": "person_a", "basis": "gender" }
}After initialising, the workflow's next steps can read Result of step 1's data total score and so on, and koots arrives as a list - bind it to a repeating group with one row per koot, showing score of max and the cancellation_note when it is not empty. If you change the body later, initialise again so Bubble picks up the new fields.
Who is the groom
Varna, Gana and the manglik reading are directional: they compare the groom's chart with the bride's. Without genders, the API reads person_a as the groom. A form that lets either partner fill in the first slot will therefore give different answers for the same couple:
| Request | Score | slotting | Manglik note |
|---|---|---|---|
Mumbai birth as person_a, genders male / female | 22 / 36 | person_a, basis gender | Only the girl is manglik |
Bengaluru birth as person_a, no genders | 21 / 36 (Varna 0) | person_a, basis order | Only the boy is manglik |
Bengaluru birth as person_a, genders female / male | 22 / 36 | person_b, basis gender | Only the girl is manglik |
| Both marked female | 21 / 36 | basis lower-of-both | - |
Send genders from the form and the order stops mattering. When both genders are the same, the API scores the pair both ways and returns the lower result, saying so in slotting.basis. How the score is built: Ashtakoot scoring.
The mistakes that bite first
- A blank dropdown. If the gender dropdown is empty, Bubble still substitutes the placeholder and sends
"person_a": "". That returned400 VALIDATION_ERRORwithInvalid option: expected one of "male"|"female". Make the dropdown required, or use a second call without thegendersobject for users who skip it. - Birth time stored as a Bubble date. Bubble's date type is an instant and is shown in the viewer's time zone, so a birth time saved as a date drifts when someone in another zone opens the record. Store the birth date and time as text (
1973-04-24,17:25) plus the birthplace's offset as a number. Why the offset is the birthplace's. - 12-hour time. A time input formatted as
5:25 PMreturned400withtime must be HH:mm or HH:mm:ss (24h). Format it as17:25before it reaches the call. - The plan.
/v1/compatibilityis a Hobby endpoint; a Free key gets403 PLAN_REQUIRED, which Initialize call will show as the response.
Questions
- Which AstroNode endpoints does the Bubble example call?
- 1 endpoint: Kundli Matching (Ashtakoot Gun Milan) (
POST /v1/compatibility). - Was the Bubble code on this page actually run?
- Bubble was not run. The exact request the API Connector call is configured to send was executed with curl against the in-memory API - the 22/36 result, the swapped-order 21/36, the both-female case and the blank-gender 400 below are from those runs.