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

# Get apitransactions

> Get enriched transaction



## OpenAPI

````yaml https://app.herondata.io/swagger get /api/transactions/{reference_id_or_heron_id}
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/transactions/{reference_id_or_heron_id}:
    get:
      tags:
        - EnrichedTransactions
      description: Get enriched transaction
      parameters:
        - in: path
          name: reference_id_or_heron_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  transaction_enriched:
                    $ref: '#/components/schemas/TransactionEnriched'
                type: object
          description: OK
        '401':
          description: Unauthorized
      security:
        - ApiKeyAuth: []
components:
  schemas:
    TransactionEnriched:
      properties:
        account_id:
          description: Your unique ID for account associated with transaction
          example: checking_account_202348
          maxLength: 400
          nullable: true
          type: string
        account_number:
          description: >-
            The account number of the data source account associated with the
            transaction
          example: '1234567890'
          nullable: true
          type: string
        amount:
          description: >-
            Amount. Inflows to an account should be positive, and outflows from
            an account should be negative. If using Plaid, please flip the
            amount sign for all transactions.
          example: -42.42
          type: number
        annotation:
          allOf:
            - $ref: '#/components/schemas/Annotation'
          description: The category annotation associated with the transaction
        balance:
          description: The running balance of the account after transaction ocurred
          example: 423
          nullable: true
          type: number
        categories_default:
          description: >-
            Category of transaction that you may have received from other
            sources
          example: shopping
          nullable: true
          type: string
          writeOnly: true
        counterparty:
          description: The counterparty associated with the transaction, if available
          example: GOOGLE
          nullable: true
          type: string
        currency:
          description: ISO 4217 currency code
          example: USD
          maxLength: 3
          minLength: 3
          nullable: true
          type: string
        data_source_account_heron_id:
          description: >-
            The heron ID of the data source account associated with the
            transaction
          example: dsa_3NpLy6oYWL9CoNmcoDz8WZ
          nullable: true
          type: string
        data_source_heron_id:
          description: The heron ID of the data source associated with the transaction
          example: dso_FjH2oSgUW692JjZgFEXUjX
          nullable: true
          type: string
        date:
          description: >-
            The date of the transaction; 'timestamp' field takes priority over
            'date'
          example: '2020-04-27'
          format: date
          nullable: true
          type: string
          writeOnly: true
        description:
          description: The text description for the transaction
          example: GOOGLE *ADS12340929 cc@google.com US
          type: string
        end_user_id:
          description: Your unique ID for end user associated with transaction
          example: my_best_customer_203948
          maxLength: 140
          nullable: true
          type: string
        features:
          allOf:
            - $ref: '#/components/schemas/TransactionFeatures'
          description: Features calculated from transaction
        heron_id:
          description: Unique ID of transaction; generated by Heron Data
          example: txn_5oo34LBcPUWzuLMprVipbT
          readOnly: true
          type: string
        last_updated:
          description: >-
            When the transaction was last updated, either by updating its
            enrichments or the values of the transaction itself
          example: '2026-07-02T23:40:39.243713+00:00'
          format: date-time
          type: string
        mcc_code:
          description: >-
            Merchant category code associated with transaction that you may have
            received from other sources
          nullable: true
          pattern: ^\d{4}$
          type: string
          writeOnly: true
        merchant:
          allOf:
            - $ref: '#/components/schemas/Merchant'
          description: The merchant associated with the transaction
        order:
          description: >-
            If sending a batch of transactions, the order in which the
            transaction occurs, where a higher value is equivalent to a more
            recent transaction
          nullable: true
          type: integer
          writeOnly: true
        reference_id:
          description: Your unique ID for transaction
          example: my_favourite_transaction_231098
          maxLength: 140
          nullable: true
          type: string
        request_id:
          description: >-
            ID associated with request, e.g., all transactions in same POST
            request will have same request_id
          example: req_kbmDLSC69AdWgM2kVRuLPK
          nullable: true
          readOnly: true
          type: string
        timestamp:
          description: >-
            The ISO 8601 timezone aware timestamp of the transaction; takes
            precedence over 'date'
          example: '2021-11-12T10:38:05Z'
          format: date-time
          nullable: true
          type: string
        transaction_code:
          description: Code associated with transaction to indicate the type of transaction
          example: card
          maxLength: 140
          nullable: true
          type: string
      required:
        - amount
        - description
      type: object
    Annotation:
      properties:
        annotator:
          allOf:
            - $ref: '#/components/schemas/AnnotatorPublic'
          readOnly: true
        category:
          allOf:
            - $ref: '#/components/schemas/Category1'
          readOnly: true
        confidence:
          readOnly: true
          type: number
        model_version:
          readOnly: true
          type: string
      type: object
    TransactionFeatures:
      properties:
        description_clean:
          description: The cleaned description of the transaction
          example: GOOGLE ADS
          type: string
        duplicate_of_id:
          description: >-
            Indicates that the transaction is a duplicate and gives the heron_id
            of the original
          example: txn_UjTGRcs76z8e2sisPcko9S
        has_matching_transaction:
          description: >-
            Whether the transaction is a transfer; requires end_user_id and
            timestamp to be present
          type: boolean
        is_potential_duplicate:
          description: >-
            Indicates whether the transaction has another transaction similar to
            it
          readOnly: true
          type: boolean
        is_recurring:
          description: >-
            Whether the transaction is recurring or not; requires end_user_id
            and timestamp to be present
          type: boolean
      type: object
    Merchant:
      properties:
        categories:
          items:
            $ref: '#/components/schemas/MerchantCategory'
          readOnly: true
          type: array
        group_id:
          enum:
            - Uber
            - Google
            - Intuit
            - debt.mca_or_rbf
            - debt.non_bank_business
            - debt.equipment_and_auto_leasing
            - debt.mortgage
            - debt.personal_non_mortgage
            - debt.collections
            - debt.bank
            - invoice_factoring
            - fuel_provider
            - gambling_and_betting
            - null
          nullable: true
          type: string
        heron_id:
          example: mrc_n2kfFWJx3GKsLL7L2YcmFj
          readOnly: true
          type: string
        icon_url:
          format: url
          nullable: true
          type: string
        is_priority:
          readOnly: true
          type: boolean
        logo_url:
          format: url
          nullable: true
          type: string
        name:
          type: string
        url:
          format: url
          type: string
      required:
        - name
        - url
      type: object
    AnnotatorPublic:
      properties:
        context:
          enum:
            - sync
            - async_
            - manual
            - undetermined
          type: string
        priority_type:
          enum:
            - gold_standard
            - client_feedback
            - tagging_ui
            - reconcile
            - heuristic
            - classifier
            - undetermined
            - positions_detection
          type: string
      required:
        - context
        - priority_type
      type: object
    Category1:
      properties:
        heron_id:
          description: Unique ID of the category generated by Heron Data
          example: ctg_AFjTdnyoHJoL4e2wELXooL
          readOnly: true
          type: string
        label:
          description: The label of the category
          example: Rent
          type: string
      required:
        - label
      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

````