swagger: '2.0'
info:
  title: membership_demographics_api_1_0
  version: '2.0'
  description: membership_demographics_api_1_0
  x-ibm-name: membership_demographics_api_1_0
host: devbus.healthpartners.com
schemes:
  - https
basePath: /membership/demographics/v1.0
x-ibm-configuration:
  swagger: '2.0'
  info:
    title: membership_demographics_api_1_0
    version: 1.0.0
    description: membership_demographics_api_1_0
  paths:
    /{memberNumber}:
      get:
        operationId: getMemberDemographics
        responses:
          '200':
            description: The operation was successful.
            schema:
              $ref: '#/definitions/getMemberDemographicsResponse'
        produces:
          - application/json
        description: Retrieve demographics information
        parameters:
          - required: true
            name: memberNumber
            in: path
            type: string
          - name: group
            in: header
            type: string
            description: bus pass information
            required: true
          - name: application
            in: header
            type: string
            description: bus pass information
            required: true
          - name: environment
            in: header
            type: string
            description: bus pass information
            required: true
          - name: version
            in: header
            type: string
            description: bus pass information
            required: true
          - name: uniquetoken
            in: header
            type: string
            description: bus pass information
            required: true
          - name: Developer-Portal
            in: header
            type: string
          - name: X-Hp-Request-Id
            in: header
            type: string
            description: Unique id per transaction for tracking purpose
    /lastname:
      put:
        operationId: UpdateLastName
        responses:
          '200':
            description: The operation was successful.
            schema:
              $ref: '#/definitions/updateLastNameResponse'
        consumes:
          - application/json
        produces:
          - application/json
        description: Update lastname
        parameters:
          - name: body
            in: body
            schema:
              $ref: '#/definitions/updateLastName'
            description: The request body for the operation
            required: true
          - name: group
            in: header
            type: string
            description: bus pass information
            required: true
          - name: application
            in: header
            type: string
            description: bus pass information
            required: true
          - name: environment
            in: header
            type: string
            description: bus pass information
            required: true
          - name: version
            in: header
            type: string
            description: bus pass information
            required: true
          - name: uniquetoken
            in: header
            type: string
            description: bus pass information
            required: true
          - name: Developer-Portal
            in: header
            type: string
          - name: X-Hp-Request-Id
            in: header
            type: string
            description: Unique id per transaction for tracking purpose
    /tobaccousage/{contractNumber}:
      get:
        operationId: getTobaccoUsageForMember
        responses:
          '200':
            description: The operation was successful.
            schema:
              $ref: '#/definitions/TobaccoUsageForMemberResponse'
        produces:
          - application/json
        description: getTobaccoUsageForMember
        parameters:
          - required: true
            name: contractNumber
            in: path
            type: string
          - name: group
            in: header
            type: string
            description: bus pass information
            required: true
          - name: application
            in: header
            type: string
            description: bus pass information
            required: true
          - name: environment
            in: header
            type: string
            description: bus pass information
            required: true
          - name: version
            in: header
            type: string
            description: bus pass information
            required: true
          - name: uniquetoken
            in: header
            type: string
            description: bus pass information
            required: true
          - name: Developer-Portal
            in: header
            type: string
          - name: X-Hp-Request-Id
            in: header
            type: string
            description: Unique id per transaction for tracking purpose
  basePath: /membership/demographics/v1.0
  definitions:
    getMemberDemographicsResponse:
      type: object
      properties:
        statusDetails:
          $ref: '#/definitions/statusDetails'
        personNumber:
          type: string
        personExternalId:
          type: string
        personFirstName:
          type: string
        personMiddleInitial:
          type: string
        personLastName:
          type: string
        personTitle:
          type: string
        personDateOfBirth:
          type: string
        personGender:
          type: string
        personSSN:
          type: string
        personMedicalAssistanceNumber:
          type: string
        personMedicareNumber:
          type: string
        personAetnaNumber:
          type: string
        personStreetAddressLine1:
          type: string
        personStreetAddressLine2:
          type: string
        personCity:
          type: string
        personState:
          type: string
        personZipCode:
          type: string
        personHomePhoneNumber:
          type: string
        personWorkPhoneNumber:
          type: string
        errorDescription:
          type: string
    statusDetails:
      type: object
      properties:
        success:
          type: boolean
        statusCode:
          type: string
        messages:
          type: array
          items:
            $ref: '#/definitions/messages'
    messages:
      type: object
      properties:
        code:
          type: string
        description:
          type: string
        id:
          type: string
    updateLastName:
      type: object
      properties:
        memberNumber:
          type: string
        asOfDate:
          type: string
        daysBeforeTodayForSearch:
          type: string
        lastName:
          type: string
    updateLastNameResponse:
      type: object
      properties:
        statusDetails:
          $ref: '#/definitions/statusDetails'
    tobaccoUsageForMember:
      type: object
      properties:
        memberId:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        middleName:
          type: string
        birthDate:
          type: string
        age:
          type: string
        tobaccoUsage:
          type: string
    TobaccoUsageForMemberResponse:
      type: object
      properties:
        statusDetails:
          $ref: '#/definitions/statusDetails'
        contractNumber:
          type: string
        errorDescription:
          type: string
        tobaccoUsageForMembers:
          type: array
          items:
            $ref: '#/definitions/tobaccoUsageForMember'
  schemes:
    - https
  host: devbus.healthpartners.com
  application-authentication:
    certificate: false
  type: rest
  phase: realized
  enforced: true
  testable: true
  gateway: datapower-api-gateway
  assembly:
    execute:
      - gatewayscript:
          version: 2.0.0
          title: gatewayscript
          source: >-
            var apim = require('apim');
            var test_property = apim.getvariable('$test_property');
            console.error(test_property);
      - invoke:
          title: invoke
          version: 2.0.0
          verb: keep
          target-url: $(target-url)
          persistent-connection: true
          header-control:
            type: blocklist
            values: []
          parameter-control:
            type: allowlist
            values: []
    finally: []
  properties: {}
  activity-log:
    enabled: true
    success-content: activity
    error-content: payload
  cors:
    enabled: true
  catalogs: {}
