openapi: 3.0.4
info:
  title: Bulk
  version: v1
paths:
  /bulk/v1/status/{bulkRequestId}:
    get:
      tags:
        - Bulk
      summary: Gets the status of a bulk request
      description: Returns the processing status and outcome of a bulk import request
      parameters:
        - name: bulkRequestId
          in: path
          description: A GUID request ID from a prior bulk import request
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Complete success or failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkStatusResponse'
              examples:
                Complete Success:
                  value:
                    bulkRequestId: ca2d67b6-6a2a-4776-867a-9d57644265d4
                    processingStatus: COMPLETE
                    operationDetails:
                      status: SUCCESS
                      totalItems: 2
                      success: 2
                      failures: 0
                      requestItems:
                        - clientRefId: 34460b0d-cc58-4318-8d01-897efa757be7
                          status: COMPLETED
                          retryable: false
                          errorMessage:
                            - null
                        - clientRefId: fb6ce249-b589-4e4d-a84a-30252ee3cb0f
                          status: COMPLETED
                          retryable: false
                          errorMessage:
                            - null
                Complete Failure:
                  value:
                    bulkRequestId: 4c8525be-b09e-4f81-8cc5-877a603875dc
                    processingStatus: COMPLETE
                    operationDetails:
                      status: FAILURE
                      totalItems: 2
                      success: 0
                      failures: 2
                      requestItems:
                        - clientRefId: 602c9300-9c78-4d19-8af2-0dbf5471e4e2
                          status: FAILED
                          retryable: false
                          errorMessage:
                            - >-
                              Contact.BusinessEmailAddress: The
                              BusinessEmailAddress field is required.
                        - clientRefId: b697e916-fc5d-4950-92bc-d152073a301b
                          status: FAILED
                          retryable: true
                          errorMessage:
                            - >-
                              CurrentEmployment.City: The City field is
                              required.
        '207':
          description: Partial success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkStatusResponse'
              example:
                bulkRequestId: 5cd048ba-bd2a-4af0-aeb5-41789d4de921
                processingStatus: COMPLETE
                operationDetails:
                  status: PARTIAL_FAILURE
                  totalItems: 2
                  success: 1
                  failures: 1
                  requestItems:
                    - clientRefId: d89557dd-881f-4a17-a07a-4b160a86bf7f
                      status: COMPLETED
                      retryable: false
                      errorMessage:
                        - 'CurrentEmployment.City: The City field is required.'
                    - clientRefId: 3f2bab5d-31e2-47e8-b046-65d1e98e16fc
                      status: FAILED
                      retryable: false
                      errorMessage:
                        - >-
                          Contact.BusinessEmailAddress: The BusinessEmailAddress
                          field is required.
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '500':
          description: Internal Server Error
  /bulk/v1/{itemType}:
    post:
      tags:
        - Bulk
      summary: Submit a new bulk of items to import
      description: For the provided itemType will import a batch of item records.
      parameters:
        - name: itemType
          in: path
          description: 'Must be one of the following supported types: profile'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/x-ndjsOn:
            schema:
              title: string
              description: Paste your NDJSON here. One JSON object per line.
            example: "{\"clientRefId\" :\"1F55AA75-5D53-4B6C-BFD2-B56764387E84\",\"data\":{\"agent\":{\"contact\":{\"additionalEmailAddress\":\"\",\"businessEmailAddress\":\"qa@reged.com\",\"businessFaxNumber\":\"1112223331\",\"businessPhoneExtension\":\"111\",\"businessPhoneNumber\":\"17549127046\",\"cellPhoneNumber\":\"17549127046\",\"homeEmailAddress\":\"qa@reged.com\",\"homeFaxNumber\":\"1112223331\",\"homePhoneNumber\":\"17549127046\",\"suppressEmail\":\"N\"},\"demographic\":{\"affiliatedWithBank\":\"Y\",\"agentProfileKey\":\"10722589\",\"alias\":\"string\",\"backOfficeNrf\":\"N\",\"billingCode\":\"001\",\"branchLocation\":\"NY\",\"cityOfBirth\":\"NY\",\"costCenter\":\"string\",\"country\":\"string\",\"countryOfBirth\":\"string\",\"crdNumber\":\"123124\",\"customField1\":\"string\",\"customField2\":\"string\",\"customField3\":\"string\",\"customField4\":\"string\",\"customField5\":\"string\",\"customField6\":\"string\",\"customField7\":\"string\",\"customField8\":\"string\",\"customField9\":\"string\",\"customField10\":\"string\",\"deptNumber\":\"string\",\"driverLicenseNumber\":\"1234567890\",\"driverLicenseState\":\"NY\",\"employerId\":\"23\",\"employersFein\":\"88888888\",\"empStatus\":\"7040\",\"firstName\":\"7\",\"gender\":\"M\",\"iaSupervisorName\":\"string\",\"iaSupervisorPhoneNumber\":\"\",\"iaSupervisorTitle\":\"string\",\"jobTitle\":\"QA\",\"lastName\":\"ordanovichTested1\",\"middleInitial\":\"MiddleName1\",\"niprNumber\":\"8888888\",\"nmlsRegPriorFirmYn\":\"string\",\"nmlsRenewalStatus\":\"7040\",\"residentState\":\"NY\",\"rfoCode\":\"NY\",\"salutation\":\"Mr\",\"stateOfBirth\":\"NY\",\"suffix\":\"string\"},\"profileKey\":\"107225822\",\"ssn\":\"107225822\"}}}\r\n{\"clientRefId\" :\"AEE4C1D7-ABD6-4CA3-BAC4-B62013E7FCFE\",\"data\":{\"agency\":{\"demographic\":{\"affiliatedWithBank\":\"Y\",\"businessFax\":\"1112223331\",\"businessPhone\":\"2112223331\",\"costCenter\":\"2411\",\"firmBillingCode\":\"3024\",\"customField1\":\"1string\",\"customField2\":\"2string\",\"customField3\":\"3string\",\"dbaName\":\"test\",\"domicileCountry\":\"USA\",\"domicileState\":\"FL\",\"emailAddress\":\"qa@reged.com\",\"firmCrd\":\"202525\",\"firmId\":\"3202524\",\"firmName\":\"Create API\",\"incorporationDate\":\"2010-08-24T14:15:22Z\",\"nipr\":\"60524\",\"organizationDate\":\"2011-08-24T14:15:22Z\",\"organizationType\":23017,\"parentFirmProfileKey\":\"\",\"region\":\"GA\",\"startDate\":\"2012-08-24T14:15:22Z\",\"status\":7040,\"terminationDate\":\"2029-08-24T14:15:22Z\",\"webAddress\":\"qa@reged.com\"},\"profileKey\":\"204823730\",\"tin\":\"204823730\"}}}\r\n{\"clientRefId\" :\"C98AA4B9-D29C-4ACC-B41E-6DCDAE134E0C\",\"data\":{\"agent\":{\"contact\":{\"additionalEmailAddress\":\"qa@reged.com\",\"businessEmailAddress\":\"qa@reged.com\",\"businessFaxNumber\":\"1112223331\",\"businessPhoneExtension\":\"111\",\"businessPhoneNumber\":\"17549127046\",\"cellPhoneNumber\":\"17549127046\",\"homeEmailAddress\":\"qa@reged.com\",\"homeFaxNumber\":\"1112223331\",\"homePhoneNumber\":\"17549127046\",\"suppressEmail\":\"N\"},\"demographic\":{\"affiliatedWithBank\":\"Y\",\"agentProfileKey\":\"10722589\",\"alias\":\"string\",\"backOfficeNrf\":\"N\",\"billingCode\":\"001\",\"branchLocation\":\"NY\",\"cityOfBirth\":\"NY\",\"costCenter\":\"string\",\"country\":\"string\",\"countryOfBirth\":\"string\",\"crdNumber\":\"123124\",\"customField1\":\"string\",\"customField2\":\"string\",\"customField3\":\"string\",\"customField4\":\"string\",\"customField5\":\"string\",\"customField6\":\"string\",\"customField7\":\"string\",\"customField8\":\"string\",\"customField9\":\"string\",\"customField10\":\"string\",\"deptNumber\":\"string\",\"driverLicenseNumber\":\"1234567890\",\"driverLicenseState\":\"NY\",\"employerId\":\"23\",\"employersFein\":\"88888888\",\"empStatus\":\"7040\",\"firstName\":\"7\",\"gender\":\"M\",\"iaSupervisorName\":\"string\",\"iaSupervisorPhoneNumber\":\"\",\"iaSupervisorTitle\":\"string\",\"jobTitle\":\"QA\",\"lastName\":\"ordanovichTested1\",\"middleInitial\":\"MiddleName1\",\"niprNumber\":\"8888888\",\"nmlsRegPriorFirmYn\":\"string\",\"nmlsRenewalStatus\":\"7040\",\"residentState\":\"NY\",\"rfoCode\":\"NY\",\"salutation\":\"Mr\",\"stateOfBirth\":\"NY\",\"suffix\":\"string\"},\"profileKey\":\"107225822\",\"ssn\":\"107225822\"}}}\r\n{\"clientRefId\" :\"66A830F4-0CBF-478C-9F6D-58AFAADB0F9F\",\"data\":{\"agent\":{\"contact\":{\"additionalEmailAddress\":\"qa@reged.com\",\"businessEmailAddress\":\"qa@reged.com\",\"businessFaxNumber\":\"1112223331\",\"businessPhoneExtension\":\"111\",\"businessPhoneNumber\":\"17549127046\",\"cellPhoneNumber\":\"17549127046\",\"homeEmailAddress\":\"qa@reged.com\",\"homeFaxNumber\":\"1112223331\",\"homePhoneNumber\":\"17549127046\",\"suppressEmail\":\"N\"},\"demographic\":{\"affiliatedWithBank\":\"Y\",\"agentProfileKey\":\"10722589\",\"alias\":\"string\",\"backOfficeNrf\":\"N\",\"billingCode\":\"001\",\"branchLocation\":\"NY\",\"cityOfBirth\":\"NY\",\"costCenter\":\"string\",\"country\":\"string\",\"countryOfBirth\":\"string\",\"crdNumber\":\"123124\",\"customField1\":\"string\",\"customField2\":\"string\",\"customField3\":\"string\",\"customField4\":\"string\",\"customField5\":\"string\",\"customField6\":\"string\",\"customField7\":\"string\",\"customField8\":\"string\",\"customField9\":\"string\",\"customField10\":\"string\",\"deptNumber\":\"string\",\"driverLicenseNumber\":\"1234567890\",\"driverLicenseState\":\"NY\",\"employerId\":\"23\",\"employersFein\":\"88888888\",\"empStatus\":\"7040\",\"firstName\":\"7\",\"gender\":\"M\",\"iaSupervisorName\":\"string\",\"iaSupervisorPhoneNumber\":\"\",\"iaSupervisorTitle\":\"string\",\"jobTitle\":\"QA\",\"lastName\":\"ordanovichTested1\",\"middleInitial\":\"MiddleName1\",\"niprNumber\":\"8888888\",\"nmlsRegPriorFirmYn\":\"string\",\"nmlsRenewalStatus\":\"7040\",\"residentState\":\"NY\",\"rfoCode\":\"NY\",\"salutation\":\"Mr\",\"stateOfBirth\":\"NY\",\"suffix\":\"string\"},\"profileKey\":\"107225822\",\"ssn\":\"107225822\"}}}"
        required: true
      responses:
        '202':
          description: Accepted
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '500':
          description: Internal Server Error
