Prosper AI Targets API

The Targets API from Prosper AI — 1 operation(s) for targets.

OpenAPI Specification

prosper-ai-targets-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Prosper Voice API Keys Targets API
  version: 1.0.0
tags:
- name: Targets
paths:
  /api/v1/targets/{target_id}:
    get:
      tags:
      - Targets
      summary: Retrieve Target
      operationId: retrieve_target_api_v1_targets__target_id__get
      parameters:
      - name: target_id
        in: path
        required: true
        schema:
          type: string
          description: The ID of the target to get the required variables from.
          title: Target Id
        description: The ID of the target to get the required variables from.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignTargetResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Targets
      summary: Update Target Input Data
      operationId: update_target_input_data_api_v1_targets__target_id__patch
      parameters:
      - name: target_id
        in: path
        required: true
        schema:
          type: string
          description: The ID of the target whose input_data to update.
          title: Target Id
        description: The ID of the target whose input_data to update.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTargetInputDataRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignTargetResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PatientIncomingCallCategory:
      type: string
      enum:
      - TRANSFER_BY_USER
      - TRANSFER_BY_ASSISTANT
      - INSTANT_TRANSFER
      - TRANSFER
      - TRANSFER_FAILED
      - CALL_DROPPED
      - SUCCESSFUL_CALL
      - UNSUCCESSFUL_CALL
      - NO_RESPONSE
      - NOT_CONNECTED
      title: PatientIncomingCallCategory
    CampaignTargetPayorResolution:
      type: string
      enum:
      - retrieved
      - not_retrieved
      title: CampaignTargetPayorResolution
    IVRLoopSubCategory:
      type: string
      enum:
      - NOT_RECOGNIZE_DATA
      - NOT_FOUND
      - LONG_WAITING_PERIOD
      - BAD_INTERACTION_WITH_IVR
      - IVR_ONLY_NUMBER
      - VOICEMAIL
      - CALLBACK_OFFERED
      title: IVRLoopSubCategory
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HumanOnlySubcategory:
      type: string
      enum:
      - STARTING_CALL
      - MID_CALL
      title: HumanOnlySubcategory
    PatientIncomingSchedulingCallCategory:
      type: string
      enum:
      - SWITCHBOARD
      - DEFLECTED
      - NO_RESPONSE
      - USER_EARLY_DISCONNECT
      - FAST_USER_HANG_UP
      - TRANSFER_SOP
      - UNRESOLVED
      title: PatientIncomingSchedulingCallCategory
    PatientCallCategory:
      type: string
      enum:
      - GOOD
      - NO_RESPONSE
      - TRANSFER
      - TRANSFER_FAILED
      - VOICEMAIL
      - SERVICE_NOT_AVAILABLE
      - HUMAN_ONLY
      - CALLBACK_REQUESTED
      - MANAGER_REQUESTED
      - DISCONNECTED
      - DNC_REQUESTED
      - WRONG_USER
      - NOT_INTERESTED_RIGHT_NOW
      - BLACKLISTED_PHONE
      title: PatientCallCategory
    PayorCallCategory:
      type: string
      enum:
      - GOOD
      - NO_RESPONSE
      - TRANSFER
      - TRANSFER_FAILED
      - VOICEMAIL
      - SERVICE_NOT_AVAILABLE
      - HUMAN_ONLY
      - AFTER_HOURS
      - CLOSED_FOR_HOLIDAYS
      - IVR_LOOP
      - INPUT_DATA_ISSUE
      - WRONG_PHONE_NUMBER
      - NOT_FOUND
      - UNPROCESSABLE_BY_PHONE
      - DISCONNECTED
      - NOT_ALL_DATA_POINTS_RETRIEVED
      - MEMBER_CONSENT_REQUIRED
      - SLA_EXPIRED
      - PAYOR_NOT_SUPPORTED
      - NO_OPERATING_HOURS
      title: PayorCallCategory
    NotFoundSubCategory:
      type: string
      enum:
      - PROVIDER
      - MEMBER
      - FACILITY
      - REQUEST
      - OTHER
      title: NotFoundSubCategory
    UnprocessableByPhoneSubCategory:
      type: string
      enum:
      - FAX
      - INSURANCE_PORTAL
      - AUTOMATED_SYSTEM
      title: UnprocessableByPhoneSubCategory
    InputDataIssueSubCategory:
      type: string
      enum:
      - MISSING_INFORMATION
      - INCORRECT_INFORMATION
      title: InputDataIssueSubCategory
    ProviderCallCategory:
      type: string
      enum:
      - GOOD
      - WRONG_USER
      - PROVIDER_NO_LONGER_AT_LOCATION
      - DISCONNECTED
      - WRONG_PHONE_NUMBER
      - HUMAN_ONLY
      - DATA_ISSUE
      - CALLBACK_REQUESTED
      - TRANSFER_HANG_UP
      - UNPROCESSABLE_BY_PHONE
      - MEMBER_CONSENT_REQUIRED
      - IVR_LOOP
      - CLOSED_FOR_HOLIDAYS
      - NO_RESPONSE
      - VOICEMAIL
      - AFTER_HOURS
      - TRANSFER
      - TRANSFER_FAILED
      - BLACKLISTED_PHONE
      title: ProviderCallCategory
    TransferSubCategory:
      type: string
      enum:
      - HUMAN_REQUESTED
      - INTEGRATION_ERROR
      - INSURANCE_REJECTED
      - TRANSFER_REQUESTED
      - NATURAL_TRANSFER
      title: TransferSubCategory
    UpdateTargetInputDataRequest:
      properties:
        input_data:
          additionalProperties: true
          type: object
          title: Input Data
          description: Fields to merge into the target's input_data. Only the keys present here are updated; existing keys not included are left unchanged.
        only_if_not_started:
          type: boolean
          title: Only If Not Started
          description: When true (default), the edit is rejected with 409 if the target has already started executing — i.e. a call has been placed, or it has left the Pending/Scheduled staging states. A Scheduled target with no calls yet is still editable. Set false to edit regardless.
          default: true
      type: object
      required:
      - input_data
      title: UpdateTargetInputDataRequest
    CampaignTargetPatientResolution:
      type: string
      enum:
      - successful
      - unsuccessful
      title: CampaignTargetPatientResolution
    CampaignTargetStatus:
      type: string
      enum:
      - Pending
      - Scheduled
      - In Progress
      - Post-processing
      - Finished
      - To review
      - Failed
      - Waiting
      - SMS Scheduled
      title: CampaignTargetStatus
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CampaignTargetResponse:
      properties:
        id:
          type: string
          title: Id
        target_url:
          type: string
          title: Target Url
        organization_id:
          type: string
          title: Organization Id
        campaign_id:
          type: string
          title: Campaign Id
        created_at:
          type: string
          format: date-time
          title: Created At
        execution_minutes:
          anyOf:
          - type: integer
          - type: 'null'
          title: Execution Minutes
        input_data:
          additionalProperties: true
          type: object
          title: Input Data
        output_data:
          additionalProperties: true
          type: object
          title: Output Data
        status:
          $ref: '#/components/schemas/CampaignTargetStatus'
        resolution:
          anyOf:
          - $ref: '#/components/schemas/CampaignTargetPayorResolution'
          - $ref: '#/components/schemas/CampaignTargetPatientResolution'
          - type: 'null'
          title: Resolution
        category:
          anyOf:
          - $ref: '#/components/schemas/PayorCallCategory'
          - $ref: '#/components/schemas/PatientCallCategory'
          - $ref: '#/components/schemas/ProviderCallCategory'
          - $ref: '#/components/schemas/PatientIncomingCallCategory'
          - $ref: '#/components/schemas/PatientIncomingSchedulingCallCategory'
          - type: 'null'
          title: Category
        subcategory:
          anyOf:
          - $ref: '#/components/schemas/NotFoundSubCategory'
          - $ref: '#/components/schemas/TransferSubCategory'
          - $ref: '#/components/schemas/IVRLoopSubCategory'
          - $ref: '#/components/schemas/ServiceNotAvailableSubCategory'
          - $ref: '#/components/schemas/UnprocessableByPhoneSubCategory'
          - $ref: '#/components/schemas/InputDataIssueSubCategory'
          - $ref: '#/components/schemas/HumanOnlySubcategory'
          - $ref: '#/components/schemas/PayorCallCategory'
          - type: string
          - type: 'null'
          title: Subcategory
        call_log_ids:
          anyOf:
          - items:
              type: integer
            type: array
          - type: 'null'
          title: Call Log Ids
        last_call_date:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Call Date
        phone_number:
          anyOf:
          - type: string
          - type: 'null'
          title: Phone Number
        fax_links:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Fax Links
        payor_api_data:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Payor Api Data
        external_id:
          anyOf:
          - type: string
          - type: 'null'
          title: External Id
        updated_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Updated At
        retries:
          anyOf:
          - type: integer
          - type: 'null'
          title: Retries
        scheduled_time:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Scheduled Time
        categorization:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Categorization
        outcome:
          anyOf:
          - type: string
          - type: 'null'
          title: Outcome
        statistics:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Statistics
      type: object
      required:
      - id
      - target_url
      - organization_id
      - campaign_id
      - created_at
      - execution_minutes
      - input_data
      - output_data
      - status
      - resolution
      - category
      - subcategory
      - call_log_ids
      - last_call_date
      - phone_number
      - fax_links
      - payor_api_data
      - external_id
      title: CampaignTargetResponse
    ServiceNotAvailableSubCategory:
      type: string
      enum:
      - PHONE_NUMBER_NOT_AVAILABLE
      - CLOGGED_SERVICE
      - TECHNICAL_ISSUE
      - OTHER
      title: ServiceNotAvailableSubCategory