Smart Populate API Integration Guide

This guide walks through how to integrate with /prefill/businesses API, which returns real-time data about a business.

You’ll find:

  • High-level design
  • Rate limits and performance expectations
  • Full API Reference

Example End-to-End Flow

  1. A user types their business name and address.

    1. Alternatively, a user selects the name and address from the list of results returned by our autocomplete API.
  2. Your backend sends a request to Middesk's POST /v1/prefill/businesses endpoint.

  3. Middesk returns real time information about the business including:

    • Names
    • Addresses
    • People
    • Entity type
    • Last 4 digits of EIN
    • Website
    • Industry classifications

    Which can be used to prefill fields during the business onboarding process.


Latency Benchmarks

MetricTarget
p95 latency< 600ms
p99 latency< 900ms

API Reference

Method: POST

URL: https://api.middesk.com/v1/prefill/businesses

Headers: Include the API key in the Authorization header using Bearer authorization

Request body:

ParameterDescriptionRequired
namesList of business names.No
addressesList of addresses.No
TINTIN for the businessNo

API Validation

To search for a business, either names and address are required OR TIN is required. The endpoint will search by whichever input is provided. If names, addresses, and TIN are all provided, the API will only search by names and addresses.

Example Request

curl -X POST "https://api.middesk.com/v1/prefill/businesses" \
  -H "Authorization: Bearer <API KEY>" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "names": ["Dunder Mifflin Paper Company"],
    "addresses": ["1725 Slough Avenue, Scranton, PA 18501"]
  }'
  

Response Statuses:

CodeDescription
200Success
401Unauthorized
422Invalid parameters
429Rate limit exceeded

Example Responses

{
  "names": [
    {
      "name": "Dunder Mifflin Paper Company",
      "type": "legal"
    }
  ],
  "addresses": [
    {
      "full_address": "1725 Slough Avenue, Scranton, PA 18501",
      "address_line1": "1725 Slough Avenue",
      "address_line2": null,
      "city": "Scranton",
      "state": "PA",
      "postal_code": "18501",
      "labels": ["mailing", "primary"]
    }
  ],
  "tin": {
    "tin_type": "EIN",
    "last_four": "7890"
  },
  "formation": {
    "entity_type": "CORPORATION"
  },
  "industry_classifications": [
    {
      "name": "Paper and Paper Product Merchant Wholesalers",
      "score": 0.7805803271428109,
      "sector": null,
      "source": "refuel_llm",
      "category": "WHOLESALE_SERVICES",
      "high_risk": false,
      "mcc_codes": [],
      "sic_codes": [],
      "naics_codes": ["4241"],
      "prohibited_labels": [],
      "classification_system": "NAICS"
    }
  ],
  "people": [
    {
      "name": "Michael Scott",
      "titles": ["MANAGER", "REGISTERED AGENT"]
    },
    {
      "name": "David Wallace",
      "titles": ["Chief Executive Officer"]
    }
  ],
  "website": {
    "url": "https://dunder-mifflin.netlify.app/"
  }
}
{  
  "error": "Unauthorized",  
  "message": "Missing or invalid API key"  
}
{  
  "error": "Invalid request",  
  "message": "Missing required query parameter: name"  
}
{  
  "error": "Rate limit exceeded",  
  "message": "Too many requests in a short period of time"  
}
null

The API will return null if no business is found.

Response Schema

FieldTypeDescription
namesName[]Array of associated names.
addressesAddress[]Array of associated addresses.
peoplePerson[]Array of associated people.
formationFormation| nullFormation information for the business.
industry_classificationsClassification[]Industry Classification for the business.
tinTIN | nullTIN for the business.
websiteWebsite| nullWebsite for the business.

Name

FieldTypeDescription
namestringA name associated with the business.
typestringThe name type. Possible values: dba or legal

Address

FieldTypeDescription
full_addressstringFull normalized address.

Person

FieldTypeDescription
namestringFull name of associated person.
titlesstring[]List of titles associated with person.

Formation

FieldTypeDescription
entity_typestringThe legal structure of the entity. Possible values: LLC, CORPORATION, NON_PROFIT, PARTNERSHIP , and TRUST.

TIN

FieldTypeDescription
tin_typestringEIN
last_fourstringlast four digits of the TIN.

Website

FieldTypeDescription
urlstringThe url of the website for the business.

Classifications

Detailed description of the classification object can be found here .