NexHealth Balances API

Guarantor and Insurance Balances resources

OpenAPI Specification

nexhealth-balances-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: NexHealth Adjustment Types Balances API
  description: v3.0.0 and v20240412 are two names for the same API version; the Nex-Api-Version header accepts either value. Welcome to the developer hub and documentation for NexHealth API. This section of guide describes the operations, response parameters, request parameters, and parameter constraints related to User API. The term Operations refer to functions or methods. The operations are included in requests and send to the web server. Each operation performs a different action or a query on database.
  termsOfService: https://www.nexhealth.com/terms-of-service
  contact:
    name: NexHealth
    email: info@nexhealth.com
  license:
    name: NexHealth License 1.0
    url: https://www.nexhealth.com/privacy
  version: v20240412
servers:
- url: https://nexhealth.info
security:
- Authorization: []
tags:
- name: Balances
  description: Guarantor and Insurance Balances resources
paths:
  /guarantor_balances:
    get:
      summary: View guarantor balances
      description: This endpoint returns the guarantor balances for the specified location. At least one of the guarantor_id or updated_since filters must be provided
      parameters:
      - in: header
        name: Nex-Api-Version
        description: The NexHealth API version
        required: true
        schema:
          type: string
          default: v3.0.0
      - in: query
        name: subdomain
        description: Used to scope the request to the specified institution
        required: true
        schema:
          type: string
      - in: query
        name: location_id
        description: Used to scope the request to the specified location
        required: true
        schema:
          type: integer
          format: int32
      - in: query
        name: sort
        description: "Optional comma-separated string of fields to sort on.\nInclude a leading dash for descending order.\n\nAvailable fields:\n  * updated_at\n  * -updated_at\n"
        required: false
        schema:
          type: string
      - in: query
        name: guarantor_id
        description: Filter by the id of the associated guarantor
        required: false
        example: 115
        schema:
          type: integer
          format: int32
      - in: query
        name: updated_since
        description: Guarantor balances updated after the specified time (UTC)
        required: false
        example: '2024-04-12T10:30:00Z'
        schema:
          type: string
          format: date-time
      - in: query
        name: show_zero_balances
        description: Show guarantor balances with zero total balance
        required: false
        example: false
        schema:
          type: boolean
          default: false
      - in: query
        name: start_cursor
        description: First item of the current page. Starts empty
        required: false
        schema:
          type: string
      - in: query
        name: end_cursor
        description: Last item of the current page. Starts empty
        required: false
        schema:
          type: string
      - in: query
        name: per_page
        description: Number of results to return per page. Maximum allowed amount is 1000.
        required: false
        schema:
          type: integer
          format: int32
          default: 5
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_V20240412_Entities_Ledger_GuarantorBalance_Collection_Response_WithCursor'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_BadRequest'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_Forbidden'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_InternalServerError'
      tags:
      - Balances
      operationId: getGuarantorBalances
  /guarantor_balances/{id}:
    get:
      summary: View guarantor balance
      description: This endpoint returns a single guarantor balance
      parameters:
      - in: header
        name: Nex-Api-Version
        description: The NexHealth API version
        required: true
        schema:
          type: string
          default: v3.0.0
      - in: path
        name: id
        required: true
        schema:
          type: integer
          format: int64
      - in: query
        name: include[]
        description: Resources to be included in the response
        required: false
        explode: true
        schema:
          type: array
          items:
            type: string
            enum:
            - guarantor
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_V20240412_Entities_Ledger_GuarantorBalanceDetailed_Response'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_BadRequest'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_NotFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_InternalServerError'
      tags:
      - Balances
      operationId: getGuarantorBalancesId
  /insurance_balances:
    get:
      summary: View insurance balances
      description: 'This endpoint returns a list of insurance balances for a location: the amounts insurance is expected to pay, broken into aging buckets. You can filter by patient_id, guarantor_id or updated_since, and must provide at least one of these filters. location_id is always required, but does not satisfy the at-least-one-filter requirement on its own.'
      parameters:
      - in: header
        name: Nex-Api-Version
        description: The NexHealth API version
        required: true
        schema:
          type: string
          default: v3.0.0
      - in: query
        name: subdomain
        description: Used to scope the request to the specified institution
        required: true
        schema:
          type: string
      - in: query
        name: location_id
        description: Used to scope the request to the specified location
        required: true
        schema:
          type: integer
          format: int32
      - in: query
        name: sort
        description: "Optional comma-separated string of fields to sort on.\nInclude a leading dash for descending order.\n\nAvailable fields:\n  * updated_at\n  * -updated_at\n"
        required: false
        schema:
          type: string
      - in: query
        name: patient_id
        description: Filter for balances of a specific patient
        required: false
        example: 162
        schema:
          type: integer
          format: int32
      - in: query
        name: guarantor_id
        description: Filter for balances of a specific guarantor
        required: false
        example: 1001
        schema:
          type: integer
          format: int32
      - in: query
        name: updated_since
        description: Insurance balances updated at or after the specified time (UTC). The comparison is inclusive, so a record whose updated_at exactly equals the given value is returned
        required: false
        example: '2024-04-12T10:30:00Z'
        schema:
          type: string
          format: date-time
      - in: query
        name: start_cursor
        description: First item of the current page. Starts empty
        required: false
        schema:
          type: string
      - in: query
        name: end_cursor
        description: Last item of the current page. Starts empty
        required: false
        schema:
          type: string
      - in: query
        name: per_page
        description: Number of results to return per page. Maximum allowed amount is 1000.
        required: false
        schema:
          type: integer
          format: int32
          default: 5
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_V20240412_Entities_Ledger_InsuranceBalance_Collection_Response_WithCursor'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_BadRequest'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_Forbidden'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_InternalServerError'
      tags:
      - Balances
      operationId: getInsuranceBalances
  /insurance_balances/{id}:
    get:
      summary: View insurance balance
      description: This endpoint returns a single insurance balance by its NexHealth id. Responds with a 404 when no insurance balance with this id exists or when it belongs to a location your token cannot access.
      parameters:
      - in: header
        name: Nex-Api-Version
        description: The NexHealth API version
        required: true
        schema:
          type: string
          default: v3.0.0
      - in: path
        name: id
        description: The ID of the insurance balance
        required: true
        schema:
          type: integer
          format: int64
      - in: query
        name: subdomain
        description: Used to scope the request to the specified institution
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_V20240412_Entities_Ledger_InsuranceBalance_Response'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_BadRequest'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_NotFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_InternalServerError'
      tags:
      - Balances
      operationId: getInsuranceBalancesId
