โ˜ฐ DiAstrologer API Docs

Admin Dashboard

16 endpoint(s).

Endpoint Method Summary Auth
/api/v1/admin/dashboard/api-income GET Api Income ๐Ÿ”’
/api/v1/admin/dashboard/consultations GET List Consultations ๐Ÿ”’
/api/v1/admin/dashboard/consultations/{order_id}/status POST Update Consultation Status ๐Ÿ”’
/api/v1/admin/dashboard/entitlements GET List Entitlements ๐Ÿ”’
/api/v1/admin/dashboard/leads GET List Leads ๐Ÿ”’
/api/v1/admin/dashboard/payments GET List Payments ๐Ÿ”’
/api/v1/admin/dashboard/refund POST Issue Refund ๐Ÿ”’
/api/v1/admin/dashboard/refunds GET List Refunds ๐Ÿ”’
/api/v1/admin/dashboard/report-inputs GET List Report Inputs ๐Ÿ”’
/api/v1/admin/dashboard/reviews GET List Reviews Admin ๐Ÿ”’
/api/v1/admin/dashboard/reviews/{review_id}/moderate POST Moderate Review ๐Ÿ”’
/api/v1/admin/dashboard/summary GET Summary ๐Ÿ”’
/api/v1/admin/dashboard/system-health GET System Health ๐Ÿ”’
/api/v1/admin/dashboard/tool-usage GET List Tool Usage ๐Ÿ”’
/api/v1/admin/dashboard/users GET List Users ๐Ÿ”’
/api/v1/admin/dashboard/users/{user_id} GET User Detail ๐Ÿ”’

GET /api/v1/admin/dashboard/api-income

Api Income

Income from developer-API credit sales: revenue, credits sold/spent/ outstanding, and recent paid top-up orders. Backs the dashboard's API card.

๐Ÿ”’ Authentication required โ€” send Authorization: Bearer <API_KEY>

Example

curl -X GET 'https://api.example.com/api/v1/admin/dashboard/api-income' \
  -H 'Authorization: Bearer <API_KEY>'

GET /api/v1/admin/dashboard/consultations

List Consultations

Booked consultations (newest slot first) for the admin to fulfil.

๐Ÿ”’ Authentication required โ€” send Authorization: Bearer <API_KEY>

Param In Type Required Description
status query any no
limit query integer no
offset query integer no

Response 422 โ€” HTTPValidationError

Example

curl -X GET 'https://api.example.com/api/v1/admin/dashboard/consultations' \
  -H 'Authorization: Bearer <API_KEY>'

POST /api/v1/admin/dashboard/consultations/{order_id}/status

Update Consultation Status

Mark a booking confirmed / completed / cancelled.

๐Ÿ”’ Authentication required โ€” send Authorization: Bearer <API_KEY>

Param In Type Required Description
order_id path string yes

Request body (application/json)

Field Type Required Description
status string yes

Response 422 โ€” HTTPValidationError

Example

curl -X POST 'https://api.example.com/api/v1/admin/dashboard/consultations/${order_id}/status' \
  -H 'Authorization: Bearer <API_KEY>'

GET /api/v1/admin/dashboard/entitlements

List Entitlements

๐Ÿ”’ Authentication required โ€” send Authorization: Bearer <API_KEY>

Param In Type Required Description
q query any no
limit query integer no
offset query integer no

Response 422 โ€” HTTPValidationError

Example

curl -X GET 'https://api.example.com/api/v1/admin/dashboard/entitlements' \
  -H 'Authorization: Bearer <API_KEY>'

GET /api/v1/admin/dashboard/leads

List Leads

Captured leads (free-PDF download form), newest first.

๐Ÿ”’ Authentication required โ€” send Authorization: Bearer <API_KEY>

Param In Type Required Description
q query any no name / email / phone substring
limit query integer no
offset query integer no

Response 422 โ€” HTTPValidationError

Example

curl -X GET 'https://api.example.com/api/v1/admin/dashboard/leads' \
  -H 'Authorization: Bearer <API_KEY>'

GET /api/v1/admin/dashboard/payments

List Payments

๐Ÿ”’ Authentication required โ€” send Authorization: Bearer <API_KEY>

Param In Type Required Description
status query any no
q query any no email or order_id substring
limit query integer no
offset query integer no

Response 422 โ€” HTTPValidationError

Example

curl -X GET 'https://api.example.com/api/v1/admin/dashboard/payments' \
  -H 'Authorization: Bearer <API_KEY>'

POST /api/v1/admin/dashboard/refund

Issue Refund

Issue a refund through Razorpay for a captured order, then persist the returned refund id. Revokes the matching entitlement. The refund.processed webhook later reconciles the same row idempotently.

