openapi: 3.0.1
info:
  title: Retail Individual Product API's
  description: Retail API's are used to create or update enrollments made by third party administrators for Dental PPO plans. This will be called by any partners who were onboarded prior to consuming of this API
  contact:
    name: Retail API Support
  version: v1
servers:
  - url: '/retail/tpa'
    description: UAT test server
  - url: '/retail/tpa'
    description: Production server
tags:
- name: Enroll new customer
  description: Create new enrollment for customer and dependents
- name: Update customer/dependent information
  description: Update customer/dependent profile information like email, addresss or last name
- name: Add dependents
  description: Add dependents to an existing primary insured customer and associated policy
- name: Delete dependents
  description: Delete dependents from an existing primary insured customer and associated policy
- name: Cancel policy
  description: Cancel an existing policy
- name: Enrollment Reconciliation API
  description: Search for enrollments
paths:
  /v1/customer/policy:
    post:
      tags:
      - Enroll new customer
      summary: Create customer enrollment
      description: 'Provides approved partners the ability to call and send new Dental enrollments to the Guardian Retail administrative system. This will include necessary subscriber/member & dependent information, plan selection, etc.'
      parameters: 
        - name: x-correlation-id
          in: header
          description:  Unique id passed by the client to trace the request. Different for each and every request
          required: true
          schema:
            $ref: '#/components/schemas/CorrelationId'
        - name: x-partner-id
          in: header
          description: Unique id assigned as part of the partner onboarding process
          required: true
          schema:
            $ref: '#/components/schemas/PartnerId'
        - name: x-source
          in: header
          description: Source name assigned as a part of the partner onboarding process
          required: true
          schema:
            $ref: '#/components/schemas/Source'
        - name: nonce
          in: query
          description: Unique identifier provided by the client app each time they authorize and request for a new JWT bearer token. This is the same nonce that is used while requesting for JWT bearer token.
          required: true
          schema:
            $ref: '#/components/schemas/Nonce'
      requestBody:
        description: Enroll customer request body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnrollNewCustomerRequest'
      responses:
        '202':
            description: Request received and is queued up for processing
            content:
              application/json:
                schema:
                  $ref : '#/components/schemas/AsyncResponse'
        '400':
          description: Error happened while parsing the request
        '422':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422ErrorResponse'
        '500':
          description: Internal server error happened while processing the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500ErrorResponse'
        
  '/v1/customer/{primary-customer-number}/policy/{policy-number}':
    put:
      tags:
        - Update customer/dependent information
      summary: 'Allows approved partners to send policy cancelation information for existing Dental policies. This information will update the corresponding policy in the Guardian Retail Admin System (this will cancel primary subscriber & all participants. If you want to cancel only a dependent, please use Terminate Dependent API)'
      parameters:
        - name: x-correlation-id
          in: header
          description: Unique correlation id for each request
          required: true
          schema:
            $ref: '#/components/schemas/CorrelationId'
        - name: x-partner-id
          in: header
          description: Unique id assigned as part of the partner onboarding process
          required: true
          schema:
            $ref: '#/components/schemas/PartnerId'
        - name: x-source
          in: header
          description: Source name assigned as a part of the partner onboarding process
          required: true
          schema:
            $ref: '#/components/schemas/Source'
        - name: nonce
          in: query
          description: Unique identifier provided by the client app each time they authorize and request for a new JWT bearer token. This is the same nonce that is used while requesting for JWT bearer token.
          required: true
          schema:
            $ref: '#/components/schemas/Nonce'
        - name: primary-customer-number
          in: path
          description: The primary customer number
          required: true
          schema:
            $ref: '#/components/schemas/CustomerNumber'
        - name: policy-number
          in: path
          description: The policy number for which the updates should be made to
          required: true
          style: simple
          explode: false
          schema:
            $ref: '#/components/schemas/PolicyNumber'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomerRequest'
        description: Update customer request
      responses:
        '202':
            description: Request received and is queued up for processing
            content:
              application/json:
                schema:
                  $ref : '#/components/schemas/AsyncResponse'
        '404':
          description: Primary customer or associated policy not found
        '422':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422ErrorResponse'
        '500':
          description: Internal server error happened while processing the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500ErrorResponse'
  /v1/customer/{primary-customer-number}/policy/{policy-number}/cancellation:
    post:
      tags:
        - Cancel policy
      summary: Cancel an existing customer policy
      description: 'The Retail Delete Dependent API allows approved partners the ability to delete dependents (spouse, children, etc.) from existing Dental policies. This information will update the corresponding policy in the Guardian Retail Admin system.'
      parameters:
        - name: x-correlation-id
          in: header
          description: Unique correlation id for each request
          required: true
          schema:
            $ref: '#/components/schemas/CorrelationId'
        - name: x-partner-id
          in: header
          description: Unique id assigned as part of the partner onboarding process
          required: true
          schema:
            $ref: '#/components/schemas/PartnerId'
        - name: x-source
          in: header
          description: Source name assigned as a part of the partner onboarding process
          required: true
          schema:
            $ref: '#/components/schemas/Source'
        - name: nonce
          in: query
          description: Unique identifier provided by the client app each time they authorize and request for a new JWT bearer token. This is the same nonce that is used while requesting for JWT bearer token
          required: true
          schema:
            $ref: '#/components/schemas/Nonce'
        - name: primary-customer-number
          in: path
          description: primary insured customer number the policy
          required: true
          schema:
            $ref: '#/components/schemas/CustomerNumber'
        - name: policy-number
          in: path
          description: The policy number for which the dependent has to be deleted from
          required: true
          schema:
            $ref: '#/components/schemas/PolicyNumber'
      requestBody:
        description: Cancel policy request body
        content:
          application/json:
            schema:
               $ref: '#/components/schemas/CancelPolicyRequest'
      responses:
        '202':
            description: Request received and is queued up for processing
            content:
              application/json:
                schema:
                  $ref : '#/components/schemas/AsyncResponse'
        '400':
          description: Error happened while parsing the request
        '422':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422ErrorResponse'
        '500':
          description: Internal server error happened while processing the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500ErrorResponse'
        default:
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/customer/{primary-customer-number}/policy/{policy-number}/reinstatement:
    post:
      tags:
        - Reinstate policy
      summary: Reinstate a cancelled customer policy
      description: 'The Retail Reinstatement API allows approved partners to send Dental policy reinstatement requests meeting specific parameters. This information will update the corresponding policy in Guardian Retail Admin System.  '
      parameters:
        - name: x-correlation-id
          in: header
          description: Unique correlation id for each request
          required: true
          schema:
            $ref: '#/components/schemas/CorrelationId'
        - name: x-partner-id
          in: header
          description: Unique id assigned as part of the partner onboarding process
          required: true
          schema:
            $ref: '#/components/schemas/PartnerId'
        - name: x-source
          in: header
          description: Source name assigned as a part of the partner onboarding process
          required: true
          schema:
            $ref: '#/components/schemas/Source'
        - name: nonce
          in: query
          description: Unique identifier provided by the client app each time they authorize and request for a new JWT bearer token. This is the same nonce that is used while requesting for JWT bearer token.
          required: true
          schema:
            $ref: '#/components/schemas/Nonce'
        - name: primary-customer-number
          in: path
          description: primary insured customer number the policy
          required: true
          schema:
            $ref: '#/components/schemas/CustomerNumber'
        - name: policy-number
          in: path
          description: The policy number for which the dependent has to be deleted from
          required: true
          schema:
            $ref: '#/components/schemas/PolicyNumber'
      requestBody:
        description: Reinstate policy request body
        content:
          application/json:
            schema:
               $ref: '#/components/schemas/ReinstatePolicyRequest'
      responses:
        '202':
            description: Request received and is queued up for processing
            content:
              application/json:
                schema:
                  $ref : '#/components/schemas/AsyncResponse'
        '400':
          description: Error happened while parsing the request
        '422':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422ErrorResponse'
        '500':
          description: Internal server error happened while processing the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500ErrorResponse'
        default:
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'                
  '/v1/customer/{primary-customer-number}/policy/{policy-number}/dependent/':
    post:
      tags:
        - Add dependents
      summary: Add dependent to an existing policy
      description: 'Allows approved partners the ability to add dependents (spouse, children, newborn, adoption etc.)  to the existing Dental policies. This information will update the corresponding policy in the Guardian Retail Admin system.'
      parameters:
        - name: x-correlation-id
          in: header
          description: Unique correlation id for each request
          required: true
          schema:
            $ref: '#/components/schemas/CorrelationId'
        - name: x-partner-id
          in: header
          description: Unique id assigned as part of the partner onboarding process
          required: true
          schema:
            $ref: '#/components/schemas/PartnerId'
        - name: x-source
          in: header
          description: Source name assigned as a part of the partner onboarding process
          required: true
          schema:
            $ref: '#/components/schemas/Source'
        - name: nonce
          in: query
          description: Unique identifier provided by the client app each time they authorize and request for a new JWT bearer token. This is the same nonce that is used while requesting for JWT bearer token.
          required: true
          schema:
            $ref: '#/components/schemas/Nonce'
        - name: primary-customer-number
          in: path
          description: primary insured customer number
          required: true
          style: simple
          explode: false
          schema:
            $ref: '#/components/schemas/CustomerNumber'
        - name: policy-number
          in: path
          description: The policy number for which the dependent should be added to
          required: true
          style: simple
          explode: false
          schema:
            $ref: '#/components/schemas/PolicyNumber'
      requestBody:
        description: Add dependent request body
        content:
          application/json:
            schema:
             $ref: '#/components/schemas/AddDependentRequest'
      responses:
        '202':
            description: Request received and is queued up for processing
            content:
              application/json:
                schema:
                  $ref : '#/components/schemas/AsyncResponse'
        '400':
          description: Error happened while parsing the request
        '404':
          description: Primary customer or associated policy not found
        '422':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422ErrorResponse'
        '500':
          description: Internal server error happened while processing the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500ErrorResponse'
      
  '/v1/customer/{primary-customer-number}/policy/{policy-number}/dependent/{dependent-customer-number}/deletion':
    post:
      tags:
        - Delete dependents
      summary: Delete a dependent from an existing policy.
      description: 'Allows approved partners the ability to delete dependents (spouse, children, etc.) from existing Dental policies. This information will update the corresponding policy in the Guardian Retail Admin system'
      parameters:
        - name: x-correlation-id
          in: header
          description: Unique correlation id for each request
          required: true
          schema:
            $ref: '#/components/schemas/CorrelationId'
        - name: x-partner-id
          in: header
          description: Unique identifier provided by the client app each time they authorize and request for a new JWT bearer token. This is the same nonce that is used while requesting for JWT bearer token.
          required: true
          schema:
            $ref: '#/components/schemas/PartnerId'
        - name: x-source
          in: header
          description: Source name assigned as a part of the partner onboarding process
          required: true
          schema:
            $ref: '#/components/schemas/Source'
        - name: nonce
          in: query
          description: Random value which is same as the value thats passed when getting the JWT token
          required: true
          schema:
            $ref: '#/components/schemas/Nonce'
        - name: primary-customer-number
          in: path
          description: primary insured customer number the policy
          required: true
          style: simple
          explode: false
          schema:
            $ref: '#/components/schemas/CustomerNumber'
        - name: policy-number
          in: path
          description: The policy number for which the dependent has to be deleted from
          required: true
          style: simple
          explode: false
          schema:
            $ref: '#/components/schemas/PolicyNumber'
        - name: dependent-customer-number
          in: path
          description: dependent customer number who is going to be deleted from the policy
          required: true
          style: simple
          explode: false
          schema:
            $ref: '#/components/schemas/CustomerNumber'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteDependentRequest'
      responses:
        '202':
            description: Request received and is queued up for processing
            content:
              application/json:
                schema:
                  $ref : '#/components/schemas/AsyncResponse'
        '400':
          description: Error happened while parsing the request
        '404':
          description: Primary customer or associated policy not found
        '422':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422ErrorResponse'
        '500':
          description: Internal server error happened while processing the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500ErrorResponse'
  '/v1/customer/{primary-customer-number}/policy/{policy-number}/payment/apply':
    post:
      tags:
        - Apply Payment
      summary: Apply payment for an existing policy.
      description: 'Allows approved partners to send Dental Policy premium payments and adjustment amounts. This information will update the corresponding policy in Guardian Retail Admin system'
      parameters:
        - name: x-correlation-id
          in: header
          description: Unique correlation id for each request
          required: true
          schema:
            $ref: '#/components/schemas/CorrelationId'
        - name: x-partner-id
          in: header
          description: Unique id assigned as part of the partner onboarding process
          required: true
          schema:
            $ref: '#/components/schemas/PartnerId'
        - name: x-source
          in: header
          description: Source name assigned as a part of the partner onboarding process
          required: true
          schema:
            $ref: '#/components/schemas/Source'
        - name: nonce
          in: query
          description: Unique identifier provided by the client app each time they authorize and request for a new JWT bearer token. This is the same nonce that is used while requesting for JWT bearer token.
          required: true
          schema:
            $ref: '#/components/schemas/Nonce'
        - name: primary-customer-number
          in: path
          description: primary insured customer number the policy
          required: true
          style: simple
          explode: false
          schema:
            $ref: '#/components/schemas/CustomerNumber'
        - name: policy-number
          in: path
          description: The policy number for which the dependent has to be deleted from
          required: true
          style: simple
          explode: false
          schema:
            $ref: '#/components/schemas/PolicyNumber'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplyPaymentRequest'
      responses:
        '202':
            description: Request received and is queued up for processing
            content:
              application/json:
                schema:
                  $ref : '#/components/schemas/AsyncResponse'
        '400':
          description: Error happened while parsing the request
        '422':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422ErrorResponse'
        '500':
          description: Internal server error happened while processing the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500ErrorResponse'
                
  '/v1/customer/{primary-customer-number}/policy/{policy-number}/payment/paid-to-date':
    put:
      tags:
        - Paid To Date
      summary: Policy is paid in full until date.
      description: 'Allows approved partners to send Dental Policy information stating the date a policy is paid through to. This information will update the corresponding policy in Guardian Retail Admin system and will ensure Claims are paid for services performed through the date a policy is paid for'
      parameters:
        - name: x-correlation-id
          in: header
          description: Unique correlation id for each request
          required: true
          schema:
            $ref: '#/components/schemas/CorrelationId'
        - name: x-partner-id
          in: header
          description: Unique id assigned as part of the partner onboarding process
          required: true
          schema:
            $ref: '#/components/schemas/PartnerId'
        - name: x-source
          in: header
          description: Source name assigned as a part of the partner onboarding process
          required: true
          schema:
            $ref: '#/components/schemas/Source'
        - name: nonce
          in: query
          description: Unique identifier provided by the client app each time they authorize and request for a new JWT bearer token. This is the same nonce that is used while requesting for JWT bearer token.
          required: true
          schema:
            $ref: '#/components/schemas/Nonce'
        - name: primary-customer-number
          in: path
          description: primary insured customer number the policy
          required: true
          style: simple
          explode: false
          schema:
            $ref: '#/components/schemas/CustomerNumber'
        - name: policy-number
          in: path
          description: The policy number for which the dependent has to be deleted from
          required: true
          style: simple
          explode: false
          schema:
            $ref: '#/components/schemas/PolicyNumber'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaidToDateRequest'
      responses:
        '202':
            description: Request received and is queued up for processing
            content:
              application/json:
                schema:
                  $ref : '#/components/schemas/AsyncResponse'
        '400':
          description: Error happened while parsing the request
        '404':
          description: Primary customer or associated policy not found
        '422':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422ErrorResponse'
        '500':
          description: Internal server error happened while processing the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500ErrorResponse'
  '/v1/customer/policies':
    post:
      tags:
        - Enrollment Reconciliation API
      summary: Search for enrollments
      description: 'Allows approved partners to check individual Dental policy status and confirm customer/policy information housed within the Guardian Retail Admin System'
      parameters:
        - name: x-correlation-id
          in: header
          description: Unique correlation id for each request
          required: true
          schema:
            $ref: '#/components/schemas/CorrelationId'
        - name: x-partner-id
          in: header
          description: Unique id assigned as part of the partner onboarding process
          required: true
          schema:
            $ref: '#/components/schemas/PartnerId'
        - name: x-source
          in: header
          description: Source name assigned as a part of the partner onboarding process
          required: true
          schema:
            $ref: '#/components/schemas/Source'
        - name: nonce
          in: query
          description: Unique identifier provided by the client app each time they authorize and request for a new JWT bearer token. This is the same nonce that is used while requesting for JWT bearer token.
          required: true
          schema:
            $ref: '#/components/schemas/Nonce'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchEnrollmentsRequest'
            examples:
              SearchByPolicyNumber:
                value:
                  searchType: policyNumber
                  policyNumber: J1234567 
              SearchByCustomerNumber:
                value:
                  searchType: customerNumber
                  customerNumber: J123456789
              SearchByStateWithDates:
                value:
                  searchType: state
                  state: NY
                  fromDate: 2023-03-15T17:32:28Z
                  toDate: 2023-04-15T17:32:28Z
              SearchByPlanCodeWithCoverageStartDate:
                value:
                  searchType: planCode
                  planCode: DIAMOND_ADV_PPO
                  coverageStartDate: 2023-04-01
              SearchByRenewalDate:
                value:
                  searchType: renewalDate
                  renewalDate: 2023-04-01
                  state: NY
                  planCode: DIAMOND_ADV_PPO
              SearchByDateRange:
                value:
                  searchType: dateRange
                  fromDate: 2023-04-15T17:32:28Z
                  toDate: 2023-04-15T17:32:28Z
              SearchByCoverageStartDate:
                value:
                  searchType: coverageStartDate
                  coverageStartDate: 2023-04-01
                  planCode: GOLD_ADV_PPO
      responses:
        '200':
            description: Enrollment search successfull
            content:
              application/json:
                schema:
                  $ref : '#/components/schemas/SearchEnrollmentsResponse'
        '400':
          description: Error happened while parsing the request
        '422':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422ErrorResponse'
        '500':
          description: Internal server error happened while processing the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500ErrorResponse'                
  "/v6/providers/plans/{plan-type}/search":
    "post":
      "tags":
        - "Find A Dentist"
      "summary": "Retrieving providers in given geo-graphical area(based on Zip and Distance)."
      "description": "Retrieving providers belongs to in-network and Rental networks in a given geo-graphical area."
      servers:
        - url: https://{environment}/  
          variables:
            environment:
              default: api.uat.guardianlife.com
              enum:
                - api.uat.guardianlife.com #UAT server
                - api.guardianlife.com #Production server
      "parameters":
        -
          "name": "plan-type"
          "in": "path"
          "description": "Plan type should be PPO. With a PPO plan, you can visit any dentist, but pay less when you choose a dentist in one of Guardians PPO networks."
          "required": true
          "style": "simple"
          "explode": false
          "schema":
            "type": "string"
          "example": "PPO"
      "requestBody":
        "description": "Users have to provide input to Zip,distance and client.Default values set for the input paramters such as limit =50 ,offset=0, accept_new_patient=\"ALL\""
        "content":
          "application/json":
            "schema":
              "required":
                - "client_name"
                - "provider_facility"
              "type": "object"
              "properties":
                "provider_name":
                  "type": "object"
                  "properties":
                    "first_name":
                      "type": "string"
                      "description": "First name of the PPO provider"
                      "example": "Brain"
                    "last_name":
                      "type": "string"
                      "description": "Last name of the PPO provider"
                      "example": "Bovino"
                    "middle_name":
                      "type": "string"
                      "description": "Middle name of the PPO provider"
                      "example": "J"
                    "full_name":
                      "type": "string"
                      "example": "Bovino,Brain J"
                    "patient_demographics":
                      "type": "string"
                      "description": "To get provider details who treat Adults and Children.  Possible values are AD and CD. If its AD means we will retrieve providers who treat adults. For CD we will retrieve Pediatric Dentists."
                      "example": "AD"
                "provider_facility":
                  "required":
                    - "distance"
                    - "zip_code"
                  "type": "object"
                  "properties":
                    "zip_code":
                      "type": "number"
                      "description": "The five digit zip code to find the provider location"
                      "example": 10001
                    "distance":
                      "type": "number"
                      "description": "Distance of the PPO provider location"
                      "example": 0.5
                    "accepting_credit_card":
                      "type": "string"
                      "description": "To check whether Facility is accepting Credit cards or not"
                      "example": "Y"
                    "handicap_accessible":
                      "type": "string"
                      "description": "To check whether facility is handicap accessible or not"
                      "example": "Y"
                    "early_hour":
                      "type": "string"
                      "description": "To check whether providers available at early hours (before 9 AM)"
                      "example": "Y"
                    "late_hour":
                      "type": "string"
                      "description": "To check whether providers available at late hours (after 5 pm)"
                      "example": "Y"
                    "weekend_hour":
                      "type": "string"
                      "description": "To check whether providers available during weekend (Saturday and Sunday)"
                      "example": "Y"
                "provider_identification":
                  "type": "array"
                  "items":
                    "type": "object"
                    "properties":
                      "provider_identification_text":
                        "type": "string"
                        "description": "Identification Number based on identification type."
                        "example": "1619984424"
                      "provider_identification_type_code":
                        "type": "string"
                        "description": "Code representing identification type Possible value- NPI"
                        "example": "NPI"
                "provider_specialities":
                  "type": "array"
                  "items":
                    "type": "string"
                    "description": "Provider Specialization ex Endodontist,General Dentist,Oral Surgeon,Orthodontist,Pediatric Dentist,Periodontist,Prosthodontist"
                    "example": "[\"General Dentist\",\"Periodontist\"]"
                "license_number":
                  "type": "string"
                  "description": "License number of the of the PPO provider"
                  "example": "61555"
                "language_names":
                  "type": "array"
                  "items":
                    "type": "string"
                    "description": "Search providers based on language(s) spoken."
                    "example": "[\"Spanish\",\"Korean\"]"
                "provider_practice_name":
                  "type": "string"
                  "description": "User has to provide minimum 3 characters of practice name"
                  "example": "DENTAL SPECIALTY ASSOC"
                "provider_gender_code":
                  "type": "string"
                  "description": "Provider gender specification"
                  "example": "M"
                "accept_new_patient":
                  "type": "string"
                  "description": "Whether office accepting new patients. Values can be either 'Y' or 'N'"
                  "example": "Y"
                "client_name":
                  "type": "string"
                  "description": "Refers to client name consuming the API. This value is mandatory"
                "sort_by_provider_name":
                  "type": "string"
                  "description": "Results will be sorted based on provider lastname, firstname"
                  "example": "Y"
                "sort_by":
                  "type": "string"
                  "description": "Provider lastname, firstname will be sorted ascending or descending order."
                  "example": "ASC/DESC"
                "print_result":
                  "type": "string"
                  "description": "If value is 'Y' response will have all the list of providers based on the input request, offset and limit values will be ignored. If value is 'N' response will be based on the offset and limit in the input request."
                  "example": "Y"
                "offset":
                  "type": "number"
                  "description": "To Skip number of providers"
                  "example": 1
                "limit":
                  "type": "number"
                  "description": "Number of  providers to be retrieved from given geographical area."
                  "example": 10
        "required": true
      "responses":
        "200":
          "description": "Ok"
          "content":
            "application/json":
              "schema":
                "type": "object"
                "properties":
                  "provider_details":
                    "type": "array"
                    "items":
                      "type": "object"
                      "properties":
                        "provider_name":
                          "type": "object"
                          "properties":
                            "first_name":
                              "type": "string"
                              "description": "First name of the PPO provider"
                              "example": "Brain"
                            "last_name":
                              "type": "string"
                              "description": "Last name of the PPO provider"
                              "example": "Bovino"
                            "middle_name":
                              "type": "string"
                              "description": "Middle name of the PPO provider"
                              "example": "J"
                            "prefix_code":
                              "type": "string"
                              "example": ""
                            "suffix_code":
                              "type": "string"
                              "description": "Provider name suffix of the PPO provider Ex : Jr,Sr,IV,VI"
                              "example": "IV"
                            "title_code":
                              "type": "string"
                              "description": "Provider''s degree of the PPO Ex: DDS,DMD etc"
                              "example": "DDS"
                            "full_name":
                              "type": "string"
                              "example": "Bovino,Brain J"
                            "patient_demographics":
                              "type": "string"
                              "description": "To get provider details who treat Adults and Children.  Possible values are AD and CD. If its AD means we will retrieve providers who treat adults. For CD we will retrieve Pediatric Dentists."
                              "example": "AD"
                        "provider_identification":
                          "type": "array"
                          "items":
                            "type": "object"
                            "properties":
                              "provider_identification_text":
                                "type": "string"
                                "description": "Identification Number based on identification type"
                                "example": "123456789"
                              "provider_identification_type_code":
                                "type": "string"
                                "description": "Code representing identification type Possible values- NPI,ppf_id,provider_id"
                                "example": "NPI"
                        "provider_gender_code":
                          "type": "string"
                          "description": "Providers gender specification"
                          "example": "M"
                        "provider_practice":
                          "type": "object"
                          "properties":
                            "practice_name":
                              "type": "string"
                              "description": "Provider practice name under which provider does practice."
                              "example": "CONCERNED DENTAL CARE PC"
                          "description": "Provider practice details."
                        "provider_work_phone":
                          "type": "string"
                        "provider_facilities":
                          "type": "array"
                          "items":
                            "type": "object"
                            "properties":
                              "facility_identification":
                                "type": "number"
                                "description": "Facility unique ID for each PPO location."
                                "example": 772775
                              "facility_address":
                                "type": "object"
                                "properties":
                                  "first_line_address":
                                    "type": "string"
                                    "description": "The first line of a formatted address - e.g., Street Number + Street Name, P.O. Box, etc."
                                    "example": "255 W 90th St"
                                  "second_line_address":
                                    "type": "string"
                                    "description": "The second line of a formatted address"
                                    "example": "Ste 12b"
                                  "third_line_address":
                                    "type": "string"
                                    "description": "The third line of a formatted address that is sometimes used for things like care of."
                                  "city_name":
                                    "type": "string"
                                    "description": "The city where the address is located."
                                    "example": "New York"
                                  "state_province_code":
                                    "type": "string"
                                    "description": "The state of the address1, address2 and city\""
                                    "example": "NY"
                                  "postal_code":
                                    "type": "string"
                                    "description": "The unique identifier used to associate postal deliveries. This may also be referred to as zip code or post code where the address is located."
                                    "example": "10024"
                                  "country_code":
                                    "type": "string"
                                    "description": "A short alphabetic, geographical code for a country used for data processing and communications."
                                    "enum":
                                      - "USA"
                                      - "CA"
                                      - "OTH"
                                      - "US"
                                      - "MX"
                                  "longitude":
                                    "type": "number"
                                    "description": "The angular distance of PPO provider location that indicates East or west of the prime meridian. We need to pull longitude value form google api based on given location Ex: -75.4059562,-118.3522193"
                                    "example": -118.4232921
                                  "latitude":
                                    "type": "number"
                                    "description": "The angular distance of PPO provider location that indicates North or South of the earth''s equator. We need to pull this value from google api based on given location. Ex : 40.5336721, 33.9605856"
                                    "example": 34.0573722
                                  "distance":
                                    "type": "number"
                                    "description": "Distance of the PPO provider location"
                                    "example": 10
                                  "accepting_credit_card":
                                    "type": "string"
                                    "description": "To check whether Facility is accepting Credit cards or not"
                                    "example": "Y"
                                  "handicap_accessible":
                                    "type": "string"
                                    "description": "To Check whether Facility is Handicap accessible or not."
                                    "example": "Y"
                        "provider_specialties":
                          "type": "array"
                          "items":
                            "type": "object"
                            "properties":
                              "specialty_type_code":
                                "type": "string"
                                "description": "Code representing speciality type"
                              "specialty_type_text":
                                "type": "string"
                                "description": "The provider's specialty is a value indicating what field of medicine a provider has additional education in to make him/her a specialist in a certain field."
                                "example": "Pediatric Dentist"
                        "language_names":
                          "type": "string"
                          "description": "one or more languages names separated by tild (~) symbol."
                          "example": "Farsi~Hebrew~Spanish"
                        "license_number":
                          "type": "string"
                          "description": "License number of the of the PPO provider"
                          "example": "61555"
                        "partner_network":
                          "type": "string"
                          "description": "If provider having only Rental network assignments, we will show them as Partner network. Possible values are 'Y' or 'N'."
                          "example": "Y"
                        "accept_new_patient":
                          "type": "string"
                          "description": "Whether office allowing for new patients. Values will be either 'Y' or 'N'"
                          "example": "Y"
                        "card_type":
                          "type": "string"
                          "description": "Card Type 'P' indicates provider and 'F' indicates facility card. Values will be either 'P' or 'F' Card Type 'F' means provider names will show blank value."
                          "example": "P"
                  "page":
                    "type": "object"
                    "properties":
                      "offset":
                        "type": "number"
                        "description": "To Skip number of providers"
                        "example": 10
                      "limit":
                        "type": "number"
                        "description": "Number of providers retrieved from given  geographical area."
                        "example": 50
                      "total_number_of_providers":
                        "type": "number"
                        "description": "Total number of providers retrieved in a given geographical area."
                        "example": 800
        "400":
          "description": "Bad Request"
          "content":
            "application/json":
              "schema":
                "type": "object"
                "properties":
                  "code":
                    "type": "string"
                    "example": "9"
                  "message":
                    "type": "array"
                    "items":
                      "type": "string"
                      "example": "Zip,distance,client_name are mandatory"
                  "innererror":
                    "type": "string"
                    "example": "null"
        "404":
          "description": "Bad Request"
          "content":
            "application/json":
              "schema":
                "type": "object"
                "properties":
                  "code":
                    "type": "string"
                    "example": "6"
                  "message":
                    "type": "array"
                    "items":
                      "type": "string"
                      "example": "No Records Found"
                  "innererror":
                    "type": "string"
                    "example": "null"
        "500":
          "description": "Internal Server Error"
          "content":
            "application/json":
              "schema":
                "type": "object"
                "properties":
                  "code":
                    "type": "string"
                    "example": "8"
                  "message":
                    "type": "array"
                    "items":
                      "type": "string"
                      "example": "Internal Server Error"
                  "innererror":
                    "type": "string"
                    "example": "null"
