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

# Get Payor Inference

The request is complete once status is in the `COMPLETED` or `FAILED` state. We will return a `COMPLETED` status
even in the case when are unable to determine patient/payor information. A `FAILED` status indicates an
issue on Silna's end and in this case, we recommend contacting us or retrying the request.

When the request is complete, the response will include the `inference_result` field. This returns an
array of individuals found on the input document as well as the plans that each individual has. In the case when
you submit a document with multiple individuals, say an Aetna insurance card with each family member listed, we will
return each individual with their plan information as shown below.

```json theme={null}
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "COMPLETED",
  "inference_result": {
    "individuals": [
      {
        "first_name": "John",
        "last_name": "Doe",
        "plans": [
          {
            "member_number": "12345678",
            "group_number": "98765",
            "payor_entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "plan_order_number": 1,
            "name": "AETNA",
            "insurance_type": "COMMERCIAL"
          }
        ]
      },
      {
        "first_name": "Jane",
        "last_name": "Doe",
        "plans": [
          {
            "member_number": "12345678",
            "group_number": "98765",
            "payor_entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "plan_order_number": 1,
            "name": "AETNA",
            "insurance_type": "COMMERCIAL"
          }
        ]
      }
    ]
  }
}
```


## OpenAPI

````yaml get /public/v1/payor_inference/{payor_inference_id}
openapi: 3.0.2
info:
  title: Silna Public API
  version: '1.0'
servers:
  - url: https://app.silnahealth.com/api
security:
  - bearerAuth: []
paths:
  /public/v1/payor_inference/{payor_inference_id}:
    get:
      tags:
        - V1PayorInferenceResource
      summary: Get Payor Inference
      operationId: V1PayorInferenceResource.get
      parameters:
        - in: path
          name: payor_inference_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1PayorInferenceResponseSchema'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                description: The maximum number of requests allowed in the time window
            X-RateLimit-Remaining:
              schema:
                type: integer
                description: The number of requests remaining in the current time window
            X-RateLimit-Reset:
              schema:
                type: integer
                description: The time when the rate limit will reset, in Unix timestamp
            Retry-After:
              schema:
                type: number
                description: The number of seconds to wait before making another request
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                description: The maximum number of requests allowed in the time window
            X-RateLimit-Remaining:
              schema:
                type: integer
                description: The number of requests remaining in the current time window
            X-RateLimit-Reset:
              schema:
                type: integer
                description: The time when the rate limit will reset, in Unix timestamp
            Retry-After:
              schema:
                type: number
                description: The number of seconds to wait before making another request
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectNotFoundError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                description: The maximum number of requests allowed in the time window
            X-RateLimit-Remaining:
              schema:
                type: integer
                description: The number of requests remaining in the current time window
            X-RateLimit-Reset:
              schema:
                type: integer
                description: The time when the rate limit will reset, in Unix timestamp
            Retry-After:
              schema:
                type: number
                description: The number of seconds to wait before making another request
        '429':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                description: The maximum number of requests allowed in the time window
            X-RateLimit-Remaining:
              schema:
                type: integer
                description: The number of requests remaining in the current time window
            X-RateLimit-Reset:
              schema:
                type: integer
                description: The time when the rate limit will reset, in Unix timestamp
            Retry-After:
              schema:
                type: number
                description: The number of seconds to wait before making another request
components:
  schemas:
    V1PayorInferenceResponseSchema:
      properties:
        id:
          format: uuid
          title: Id
          type: string
        status:
          $ref: '#/components/schemas/PayorInferenceStatus'
        inference_result:
          $ref: '#/components/schemas/V1PayorInferenceResultSchema'
          default: null
          nullable: true
      required:
        - id
        - status
      title: V1PayorInferenceResponseSchema
      type: object
      x-folder: public_api
    AuthenticationError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: Human readable error message
        type:
          $ref: '#/components/schemas/PublicApiErrorType'
      x-folder: null
    ObjectNotFoundError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: Human readable error message
      x-folder: null
    TooManyRequestsError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: Human readable error message
      x-folder: null
    PayorInferenceStatus:
      type: string
      enum:
        - COMPLETED
        - FAILED
        - PROCESSING
      x-folder: payor_inference
    V1PayorInferenceResultSchema:
      properties:
        individuals:
          items:
            $ref: '#/components/schemas/V1PayorInferenceIndividualSchema'
          title: Individuals
          type: array
      title: V1PayorInferenceResultSchema
      type: object
      x-folder: public_api
    PublicApiErrorType:
      type: string
      enum:
        - AUTH_INVALID_REQUEST_HEADER
        - AUTH_INVALID_CREDENTIALS
      x-folder: null
    V1PayorInferenceIndividualSchema:
      properties:
        first_name:
          default: null
          description: Patient's first name
          title: First Name
          nullable: true
          type: string
        last_name:
          default: null
          description: Patient's alst name
          title: Last Name
          nullable: true
          type: string
        date_of_birth:
          default: null
          description: Patient's date of birth
          title: Date Of Birth
          nullable: true
          format: date
          type: string
        patient_source_id:
          default: null
          description: Patient's EHR ID (or other unique identifier)
          title: Patient Source Id
          nullable: true
          type: string
        plans:
          items:
            $ref: '#/components/schemas/V1PayorInferencePlanSchema'
          title: Plans
          type: array
      title: V1PayorInferenceIndividualSchema
      type: object
      x-folder: public_api
    V1PayorInferencePlanSchema:
      properties:
        member_number:
          default: null
          title: Member Number
          nullable: true
          type: string
        group_number:
          default: null
          title: Group Number
          nullable: true
          type: string
        payor_entity_id:
          default: null
          title: Payor Entity Id
          nullable: true
          format: uuid
          type: string
        proof_of_insurance_file_id:
          default: null
          title: Proof Of Insurance File Id
          nullable: true
          format: uuid
          type: string
        plan_order_number:
          description: The order number of the plan (1 for primary, 2 for secondary, etc)
          title: Plan Order Number
          type: integer
        name:
          default: null
          description: The name of the plan
          title: Name
          nullable: true
          type: string
        insurance_type:
          $ref: '#/components/schemas/InsuranceType'
          default: null
          description: The type of insurance
          nullable: true
      required:
        - plan_order_number
      title: V1PayorInferencePlanSchema
      type: object
      x-folder: public_api
    InsuranceType:
      type: string
      enum:
        - COMMERCIAL
        - MEDICARE
        - MEDICAID
        - REGIONAL_CENTER
        - WORKERS_COMPENSATION
        - AUTO_INSURANCE
      x-folder: patient
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````