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

# Get TCN Call Outcome

> Retrieves the call outcome for a specific TCN call ID. This endpoint is designed to support TCN's SIP integration where calls are routed to CollectWise AI agents.

## Overview

The TCN Call Outcome API provides a simple endpoint for TCN (Third-Party Call Network) integration to retrieve call outcomes from CollectWise AI agents. This endpoint is designed to support TCN's SIP integration where calls are routed to our AI agents with `X-TCN-cid` headers.

## Authentication

This endpoint requires a valid `collectwise_key` header for API authentication, following the same pattern as other CollectWise API endpoints.

## Response Fields

### action

The `action` field in the response can contain one of the following values:

* `"end"` - Call completed normally, no transfer needed
* `"judge_transfer"` - Transfer to judge/supervisor for legal matters
* `"garnishment_transfer"` - Transfer to garnishment specialist
* `"general_transfer"` - General transfer to human agent

### language

The `language` field indicates the language used during the call. This field may be `null` if not provided during call outcome creation.

Example values include:

* `"english"`
* `"spanish"`

## Usage Pattern

This endpoint should be pinged every 1-2 seconds after a call ends, with a timeout of 2-3 minutes. The endpoint will return:

* **200**: Call outcome is available
* **404**: Call is still in progress or outcome not yet available (continue polling)

## Example Usage

```bash theme={null}
curl -X GET \
  "https://api.collectwiseapi.com/tcn/call-outcome/12345" \
  -H "collectwise_key: your-api-key-here"
```


## OpenAPI

````yaml GET /tcn/call-outcome/{tcn-cid}
openapi: 3.0.1
info:
  title: CollectWise API
  description: >-
    An API for managing debtors, tracking statuses, and automating debt
    collection processes
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://collectwiseapi.com
security:
  - apiKey: []
paths:
  /tcn/call-outcome/{tcn-cid}:
    get:
      summary: Get TCN Call Outcome
      description: >-
        Retrieves the call outcome for a specific TCN call ID. This endpoint is
        designed to support TCN's SIP integration where calls are routed to
        CollectWise AI agents.
      parameters:
        - name: tcn-cid
          in: path
          required: true
          description: The TCN call identifier
          schema:
            type: string
      responses:
        '200':
          description: Call outcome found and returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TCNCallOutcome'
        '400':
          description: Invalid or missing TCN CID parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Call outcome not found (call in progress or not available)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TCNCallOutcomeNotFound'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    TCNCallOutcome:
      type: object
      required:
        - action
        - tcn_cid
        - timestamp
      properties:
        action:
          type: string
          description: The action to be taken based on the call outcome
          enum:
            - end
            - judge_transfer
            - garnishment_transfer
            - general_transfer
        tcn_cid:
          type: string
          description: The TCN call identifier
        timestamp:
          type: string
          format: date-time
          description: Timestamp when the call outcome was determined
        language:
          type: string
          description: >-
            The language used during the call (e.g., 'english', 'spanish'). May
            be null if not provided.
          nullable: true
      example:
        action: general_transfer
        tcn_cid: '12345'
        timestamp: '2024-01-15T10:30:00.000Z'
        language: english
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
          description: Error code
        message:
          type: string
          description: Error message
      example:
        code: 400
        message: 'Invalid input: debtorName is required'
    TCNCallOutcomeNotFound:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: Error type
          example: Call outcome not found
        message:
          type: string
          description: Detailed error message
          example: Call may still be in progress or outcome not yet available
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: collectwise_key

````