Skip to main content

Developer Reference

Astramedica Public API Documentation

Astramedica is a US-based medical-travel coordination company helping patients compare vetted partner clinics in Turkey, organize travel, and move forward with more clarity. Independent physicians make all medical decisions. This documentation covers the read-only public endpoints exposed by the website for service discovery, health checks, and country-code lookup.

Last updated: 2026-05-10OpenAPI JSONAPI Catalog

Public API principles

  • All endpoints documented here are read-only and publicly accessible.
  • These endpoints support website functionality and discovery; they do not expose patient-specific records or protected clinical workflows.
  • For general coordination questions, contact info@astramedica.com or +1 202 500 5004.
GET/api/health

Health endpoint

Use this endpoint to confirm the public Astramedica API surface is reachable. It exposes basic contact and catalog context only and does not include patient data or protected resources.

Returns a lightweight public status payload for agents and developers.

No explicit cache header is set by this route.

Documented responses

  • 200 Healthy public API surface.

Response fields

  • ok (boolean)

    True when the endpoint is healthy.

  • service (string)

    Human-readable API surface name.

  • version (string)

    Application version from package.json.

  • publicServices (number)

    Count of published service pathways.

  • contact (object)

    Public coordination contact details for follow-up questions.

Example response

{
  "ok": true,
  "service": "Astramedica Public API",
  "version": "1.0.0",
  "publicServices": 11,
  "contact": {
    "email": "info@astramedica.com",
    "phone": "+1 202 500 5004"
  }
}
GET/api/services

Services endpoint

This endpoint provides a machine-readable summary of Astramedica's published coordination pathways. It falls back to the static site content if a database-backed service source is unavailable.

Returns the published public service pathways.

Public edge-cached JSON for one hour with stale-while-revalidate.

Documented responses

  • 200 Published service summaries from Supabase or the static content fallback.
  • 429 Request was rate limited.
  • 500 Supabase service lookup failed after retry attempts.

Runtime notes

  • If Supabase configuration is unavailable, the route returns ok: true with service summaries derived from static site content.
  • If the configured Supabase order column is unavailable, the route retries with title.asc and then without an order parameter before returning an error.
  • Rate limited requests return HTTP 429 with ok: false and error: rate_limited. Rate limit headers are included on rate-limited and successful responses.

Response fields

  • ok (boolean)

    True when the response is successful.

  • services (array)

    Published service summaries with a title and short description.

Example response

{
  "ok": true,
  "services": [
    {
      "title": "Hair Transplant",
      "description": "Compare FUE and DHI hair transplant options in Turkey with US-based coordination, travel planning, and vetted partner clinics."
    },
    {
      "title": "Dental Implants",
      "description": "Compare dental implant and full-arch options in Turkey with US-based coordination, travel planning, and vetted partner clinics."
    }
  ]
}
GET/api/country-codes

Country codes endpoint

This endpoint supplies ISO2 country codes, country names, and telephone calling codes for Astramedica's public intake experiences.

Returns country calling codes used by public enquiry forms.

Public edge-cached JSON for one day with stale-while-revalidate.

Documented responses

  • 200 Country calling code records, or an empty array when Supabase is not configured.
  • 429 Request was rate limited.
  • 500 Country-code lookup or seed handling failed; the error value can vary by failure mode.

Runtime notes

  • If Supabase configuration is unavailable, the route returns ok: true with an empty countryCodes array.
  • If the country_calling_codes table is empty, the route attempts to seed records from Rest Countries and then re-fetches from Supabase.
  • For 500 responses, the error value reflects the failure mode returned by the handler.
  • Rate limited requests return HTTP 429 with ok: false and error: rate_limited. Rate limit headers are included on rate-limited and successful responses.

Response fields

  • ok (boolean)

    True when the response is successful.

  • countryCodes (array)

    Country-code lookup records used by public forms.

Example response

{
  "ok": true,
  "countryCodes": [
    {
      "iso2": "US",
      "countryName": "United States",
      "callingCode": "+1"
    }
  ]
}

Machine-readable references