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

# Get transaction



## OpenAPI

````yaml https://api.triqai.com/openapi-public.json get /v1/transactions/{id}
openapi: 3.1.0
info:
  title: Triqai Transaction Enrichment API
  version: 1.4.3
  description: >
    The Triqai API provides transaction enrichment capabilities for financial
    applications.


    ## Authentication


    All API endpoints require an API key in the `X-API-Key` header.


    ## Rate Limiting


    Per-organization limits use a token bucket (RPS) plus a concurrent in-flight
    cap.

    Headers may include:

    - `X-RateLimit-Limit`

    - `X-RateLimit-Remaining`

    - `X-RateLimit-Reset`

    - `X-RateLimit-Scope` (`rps` or `concurrency`)

    - `X-RateLimit-Concurrency-Limit`

    - `X-RateLimit-Concurrency-Remaining`


    `Retry-After` is returned in **seconds** on throttled responses.


    ## Idempotency


    You must supply `Idempotency-Key` (or `X-Idempotency-Key`) for enrichment
    requests so retries preserve billing and persistence identity.

    Keys must match `^[a-zA-Z0-9_-]{1,64}$`.

    Reusing a key returns `409`:

    - `state=completed`: request with this key already finished

    - `state=in_progress`: request with this key is still processing
    (`Retry-After` included)
  contact:
    name: Triqai Contact
    url: https://triqai.com/contact
  license:
    name: Proprietary
    url: https://triqai.com/terms
servers:
  - url: https://api.triqai.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Health
  - name: API
  - name: Transactions
  - name: Categories
  - name: Entities
  - name: Issue Reports
