# Match Companies

Batch match up to 10 companies by name, domain, and/or country.

Each company in the request must include at least one of: name, domain, country.
Results are returned in the same order as the input, with each entry containing
the matched HG company records sorted by relevance.

Endpoint: POST /data-api/v2/companies/match
Security: authorization

## Request fields (application/json):

  - `companies` (array, required)
    Array of companies to match (1-10)
    Example: [{"country":"US","domain":"ford.com","name":"Ford Motor Company"},{"domain":"google.com"}]

  - `companies.country` (string)
    Country name or ISO 3166 alpha-2 code (e.g., US or United States)

  - `companies.customer_id` (string,null)
    Optional caller-provided identifier echoed back in the response for correlation

  - `companies.domain` (string)
    Company domain (e.g., ford.com)

  - `companies.name` (string)
    Company name

  - `limit` (integer)
    Maximum number of matches to return per company
    Example: 3

## Response 200 fields (application/json):

  - `companies` (array, required)
    Example: [{"country":"US","domain":"ford.com","matches":[{"country":"US","domain":"ford.com","id":"3AE6DA985017C625659E242A074C5A88","matched_on":["name","domain","country"],"name":"Ford Motor Company"}],"name":"Ford Motor Company"},{"domain":"lehlvksjbdvsdf.com","matches":[]}]

  - `companies.country` (string)
    Input company country

  - `companies.customer_id` (string,null)
    Caller-provided identifier echoed back for correlation

  - `companies.domain` (string)
    Input company domain

  - `companies.matches` (array, required)
    Match results sorted by relevance

  - `companies.matches.country` (string,null)
    ISO 3166 alpha-2 country code of the matched company

  - `companies.matches.domain` (string,null)
    Company domain

  - `companies.matches.id` (string, required)
    HG company ID (hex-encoded)

  - `companies.matches.matched_on` (array)
    Fields that contributed to this match
    Enum: "name", "domain", "country"

  - `companies.matches.name` (string,null)
    Company name

  - `companies.name` (string)
    Input company name

## Response 401 fields (application/json):

  - `errors` (array)

  - `errors.detail` (string, required)
    Example: "The api key provided is not valid"

  - `errors.source` (string,null)

  - `errors.title` (string, required)
    Example: "Unauthorized"

## Response 422 fields (application/json):

  - `errors` (array, required)

  - `errors.detail` (string, required)
    Example: "null value where string expected"

  - `errors.source` (object, required)

  - `errors.source.pointer` (string, required)
    Example: "/data/attributes/petName"

  - `errors.title` (string, required)
    Example: "Invalid value"


