post:
  operationId: nonEmployeeRequestCreation
  security:
    - oauth2: []
  tags:
    - Non-Employee Lifecycle Management
  summary: Create Non-Employee Request
  description: >-
    This request will create a non-employee request and notify the approver
  requestBody:
    description: Non-Employee creation request body
    required: true
    content:
      application/json:
        schema:
          $ref: '../schemas/NonEmployeeRequestBody.yaml'
  responses:
    '200':
      description: Non-Employee request creation object
      content:
        application/json:
          schema:
            $ref: '../schemas/NonEmployeeRequest.yaml'
    '400':
      description: Client Error - Returned if the request body is invalid.
      content:
        application/json:
          schema:
            $ref: '../../v3/schemas/ErrorResponseDto.yaml'
          examples:
            400.1 Bad Request Content:
              description: Response for bad request content
              value:
                detailCode: 400.1 Bad Request Content
                trackingId: e7eab60924f64aa284175b9fa3309599
                messages:
                  - locale: en
                    localeOrigin: REQUEST
                    text: firstName is required; accountName is required;
            400.1.409 Reference conflict:
              description: Response for reference conflict
              value:
                detailCode: 400.1.409 Reference conflict
                trackingId: e7eab60924f64aa284175b9fa3309599
                messages:
                  - locale: en
                    localeOrigin: REQUEST
                    text: Unable to create Non-Employee because the accountName "existed" is already being used.
    '401':
      $ref: '../../v3/responses/401.yaml'
    '403':
      $ref: '../../v3/responses/403.yaml'
    '429':
      $ref: '../../v3/responses/429.yaml'
    '500':
      $ref: '../../v3/responses/500.yaml'
get:
  operationId: nonEmployeeRequestList
  security:
    - oauth2: []
  tags:
    - Non-Employee Lifecycle Management
  summary: List Non-Employee Requests
  description: >-
    This gets a list of non-employee requests.
  parameters:
    - $ref: '../../v3/parameters/limit.yaml'
    - $ref: '../../v3/parameters/offset.yaml'
    - $ref: '../../v3/parameters/count.yaml'
    - in: query
      name: requested-for
      required: true
      schema:
        type: string
      example: me
      description: >-
        The identity for whom the request was made. *me* indicates the current user.
    - in: query
      name: sorters
      required: false
      schema:
        type: string
        format: comma-separated
      example: approvalStatus,firstName
      description: >-
        Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results)<br/><br/>
        Sorting is supported for the following fields: **created, approvalStatus, firstName, lastName, email, phone, accountName, startDate, endDate**
    - in: query
      name: filters
      required: false
      schema:
        type: string
      example: sourceId eq "2c91808568c529c60168cca6f90c1313"
      description: >-
        Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results)<br/><br/>
        Filtering is supported for the following fields and operators:<br/><br/>
        **sourceId**: *eq* <br/><br/>
        *Example:* sourceId eq "2c91808568c529c60168cca6f90c1313"
  responses:
    '200':
      description: List of non-employee request objects.
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '../schemas/NonEmployeeRequest.yaml'
    '400':
      $ref: '../../v3/responses/400.yaml'
    '401':
      $ref: '../../v3/responses/401.yaml'
    '403':
      $ref: '../../v3/responses/403.yaml'
    '429':
      $ref: '../../v3/responses/429.yaml'
    '500':
      $ref: '../../v3/responses/500.yaml'