components:
  schemas:
    AgencyImportAddressModel:
      required:
        - city
        - state
        - streetAddress1
        - zip
      type: object
      properties:
        dynamicData:
          type: object
          additionalProperties: {}
          nullable: true
        addressId:
          type: integer
          format: int64
          nullable: true
        city:
          minLength: 1
          type: string
        clientAddressId:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
        county:
          type: string
          nullable: true
        state:
          minLength: 1
          type: string
        streetAddress1:
          minLength: 1
          type: string
        streetAddress2:
          type: string
          nullable: true
        toDate:
          type: string
          format: date-time
          nullable: true
        fromDate:
          type: string
          format: date-time
          nullable: true
        zip:
          minLength: 1
          type: string
      additionalProperties: false
    AgencyImportContactModel:
      required:
        - contactType
        - emailAddress
      type: object
      properties:
        dynamicData:
          type: object
          additionalProperties: {}
          nullable: true
        businessFaxNumber:
          type: string
          nullable: true
        businessPhoneExtension:
          type: string
          nullable: true
        businessPhoneNumber:
          type: string
          nullable: true
        cellPhoneNumber:
          type: string
          nullable: true
        clientContactId:
          type: string
          nullable: true
        contactId:
          type: integer
          format: int64
          nullable: true
        contactType:
          minLength: 1
          type: string
        emailAddress:
          minLength: 1
          type: string
        firstName:
          type: string
          nullable: true
        lastName:
          type: string
          nullable: true
      additionalProperties: false
    AgencyImportDemographicModel:
      required:
        - firmName
        - status
      type: object
      properties:
        dynamicData:
          type: object
          additionalProperties: {}
          nullable: true
        affiliatedWithBank:
          type: string
          nullable: true
        businessFax:
          type: string
          nullable: true
        businessPhone:
          type: string
          nullable: true
        costCenter:
          type: string
          nullable: true
        firmBillingCode:
          type: string
          nullable: true
        customField1:
          type: string
          nullable: true
        customField2:
          type: string
          nullable: true
        customField3:
          type: string
          nullable: true
        dbaName:
          type: string
          nullable: true
        domicileCountry:
          type: string
          nullable: true
        domicileState:
          type: string
          nullable: true
        emailAddress:
          type: string
          nullable: true
        firmCrd:
          type: string
          nullable: true
        firmId:
          type: string
          nullable: true
        firmName:
          minLength: 1
          type: string
        incorporationDate:
          type: string
          nullable: true
        nipr:
          type: string
          nullable: true
        organizationDate:
          type: string
          format: date-time
          nullable: true
        organizationType:
          type: integer
          format: int64
          nullable: true
        parentFirmProfileKey:
          type: string
          nullable: true
        region:
          type: string
          nullable: true
        startDate:
          type: string
          format: date-time
          nullable: true
        status:
          type: integer
          format: int64
        terminationDate:
          type: string
          format: date-time
          nullable: true
        webAddress:
          type: string
          nullable: true
      additionalProperties: false
    AgencyImportRequest:
      required:
        - profileKey
        - tin
      type: object
      properties:
        businessAddress:
          $ref: '#/components/schemas/AgencyImportAddressModel'
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/AgencyImportContactModel'
          nullable: true
        demographic:
          $ref: '#/components/schemas/AgencyImportDemographicModel'
        mailingAddress:
          $ref: '#/components/schemas/AgencyImportAddressModel'
        primaryAddress:
          $ref: '#/components/schemas/AgencyImportAddressModel'
        profileKey:
          minLength: 1
          type: string
        tin:
          minLength: 1
          type: string
      additionalProperties: false
    AgentImportAddressModel:
      required:
        - city
        - state
        - streetAddress1
        - zip
      type: object
      properties:
        dynamicData:
          type: object
          additionalProperties: {}
          nullable: true
        addressId:
          type: integer
          format: int64
          nullable: true
        city:
          minLength: 1
          type: string
        clientAddressId:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
        county:
          type: string
          nullable: true
        fromDate:
          type: string
          format: date-time
          nullable: true
        state:
          minLength: 1
          type: string
        streetAddress1:
          minLength: 1
          type: string
        streetAddress2:
          type: string
          nullable: true
        toDate:
          type: string
          format: date-time
          nullable: true
        zip:
          minLength: 1
          type: string
      additionalProperties: false
    AgentImportContactModel:
      required:
        - businessEmailAddress
      type: object
      properties:
        dynamicData:
          type: object
          additionalProperties: {}
          nullable: true
        additionalEmailAddress:
          type: string
          nullable: true
        businessEmailAddress:
          minLength: 1
          type: string
        businessFaxNumber:
          type: string
          nullable: true
        businessPhoneExtension:
          type: string
          nullable: true
        businessPhoneNumber:
          type: string
          nullable: true
        cellPhoneNumber:
          type: string
          nullable: true
        homeEmailAddress:
          type: string
          nullable: true
        homeFaxNumber:
          type: string
          nullable: true
        homePhoneNumber:
          type: string
          nullable: true
        suppressEmail:
          type: string
          nullable: true
      additionalProperties: false
    AgentImportDemographicModel:
      required:
        - empStatus
        - firstName
        - lastName
      type: object
      properties:
        dynamicData:
          type: object
          additionalProperties: {}
          nullable: true
        affiliatedWithBank:
          type: string
          nullable: true
        alias:
          type: string
          nullable: true
        backOfficeNrf:
          type: string
          nullable: true
        billingCode:
          type: string
          nullable: true
        branchLocation:
          type: string
          nullable: true
        cityOfBirth:
          type: string
          nullable: true
        costCenter:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
        countryOfBirth:
          type: string
          nullable: true
        crdNumber:
          type: string
          nullable: true
        customField1:
          type: string
          nullable: true
        customField2:
          type: string
          nullable: true
        customField3:
          type: string
          nullable: true
        customField4:
          type: string
          nullable: true
        customField5:
          type: string
          nullable: true
        customField6:
          type: string
          nullable: true
        customField7:
          type: string
          nullable: true
        customField8:
          type: string
          nullable: true
        customField9:
          type: string
          nullable: true
        customField10:
          type: string
          nullable: true
        dateOfBirth:
          type: string
          format: date-time
          nullable: true
        deptNumber:
          type: string
          nullable: true
        driverLicenseNumber:
          type: string
          nullable: true
        driverLicenseState:
          type: string
          nullable: true
        employerId:
          type: string
          nullable: true
        employersFein:
          type: string
          nullable: true
        empStatus:
          minLength: 1
          type: string
        firstName:
          minLength: 1
          type: string
        gender:
          type: string
          nullable: true
        hireDate:
          type: string
          format: date-time
          nullable: true
        jobTitle:
          type: string
          nullable: true
        lastName:
          minLength: 1
          type: string
        middleInitial:
          type: string
          nullable: true
        niprNumber:
          type: string
          nullable: true
        nmlsRegPriorFirmYn:
          type: string
          nullable: true
        nmlsRenewalDate:
          type: string
          format: date-time
          nullable: true
        nmlsRenewalStatus:
          type: string
          nullable: true
        residentState:
          type: string
          nullable: true
        rfoCode:
          type: string
          nullable: true
        salutation:
          type: string
          nullable: true
        stateOfBirth:
          type: string
          nullable: true
        suffix:
          type: string
          nullable: true
        terminationDate:
          type: string
          format: date-time
          nullable: true
        usCitizen:
          type: string
          nullable: true
      additionalProperties: false
    AgentImportEmploymentHistoryModel:
      required:
        - city
        - employerName
        - hireDate
        - jobTitle
        - state
        - streetAddress1
        - zip
      type: object
      properties:
        dynamicData:
          type: object
          additionalProperties: {}
          nullable: true
        city:
          minLength: 1
          type: string
        country:
          type: string
          nullable: true
        county:
          type: string
          nullable: true
        employerName:
          minLength: 1
          type: string
        employmentId:
          type: integer
          format: int64
          nullable: true
        hireDate:
          type: string
          format: date-time
        investmentRelated:
          type: string
          nullable: true
        jobTitle:
          minLength: 1
          type: string
        state:
          minLength: 1
          type: string
        streetAddress1:
          minLength: 1
          type: string
        streetAddress2:
          type: string
          nullable: true
        supervisorName:
          type: string
          nullable: true
        zip:
          minLength: 1
          type: string
      additionalProperties: false
    AgentImportHierarchyModel:
      type: object
      properties:
        dynamicData:
          type: object
          additionalProperties: {}
          nullable: true
        hierarchyCode:
          type: string
          nullable: true
        manager1:
          type: string
          nullable: true
        manager2:
          type: string
          nullable: true
        manager3:
          type: string
          nullable: true
        manager4:
          type: string
          nullable: true
        manager5:
          type: string
          nullable: true
        manager6:
          type: string
          nullable: true
        manager7:
          type: string
          nullable: true
        manager8:
          type: string
          nullable: true
        manager9:
          type: string
          nullable: true
        manager10:
          type: string
          nullable: true
        supervisor:
          type: string
          nullable: true
      additionalProperties: false
    AgentImportInformationModel:
      type: object
      properties:
        dynamicData:
          type: object
          additionalProperties: {}
          nullable: true
        iaBrochureSupplementDate:
          type: string
          format: date-time
          nullable: true
        iaBrochureSupplementRequired:
          type: string
          nullable: true
        iaSupervisorName:
          type: string
          nullable: true
        iaSupervisorPhoneNumber:
          type: string
          nullable: true
        iaSupervisorTitle:
          type: string
          nullable: true
      additionalProperties: false
    AgentImportRequest:
      required:
        - profileKey
        - ssn
      type: object
      properties:
        businessAddress:
          $ref: '#/components/schemas/AgentImportAddressModel'
        contact:
          $ref: '#/components/schemas/AgentImportContactModel'
        currentEmployment:
          $ref: '#/components/schemas/AgentImportEmploymentHistoryModel'
        demographic:
          $ref: '#/components/schemas/AgentImportDemographicModel'
        hierarchy:
          $ref: '#/components/schemas/AgentImportHierarchyModel'
        information:
          $ref: '#/components/schemas/AgentImportInformationModel'
        mailingAddress:
          $ref: '#/components/schemas/AgentImportAddressModel'
        profileKey:
          minLength: 1
          type: string
        residentAddress:
          $ref: '#/components/schemas/AgentImportAddressModel'
        ssn:
          minLength: 1
          type: string
      additionalProperties: false
    BulkProfileImport:
      type: object
      properties:
        agent:
          $ref: '#/components/schemas/AgentImportRequest'
        agency:
          $ref: '#/components/schemas/AgencyImportRequest'
      additionalProperties: false
    BulkProfileImportRequest:
      type: object
      properties:
        clientRefId:
          type: string
          format: uuid
        data:
          $ref: '#/components/schemas/BulkProfileImport'
      additionalProperties: false
    BulkStatusResponse:
      type: object
      properties:
        bulkRequestId:
          type: string
          format: uuid
        processingStatus:
          type: string
          nullable: true
        operationDetails:
          $ref: '#/components/schemas/OperationDetails'
      additionalProperties: false
    OperationDetails:
      type: object
      properties:
        status:
          type: string
          nullable: true
        totalItems:
          type: integer
          format: int32
        success:
          type: integer
          format: int32
        failures:
          type: integer
          format: int32
        requestItems:
          type: array
          items:
            $ref: '#/components/schemas/RequestItemStatus'
          nullable: true
      additionalProperties: false
    RequestItemStatus:
      type: object
      properties:
        clientRefId:
          type: string
          format: uuid
        status:
          type: string
          nullable: true
        retryable:
          type: boolean
          nullable: true
        errorMessage:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
