# Enrich Companies

Unified endpoint to enrich company data with firmographics, spend, and technographics.

Select which data categories to include using the fields parameter. 

Filter technographics by categories, vendors, or products using the filters parameter.

Control pagination for both tecnographics and spend data using the pagination parameter.

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

## Request fields (application/json):

  - `companies` (object, required)
    Filter companies by IDs or domains (mutually exclusive)
    Example: {"ids":["E48EDEB162A5FBFDAF2DCF707079F8F","1698C53EBC888758570396E0334965C1"]}

  - `companies.domains` (array)
    Array of company domains (e.g., example.com)

  - `companies.ids` (array)
    Array of hex-encoded company IDs
    Example: ["E48EDEB162A5FBFDAF2DCF707079F8F","1698C53EBC888758570396E0334965C1"]

  - `fields` (array, required)
    Which data categories to include in the response
    Enum: "firmographics", "spend", "technographics"

  - `filters` (object)
    Filters for enrich request

  - `filters.spend` (object)
    Filters for spend data
    Example: {"categories":{"ids":["32144E4D868532F1D3A1264DE832ED2F"]}}

  - `filters.spend.categories` (object)
    Filter by hex-encoded IDs (assumes ANY_PRESENT inclusion method)

  - `filters.spend.categories.ids` (array)
    Array of hex-encoded IDs
    Example: ["1698C53EBC888758570396E0334965C1"]

  - `filters.technographics` (object)
    Filters for technographics data
    Example: {"country":{"codes":["US"]},"installs":{"localized":false},"product_categories":{"ids":["319D067B229178F03BCFA1DA4AC4DEDE"]},"products":{"ids":[814]},"vendors":{"ids":[316]}}

  - `filters.technographics.country` (object)
    Filter by country

  - `filters.technographics.country.codes` (array)
    Array of ISO 3166-1 alpha-2 country codes (e.g., US, GB, DE)

  - `filters.technographics.installs` (object)
    Install-level filter options

  - `filters.technographics.installs.localized` (boolean)
    Only match records where installs are within the same country as the company

  - `filters.technographics.product_categories` (object)
    Filter by hex-encoded IDs (assumes ANY_PRESENT inclusion method)

  - `filters.technographics.product_categories.ids` (array)
    Array of hex-encoded IDs
    Example: ["1698C53EBC888758570396E0334965C1"]

  - `filters.technographics.products` (object)
    Filter by numeric IDs (assumes ANY_PRESENT inclusion method)

  - `filters.technographics.products.ids` (array)
    Array of numeric IDs

  - `filters.technographics.vendors` (object)
    Filter by numeric IDs (assumes ANY_PRESENT inclusion method)

  - `filters.technographics.vendors.ids` (array)
    Array of numeric IDs

  - `pagination` (object)
    Pagination parameters for companies and nested data

  - `pagination.spend` (object)
    Common pagination parameters

  - `pagination.spend.limit` (integer)
    The number of records to return in the request.

  - `pagination.spend.offset` (integer)
    Used for paginating records.

  - `pagination.technographics` (object)
    Common pagination parameters

  - `pagination.technographics.limit` (integer)
    The number of records to return in the request.

  - `pagination.technographics.offset` (integer)
    Used for paginating records.

## Response 200 fields (application/json):

  - `companies` (array)
    Example: [{"domain":"example.com","firmographics":{"country_code":"US","domain":"example.com","name":"Example Corp"},"id":"E48EDEB162A5FBFDAF2DCF707079F8F","spend":{"all":[{"absolute_spend":125000,"category_id":"319D067B229178F03BCFA1DA4AC4DEDE","category_name":"Software","country_code":"US"}],"all_count":1},"technographics":{"installs":[{"country_code":"US","product_id":814,"product_intensity":5,"product_last_verified_date":"2024-05-20","product_name":"Java","vendor_name":"Oracle"}],"installs_count":1}}]

  - `companies.domain` (string,null)
    Company domain (populated only when the request includes domains)
    Example: "example.com"

  - `companies.firmographics` (object,null)
    Firmographic data for a company
    Example: {"country_code":"US","domain":"example.com","name":"Example Corp"}

  - `companies.id` (string)
    Unique hexadecimal identifier
    Example: "1698C53EBC888758570396E0334965C1"

  - `companies.spend` (object,null)
    Spend data
    Example: {"all":[{"absolute_spend":125000,"category_id":"319D067B229178F03BCFA1DA4AC4DEDE","category_name":"Software","country_code":"US"}],"all_count":1}

  - `companies.spend.all` (array)
    Array of spend records
    Example: [{"absolute_spend":125000,"category_id":"319D067B229178F03BCFA1DA4AC4DEDE","category_name":"Software","country_code":"US"}]

  - `companies.spend.all.category_description` (string)

  - `companies.spend.all.category_id` (string)

  - `companies.spend.all.category_name` (string)

  - `companies.spend.all.country_code` (string)

  - `companies.spend.all.country_name` (string)

  - `companies.spend.all.spend` (number)
    Total spend in USD

  - `companies.spend.all_count` (integer)
    Total count of spend records
    Example: 1

  - `companies.technographics` (object,null)
    Technographics data
    Example: {"installs":[{"country_code":"US","product_id":814,"product_intensity":5,"product_last_verified_date":"2024-05-20","product_name":"Java","vendor_name":"Oracle"}],"installs_count":1}

  - `companies.technographics.installs` (array)
    Array of technology installs
    Example: [{"country_code":"US","product_id":814,"product_intensity":5,"product_last_verified_date":"2024-05-20","product_name":"Java","vendor_name":"Oracle"}]

  - `companies.technographics.installs_count` (integer)
    Total count of installs
    Example: 1

## 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"

## Response 503 fields (application/json):

  - `errors` (array)

  - `errors.detail` (string, required)
    Example: "Unable to verify credit availability. Please try again later. If the error persists, contact customersupport@hginsights.com."

  - `errors.source` (string,null)

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


