# Match ## Match API - [POST /v1/match](https://developers.withlantern.com/openapi/match/match_objects_v1_match_post.md): Supports exact, fuzzy, and AI-assisted matching with grouped boolean logic. ## Overview The Match API provides sophisticated matching capabilities for Account, Contact, and Lead objects. It supports multiple matching modes including simple field matching, grouped boolean logic, and AI-assisted matching with natural language explanations. ## Request Body - object: Object type to match (account, contact, lead) - candidates: List of candidates to match against Salesforce records - rules: Matching rules configuration - context: Optional context information (Salesforce instance, org ID, etc.) - max_credits: Maximum credits to spend on this request ## Matching Modes ### Simple Mode Basic field-by-field matching with exact and fuzzy rules. ### Grouped Mode Advanced boolean logic with grouped rules: - groups: List of rule groups - all: Rules within a group that must all match - any: Whether any group needs to be true - threshold: Overall confidence cutoff ### AI Mode AI-assisted matching using LLM scoring: - Natural language explanations - Context-aware matching - Use when structured rules fail ## Field Rules - field:exact: Exact string match - field:fuzzy0.x: Fuzzy match with 0.x threshold - field:eq: Equality match - field:contains: Contains match ## Response Fields - success: Boolean indicating request success - results: List of candidate results with matches - credits_consumed: Number of credits used - credits_remaining: Credits remaining in account - processing_time_ms: Processing time in milliseconds - cached: Whether result was from cache ## Credit Usage Match API consumes credits based on complexity: - Simple Mode: 1 credit per candidate - Grouped Mode: 2 credits per candidate - AI Mode: 5 credits per candidate