DocsPOST /v1/decision/restaurant-fit
Docs
POST /v1/decision/restaurant-fit
Return fit, not_fit, or unknown for one restaurant and one user profile.
Request
| Field | Type | Notes |
|---|---|---|
| compass_id | string | Required. Restaurant ID from Search or Enrich. |
| user_profile.diet | enum | Required. The diet to evaluate. |
| user_profile.exclude_cross_contamination | boolean | Optional. Use true for stricter handling. |
| 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: cmp_live_your_key_here" \
-H "X-Compass-Mode: rich" \
-d '{
"compass_id": "restaurant_123",
"user_profile": {
"diet": "strict_vegan",
"exclude_cross_contamination": true
}
}'Response
| Field | Type | Notes |
|---|---|---|
| decision | fit | not_fit | unknown | unknown is valid when evidence is insufficient, conflicting, or stale. |
| confidence | high | medium | low | Confidence bucket for this decision. |
| reason_codes[] | array | Codes from the locked 30-code taxonomy. |
| evidence[] | array | Evidence pointers used by the decision. |
| verification_required | boolean | True when restaurant confirmation is recommended. |
{
"compass_request_id": "req_abc123",
"compass_id": "restaurant_123",
"decision": "unknown",
"confidence": "low",
"reason_codes": [
"CROSS_CONTAMINATION_UNKNOWN",
"INSUFFICIENT_EVIDENCE"
],
"risk_flags": ["cross_contamination_risk"],
"verification_required": true,
"recommended_user_text": "Verify details with the restaurant before visiting.",
"ai_generated": true
}