paths:
  /v1/transactions/{id}:
    get:
      tags:
        - Transactions
      summary: Get transaction
      operationId: getTransaction
      parameters:
        - $ref: '#/components/parameters/IdPath'
      responses:
        '200':
          description: Transaction detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionDetailResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    IdPath:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    TransactionDetailResponse:
      type: object
      required:
        - success
        - data
        - meta
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          type: object
          required:
            - transaction
          properties:
            transaction:
              $ref: '#/components/schemas/EnrichedTransaction'
        meta:
          $ref: '#/components/schemas/ResponseMeta'
    EnrichedTransaction:
      allOf:
        - $ref: '#/components/schemas/TransactionRecord'
        - type: object
          properties:
            transaction:
              $ref: '#/components/schemas/TransactionData'
            entities:
              type: array
              items:
                $ref: '#/components/schemas/EntityResult'
    ResponseMeta:
      type: object
      required:
        - generatedAt
        - requestId
        - version
      properties:
        generatedAt:
          type: string
          format: date-time
        requestId:
          type: string
        version:
          type: string
      additionalProperties: true
    ErrorResponse:
      type: object
      required:
        - success
        - error
        - meta
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          $ref: '#/components/schemas/ErrorObject'
        meta:
          $ref: '#/components/schemas/ResponseMeta'
    TransactionRecord:
      type: object
      required:
        - id
        - raw
        - country
        - direction
        - status
        - partial
        - errors
        - processingTimeMs
        - createdAt
      properties:
        id:
          type: string
          format: uuid
        raw:
          type: string
        country:
          oneOf:
            - type: string
            - type: 'null'
        direction:
          $ref: '#/components/schemas/TransactionType'
        status:
          type: string
          enum:
            - pending
            - success
            - partial
            - error
        partial:
          type: boolean
        errors:
          type: array
          items:
            type: string
        processingTimeMs:
          oneOf:
            - type: integer
            - type: 'null'
        createdAt:
          type: string
          format: date-time
    TransactionData:
      type: object
      required:
        - category
        - confidence
      properties:
        category:
          $ref: '#/components/schemas/CategoryStructure'
        confidence:
          $ref: '#/components/schemas/ConfidenceWithReasons'
    EntityResult:
      type: object
      required:
        - type
        - role
        - confidence
        - data
      properties:
        type:
          type: string
          enum:
            - merchant
            - location
            - intermediary
            - person
        role:
          type: string
        confidence:
          $ref: '#/components/schemas/ConfidenceWithReasons'
        data:
          oneOf:
            - $ref: '#/components/schemas/MerchantEntityData'
            - $ref: '#/components/schemas/LocationData'
            - $ref: '#/components/schemas/IntermediaryData'
            - $ref: '#/components/schemas/PersonData'
    ErrorObject:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
        details:
          $ref: '#/components/schemas/ErrorDetails'
    TransactionType:
      type: string
      enum:
        - expense
        - income
    CategoryStructure:
      type: object
      required:
        - primary
        - secondary
        - tertiary
        - confidence
      properties:
        primary:
          $ref: '#/components/schemas/Category'
        secondary:
          oneOf:
            - $ref: '#/components/schemas/Category'
            - type: 'null'
        tertiary:
          oneOf:
            - $ref: '#/components/schemas/Category'
            - type: 'null'
        confidence:
          $ref: '#/components/schemas/ConfidenceWithReasons'
    ConfidenceWithReasons:
      type: object
      required:
        - value
        - reasons
      properties:
        value:
          type: integer
          minimum: 0
          maximum: 100
        reasons:
          type: array
          items:
            type: string
    MerchantEntityData:
      type: object
      required:
        - id
        - name
        - alias
        - icon
        - color
        - website
        - domain
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        alias:
          type: array
          items:
            type: string
        keywords:
          type: array
          description: Search keywords associated with this merchant. May be absent.
          items:
            type: string
        icon:
          oneOf:
            - type: string
              format: uri
            - type: 'null'
        description:
          type: string
          description: Brief description of the merchant. May be absent.
        color:
          oneOf:
            - type: string
            - type: 'null'
        website:
          oneOf:
            - type: string
              format: uri
            - type: 'null'
        domain:
          oneOf:
            - type: string
            - type: 'null'
    LocationData:
      type: object
      required:
        - id
        - name
        - formatted
        - phoneNumber
        - structured
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          description: Location display name (store/branch name).
        formatted:
          type: string
          description: Human-readable formatted address string.
        phoneNumber:
          oneOf:
            - type: string
            - type: 'null'
          description: Phone number if available.
        website:
          oneOf:
            - type: string
              format: uri
            - type: 'null'
          description: Location-specific website URL. May be absent.
        priceRange:
          oneOf:
            - type: string
            - type: 'null'
          description: Price range indicator (e.g. "$", "$$"). May be absent.
        rating:
          oneOf:
            - $ref: '#/components/schemas/LocationRating'
            - type: 'null'
          description: User rating data from external sources. May be absent.
        structured:
          $ref: '#/components/schemas/StructuredAddress'
    IntermediaryData:
      type: object
      required:
        - id
        - name
        - icon
        - description
        - color
        - website
        - domain
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        icon:
          oneOf:
            - type: string
              format: uri
            - type: 'null'
        description:
          oneOf:
            - type: string
            - type: 'null'
        color:
          oneOf:
            - type: string
            - type: 'null'
        website:
          oneOf:
            - type: string
              format: uri
            - type: 'null'
        domain:
          oneOf:
            - type: string
            - type: 'null'
    PersonData:
      type: object
      required:
        - displayName
      properties:
        displayName:
          type: string
    ErrorDetails:
      type: object
      properties:
        fieldErrors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      additionalProperties: true
    Category:
      type: object
      required:
        - name
        - code
      properties:
        name:
          type: string
        code:
          $ref: '#/components/schemas/CategoryCode'
    LocationRating:
      type: object
      required:
        - average
        - count
        - source
      properties:
        average:
          type: number
        count:
          type: integer
        source:
          type: string
    StructuredAddress:
      type: object
      required:
        - street
        - city
        - state
        - postalCode
        - country
        - countryName
        - coordinates
        - timezone
      properties:
        street:
          type: string
        city:
          type: string
        state:
          type: string
        postalCode:
          type: string
        country:
          type: string
        countryName:
          type: string
        coordinates:
          $ref: '#/components/schemas/Coordinates'
        timezone:
          type: string
    CategoryCode:
      type: object
      required:
        - mcc
        - sic
        - naics
      properties:
        mcc:
          type: integer
        sic:
          type: integer
        naics:
          type: integer
    Coordinates:
      type: object
      required:
        - latitude
        - longitude
      properties:
        latitude:
          type: number
          format: double
        longitude:
          type: number
          format: double
  responses:
    Unauthorized:
      description: Authentication failed or missing credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: authentication_error
              message: API key is required
            meta:
              generatedAt: '2026-02-16T00:00:00Z'
              requestId: f353ca91-4fc5-49f2-9b9e-304f83d11914
              version: 1.1.2
    Forbidden:
      description: Authenticated but not authorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: authorization_error
              message: Access denied
            meta:
              generatedAt: '2026-02-16T00:00:00Z'
              requestId: f353ca91-4fc5-49f2-9b9e-304f83d11914
              version: 1.1.2
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ValidationError:
      description: Request validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: validation_error
              message: Validation failed
              details:
                fieldErrors:
                  title:
                    - Title is required
            meta:
              generatedAt: '2026-02-16T00:00:00Z'
              requestId: f353ca91-4fc5-49f2-9b9e-304f83d11914
              version: 1.1.2
    RateLimited:
      description: Rate limit exceeded
      headers:
        X-RateLimit-Limit:
          schema:
            type: integer
          description: Requests per second (sustained rate)
        X-RateLimit-Remaining:
          schema:
            type: integer
          description: Current token-bucket capacity available
        X-RateLimit-Reset:
          schema:
            type: string
            format: date-time
          description: Timestamp when token bucket refills
        X-RateLimit-Scope:
          schema:
            type: string
            enum:
              - rps
              - concurrency
          description: Active limiting dimension
        X-RateLimit-Concurrency-Limit:
          schema:
            type: integer
          description: Max concurrent requests for the org
        X-RateLimit-Concurrency-Remaining:
          schema:
            type: integer
          description: Remaining concurrent request slots
        Retry-After:
          schema:
            type: integer
          description: Seconds until retry is allowed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: rate_limited
              message: Rate limit exceeded
            meta:
              generatedAt: '2026-02-16T00:00:00Z'
              requestId: f353ca91-4fc5-49f2-9b9e-304f83d11914
              version: 1.1.2
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Public API key

````