{"components":{"responses":{},"schemas":{"ActivitySearchResponse":{"description":"Activity search results with hierarchical subcategories and MET-based energy expenditure data.\nEach activity contains subcategories with detailed MET variations from the Compendium of Physical Activities.\n","example":{"data":[{"activity_name":"running","display_name":"Running","id":"running","met_range":{"max":23.0,"min":3.3},"subcategories":[{"met_count":34,"met_range":{"max":23.0,"min":3.3},"met_variations":[{"description":"Running, general, self-selected pace","id":"running_7_met_0","met_value":7.5},{"description":"Jogging 2.6 to 3.7 mph (6.0 km/h)","id":"running_7_met_2","met_value":3.3},{"description":"Incline run, 6-6.3 mph (10 min/mile)","id":"running_7_met_8","met_value":9.3}],"name":"Street Running"}],"subcategory_count":6,"subcategory_names":["Street Running","Track Running","Trail Running"],"total_met_count":65}]},"properties":{"data":{"description":"Array of matching activity documents","items":{"properties":{"activity_name":{"description":"Activity name","type":"string"},"display_name":{"description":"Display name for UI","type":"string"},"id":{"description":"Activity identifier (e.g. running, biking)","type":"string"},"met_range":{"description":"Min/max MET values across all subcategories","properties":{"max":{"description":"Highest MET value","type":"number"},"min":{"description":"Lowest MET value","type":"number"}},"type":"object"},"subcategories":{"description":"Activity subcategories with MET data","items":{"properties":{"met_count":{"description":"Number of MET variations","type":"integer"},"met_range":{"properties":{"max":{"type":"number"},"min":{"type":"number"}},"type":"object"},"met_variations":{"description":"Detailed MET values from the Compendium of Physical Activities","items":{"properties":{"description":{"description":"Activity description with speed/intensity details","type":"string"},"id":{"description":"MET variation ID","type":"string"},"met_value":{"description":"MET value (multiply by weight in kg for kcal/hour)","type":"number"}},"type":"object"},"type":"array"},"name":{"description":"Subcategory name (e.g. Street Running, Trail Running)","type":"string"}},"type":"object"},"type":"array"},"subcategory_count":{"description":"Number of subcategories","type":"integer"},"subcategory_names":{"description":"List of subcategory display names","items":{"type":"string"},"type":"array"},"total_met_count":{"description":"Total number of MET variations across all subcategories","type":"integer"}},"type":"object"},"type":"array"}},"required":["data"],"title":"ActivitySearchResponse","type":"object"},"BarcodeDocumentResponse":{"description":"A single branded food product looked up by barcode.","properties":{"data":{"properties":{"brandOwner":{"description":"Brand owner / manufacturer","type":"string"},"desc":{"description":"Product name","type":"string"},"gtinUpc":{"description":"GTIN/UPC barcode","type":"string"},"id":{"description":"Product barcode / ID","type":"string"},"marketCountry":{"description":"Country where the product is sold","type":"string"},"nutrients":{"additionalProperties":{"properties":{"name":{"type":"string"},"need":{"nullable":true,"type":"number"},"unit":{"type":"string"},"value":{"type":"number"}},"type":"object"},"description":"Map of nutrient ID → {name, unit, value}. Values are per 100 g.","type":"object"},"portions":{"additionalProperties":{"properties":{"a":{"type":"number"},"d":{"type":"string"}},"type":"object"},"description":"Map of portion index → {a: grams, d: description}","type":"object"}},"type":"object"}},"required":["data"],"title":"BarcodeDocumentResponse","type":"object"},"BarcodeGetRequest":{"description":"Optional request body for barcode lookup. All fields are optional — omit the body entirely to get the product without daily need values.","properties":{"body":{"description":"Body measurements and optional macro targets. Omit entirely to use 2000 kcal reference defaults.\n\n**All values must use metric units:**\n- `weight` — kilograms (kg)\n- `height` — centimeters (cm)\n- `age` — years\n- `target_amount` — kilocalories (kcal)\n","properties":{"activity_level":{"description":"Physical activity level (used as TDEE multiplier):\n- `1` — Sedentary (little or no exercise)\n- `2` — Lightly active (1–3 days/week)\n- `3` — Moderately active (3–5 days/week)\n- `4` — Very active (6–7 days/week)\n- `5` — Extra active (physical job + hard exercise)\n","example":3,"maximum":5,"minimum":1,"type":"integer"},"age":{"description":"Age in **years**","example":30,"type":"integer"},"gender":{"description":"Biological sex / condition for nutrient calculations:\n- `m` — Male\n- `f` — Female\n- `p` — Pregnant\n- `l` — Lactating\n","enum":["m","f","p","l"],"type":"string"},"height":{"description":"Height in **centimeters** (cm). Example: 180 = 180 cm","example":180,"type":"number"},"macro_target":{"description":"Optional macro split and calorie target. Defaults to maintenance 30/40/30 when omitted.","properties":{"carb":{"description":"Carbohydrate percentage of total calories (0–100)","example":40,"type":"number"},"fat":{"description":"Fat percentage of total calories (0–100)","example":30,"type":"number"},"protein":{"description":"Protein percentage of total calories (0–100)","example":30,"type":"number"},"target_amount":{"description":"Calorie offset from TDEE in **kcal** (only used when target_type is deficit or surplus)","example":300,"type":"number"},"target_type":{"description":"Calorie goal relative to TDEE:\n- `maintenance` — Eat at TDEE (no offset)\n- `deficit` — Subtract `target_amount` kcal from TDEE\n- `surplus` — Add `target_amount` kcal to TDEE\n","enum":["maintenance","deficit","surplus"],"type":"string"}},"type":"object"},"weight":{"description":"Body weight in **kilograms** (kg). Example: 80 = 80 kg","example":80,"type":"number"}},"type":"object"},"locale":{"description":"Locale code (default: en)","type":"string"}},"title":"BarcodeGetRequest","type":"object"},"BarcodeScanRequest":{"description":"Multipart form upload to scan a barcode from an image. The image must contain a visible EAN/UPC barcode.","properties":{"body":{"description":"JSON string with body measurements for personalized daily needs (weight, height, age, gender, activity_level, macro_target)","type":"string"},"image":{"description":"JPEG or PNG image containing a barcode","format":"binary","type":"string"},"locale":{"description":"Locale code (default: en)","type":"string"}},"required":["image"],"title":"BarcodeScanRequest","type":"object"},"BarcodeSearchRequest":{"description":"Branded food search request body.","properties":{"body":{"description":"Body measurements and optional macro targets. Omit entirely to use 2000 kcal reference defaults.\n\n**All values must use metric units:**\n- `weight` — kilograms (kg)\n- `height` — centimeters (cm)\n- `age` — years\n- `target_amount` — kilocalories (kcal)\n","properties":{"activity_level":{"description":"Physical activity level (used as TDEE multiplier):\n- `1` — Sedentary (little or no exercise)\n- `2` — Lightly active (1–3 days/week)\n- `3` — Moderately active (3–5 days/week)\n- `4` — Very active (6–7 days/week)\n- `5` — Extra active (physical job + hard exercise)\n","example":3,"maximum":5,"minimum":1,"type":"integer"},"age":{"description":"Age in **years**","example":30,"type":"integer"},"gender":{"description":"Biological sex / condition for nutrient calculations:\n- `m` — Male\n- `f` — Female\n- `p` — Pregnant\n- `l` — Lactating\n","enum":["m","f","p","l"],"type":"string"},"height":{"description":"Height in **centimeters** (cm). Example: 180 = 180 cm","example":180,"type":"number"},"macro_target":{"description":"Optional macro split and calorie target. Defaults to maintenance 30/40/30 when omitted.","properties":{"carb":{"description":"Carbohydrate percentage of total calories (0–100)","example":40,"type":"number"},"fat":{"description":"Fat percentage of total calories (0–100)","example":30,"type":"number"},"protein":{"description":"Protein percentage of total calories (0–100)","example":30,"type":"number"},"target_amount":{"description":"Calorie offset from TDEE in **kcal** (only used when target_type is deficit or surplus)","example":300,"type":"number"},"target_type":{"description":"Calorie goal relative to TDEE:\n- `maintenance` — Eat at TDEE (no offset)\n- `deficit` — Subtract `target_amount` kcal from TDEE\n- `surplus` — Add `target_amount` kcal to TDEE\n","enum":["maintenance","deficit","surplus"],"type":"string"}},"type":"object"},"weight":{"description":"Body weight in **kilograms** (kg). Example: 80 = 80 kg","example":80,"type":"number"}},"type":"object"},"limit":{"description":"Max results (default 20)","type":"integer"},"locale":{"description":"Locale code","type":"string"},"offset":{"description":"Pagination offset","type":"integer"},"q":{"description":"Search query","type":"string"}},"required":["q"],"title":"BarcodeSearchRequest","type":"object"},"BarcodeSearchResponse":{"description":"Branded food search results.","example":{"data":[{"brandOwner":"Big K","desc":"Cola","gtinUpc":"0011110812414","id":"0011110812414","marketCountry":"United States","nutrients":{"1003":{"name":"Protein","unit":"g","value":0},"1005":{"name":"Carbohydrate","unit":"g","value":4.76},"1008":{"name":"Energy","unit":"Kcal","value":19}},"portions":{"1":{"a":236.59,"d":"1 serving"}}}]},"properties":{"data":{"description":"Array of matching branded food products","items":{"properties":{"brandOwner":{"description":"Brand owner / manufacturer","type":"string"},"desc":{"description":"Product name","type":"string"},"gtinUpc":{"description":"GTIN/UPC barcode (8-14 digits)","type":"string"},"id":{"description":"Product barcode / ID","type":"string"},"marketCountry":{"description":"Country where the product is sold","type":"string"},"nutrients":{"additionalProperties":{"properties":{"name":{"description":"Nutrient name","type":"string"},"need":{"description":"Daily need value (present when body param is provided)","nullable":true,"type":"number"},"unit":{"description":"Unit","type":"string"},"value":{"description":"Amount per 100 g","type":"number"}},"type":"object"},"description":"Map of nutrient ID → {name, unit, value}. Values are per 100 g.","type":"object"},"portions":{"additionalProperties":{"properties":{"a":{"description":"Weight in grams","type":"number"},"d":{"description":"Portion description","type":"string"}},"type":"object"},"description":"Map of portion index → {a: grams, d: description}","type":"object"}},"type":"object"},"type":"array"}},"required":["data"],"title":"BarcodeSearchResponse","type":"object"},"DishDocumentResponse":{"description":"A single dish document with full ingredients and nutrition data.","properties":{"data":{"properties":{"category_id":{"description":"Category code","type":"string"},"category_name":{"description":"Category name","type":"string"},"country":{"description":"Country of origin","type":"string"},"country_code":{"description":"ISO country code","type":"string"},"desc":{"description":"Dish name","type":"string"},"english_title":{"description":"English dish title","type":"string"},"id":{"description":"Unique dish ID","type":"string"},"ingredient_count":{"description":"Number of ingredients","type":"integer"},"language_code":{"description":"Source language code","type":"string"},"match_stats":{"description":"Ingredient matching summary","properties":{"avg_score":{"description":"Average match confidence","type":"number"},"matched":{"description":"Successfully matched","type":"integer"},"total":{"description":"Total ingredients","type":"integer"},"unmatched":{"description":"Not matched","type":"integer"}},"type":"object"},"native_title":{"description":"Original dish title","type":"string"},"normalized_ingredients":{"description":"Ingredients matched to food database entries","items":{"properties":{"grams_raw":{"type":"number"},"match_score":{"type":"number"},"match_type":{"type":"string"},"matched_desc":{"type":"string"},"matched_id":{"type":"string"},"original_name":{"type":"string"}},"type":"object"},"type":"array"},"nutrients":{"additionalProperties":{"properties":{"name":{"type":"string"},"need":{"nullable":true,"type":"number"},"unit":{"type":"string"},"value":{"type":"number"}},"type":"object"},"description":"Map of nutrient ID → {name, unit, value}. Values are per 100 g.","type":"object"},"portion_grams_prepared":{"description":"Prepared serving weight in grams","type":"number"},"portion_grams_total_raw":{"description":"Total raw weight in grams","type":"number"},"portions":{"additionalProperties":{"properties":{"a":{"type":"string"},"d":{"type":"string"}},"type":"object"},"description":"Map of portion index → {a: grams, d: description}","type":"object"}},"type":"object"}},"required":["data"],"title":"DishDocumentResponse","type":"object"},"DishGetRequest":{"description":"Optional request body for getting a dish by ID. All fields are optional — omit the body entirely to get the dish without daily need values.","properties":{"body":{"description":"Body measurements and optional macro targets. Omit entirely to use 2000 kcal reference defaults.\n\n**All values must use metric units:**\n- `weight` — kilograms (kg)\n- `height` — centimeters (cm)\n- `age` — years\n- `target_amount` — kilocalories (kcal)\n","properties":{"activity_level":{"description":"Physical activity level (used as TDEE multiplier):\n- `1` — Sedentary (little or no exercise)\n- `2` — Lightly active (1–3 days/week)\n- `3` — Moderately active (3–5 days/week)\n- `4` — Very active (6–7 days/week)\n- `5` — Extra active (physical job + hard exercise)\n","example":3,"maximum":5,"minimum":1,"type":"integer"},"age":{"description":"Age in **years**","example":30,"type":"integer"},"gender":{"description":"Biological sex / condition for nutrient calculations:\n- `m` — Male\n- `f` — Female\n- `p` — Pregnant\n- `l` — Lactating\n","enum":["m","f","p","l"],"type":"string"},"height":{"description":"Height in **centimeters** (cm). Example: 180 = 180 cm","example":180,"type":"number"},"macro_target":{"description":"Optional macro split and calorie target. Defaults to maintenance 30/40/30 when omitted.","properties":{"carb":{"description":"Carbohydrate percentage of total calories (0–100)","example":40,"type":"number"},"fat":{"description":"Fat percentage of total calories (0–100)","example":30,"type":"number"},"protein":{"description":"Protein percentage of total calories (0–100)","example":30,"type":"number"},"target_amount":{"description":"Calorie offset from TDEE in **kcal** (only used when target_type is deficit or surplus)","example":300,"type":"number"},"target_type":{"description":"Calorie goal relative to TDEE:\n- `maintenance` — Eat at TDEE (no offset)\n- `deficit` — Subtract `target_amount` kcal from TDEE\n- `surplus` — Add `target_amount` kcal to TDEE\n","enum":["maintenance","deficit","surplus"],"type":"string"}},"type":"object"},"weight":{"description":"Body weight in **kilograms** (kg). Example: 80 = 80 kg","example":80,"type":"number"}},"type":"object"},"locale":{"description":"Locale code (default: en)","type":"string"}},"title":"DishGetRequest","type":"object"},"DishSearchRequest":{"description":"Dish search request body.","properties":{"body":{"description":"Body measurements and optional macro targets. Omit entirely to use 2000 kcal reference defaults.\n\n**All values must use metric units:**\n- `weight` — kilograms (kg)\n- `height` — centimeters (cm)\n- `age` — years\n- `target_amount` — kilocalories (kcal)\n","properties":{"activity_level":{"description":"Physical activity level (used as TDEE multiplier):\n- `1` — Sedentary (little or no exercise)\n- `2` — Lightly active (1–3 days/week)\n- `3` — Moderately active (3–5 days/week)\n- `4` — Very active (6–7 days/week)\n- `5` — Extra active (physical job + hard exercise)\n","example":3,"maximum":5,"minimum":1,"type":"integer"},"age":{"description":"Age in **years**","example":30,"type":"integer"},"gender":{"description":"Biological sex / condition for nutrient calculations:\n- `m` — Male\n- `f` — Female\n- `p` — Pregnant\n- `l` — Lactating\n","enum":["m","f","p","l"],"type":"string"},"height":{"description":"Height in **centimeters** (cm). Example: 180 = 180 cm","example":180,"type":"number"},"macro_target":{"description":"Optional macro split and calorie target. Defaults to maintenance 30/40/30 when omitted.","properties":{"carb":{"description":"Carbohydrate percentage of total calories (0–100)","example":40,"type":"number"},"fat":{"description":"Fat percentage of total calories (0–100)","example":30,"type":"number"},"protein":{"description":"Protein percentage of total calories (0–100)","example":30,"type":"number"},"target_amount":{"description":"Calorie offset from TDEE in **kcal** (only used when target_type is deficit or surplus)","example":300,"type":"number"},"target_type":{"description":"Calorie goal relative to TDEE:\n- `maintenance` — Eat at TDEE (no offset)\n- `deficit` — Subtract `target_amount` kcal from TDEE\n- `surplus` — Add `target_amount` kcal to TDEE\n","enum":["maintenance","deficit","surplus"],"type":"string"}},"type":"object"},"weight":{"description":"Body weight in **kilograms** (kg). Example: 80 = 80 kg","example":80,"type":"number"}},"type":"object"},"limit":{"description":"Max results (default 20)","type":"integer"},"locale":{"description":"Locale code","type":"string"},"offset":{"description":"Pagination offset","type":"integer"},"q":{"description":"Search query","type":"string"}},"required":["q"],"title":"DishSearchRequest","type":"object"},"DishSearchResponse":{"description":"Dish search results with ingredients and nutrition per serving.","example":{"data":[{"category_name":"Meals","country":"Finland","country_code":"FI","desc":"Pasta","english_title":"Pasta","id":"FRFI7Jphn","ingredient_count":5,"native_title":"Pasta","normalized_ingredients":[{"grams_raw":100,"match_score":0.9826,"match_type":"hybrid","matched_desc":"Wheat flour, white, all-purpose, unenriched","matched_id":"SR169761","original_name":"Wheat flour, white, all-purpose"}],"nutrients":{"1003":{"name":"Protein","unit":"g","value":4.75},"1004":{"name":"Fat","unit":"g","value":3.07},"1008":{"name":"Energy","unit":"Kcal","value":137.06}},"portion_grams_prepared":350,"portion_grams_total_raw":200,"portions":{"1":{"a":"350","d":"1 serving"}}}]},"properties":{"data":{"description":"Array of matching dish documents","items":{"properties":{"category_name":{"description":"Dish category (e.g. Meals, Desserts)","type":"string"},"country":{"description":"Country of origin","type":"string"},"country_code":{"description":"ISO country code","type":"string"},"desc":{"description":"Dish name","type":"string"},"english_title":{"description":"English dish title","type":"string"},"id":{"description":"Unique dish ID","type":"string"},"ingredient_count":{"description":"Number of ingredients","type":"integer"},"native_title":{"description":"Original dish title in source language","type":"string"},"normalized_ingredients":{"description":"Ingredients matched to food database entries","items":{"properties":{"grams_raw":{"description":"Weight in grams","type":"number"},"match_score":{"description":"Match confidence (0.0–1.0)","type":"number"},"match_type":{"description":"Match method (hybrid, exact)","type":"string"},"matched_desc":{"description":"Matched food name","type":"string"},"matched_id":{"description":"Matched food database ID","type":"string"},"original_name":{"description":"Ingredient as listed in dish","type":"string"}},"type":"object"},"type":"array"},"nutrients":{"additionalProperties":{"properties":{"name":{"description":"Nutrient name","type":"string"},"need":{"description":"Daily need value (present when body param is provided)","nullable":true,"type":"number"},"unit":{"description":"Unit (g, mg, µg, kcal, IU)","type":"string"},"value":{"description":"Amount per 100 g","type":"number"}},"type":"object"},"description":"Map of nutrient ID → {name, unit, value}. Values are per 100 g of prepared dish.","type":"object"},"portion_grams_prepared":{"description":"Prepared serving weight in grams","type":"number"},"portion_grams_total_raw":{"description":"Total raw weight in grams","type":"number"},"portions":{"additionalProperties":{"properties":{"a":{"description":"Weight in grams","type":"string"},"d":{"description":"Portion description","type":"string"}},"type":"object"},"description":"Map of portion index → {a: grams, d: description}","type":"object"}},"type":"object"},"type":"array"}},"required":["data"],"title":"DishSearchResponse","type":"object"},"ErrorResponse":{"example":{"error":"Invalid email or password"},"properties":{"error":{"oneOf":[{"type":"string"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["error"],"title":"ErrorResponse","type":"object"},"ExerciseDocumentResponse":{"description":"A single exercise document with full details.","properties":{"data":{"properties":{"BodyPart":{"description":"Target body part","items":{"enum":["abs","arms","back","calves","cardio","chest","feet","forearms","glutes","legs","neck","plyometrics","shoulders","stretching","weightlifting","yoga"],"type":"string"},"type":"array"},"Equipment":{"description":"Required equipment","items":{"enum":["Assisted","Band","Barbell","Battling Rope","Body weight","Bosu ball","Cable","Dumbbell","EZ Barbell","Hammer","Kettlebell","Leverage machine","Medicine Ball","Olympic barbell","Power Sled","Resistance Band","Roll","Rollball","Rope","Sled machine","Smith machine","Stability ball","Stick","Suspension","Trap bar","Vibrate Plate","Weighted","Wheel roller"],"type":"string"},"type":"array"},"ExerciseType":{"description":"Exercise type","items":{"enum":["strength_training","strength_training.functional","stretching"],"type":"string"},"type":"array"},"MuscleDistribution":{"additionalProperties":{"type":"number"},"description":"Muscle activation percentages (muscle name → 0.0–1.0)","type":"object"},"Synergist":{"description":"Secondary/assisting muscles","items":{"type":"string"},"type":"array"},"Target":{"description":"Primary target muscles","items":{"enum":["Adductor Brevis","Adductor Longus","Adductor Magnus","Biceps Brachii","Brachialis","Brachioradialis","Deep Hip External Rotators","Deltoid","Deltoid Anterior","Deltoid Lateral","Deltoid Posterior","Erector Spinae","Gastrocnemius","Gluteus Maximus","Gluteus Medius","Gluteus Minimus","Gracilis","Hamstrings","Iliopsoas","Infraspinatus","Latissimus Dorsi","Levator Scapulae","Obliques","Pectineous","Pectoralis Major","Pectoralis Major Clavicular Head","Pectoralis Major Sternal Head","Quadriceps","Rectus Abdominis","Rhomboids","Sartorius","Serratus Anterior","Soleus","Splenius","Sternocleidomastoid","Subscapularis","Tensor Fasciae Latae","Teres Major","Teres Minor","Tibialis Anterior","Transverse Abdominus","Trapezius","Trapezius Lower Fibers","Trapezius Middle Fibers","Trapezius Upper Fibers","Triceps Brachii","Wrist Extensors","Wrist Flexors"],"type":"string"},"type":"array"},"exercise":{"description":"Exercise name","type":"string"},"id":{"description":"Unique exercise ID","type":"string"},"info":{"description":"Detailed exercise description and benefits","type":"string"},"instructions":{"description":"Step-by-step instructions","items":{"type":"string"},"type":"array"},"tips":{"description":"Performance tips","items":{"type":"string"},"type":"array"},"urlExerciseName":{"description":"URL-friendly exercise name","type":"string"}},"type":"object"}},"required":["data"],"title":"ExerciseDocumentResponse","type":"object"},"ExerciseSearchRequest":{"description":"Exercise search request body with optional filters. All filter fields accept arrays for multi-select (OR within category, AND across categories).","example":{"body_parts":["chest"],"equipments":["Barbell","Dumbbell"],"exercise_types":["strength_training"],"limit":20,"locale":"en","offset":0,"q":"bench press","targets":["Pectoralis Major Sternal Head"]},"properties":{"body_parts":{"description":"Filter by body part","items":{"enum":["abs","arms","back","calves","cardio","chest","feet","forearms","glutes","legs","neck","plyometrics","shoulders","stretching","weightlifting","yoga"],"type":"string"},"type":"array"},"equipments":{"description":"Filter by equipment","items":{"enum":["Assisted","Band","Barbell","Battling Rope","Body weight","Bosu ball","Cable","Dumbbell","EZ Barbell","Hammer","Kettlebell","Leverage machine","Medicine Ball","Olympic barbell","Power Sled","Resistance Band","Roll","Rollball","Rope","Sled machine","Smith machine","Stability ball","Stick","Suspension","Trap bar","Vibrate Plate","Weighted","Wheel roller"],"type":"string"},"type":"array"},"exercise_types":{"description":"Filter by exercise type","items":{"enum":["strength_training","strength_training.functional","stretching"],"type":"string"},"type":"array"},"limit":{"description":"Max results (1–100, default 20)","type":"integer"},"locale":{"description":"Locale code for translated exercise info, tips and instructions","enum":["af","ar","az","bg","bn","bs","cs","da","de","el","en","es","et","fa","fi","fil","fr","he","hi","hr","hu","id","is","it","ja","ka","ko","lt","lv","mn","ms","nl","nn","pl","pt","ro","ru","sk","sl","sq","sr","sv","th","tr","uk","ur","vi","zh"],"type":"string"},"offset":{"description":"Pagination offset (0–100000)","type":"integer"},"q":{"description":"Search query (e.g. 'bench press')","type":"string"},"targets":{"description":"Filter by target muscle","items":{"enum":["Adductor Brevis","Adductor Longus","Adductor Magnus","Biceps Brachii","Brachialis","Brachioradialis","Deep Hip External Rotators","Deltoid","Deltoid Anterior","Deltoid Lateral","Deltoid Posterior","Erector Spinae","Gastrocnemius","Gluteus Maximus","Gluteus Medius","Gluteus Minimus","Gracilis","Hamstrings","Iliopsoas","Infraspinatus","Latissimus Dorsi","Levator Scapulae","Obliques","Pectineous","Pectoralis Major","Pectoralis Major Clavicular Head","Pectoralis Major Sternal Head","Quadriceps","Rectus Abdominis","Rhomboids","Sartorius","Serratus Anterior","Soleus","Splenius","Sternocleidomastoid","Subscapularis","Tensor Fasciae Latae","Teres Major","Teres Minor","Tibialis Anterior","Transverse Abdominus","Trapezius","Trapezius Lower Fibers","Trapezius Middle Fibers","Trapezius Upper Fibers","Triceps Brachii","Wrist Extensors","Wrist Flexors"],"type":"string"},"type":"array"}},"title":"ExerciseSearchRequest","type":"object"},"ExerciseSearchResponse":{"description":"Exercise search results with full exercise details.","example":{"data":[{"BodyPart":["chest"],"Equipment":["Barbell"],"ExerciseType":["strength_training"],"MuscleDistribution":{"Deltoid Anterior":0.2,"Pectoralis Major Clavicular Head":0.25,"Pectoralis Major Sternal Head":0.4,"Triceps Brachii":0.15},"Synergist":["Deltoid Anterior","Pectoralis Major Clavicular Head","Triceps Brachii"],"Target":["Pectoralis Major Sternal Head"],"exercise":"Barbell Bench Press","id":"0025","info":"The Barbell Bench Press is a fundamental compound exercise...","instructions":["Position yourself supine on a flat bench...","Securely grasp the barbell with both hands..."],"tips":["Select a grip width that effectively activates the pectoral muscles.","Preserve a stable and neutral spinal alignment..."],"urlExerciseName":"barbell-bench-press"}]},"properties":{"data":{"description":"Array of matching exercise documents","items":{"properties":{"BodyPart":{"description":"Target body part","items":{"enum":["abs","arms","back","calves","cardio","chest","feet","forearms","glutes","legs","neck","plyometrics","shoulders","stretching","weightlifting","yoga"],"type":"string"},"type":"array"},"Equipment":{"description":"Required equipment","items":{"enum":["Assisted","Band","Barbell","Battling Rope","Body weight","Bosu ball","Cable","Dumbbell","EZ Barbell","Hammer","Kettlebell","Leverage machine","Medicine Ball","Olympic barbell","Power Sled","Resistance Band","Roll","Rollball","Rope","Sled machine","Smith machine","Stability ball","Stick","Suspension","Trap bar","Vibrate Plate","Weighted","Wheel roller"],"type":"string"},"type":"array"},"ExerciseType":{"description":"Exercise type","items":{"enum":["strength_training","strength_training.functional","stretching"],"type":"string"},"type":"array"},"MuscleDistribution":{"additionalProperties":{"type":"number"},"description":"Muscle activation percentages (muscle name → 0.0–1.0)","type":"object"},"Synergist":{"description":"Secondary/assisting muscles","items":{"type":"string"},"type":"array"},"Target":{"description":"Primary target muscles","items":{"enum":["Adductor Brevis","Adductor Longus","Adductor Magnus","Biceps Brachii","Brachialis","Brachioradialis","Deep Hip External Rotators","Deltoid","Deltoid Anterior","Deltoid Lateral","Deltoid Posterior","Erector Spinae","Gastrocnemius","Gluteus Maximus","Gluteus Medius","Gluteus Minimus","Gracilis","Hamstrings","Iliopsoas","Infraspinatus","Latissimus Dorsi","Levator Scapulae","Obliques","Pectineous","Pectoralis Major","Pectoralis Major Clavicular Head","Pectoralis Major Sternal Head","Quadriceps","Rectus Abdominis","Rhomboids","Sartorius","Serratus Anterior","Soleus","Splenius","Sternocleidomastoid","Subscapularis","Tensor Fasciae Latae","Teres Major","Teres Minor","Tibialis Anterior","Transverse Abdominus","Trapezius","Trapezius Lower Fibers","Trapezius Middle Fibers","Trapezius Upper Fibers","Triceps Brachii","Wrist Extensors","Wrist Flexors"],"type":"string"},"type":"array"},"exercise":{"description":"Exercise name","type":"string"},"id":{"description":"Unique exercise ID","type":"string"},"info":{"description":"Detailed exercise description and benefits","type":"string"},"instructions":{"description":"Step-by-step instructions","items":{"type":"string"},"type":"array"},"tips":{"description":"Performance tips","items":{"type":"string"},"type":"array"},"urlExerciseName":{"description":"URL-friendly exercise name","type":"string"}},"type":"object"},"type":"array"}},"required":["data"],"title":"ExerciseSearchResponse","type":"object"},"FoodDocumentResponse":{"description":"A single food document with full nutrient data (per 100 g).","properties":{"data":{"properties":{"ctg":{"description":"Food category code","type":"string"},"db":{"description":"Source database (SR28, FNDDS, FRec)","type":"string"},"desc":{"description":"Food name (translated if locale is set)","type":"string"},"id":{"description":"Unique food ID","type":"string"},"non":{"description":"Number of nutrients available","type":"integer"},"nop":{"description":"Number of portions available","type":"integer"},"nutrients":{"additionalProperties":{"properties":{"name":{"description":"Nutrient name","type":"string"},"unit":{"description":"Unit (g, mg, µg, kcal, IU)","type":"string"},"value":{"description":"Amount per 100 g","type":"number"}},"type":"object"},"description":"Map of nutrient ID → {name, unit, value}. All values are per 100 g. Up to 240+ nutrients.","type":"object"},"portions":{"additionalProperties":{"properties":{"a":{"description":"Weight in grams","type":"string"},"d":{"description":"Portion description","type":"string"}},"type":"object"},"description":"Map of portion index → {a: grams, d: description}","type":"object"}},"type":"object"}},"required":["data"],"title":"FoodDocumentResponse","type":"object"},"FoodFilterRequest":{"description":"Food filter request body.","properties":{"body":{"description":"Body measurements and optional macro targets. Omit entirely to use 2000 kcal reference defaults.\n\n**All values must use metric units:**\n- `weight` — kilograms (kg)\n- `height` — centimeters (cm)\n- `age` — years\n- `target_amount` — kilocalories (kcal)\n","properties":{"activity_level":{"description":"Physical activity level (used as TDEE multiplier):\n- `1` — Sedentary (little or no exercise)\n- `2` — Lightly active (1–3 days/week)\n- `3` — Moderately active (3–5 days/week)\n- `4` — Very active (6–7 days/week)\n- `5` — Extra active (physical job + hard exercise)\n","example":3,"maximum":5,"minimum":1,"type":"integer"},"age":{"description":"Age in **years**","example":30,"type":"integer"},"gender":{"description":"Biological sex / condition for nutrient calculations:\n- `m` — Male\n- `f` — Female\n- `p` — Pregnant\n- `l` — Lactating\n","enum":["m","f","p","l"],"type":"string"},"height":{"description":"Height in **centimeters** (cm). Example: 180 = 180 cm","example":180,"type":"number"},"macro_target":{"description":"Optional macro split and calorie target. Defaults to maintenance 30/40/30 when omitted.","properties":{"carb":{"description":"Carbohydrate percentage of total calories (0–100)","example":40,"type":"number"},"fat":{"description":"Fat percentage of total calories (0–100)","example":30,"type":"number"},"protein":{"description":"Protein percentage of total calories (0–100)","example":30,"type":"number"},"target_amount":{"description":"Calorie offset from TDEE in **kcal** (only used when target_type is deficit or surplus)","example":300,"type":"number"},"target_type":{"description":"Calorie goal relative to TDEE:\n- `maintenance` — Eat at TDEE (no offset)\n- `deficit` — Subtract `target_amount` kcal from TDEE\n- `surplus` — Add `target_amount` kcal to TDEE\n","enum":["maintenance","deficit","surplus"],"type":"string"}},"type":"object"},"weight":{"description":"Body weight in **kilograms** (kg). Example: 80 = 80 kg","example":80,"type":"number"}},"type":"object"},"filter":{"description":"MeiliSearch filter expression","type":"string"},"limit":{"description":"Max results (1-100, default 20)","type":"integer"},"locale":{"description":"Locale for translated food names","enum":["en","tr","de","fr","es","it","pt","nl","ru","ja","ko","zh"],"type":"string"},"offset":{"description":"Pagination offset (0-100000)","type":"integer"},"q":{"description":"Text search query (optional)","type":"string"},"sort":{"description":"Sort expression (e.g. 1003:desc)","type":"string"}},"title":"FoodFilterRequest","type":"object"},"FoodFilterResponse":{"description":"Filtered food search results. Each food contains nutrient data per 100 g.\nNutrient keys are numeric IDs mapped to `{name, unit, value}` objects.\nPortions describe common serving sizes with `a` (grams) and `d` (description).\n","example":{"data":[{"ctg":"5","db":"SR28","desc":"Chicken, broilers or fryers, breast, skinless, boneless, meat only, raw","id":"SR170187","non":149,"nop":2,"nutrients":{"1003":{"name":"Protein","unit":"g","value":22.5},"1004":{"name":"Fat","unit":"g","value":2.62},"1005":{"name":"Carbohydrate","unit":"g","value":0.0},"1008":{"name":"Energy","unit":"Kcal","value":114},"1079":{"name":"Fiber","unit":"g","value":0.0},"1093":{"name":"Sodium","unit":"mg","value":45}},"portions":{"1":{"a":"119","d":"4 oz"},"2":{"a":"174","d":"breast, bone and skin removed"}}}]},"properties":{"data":{"description":"Array of matching food documents","items":{"properties":{"ctg":{"description":"Food category code","type":"string"},"db":{"description":"Source database","type":"string"},"desc":{"description":"Food name (translated if locale is set)","type":"string"},"id":{"description":"Unique food ID","type":"string"},"non":{"description":"Number of nutrients available","type":"integer"},"nop":{"description":"Number of portions available","type":"integer"},"nutrients":{"additionalProperties":{"properties":{"name":{"description":"Nutrient name","type":"string"},"need":{"description":"Daily need value (present when body param is provided)","nullable":true,"type":"number"},"unit":{"description":"Unit (g, mg, µg, kcal, IU)","type":"string"},"value":{"description":"Amount per 100 g","type":"number"}},"type":"object"},"description":"Map of nutrient ID → {name, unit, value}. All values are per 100 g.","type":"object"},"portions":{"additionalProperties":{"properties":{"a":{"description":"Weight in grams","type":"string"},"d":{"description":"Portion description","type":"string"}},"type":"object"},"description":"Map of portion index → {a: grams, d: description}","type":"object"}},"type":"object"},"type":"array"}},"required":["data"],"title":"FoodFilterResponse","type":"object"},"FoodGetRequest":{"description":"Optional request body for getting a food by ID. All fields are optional — omit the body entirely to get the food without daily need values.","properties":{"body":{"description":"Body measurements and optional macro targets. Omit entirely to use 2000 kcal reference defaults.\n\n**All values must use metric units:**\n- `weight` — kilograms (kg)\n- `height` — centimeters (cm)\n- `age` — years\n- `target_amount` — kilocalories (kcal)\n","properties":{"activity_level":{"description":"Physical activity level (used as TDEE multiplier):\n- `1` — Sedentary (little or no exercise)\n- `2` — Lightly active (1–3 days/week)\n- `3` — Moderately active (3–5 days/week)\n- `4` — Very active (6–7 days/week)\n- `5` — Extra active (physical job + hard exercise)\n","example":3,"maximum":5,"minimum":1,"type":"integer"},"age":{"description":"Age in **years**","example":30,"type":"integer"},"gender":{"description":"Biological sex / condition for nutrient calculations:\n- `m` — Male\n- `f` — Female\n- `p` — Pregnant\n- `l` — Lactating\n","enum":["m","f","p","l"],"type":"string"},"height":{"description":"Height in **centimeters** (cm). Example: 180 = 180 cm","example":180,"type":"number"},"macro_target":{"description":"Optional macro split and calorie target. Defaults to maintenance 30/40/30 when omitted.","properties":{"carb":{"description":"Carbohydrate percentage of total calories (0–100)","example":40,"type":"number"},"fat":{"description":"Fat percentage of total calories (0–100)","example":30,"type":"number"},"protein":{"description":"Protein percentage of total calories (0–100)","example":30,"type":"number"},"target_amount":{"description":"Calorie offset from TDEE in **kcal** (only used when target_type is deficit or surplus)","example":300,"type":"number"},"target_type":{"description":"Calorie goal relative to TDEE:\n- `maintenance` — Eat at TDEE (no offset)\n- `deficit` — Subtract `target_amount` kcal from TDEE\n- `surplus` — Add `target_amount` kcal to TDEE\n","enum":["maintenance","deficit","surplus"],"type":"string"}},"type":"object"},"weight":{"description":"Body weight in **kilograms** (kg). Example: 80 = 80 kg","example":80,"type":"number"}},"type":"object"},"locale":{"description":"Locale code (default: en)","type":"string"}},"title":"FoodGetRequest","type":"object"},"FoodSearchRequest":{"description":"Food search request body.","properties":{"body":{"description":"Body measurements and optional macro targets. Omit entirely to use 2000 kcal reference defaults.\n\n**All values must use metric units:**\n- `weight` — kilograms (kg)\n- `height` — centimeters (cm)\n- `age` — years\n- `target_amount` — kilocalories (kcal)\n","properties":{"activity_level":{"description":"Physical activity level (used as TDEE multiplier):\n- `1` — Sedentary (little or no exercise)\n- `2` — Lightly active (1–3 days/week)\n- `3` — Moderately active (3–5 days/week)\n- `4` — Very active (6–7 days/week)\n- `5` — Extra active (physical job + hard exercise)\n","example":3,"maximum":5,"minimum":1,"type":"integer"},"age":{"description":"Age in **years**","example":30,"type":"integer"},"gender":{"description":"Biological sex / condition for nutrient calculations:\n- `m` — Male\n- `f` — Female\n- `p` — Pregnant\n- `l` — Lactating\n","enum":["m","f","p","l"],"type":"string"},"height":{"description":"Height in **centimeters** (cm). Example: 180 = 180 cm","example":180,"type":"number"},"macro_target":{"description":"Optional macro split and calorie target. Defaults to maintenance 30/40/30 when omitted.","properties":{"carb":{"description":"Carbohydrate percentage of total calories (0–100)","example":40,"type":"number"},"fat":{"description":"Fat percentage of total calories (0–100)","example":30,"type":"number"},"protein":{"description":"Protein percentage of total calories (0–100)","example":30,"type":"number"},"target_amount":{"description":"Calorie offset from TDEE in **kcal** (only used when target_type is deficit or surplus)","example":300,"type":"number"},"target_type":{"description":"Calorie goal relative to TDEE:\n- `maintenance` — Eat at TDEE (no offset)\n- `deficit` — Subtract `target_amount` kcal from TDEE\n- `surplus` — Add `target_amount` kcal to TDEE\n","enum":["maintenance","deficit","surplus"],"type":"string"}},"type":"object"},"weight":{"description":"Body weight in **kilograms** (kg). Example: 80 = 80 kg","example":80,"type":"number"}},"type":"object"},"limit":{"description":"Max results (default 20)","type":"integer"},"locale":{"description":"Locale code","type":"string"},"offset":{"description":"Pagination offset","type":"integer"},"q":{"description":"Search query","type":"string"}},"required":["q"],"title":"FoodSearchRequest","type":"object"},"FoodSearchResponse":{"description":"Food search results. Each food contains nutrient data per 100 g.\nNutrient keys are numeric IDs mapped to `{name, unit, value}` objects.\nPortions describe common serving sizes with `a` (grams) and `d` (description).\n","example":{"data":[{"ctg":"5","db":"SR28","desc":"Chicken, broilers or fryers, breast, skinless, boneless, meat only, raw","id":"SR170187","non":149,"nop":2,"nutrients":{"1003":{"name":"Protein","unit":"g","value":22.5},"1004":{"name":"Fat","unit":"g","value":2.62},"1005":{"name":"Carbohydrate","unit":"g","value":0.0},"1008":{"name":"Energy","unit":"Kcal","value":114},"1079":{"name":"Fiber","unit":"g","value":0.0},"1093":{"name":"Sodium","unit":"mg","value":45}},"portions":{"1":{"a":"119","d":"4 oz"},"2":{"a":"174","d":"breast, bone and skin removed"}}}]},"properties":{"data":{"description":"Array of matching food documents","items":{"properties":{"ctg":{"description":"Food category code (see /foods/filter docs for category table)","type":"string"},"db":{"description":"Source database (SR28, FNDDS, FRec)","type":"string"},"desc":{"description":"Food name (translated if locale is set)","type":"string"},"id":{"description":"Unique food ID (e.g. SR170187)","type":"string"},"non":{"description":"Number of nutrients available","type":"integer"},"nop":{"description":"Number of portions available","type":"integer"},"nutrients":{"additionalProperties":{"properties":{"name":{"description":"Nutrient name","type":"string"},"need":{"description":"Daily need value (present when body param is provided)","nullable":true,"type":"number"},"unit":{"description":"Unit (g, mg, µg, kcal, IU)","type":"string"},"value":{"description":"Amount per 100 g","type":"number"}},"type":"object"},"description":"Map of nutrient ID → {name, unit, value}. All values are per 100 g.","type":"object"},"portions":{"additionalProperties":{"properties":{"a":{"description":"Weight in grams","type":"string"},"d":{"description":"Portion description","type":"string"}},"type":"object"},"description":"Map of portion index → {a: grams, d: description}","type":"object"}},"type":"object"},"type":"array"}},"required":["data"],"title":"FoodSearchResponse","type":"object"},"HealthResponse":{"example":{"db":"ok","search":"ok","status":"ok"},"properties":{"db":{"enum":["ok","error"],"type":"string"},"search":{"enum":["ok","error"],"type":"string"},"status":{"enum":["ok","degraded"],"type":"string"}},"required":["status","db","search"],"title":"HealthResponse","type":"object"},"NutritionLabelRequest":{"description":"Parameters for generating a nutrition facts label image (PNG). The `macro_target` is nested inside `body`.","example":{"body":{"activity_level":3,"age":28,"gender":"m","height":180,"macro_target":{"carb":40,"fat":30,"protein":30,"target_type":"maintenance"},"weight":80},"foods":[{"amount":145,"q":"chicken breast raw"},{"amount":200,"q":"rice white cooked"}],"groups":["general","vitamins","minerals","carbohydrates","lipids","protein_and_amino_acids","other_compounds"],"locale":"en"},"properties":{"body":{"description":"Body measurements and optional macro targets. Omit entirely to use 2000 kcal reference defaults.\n\n**All values must use metric units:**\n- `weight` — kilograms (kg)\n- `height` — centimeters (cm)\n- `age` — years\n- `target_amount` — kilocalories (kcal)\n","properties":{"activity_level":{"description":"Physical activity level (used as TDEE multiplier):\n- `1` — Sedentary (little or no exercise)\n- `2` — Lightly active (1–3 days/week)\n- `3` — Moderately active (3–5 days/week)\n- `4` — Very active (6–7 days/week)\n- `5` — Extra active (physical job + hard exercise)\n","example":3,"maximum":5,"minimum":1,"type":"integer"},"age":{"description":"Age in **years**","example":30,"type":"integer"},"gender":{"description":"Biological sex / condition for nutrient calculations:\n- `m` — Male\n- `f` — Female\n- `p` — Pregnant\n- `l` — Lactating\n","enum":["m","f","p","l"],"type":"string"},"height":{"description":"Height in **centimeters** (cm). Example: 180 = 180 cm","example":180,"type":"number"},"macro_target":{"description":"Optional macro split and calorie target. Defaults to maintenance 30/40/30 when omitted.","properties":{"carb":{"description":"Carbohydrate percentage of total calories (0–100)","example":40,"type":"number"},"fat":{"description":"Fat percentage of total calories (0–100)","example":30,"type":"number"},"protein":{"description":"Protein percentage of total calories (0–100)","example":30,"type":"number"},"target_amount":{"description":"Calorie offset from TDEE in **kcal** (only used when target_type is deficit or surplus)","example":300,"type":"number"},"target_type":{"description":"Calorie goal relative to TDEE:\n- `maintenance` — Eat at TDEE (no offset)\n- `deficit` — Subtract `target_amount` kcal from TDEE\n- `surplus` — Add `target_amount` kcal to TDEE\n","enum":["maintenance","deficit","surplus"],"type":"string"}},"type":"object"},"weight":{"description":"Body weight in **kilograms** (kg). Example: 80 = 80 kg","example":80,"type":"number"}},"type":"object"},"foods":{"description":"List of foods consumed with amounts in grams. **Food queries must always be in English** regardless of the chosen locale — the locale only affects the label's display language.","items":{"properties":{"amount":{"description":"Amount in grams","example":145,"type":"number"},"q":{"description":"Food search query (always in English)","example":"chicken breast raw","type":"string"}},"required":["q","amount"],"type":"object"},"type":"array"},"groups":{"description":"Which nutrient groups to include in the label. Omit to include all groups.","example":["general","vitamins","minerals","carbohydrates","lipids","protein_and_amino_acids","other_compounds"],"items":{"enum":["general","vitamins","minerals","carbohydrates","lipids","protein_and_amino_acids","other_compounds"],"type":"string"},"type":"array"},"locale":{"description":"Locale code for nutrient names and units","enum":["af","ar","az","bg","bn","bs","cs","da","de","el","en","es","et","fa","fi","fil","fr","he","hi","hr","hu","id","is","it","ja","ka","ko","lt","lv","mn","ms","nl","nn","pl","pt","ro","ru","sk","sl","sq","sr","sv","th","tr","uk","ur","vi","zh"],"example":"en","type":"string"}},"required":["foods"],"title":"NutritionLabelRequest","type":"object"},"NutritionNeedsRequest":{"description":"Body measurements and optional macro targets for nutrition calculation. The `macro_target` is nested inside `body`.","example":{"body":{"activity_level":3,"age":30,"gender":"m","height":180,"macro_target":{"carb":40,"fat":30,"protein":30,"target_amount":300,"target_type":"deficit"},"weight":80}},"properties":{"body":{"description":"Body measurements and optional macro targets. Omit entirely to use 2000 kcal reference defaults.\n\n**All values must use metric units:**\n- `weight` — kilograms (kg)\n- `height` — centimeters (cm)\n- `age` — years\n- `target_amount` — kilocalories (kcal)\n","properties":{"activity_level":{"description":"Physical activity level (used as TDEE multiplier):\n- `1` — Sedentary (little or no exercise)\n- `2` — Lightly active (1–3 days/week)\n- `3` — Moderately active (3–5 days/week)\n- `4` — Very active (6–7 days/week)\n- `5` — Extra active (physical job + hard exercise)\n","example":3,"maximum":5,"minimum":1,"type":"integer"},"age":{"description":"Age in **years**","example":30,"type":"integer"},"gender":{"description":"Biological sex / condition for nutrient calculations:\n- `m` — Male\n- `f` — Female\n- `p` — Pregnant\n- `l` — Lactating\n","enum":["m","f","p","l"],"type":"string"},"height":{"description":"Height in **centimeters** (cm). Example: 180 = 180 cm","example":180,"type":"number"},"macro_target":{"description":"Optional macro split and calorie target. Defaults to maintenance 30/40/30 when omitted.","properties":{"carb":{"description":"Carbohydrate percentage of total calories (0–100)","example":40,"type":"number"},"fat":{"description":"Fat percentage of total calories (0–100)","example":30,"type":"number"},"protein":{"description":"Protein percentage of total calories (0–100)","example":30,"type":"number"},"target_amount":{"description":"Calorie offset from TDEE in **kcal** (only used when target_type is deficit or surplus)","example":300,"type":"number"},"target_type":{"description":"Calorie goal relative to TDEE:\n- `maintenance` — Eat at TDEE (no offset)\n- `deficit` — Subtract `target_amount` kcal from TDEE\n- `surplus` — Add `target_amount` kcal to TDEE\n","enum":["maintenance","deficit","surplus"],"type":"string"}},"type":"object"},"weight":{"description":"Body weight in **kilograms** (kg). Example: 80 = 80 kg","example":80,"type":"number"}},"type":"object"}},"title":"NutritionNeedsRequest","type":"object"},"NutritionNeedsResponse":{"description":"Calculated daily nutrient needs. Keys are nutrient IDs (e.g. \"1008\" = calories, \"1003\" = protein). Also includes bmr, tdee, and macro breakdown fields when body data is provided.","properties":{"data":{"additionalProperties":{"type":"number"},"description":"Map of nutrient ID strings to numeric values, plus optional bmr/tdee/macro fields","example":{"1003":181.5,"1004":80.7,"1005":242.0,"1008":2420.3,"1051":2800,"1079":9.7,"bmr":1755.0,"carb_percentage_target":40,"fat_percentage_target":30,"pro_percentage_target":30,"target_type":"deficit","tdee":2720.3},"type":"object"}},"required":["data"],"title":"NutritionNeedsResponse","type":"object"}},"securitySchemes":{"BearerAuth":{"description":"API key from POST /api/v1/auth/register or /api/v1/auth/login","scheme":"bearer","type":"http"}}},"info":{"description":"Fitness & nutrition data API powered by FitnessRec","title":"FitAPI","version":"1.0.0"},"openapi":"3.0.0","paths":{"/api/v1/activities/search":{"post":{"callbacks":{},"description":"Search the activity/cardio database by query string.","operationId":"FitApiWeb.ActivityController.index","parameters":[{"description":"Search query","in":"query","name":"q","required":true,"schema":{"type":"string"}},{"description":"Locale code","in":"query","name":"locale","required":false,"schema":{"type":"string"}},{"description":"Max results (default 20)","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"Pagination offset","in":"query","name":"offset","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivitySearchResponse"}}},"description":"Search results"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Search unavailable"}},"security":[{"BearerAuth":[]}],"summary":"Search activities","tags":["Activities"]}},"/api/v1/barcode/scan":{"post":{"callbacks":{},"description":"Upload an image containing a barcode (EAN/UPC). The barcode is extracted from the image and the product is looked up. Accepts an optional `body` JSON string for personalized daily need values.","operationId":"FitApiWeb.BarcodeController.scan","parameters":[],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/BarcodeScanRequest"}}},"description":"Barcode image upload","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BarcodeDocumentResponse"}}},"description":"Product found"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BarcodeDocumentResponse"}}},"description":"No product found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No barcode found or invalid format"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Search unavailable"}},"security":[{"BearerAuth":[]}],"summary":"Scan barcode from image","tags":["Barcode"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://fitapi.fitnessrec.com/api/v1/barcode/scan\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -F \"image=@barcode.jpg\" \\\n  -F \"locale=en\""},{"lang":"JavaScript","source":"const form = new FormData();\nform.append(\"image\", fileInput.files[0]);\nform.append(\"locale\", \"en\");\n\nconst res = await fetch(\"https://fitapi.fitnessrec.com/api/v1/barcode/scan\", {\n  method: \"POST\",\n  headers: { \"Authorization\": \"Bearer YOUR_API_KEY\" },\n  body: form\n});\nconst data = await res.json();\nconsole.log(data);"},{"lang":"Python","source":"import requests\n\nres = requests.post(\n    \"https://fitapi.fitnessrec.com/api/v1/barcode/scan\",\n    headers={\"Authorization\": \"Bearer YOUR_API_KEY\"},\n    files={\"image\": open(\"barcode.jpg\", \"rb\")},\n    data={\"locale\": \"en\"}\n)\nprint(res.json())"}]}},"/api/v1/barcode/search":{"post":{"callbacks":{},"description":"Search branded food products by text query. Accepts an optional `body` object to include daily need values in nutrient responses.","operationId":"FitApiWeb.BarcodeController.search","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BarcodeSearchRequest"}}},"description":"Search parameters","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BarcodeSearchResponse"}}},"description":"Search results"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Search unavailable"}},"security":[{"BearerAuth":[]}],"summary":"Search branded foods","tags":["Barcode"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://fitapi.fitnessrec.com/api/v1/barcode/search\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"q\": \"coca cola\", \"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}}'"},{"lang":"JavaScript","source":"const res = await fetch(\"https://fitapi.fitnessrec.com/api/v1/barcode/search\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer YOUR_API_KEY\",\n    \"Content-Type\": \"application/json\"\n  },\n  body: JSON.stringify({\"q\": \"coca cola\", \"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}})\n});\nconst data = await res.json();\nconsole.log(data);"},{"lang":"Python","source":"import requests\n\nres = requests.post(\n    \"https://fitapi.fitnessrec.com/api/v1/barcode/search\",\n    headers={\"Authorization\": \"Bearer YOUR_API_KEY\"},\n    json={\"q\": \"coca cola\", \"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}}\n)\nprint(res.json())"}]}},"/api/v1/barcode/{barcode}":{"post":{"callbacks":{},"description":"Look up a product by barcode (EAN/UPC, 8-14 digits). Auto-enriches from external sources if not found locally. Pass an optional `body` object to include personalized daily need values in nutrient responses.","operationId":"FitApiWeb.BarcodeController.show","parameters":[{"description":"Barcode (8-14 digits)","in":"path","name":"barcode","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BarcodeGetRequest"}}},"description":"Optional body for daily needs","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BarcodeDocumentResponse"}}},"description":"Product found"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BarcodeDocumentResponse"}}},"description":"No product found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid barcode format"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Search unavailable"}},"security":[{"BearerAuth":[]}],"summary":"Lookup barcode","tags":["Barcode"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://fitapi.fitnessrec.com/api/v1/barcode/5449000000996\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}}'"},{"lang":"JavaScript","source":"const res = await fetch(\"https://fitapi.fitnessrec.com/api/v1/barcode/5449000000996\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer YOUR_API_KEY\",\n    \"Content-Type\": \"application/json\"\n  },\n  body: JSON.stringify({\"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}})\n});\nconst data = await res.json();\nconsole.log(data);"},{"lang":"Python","source":"import requests\n\nres = requests.post(\n    \"https://fitapi.fitnessrec.com/api/v1/barcode/5449000000996\",\n    headers={\"Authorization\": \"Bearer YOUR_API_KEY\"},\n    json={\"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}}\n)\nprint(res.json())"}]}},"/api/v1/dishes/search":{"post":{"callbacks":{},"description":"Search the dish database by query string. Accepts an optional `body` object to include daily need values in nutrient responses.","operationId":"FitApiWeb.DishController.search","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DishSearchRequest"}}},"description":"Search parameters","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DishSearchResponse"}}},"description":"Search results"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Search unavailable"}},"security":[{"BearerAuth":[]}],"summary":"Search dishes","tags":["Dishes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://fitapi.fitnessrec.com/api/v1/dishes/search\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"q\": \"pasta\", \"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}}'"},{"lang":"JavaScript","source":"const res = await fetch(\"https://fitapi.fitnessrec.com/api/v1/dishes/search\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer YOUR_API_KEY\",\n    \"Content-Type\": \"application/json\"\n  },\n  body: JSON.stringify({\"q\": \"pasta\", \"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}})\n});\nconst data = await res.json();\nconsole.log(data);"},{"lang":"Python","source":"import requests\n\nres = requests.post(\n    \"https://fitapi.fitnessrec.com/api/v1/dishes/search\",\n    headers={\"Authorization\": \"Bearer YOUR_API_KEY\"},\n    json={\"q\": \"pasta\", \"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}}\n)\nprint(res.json())"}]}},"/api/v1/dishes/{id}":{"post":{"callbacks":{},"description":"Retrieve a single dish document by its ID. Pass an optional `body` object to include personalized daily need values in nutrient responses.","operationId":"FitApiWeb.DishController.show","parameters":[{"description":"Dish ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DishGetRequest"}}},"description":"Optional body for daily needs","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DishDocumentResponse"}}},"description":"Dish document"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"}},"security":[{"BearerAuth":[]}],"summary":"Get dish by ID","tags":["Dishes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://fitapi.fitnessrec.com/api/v1/dishes/1\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}}'"},{"lang":"JavaScript","source":"const res = await fetch(\"https://fitapi.fitnessrec.com/api/v1/dishes/1\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer YOUR_API_KEY\",\n    \"Content-Type\": \"application/json\"\n  },\n  body: JSON.stringify({\"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}})\n});\nconst data = await res.json();\nconsole.log(data);"},{"lang":"Python","source":"import requests\n\nres = requests.post(\n    \"https://fitapi.fitnessrec.com/api/v1/dishes/1\",\n    headers={\"Authorization\": \"Bearer YOUR_API_KEY\"},\n    json={\"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}}\n)\nprint(res.json())"}]}},"/api/v1/exercises/search":{"post":{"callbacks":{},"description":"Search the exercise database by query string with optional filters.","operationId":"FitApiWeb.ExerciseController.index","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExerciseSearchRequest"}}},"description":"Exercise search parameters","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExerciseSearchResponse"}}},"description":"Search results"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid filter values"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Search unavailable"}},"security":[{"BearerAuth":[]}],"summary":"Search exercises","tags":["Exercises"]}},"/api/v1/exercises/{id}":{"get":{"callbacks":{},"description":"Retrieve a single exercise document by its ID.","operationId":"FitApiWeb.ExerciseController.show","parameters":[{"description":"Exercise ID","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Locale code","in":"query","name":"locale","required":false,"schema":{"enum":["af","ar","az","bg","bn","bs","cs","da","de","el","en","es","et","fa","fi","fil","fr","he","hi","hr","hu","id","is","it","ja","ka","ko","lt","lv","mn","ms","nl","nn","pl","pt","ro","ru","sk","sl","sq","sr","sv","th","tr","uk","ur","vi","zh"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExerciseDocumentResponse"}}},"description":"Exercise document"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"}},"security":[{"BearerAuth":[]}],"summary":"Get exercise by ID","tags":["Exercises"],"x-codeSamples":[{"lang":"cURL","source":"curl \"https://fitapi.fitnessrec.com/api/v1/exercises/1?locale=en\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch(\"https://fitapi.fitnessrec.com/api/v1/exercises/1?locale=en\", {\n  headers: { \"Authorization\": \"Bearer YOUR_API_KEY\" }\n});\nconst data = await res.json();\nconsole.log(data);"},{"lang":"Python","source":"import requests\n\nres = requests.get(\n    \"https://fitapi.fitnessrec.com/api/v1/exercises/1?locale=en\",\n    headers={\"Authorization\": \"Bearer YOUR_API_KEY\"}\n)\nprint(res.json())"}]}},"/api/v1/foods/filter":{"post":{"callbacks":{},"description":"Search the food database with advanced nutrient-level filtering and sorting.\nAll nutrient values are **per 100 g** of the food.\nAccepts an optional `body` object to include daily need values in nutrient responses.\n\n## Filter syntax\n\nThe `filter` parameter accepts expressions using nutrient IDs (see table below) with comparison operators.\n\n| Operator | Example | Meaning |\n|----------|---------|---------|\n| `=`  | `1008 = 0`         | Energy is exactly 0 kcal |\n| `!=` | `ctg != 11`        | Category is not vegetables |\n| `>`  | `1003 > 20`        | Protein greater than 20 g |\n| `>=` | `1087 >= 100`      | Calcium at least 100 mg |\n| `<`  | `1004 < 5`         | Fat less than 5 g |\n| `<=` | `1008 <= 200`      | Energy at most 200 kcal |\n| `TO` | `1008 100 TO 300`  | Energy between 100–300 kcal |\n| `AND` | `1003 > 20 AND 1004 < 5` | Combine conditions |\n| `OR`  | `ctg = 5 OR ctg = 15`    | Match either condition |\n| `NOT` | `NOT ctg = 18`            | Exclude a condition |\n\nParentheses are supported for grouping: `(1003 > 20 AND 1004 < 5) OR ctg = 15`\n\n## Common nutrient IDs\n\n### Macronutrients\n| ID | Nutrient | Unit |\n|----|----------|------|\n| `1008` | Energy (Calories) | kcal |\n| `1062` | Energy | kJ |\n| `1003` | Protein | g |\n| `1004` | Fat | g |\n| `1005` | Carbohydrate | g |\n| `1079` | Fiber | g |\n| `2000` | Sugars | g |\n| `1051` | Water | g |\n| `1018` | Alcohol | g |\n\n### Minerals\n| ID | Nutrient | Unit |\n|----|----------|------|\n| `1087` | Calcium | mg |\n| `1089` | Iron | mg |\n| `1090` | Magnesium | mg |\n| `1091` | Phosphorus | mg |\n| `1092` | Potassium | mg |\n| `1093` | Sodium | mg |\n| `1095` | Zinc | mg |\n| `1098` | Copper | mg |\n| `1101` | Manganese | mg |\n| `1103` | Selenium | µg |\n\n### Vitamins\n| ID | Nutrient | Unit |\n|----|----------|------|\n| `1162` | Vitamin C | mg |\n| `1165` | B1 (Thiamin) | mg |\n| `1166` | B2 (Riboflavin) | mg |\n| `1167` | B3 (Niacin) | mg |\n| `1175` | Vitamin B-6 | mg |\n| `1177` | Folate | µg |\n| `1178` | Vitamin B-12 | µg |\n| `1106` | Vitamin A, RAE | µg |\n| `1109` | Vitamin E | mg |\n| `1114` | Vitamin D (D2+D3) | µg |\n| `1183` | Vitamin K | µg |\n\n### Lipids\n| ID | Nutrient | Unit |\n|----|----------|------|\n| `1253` | Cholesterol | mg |\n| `1258` | Saturated fat | g |\n| `1292` | Monounsaturated fat | g |\n| `1293` | Polyunsaturated fat | g |\n| `1257` | Trans fat | g |\n| `4444` | Omega-3 | g |\n| `5555` | Omega-6 | g |\n\n### Amino acids\n| ID | Nutrient | Unit |\n|----|----------|------|\n| `1210` | Tryptophan | g |\n| `1212` | Isoleucine | g |\n| `1213` | Leucine | g |\n| `1214` | Lysine | g |\n| `1219` | Valine | g |\n\n## Food category codes (`ctg`)\n\n| Code | Category |\n|------|----------|\n| `1`  | Dairy and Egg Products |\n| `2`  | Spices and Herbs |\n| `3`  | Baby Foods |\n| `4`  | Fats and Oils |\n| `5`  | Poultry Products |\n| `6`  | Soups, Sauces, and Gravies |\n| `7`  | Sausages and Luncheon Meats |\n| `8`  | Breakfast Cereals |\n| `9`  | Fruits and Fruit Juices |\n| `10` | Pork Products |\n| `11` | Vegetables and Vegetable Products |\n| `12` | Nut and Seed Products |\n| `13` | Beef Products |\n| `14` | Beverages |\n| `15` | Finfish and Shellfish Products |\n| `16` | Legumes and Legume Products |\n| `17` | Lamb, Veal, and Game Products |\n| `18` | Baked Products |\n| `19` | Sweets |\n| `20` | Cereal Grains and Pasta |\n| `21` | Fast Foods |\n| `22` | Meals, Entrees, and Side Dishes |\n| `25` | Snacks |\n| `26` | Branded / Other |\n\n## Sort syntax\n\nComma-separated list of `field:direction` pairs. Example: `1003:desc` (sort by protein descending).\nAll filterable nutrient IDs and `desc` (food name) are sortable.\n\n## Example queries\n\n- **High-protein, low-fat chicken**: `q=chicken&filter=1003 > 20 AND 1004 < 10`\n- **Low-calorie vegetables**: `q=&filter=ctg = 11 AND 1008 < 50`\n- **Iron-rich foods sorted by iron**: `q=&filter=1089 > 5&sort=1089:desc`\n- **High-fiber fruits**: `q=&filter=ctg = 9 AND 1079 > 5`\n- **Low-sodium, high-potassium**: `q=&filter=1093 < 50 AND 1092 > 400`\n","operationId":"FitApiWeb.FoodController.filter","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodFilterRequest"}}},"description":"Filter parameters","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodFilterResponse"}}},"description":"Filtered food results"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Search unavailable"}},"security":[{"BearerAuth":[]}],"summary":"Filter foods by nutrients","tags":["Foods"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://fitapi.fitnessrec.com/api/v1/foods/filter\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"filter\": \"1003 > 20 AND 1004 < 5\", \"sort\": [\"1003:desc\"], \"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}}'"},{"lang":"JavaScript","source":"const res = await fetch(\"https://fitapi.fitnessrec.com/api/v1/foods/filter\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer YOUR_API_KEY\",\n    \"Content-Type\": \"application/json\"\n  },\n  body: JSON.stringify({\"filter\": \"1003 > 20 AND 1004 < 5\", \"sort\": [\"1003:desc\"], \"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}})\n});\nconst data = await res.json();\nconsole.log(data);"},{"lang":"Python","source":"import requests\n\nres = requests.post(\n    \"https://fitapi.fitnessrec.com/api/v1/foods/filter\",\n    headers={\"Authorization\": \"Bearer YOUR_API_KEY\"},\n    json={\"filter\": \"1003 > 20 AND 1004 < 5\", \"sort\": [\"1003:desc\"], \"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}}\n)\nprint(res.json())"}]}},"/api/v1/foods/search":{"post":{"callbacks":{},"description":"Search the food database by query string. Accepts an optional `body` object to include daily need values in nutrient responses.","operationId":"FitApiWeb.FoodController.search","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodSearchRequest"}}},"description":"Search parameters","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodSearchResponse"}}},"description":"Search results"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Search unavailable"}},"security":[{"BearerAuth":[]}],"summary":"Search foods","tags":["Foods"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://fitapi.fitnessrec.com/api/v1/foods/search\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"q\": \"chicken breast\", \"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}}'"},{"lang":"JavaScript","source":"const res = await fetch(\"https://fitapi.fitnessrec.com/api/v1/foods/search\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer YOUR_API_KEY\",\n    \"Content-Type\": \"application/json\"\n  },\n  body: JSON.stringify({\"q\": \"chicken breast\", \"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}})\n});\nconst data = await res.json();\nconsole.log(data);"},{"lang":"Python","source":"import requests\n\nres = requests.post(\n    \"https://fitapi.fitnessrec.com/api/v1/foods/search\",\n    headers={\"Authorization\": \"Bearer YOUR_API_KEY\"},\n    json={\"q\": \"chicken breast\", \"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}}\n)\nprint(res.json())"}]}},"/api/v1/foods/{id}":{"post":{"callbacks":{},"description":"Retrieve a single food document by its ID. Pass an optional `body` object to include personalized daily need values in nutrient responses.","operationId":"FitApiWeb.FoodController.show","parameters":[{"description":"Food ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodGetRequest"}}},"description":"Optional body for daily needs","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodDocumentResponse"}}},"description":"Food document"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"}},"security":[{"BearerAuth":[]}],"summary":"Get food by ID","tags":["Foods"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://fitapi.fitnessrec.com/api/v1/foods/171077\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}}'"},{"lang":"JavaScript","source":"const res = await fetch(\"https://fitapi.fitnessrec.com/api/v1/foods/171077\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer YOUR_API_KEY\",\n    \"Content-Type\": \"application/json\"\n  },\n  body: JSON.stringify({\"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}})\n});\nconst data = await res.json();\nconsole.log(data);"},{"lang":"Python","source":"import requests\n\nres = requests.post(\n    \"https://fitapi.fitnessrec.com/api/v1/foods/171077\",\n    headers={\"Authorization\": \"Bearer YOUR_API_KEY\"},\n    json={\"locale\": \"en\", \"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}}\n)\nprint(res.json())"}]}},"/api/v1/nutrition/label":{"post":{"callbacks":{},"description":"Generates a nutrition facts label image (PNG) for the given foods.","operationId":"FitApiWeb.NutritionController.label","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NutritionLabelRequest"}}},"description":"Label parameters","required":false},"responses":{"200":{"content":{"image/png":{"schema":{"format":"binary","type":"string"}}},"description":"PNG image"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"}},"security":[{"BearerAuth":[]}],"summary":"Generate nutrition label","tags":["Nutrition"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://fitapi.fitnessrec.com/api/v1/nutrition/label\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}, \"foods\": [{\"q\": \"chicken breast raw\", \"amount\": 145}], \"locale\": \"en\", \"groups\": [\"general\"]}'"},{"lang":"JavaScript","source":"const res = await fetch(\"https://fitapi.fitnessrec.com/api/v1/nutrition/label\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer YOUR_API_KEY\",\n    \"Content-Type\": \"application/json\"\n  },\n  body: JSON.stringify({\"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}, \"foods\": [{\"q\": \"chicken breast raw\", \"amount\": 145}], \"locale\": \"en\", \"groups\": [\"general\"]})\n});\nconst data = await res.json();\nconsole.log(data);"},{"lang":"Python","source":"import requests\n\nres = requests.post(\n    \"https://fitapi.fitnessrec.com/api/v1/nutrition/label\",\n    headers={\"Authorization\": \"Bearer YOUR_API_KEY\"},\n    json={\"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}, \"foods\": [{\"q\": \"chicken breast raw\", \"amount\": 145}], \"locale\": \"en\", \"groups\": [\"general\"]}\n)\nprint(res.json())"}]}},"/api/v1/nutrition/needs":{"post":{"callbacks":{},"description":"Calculates daily macronutrient needs based on user profile and goals.","operationId":"FitApiWeb.NutritionController.calculate","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NutritionNeedsRequest"}}},"description":"Nutrition parameters","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NutritionNeedsResponse"}}},"description":"Nutrition needs"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"}},"security":[{"BearerAuth":[]}],"summary":"Calculate nutrition needs","tags":["Nutrition"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://fitapi.fitnessrec.com/api/v1/nutrition/needs\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}}'"},{"lang":"JavaScript","source":"const res = await fetch(\"https://fitapi.fitnessrec.com/api/v1/nutrition/needs\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer YOUR_API_KEY\",\n    \"Content-Type\": \"application/json\"\n  },\n  body: JSON.stringify({\"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}})\n});\nconst data = await res.json();\nconsole.log(data);"},{"lang":"Python","source":"import requests\n\nres = requests.post(\n    \"https://fitapi.fitnessrec.com/api/v1/nutrition/needs\",\n    headers={\"Authorization\": \"Bearer YOUR_API_KEY\"},\n    json={\"body\": {\"weight\": 80, \"height\": 180, \"age\": 30, \"gender\": \"m\", \"activity_level\": 3, \"macro_target\": {\"target_type\": \"maintenance\", \"protein\": 30, \"carb\": 40, \"fat\": 30}}}\n)\nprint(res.json())"}]}},"/health":{"get":{"callbacks":{},"description":"Returns the health status of the API, database, and search engine.","operationId":"FitApiWeb.HealthController.index","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}},"description":"Health status"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}},"description":"Degraded"}},"summary":"Health check","tags":["Health"],"x-codeSamples":[{"lang":"cURL","source":"curl https://fitapi.fitnessrec.com/health"},{"lang":"JavaScript","source":"const res = await fetch(\"https://fitapi.fitnessrec.com/health\");\nconst data = await res.json();\nconsole.log(data);"},{"lang":"Python","source":"import requests\n\nres = requests.get(\"https://fitapi.fitnessrec.com/health\")\nprint(res.json())"}]}}},"security":[],"servers":[{"url":"https://fitapi.fitnessrec.com","variables":{}},{"description":"Production","url":"https://fitapi.fitnessrec.com","variables":{}}],"tags":[{"name":"Foods"},{"name":"Dishes"},{"name":"Barcode"},{"name":"Nutrition"},{"name":"Exercises"},{"name":"Health"}]}