> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thedatacity.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Match One

> Match a single company to a Companies House number.



## OpenAPI

````yaml https://datamatcher-api.thedatacity.com/api/v1/openapi.json post /api/v1/match
openapi: 3.1.0
info:
  title: DataMatcher API
  version: 1.2.0
servers:
  - url: https://datamatcher-api.thedatacity.com
    description: Production
security: []
paths:
  /api/v1/match:
    post:
      tags:
        - match
      summary: Match One
      description: Match a single company to a Companies House number.
      operationId: match-match_one
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MatchInput'
        required: true
      responses:
        '200':
          description: >-
            Match result. Fields reasons, degraded, and error are only included
            when the API key belongs to a superuser. rigorous_match, route, and
            confidence are always returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MatchResult'
              example:
                input_name: Sainsbury's Supermarkets Ltd
                id: demo-sainsburys
                matched_company_number: '3261722'
                matched_company_name: SAINSBURY'S SUPERMARKETS LTD
                matched_registered_postcode: EC1N 2HT
                company_status: Active
                active: 'True'
                rigorous_match: true
                route: fast
                confidence: high
                reasons: []
                degraded: []
        '401':
          description: Missing or invalid API key
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Match rate limit exceeded
        '500':
          description: Match failed
        '503':
          description: Matching engine not ready
      security:
        - APIKey: []
components:
  schemas:
    MatchInput:
      properties:
        input_name:
          type: string
          maxLength: 512
          minLength: 1
          title: Input Name
        input_url:
          anyOf:
            - type: string
              maxLength: 2048
            - type: 'null'
          title: Input Url
        input_postcode:
          anyOf:
            - type: string
              maxLength: 32
            - type: 'null'
          title: Input Postcode
        address:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Address
          description: Optional full address.
        sic_code:
          anyOf:
            - type: string
              maxLength: 16
            - type: 'null'
          title: Sic Code
        start_trading_date:
          anyOf:
            - type: string
              maxLength: 32
            - type: 'null'
          title: Start Trading Date
        id:
          anyOf:
            - type: string
              maxLength: 128
            - type: 'null'
          title: Id
      type: object
      required:
        - input_name
      title: MatchInput
      examples:
        - id: demo-sainsburys
          input_name: Sainsbury's Supermarkets Ltd
        - id: demo-holmes-llp
          input_name: Holmes Joinery Partners LLP
        - id: demo-qmul
          input_name: Queen Mary University of London
    MatchResult:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Optional correlation id echoed from the request.
        input_name:
          type: string
          title: Input Name
          description: Company name echoed from the request.
        input_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Input Url
          description: Website URL echoed from the request, if provided.
        input_postcode:
          anyOf:
            - type: string
            - type: 'null'
          title: Input Postcode
          description: Postcode echoed from the request, if provided.
        address:
          anyOf:
            - type: string
            - type: 'null'
          title: Address
          description: Full address echoed from the request, if provided.
        sic_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Sic Code
          description: SIC code echoed from the request, if provided.
        start_trading_date:
          anyOf:
            - type: string
            - type: 'null'
          title: Start Trading Date
          description: Trading / incorporation date hint echoed from the request.
        matched_company_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Matched Company Number
          description: >-
            Companies House registration number (CRN) when a match is found;
            null when unmatched.
        matched_company_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Matched Company Name
          description: Registered company name for the matched CRN, when available.
        matched_registered_postcode:
          anyOf:
            - type: string
            - type: 'null'
          title: Matched Registered Postcode
          description: Registered office postcode for the matched CRN, when available.
        company_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Company Status
          description: >-
            Companies House status of the matched company, as the register
            reports it: "Active", an "Active - but in an unusual state (...)"
            variant (dormant accounts, proposal to strike off, liquidation,
            administration, ...), or "Struck off (Dissolved)". Null when
            unmatched or not known.
        active:
          anyOf:
            - type: string
            - type: 'null'
          title: Active
          description: >-
            Deprecated: use company_status. "True" when the matched company is
            not dissolved, "False" when it is; null when unmatched or not known.
            Kept for compatibility and removed in the next API version.
        rigorous_match:
          type: boolean
          title: Rigorous Match
          description: >-
            True when the slow path cleared the scoring threshold for this
            candidate. Fast-path exact name matches are also treated as strong
            evidence for confidence.
          default: false
        route:
          anyOf:
            - type: string
            - type: 'null'
          title: Route
          description: >-
            How the match was resolved: "fast" (exact name), "slow" (full
            pipeline), or null when unmatched.
        confidence:
          $ref: '#/components/schemas/MatchConfidence'
          description: >-
            Coarse evidence band. high: fast-path exact name or slow-path with
            rigorous_match; medium: slow-path without rigorous confirmation;
            low: weaker path; none: no CRN (or row-level error). Degraded
            pipeline steps drop the band one notch.
          default: none
        reasons:
          items:
            type: string
          type: array
          title: Reasons
          description: Short scoring reason codes (superuser API keys only).
        degraded:
          items:
            type: string
          type: array
          title: Degraded
          description: >-
            Pipeline steps that were unavailable or weakened for this row
            (superuser API keys only), e.g. url_gap_fill.
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: >-
            Row-level error message when matching failed (superuser API keys
            only).
      type: object
      required:
        - input_name
      title: MatchResult
      description: >-
        Full match result. reasons, degraded, and error only for superuser API
        keys.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MatchConfidence:
      type: string
      enum:
        - high
        - medium
        - low
        - none
      title: MatchConfidence
      description: Coarse evidence strength for a match.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKey:
      type: http
      description: Customer API key (`dm_live_…`)
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.