definitions:
  getMemberDemographicsResponse:
    type: object
    properties:
      statusDetails:
        $ref: '#/definitions/statusDetails'
      personNumber:
        type: string
      personExternalId:
        type: string
      personFirstName:
        type: string
      personMiddleInitial:
        type: string
      personLastName:
        type: string
      personTitle:
        type: string
      personDateOfBirth:
        type: string
      personGender:
        type: string
      personSSN:
        type: string
      personMedicalAssistanceNumber:
        type: string
      personMedicareNumber:
        type: string
      personAetnaNumber:
        type: string
      personStreetAddressLine1:
        type: string
      personStreetAddressLine2:
        type: string
      personCity:
        type: string
      personState:
        type: string
      personZipCode:
        type: string
      personHomePhoneNumber:
        type: string
      personWorkPhoneNumber:
        type: string
      errorDescription:
        type: string
  statusDetails:
    type: object
    properties:
      success:
        type: boolean
      statusCode:
        type: string
      messages:
        type: array
        items:
          $ref: '#/definitions/messages'
  messages:
    type: object
    properties:
      code:
        type: string
      description:
        type: string
      id:
        type: string
  updateLastName:
    type: object
    properties:
      memberNumber:
        type: string
      asOfDate:
        type: string
      daysBeforeTodayForSearch:
        type: string
      lastName:
        type: string
  updateLastNameResponse:
    type: object
    properties:
      statusDetails:
        $ref: '#/definitions/statusDetails'
  tobaccoUsageForMember:
    type: object
    properties:
      memberId:
        type: string
      firstName:
        type: string
      lastName:
        type: string
      middleName:
        type: string
      birthDate:
        type: string
      age:
        type: string
      tobaccoUsage:
        type: string
  TobaccoUsageForMemberResponse:
    type: object
    properties:
      statusDetails:
        $ref: '#/definitions/statusDetails'
      contractNumber:
        type: string
      errorDescription:
        type: string
      tobaccoUsageForMembers:
        type: array
        items:
          $ref: '#/definitions/tobaccoUsageForMember'
paths:
  /{memberNumber}:
    get:
      operationId: getMemberDemographics
      responses:
        '200':
          description: The operation was successful.
          schema:
            $ref: '#/definitions/getMemberDemographicsResponse'
      produces:
        - application/json
      description: Retrieve demographics information
      parameters:
        - required: true
          name: memberNumber
          in: path
          type: string
        - name: group
          in: header
          type: string
          description: bus pass information
          required: true
        - name: application
          in: header
          type: string
          description: bus pass information
          required: true
        - name: environment
          in: header
          type: string
          description: bus pass information
          required: true
        - name: version
          in: header
          type: string
          description: bus pass information
          required: true
        - name: uniquetoken
          in: header
          type: string
          description: bus pass information
          required: true
        - name: Developer-Portal
          in: header
          type: string
        - name: X-Hp-Request-Id
          in: header
          type: string
          description: Unique id per transaction for tracking purpose
  /lastname:
    put:
      operationId: UpdateLastName
      responses:
        '200':
          description: The operation was successful.
          schema:
            $ref: '#/definitions/updateLastNameResponse'
      consumes:
        - application/json
      produces:
        - application/json
      description: Update lastname
      parameters:
        - name: body
          in: body
          schema:
            $ref: '#/definitions/updateLastName'
          description: The request body for the operation
          required: true
        - name: group
          in: header
          type: string
          description: bus pass information
          required: true
        - name: application
          in: header
          type: string
          description: bus pass information
          required: true
        - name: environment
          in: header
          type: string
          description: bus pass information
          required: true
        - name: version
          in: header
          type: string
          description: bus pass information
          required: true
        - name: uniquetoken
          in: header
          type: string
          description: bus pass information
          required: true
        - name: Developer-Portal
          in: header
          type: string
        - name: X-Hp-Request-Id
          in: header
          type: string
          description: Unique id per transaction for tracking purpose
  /tobaccousage/{contractNumber}:
    get:
      operationId: getTobaccoUsageForMember
      responses:
        '200':
          description: The operation was successful.
          schema:
            $ref: '#/definitions/TobaccoUsageForMemberResponse'
      produces:
        - application/json
      description: getTobaccoUsageForMember
      parameters:
        - required: true
          name: contractNumber
          in: path
          type: string
        - name: group
          in: header
          type: string
          description: bus pass information
          required: true
        - name: application
          in: header
          type: string
          description: bus pass information
          required: true
        - name: environment
          in: header
          type: string
          description: bus pass information
          required: true
        - name: version
          in: header
          type: string
          description: bus pass information
          required: true
        - name: uniquetoken
          in: header
          type: string
          description: bus pass information
          required: true
        - name: Developer-Portal
          in: header
          type: string
        - name: X-Hp-Request-Id
          in: header
          type: string
          description: Unique id per transaction for tracking purpose
securityDefinitions:
  clientIdHeader:
    type: apiKey
    in: header
    name: X-IBM-Client-Id