components:
  schemas:
    SearchEnrollmentsRequest:
      type: object
      description: Request for Enrollment Reconciliation API
      discriminator:
        propertyName: searchType
        mapping:
          policyNumber: '#/components/schemas/SearchByPolicyNumber'
          customerNumber: '#/components/schemas/SearchByCustomerNumber'
          state: '#/components/schemas/SearchByState'
          planCode: '#/components/schemas/SearchByPlanCode'
          renewalDate: '#/components/schemas/SearchByRenewalDate'
          dateRange: '#/components/schemas/SearchByDateRange'
          coverageStartDate: '#/components/schemas/CoverageStartDate'
      oneOf:
        - $ref: '#/components/schemas/SearchByPolicyNumber'
        - $ref: '#/components/schemas/SearchByCustomerNumber'
        - $ref: '#/components/schemas/SearchByState'
        - $ref: '#/components/schemas/SearchByPlanCode'
        - $ref: '#/components/schemas/SearchByRenewalDate'
        - $ref: '#/components/schemas/SearchByDateRange'
        - $ref: '#/components/schemas/SearchByCoverageStartDate'
      properties:
        pageNumber: 
          type: integer
          description: Page number to fetch. A page consists of 200 rows.
          minimum: 1
    SearchByPolicyNumber:
      type: object
      description: Schema for searching enrollments by policy number
      properties:
        searchType:
          type: string
        policyNumber:
          $ref: '#/components/schemas/PolicyNumber'
    SearchByCustomerNumber:
      type: object
      description: Schema for searching enrollments by customer number
      properties:
        searchType:
          type: string
        customerNumber:
          $ref: '#/components/schemas/CustomerNumber'
    SearchByState:
      type: object
      description: Schema for searching enrollments by state
      properties:
        searchType:
          type: string
        state:
          $ref: '#/components/schemas/State'
      oneOf:
        - $ref: '#/components/schemas/DateRange'
        - $ref: '#/components/schemas/CoverageStartDt'
        - $ref: '#/components/schemas/RenewalDt'
      required:
        - state
    SearchByPlanCode:
      type: object
      description: Schema for searching enrollments by plan code
      properties:
        searchType:
          type: string
        planCode:
          $ref: '#/components/schemas/PlanCode'
      oneOf:
        - $ref: '#/components/schemas/DateRange'
        - $ref: '#/components/schemas/CoverageStartDt'
        - $ref: '#/components/schemas/RenewalDt'
      required:
        - planCode
    SearchByRenewalDate:
      type: object
      description: Schema for searching enrollments by renewal date
      properties:
        searchType:
          type: string
        renewalDate:
          $ref: '#/components/schemas/RenewalDate'
        state:
          $ref: '#/components/schemas/State'
        planCode:
          $ref: '#/components/schemas/PlanCode'
      required:
        - renewalDate        
    SearchByCoverageStartDate:
      type: object
      description: Schema for searching enrollments by coverage start date
      properties:
        searchType:
          type: string
        coverageStartDate:
          $ref: '#/components/schemas/CoverageStartDate'
        state:
          $ref: '#/components/schemas/State'
        planCode:
          $ref: '#/components/schemas/PlanCode'
      required:
        - coverageStartDate        
    SearchByDateRange:
      type: object
      description: Schema for searching enrollments by date range (from and to date)
      allOf:
        - $ref: '#/components/schemas/DateRange'
      properties:
        searchType:
          type: string
        state:
          $ref: '#/components/schemas/State'
        planCode:
          $ref: '#/components/schemas/PlanCode'
      required:
        - fromDate
        - toDate        
    DateRange:
      type: object
      description: Date range
      required:
        - fromDate
        - toDate
      properties:
        fromDate:
          type: string
          description: From Date and Time
          format: date-time
          example: '2023-04-15T17:32:28Z'
        toDate:
          type: string
          description: To Date and Time
          format: date-time
          example: '2023-04-15T17:32:28Z'                    
    CoverageStartDt:
      type: object
      description: Coverage start date
      properties:
        coverageStartDate: 
          $ref: '#/components/schemas/CoverageStartDate'
    RenewalDt:
      type: object
      description: Coverage start date
      properties:
        renewalDate: 
          $ref: '#/components/schemas/RenewalDate'          
    SearchEnrollmentsResponse:
      title: Response schema for Enrollment Search
      type: object
      properties:
        primary:
          type: object
          properties:
            customerNumber:
              $ref: '#/components/schemas/CustomerNumber'
            profileInfo:
              type: object
              properties:
                firstName:
                  type: string
                  description: First Name of Insured
                  example: John 
                lastName:
                  type: string
                  description: Last Name of Insured
                  example: Doe                   
        product:
          type: object
          properties:
            policyNumber: 
              $ref: '#/components/schemas/PolicyNumber'
            planCode:
              $ref: "#/components/schemas/PlanCode"
            coverageEffectiveDate:
              $ref: '#/components/schemas/CoverageStartDate'
            coverageEndDate:
              $ref: '#/components/schemas/CoverageEndDate'
        dependents:
          type: array
          items:
            type: object
            properties:
              customerNumber:
                $ref: '#/components/schemas/CustomerNumber'
              relationship:
                $ref: '#/components/schemas/Relationship'
              profileInfo:
                type: object
                properties:
                  firstName:
                    type: string
                    description: Dependent First Name of Insured
                    example: John 
                  lastName:
                    type: string
                    description: Dependent Last Name of Insured
                    example: Doe                   
                  dependentCoverageEffectiveDate:
                    type: string
                    description: Dependent coverage effective date
                    format: date
                    example: '2023-04-01'
                  dependentCoverageEndDate:
                    type: string
                    description: Dependent coverage end date
                    format: date
                    example: '2023-04-01'
        moreRows: 
          type: boolean
          description: True if more rows exist as API returns the first 200 rows.
    Nonce:
      type: string
      description: Random nonce. Nonce should be the same value that is used while getting the JWT token. There is no fixed format for nonce. Nonce is used to prevent replay attacks and should be unique.
      example: 1dsnskc23
      minLength: 10
      maxLength: 10
    CorrelationId:
      type: string
      description: ID that is unique for each API request
      example: 030c89b1-8732-492b-b69a-2239e14264e5
      format: uuid
    PartnerId:
      type: string
      description: Unique id assigned as part of the partner onboarding process
      example: 123e4567-e89b-12d3-a456-426614174000
      format: uuid
    Source:
      type: string
      description: Source name that is assigned as a part of the partner onboarding process
      example: Jobble
      minLength: 25
      maxLength: 25
    CustomerNumber:
      type: string
      example: J123456789
      description: Customer number of the customer. Primary and dependent will have different customer numbers.
      format: regex
      default: '^J[0-9]{9}$'
      minLength: 10
      maxLength: 10
    PolicyNumber:
      type: string
      description: Policy number of the customer.
      example: J1234567
      format: regex
      default: '^J[0-9]{7}$'
      minLength: 8
      maxLength: 8
    Email:
      type: string
      description: Email address of the customer 
      example: john.doe@gmail.com
      maxLength: 150

      format: email
    Phone:
      type: string
      description: Phone number of the customer 
      example: 440-998-0098
      format: regex
      default: '^[2-9]\d{2}-\d{3}-\d{4}$'
      maxLength: 12
      minLength: 12
    ExternalId:
      type: string
      example: 4324j902442
      maxLength: 12
      description: The external ID assigned to the customer. Optional identifier that can be passed by the consumer of the API
    EffectiveDate:
      type: string
      description: The day from which policy gets effective. 
      format: date
      example: '2023-04-01'
    DateOfBirth:
      type: string
      description: Date of Birth of the customer
      format: date
      example: '1980-01-27'
    TransactionDateTime:
      type: string
      format: date-time
      example: '2023-04-15T17:32:28Z'
      description: Date and Time of transaction 
    CoverageStartDate:
      type: string
      description: This is day from when the Insurance company starts covering the risk, this will be equal to an effective date in case if Insured is primary one. 
      format: date
      example: '2023-04-01'
    RenewalDate:
      type: string
      description: Renewal date. Must be a future date and first day of month
      format: date
      example: '2023-04-01'
    CoverageEndDate:
      type: string
      description: This is the day of the policy expiration date. 
      format: date
      example: '2024-03-31'
    PaymentDateTime:
      type: string
      description: Date and Time of the payment
      format: date-time
      example: '2023-04-15T17:32:28Z'
    PlanEffectiveDate:
      type: string
      description: Date and Time of the plan change
      format: date-time
      example: '2023-04-15T17:32:28Z'
    PaymentAppliedDate:
      type: string
      description: Month for which the payment should be applied to.
      format: date
      example: '2023-04-01'
    PaidToDate:
      type: string
      description: Date to which the coverage provided by a policy shall remain in force based on the premiums applied. Paid to date should be sent as beginning of the month.
      format: date
      example: '2023-04-15'
    State:
      type: string
      description: 'A short, alphabetic geographic abbreviation for the state or province within a country.'
      example: NY
      enum:
        - AL
        - AK
        - AZ
        - AR
        - CA
        - CO
        - CT
        - DE
        - FL
        - GA
        - HI
        - ID
        - IL
        - IN
        - IA
        - KS
        - KY
        - LA
        - ME
        - MD
        - MA
        - MI
        - MN
        - MS
        - MO
        - MT
        - NE
        - NV
        - NH
        - NJ
        - NM
        - NY
        - NC
        - ND
        - OH
        - OK
        - OR
        - PA
        - RI
        - SC
        - SD
        - TN
        - TX
        - UT
        - VT
        - VA
        - WA
        - WV
        - WI
        - WY
        - DC
        - AS
        - GU
        - MP
        - PR
        - UM
        - VI
        - AB
        - BC
        - MB
        - NB
        - NL
        - NS
        - PE
        - QE
        - SU
        - NT
        - NU
        - YT
        - AG
        - BS
        - CM
        - CS
        - CH
        - CL
        - DF
        - DG
        - GT
        - GR
        - HG
        - JA
        - EM
        - NA
        - OA
        - PU
        - QT
        - QR
        - SL
        - SI
        - SO
        - TB
        - TM
        - TL
        - VE
        - YU
        - ZA
      minLength: 2
      maxLength: 2
    Gender:
      type: string
      description: |
        Gender of the customer  
        * 'M' - Male
        * 'F' - Female
      example: M
      minLength: 1
      maxLength: 1
      enum:
        - M
        - F
    MaritalStatus:
      type: string
      minLength: 1
      maxLength: 1
      description: |
        Marital status of the customer 
        * 'B' - Registered Domestic Partner
        * 'I' - Single
        * 'M' - Married
      example: 'I'
      enum:
        - B
        - I
        - M
    Relationship:
      type: string
      minLength: 1
      maxLength: 1
      description: |
        Dependent Relation with prime insured.  
        * 'A' - Spouse
        * 'O' - Child
      example: 'A'
      enum:
        - 'A'
        - 'O'
    PlanCode:
      type: string
      description: |
        DPlan code selected by the customer. 
        * 'DIAMOND_ADV_PPO' - Advantage Diamond
        * 'GOLD_ADV_PPO' - Advantage Achiever
        * 'SILVER_ADV_PPO' - Advantage Core
        * 'BRONZE_ADV_PPO' - Advantage Starter
      example: 'DIAMOND_ADV_PPO'
      enum:
        - DIAMOND_ADV_PPO
        - GOLD_ADV_PPO
        - SILVER_ADV_PPO
        - BRONZE_ADV_PPO
    UpdateCustomerReason:
      type: string
      minLength: 2
      maxLength: 2
      description: |
        Reason why customer (primary or dependent) is being updated
        * '03' -  Address change
        * '05' -  Changes to marital status
        * '06' -  Name change
        * '22' -  Contact (email or phone number changes)
        * '23' -  Date of birth change
        * '24' -  Gender change
      example: '03'
      enum: 
        - '03'
        - '05'
        - '06'
        - '07'
        - '22'
        - '23'
        - '24'
    ProductCode:
      type: string
      description: |
        Product code representing the Dental PPO LOB . 
        * 'PREC-IDPPO' - Dental PPO
      enum:
        - PREC-IDPPO
    ProfileInformation:
      title: Profile informtion of the primary insured or the dependent
      type: object
      properties:
        firstName:
          type: string
          description: First Name of Insured
          example: John
        middleName:
          type: string
          description: Middle Name of Insured (Optional) 
          example: Doe
        lastName:
          type: string
          description: Last Name of Insured
          example: Smith
        dateOfBirth:
          $ref: '#/components/schemas/DateOfBirth'
        gender:
          $ref: '#/components/schemas/Gender'
        maritalStatus:
          $ref: '#/components/schemas/MaritalStatus'
    Product:
      title: Product
      description: Insurance product details
      type: object
      properties:
        policyNumber:
          $ref: '#/components/schemas/PolicyNumber'
        planDetails:
          $ref: '#/components/schemas/PlanDetails'
        effectiveDate:
          $ref: '#/components/schemas/EffectiveDate'
        monthlyPremium:
           $ref: '#/components/schemas/BillingAmount'
    PlanDetails:
      type: object
      properties:
        planCode:
          $ref: '#/components/schemas/PlanCode'
        productCode:
          $ref: '#/components/schemas/ProductCode'
      required:
        - planCode
        - productCode
    CoverageDetails:
      type: object
      properties:
        coverageStartDate:
          $ref: '#/components/schemas/CoverageStartDate'
        coverageEndDate:
          $ref: '#/components/schemas/CoverageEndDate'
    Address:
      title: Address of the primary customer
      type: object
      properties:
        addressLine1:
          type: string
          example: 1 Main Street
          description: Address line 1 of the customer 
        addressLine2:
          type: string
          example: Suite 100
          description: Address line 2 of the customer
        city:
          type: string
          example: New York
          description: City of the customer
        state:
          $ref: '#/components/schemas/State'
        zipCode:
          type: string
          example: 10001
          description: Zip code of the customer
      required:
        - addressLine1
        - city
        - state
        - zipCode
    ContactInfo:
      title: Contact information of the primary customer
      type: object
      minProperties: 1
      properties:
        address:
          $ref: '#/components/schemas/Address'
        email:
          $ref: '#/components/schemas/Email'
        phone:
          $ref: '#/components/schemas/Phone'
    PrimaryCustomer:
      type: object
      properties:
        primaryCustomerNumber:
          $ref: '#/components/schemas/CustomerNumber'
        profileInfo:
          $ref: '#/components/schemas/ProfileInformation'
        contactInfo:
          $ref: '#/components/schemas/ContactInfo'
    DependentCustomer:
      type: object
      properties:
        dependentCustomerNumber:
          $ref: '#/components/schemas/CustomerNumber'
        profileInfo:
          $ref: '#/components/schemas/ProfileInformation'
        relationship:
          $ref: '#/components/schemas/Relationship'
        disabledIndicator:
          type: boolean
    AddDependentCustomer:
      type: object
      allOf:
        - $ref: '#/components/schemas/DependentCustomer'
        - properties:
            dependentCustomerNumber:
              required:
                - dependentCustomerNumber
            profileInfo:
               required:
                - firstName
                - lastName
                - dateOfBirth
                - relationship
        - type: object
          properties:
            coverageDetails:
              type: object
              properties:
                coverageStartDate: 
                  $ref: '#/components/schemas/CoverageStartDate'
      required: 
        - profileInfo
        - coverageStartDate
        - disabledIndicator
    BillingAmount:
      title: BillingAmount    
      description: Monthly premium amount
      type: string
      format: regex
      default: ^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$
      example: "750.32"
    UpdateCustomerRequest:
      type: object
      description: Request body for Update Customer endpoint
      properties:
        
        primaryCustomerDob:
          $ref: '#/components/schemas/DateOfBirth'
        transactionDateTime:
          $ref: '#/components/schemas/TransactionDateTime'
        reason:
          $ref: '#/components/schemas/UpdateCustomerReason'
        updates:
          type: object
          description: Updates at the policy level. 
          minProperties: 1
          properties:
            product:
              allOf:
                 - properties:
                    planDetails:
                      $ref : '#/components/schemas/PlanDetails'
                    monthlyPremium:
                      $ref : '#/components/schemas/BillingAmount'
                    coverageDetails:
                      type: object
                      properties:
                        coverageStartDate: 
                          $ref: '#/components/schemas/CoverageStartDate'
                    
                    
            primaryCustomer:
              description: Primary customer details that should be updated. Any change to state is a plan change.
              minProperties: 1
              allOf:
                 - properties:
                    profileInfo:
                      $ref : '#/components/schemas/ProfileInformation'
                    contactInfo:
                      $ref : '#/components/schemas/ContactInfo'
              
            dependents:              
              type: array
              items:
               allOf:
                 - $ref: '#/components/schemas/DependentCustomer'
                 - required:
                    - dependentCustomerNumber
        externalId:
           $ref: '#/components/schemas/ExternalId'
      required:
        - reason
        - primaryCustomerDob
        - transactionDateTime
        - updates
        - product
        - coverageDetails
    EnrollNewCustomerRequest:
      type: object
      description: Request body for Enroll New Customer endpoint
      required: 
        - primaryCustomer
        - product
        - producer
        - subProducer
        - enrollmentSignatureDate
        - transactionDateTime
        - hipaaAuthorization
        - eConsent
        - insuranceAgree
      properties:
        primaryCustomer:
          $ref: '#/components/schemas/PrimaryCustomer'
        product:
          $ref: '#/components/schemas/Product'
        dependents:
          type: array
          minItems: 0
          maxItems: 10
          uniqueItems: true
          items:
            $ref: '#/components/schemas/DependentCustomer'
        producer:
          type: string
        subProducer:
          type: string
        enrollmentSignatureDate:
          type: string
          format: date
          example: '2023-03-05'
          description: Date in YYYY-MM-DD format
        transactionDateTime:
          type: string
          format: date-time
          example: '2023-03-01T20:20:39+00:00'
        hipaaAuthorization:
          description: HIPAA Authorization is a document that authorizes the release of medical records which are protected under HIPAA. 
          type: boolean
        eConsent:
          description: If customer select “Yes” against eConsent then an insurance company will provide Insurance related Documents/correspondence to customer/Insured electronically. 
          type: boolean
        insuranceAgree:
          type: boolean
        externalId:
           $ref: '#/components/schemas/ExternalId'
    CancelPolicyRequest:
      type: object
      description: Request body for Cancel Policy endpoint
      properties:
        reason:
          type: string
          description: |
            Cancellation reason
            * '01' - Non Payment
            * '05' - Insured request - non specified
          example: '01'
          enum:
            - '01'
            - '05'
        coverageDetails:
          type: object
          properties:
            coverageEndDate: 
              $ref: '#/components/schemas/CoverageEndDate'
        transactionDateTime:
          type: string
          format: date-time
          example: '2023-03-01T20:20:39+00:00'
        externalId:
           $ref: '#/components/schemas/ExternalId'
      required:
        - policyNumber
        - customerNumber
        - reason
        - coverageDetails
        - transactionDateTime
        
    ReinstatePolicyRequest:
      type: object
      description: Request body for Cancel Policy endpoint
      properties:
        transactionDateTime:
          type: string
          format: date-time
          example: '2023-03-01T20:20:39+00:00'
        enrollmentSignatureDate:
          type: string
          format: date
          example: '2023-03-05'
          description: Date in YYYY-MM-DD format
      required:
        - transactionDateTime
        
        
        
    AddDependentRequest:
      type: object
      properties:
        primaryCustomerDob:
          $ref: '#/components/schemas/DateOfBirth'
        transactionDateTime:
          $ref: '#/components/schemas/TransactionDateTime'
        monthlyPremium:
          $ref: '#/components/schemas/BillingAmount'
        dependents:
          type: array
          uniqueItems: true
          minItems: 1
          maxItems: 10
          items:
            $ref: '#/components/schemas/AddDependentCustomer'
        externalId:
           $ref: '#/components/schemas/ExternalId'
      required:
        - correlationId
        - primaryCustomerNumber
        - primaryCustomerDob
        - policyNumber
        - transactionDateTime
        - monthlyPremium
        - dependents
    DeleteDependentRequest:
      title: DeleteDependentRequest
      type: object
      description: Delete dependent request. CoverageEndDate must be the first day of the month. 
      properties:
        primaryCustomerDob:
          $ref: '#/components/schemas/DateOfBirth'
        transactionDateTime:
          $ref: '#/components/schemas/TransactionDateTime'
        monthlyPremium:
          $ref: '#/components/schemas/BillingAmount'
        externalId:
           $ref: '#/components/schemas/ExternalId'
        coverageDetails:
              type: object
              properties:
                coverageEndDate: 
                  $ref: '#/components/schemas/CoverageEndDate'
      required:
        - primaryCustomerDob
        - monthlyPremium
        - transactionDateTime
        - dependent
        - coverageEndDate
    ApplyPaymentRequest:
      title: AddPaymentRequest
      type: object
      properties:
        primaryCustomerDob:
          $ref: '#/components/schemas/DateOfBirth'
        monthlyPremium:
          $ref: '#/components/schemas/BillingAmount'
        paymentDateTime:
          $ref: '#/components/schemas/PaymentDateTime'
        paymentApplicableDate:
          $ref: '#/components/schemas/PaymentAppliedDate'
        transactionDateTime:
          type: string
          format: date-time
          example: '2023-03-01T20:20:39+00:00'

      required:
        - primaryCustomerDob
        - monthlyPremium
        - paymentDateTime
        - transactionDateTime
    PaidToDateRequest:
      title: PaidToDateRequest
      type: object
      properties:
        primaryCustomerDob:
          $ref: '#/components/schemas/DateOfBirth'
        paidToDate:
          $ref: '#/components/schemas/PaidToDate'
        transactionDateTime:
          type: string
          format: date-time
          example: '2023-03-01T20:20:39+00:00'
      required:
        - primaryCustomerDob
        - paidToDate
        - transactionDateTime
    ErrorResponse:
      title: ErrorResponse
      type: object
      properties:
        correlationId:
          $ref: '#/components/schemas/CorrelationId'
        message:
          type: string
          description: High level Error description.
    422ErrorResponse:
      allOf:
         - $ref: '#/components/schemas/ErrorResponse'
         - type: object
           properties:
              correlationId:
                $ref: '#/components/schemas/CorrelationId'
              message:
                type: string
                description: High level Error description.
              more_info:
                type: array
                items:
                  $ref: '#/components/schemas/ErrorDetails'
    500ErrorResponse:
      $ref: '#/components/schemas/ErrorResponse'
    ErrorDetails:
      type: object
      properties:
        code:
          type: string
          description: Error Description
          example: ErrorCode
        field:
          type: string
          description: Indicates the field name(input) that caused the error
          example: email
        message:
          type: string
          description: Specific description of the error
          example: Email is invalid
    AsyncResponse:
      type: object
      properties:
        correlationId:
          $ref: '#/components/schemas/CorrelationId'
        primaryCustomerNumber:
           $ref: '#/components/schemas/CustomerNumber'
        policyNumber:
           $ref: '#/components/schemas/PolicyNumber'
        requestAcceptedDateTime:
          type: string
          example: '2021-01-23T15:36:40.881'