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

# Identify a merchant

> Resolve a raw card-transaction descriptor to a merchant brand: its name, domain, and logo. Optional country_code to disambiguate. Early access; secret key.



## OpenAPI

````yaml /openapi.json post /transaction
openapi: 3.1.0
info:
  title: Logo.dev API
  description: >-
    Logo.dev provides company and brand assets over HTTP. There are two surfaces
    with two different keys:


    - **Logo API** (`img.logo.dev`) returns a logo image directly. Authenticate
    with a **publishable key** via the `token` query parameter — safe for
    client-side use.

    - **REST APIs** (`api.logo.dev`) return JSON. Authenticate with a **secret
    key** via the `Authorization: Bearer` header — server-side only.


    Get your keys from the [dashboard](https://www.logo.dev/dashboard/api-keys).
  version: 1.0.0
  contact:
    name: Logo.dev Support
    email: support@logo.dev
    url: https://docs.logo.dev
servers:
  - url: https://api.logo.dev
    description: REST APIs (Brand Search, Brand Data)
security: []
tags:
  - name: Logo API
    description: >-
      Logo images by domain, ticker, crypto symbol, ISIN, or brand name. Served
      from img.logo.dev with a publishable key.
  - name: REST API
    description: JSON endpoints served from api.logo.dev with a secret key.
paths:
  /transaction:
    post:
      tags:
        - REST API
      summary: Identify a merchant
      description: >-
        Resolves a raw card-transaction descriptor (for example `SQ *BLUE BOTTLE
        1523 OAKLAND CA`) to a merchant brand — its name, domain, and logo. Pass
        an optional `country_code` to disambiguate. Requires a secret key.
        **Early access:** contact sales@logo.dev to enable this endpoint on your
        account.
      operationId: identifyMerchant
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - transaction
              properties:
                transaction:
                  type: string
                  description: The raw card-transaction descriptor.
                  examples:
                    - SQ *BLUE BOTTLE 1523 OAKLAND CA
                country_code:
                  type: string
                  description: >-
                    Optional ISO 3166-1 alpha-2 country code where the
                    transaction took place.
                  examples:
                    - US
            examples:
              blueBottle:
                value:
                  transaction: SQ *BLUE BOTTLE 1523 OAKLAND CA
                  country_code: US
      responses:
        '200':
          description: The matched merchant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResult'
              examples:
                blueBottle:
                  value:
                    name: Blue Bottle Coffee
                    domain: bluebottlecoffee.com
                    logo_url: >-
                      https://img.logo.dev/bluebottlecoffee.com?token=LOGO_DEV_PUBLISHABLE_KEY
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: No merchant matched the transaction.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestError'
              examples:
                notFound:
                  value:
                    err: not found
      security:
        - secretKey: []
components:
  schemas:
    SearchResult:
      type: object
      description: A brand search match.
      properties:
        name:
          type: string
          description: Brand name.
        domain:
          type: string
          description: Brand domain.
        logo_url:
          type: string
          format: uri
          description: Logo API URL for the brand's logo.
      required:
        - name
        - domain
        - logo_url
    RequestError:
      type: object
      description: >-
        Error shape returned by the Brand Search and Brand Data endpoints — note
        the `err` key, distinct from the Logo API's `msg`.
      properties:
        err:
          type: string
          description: Human-readable error message.
      required:
        - err
    Error:
      type: object
      properties:
        msg:
          type: string
          description: Human-readable error message.
      required:
        - msg
  responses:
    Unauthorized:
      description: Missing or invalid API token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            invalid:
              value:
                msg: invalid api token
            missing:
              value:
                msg: missing api token
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      description: Secret key (`sk_...`). Server-side only. Used for the REST APIs.

````