components:
  schemas:
    API_Errors_InternalServerError:
      type: object
      properties:
        code:
          type: boolean
          description: Indicates the success or failure of the request.
        description:
          type: string
          description: Additional context about the request to help with debugging.
        data:
          type: object
        error:
          type: array
          items:
            type: string
          description: Any errors that occured during the execution of the request.
      description: API_Errors_InternalServerError model
    API_Errors_Forbidden:
      type: object
      properties:
        code:
          type: boolean
          description: Indicates the success or failure of the request.
        description:
          type: string
          description: Additional context about the request to help with debugging.
        data:
          type: object
        error:
          type: array
          items:
            type: string
          description: Any errors that occured during the execution of the request.
      description: API_Errors_Forbidden model
    API_V20240412_Entities_Ledger_GuarantorBalance:
      type: object
      properties:
        id:
          type: integer
          format: int64
          example: 113
          description: Resource id
        foreign_id:
          type: string
          example: '1'
          description: EHR id
        guarantor_id:
          type: integer
          format: int32
          example: 115
          description: The ID of the person responsible for paying this balance
          nullable: true
        location_id:
          type: integer
          format: int32
          example: 115
          description: Guarantor accounts receivable location ID
          nullable: true
        updated_at:
          type: string
          format: date-time
          example: '2020-06-05T20:16:57.007Z'
          description: Guarantor Balance update date in UTC
        write_off_estimate:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        total_balance:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        insurance_estimate:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        guarantor_portion:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        total_balance_under_30:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        total_balance_31_60:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        total_balance_61_90:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        total_balance_over_90:
          $ref: '#/components/schemas/API_V2_Entities_Price'
    API_Errors_Unauthorized:
      type: object
      properties:
        code:
          type: boolean
          description: Indicates the success or failure of the request.
        description:
          type: string
          description: Additional context about the request to help with debugging.
        data:
          type: object
        error:
          type: array
          items:
            type: string
          description: Any errors that occured during the execution of the request.
      description: API_Errors_Unauthorized model
    API_V20240412_Entities_Ledger_GuarantorBalance_Collection_Response_WithCursor:
      type: object
      properties:
        code:
          type: boolean
          example: false
          description: Indicates the success or failure of the request
        description:
          type: string
          example: Description
          description: Additional context on the request to help with debugging.
        error:
          type: array
          items:
            type: string
          example:
          - Error message
          description: Any errors that occur during the execution of the request.
        data:
          type: array
          items:
            $ref: '#/components/schemas/API_V20240412_Entities_Ledger_GuarantorBalance'
        page_info:
          type: object
          example:
            has_previous_page: false
            has_next_page: false
            start_cursor: AAAAA
            end_cursor: BBBBBB
          description: Pagination information that can be used for fetching previous and next pages.
      description: API_V20240412_Entities_Ledger_GuarantorBalance_Collection_Response_WithCursor model
    API_Errors_BadRequest:
      type: object
      properties:
        code:
          type: boolean
          description: Indicates the success or failure of the request.
        description:
          type: string
          description: Additional context about the request to help with debugging.
        data:
          type: object
        error:
          type: array
          items:
            type: string
          description: Any errors that occured during the execution of the request.
      description: API_Errors_BadRequest model
    API_V20240412_Entities_Ledger_InsuranceBalance_Collection_Response_WithCursor:
      type: object
      properties:
        code:
          type: boolean
          example: false
          description: Indicates the success or failure of the request
        description:
          type: string
          example: Description
          description: Additional context on the request to help with debugging.
        error:
          type: array
          items:
            type: string
          example:
          - Error message
          description: Any errors that occur during the execution of the request.
        data:
          type: array
          items:
            $ref: '#/components/schemas/API_V20240412_Entities_Ledger_InsuranceBalance'
        page_info:
          type: object
          example:
            has_previous_page: false
            has_next_page: false
            start_cursor: AAAAA
            end_cursor: BBBBBB
          description: Pagination information that can be used for fetching previous and next pages.
      description: API_V20240412_Entities_Ledger_InsuranceBalance_Collection_Response_WithCursor model
    API_V20240412_Entities_Ledger_GuarantorBalanceDetailed:
      type: object
      properties:
        id:
          type: integer
          format: int64
          example: 113
          description: Resource id
        foreign_id:
          type: string
          example: '1'
          description: EHR id
        guarantor_id:
          type: integer
          format: int32
          example: 115
          description: The ID of the person responsible for paying this balance
          nullable: true
        location_id:
          type: integer
          format: int32
          example: 115
          description: Guarantor accounts receivable location ID
          nullable: true
        updated_at:
          type: string
          format: date-time
          example: '2020-06-05T20:16:57.007Z'
          description: Guarantor Balance update date in UTC
        write_off_estimate:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        total_balance:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        insurance_estimate:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        guarantor_portion:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        total_balance_under_30:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        total_balance_31_60:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        total_balance_61_90:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        total_balance_over_90:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        guarantor:
          $ref: '#/components/schemas/API_V20240412_Entities_PatientBasic'
    API_V20240412_Entities_Ledger_GuarantorBalanceDetailed_Response:
      type: object
      properties:
        code:
          type: boolean
          example: false
          description: Indicates the success or failure of the request
        description:
          type: string
          example: Description
          description: Additional context on the request to help with debugging.
        error:
          type: array
          items:
            type: string
          example:
          - Error message
          description: Any errors that occur during the execution of the request.
        data:
          $ref: '#/components/schemas/API_V20240412_Entities_Ledger_GuarantorBalanceDetailed'
        count:
          type: integer
          format: int32
          example: 2
          description: Number of total objects, in case of collection.
      description: API_V20240412_Entities_Ledger_GuarantorBalanceDetailed_Response model
    API_V2_Entities_Price:
      type: object
      properties:
        amount:
          type: string
          example: '62.00'
          description: The currency value, in whole units (e.g. dollars)
        currency:
          type: string
          example: USD
          description: The ISO currency code
    API_Errors_NotFound:
      type: object
      properties:
        code:
          type: boolean
          description: Indicates the success or failure of the request.
        description:
          type: string
          description: Additional context about the request to help with debugging.
        data:
          type: object
        error:
          type: array
          items:
            type: string
          description: Any errors that occured during the execution of the request.
      description: API_Errors_NotFound model
    API_V20240412_Entities_Ledger_InsuranceBalance_Response:
      type: object
      properties:
        code:
          type: boolean
          example: false
          description: Indicates the success or failure of the request
        description:
          type: string
          example: Description
          description: Additional context on the request to help with debugging.
        error:
          type: array
          items:
            type: string
          example:
          - Error message
          description: Any errors that occur during the execution of the request.
        data:
          $ref: '#/components/schemas/API_V20240412_Entities_Ledger_InsuranceBalance'
        count:
          type: integer
          format: int32
          example: 2
          description: Number of total objects, in case of collection.
      description: API_V20240412_Entities_Ledger_InsuranceBalance_Response model
    API_V20240412_Entities_Ledger_InsuranceBalance:
      type: object
      properties:
        id:
          type: integer
          format: int64
          example: 113
          description: Insurance balance id
        patient_id:
          type: integer
          format: int32
          example: 115
          description: The ID of the patient this balance is assigned to
          nullable: true
        guarantor_id:
          type: integer
          format: int32
          example: 116
          description: The ID of the person responsible for paying this balance
          nullable: true
        location_id:
          type: integer
          format: int32
          example: 21
          description: The ID of the location this balance belongs to
          nullable: true
        updated_at:
          type: string
          format: date-time
          example: '2020-06-05T20:16:57.007Z'
          description: Insurance Balance update date in UTC
        estimated_amount_under_30:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        estimated_amount_31_60:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        estimated_amount_61_90:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        estimated_amount_over_90:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        billed_amount_under_30:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        billed_amount_31_60:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        billed_amount_61_90:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        billed_amount_over_90:
          $ref: '#/components/schemas/API_V2_Entities_Price'
    API_V20240412_Entities_PatientBasic:
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 415
          description: User id
        email:
          type: string
          example: Amy.Ramos@nexhealth.com
          description: User email
          nullable: true
        first_name:
          type: string
          example: John
          description: First name
        middle_name:
          type: string
          example: Anthony
          description: Middle name
          nullable: true
        last_name:
          type: string
          example: Smith
          description: Last name
        name:
          type: string
          example: John Smith
          description: Full name
        created_at:
          type: string
          format: date-time
          example: '2020-06-05T20:16:57.007Z'
          description: User creation date in UTC
        updated_at:
          type: string
          format: date-time
          example: '2020-06-05T20:16:57.007Z'
          description: User last updation date in UTC
        institution_id:
          type: integer
          format: int32
          example: 105
          description: The institution this user belongs to
        foreign_id:
          type: string
          example: '100437'
          description: Foreign Id is a unique identifier from the integrated system
          nullable: true
        foreign_id_type:
          type: string
          example: --DataSource-
          description: Foreign Id type is a unique string identifier for the integrated system
        bio:
          type: object
          example:
            city: New York
            state: NY
            gender: Female
            zip_code: '20814'
            new_patient: false
            non_patient: true
            phone_number: '5163042196'
            date_of_birth: '1964-05-03'
            address_line_1: ''
            address_line_2: ''
            street_address: ''
            cell_phone_number: ''
            home_phone_number: ''
            work_phone_number: ''
          description: Patient biographical data, fields shown in our example response represent all possible data we retrieve but depending on system and what is actually saved in the health records system you cannot assume any field will consistently be returned
        inactive:
          type: boolean
          example: false
          description: Is the user inactivated?
        last_sync_time:
          type: string
          format: date-time
          example: '2024-04-12T10:30:00Z'
          description: The most recent time the resource's data changed meaningfully at the source
          nullable: true
        guarantor_id:
          type: integer
          format: int32
          example: 472
          description: User id of this patient's responsible party
          nullable: true
        billing_type:
          type: string
          example: Standard Billing - finance charges
          description: Used by practices in some integrated systems to categorize and filter patients when creating reports, requesting payments, and performing other related office tasks. Some integrated systems call this an account type rather than a billing type
          nullable: true
        chart_id:
          type: string
          example: '017407'
          description: User-facing ID for referencing patient data, used in some integrated systems. Depending on the system, the chart ID supplements or replaces the foreign_id as the ID visible to EHR users
          nullable: true
        preferred_language:
          type: string
          example: es
          description: Patient's preferred language as an ISO 639-1 code, if specified in the integrated system
          nullable: true
        provider_id:
          type: integer
          format: int32
          example: 23
          description: User id of this patient's primary provider
          nullable: true
  securitySchemes:
    Authorization:
      type: apiKey
      name: Authorization
      in: header