post:
  operationId: nonEmployeeRecordsBulkUpload
  security:
    - oauth2: [idn:nelm:manage]
  tags:
    - Non-Employee Lifecycle Management
  summary: Imports, or Updates, Non-Employee Records
  description: >-
    This post will import, or update, Non-Employee records found in the CSV.

    Request will need the following security scope:

    'idn:nesr:create'
  parameters:
    - in: path
      name: id
      description: >-
        Source Id (UUID)
      required: true
      schema:
        type: string
  requestBody:
    description: The form-data "name" attribute for the file content must be "data". See the schema specification.
    content:
      multipart/form-data:
        schema:
          type: object
          properties:
            data:
              type: string
              format: base64
          required:
            - data
        example: 
            { data: 
              "accountName,firstName,lastName,phone,email,manager,startDate,endDate
              Jon.Smith, Jon, Smith, 555-555-5555, jon@jon.doe.nope.com, Jim Smith, 2020-04-05T08:00:00-10:00, 2020-08-07T19:00:00-10:00
              William.Chaffin, William, Chaffin, 555-555-5555, william@chaffins.nope.com, Bertram Chaffin, 2020-04-05T08:00:00-10:00, 2020-08-07T19:00:00-10:00" 
            }
  responses:
    '202':
      description: >-
        The CSV was accepted to be bulk inserted now or at a later time.
      content:
        application/json:
          schema:
            $ref: '../../beta/schemas/NonEmployeeBulkUploadJob.yaml'
    '400':
      description: |
        Client Error - Returned if the request body is invalid.
        The response body will contain the list of specific errors with one on each line.
      content:
        application/json:
          schema:
            $ref: '../../v3/schemas/ErrorResponseDto.yaml'
    '401':
      $ref: '../../v3/responses/401.yaml'
    '403':
      $ref: '../../v3/responses/403.yaml'
    '404':
      $ref: '../../v3/responses/404.yaml'
    '429':
      $ref: '../../v3/responses/429.yaml'
    '500':
      $ref: '../../v3/responses/500.yaml'
