Docs
POST /v1/decision/restaurant-fit
Return fit, not_fit, or unknown for one restaurant and one user profile. Provide exactly one of compass_id or google_place_id.
Request
| Field | Type | Notes |
|---|---|---|
| compass_id | string | One of compass_id or google_place_id. The exact restaurant ID returned by Search or Enrich — bring your own records via Enrich, then decide with the stored ID. Integration patterns → |
| google_place_id | string | One of compass_id or google_place_id. Exact caller-supplied Google Place ID. No name or address guess. |
| user_profile.diet | enum | Required. The diet to evaluate. |
| user_profile.exclude_cross_contamination | boolean | Optional. Omitted means false. Set true only when unknown shared-prep evidence should return unknown. |
| user_profile.dietary_rules | array | Optional free-form customer rules. |
curl -X POST "https://api.compassfoodtechnologies.com/v1/decision/restaurant-fit" \
-H "Content-Type: application/json" \
-H "X-Compass-API-Key: $COMPASS_API_KEY" \
-H "X-Compass-Mode: rich" \
-d '{
"compass_id": "restaurant_123",
"user_profile": {
"diet": "strict_vegan"
}
}'Response
unknown is a valid verdict when evidence is insufficient, conflicting, or stale. It is not an error. A Google Place ID with no stored mapping, or more than one eligible restaurant, returns no verdict.
DecisionResponse: 26 contract leaves. A row is one contract leaf. Optional leaves, missing restaurant evidence, and fast mode can omit fields. This count is the schema, not a promise that every response contains every field.
| Field | Type | Notes |
|---|---|---|
| ai_generated | boolean | Required on this object. |
| client_ref | string | Optional. Omitted when the value is absent. |
| compass_id | string | Required on this object. |
| compass_request_id | string | Required on this object. |
| confidence | high | medium | low | Required on this object. |
| coverage.covered_geography | US | Required on this object. |
| coverage.interpreted_location | string | Optional. Omitted when the value is absent. |
| coverage.note | string | Optional. Omitted when the value is absent. |
| coverage.status | in_coverage | out_of_coverage | coverage_unknown | Required on this object. |
| decision | fit | not_fit | unknown | Required on this object. |
| evidence[].evidence_id | string | Required on this object. |
| evidence[].excerpt | string | Optional. Omitted when the value is absent. |
| evidence[].paraphrase_method | automatic | manual | none | Optional. Omitted when the value is absent. |
| evidence[].source | string (uri) | Required on this object. |
| evidence[].tier | A | B | Required on this object. |
| evidence[].type | menu_item | review_signal | external_source | user_report | restaurant_declared | Required on this object. |
| evidence[].weight | primary | supporting | Required on this object. |
| google_place_id | string | Optional. Omitted when the value is absent. |
| human_review_recommended | boolean | Optional. Omitted when the value is absent. |
| last_evaluated_at | string (date-time) | null | Required on this object. |
| reason_codes[] | VEGAN_MENU_CONFIRMED | VEGAN_OPTIONS_MENTIONED | NO_VEGAN_EVIDENCE_FOUND | VEGETARIAN_ONLY_NOT_STRICT_VEGAN | VEGAN_MENU_FULL_RESTAURANT | VEGAN_FRIENDLY_PARTIAL | FRYER_CONTAMINATION_RISK | SHARED_GRILL_RISK | SHARED_PREP_SURFACE_RISK | DEDICATED_VEGAN_PREP_CONFIRMED | CROSS_CONTAMINATION_UNKNOWN | MENU_OUTDATED | REVIEW_SIGNAL_POSITIVE | REVIEW_SIGNAL_NEGATIVE | REVIEW_SIGNAL_CONFLICTING | SOURCE_CONFIDENCE_LOW | SOURCE_CONFIDENCE_HIGH | RESTAURANT_VERIFICATION_RECOMMENDED | DATA_FRESHNESS_POOR | INSUFFICIENT_EVIDENCE | HIGH_CONFIDENCE_DECISION | EDGE_CASE_FLAGGED | USER_PROFILE_AMBIGUOUS | DIET_NOT_SUPPORTED | LOCATION_OUT_OF_COVERAGE | LOCATION_INTERPRETED_US | LOCATION_UNRESOLVED_US_ONLY | VEGAN_MEAL_AVAILABLE | VEGAN_OPTIONS_LIMITED | NO_VEGAN_DISHES_IN_COLLECTED_MENU | INSUFFICIENT_MENU_EVIDENCE | NO_DISH_DATA | REQUESTED_DISH_AVAILABLE | FULLY_VEGAN_RESTAURANT | NOT_FULLY_VEGAN | NO_RESTAURANT_FLAG | Required on this object. Key field. Locked reason codes for the verdict. |
| recommended_user_text | string | Required on this object. Key field. The sentence you can show a user. |
| risk_flags[] | cross_contamination_risk | limited_evidence | stale_data | third_party_unverified | user_report_only | language_barrier | Required on this object. Key field. Keep these visible next to the verdict. |
| source_freshness.newest_signal_age_days | integer | Required on this object. |
| source_freshness.oldest_signal_age_days | integer | Required on this object. |
| verification_required | boolean | Required on this object. |
A strict_vegan fit: the collected menu has a vegan meal.
Abridged DecisionResponse example — 8 of 26 contract leaves. Illustrative values, not a live payload.
{
"compass_request_id": "req_example_ramen_house_decide_fit",
"compass_id": "cmp_example_ramen_house_001",
"decision": "fit",
"confidence": "medium",
"reason_codes": [
"VEGAN_MEAL_AVAILABLE"
],
"risk_flags": [],
"recommended_user_text": "Compass found a vegan meal on the collected menu (menu collected 2026-10-07).",
"verification_required": true,
"ai_generated": true
}An unknown: vegan dishes were found, but not enough for a meal.
Abridged DecisionResponse example — 9 of 26 contract leaves. Illustrative values, not a live payload.
{
"compass_request_id": "req_example_noodle_bar_decide_unknown",
"compass_id": "cmp_example_noodle_bar_002",
"decision": "unknown",
"confidence": "low",
"reason_codes": [
"VEGAN_OPTIONS_LIMITED"
],
"risk_flags": [
"limited_evidence"
],
"recommended_user_text": "Compass found vegan dishes on the collected menu, but not enough for a meal (menu collected 2026-10-07).",
"verification_required": true,
"ai_generated": true
}