health_goals

Get Health Goal by ID

Returns a single health goal with its associated subgoals

get/api/health_goals/{id}

Request

  • Base URL: https://api.supp.co
  • URL: https://api.supp.co/api/health_goals/{id}
  • Auth: none required

Path parameters

idstring required

ID of the health goal to retrieve

Response

Successful operation

idstring required
namestring required
iconstring required
colorstring required
image_urlstring nullable required
descriptionstring nullable required
nutrients_countinteger required
grade_a_effects_countinteger required
grade_b_effects_countinteger required
paper_references_countinteger required
subgoal_idsstring[] required
subgoal_namesstring[] required

Example response

{
  "id": "bone-joint-health",
  "name": "Bone & Joint Health",
  "icon": "bone-joint-health",
  "color": "#9CA3AF",
  "image_url": "https://res.cloudinary.com/example/health_goals/bone-joint-health/image",
  "description": "Supplements and nutrients that support bone density and joint health.",
  "nutrients_count": 12,
  "grade_a_effects_count": 5,
  "grade_b_effects_count": 3,
  "paper_references_count": 42,
  "subgoal_ids": [
    "joint-support",
    "calcium-absorption"
  ],
  "subgoal_names": [
    "Joint Support",
    "Calcium Absorption"
  ],
  "subgoals": [
    {
      "id": "joint-support",
      "name": "Joint Support",
      "description": "Supplements that help maintain healthy joint function and mobility."
    }
  ],
  "most_stacked_products": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "slug": "vitamin-d3-5000-iu",
      "name": "Vitamin D3 5000 IU",
      "brand": "Thorne",
      "image_url": "https://example.com/product.jpg",
      "product_trust_score": "85.0",
      "product_trust_score_complete": true,
      "product_trust_score_status": "complete",
      "brand_trust_score": "90.0",
      "brand_trust_score_state": "complete",
      "format": "capsule",
      "servings_per_container": "60",
      "serving_size": "1 capsule",
      "price": "29.99",
      "price_per_serving": "0.50",
      "health_goals": [
        "bone-health",
        "immune-support"
      ]
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.