Kundli Matching API - Vue.js Example
Kundli matching request example, documented inputs, server-side authentication and integration checks.
Kundli matching: request contract
Send the two documented profiles under male and female. Collect each timestamp, location and timezone separately; do not reuse one person’s location for both profiles.
POST /v2/astrology/kundli-matching · Operation guide · OpenAPI request and response schema
The values below are synthetic examples. They describe request wiring, rather than a measured result or an accuracy claim. Production requests use your account’s published billing terms; the sandbox provides fixed mock examples for development.
| Field | Location | Type | Schema requirement |
|---|---|---|---|
male | body | object | Optional in the request schema; provide it when your calculation needs it |
female | body | object | Optional in the request schema; provide it when your calculation needs it |
Make the request safely
Set VEDIKA_API_KEY in the trusted server or command-line environment. Keep that key out of browser bundles, mobile builds, URLs and shared logs. Your application exposes the sample backend route on its own origin. The browser and Flutter snippets use that route; the server supplies the production credential. For a deployed application, add your own user authentication, input validation and access limits around the feature.
Browser code in your application
// Call your own backend route on the same origin.
export async function loadCalculation() {
const response = await fetch('/api/vedika-example', { cache: 'no-store' });
if (!response.ok) throw new Error('Unable to load the calculation');
return response.json();
}
Request function for your authenticated backend
// Import this function into your existing authenticated backend route.
export async function requestCalculation() {
const key = process.env.VEDIKA_API_KEY;
if (!key) throw new Error('Set VEDIKA_API_KEY on the server');
const response = await fetch("https://api.vedika.io/v2/astrology/kundli-matching", {
method: 'POST',
headers: { 'Authorization': 'Bearer ' + key, 'Content-Type': 'application/json' },
body: "{\"male\":{\"datetime\":\"1990-05-15T10:30:00\",\"latitude\":28.6139,\"longitude\":77.209,\"timezone\":\"+05:30\"},\"female\":{\"datetime\":\"1992-03-20T14:00:00\",\"latitude\":19.07,\"longitude\":72.87,\"timezone\":\"+05:30\"}}",
cache: 'no-store', redirect: 'error', signal: AbortSignal.timeout(20000)
});
if (!response.ok) throw new Error('Calculation failed: HTTP ' + response.status);
return response.json();
}Check the result before displaying it
- Validate the selected date, location and relevant calculation settings before making a production request.
- Check HTTP status and the operation-specific JSON schema. Keep errors and timeouts visible instead of displaying a previous or invented result.
- Retain only the inputs and result fields your feature needs. Use synthetic cases in public bug reports and avoid copying private birth details into logs.
- When caching, include every input that affects this operation and keep private results scoped to the appropriate user.
Continue with the quickstart, supported SDKs, current billing units and published technical evidence. Create production access through API-key signup.
Try the FREE Sandbox
978 mock operations for development. Production plans from $12/month.
Explore Sandbox →