๐Ÿ”’ Authentication required โ€” send Authorization: Bearer <API_KEY>

Request body (application/json)

Field Type Required Description
order_id string yes
amount_paise any no

Response 422 โ€” HTTPValidationError

Example

curl -X POST 'https://api.example.com/api/v1/admin/dashboard/refund' \
  -H 'Authorization: Bearer <API_KEY>'

GET /api/v1/admin/dashboard/refunds

List Refunds

Refund ledger for the dashboard.

Returns two buckets: โ€ข refunds โ€” rows already refunded, with their Razorpay refund id. โ€ข refundable โ€” captured ('paid') orders that can still be refunded.

๐Ÿ”’ Authentication required โ€” send Authorization: Bearer <API_KEY>

Param In Type Required Description
limit query integer no
offset query integer no

Response 422 โ€” HTTPValidationError

Example

curl -X GET 'https://api.example.com/api/v1/admin/dashboard/refunds' \
  -H 'Authorization: Bearer <API_KEY>'

GET /api/v1/admin/dashboard/report-inputs

List Report Inputs

Captured user inputs (name, DOB, time, place, โ€ฆ) for every tool call โ€” the recovery safety net. Filter failures_only=true to see calls that errored so support can regenerate + email the report manually.

๐Ÿ”’ Authentication required โ€” send Authorization: Bearer <API_KEY>

Param In Type Required Description
failures_only query boolean no
q query any no email or name substring
limit query integer no
offset query integer no

Response 422 โ€” HTTPValidationError

Example

curl -X GET 'https://api.example.com/api/v1/admin/dashboard/report-inputs' \
  -H 'Authorization: Bearer <API_KEY>'

GET /api/v1/admin/dashboard/reviews

List Reviews Admin

All reviews (newest first) for moderation.

๐Ÿ”’ Authentication required โ€” send Authorization: Bearer <API_KEY>

Param In Type Required Description
approved query any no filter by approval state
limit query integer no
offset query integer no

Response 422 โ€” HTTPValidationError

Example

curl -X GET 'https://api.example.com/api/v1/admin/dashboard/reviews' \
  -H 'Authorization: Bearer <API_KEY>'

POST /api/v1/admin/dashboard/reviews/{review_id}/moderate

Moderate Review

Approve, hide (un-approve), or delete a review.

๐Ÿ”’ Authentication required โ€” send Authorization: Bearer <API_KEY>

Param In Type Required Description
review_id path integer yes

Request body (application/json)

Field Type Required Description
action string yes

Response 422 โ€” HTTPValidationError

Example

curl -X POST 'https://api.example.com/api/v1/admin/dashboard/reviews/${review_id}/moderate' \
  -H 'Authorization: Bearer <API_KEY>'

GET /api/v1/admin/dashboard/summary

Summary

Top-line numbers for the dashboard header cards.

๐Ÿ”’ Authentication required โ€” send Authorization: Bearer <API_KEY>

Example

curl -X GET 'https://api.example.com/api/v1/admin/dashboard/summary' \
  -H 'Authorization: Bearer <API_KEY>'

GET /api/v1/admin/dashboard/system-health

System Health

Live status of every service on the box. Used by the 'Up/Down' panel.

๐Ÿ”’ Authentication required โ€” send Authorization: Bearer <API_KEY>

Example

curl -X GET 'https://api.example.com/api/v1/admin/dashboard/system-health' \
  -H 'Authorization: Bearer <API_KEY>'

GET /api/v1/admin/dashboard/tool-usage

List Tool Usage

๐Ÿ”’ Authentication required โ€” send Authorization: Bearer <API_KEY>

Param In Type Required Description
tool_id query any no
user_email query any no
limit query integer no
offset query integer no

Response 422 โ€” HTTPValidationError

Example

curl -X GET 'https://api.example.com/api/v1/admin/dashboard/tool-usage' \
  -H 'Authorization: Bearer <API_KEY>'

GET /api/v1/admin/dashboard/users

List Users

๐Ÿ”’ Authentication required โ€” send Authorization: Bearer <API_KEY>

Param In Type Required Description
q query any no Search by email substring
limit query integer no
offset query integer no

Response 422 โ€” HTTPValidationError

Example

curl -X GET 'https://api.example.com/api/v1/admin/dashboard/users' \
  -H 'Authorization: Bearer <API_KEY>'

GET /api/v1/admin/dashboard/users/{user_id}

User Detail

๐Ÿ”’ Authentication required โ€” send Authorization: Bearer <API_KEY>

Param In Type Required Description
user_id path integer yes

Response 422 โ€” HTTPValidationError

Example

curl -X GET 'https://api.example.com/api/v1/admin/dashboard/users/${user_id}' \
  -H 'Authorization: Bearer <API_KEY>'