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

# Submit Batch

> Enqueue an async batch (max 1,000 companies). Poll GET /match/batch/{job_id}.



## OpenAPI

````yaml https://datamatcher-api.thedatacity.com/api/v1/openapi.json post /api/v1/match/batch
openapi: 3.1.0
info:
  title: DataMatcher API
  version: 0.1.0
servers:
  - url: https://datamatcher-api.thedatacity.com
    description: Production
security: []
paths:
  /api/v1/match/batch:
    post:
      tags:
        - match
      summary: Submit Batch
      description: >-
        Enqueue an async batch (max 1,000 companies). Poll GET
        /match/batch/{job_id}.
      operationId: match-submit_batch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchMatchRequest'
        required: true
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchSubmitResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKey: []
components:
  schemas:
    BatchMatchRequest:
      properties:
        companies:
          items:
            $ref: '#/components/schemas/MatchInput'
          type: array
          maxItems: 1000
          minItems: 1
          title: Companies
        callback_url:
          anyOf:
            - type: string
              minLength: 1
              format: uri
            - type: 'null'
          title: Callback Url
          description: >-
            URL to POST once when the job completes or fails. Must be https
            except in local development.
        webhook_secret:
          anyOf:
            - type: string
              maxLength: 128
              minLength: 16
            - type: 'null'
          title: Webhook Secret
          description: >-
            Optional HMAC-SHA256 secret. When set, the webhook includes
            X-DataMatcher-Signature: sha256=<hex> over the raw JSON body.
      type: object
      required:
        - companies
      title: BatchMatchRequest
      examples:
        - companies:
            - id: demo-001
              input_name: Sainsbury's Supermarkets Ltd
            - id: demo-002
              input_name: John Lewis plc
            - id: demo-003
              input_name: Holmes Joinery Partners LLP
            - id: demo-004
              input_name: Queen Mary University of London
            - id: demo-005
              input_name: AKQA Ltd
            - id: demo-006
              input_name: Just Eat Limited
            - id: demo-007
              input_name: AstraZeneca UK Limited
            - id: demo-008
              input_name: Amazon UK Services Ltd
            - id: demo-009
              input_name: Harrods Limited
            - id: demo-010
              input_name: Network Rail Infrastructure Ltd
    BatchSubmitResponse:
      properties:
        job_id:
          type: string
          format: uuid
          title: Job Id
        status:
          $ref: '#/components/schemas/JobStatus'
        total:
          type: integer
          title: Total
      type: object
      required:
        - job_id
        - status
        - total
      title: BatchSubmitResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
        postcode:
          anyOf:
            - type: string
              maxLength: 32
            - type: 'null'
          title: Postcode
        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
    JobStatus:
      type: string
      enum:
        - queued
        - running
        - completed
        - failed
      title: JobStatus
    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

````