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

# Retrieve existing Transactions by Case id

> Retrieve transactions associated with a specific case, including both direct case transactions and relevant transactions based on rule parameters.

<Info>
  **transaction\_id** is where the page\_direction will begin from
</Info>

**Note**: Retrieving Transactions by Case Id API Endpoint uses cursor pagination. The default behaviour returns 10 transactions in a response which can be changed by using argument **page\_limit**, with further transactions stored in offsets.

Optional Queries

* page\_limit
* page\_direction
* transaction\_id

**page\_direction· must conform to one of the following options**

* NEXT
* PREV


## OpenAPI

````yaml get /api/cases/{id}/transactions
openapi: 3.0.3
info:
  title: Athena API
  version: v3
  x-logo:
    url: https://cynopsis.co/wp-content/uploads/2021/03/logo-2.png
    altText: Cynopsis Solutions
  description: >-
    ATHENA is an advanced real-time transaction monitoring solution designed to
    detect and prevent money laundering, fraud, and terrorism financing. Powered
    by proprietary AML rules, ATHENA analyzes transactions in real time,
    providing clear, intuitive visual insights to streamline compliance
    processes.
        
        ✅ Real-Time Monitoring – Instantly analyzes transaction data to detect anomalies and potential compliance risks.
        ✅ Visualized Insights – Converts complex data into easy-to-understand charts, aiding faster decision-making.
        ✅ Seamless Integration – Easily integrates with existing financial and compliance systems.
        
        Ideal for financial institutions, fintech companies, and regulated businesses, ATHENA enhances risk management and ensures regulatory compliance with ease.
  contact:
    email: tech@cynopsis.co
servers:
  - url: http://localhost/api
    description: Local development server
security: []
paths:
  /api/cases/{id}/transactions:
    get:
      tags:
        - Case
      summary: List transactions for a specific case
      description: >-
        Retrieve transactions associated with a specific case, including both
        direct case transactions and relevant transactions based on rule
        parameters.
      operationId: cases_transactions_list
      parameters:
        - in: query
          name: cursor
          schema:
            type: string
          description: Cursor for pagination
        - in: path
          name: id
          schema:
            type: integer
          required: true
        - name: page_limit
          required: false
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                required:
                  - results
                properties:
                  next:
                    type: string
                    nullable: true
                    format: uri
                    example: http://api.example.org/accounts/?cursor=cD00ODY%3D"
                  previous:
                    type: string
                    nullable: true
                    format: uri
                    example: http://api.example.org/accounts/?cursor=cj0xJnA9NDg3
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        transactions:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                description: Transaction ID
                              client_transaction_id:
                                type: string
                                description: Client-specific transaction ID
                              transaction_type:
                                type: string
                                description: Type of transaction
                              cp_a:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    description: Subject ID
                                  name:
                                    type: string
                                    description: Subject name
                                  client_subject_id:
                                    type: string
                                    description: Client-specific subject identifier
                                description: Subject information
                              cp_a_country:
                                type: string
                                description: Counterparty A country
                              cp_a_bank:
                                type: string
                                description: Counterparty A bank
                              cp_b:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    description: Subject ID
                                  name:
                                    type: string
                                    description: Subject name
                                  client_subject_id:
                                    type: string
                                    description: Client-specific subject identifier
                                description: Subject information
                              cp_b_country:
                                type: string
                                description: Counterparty B country
                              cp_b_bank:
                                type: string
                                description: Counterparty B bank
                              transaction_timestamp:
                                type: string
                                format: date-time
                                description: Transaction timestamp
                              transaction_currency:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    description: Currency ID
                                  code:
                                    type: string
                                    description: Currency code (e.g., USD, EUR)
                                  name:
                                    type: string
                                    description: Currency name
                                description: Currency information
                              amount:
                                type: number
                                format: float
                                description: Transaction amount
                              alt_currency:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    description: Currency ID
                                  code:
                                    type: string
                                    description: Currency code (e.g., USD, EUR)
                                  name:
                                    type: string
                                    description: Currency name
                                description: Currency information
                              amount_in_alt_currency:
                                type: number
                                format: float
                                description: Amount in alternative currency
                              payment_mode:
                                type: string
                                description: Payment method
                              purpose_of_transfer:
                                type: string
                                description: Purpose of the transaction
                            required:
                              - id
                              - client_transaction_id
                              - transaction_type
                            description: Transaction object with all details
                          description: List of transactions associated with the case
                        transaction_count:
                          type: integer
                          description: Total number of transactions for this case
                        next_token:
                          type: string
                          nullable: true
                          description: Cursor token for next page of results
                        prev_token:
                          type: string
                          nullable: true
                          description: Cursor token for previous page of results
                      required:
                        - transactions
                        - transaction_count
                      description: Case transactions response with pagination
          description: Transactions retrieved successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Error message
                  code:
                    type: string
                    description: Error code (optional)
                  field_errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                    description: Field-specific validation errors (optional)
                required:
                  - detail
                description: Standard error response
          description: Invalid or missing case ID.
        '404':
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Error message
                  code:
                    type: string
                    description: Error code (optional)
                  field_errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                    description: Field-specific validation errors (optional)
                required:
                  - detail
                description: Standard error response
          description: Case, rule, or transaction not found.
      security:
        - CustomAuthentication: []
        - cookieAuth: []
        - BearerAuth: []
components:
  securitySchemes:
    CustomAuthentication:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token obtained from AWS Cognito or custom authentication service
    cookieAuth:
      type: apiKey
      in: cookie
      name: sessionid

````