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

# Retrieve a case's customer context

> Returns what is known about the parties on the transaction — the transaction itself with its customer (`subject`) and `counterparty` and their sanctions and monitoring state, each party's prior activity, and the risk signals carried on ingest. Read-only context for a reviewer; it changes nothing.



## OpenAPI

````yaml /openapi/transaction-monitoring.json get /api/v1/alerts/groups/{transaction_id}/customer-context/
openapi: 3.0.3
info:
  title: iDenfy Transaction Monitoring API
  version: v1
  description: >-
    Submit transactions and events for AML monitoring, and read back the alerts,
    cases and reports they produce.
servers:
  - url: https://ivs-tx-monitoring.idenfy.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Ingest
    description: Submit transactions and events for monitoring.
  - name: Transactions
    description: Read back submitted transactions and their rule hits.
  - name: Rules
    description: Detection rules evaluated against every submission.
  - name: Alerts
    description: Alerts opened when a rule matches.
  - name: Investigations
    description: Cases opened from one or more alerts.
  - name: SARs
    description: Suspicious activity reports and their attachments.
  - name: Sanctions screening
    description: Sanctions and PEP screening of transaction parties.
  - name: AML monitoring
    description: Ongoing AML monitoring of screened parties.
  - name: Party suspensions
    description: ''
  - name: Webhooks
    description: Outbound event delivery to your endpoints.
  - name: Custom fields
    description: Your own transaction attributes, declared so rules can match them.
  - name: Reference lists
    description: Named value lists rules can reference.
  - name: Notification rules
    description: Slack and email notifications for alerts.
  - name: Reports
    description: Generated compliance reports.
