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

# Extract merchant

> Extract Merchant from a transaction description



## OpenAPI

````yaml https://app.herondata.io/swagger post /api/merchants/extract
openapi: 3.0.0
info:
  contact:
    email: support@herondata.io
    name: Support
  title: Heron Data API
  version: '2021-07-19'
servers:
  - description: Production
    url: https://app.herondata.io
security:
  - ApiKeyAuth:
      - key_XXX
externalDocs:
  description: Read Tutorial
  url: https://docs.herondata.io/
paths:
  /api/merchants/extract:
    post:
      tags:
        - Merchants
      summary: Extract merchant
      description: Extract Merchant from a transaction description
      requestBody:
        content:
          application/json:
            schema:
              properties:
                description:
                  example: PAYPAL* AMZN Mktp 198748320
                  type: string
              required:
                - description
              type: object
        description: The bank transaction description as a string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  description_clean:
                    example: Amzn Mktp
                    nullable: true
                    type: string
                  merchant:
                    $ref: '#/components/schemas/MerchantExtract'
                    nullable: true
                  payment_processor:
                    $ref: '#/components/schemas/PaymentProcessor'
                    nullable: true
                type: object
          description: >
            The `merchant` key is not null when we find a positive match to our
            database. When we could not match a merchant, `merchant` is null and
            `description_clean` is set to a substring of the original
            description that our models identified as the relevant entity.
      security:
        - ApiKeyAuth: []
components:
  schemas:
    MerchantExtract:
      properties:
        categories:
          items:
            $ref: '#/components/schemas/MerchantCategory'
          readOnly: true
          type: array
        confidence:
          default: null
          maximum: 1
          minimum: 0
          nullable: true
          type: number
        group_id:
          type: string
        heron_id:
          example: mrc_UpskSA5ZVRanvP28PR2owF
          readOnly: true
          type: string
        icon_url:
          format: url
          readOnly: true
          type: string
        logo_url:
          format: url
          readOnly: true
          type: string
        name:
          default: null
          example: Amazon
          nullable: true
          readOnly: true
          type: string
        url:
          default: null
          example: https://www.amazon.com/
          format: url
          nullable: true
          readOnly: true
          type: string
      type: object
    PaymentProcessor:
      properties:
        heron_id:
          example: mrc_nRYdGU7nYuevb7qem65cEb
          readOnly: true
          type: string
        icon_url:
          default: null
          example: >-
            https://storage.googleapis.com/heron-merchant-assets/icons/mrc_nRYdGU7nYuevb7qem65cEb.svg
          format: url
          nullable: true
          readOnly: true
          type: string
        logo_url:
          default: null
          example: >-
            https://storage.googleapis.com/heron-merchant-assets/logos/mrc_nRYdGU7nYuevb7qem65cEb.svg
          format: url
          nullable: true
          readOnly: true
          type: string
        name:
          default: null
          example: Paypal
          nullable: true
          readOnly: true
          type: string
        url:
          default: null
          example: https://www.paypal.com
          format: url
          nullable: true
          readOnly: true
          type: string
      type: object
    MerchantCategory:
      properties:
        code:
          example: '7311'
          readOnly: true
          type: string
        description:
          default: null
          example: Advertising services
          nullable: true
          readOnly: true
          type: string
        slug:
          default: null
          example: advertising_services
          nullable: true
          readOnly: true
          type: string
      required:
        - code
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````