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

# Approve or Reject Transaction

> Approve or reject a pre-approved transaction after reviewing its screening hits.

<Warning>
  You will need to mark all hits in the pre-approved transaction before you are able to approve or reject it.
</Warning>

Once all screening hits have been reviewed and marked, use this endpoint to approve or reject the pre-approved transaction.

**Status Options:**

* `approved` — Approve the transaction
* `rejected` — Reject the transaction


## OpenAPI

````yaml patch /api/preapprovedtransactions/{id}/approve-reject
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/preapprovedtransactions/{id}/approve-reject:
    patch:
      tags:
        - Transaction Screening
      summary: Approve or reject a QuickScan transaction
      description: |-
        Approve or reject a pre-approved transaction.

        Request body:
            - status: "approved" or "rejected"
            - comment: Optional review comment or decision rationale

        Returns:
            - success: Boolean indicating if status update was successful
            - message: Human-readable message
            - transaction: Updated transaction data with status and approval info
      operationId: preapprovedtransaction_approve_reject
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          description: A unique integer value identifying this pre approved transaction.
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedPreApprovedTransactionRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedPreApprovedTransactionRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedPreApprovedTransactionRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreApprovedTransaction'
          description: ''
      security:
        - cookieAuth: []
        - BearerAuth: []
components:
  schemas:
    PatchedPreApprovedTransactionRequest:
      type: object
      description: >-
        Serializer for PreApprovedTransaction model.


        NOTE: name_screen_cpa and name_screen_cpb are now queried dynamically
        via

        client_transaction_id (no longer FK fields). Maintains backward
        compatibility.
      properties:
        client_transaction_id:
          type: string
          minLength: 1
          description: Client's transaction ID (unique identifier)
          maxLength: 255
        status:
          allOf:
            - $ref: '#/components/schemas/StatusEnum'
          description: |-
            Status of the pre-approval workflow

            * `on_hold` - on_hold
            * `approved` - approved
            * `rejected` - rejected
            * `not_screened` - not_screened
            * `cleared` - cleared
        transaction_timestamp:
          type: string
          format: date-time
          nullable: true
        transaction_type:
          type: string
          maxLength: 255
        amount:
          type: number
          format: double
          nullable: true
        transaction_currency:
          type: string
          minLength: 1
          nullable: true
          description: Transaction currency code
        payment_mode:
          type: string
          maxLength: 255
        approved_on:
          type: string
          format: date-time
          nullable: true
        approved_by:
          type: integer
          nullable: true
        assignee:
          type: integer
          nullable: true
          description: User assigned to review this transaction
        comment:
          type: string
          description: Review comment or decision rationale
    PreApprovedTransaction:
      type: object
      description: >-
        Serializer for PreApprovedTransaction model.


        NOTE: name_screen_cpa and name_screen_cpb are now queried dynamically
        via

        client_transaction_id (no longer FK fields). Maintains backward
        compatibility.
      properties:
        id:
          type: integer
          readOnly: true
        client_transaction_id:
          type: string
          description: Client's transaction ID (unique identifier)
          maxLength: 255
        status:
          allOf:
            - $ref: '#/components/schemas/StatusEnum'
          description: |-
            Status of the pre-approval workflow

            * `on_hold` - on_hold
            * `approved` - approved
            * `rejected` - rejected
            * `not_screened` - not_screened
            * `cleared` - cleared
        transaction_timestamp:
          type: string
          format: date-time
          nullable: true
        transaction_type:
          type: string
          maxLength: 255
        amount:
          type: number
          format: double
          nullable: true
        transaction_currency:
          type: string
          nullable: true
          description: Transaction currency code
        payment_mode:
          type: string
          maxLength: 255
        approved_on:
          type: string
          format: date-time
          nullable: true
        approved_by:
          type: integer
          nullable: true
        assignee:
          type: integer
          nullable: true
          description: User assigned to review this transaction
        cp_a:
          allOf:
            - $ref: '#/components/schemas/SubjectMinimal'
          readOnly: true
        cp_b:
          allOf:
            - $ref: '#/components/schemas/SubjectMinimal'
          readOnly: true
        name_screen_cpa:
          type: string
          readOnly: true
        name_screen_cpb:
          type: string
          readOnly: true
        has_related_case:
          type: string
          readOnly: true
        related_cases:
          type: string
          readOnly: true
        has_true_hit_cpa:
          type: string
          readOnly: true
        has_true_hit_cpb:
          type: string
          readOnly: true
        has_unmarked_hit_cpa:
          type: string
          readOnly: true
        has_unmarked_hit_cpb:
          type: string
          readOnly: true
        comment:
          type: string
          description: Review comment or decision rationale
        created_on:
          type: string
          format: date-time
          readOnly: true
        modified_on:
          type: string
          format: date-time
          readOnly: true
      required:
        - client_transaction_id
        - cp_a
        - cp_b
        - created_on
        - has_related_case
        - has_true_hit_cpa
        - has_true_hit_cpb
        - has_unmarked_hit_cpa
        - has_unmarked_hit_cpb
        - id
        - modified_on
        - name_screen_cpa
        - name_screen_cpb
        - related_cases
    StatusEnum:
      enum:
        - on_hold
        - approved
        - rejected
        - not_screened
        - cleared
      type: string
      description: |-
        * `on_hold` - on_hold
        * `approved` - approved
        * `rejected` - rejected
        * `not_screened` - not_screened
        * `cleared` - cleared
    SubjectMinimal:
      type: object
      properties:
        client_subject_id:
          type: string
          readOnly: true
        subject_name:
          type: string
          readOnly: true
      required:
        - client_subject_id
        - subject_name
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: sessionid

````