paths:
  /api/v1/alerts/groups/{transaction_id}/customer-context/:
    get:
      tags:
        - Alerts
      summary: Retrieve a case's customer context
      description: >-
        Returns what is known about the parties on the transaction — the
        transaction itself with its customer (`subject`) and `counterparty` and
        their sanctions and monitoring state, each party's prior activity, and
        the risk signals carried on ingest. Read-only context for a reviewer; it
        changes nothing.
      operationId: alerts_groups_customer_context_retrieve
      parameters:
        - in: path
          name: transaction_id
          schema:
            type: string
            format: uuid
            description: Transaction that triggered this alert
          required: true
          description: Identifies the transaction.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerContext'
          description: ''
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CustomerContext:
      type: object
      properties:
        transaction:
          allOf:
            - $ref: '#/components/schemas/TransactionContext'
          description: 'The transaction the case is about: its parties and money'
        subjectHistory:
          allOf:
            - $ref: '#/components/schemas/PartyHistory'
          description: The customer's activity in this environment
        counterpartyHistory:
          allOf:
            - $ref: '#/components/schemas/PartyHistory'
          description: The counterparty's activity in this environment
        riskIndicators:
          type: array
          items:
            type: string
          description: >-
            Signals read off the transaction: high_amount, cross_border,
            round_amount, high_risk_country
      required:
        - counterpartyHistory
        - riskIndicators
        - subjectHistory
        - transaction
    TransactionContext:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          description: Primary key
        type:
          type: string
          readOnly: true
        direction:
          readOnly: true
          nullable: true
          description: >-
            Which way the money moved for the subject: OUTBOUND puts the subject
            on the sender side, INBOUND on the receiver side. Null for custom
            events


            * `OUTBOUND` - Outbound

            * `INBOUND` - Inbound
          oneOf:
            - $ref: '#/components/schemas/DirectionEnum'
            - $ref: '#/components/schemas/NullEnum'
        eventType:
          type: string
          nullable: true
          readOnly: true
          description: 'Custom events: what happened; null otherwise'
        amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,8})?$
          readOnly: true
          nullable: true
        currency:
          type: string
          readOnly: true
          nullable: true
          description: ISO 4217 currency code, uppercased at ingest
        subject:
          allOf:
            - $ref: '#/components/schemas/TransactionSubject'
          readOnly: true
          description: Your customer, whichever way the money moved
        counterparty:
          allOf:
            - $ref: '#/components/schemas/TransactionParty'
          nullable: true
          readOnly: true
          description: The other side; null for a custom event
        description:
          type: string
          nullable: true
          readOnly: true
          description: Free-text description; null for a custom event
        reference:
          type: string
          readOnly: true
          nullable: true
          description: Client-supplied reference string
        partySuspended:
          type: boolean
          readOnly: true
          description: >-
            True when the customer or the counterparty is currently suspended
            from transacting
        createdAt:
          type: string
          format: date-time
          readOnly: true
      required:
        - amount
        - counterparty
        - createdAt
        - currency
        - description
        - direction
        - eventType
        - id
        - partySuspended
        - reference
        - subject
        - type
    PartyHistory:
      type: object
      properties:
        transactionCount:
          type: integer
          description: The party's transactions, on either side
        totalAmount:
          type: string
          description: Their amounts as sent, summed across currencies
        alertCount:
          type: integer
          description: Alerts raised on those transactions
      required:
        - alertCount
        - totalAmount
        - transactionCount
    DirectionEnum:
      enum:
        - OUTBOUND
        - INBOUND
      type: string
      description: |-
        * `OUTBOUND` - Outbound
        * `INBOUND` - Inbound
    NullEnum:
      enum:
        - null
    TransactionSubject:
      type: object
      properties:
        id:
          type: string
          nullable: true
        type:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
        paymentMethod:
          allOf:
            - $ref: '#/components/schemas/PaymentMethod'
          nullable: true
        mcc:
          type: string
          nullable: true
          description: 'Card payments: the merchant category code'
        aml:
          allOf:
            - $ref: '#/components/schemas/PartyAml'
          description: Screening, monitoring and identification state of this party
        age:
          type: integer
          nullable: true
        riskStatus:
          type: string
          nullable: true
        blacklisted:
          type: boolean
      required:
        - age
        - aml
        - blacklisted
        - country
        - id
        - name
        - riskStatus
        - type
    TransactionParty:
      type: object
      properties:
        id:
          type: string
          nullable: true
        type:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
        paymentMethod:
          allOf:
            - $ref: '#/components/schemas/PaymentMethod'
          nullable: true
        mcc:
          type: string
          nullable: true
          description: 'Card payments: the merchant category code'
        aml:
          allOf:
            - $ref: '#/components/schemas/PartyAml'
          description: Screening, monitoring and identification state of this party
      required:
        - aml
        - country
        - id
        - name
        - type
    PaymentMethod:
      type: object
      properties:
        account:
          type: string
          nullable: true
          description: 'Bank payments: account or IBAN'
        bic:
          type: string
          nullable: true
          description: 'Bank payments: BIC/SWIFT code'
        walletAddress:
          type: string
          nullable: true
          description: 'Crypto transfers: wallet'
        walletUrl:
          type: string
          nullable: true
          description: 'Crypto transfers: the wallet on a block explorer, when known'
        maskedPan:
          type: string
          nullable: true
          description: Card payments, subject only
        lastFour:
          type: string
          nullable: true
          description: Card payments, subject only
        issuer:
          type: string
          nullable: true
          description: Card payments, subject only
        issuerCountry:
          type: string
          nullable: true
          description: Card payments, subject only
    PartyAml:
      type: object
      properties:
        isSanctioned:
          type: boolean
          description: A sanctions screening found a match
        screeningIsConclusive:
          type: boolean
          description: >-
            The party was really screened, so `is_sanctioned` false means clean
            rather than unknown
        monitoringIsConclusive:
          type: boolean
          description: The party is under a live monitoring subscription
        underMonitoringAlert:
          type: boolean
          description: Ongoing monitoring has raised an alert on the party
        idenfyCheckId:
          type: string
          nullable: true
        monitoringId:
          type: string
          nullable: true
        identificationStatus:
          type: string
          nullable: true
        scanRef:
          type: string
          nullable: true
        identificationId:
          type: string
          format: uuid
          nullable: true
        identificationLastSyncedAt:
          type: string
          format: date-time
          nullable: true
        idenfyCheckUrl:
          type: string
          nullable: true
          description: The screening in the iDenfy dashboard
        monitoringUrl:
          type: string
          nullable: true
          description: The monitoring in the iDenfy dashboard
        identificationUrl:
          type: string
          nullable: true
          description: The identification in the iDenfy dashboard
      required:
        - idenfyCheckId
        - idenfyCheckUrl
        - identificationId
        - identificationLastSyncedAt
        - identificationStatus
        - identificationUrl
        - isSanctioned
        - monitoringId
        - monitoringIsConclusive
        - monitoringUrl
        - scanRef
        - screeningIsConclusive
        - underMonitoringAlert
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

## Related topics

- [Retrieve a case](https://documentation.idenfy.com/api-reference/transaction-monitoring/alerts/retrieve-a-case.md)
- [Retrieve one investigation](https://documentation.idenfy.com/api-reference/transaction-monitoring/investigations/retrieve-one-investigation.md)
- [Transaction Monitoring Dashboard: Alert Queue](https://documentation.idenfy.com/guides/dashboard/transaction-monitoring/alerts.md)
- [Retrieve a case's audit trail](https://documentation.idenfy.com/api-reference/transaction-monitoring/alerts/retrieve-a-cases-audit-trail.md)
- [Transaction Monitoring API: Alerts, Investigations and SARs](https://documentation.idenfy.com/transaction-monitoring/case-management.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.