openapi: 3.0.0
info:
  title: NSEV WebPortal API
  version: 4.0.0
  contact:
    name: NSEV Support Team
    url: https://connectivegroup.my.site.com/s/contactsupport?language=en_US
  description: >
    **Nitro Sign Enterprise Verified (NSEV) WebPortal API Version 4**


    A comprehensive digital signing API that enables secure document signing
    workflows.

    This API provides endpoints for managing packages, documents, elements,
    stakeholders, 

    and signing processes within the NSEV platform.


    ## Authentication


    This API supports multiple authentication methods:


    ### Basic Authentication

    Traditional HTTP Basic Authentication using username and password.


    ### OAuth 2.0


    **Client Credentials Flow (Machine-to-Machine)**

    - Full API access including administrative endpoints

    - Ideal for server-to-server integrations


    **Authorization Code Flow (User-based)**

    - Limited API access excluding administrative endpoints

    - Ideal for user-facing applications

    - Supports delegated user access scenarios


    ## API Variants


    This specification is available in two variants:

    - **Full API**: Complete API with all endpoints (BasicAuth + OAuth2 M2M)

    - **User API**: Limited API excluding admin endpoints (OAuth2 user-based
    only)


    Administrative endpoints (`/poisonqueue`, `/absenceperiods`, `/auditproofs`)
    are 

    restricted to machine-to-machine authentication only.
        
    ## Versioning


    This API follows semantic versioning principles. Major version changes may
    introduce

    breaking changes, while minor and patch versions maintain backwards
    compatibility.
servers:
  - url: '{baseUrl}/esig/webportalapi/v4'
    variables:
      baseUrl:
        default: https://your-tenant.sign.gonitro.com
        description: >-
          Your tenant-specific base URL, including scheme and host (e.g.
          https://acme.sign.gonitro.com). Each NSEV customer has a unique URL.
          Replace this with yours before sending a request. The esig path
          segment is required - the Web Application Firewall routes requests on
          it.
security:
  - basicAuth: []
  - bearerAuth: []
tags:
  - name: Configuration
    description: |
      Endpoints for retrieving system configuration settings,
      contact groups, templates and signing methods.
  - name: Packages
    description: |
      Core endpoints for creating, managing, and tracking packages
      throughout their lifecycle.
  - name: Documents
    description: |
      Endpoints for adding, removing, and managing documents within packages.
      Handles document upload, processing, and metadata management.
  - name: Elements
    description: |
      Endpoints for managing elements (fields) within documents,
      including signatures and other form elements.
  - name: Stakeholders
    description: |
      Endpoints for managing stakeholders (recipients)
      associated with packages and their roles in the package workflow.
  - name: Actors
    description: |
      Endpoints for managing individual actors within stakeholders,
      including their contact information and role preferences:
      Approver, FormFiller, Signer or Receiver
  - name: Process
    description: |
      Endpoints for managing the package process workflow, including
      process steps, parallel actions, and workflow orchestration.
  - name: AuditTrails
    description: |
      Modern endpoints for retrieving comprehensive audit trails as signed PDFs,
      verifying the integrity of audit trail data and retrieving audit events.
  - name: BulkActions
    description: |
      Endpoints for performing and managing bulk actions on multiple packages.
  - name: Users
    description: |
      Endpoints for managing user accounts, including user invitations.
  - name: AbsencePeriods
    description: |
      Administrative endpoints for managing user absence periods and
      delegation settings during out-of-office scenarios.

      **Access Level**: Machine-to-machine only (administrative access required)
paths:
  /contactGroups:
    get:
      tags:
        - Configuration
      summary: List contact groups
      operationId: listContactGroups
      parameters:
        - $ref: '#/components/parameters/continuationToken'
        - $ref: '#/components/parameters/maxQuantity'
        - $ref: '#/components/parameters/sortOrder'
        - name: sortField
          description: specify on which field to sort
          in: query
          schema:
            type: string
            default: code
            enum:
              - name
              - code
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: Response that contains a number of contact groups
                type: object
                properties:
                  ContinuationToken:
                    $ref: '#/components/schemas/ContinuationToken'
                  Items:
                    type: array
                    description: The list containing the identifiers of all contactGroups
                    items:
                      description: Response for a contact group
                      type: object
                      properties:
                        Code:
                          type: string
                          description: The code of the contact group
                        Name:
                          type: string
                          description: The name of the contact group
                  MaxQuantity:
                    type: integer
                    description: >-
                      The maximum number of results that will be returned per
                      request
                    minimum: 0
                    maximum: 50
                  Total:
                    type: integer
                    description: The total number of results.
              examples:
                contact-groups:
                  summary: OK
                  value:
                    ContinuationToken: '2'
                    Items:
                      - Code: '00001'
                        Name: Sales contacts
                      - Code: '00002'
                        Name: Legal contacts
                    MaxQuantity: 100
                    Total: 2
        '400':
          description: >-
            When the MaxQuantity value was too large or the ContinuationToken
            invalid
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ValidationError'
              examples:
                invalid-request:
                  summary: >-
                    When the MaxQuantity value was too large or the
                    ContinuationToken invalid
                  value:
                    - ErrorCode: Request.UnsupportedValue
                      ErrorMessage: The provided value is not supported.
        '401':
          $ref: '#/components/responses/UnAuthorized'
      description: >-
        Retrieves all contact groups and their codes that are currently
        configured

        in the WebPortal.


        A contact group code can be supplied when creating a package: any member
        of

        that contact group is then able to sign the package on behalf of the
        whole

        group.
  /documentGroups:
    get:
      tags:
        - Configuration
      summary: List document groups
      operationId: listDocumentGroups
      parameters:
        - name: name
          description: The document group name (or part) to search for
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: Response for a list of document groups
                type: object
                properties:
                  DocumentGroups:
                    type: array
                    description: The list of document groups
                    items:
                      description: Response for a document group
                      type: object
                      properties:
                        Code:
                          type: string
                          description: The code of the document group
                        Name:
                          type: string
                          description: The name of the document group
              examples:
                document-groups:
                  summary: OK
                  value:
                    DocumentGroups:
                      - Code: '00001'
                        Name: My Documents
                      - Code: '00007'
                        Name: Contracts
        '401':
          $ref: '#/components/responses/UnAuthorized'
      description: >-
        Lists the document groups that packages and documents can be assigned
        to,

        returning each group's name and code.


        There is always at least one document group - "My Documents" (the name
        may

        differ) with code `00001`. This group is special: documents in it are
        only

        visible to the WebPortal user who uploaded them. For documents uploaded

        through the API, that is the user whose email address was supplied as
        the

        package **Initiator**.


        The `Code` field is a string. Its value may look numeric, but any
        leading

        zeroes are part of the value and must be preserved.
  /languages:
    get:
      tags:
        - Configuration
      summary: List languages
      operationId: listLanguages
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  EnabledLanguages:
                    type: array
                    description: The list of enabled languages
                    items:
                      type: object
                      properties:
                        DisplayName:
                          type: string
                          description: The display name of the language
                        NativeName:
                          type: string
                          description: The native name of the language
                        IsoCultureCode:
                          type: string
                          description: The 2 letter ISO code (ISO 639-1) of the language
              examples:
                languages:
                  summary: OK
                  value:
                    EnabledLanguages:
                      - DisplayName: French
                        NativeName: français
                        IsoCultureCode: fr
                      - DisplayName: Dutch
                        NativeName: Nederlands
                        IsoCultureCode: nl
        '401':
          $ref: '#/components/responses/UnAuthorized'
      description: >-
        Retrieves the languages that are enabled in the NSEV configuration and

        are therefore available in the Portal.


        Useful for integrators that need to know which languages a given
        installation

        offers without duplicating that list in their own configuration.
  /themes:
    get:
      tags:
        - Configuration
      summary: List themes
      operationId: listThemes
      parameters:
        - $ref: '#/components/parameters/continuationToken'
        - $ref: '#/components/parameters/maxQuantity'
        - $ref: '#/components/parameters/sortOrder'
        - name: sortField
          description: specify on which field to sort
          in: query
          schema:
            type: string
            default: code
            enum:
              - name
              - code
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  ContinuationToken:
                    $ref: '#/components/schemas/ContinuationToken'
                  Items:
                    type: array
                    description: The list containing the Themes
                    items:
                      type: object
                      properties:
                        Code:
                          type: string
                          description: The code of the Theme
                        Name:
                          type: string
                          description: The name of the Theme
                  MaxQuantity:
                    type: integer
                    description: >-
                      The maximum number of results that will be returned per
                      request
                  Total:
                    type: integer
                    description: The total number of results.
                example:
                  ContinuationToken: '1'
                  Items:
                    - Name: Nitro Theme
                      Code: '00000'
                    - Name: System Theme
                      Code: '00001'
                    - Name: My theme
                      Code: '00003'
                  MaxQuantity: 20,
                  Total: 3
              examples:
                themes:
                  summary: OK
                  value:
                    ContinuationToken: '2'
                    Items:
                      - Code: '00001'
                        Name: Corporate
                      - Code: '00002'
                        Name: High contrast
                    MaxQuantity: 100
                    Total: 2
        '400':
          description: >-
            When the MaxQuantity value was too large or the ContinuationToken
            invalid
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ValidationError'
              examples:
                invalid-request:
                  summary: >-
                    When the MaxQuantity value was too large or the
                    ContinuationToken invalid
                  value:
                    - ErrorCode: Request.UnsupportedValue
                      ErrorMessage: The provided value is not supported.
        '401':
          $ref: '#/components/responses/UnAuthorized'
      description: >-
        Retrieves all themes and their codes that are currently configured.


        A theme code can be supplied when creating a package; the package will
        then

        be rendered with the requested theming.
  /version:
    get:
      tags:
        - Configuration
      summary: Get version
      operationId: getVersion
      security: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Version information of the NSEV deployment
                properties:
                  ProductVersion:
                    type: string
                    description: >-
                      Product version as shown in the UI. The first two
                      components are the NSEV release (here, v8.4).
                  FileVersion:
                    type: string
                    description: Internal build ID
              examples:
                version:
                  summary: OK
                  value:
                    ProductVersion: 8.4.4
                    FileVersion: 8.4.4-ef8f69b
      description: >-
        Returns the product version and build (file) number of the NSEV
        deployment

        serving your tenant. No authentication is required.


        Use this to check which NSEV release your tenant runs - releases roll
        out to

        tenants gradually, so features marked *Available as of NSEV vX.Y* may
        not be

        on your tenant yet. See the [changelog](/nsev/changelog)

        for what changed in each release.
  /poisonqueue:
    get:
      tags:
        - Queues
      summary: List poison queue
      operationId: listPoisonQueue
      x-excluded: true
      parameters:
        - name: busName
          in: query
          required: false
          description: >-
            The type of the bus from which the messages should be read. If bus
            name is NULL then the application takes DEFAULT bus type.
          schema:
            $ref: '#/components/schemas/BusType'
        - name: includeStackTrace
          in: query
          required: false
          description: Indicates if the stacktrace should be included in each result
          schema:
            type: boolean
            default: false
        - name: page
          in: query
          required: false
          description: The page number to retrieve.
          schema:
            type: integer
            default: 1
        - name: maxQuantity
          in: query
          required: false
          description: The maximum number of items to return.
          schema:
            type: integer
            default: 20
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagingResultOfPoisonCommandResponseItem'
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/UnAuthorized'
    post:
      tags:
        - Queues
      summary: Resubmit poison queue
      operationId: resubmitPoisonQueue
      x-excluded: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResubmitPoisonQueueRequest'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/UnAuthorized'
    delete:
      tags:
        - Queues
      summary: Delete poison queue
      operationId: deletePoisonQueue
      x-excluded: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CleanPoisonQueueRequest'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/UnAuthorized'
  /packages:
    get:
      tags:
        - Packages
      summary: List packages
      operationId: listPackages
      parameters:
        - $ref: '#/components/parameters/pageNumber'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/createdBefore'
        - $ref: '#/components/parameters/createdAfter'
        - $ref: '#/components/parameters/status'
        - $ref: '#/components/parameters/documentGroupCode'
        - $ref: '#/components/parameters/initiator'
        - $ref: '#/components/parameters/packageName'
        - $ref: '#/components/parameters/externalReference'
        - name: batchId
          in: query
          description: Optional package batch identifier to filter packages by.
          schema:
            $ref: '#/components/schemas/Guid'
        - name: sort
          in: query
          description: specify how the result is sorted, default is descending
          schema:
            type: string
            default: desc
            enum:
              - asc
              - desc
        - name: detailed
          in: query
          description: >-
            Specifies whether to return a detailed (true) or a simplified
            (false) list of packages.
          required: false
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/PackageListDetailed'
                  - $ref: '#/components/schemas/PackageListSimple'
        '401':
          $ref: '#/components/responses/UnAuthorized'
      description: >-
        Retrieves all packages that currently exist in NSEV, together with

        their current status. Results are always sorted on creation date.


        Use the `Detailed` query parameter to choose the response shape: when
        `true`

        (the default), each item carries the full package representation
        (identical to

        Get package by ID); when `false`, each item is a simplified summary.
    post:
      tags:
        - Packages
      summary: Create package
      operationId: createPackage
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePackage'
            examples:
              minimal:
                summary: Minimal package (name + initiator)
                value:
                  Name: My first package
                  Initiator: hello@world.test
              super-call:
                summary: >-
                  Super call - package, documents, stakeholders, actors and
                  elements in one request
                value:
                  Name: <string>
                  Initiator: <email>
                  Status: pending
                  ExpiryDate: <date-time>
                  DefaultLegalNotice:
                    Name: <string>
                  Documents:
                    - Name: <string>
                      Language: en
                      ExternalReference: <string>
                      DocumentOptions:
                        TargetType: application/pdf
                        PdfOptions:
                          TargetFormat: pdfa1a
                        Base64data: <string>
                        ContentType: application/pdf
                  Stakeholders:
                    - Type: person
                      Language: en
                      FirstName: <string>
                      LastName: <string>
                      EmailAddress: <email>
                      BirthDate: <date>
                      PhoneNumber: <string>
                      AdditionalProperties:
                        BeId: <string>
                        BeLawyer: <string>
                      Actors:
                        - Type: signer
                          ProcessStep: 0
                          Elements:
                            - Type: signingField
                              DocumentIndex: 0
                              signingMethods:
                                - name: Manual:handwritten
                                  keypair: <string>
                              Location:
                                Page: 2
                                Top: 200
                                Left: 200
                              Dimensions:
                                Width: 200
                                Height: 200
                    - Type: group
                      GroupName: <string>
                      Members:
                        - Language: en
                          FirstName: <string>
                          LastName: <string>
                          EmailAddress: <email>
                          BirthDate: <date>
                        - Language: en
                          FirstName: <string>
                          LastName: <string>
                          EmailAddress: <email>
                          BirthDate: <date>
                      Actors:
                        - Type: signer
                          ProcessStep: 1
                          Elements:
                            - Type: signingField
                              DocumentIndex: 1
                              signingMethods:
                                - name: Manual:handwritten
                                  keypair: <string>
                              Location:
                                Page: 2
                                Top: 200
                                Left: 200
                              Dimensions:
                                Width: 200
                                Height: 200
                  ThemeCode: string
                  CallBackUrl: https://callback.test
                  NotificationCallBackUrl: https://notifications.test
                  DefaultRedirectUrl: <string>
                  F2fRedirectUrl: <string>
                  IsUnsignedContentDownloadable: true
                  IsReassignEnabled: false
                  ExternalReference: myFirstPackage
                  ActionUrlExpirationPeriodInDays: 7
                  ProofCorrelationId: <string>
                  AddInitiatorAsReceiver: false
                  MustBeArchived: true
                  ArchiveAuditProofs: false
                  ArchiveAuditTrail: false
                  AutomaticReminder:
                    IsSendAutomaticRemindersEnabled: true
                    DaysBeforeFirstReminder: 2
                    IsRepeatRemindersEnabled: true
                    RepeatReminders: 3
                  ExpirationReminder:
                    IsSendExpirationRemindersEnabled: true
                    DaysBeforeExpirationReminder: 2
                  OtpAuthenticationSetting:
                    IsSmsOtpAuthenticationEnabled: false
                    IsMailOtpAuthenticationEnabled: true
              from-template:
                summary: Create package from a template
                value:
                  Name: <string>
                  Initiator: <email>
                  TemplateCode: <string>
                  ExternalReference: <string>
                  SingleMarkerMatchPerElement: <boolean>
      responses:
        '201':
          $ref: '#/components/responses/PackageCreated'
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '409':
          description: The package could not be created.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Creates a package and, optionally, everything it contains in a single
        request.


        A package is the central object in NSEV: a container for one or more

        documents that are sent for signing, together with the stakeholders and
        actors

        who act on them.


        There are two ways to create a package:


        - **Build it up incrementally.** In its simplest form this call needs
        only the
          package `Name` and the `Initiator`. The package is created empty (status
          `Draft`) and you add documents, elements, stakeholders, actors and process
          steps afterwards with their respective calls.
        - **Super call.** Define every object in one request, mimicking the
        "Instant
          Package" behaviour of API v3: create the package, add documents, elements,
          stakeholders, actors and the process all at once. (Not applicable when
          creating from a template.)

        When building a super call with multiple documents, you have not yet
        received

        the document IDs, so elements reference their target document by
        position

        using `DocumentIndex` (0 = first document in the call, 1 = second, and
        so on).


        **Creating from a template.** Pass a `TemplateCode` to create a package
        that

        is pre-populated from a saved template. When a template code is used,
        the only

        other mandatory parameter is `Initiator`; `Name`, `ExternalReference`
        and

        `ProofCorrelationId` are optional, and all other package settings are
        taken

        from the template (any values you pass for them are overwritten by the

        template).


        **Size limitations**


        - A package must not exceed 150 MB.

        - A package must not contain more than 15 documents, and each document
        must
          not exceed 30 MB.
        - An `.xml` file must not contain more than 2 million characters, and a
          package must not contain more than 15 `.xml` files.
        - Large files may affect signing performance depending on the signer's
          internet connection.

        API requests never trigger a callback; callbacks fire only on end-user

        actions in the Portal or Signer application.
  /packages/{packageId}:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
    get:
      tags:
        - Packages
      summary: Get package
      operationId: getPackage
      responses:
        '200':
          description: Package was found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Package'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
      description: >-
        Retrieves a single package by its unique identifier, including its
        documents,

        stakeholders, actors, elements and current status.
    delete:
      tags:
        - Packages
      summary: Delete package
      operationId: deletePackage
      parameters:
        - in: query
          name: delayedDeletionTime
          description: >-
            Number of days after the package is deleted before its audit proofs
            are

            deleted as well. When omitted, the **Delayed Deletion Time** value
            from the

            Configuration Index applies. Pass `0` to keep the audit proofs
            indefinitely

            until a manual Delete audit proofs call is made.
          required: false
          schema:
            type: integer
      responses:
        '204':
          description: Package was deleted
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
        '409':
          description: Package could not be deleted
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Deletes a package from the database.


        NSEV never deletes packages automatically: once a package reaches a

        final state it is stored indefinitely until you delete it with this
        call.


        A package can only be deleted when its status is `draft` or one of the
        final

        states `finished`, `archived`, `rejected` or `revoked`. Deleting a
        package in

        any other state returns `409 Conflict` (`Package.InvalidStatus`).
  /packages/{packageId}/elements/actionurl:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
    get:
      tags:
        - Elements
      summary: Get elements action url
      operationId: getElementsActionUrl
      parameters:
        - in: query
          name: isIframe
          description: Indicates whether the package elements editor opens in an iframe.
          required: false
          schema:
            type: boolean
        - in: query
          name: redirectUrl
          description: The URL to call upon cancellation or confirmation.
          required: false
          schema:
            type: string
            format: url
        - in: query
          name: language
          description: The package elements editor language.
          required: false
          schema:
            $ref: '#/components/schemas/Language'
      responses:
        '200':
          description: The package elements editor url was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Package.PlaceElementsActionUrlResult'
              examples:
                action-url-created:
                  summary: The package elements editor url was created
                  value:
                    ActionUrl: https://example.gonitro.com/esig/elements/abc123
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: Target package could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PackageNotFoundError'
        '409':
          description: Unable to create action url
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Retrieves a one-time action URL that lets an end user open the Package
        Elements Editor

        and drag and drop placed and unplaced elements onto the package's
        documents.


        The returned URL can be opened directly or embedded in an iframe (set
        the `isIframe`

        query parameter). Provide a `redirectUrl` to control where the user is
        sent after they

        confirm or cancel, and `language` to set the editor's display language.
  /packages/{packageId}/expirydate:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
    get:
      tags:
        - Packages
      summary: Get package expiry date
      operationId: getPackageExpiryDate
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpiryDate'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
      description: >-
        Retrieves the expiry date of a package - the moment after which the
        package

        and all documents within it can no longer be form filled, approved or
        signed.
    put:
      tags:
        - Packages
      summary: Update package expiry date
      operationId: updatePackageExpiryDate
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExpiryDate'
            examples:
              expiry-date:
                summary: New expiry date
                value: '2020-01-25T13:00:00.000Z'
      responses:
        '204':
          description: package's expiry date was updated
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
        '409':
          description: Exiry date of package couldn't be updated
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Updates the expiry date of a package. Extending the expiry date makes a

        package that had already expired available again. Documents within the
        package

        always expire on the same date as the package.


        The request body is the new expiry date as an ISO 8601 date-time value.
  /packages/{packageId}/status:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
    get:
      tags:
        - Packages
      summary: Get package status
      operationId: getPackageStatus
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Package.StatusResponse'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
      description: Retrieves the current status of a package.
    put:
      tags:
        - Packages
      summary: Update package status
      operationId: updatePackageStatus
      requestBody:
        content:
          application/json:
            schema:
              type: string
              description: The status of a package
              enum:
                - pending
                - revoked
            examples:
              revoke:
                summary: Revoke a pending package
                value: revoked
              send:
                summary: Send a draft package for signing
                value: pending
      responses:
        '204':
          description: package's status was updated
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
        '409':
          description: Status of package couldn't be updated
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Updates the status of a package. Only two transitions are supported:


        - **Draft → Pending.** When the package is ready, set it to `pending` to
        send
          it to the stakeholders. The package then becomes visible to each stakeholder
          in their Signer Portal.
        - **Pending → Revoked.** A package that has been sent but not yet
          completed - or whose signing has failed - can be revoked. Once revoked,
          stakeholders can no longer act on it.

        The new status is the request body itself (for example `"pending"`), not
        a

        named field: send only the bare value, not `{"Status": "pending"}`.
  /packages/{packageId}/documents/orderindices:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
    put:
      tags:
        - Packages
      summary: Update package document order
      operationId: updatePackageDocumentOrder
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrderIndices'
            examples:
              reorder:
                summary: Reorder documents in a draft package
                value:
                  Documents:
                    - DocumentId: 6DC70FA5-05D3-4185-ACE3-2A9833D48361
                      OrderIndex: 2
                    - DocumentId: 31A445ED-9897-4436-8CF3-721787938631
                      OrderIndex: 1
      responses:
        '204':
          description: Order indices were updated
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
      description: >-
        Updates the order of the documents in a draft package. Provide each
        document's

        ID together with the order index it should take.
  /packages/{packageId}/warnings:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
    get:
      tags:
        - Packages
      summary: Get package warnings
      operationId: getPackageWarnings
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Warning'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
      description: >-
        Retrieves all warnings about a package, such as missing data. The
        response is

        a list of warnings; warnings whose `ResourceType` is `process`
        additionally

        identify the stakeholder and actor involved.
  /packages/{packageId}/reminders:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
    post:
      tags:
        - Packages
      summary: Send package reminders
      operationId: sendPackageReminders
      responses:
        '204':
          description: OK
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
        '409':
          description: Package has the wrong status
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Sends a reminder to the actors in the current process step who have not
        yet

        form filled, approved or signed.


        Only the next available form filler(s), approver(s) or signer(s) in the

        workflow are notified. In a serial workflow, actors who are still
        waiting for

        someone else to act first do not receive a reminder.


        The package must have status `Pending`; otherwise the call returns

        `409 Conflict`.
  /packages/{packageId}/skipapprovers:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
    post:
      tags:
        - Packages
      summary: Skip approvers
      operationId: skipApprovers
      responses:
        '200':
          description: OK
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
        '409':
          description: Package has the wrong status
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Skips all approvers that have not yet approved and sets their status to

        `Skipped`, which marks the whole package as `Pending`: the package then
        becomes

        available to the signers, so you no longer need to wait for every
        approver to

        finish. The package must be in the pending-approval stage; whether any
        approver

        has already approved does not matter.


        If the package was created with notifications enabled, all approvers are

        notified that the package has been sent to the signers.


        When you skip approvers through the API, no information about who
        skipped them

        is added to the audit proofs. Use the Add proof from external source
        call to

        record that yourself.
  /packages/{packageId}/skipsigners:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
    post:
      tags:
        - Packages
      summary: Skip signers
      operationId: skipSigners
      responses:
        '200':
          description: OK
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
        '409':
          description: Package has the wrong status
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Skips all signers that have not yet signed and sets their status to
        `Skipped`,

        which marks the whole package as `Finished`: the package then becomes
        available

        for download without waiting for every signer. The package must be in
        the

        pending-signing stage; whether any signer has already signed does not
        matter.


        If the package was created with notifications enabled, all signers are

        notified that they can download the ended package.


        When you skip signers through the API, no information about who skipped
        them is

        added to the audit proofs. Use the Add proof from external source call
        to

        record that yourself.
  /packages/{packageId}/template:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
    post:
      tags:
        - Packages
      summary: Create template from package
      operationId: applyPackageTemplate
      requestBody:
        description: Parameters for creating a template
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTemplateFromPackage'
            examples:
              template-name:
                summary: Name for the new template
                value:
                  TemplateName: <string>
      responses:
        '200':
          description: The template has been created
          content:
            application/json:
              schema:
                type: object
                description: string
                properties:
                  TemplateCode:
                    type: string
              examples:
                template-created:
                  summary: The template has been created
                  value:
                    TemplateCode: <string>
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
      description: >-
        Saves a draft package as a reusable template. Everything that defines
        the

        package - its documents, stakeholders and so on - is stored as part of
        the

        template, so you can generate templates on the fly as part of an
        automated

        flow. The template name must be unique within its document group.
  /packages/{packageId}/download:
    get:
      tags:
        - Packages
      summary: Download package
      operationId: downloadPackage
      parameters:
        - $ref: '#/components/parameters/packageIdPathParam'
      responses:
        '200':
          description: The package's contents in a zip file
          content:
            application/zip:
              schema:
                type: string
                format: binary
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
        '409':
          description: When the package has not been fully signed
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
              example:
                - ErrorCode: Package.InvalidStatus:pending
                  ErrorMessage: >-
                    Could not perform operation on package with id
                    [c63e886c-1980-4d83-8d5b-03acdebc38dd] because status is
                    [pending]
      description: >-
        Downloads all documents in a package as a single `.zip` file. Only
        finished

        and archived packages can be downloaded; other states return `409
        Conflict`.
  /packages/actors:
    get:
      tags:
        - Packages
      summary: Get actors for a user
      parameters:
        - $ref: '#/components/parameters/emailAddressQueryParam'
        - name: status
          in: query
          description: The status of actors to retrieve
          schema:
            type: string
            enum:
              - Available
              - Finished
              - Rejected
              - Failed
        - name: type
          in: query
          description: The type of actors to retrieve
          schema:
            type: string
            enum:
              - Signer
              - Receiver
              - Approver
              - FormFiller
        - $ref: '#/components/parameters/pageNumber'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/createdBefore'
        - $ref: '#/components/parameters/createdAfter'
        - name: sort
          in: query
          description: specify how the result is sorted, default is descending
          schema:
            type: string
            default: desc
            enum:
              - asc
              - desc
      responses:
        '200':
          description: List of actors across packages for given person.
          content:
            application/json:
              schema:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/PagingResult'
                    - type: object
                      properties:
                        Items:
                          type: array
                          items:
                            $ref: '#/components/schemas/PackagesActorsInfoResult'
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/UnAuthorized'
      description: >-
        Retrieves all actors across packages for a specific user, identified by
        email

        address. Use the query parameters to page and to filter by status, actor
        type,

        creation date and sort order.
  /packages/{packageId}/documents:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
    get:
      tags:
        - Documents
      summary: List documents
      operationId: listDocuments
      parameters:
        - $ref: '#/components/parameters/status'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Document'
        '401':
          $ref: '#/components/responses/UnAuthorized'
      description: >-
        Retrieves all documents that currently exist within the specified
        package.


        Use the `status` query parameter to return only documents that currently
        have a

        given status.
    post:
      tags:
        - Documents
      summary: Add document
      operationId: createDocument
      parameters:
        - in: query
          name: async
          schema:
            type: boolean
            default: false
          description: >-
            This parameter allows to upload and process the document
            asynchronously. If set to true the location header will contain a
            uri that allows to monitor the process.
      requestBody:
        $ref: '#/components/requestBodies/CreateDocument'
      responses:
        '201':
          $ref: '#/components/responses/DocumentCreated'
        '202':
          description: Accepted, the document will be processed asynchronously
          headers:
            Location:
              description: The package information location
              schema:
                type: string
                format: url
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
        '409':
          description: Document could not be added to the package
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Adds a document to an existing package. After the document is added you
        can build it

        out further by adding elements (signing fields, checkbox fields, text
        box fields and

        radio groups) in separate calls, or you can supply everything in this
        single call by

        including the `Elements` array.


        Documents can be added synchronously or asynchronously, selected with
        the `async`

        query parameter:


        - **Synchronous** (`async=false`, the default): the call blocks until
        the document has
          been uploaded and processed, then returns `201 Created` with the created document.
        - **Asynchronous** (`async=true`): the call returns `202 Accepted`
        immediately with a
          `Location` header pointing at the package, and the document is processed in the
          background. Poll the package (Get package by ID) until its status is `Draft` before
          continuing to work on it. Asynchronous upload also enables the `KeepSignatures`,
          `KeepSigningFields` and `KeepFormFields` options under `DocumentOptions`, which let
          you preserve signatures and detected field markers found in the uploaded file.

        A document can also be marked optional. Optional documents let a package
        mix mandatory

        and optional documents; end users may then choose not to fill in or sign
        the optional

        ones while still completing the mandatory ones.


        The request accepts either `application/json` (with the file supplied as
        Base64 in

        `DocumentOptions.Base64data`) or `multipart/form-data` (with the file
        attached as the

        `Document` part and an optional `Representation` part). The multipart
        form takes the

        same parameters as the JSON body except that `ContentType` and
        `Base64data` are not

        used - the file is the attached part instead.


        **Package size and content limits:**


        - A package must not exceed 150 MB.

        - A package must not contain more than 15 documents, and each document
        must not exceed
          30 MB.
        - An XML file must not contain more than 2 million characters, and a
        package must not
          contain more than 15 XML files.
        - A PDF document's physical dimensions must not exceed 3.99 m by 3.99 m.

        - A package cannot contain both XML documents and PDF documents on which
        signatures
          will be placed. The package type is determined by the first uploaded document.
        - Large files may slow signing depending on the end user's connection.


        **PDF handling notes:**


        - PDF/A uploads are only allowed when the format is `pdfa1a` or
        `pdfa2a`. Adding form
          fields to a PDF/A document breaks the "/A" conformance, leaving a regular PDF; to
          recover PDF/A, set `DocumentOptions.PdfOptions.TargetFormat` to `pdfa1a` or `pdfa2a`
          so the document is reconverted after all fields are filled or saved.
        - Rotated PDFs should not be combined with text markers: detected
        signature locations
          are not rotated to match the text direction and are placed near the marker on a
          best-effort basis.
        - When an uploaded PDF contains text fields whose name matches the
        configured Text
          Field format, those fields are converted to empty signature fields and the original
          text field is not displayed. This does not apply to documents that already contain
          one or more signatures.
        - Signature and text field names in uploaded PDFs must contain only
        letters and numbers; special characters such as accented
          letters, slashes and dots are not supported.

        **PDF error handling** is controlled by
        `DocumentOptions.PdfOptions.PdfErrorHandling`.

        Some PDFs have minor flaws that prevent signing; depending on this value
        and the server

        configuration, PDFs are checked and optionally fixed. A PDF that already
        contains

        signatures is never fixed, because fixing it would invalidate those
        signatures. See the

        property description for the meaning of each value.
  /packages/{packageId}/documents/{documentId}:
    parameters:
      - $ref: '#/components/parameters/documentIdPathParam'
      - $ref: '#/components/parameters/packageIdPathParam'
    get:
      tags:
        - Documents
      summary: Get document
      operationId: getDocument
      responses:
        '200':
          description: document was found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: Target package or document could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/PackageNotFoundError'
                    - $ref: '#/components/schemas/DocumentNotFoundError'
      description: Retrieves a single document from a package by its document ID.
    delete:
      tags:
        - Documents
      summary: Delete document
      operationId: deleteDocument
      responses:
        '204':
          description: Document was deleted
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: Target package or document with id could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/PackageNotFoundError'
                    - $ref: '#/components/schemas/DocumentNotFoundError'
        '409':
          description: Document could not be deleted
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Deletes a document from a package. The document can only be deleted
        while the

        package is in the `Draft`, `Processing` or `ProcessingFailed` status.
  /packages/{packageId}/documents/{documentId}/actions:
    parameters:
      - $ref: '#/components/parameters/documentIdPathParam'
      - $ref: '#/components/parameters/packageIdPathParam'
    post:
      tags:
        - Documents
      summary: Confirm document actions
      operationId: confirmDocumentActions
      requestBody:
        $ref: '#/components/requestBodies/ConfirmDocumentActionsRequest'
      responses:
        '204':
          description: Document is in Draft status, no action required
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.DocumentInPackage'
        '409':
          description: Unable to perform actions on the document
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Performs keep/remove actions on a document that is not yet fully
        processed - for

        example a document uploaded through the Document Portal that still
        contains existing

        signatures, form fields or signing field markers.


        When such a document is fetched (Get document), its `IsActionNeeded`
        flag is `true`,

        and `HasSignatures`, `HasSigningFields` and `HasFormFields` indicate
        what was detected.

        Use this call to decide which of those to keep, after which the document
        moves to

        `Draft` status and is fully processed.


        `KeepSignatures` and `KeepFormFields` are mutually exclusive: a document
        cannot keep

        existing signatures and use form fields at the same time, so these two
        cannot both be

        `true` in one request.
  /packages/{packageId}/download/{documentId}:
    get:
      tags:
        - Documents
      summary: Download document
      operationId: downloadDocument
      parameters:
        - $ref: '#/components/parameters/packageIdPathParam'
        - $ref: '#/components/parameters/documentIdPathParam'
      responses:
        '200':
          description: The specified document in a pdf or xml file
          content:
            application/pdf:
              schema:
                type: string
                format: binary
            application/xml:
              schema:
                type: string
                format: byte
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: Target package or document with id could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/PackageNotFoundError'
                    - $ref: '#/components/schemas/DocumentNotFoundError'
        '409':
          description: When the package has not been fully signed
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
              example:
                - ErrorCode: Package.InvalidStatus:pending
                  ErrorMessage: >-
                    Could not perform operation on package with id
                    [c63e886c-1980-4d83-8d5b-03acdebc38dd] because status is
                    [pending]
      description: >-
        Downloads a single document from a package as a PDF or XML file. A
        document can only be

        downloaded once the package is fully finished.
  /packages/{packageId}/documents/{orderIndex}:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
      - name: orderIndex
        required: true
        in: path
        description: The index of the document within the package
        schema:
          type: integer
          minimum: 0
          description: >
            The index of the new document within the package. Documents with
            this index or greater are pushed back.
    get:
      tags:
        - Documents
      summary: Get document by order index
      operationId: getDocumentByOrderIndex
      responses:
        '200':
          description: document was found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: Target package or document with id could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/PackageNotFoundError'
                    - $ref: '#/components/schemas/DocumentNotFoundError'
      description: >-
        Retrieves a single document from a package by its order index - the
        position that

        defines how documents are sorted within the package. The order index
        must be a

        positive integer.
  /packages/{packageId}/unplacedElements:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
    get:
      tags:
        - Elements
      summary: List unplaced elements
      operationId: listUnplacedElements
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UnplacedElementResult'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
      description: >-
        Retrieves all unplaced elements that currently exist on the specified
        package.


        An unplaced element is an element that has been created on the package
        but not yet

        positioned on a specific document. Unplaced elements can later be placed
        using the

        Package Elements Editor (see Get elements action url) or by creating a
        placed element

        that references them.
    post:
      tags:
        - Elements
      summary: Create unplaced element
      operationId: createUnplacedElement
      requestBody:
        description: Collection of unplaced elements to be added to the package.
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/UnplacedElement'
            examples:
              unplaced-mixed:
                summary: Create unplaced signing field and text box
                value:
                  - Type: SigningField
                    ExternalReference: Field1
                    SigningMethods:
                      - manual
                    LegalNotice:
                      Text: Read and approved
                  - Type: TextBoxField
                    Name: TextBox1
                    Label: textBoxLabel
                    ToolTipLabel: textBoxTooltip
                    IsRequired: true
                    ExternalReference: Field3
                    DefaultValue: something
                    IsMultiline: true
                    CharLimit: 200
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UnplacedElementResult'
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
        '409':
          description: Unplaced elements could not be created for the package
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Creates one or more unplaced elements on the specified package. The
        request body is an

        array; each entry creates one unplaced element.


        An unplaced element is created on the package without a position on a
        document. It can

        later be positioned with the Package Elements Editor (see Get elements
        action url) or

        by creating a placed element that references it.


        Four element types can be created, selected by the `Type` field on each
        entry:

        signing fields, check box fields, text box fields and radio groups.
        Because unplaced

        elements carry no position, only the type-specific content (signing
        methods, legal

        notice, form-field name/label, radio options, and so on) is supplied -
        never a

        location, dimensions, marker or field identifier.
  /packages/{packageId}/unplacedElements/{elementId}:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
      - $ref: '#/components/parameters/elementIdPathParam'
    get:
      tags:
        - Elements
      summary: Get unplaced element
      operationId: getUnplacedElement
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnplacedElementResult'
              example:
                Type: signingField
                SigningMethods:
                  - manual
                LegalNotice: null
                Text: read and approved
                Id: C923F37A-DD9F-4877-B81C-40F2940C51B0
                ActorId: 4F2C1AED-DAE3-44F5-9879-0E3FFF9ED0B8
                Status: Pending
                ExternalReference: external reference example
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: Target package or element with id could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/PackageNotFoundError'
                    - $ref: '#/components/schemas/ElementNotFoundError'
      description: >-
        Retrieves a single unplaced element on the specified package by its
        element ID.
    delete:
      tags:
        - Elements
      summary: Delete unplaced element
      operationId: deleteUnplacedElement
      responses:
        '204':
          description: UnplacedElement was deleted
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: Target package or element with id could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/PackageNotFoundError'
                    - $ref: '#/components/schemas/ElementNotFoundError'
        '409':
          description: Element could not be deleted
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Deletes a single unplaced element from the specified package. The
        package must be in

        the `Draft` status; deleting an unplaced element from a package in
        another status

        fails.
  /packages/{packageId}/documents/{documentId}/elements:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
      - $ref: '#/components/parameters/documentIdPathParam'
    get:
      tags:
        - Elements
      operationId: listDocumentElements
      summary: List document elements
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                description: The elements on a document
                items:
                  $ref: '#/components/schemas/Element'
              example:
                - Id: 00000000-0000-0000-0000-000000000000
                  ActorId: 00000000-0000-0000-0000-000000000000
                  Type: signingField
                  Location:
                    Page: 1
                    Top: 200
                    Left: 200
                  Dimensions:
                    Width: 200
                    Height: 200
                - Id: 00000000-0000-0000-0000-000000000001
                  ActorId: 00000000-0000-0000-0000-000000000000
                  Type: TextBoxField
                  Name: TextBox1
                  Label: Empty textbox
                  IsRequired: false
                  IsMultiline: false
                  Value: null
                  DefaultValue: null
                  CharLimit: 115
                  Location:
                    Page: 1
                    Top: 200
                    Left: 200
                  Dimensions:
                    Width: 200
                    Height: 200
                  ExternalReference: my_checkboxfield
                - Id: 00000000-0000-0000-0000-000000000002
                  ActorId: 00000000-0000-0000-0000-000000000000
                  Type: CheckBoxField
                  Name: CheckBox1
                  Label: To be checked
                  IsRequired: true
                  Checked: null
                  DefaultValue: false
                  Location:
                    Page: 1
                    Top: 200
                    Left: 200
                  Dimensions:
                    Width: 200
                    Height: 200
                  ExternalReference: my_checkboxfield
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: Target package or document with id could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/PackageNotFoundError'
                    - $ref: '#/components/schemas/DocumentNotFoundError'
      description: >-
        Retrieves all elements that currently exist on the specified document
        within the

        specified package.
    post:
      tags:
        - Elements
      summary: Create element
      operationId: createElement
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateElement'
            examples:
              signingfield-coordinates:
                summary: SigningField with explicit location and dimensions
                value:
                  Type: SigningField
                  ExternalReference: Signature1
                  SigningMethods:
                    - manual
                  LegalNotice:
                    Text: Read and approved
                  Location:
                    Page: 2
                    Top: 200
                    Left: 200
                  Dimensions:
                    Width: 200
                    Height: 200
              textboxfield-marker:
                summary: TextBoxField placed on a text marker
                value:
                  Type: TextBoxField
                  Name: Textbox1
                  Label: textBoxLabel
                  ToolTipLabel: Enter text here
                  IsRequired: false
                  DefaultValue: Hello
                  IsMultiline: true
                  CharLimit: 100
                  Marker: '@TXT01'
              checkboxfield-coordinates:
                summary: CheckBoxField with explicit location and dimensions
                value:
                  Type: CheckBoxField
                  Name: Checkbox10
                  ToolTipLabel: Optional
                  IsRequired: false
                  DefaultValue: false
                  Location:
                    Page: 1
                    Top: 230
                    Left: 300
                  Dimensions:
                    Width: 12
                    Height: 12
              radiogroup-coordinates:
                summary: RadioGroup with options at explicit locations
                value:
                  Type: RadioGroup
                  Name: Radio group
                  ToolTipLabel: Make a choice
                  IsRequired: true
                  Options:
                    - Name: one
                      Label: RadioGroup one label
                      IsSelected: true
                      Location:
                        Page: 1
                        Top: 700
                        Left: 10
                      Dimensions:
                        Width: 18
                        Height: 18
                    - Name: two
                      Label: RadioGroup two label
                      IsSelected: false
                      Location:
                        Page: 1
                        Top: 700
                        Left: 30
                      Dimensions:
                        Width: 18
                        Height: 18
                    - Name: three
                      Label: RadioGroup three label
                      IsSelected: false
                      Location:
                        Page: 1
                        Top: 700
                        Left: 50
                      Dimensions:
                        Width: 18
                        Height: 18
              comboboxfield-coordinates:
                summary: >-
                  ComboBoxField with explicit location and dimensions (NSEV
                  v8.5+)
                value:
                  Type: ComboBoxField
                  Name: Dropdown1
                  Label: Select a country
                  ToolTipLabel: Pick your country
                  IsRequired: true
                  Options:
                    - DisplayLabel: United States
                      ExportValue: US
                    - DisplayLabel: United Kingdom
                      ExportValue: UK
                  AllowCustomInput: false
                  DefaultValue: US
                  Location:
                    Page: 1
                    Top: 400
                    Left: 100
                  Dimensions:
                    Width: 150
                    Height: 20
              fieldid:
                summary: Convert an existing PDF form field into a signing field
                value:
                  Type: SigningField
                  SigningMethods:
                    - manual
                  FieldId: Signature_es_:signer1
      responses:
        '201':
          description: New element was created
          headers:
            Location:
              description: Location of the newly created element
              schema:
                type: string
                format: url
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Element'
              example:
                Type: signingField
                SigningMethods:
                  - manual
                  - beid
                LegalNotice:
                  Text: read and approved
                Location:
                  Page: 2
                  Top: 200
                  Left: 200
                Dimensions:
                  Width: 200
                  Height: 200
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: Target package or document with id could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/PackageNotFoundError'
                    - $ref: '#/components/schemas/DocumentNotFoundError'
        '409':
          description: element could not be added
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Adds one element to an existing document. The element type is chosen
        with the `Type`

        field, which can be one of five values:


        - **SigningField** - marks where a signature must be placed. Signing
        fields are always
          mandatory.
        - **TextBoxField** - a text input the end user can fill in. May carry a
        prefilled
          default value and may be mandatory or optional.
        - **CheckBoxField** - a checkbox the end user can toggle. May be checked
        by default and
          may be mandatory or optional.
        - **RadioGroup** - a group of radio buttons (the individual buttons are
        the group's
          `Options`). May have a button selected by default and may be mandatory or optional.
        - **ComboBoxField** - a dropdown the end user picks an option from,
        optionally allowing
          a custom typed value. Available as of NSEV v8.5.

        An element is positioned in one of the ways described on the placement
        schemas: with an

        explicit `Location` and `Dimensions`, with a text `Marker`, or with a
        `FieldId` that

        references an existing form field in the uploaded document. A signing
        field signed only

        with the server signing method can also be created invisible, with no
        position at all.

        An element can instead be created from an existing unplaced element by
        supplying its

        `UnplacedElementId`.


        Keep the number of signing fields per document within the recommended

        maximum of 25: exceeding it does not fail the request, but raises a
        warning on

        the package.


        When the request references a marker or an existing form field (`Marker`
        or `FieldId`),

        it is recommended to add the element at document-upload time: after a
        document

        conversion the referenced marker or field may no longer exist.
  /packages/{packageId}/documents/{documentId}/elements/{elementId}:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
      - $ref: '#/components/parameters/documentIdPathParam'
      - $ref: '#/components/parameters/elementIdPathParam'
    get:
      tags:
        - Elements
      summary: Get element by id
      operationId: getElementById
      responses:
        '200':
          description: elements was found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Element'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: Target package, document or element with id could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/PackageNotFoundError'
                    - $ref: '#/components/schemas/DocumentNotFoundError'
                    - $ref: '#/components/schemas/ElementNotFoundError'
      description: Retrieves a single element on the specified document by its element ID.
    delete:
      tags:
        - Elements
      summary: Delete element
      operationId: deleteElement
      responses:
        '204':
          description: Element was deleted
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: Target package, document or element with id could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/PackageNotFoundError'
                    - $ref: '#/components/schemas/DocumentNotFoundError'
                    - $ref: '#/components/schemas/ElementNotFoundError'
        '409':
          description: Element could not be deleted
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Deletes a single element from the specified document. The package must
        be in the

        `Draft` status; deleting an element from a package in another status
        fails.
  /packages/{packageId}/stakeholders:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
    get:
      tags:
        - Stakeholders
      summary: List stakeholders
      operationId: listStakeholders
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Stakeholder'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
      description: >-
        Retrieves all stakeholders that currently exist within the specified
        package.


        Results are ordered by each stakeholder's position in the signing
        sequence

        (actor order), then alphabetically by display name. Each stakeholder
        carries its

        actors (the actions that stakeholder must take); see Create stakeholder
        for the

        full stakeholder model.
    post:
      tags:
        - Stakeholders
      summary: Create stakeholder
      operationId: createStakeholder
      requestBody:
        description: Parameters for creating a stakeholder
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateStakeholder'
      responses:
        '201':
          description: Stakeholder was created
          headers:
            Location:
              description: Location of the newly created stakeholder
              schema:
                type: string
                format: url
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/Stakeholder'
              example:
                Id: 00000000-0000-0000-0000-000000000000
                PackageId: 00000000-0000-0000-0000-000000000000
                Type: group
                Actors:
                  - Id: 00000000-0000-0000-0000-000000000000
                    Type: signer
                    Status: available
                    MemberLinks:
                      - Email: zu@li.test
                        Link: https://dothething.test
                      - Email: john@doe.test
                        Link: https://alsocompleteyouraction.test
                GroupName: string
                Members:
                  - Language: en
                    FirstName: John
                    LastName: Doe
                    EmailAddress: john@doe.test
                    BirthDate: '1990-01-16'
                  - Language: en
                    FirstName: Zu
                    LastName: Li
                    EmailAddress: zu@li.test
                    BirthDate: '1991-03-14'
                    AdditionalProperties:
                      BeId: '12345678900'
                      BeLawyer: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
        '409':
          description: Stakeholder could not be added to the package
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Creates a stakeholder and adds it to the specified package. A
        stakeholder is an

        entity that has an interest in a package; a single stakeholder may carry
        multiple

        actors (the actions it must take, such as filling forms, approving,
        signing or

        receiving).


        Three types of stakeholder can be created, selected with the `Type`
        property:


        - **person** - a single individual. Only that person can act on the
        package.

        - **group** - a group of people, defined inline through `Members`. Any
        member can
          form fill, approve or sign on behalf of the whole group, and each member
          receives a unique URL. As soon as one member acts, the others can no longer act.
        - **contactGroup** - references a contact group already created in the
        NSEV
          WebPortal by its `ContactGroupCode`, instead of listing members inline. It
          behaves like a group stakeholder. A contactGroup stakeholder only exists while
          the package is in draft; once the package moves to pending it is converted to a
          **group** stakeholder, while the contact group code is retained.

        Actors can be supplied inline through `Actors`. The actor parameters are
        the same

        as for Create actor.
  /packages/{packageId}/stakeholders/{stakeholderId}:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
      - $ref: '#/components/parameters/stakeholderIdPathParam'
    get:
      tags:
        - Stakeholders
      summary: Get stakeholder
      operationId: getStakeholder
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Stakeholder'
              example:
                Id: 00000000-0000-0000-0000-000000000000
                PackageId: 00000000-0000-0000-0000-000000000000
                Type: group
                Actors:
                  - Id: 00000000-0000-0000-0000-000000000000
                    Type: signer
                    Status: available
                    MemberLinks:
                      - Email: zu@li.test
                        Link: https://dothething.test
                      - Email: john@doe.test
                        Link: https://alsocompleteyouraction.test
                GroupName: Group123
                Members:
                  - Language: en
                    FirstName: John
                    LastName: Doe
                    EmailAddress: john@doe.test
                    BirthDate: '1990-01-16'
                  - Language: en
                    FirstName: Zu
                    LastName: Li
                    EmailAddress: zu@li.test
                    BirthDate: '1991-03-14'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: Target package or stakeholder with id could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/PackageNotFoundError'
                    - $ref: '#/components/schemas/StakeholderNotFoundError'
      description: Retrieves a single stakeholder from a package by its stakeholder ID.
    delete:
      tags:
        - Stakeholders
      summary: Delete stakeholder
      operationId: deleteStakeholder
      responses:
        '204':
          description: stakeholder was deleted
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: Target package or stakeholder with id could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/PackageNotFoundError'
                    - $ref: '#/components/schemas/StakeholderNotFoundError'
        '409':
          description: Stakeholder could not be deleted
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Deletes a stakeholder from a draft package. The package must still be in
        draft for

        the stakeholder to be removed. The implicit "undecided" stakeholder
        cannot be

        deleted.
  /packages/{packageId}/stakeholders/{stakeholderId}/actors:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
      - $ref: '#/components/parameters/stakeholderIdPathParam'
    get:
      tags:
        - Actors
      summary: List actors
      operationId: listActors
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Actor'
              example:
                - Type: approver
                  SuppressNotifications: false
                  Status: finished
                  RedirectUrl: https://redirecttothis.test
                  Result:
                    CompletedBy:
                      Email: john@doe.test
                    CompletedDate: 2020-01-24T09:24:13+0000
                - Type: formFiller
                  SuppressNotifications: false
                  Status: available
                  Elements:
                    - Id: 00000000-0000-0000-0000-000000000000
                      ActorId: 00000000-0000-0000-0000-000000000000
                      Type: TextBoxField
                      Name: TextBox1
                      Label: Empty textbox
                      IsRequired: false
                      IsMultiline: false
                      DefaultValue: null
                      CharLimit: 115
                      Location:
                        Page: 1
                        Top: 200
                        Left: 200
                      Dimensions:
                        Width: 200
                        Height: 200
                      ExternalReference: my_checkboxfield
                    - Id: 00000000-0000-0000-0000-000000000001
                      ActorId: 00000000-0000-0000-0000-000000000000
                      Type: CheckBoxField
                      Name: CheckBox1
                      Label: To be checked
                      IsRequired: true
                      Checked: null
                      DefaultValue: false
                      Location:
                        Page: 1
                        Top: 200
                        Left: 200
                      Dimensions:
                        Width: 200
                        Height: 200
                      ExternalReference: my_checkboxfield
                  Links:
                    - https://fill.test/package/1234
                - Type: signer
                  SuppressNotifications: false
                  Status: available
                  Elements:
                    - Id: 00000000-0000-0000-0000-000000000000
                      ActorId: 00000000-0000-0000-0000-000000000000
                      Type: signingField
                      Location:
                        Page: 2
                        Top: 200
                        Left: 200
                      Dimensions:
                        Width: 200
                        Height: 200
                      ExternalReference: my_signingfield
                      SigningMethods:
                        - manual
                      LegalNotice:
                        Text: Read and approved
                  Links:
                    - https://sign.test/package/1234
                  RedirectUrl: https://redirecttothis.test
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: Target package or stakeholder with id could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/PackageNotFoundError'
                    - $ref: '#/components/schemas/StakeholderNotFoundError'
      description: >-
        Retrieves all actors of the specified stakeholder. An actor represents a
        single

        action a stakeholder must take on the package; see Create actor for the
        actor

        types and their semantics.
    post:
      tags:
        - Actors
      summary: Create actor
      operationId: createActor
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateActor'
            examples:
              signer-with-signing-field:
                summary: Actor was created
                value:
                  Type: signer
                  SuppressNotifications: false
                  Elements:
                    - Type: signingField
                      DocumentId: c05866bc-6b5a-4b5b-a4c1-b76895469f6f
                      SigningMethods:
                        - manual
                        - beid
                      Location:
                        Page: 2
                        Top: 200
                        Left: 200
                      Dimensions:
                        Width: 200
                        Height: 200
                  RedirectUrl: https://myserver.example.org/return
      responses:
        '201':
          description: Actor was created
          headers:
            Location:
              description: Location of the newly created actor
              schema:
                type: string
                format: url
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/SignerActor'
                  - $ref: '#/components/schemas/ApproverActor'
                  - $ref: '#/components/schemas/ReceiverActor'
                  - $ref: '#/components/schemas/FormFillerActor'
              examples:
                actor-was-created:
                  summary: Actor was created
                  value:
                    Id: 00000000-0000-0000-0000-000000000000
                    Type: signer
                    Status: available
                    SuppressNotifications: false
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: Target package or stakeholder with id could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/PackageNotFoundError'
                    - $ref: '#/components/schemas/StakeholderNotFoundError'
        '409':
          description: Actor could not be added to the stakeholder
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Creates an actor and adds it to the specified stakeholder. An actor is a
        single

        action a stakeholder must take on a package. There are four actor types,
        selected

        with the `Type` property:


        - **FormFiller** - fills in TextBoxField, CheckBoxField, RadioGroup
        and/or
          ComboBoxField (available as of NSEV v8.5) elements on a document. Does not sign
          or approve.
        - **Approver** - approves the document before it is sent to any signer.
        Approval
          may happen before or after form filling, as long as both come before signing.
        - **Signer** - signs the document.

        - **Receiver** - receives a copy of the document once all signers have
        signed.
          Takes no action on the document.

        The request parameters are the same for all four types except for
        `Elements`:

        SigningField elements can only be linked to **Signers**, and
        TextBoxField,

        CheckBoxField, RadioGroup and ComboBoxField elements can only be linked
        to

        **FormFillers**.

        Receivers cannot have elements. The element parameters are the same as
        for Create

        element.


        Where an actor sits in the process matters: FormFillers and Approvers
        must be in

        the first process step (they act before signing), and Receivers must be
        in the

        last step (they receive only after all signers finish). If you do not
        define the

        process steps manually, FormFillers are placed in the first step
        alongside

        Approvers, so approval may happen before, during or after form filling.
        A single

        process step may only contain one actor type, except that FormFillers
        and

        Approvers may be mixed within one step.


        **RedirectUrl behaviour.** When `RedirectUrl` is set, the end user is
        redirected to

        that URL after filling forms, signing or rejecting; without it, the user
        must close

        the browser tab manually. `RedirectType` controls when the redirect
        fires. See

        [Callbacks and redirects →
        RedirectUrl](/nsev/build/guides/callbacks#redirecturl-where-a-user-goes-after-acting)

        and [→
        RedirectType](/nsev/build/guides/callbacks#redirecttype-when-the-redirect-fires)

        for the full behaviour, including the query parameters NSEV appends and
        why the

        redirect alone should not be trusted to confirm completion.
  /packages/{packageId}/stakeholders/{stakeholderId}/actors/{actorId}:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
      - $ref: '#/components/parameters/stakeholderIdPathParam'
      - name: actorId
        in: path
        required: true
        description: The target actor's unique identifier
        schema:
          $ref: '#/components/schemas/Actor.Id'
    get:
      tags:
        - Actors
      summary: Get actor
      operationId: getActor
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Actor'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: Target package, stakeholder or actor with id could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/PackageNotFoundError'
                    - $ref: '#/components/schemas/StakeholderNotFoundError'
                    - $ref: '#/components/schemas/ActorNotFoundError'
      description: Retrieves a single actor by its actor ID.
    delete:
      tags:
        - Actors
      summary: Delete actor
      operationId: deleteActor
      responses:
        '204':
          description: Actor was deleted
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: Target package, stakeholder or actor with id could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/PackageNotFoundError'
                    - $ref: '#/components/schemas/StakeholderNotFoundError'
                    - $ref: '#/components/schemas/ActorNotFoundError'
        '409':
          description: Actor could not be deleted
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Deletes an actor from a draft package. The package must still be in
        draft. The

        actor of the implicit "undecided" stakeholder cannot be deleted.
  /packages/{packageId}/stakeholders/{stakeholderId}/actors/{actorId}/reassign:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
      - $ref: '#/components/parameters/stakeholderIdPathParam'
      - name: actorId
        in: path
        required: true
        description: The target actor's unique identifier
        schema:
          $ref: '#/components/schemas/Actor.Id'
    post:
      tags:
        - Actors
      summary: Reassign actor
      operationId: reassignActor
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReassignActor'
            examples:
              reassign-to-person:
                summary: Actor was reassigned
                value:
                  Stakeholder:
                    Type: Person
                    Language: en
                    FirstName: John
                    LastName: Doe
                    EmailAddress: john@doe.test
                    PhoneNumber: +32xxxxxxxxx
                    BirthDate: '1990-01-16'
                    ExternalReference: string
                  ReassignmentReason: Original signer is on leave
      responses:
        '200':
          description: Actor was reassigned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonStakeholder'
              examples:
                actor-was-reassigned:
                  summary: Actor was reassigned
                  value:
                    Type: person
                    Id: 00000000-0000-0000-0000-000000000000
                    PackageId: 00000000-0000-0000-0000-000000000000
                    Actors:
                      - Id: 00000000-0000-0000-0000-000000000000
                        Type: signer
                        Status: InProgress
                        SuppressNotifications: false
                    ExternalReference: string
      description: >-
        Reassigns an appointed actor to a new person stakeholder - for example
        when the

        original assignee is unavailable and someone else must take over the
        action. The

        replacement is always a **person** stakeholder.


        Supply the replacement person under `Stakeholder` and a
        `ReassignmentReason`.

        `AdditionalProperties` is only needed when reassigning a signing actor
        that has

        mandated signing and therefore requires extra identity data.
  /packages/{packageId}/process:
    summary: |
      All actions that need to be performed as a set of steps.  
      Every array is a set of actions that can be completed in parallel.
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
    get:
      tags:
        - Process
      summary: Get process
      operationId: getProcess
      responses:
        '200':
          $ref: '#/components/responses/ProcessResponse'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
      description: >-
        Retrieves the package's full process: the ordered list of process steps,
        each step

        being a set of actors whose actions run in parallel. The steps
        themselves run in

        sequence. See Create process step for how a process is structured.
    post:
      tags:
        - Process
      summary: Create process step
      operationId: createProcessStep
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/CreateActorWithStakeholderId'
            examples:
              one-signing-step:
                summary: Process step was created
                value:
                  - Type: signer
                    StakeholderId: 00000000-0000-0000-0000-000000000002
                    SuppressNotifications: false
                    Elements:
                      - Type: signingField
                        DocumentId: 00000000-0000-0000-0000-000000000001
                        SigningMethods:
                          - manual
                        Location:
                          Page: 2
                          Top: 200
                          Left: 200
                        Dimensions:
                          Width: 200
                          Height: 200
                    RedirectUrl: https://myserver.example.org/return
      responses:
        '201':
          description: Process step was created
          headers:
            Location:
              description: Location of the newly created process step
              schema:
                type: string
                format: url
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProcessStep'
        '400':
          description: >-
            Request validation failed. Possible error codes include

            `LegalNotice.NameAndTextUsedSimultaneously`,
            `Request.RequiredFieldIsMissing`,

            `Request.OneOfFieldsIsMissing`, `Request.FieldMaxLength`,
            `SigningType.Invalid`,

            `Request.FieldMinimumValue`, `SigningField.InvalidWidthCoordinate`,

            `FormField.InvalidWidthCoordinate`,
            `SigningField.InvalidHeightCoordinate`,

            `FormField.InvalidHeightCoordinate` and `Url.Invalid`.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ValidationError'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
        '409':
          description: >-
            The request conflicts with existing information and/or business
            rules. Possible

            error codes include `Package.InvalidStatus`,
            `ProcessStep.MixedTypes` and

            `Document.DataMissing`.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Adds one process step to the package's process. A process step is an
        array of

        actors whose actions can be performed in parallel; steps run
        sequentially in the

        order they appear in the process.


        A single step may not mix actor types, except that FormFillers and
        Approvers may be

        combined in one step. The approval and form-filling flows must precede
        all signing

        flows: adding approval or form-filling data after signatures are placed
        would

        invalidate those signatures. After the approval and form-filling step,
        all signing

        flows (sequential, parallel or mixed) must complete before the final
        receiver step.

        The receiver flow is always parallel and is always last.


        Each actor in the step is supplied together with the `StakeholderId` it
        belongs to.
    put:
      tags:
        - Process
      summary: Update process
      operationId: updateProcess
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: array
                items:
                  $ref: '#/components/schemas/CreateActorWithStakeholderId'
            examples:
              two-steps:
                summary: Process steps were updated
                value:
                  - - Type: approver
                      StakeholderId: 00000000-0000-0000-0000-000000000001
                      SuppressNotifications: false
                      RedirectUrl: https://myserver.example.org/return
                  - - Type: signer
                      StakeholderId: 00000000-0000-0000-0000-000000000002
                      SuppressNotifications: false
                      Elements:
                        - Type: signingField
                          DocumentId: 00000000-0000-0000-0000-000000000003
                          SigningMethods:
                            - manual
                          Location:
                            Page: 2
                            Top: 200
                            Left: 200
                          Dimensions:
                            Width: 200
                            Height: 200
                      RedirectUrl: https://myserver.example.org/return
      responses:
        '200':
          description: Process steps were updated
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
      description: >-
        Overwrites the package's entire process with the supplied steps. The
        body is a 2D

        array: the outer array is the ordered list of steps, and each inner
        array is the

        set of actors that run in parallel within that step. The same
        step-ordering and

        actor-type rules as Create process step apply.
  /packages/{packageId}/process/{stepIndex}:
    description: The actions in a certain step
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
      - name: stepIndex
        in: path
        required: true
        description: The index of the process step
        schema:
          type: integer
          minimum: 0
    get:
      tags:
        - Process
      summary: List process step actions
      operationId: listProcessSteps
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProcessStep'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: package or process step could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/PackageNotFoundError'
                    - $ref: '#/components/schemas/ProcessStepNotFoundError'
      description: >-
        Retrieves the set of actions of a single process step, identified by its

        `stepIndex`. These are the actions that can be completed in parallel
        within that

        step.
    delete:
      tags:
        - Process
      summary: Delete process step
      operationId: deleteProcessStep
      responses:
        '204':
          description: Process step was deleted
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: package or process step could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/PackageNotFoundError'
                    - $ref: '#/components/schemas/ProcessStepNotFoundError'
        '409':
          description: Process step could not be deleted
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Deletes a process step and all of its actions from the package,
        identified by its

        `stepIndex`. The package must still be in draft.
    post:
      tags:
        - Process
      summary: Submit process step action
      operationId: submitProcessStepAction
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateActorWithStakeholderId'
            examples:
              add-signer-to-step:
                summary: Actor was added to the process step
                value:
                  Type: signer
                  StakeholderId: 00000000-0000-0000-0000-000000000002
                  SuppressNotifications: false
                  Elements:
                    - Type: signingField
                      DocumentId: 00000000-0000-0000-0000-000000000001
                      SigningMethods:
                        - manual
                      Location:
                        Page: 2
                        Top: 200
                        Left: 200
                      Dimensions:
                        Width: 200
                        Height: 200
                  RedirectUrl: https://myserver.example.org/return
      responses:
        '201':
          description: >
            Actor was added to the process step.   The location header points to
            the location of the created actor under its stakeholder.
          headers:
            Location:
              description: Location of the newly created actor (under its stakeholder)
              schema:
                type: string
                format: url
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Actor'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: package or process step could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/PackageNotFoundError'
                    - $ref: '#/components/schemas/ProcessStepNotFoundError'
        '409':
          description: Actor could not be added to the process step
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
      description: >-
        Adds an actor to an existing process step, identified by its
        `stepIndex`. The

        actor parameters are the same as for Create process step. On success the
        `Location`

        header points to the created actor under its stakeholder.


        The same actor-type rules apply: a step may not mix actor types except
        FormFillers

        with Approvers.
  /packages/{packageId}/process/current:
    parameters:
      - $ref: '#/components/parameters/packageIdPathParam'
    get:
      tags:
        - Process
      summary: Get current process step
      operationId: getCurrentProcessStep
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProcessStep'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
      description: >-
        Retrieves the actions of the process step that is currently in progress
        - for

        example the signing step once approval and form filling are complete.
        The returned

        actions can be completed in parallel.
  /signingmethods:
    get:
      tags:
        - Configuration
      summary: List signing methods
      parameters:
        - name: isActive
          in: query
          description: only return active / inactive signing methods
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ConfiguredSigningMethod'
              examples:
                signing-methods:
                  summary: OK
                  value:
                    - IsActive: true
                      Name: MailOtp:MailOtp
                      DisplayNames:
                        en: Email one-time password
                        nl: E-mail eenmalig wachtwoord
                      DisplayNamesInitiator:
                        en: Email OTP
                      Descriptions:
                        en: Sign using a one-time password sent by email.
                      RequiredProperties: []
                    - IsActive: true
                      Name: SmartCard:BeID
                      DisplayNames:
                        en: Belgian eID
                      DisplayNamesInitiator:
                        en: Belgian eID
                      Descriptions:
                        en: Sign using a Belgian electronic identity card.
                      RequiredProperties:
                        - BeId
        '401':
          $ref: '#/components/responses/UnAuthorized'
      description: >-
        Retrieves the signing methods that are currently enabled or disabled in
        the

        NSEV configuration, so integrators can discover which methods an

        installation supports without maintaining a duplicate list.


        The response covers both the legacy **SigningTypes** (from the
        deprecated

        Signing Options settings) and the newer **SigningMethods** together with
        the

        **Signing Behavior** they belong to. New signing methods are formatted
        as

        `SigningBehavior:SigningMethod` - for example `SmartCard:BeID`. The

        `RemoteHashSigning` behaviour covers the `itsme` and `Swisscom` methods.


        When a signing method returns `RequiredProperties`, mandated signing
        rules

        have been applied to it: NSEV compares the data passed in those

        properties against the data retrieved from the signing certificate or
        signing

        service to decide whether a signer is mandated to sign in a given
        session.
  /packages/{packageId}/audittrail/{culture}:
    get:
      tags:
        - AuditTrails
      summary: Download audit trail
      operationId: downloadAuditTrail
      description: >-
        Downloads a package's audit trail as a signed PDF file, rendered in the

        requested culture.


        The PDF can be generated for any package that has been submitted (i.e.
        is

        no longer a draft); requesting it for a draft package returns a
        conflict.

        To retrieve the structured audit trail for a package in any status,

        including drafts, use `GET /packages/{packageId}/audittrail`.
      parameters:
        - $ref: '#/components/parameters/packageIdPathParam'
        - $ref: '#/components/parameters/culturePathParam'
      responses:
        '200':
          description: The signed Audit Trail in pdf file.
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
        '409':
          description: >-
            The package is still a draft. An audit trail PDF can only be
            generated once the package has been submitted.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
              example:
                - ErrorCode: AuditTrail.InvalidStatus
                  ErrorMessage: Package has an invalid status
  /packages/{packageId}/audittrail:
    get:
      tags:
        - AuditTrails
      summary: Get the package audit trail
      operationId: getAuditTrailJson
      parameters:
        - $ref: '#/components/parameters/packageIdPathParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditTrailResponse'
              examples:
                audit-events:
                  summary: The audit events
                  value:
                    RequestedOn: '2025-02-27T09:09:46Z'
                    PackageInfo:
                      Id: 00000000-0000-0000-0000-000000000000
                      Name: example package
                      CreatedOn: '2025-01-14T13:24:49Z'
                      Initiator: hello@world.invalid
                      Status: Draft
                      Documents:
                        - Id: 00000000-0000-0000-0000-000000000000
                          Name: example document
                          PagesCount: 10
                          SignedFieldsCount: 4
                    Events:
                      - Id: 00000000-0000-0000-0000-000000000000
                        CreatedOn: '2024-08-14T13:24:49Z'
                        IpAddress: 127.1.0.0
                        Type: SignActionCompleted
                        User: hello@world.invalid
                        PackageDetail:
                          ApiSource: Unknown
                          TemplateCode: '00001'
                          Documents:
                            - Id: 00000000-0000-0000-0000-000000000000
                              Name: example document
                              PagesCount: 10
                              SignedFieldsCount: 4
                        ActionDetail:
                          ActorId: 00000000-0000-0000-0000-000000000000
                          PersonId: 00000000-0000-0000-0000-000000000000
                          EmailAddress: hello@world.invalid
                          Documents:
                            - Id: 00000000-0000-0000-0000-000000000000
                              Name: example document
                          SigningMethods:
                            - Name: MailOtp:MailOtp
                              KeyPair: MyKeyPair
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          $ref: '#/components/responses/NotFound.Package'
      description: >-
        Retrieves a package's audit trail as structured JSON - a list of events

        that occurred during the package's lifecycle, together with package and

        document information. The audit trail is available for a package in any

        status.


        Because the audit trail is built from the retained audit log, it can
        still

        be retrieved after the package itself has been deleted. In that case the

        response is reconstructed from the log events alone, so some package and

        document fields (for example `Status`, `Name` and the document page and

        signed-field counts) may be absent.


        To download the signed PDF representation of the audit trail, use

        `GET /packages/{packageId}/audittrail/{culture}`.
  /packages/{packageId}/audittrail/verify:
    get:
      tags:
        - AuditTrails
      summary: Verify audit trail
      operationId: verifyAuditTrail
      parameters:
        - $ref: '#/components/parameters/packageIdPathParam'
      responses:
        '200':
          description: A boolean indicating if the Audit Trail is valid.
          content:
            application/json:
              schema:
                type: boolean
              examples:
                valid:
                  summary: A boolean indicating if the audit trail is valid
                  value: true
        '404':
          $ref: '#/components/responses/NotFound.Package'
      description: Verifies whether a package's audit trail is valid, returning a boolean.
  /packages/{packageId}/auditproof/proofs:
    post:
      tags:
        - AuditProofs
      summary: Create audit proof
      operationId: createAuditProof
      x-excluded: true
      deprecated: true
      parameters:
        - $ref: '#/components/parameters/packageIdPathParam'
      requestBody:
        $ref: '#/components/requestBodies/SetProofOnDocumentLocationExternalV3Demand'
      responses:
        '201':
          description: Audit proof created
        '400':
          description: >-
            When the Content is not a valid Base64 string or the Type contains
            an invalid value
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ValidationError'
              example:
                - ErrorCode: Base64StringValidator
                  ErrorMessage: Not a valid base64 string
                - ErrorCode: Request.RequiredFieldIsMissing:Name
                  ErrorMessage: Required data field [Name] is missing or empty
                - ErrorCode: Proof.UnsupportedProof
                  ErrorMessage: >-
                    The provided proof [SignatureCertificate] is not supported,
                    supported values are: SIGNATURE_CERTIFICATE,
                    SIGNATURE_CERTIFICATE_CHAIN, SIGNATURE_CERTIFICATE_CRL,
                    SIGNED_PDF, TIME_STAMP_CERTIFICATE,
                    TIME_STAMP_CERTIFICATE_CHAIN, TIME_STAMP_CERTIFICATE_CRL,
                    OTHER
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: When the packageId could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PackageNotFoundError'
        '409':
          description: >-
            When Audit Proofs are not enabled or package is in an invalid
            status.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
              example:
                - ErrorCode: AuditProof.InvalidStatus
                  ErrorMessage: Package has an invalid status
  /packages/{packageId}/auditproof/download:
    get:
      tags:
        - AuditProofs
      summary: Download audit proofs by package
      operationId: downloadAuditProofsByPackage
      x-excluded: true
      deprecated: true
      parameters:
        - $ref: '#/components/parameters/packageIdPathParam'
      responses:
        '200':
          description: The signed audit proofs XML
          content:
            application/xml:
              schema:
                type: string
                format: binary
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: When the packageId could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PackageNotFoundError'
        '409':
          description: >-
            When Audit Proofs are not enabled or no Audit Proofs are available
            for this package.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
              example:
                - ErrorCode: AuditProof.Disabled
                  ErrorMessage: Audit proof is disabled in the config settings
  /packages/{packageId}/auditproof/download/{documentId}:
    get:
      tags:
        - AuditProofs
      summary: Download audit proofs by document
      operationId: downloadAuditProofsByDocument
      x-excluded: true
      deprecated: true
      parameters:
        - $ref: '#/components/parameters/packageIdPathParam'
        - $ref: '#/components/parameters/documentIdPathParam'
      responses:
        '200':
          description: The signed audit proofs XML
          content:
            application/xml:
              schema:
                type: string
                format: binary
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: When the document or package could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/PackageNotFoundError'
                    - $ref: '#/components/schemas/DocumentNotFoundError'
        '409':
          description: >-
            When Audit Proofs are not enabled or no Audit Proofs are available
            for this document.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
              example:
                - ErrorCode: AuditProof.NoAuditProofsForPackageAvailable
                  ErrorMessage: No audit proofs available for this package
  /packagecorrelations/{correlationId}/auditproof/download:
    get:
      tags:
        - AuditProofs
      summary: Download audit proofs by package correlation id
      operationId: downloadAuditProofsByPackageCorrelationId
      x-excluded: true
      deprecated: true
      parameters:
        - $ref: '#/components/parameters/correlationIdPathParam'
      responses:
        '200':
          description: The signed audit proofs XML
          content:
            application/xml:
              schema:
                type: string
                format: binary
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: When no package with given correlationId could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
              example:
                - ErrorCode: AuditProof.NotAvailableForPackageCorrelationId
                  ErrorMessage: No audit proof available for the given package correlationId
        '409':
          description: >-
            When Audit Proofs are not enabled or no Audit Proofs are available
            for this package.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
              example:
                - ErrorCode: AuditProof.Disabled
                  ErrorMessage: Audit proof is disabled in the config settings
  /documentcorrelations/{correlationId}/auditproof/download:
    get:
      tags:
        - AuditProofs
      summary: Download audit proofs by document correlation id
      operationId: downloadAuditProofsByDocumentCorrelationId
      x-excluded: true
      deprecated: true
      parameters:
        - $ref: '#/components/parameters/correlationIdPathParam'
      responses:
        '200':
          description: The signed audit proofs XML
          content:
            application/xml:
              schema:
                type: string
                format: binary
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: When the correlationId could not be found
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
              example:
                - ErrorCode: AuditProof.NotAvailableForDocumentCorrelationId
                  ErrorMessage: >-
                    No audit proof available for the given document
                    correlationId
        '409':
          description: When Audit Proofs are not enabled
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
              example:
                - ErrorCode: AuditProof.Disabled
                  ErrorMessage: Audit proof is disabled in the config settings
  /packages/{packageId}/auditproof:
    delete:
      tags:
        - AuditProofs
      summary: Delete audit proofs
      operationId: deleteAuditProofs
      x-excluded: true
      deprecated: true
      parameters:
        - $ref: '#/components/parameters/packageIdPathParam'
      responses:
        '204':
          description: Audit proofs of package were succesfully deleted
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: No auditproofs were found for given packageId
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NotFoundError'
              example:
                - ErrorCode: AuditProof.NoAuditProofsForPackageAvailable
                  ErrorMessage: No audit proofs available for this package
        '409':
          description: Package wasn't deleted yet
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
              example:
                - ErrorCode: Package.InvalidStatus:revoked
                  ErrorMessage: >-
                    Could not perform operation on package with id
                    [c63e886c-1980-4d83-8d5b-03acdebc38dd] because status is
                    [revoked]
  /packages/auditproofinfo:
    get:
      tags:
        - AuditProofs
      summary: Get audit proof info
      operationId: getAuditProofInfo
      x-excluded: true
      deprecated: true
      parameters:
        - in: query
          name: status
          required: true
          schema:
            type: string
            enum:
              - Deleted
          description: The status of the packages to get the auditproof infos for
        - in: query
          name: packageId
          required: false
          schema:
            $ref: '#/components/schemas/Package.Id'
        - $ref: '#/components/parameters/pageNumber'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/createdBefore'
        - $ref: '#/components/parameters/createdAfter'
        - $ref: '#/components/parameters/deletedBefore'
        - $ref: '#/components/parameters/deletedAfter'
        - name: expiresBefore
          in: query
          description: Select items expires before given date
          schema:
            type: string
            format: date-time
            example: '2020-01-15 00:00:00+00:00'
        - name: expiresAfter
          in: query
          description: Select items expires after given date
          schema:
            type: string
            format: date-time
            example: '2020-01-15 00:00:00+00:00'
        - name: correlationId
          in: query
          description: Select items on given correlationId
          schema:
            type: string
        - $ref: '#/components/parameters/sortOrder'
        - name: sortField
          in: query
          description: specify on which field the result is sorted
          schema:
            type: string
            default: packageDeletionDate
            enum:
              - packageName
              - packageCreationDate
              - delayedDeletionDate
              - packageDeletionDate
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PagingResult'
                  - type: object
                    properties:
                      Items:
                        type: array
                        items:
                          $ref: '#/components/schemas/ProofInfo'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationError'
                  - example:
                      Code: Request.UnsupportedValue
                      Message: >-
                        Parameter 'Status' does not support value 'xyz',
                        supported values are: Deleted
        '401':
          $ref: '#/components/responses/UnAuthorized'
  /packages/sign/bulk:
    post:
      tags:
        - BulkActions
      summary: Bulk sign packages
      operationId: bulkSign
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkSignRequest'
            examples:
              by-packages:
                summary: Bulk sign by package identifiers
                value:
                  EmailAddress: jane.doe@comp.com
                  Language: en
                  Packages:
                    - b459d74c-1f90-4d63-9f4a-6de9cead8c5e
                    - 1fdbad81-75e5-4cc8-b113-39255fa119d7
              by-actors:
                summary: Bulk sign by actor identifiers
                value:
                  EmailAddress: jane.doe@comp.com
                  Language: en
                  Actors:
                    - 9b2e6f3a-1c44-4e2b-8a77-2d6f0a1b3c4d
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkSignSessionResult'
              examples:
                session-url:
                  summary: OK
                  value:
                    ActionUrl: >-
                      https://example.test/bulk-sign/b459d74c-1f90-4d63-9f4a-6de9cead8c5e
        '400':
          description: When the Content has an invalid value.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ValidationError'
              examples:
                invalid-value:
                  summary: When the Content has an invalid value
                  value:
                    - ErrorCode: Request.RequiredFieldIsMissing
                      ErrorMessage: A required field is missing.
        '401':
          $ref: '#/components/responses/UnAuthorized'
      description: >-
        Starts a bulk signing session for a user so they can sign multiple
        pending

        packages from a single session URL. The response contains an `ActionUrl`
        that

        opens the bulk signing session.


        Provide either `Packages` (package identifiers) or `Actors` (actor

        identifiers), but not both. When only `EmailAddress` is supplied, all

        available actors for that user are selected.
  /packages/status/bulk:
    post:
      tags:
        - BulkActions
      summary: Bulk update package status
      operationId: bulkUpdateStatus
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkModifyStatusRequest'
            examples:
              revoke:
                summary: Revoke packages without notifications
                value:
                  PackageIds:
                    - b459d74c-1f90-4d63-9f4a-6de9cead8c5e
                    - 1fdbad81-75e5-4cc8-b113-39255fa119d7
                  Status: Revoked
                  SuppressNotifications: true
      responses:
        '200':
          description: An unique identifier of the created bulk action session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkActionSession.Id'
              examples:
                session-id:
                  summary: An unique identifier of the created bulk action session
                  value: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
        '400':
          description: When the Content has an invalid value.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ValidationError'
              examples:
                invalid-value:
                  summary: When the Content has an invalid value
                  value:
                    - ErrorCode: 'Request.RequiredFieldIsMissing: status'
                      ErrorMessage: A required field is missing.
        '401':
          $ref: '#/components/responses/UnAuthorized'
      description: >-
        Updates the status of multiple packages at once. The supported
        transitions are

        draft → pending and pending → revoked.


        Moving packages from draft to pending makes them visible to their
        stakeholders

        so the signing flow can begin. Moving pending packages to revoked
        withdraws

        them so stakeholders can no longer act on them.


        All packages in a single call must start from the same status: the
        update only

        succeeds for packages whose current status allows the requested
        transition. For

        example, mixing draft and pending packages in a request that targets
        revoked

        succeeds only for the pending packages.


        When revoking, set `SuppressNotifications` to `true` to skip the
        revocation

        notifications.


        Like other bulk actions, this call is processed asynchronously and
        returns a

        bulk action session identifier; poll the package bulk action session to
        follow

        its progress.
  /packages/delete/bulk:
    post:
      tags:
        - BulkActions
      summary: Bulk delete packages
      operationId: bulkDelete
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkRemovePackagesRequest'
            examples:
              delete:
                summary: Delete packages, keep audit proofs indefinitely
                value:
                  PackageIds:
                    - b459d74c-1f90-4d63-9f4a-6de9cead8c5e
                    - 1fdbad81-75e5-4cc8-b113-39255fa119d7
                  DelayedDeletionTime: 0
      responses:
        '200':
          description: An unique identifier of the created bulk action session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkActionSession.Id'
              examples:
                session-id:
                  summary: An unique identifier of the created bulk action session
                  value: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
        '400':
          description: When the Content has an invalid value.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ValidationError'
              examples:
                invalid-value:
                  summary: When the Content has an invalid value
                  value:
                    - ErrorCode: AuditProof.DelayedDeletionTimeNegative
                      ErrorMessage: The delayed deletion time cannot be negative.
        '401':
          $ref: '#/components/responses/UnAuthorized'
      description: >-
        Permanently deletes multiple packages from the database in a single
        call.


        NSEV does not delete packages automatically once they reach a final

        state - they are stored indefinitely until deleted with this call or the

        single delete-package operation. Only packages in draft, finished,
        archived,

        rejected or revoked status can be deleted.


        Use `DelayedDeletionTime` to set, in days, how long a package's audit
        proofs are

        kept after the package itself is deleted. When omitted, the
        environment's

        configured delayed deletion time applies. Pass `0` to keep audit proofs

        indefinitely until they are removed with an explicit delete-audit-proofs
        call.


        The call is processed asynchronously and returns a bulk action session

        identifier; poll the package bulk action session to follow its progress.
  /packages/download/bulk:
    post:
      tags:
        - BulkActions
      summary: Bulk download packages
      operationId: bulkDownload
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkActionRequest'
            examples:
              download:
                summary: Bulk download packages
                value:
                  PackageIds:
                    - b459d74c-1f90-4d63-9f4a-6de9cead8c5e
                    - 1fdbad81-75e5-4cc8-b113-39255fa119d7
      responses:
        '200':
          description: An unique identifier of the created bulk action session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkActionSession.Id'
              examples:
                session-id:
                  summary: An unique identifier of the created bulk action session
                  value: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
        '400':
          description: When the Content has an invalid value.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ValidationError'
              examples:
                invalid-value:
                  summary: When the Content has an invalid value
                  value:
                    - ErrorCode: BulkActionSession.DataMissing
                      ErrorMessage: Required data is missing from the request.
        '401':
          $ref: '#/components/responses/UnAuthorized'
      description: >-
        Requests the contents of multiple finished packages for download.


        Downloading works in two steps: this call returns a bulk action session

        identifier, which is then passed to the bulk action result download
        operation

        to retrieve the actual contents as a `.zip` file. Poll the package bulk
        action

        session in between to confirm the request has finished.
  /packages/reminders/bulk:
    post:
      tags:
        - BulkActions
      summary: Bulk send reminders
      operationId: bulkSendReminders
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkActionRequest'
            examples:
              remind:
                summary: Send reminders
                value:
                  PackageIds:
                    - b459d74c-1f90-4d63-9f4a-6de9cead8c5e
                    - 1fdbad81-75e5-4cc8-b113-39255fa119d7
      responses:
        '200':
          description: An unique identifier of the created bulk action session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkActionSession.Id'
              examples:
                session-id:
                  summary: An unique identifier of the created bulk action session
                  value: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
        '400':
          description: When the Content has an invalid value.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ValidationError'
              examples:
                invalid-value:
                  summary: When the Content has an invalid value
                  value:
                    - ErrorCode: BulkActionSession.DataMissing
                      ErrorMessage: Required data is missing from the request.
        '401':
          $ref: '#/components/responses/UnAuthorized'
      description: >-
        Sends a reminder notification to the actors of the specified packages
        who have

        not yet approved, signed or filled out their documents.


        Only the next available actor(s) in each workflow are notified. In a
        serial

        workflow, approvers, signers or form fillers who are still waiting for
        someone

        ahead of them to act do not receive a reminder.


        The call is processed asynchronously and returns a bulk action session

        identifier; poll the package bulk action session to follow its progress.
  /packages/expirydate/bulk:
    post:
      tags:
        - BulkActions
      summary: Bulk extend package expiry date
      operationId: bulkUpdateExpiryDate
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkActionExpiryDateRequest'
            examples:
              extend:
                summary: Extend expiry date
                value:
                  PackageIds:
                    - b459d74c-1f90-4d63-9f4a-6de9cead8c5e
                    - 1fdbad81-75e5-4cc8-b113-39255fa119d7
                  ExpirationTimestamp: '2025-12-31T23:59:59Z'
      responses:
        '200':
          description: An unique identifier of the created bulk action session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkActionSession.Id'
              examples:
                session-id:
                  summary: An unique identifier of the created bulk action session
                  value: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
        '400':
          description: When the Content has an invalid value.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ValidationError'
              examples:
                invalid-value:
                  summary: When the Content has an invalid value
                  value:
                    - ErrorCode: BulkActionSession.DataMissing
                      ErrorMessage: Required data is missing from the request.
        '401':
          $ref: '#/components/responses/UnAuthorized'
      description: >-
        Extends the expiry date of multiple packages at once, making expired
        documents

        accessible again. Documents within a package expire on the same date as
        the

        package.


        The call is processed asynchronously and returns a bulk action session

        identifier; poll the package bulk action session to follow its progress.
  /packages/skip/bulk:
    post:
      tags:
        - BulkActions
      summary: Bulk skip actors
      operationId: bulkSkip
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkActionSkipRequest'
            examples:
              to-finished:
                summary: Skip remaining signers and finish
                value:
                  PackageIds:
                    - b459d74c-1f90-4d63-9f4a-6de9cead8c5e
                    - 1fdbad81-75e5-4cc8-b113-39255fa119d7
                  Target: ToFinished
      responses:
        '200':
          description: An unique identifier of the created bulk action session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkActionSession.Id'
              examples:
                session-id:
                  summary: An unique identifier of the created bulk action session
                  value: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
        '400':
          description: When the Content has an invalid value.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ValidationError'
              examples:
                invalid-value:
                  summary: When the Content has an invalid value
                  value:
                    - ErrorCode: BulkActionSession.DataMissing
                      ErrorMessage: Required data is missing from the request.
        '401':
          $ref: '#/components/responses/UnAuthorized'
      description: >-
        Skips actors who have not yet acted on the specified packages.


        Set `Target` to `ToSigners` to skip approvers and form fillers and move
        the

        packages to the signing phase, or to `ToFinished` to skip any remaining
        signers

        and end the signing flow of the packages.


        The call is processed asynchronously and returns a bulk action session

        identifier; poll the package bulk action session to follow its progress.
  /packages/auditproof/delete/bulk:
    post:
      tags:
        - BulkActions
      summary: Bulk delete audit proofs
      operationId: bulkDeleteAuditProofs
      x-excluded: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkActionRequest'
            examples:
              delete-proofs:
                summary: Delete audit proofs
                value:
                  PackageIds:
                    - b459d74c-1f90-4d63-9f4a-6de9cead8c5e
                    - 1fdbad81-75e5-4cc8-b113-39255fa119d7
      responses:
        '200':
          description: An unique identifier of the created bulk action session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkActionSession.Id'
              examples:
                session-id:
                  summary: An unique identifier of the created bulk action session
                  value: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
        '400':
          description: When the Content has an invalid value.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ValidationError'
              examples:
                invalid-value:
                  summary: When the Content has an invalid value
                  value:
                    - ErrorCode: BulkActionSession.DataMissing
                      ErrorMessage: Required data is missing from the request.
        '401':
          $ref: '#/components/responses/UnAuthorized'
      description: >-
        Deletes the audit proof information of multiple deleted packages in a
        single

        call.


        Audit proofs are not removed automatically when their packages are
        deleted in

        the Portal or through the API. The retention period (in days) is
        configured at

        environment level, or per package through the `DelayedDeletionTime`
        parameter of

        the single delete-package and bulk delete-packages operations. Use this
        call to

        remove audit proofs earlier than the configured retention period.


        The call is processed asynchronously and returns a bulk action session

        identifier; poll the package bulk action session to follow its progress.
  /packages/audittrails/download/bulk:
    post:
      tags:
        - BulkActions
      summary: Bulk download audit trail PDFs
      operationId: bulkDownloadAuditTrails
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkActionAuditTrailRequest'
            examples:
              download-audittrails:
                summary: Bulk download audit trail PDFs
                value:
                  PackageIds:
                    - b459d74c-1f90-4d63-9f4a-6de9cead8c5e
                    - 1fdbad81-75e5-4cc8-b113-39255fa119d7
                  Culture: en
      responses:
        '200':
          description: An unique identifier of the created bulk action session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkActionSession.Id'
              examples:
                session-id:
                  summary: An unique identifier of the created bulk action session
                  value: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
        '400':
          description: When the Content has an invalid value.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ValidationError'
              examples:
                invalid-value:
                  summary: When the Content has an invalid value
                  value:
                    - ErrorCode: BulkActionSession.DataMissing
                      ErrorMessage: Required data is missing from the request.
        '401':
          $ref: '#/components/responses/UnAuthorized'
      description: >-
        Requests the audit trail PDFs of multiple packages for download. The
        packages

        must not be in draft status.


        Downloading works in two steps: this call returns a bulk action session

        identifier, which is then passed to the bulk action result download
        operation

        to retrieve the audit trail PDFs as a `.zip` file. Poll the package bulk
        action

        session in between to confirm the request has finished. Use `Culture` to
        choose

        the language of the audit trail PDFs (a two-letter ISO 639-1 code).
  /packages/bulkactionsession/{bulkActionSessionId}:
    get:
      tags:
        - BulkActions
      summary: Get package bulk action session status
      operationId: getPackageBulkActionSession
      parameters:
        - $ref: '#/components/parameters/bulkActionSessionIdPathParam'
        - in: query
          name: includeDetails
          description: >-
            The result will contain all the info available about the requested
            bulk action session.
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkPackageActionInfoResult'
              examples:
                session-status:
                  summary: OK
                  value:
                    SessionId: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
                    Action: RequestAuditTrails
                    Status: Finished
                    Total: 2
                    Succeeded: 1
                    Failed: 1
                    FinishedTime: '2025-02-27T09:09:46Z'
                    Details:
                      Succeeded:
                        - PackageId: 1fdbad81-75e5-4cc8-b113-39255fa119d7
                          ExecutedTime: '2025-02-27T09:09:40Z'
                      Failed:
                        - PackageId: 9b2e6f3a-1c44-4e2b-8a77-2d6f0a1b3c4d
                          ExecutedTime: '2025-02-27T09:09:42Z'
                          ErrorCode: Package.NotInFinalState
                          ErrorMessage: The package is not in a final state.
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: An exception has occured.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NotFoundError'
              examples:
                not-found:
                  summary: An exception has occurred
                  value:
                    - ErrorCode: BulkActionSession.NotFound
                      ErrorMessage: No bulk action session found with the provided id.
      description: >-
        Bulk package actions are processed in the background, so they do not
        report

        success or failure immediately. Instead, each bulk action returns a bulk
        action

        session identifier. Use this operation to poll that session: it reports
        whether

        processing is still `Pending`, `Finishing` or `Finished`, and how many
        packages

        succeeded or failed.


        Set `IncludeDetails` to `true` to also return per-package results - the

        identifier and execution time of each package, plus an error code and
        message

        for packages that failed. `FinishedTime` is only populated once the
        session

        reaches `Finished`.
  /bulkactionsession/{bulkActionSessionId}:
    get:
      tags:
        - BulkActions
      summary: Get bulk action session status
      operationId: getBulkActionSession
      parameters:
        - $ref: '#/components/parameters/bulkActionSessionIdPathParam'
        - in: query
          name: includeDetails
          description: The result will contain the action details information.
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkActionInfoResult'
              examples:
                session-status:
                  summary: OK
                  value:
                    SessionId: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
                    Action: UserEmailInvitationNotification
                    Status: Finished
                    Total: 2
                    Succeeded: 2
                    Failed: 0
                    FinishedTime: '2025-02-27T09:09:46Z'
                    Details:
                      Succeeded:
                        - Id: 1fdbad81-75e5-4cc8-b113-39255fa119d7
                          ExecutedTime: '2025-02-27T09:09:40Z'
                        - Id: 9b2e6f3a-1c44-4e2b-8a77-2d6f0a1b3c4d
                          ExecutedTime: '2025-02-27T09:09:42Z'
                      Failed: []
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: An exception is occured.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NotFoundError'
              examples:
                not-found:
                  summary: An exception has occurred
                  value:
                    - ErrorCode: BulkActionSession.NotFound
                      ErrorMessage: No bulk action session found with the provided id.
      description: >-
        Returns the status of a bulk action session that is not scoped to
        packages -

        for example the session created when inviting users in bulk.


        Bulk actions are processed in the background, so they do not report
        success or

        failure immediately. Each bulk action returns a session identifier; use
        this

        operation to poll it. The response reports whether processing is still

        `Pending`, `Finishing` or `Finished`, and how many items succeeded or
        failed.


        Set `IncludeDetails` to `true` to also return per-item results - the
        identifier

        and execution time of each item, plus an error code and message for
        items that

        failed. `FinishedTime` is only populated once the session reaches
        `Finished`.
  /packages/bulkactionsession/download/{bulkActionSessionId}:
    get:
      tags:
        - BulkActions
      summary: Download bulk action result
      operationId: downloadBulkAction
      parameters:
        - $ref: '#/components/parameters/bulkActionSessionIdPathParam'
      responses:
        '200':
          description: >-
            A zip file that contains a sub folder for each Package. Each sub
            folder can contain the Documents in pdf or xml format or the Audit
            Trails in pdf format. The zip file also contains a JSON file with
            information about each Package.
          content:
            application/zip:
              schema:
                type: string
                format: binary
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '404':
          description: An exception has occured.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
              examples:
                not-found:
                  summary: An exception has occurred
                  value:
                    - ErrorCode: BulkActionSession.DataMissing
                      ErrorMessage: Required data is missing from the request.
      description: >-
        Retrieves the result of a bulk action that produces a `.zip` archive -
        bulk

        download packages or bulk download audit trail PDFs - once that bulk
        action has

        finished.


        The archive contains one subfolder per package. Each subfolder holds the

        documents (as `.pdf` or `.xml`) or the audit trails (as `.pdf`), and the
        archive

        also includes a JSON file with information about each package.
  /templates:
    get:
      tags:
        - Configuration
      summary: List templates
      operationId: listTemplates
      parameters:
        - $ref: '#/components/parameters/pageNumber'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/createdBefore'
        - $ref: '#/components/parameters/createdAfter'
        - $ref: '#/components/parameters/documentGroupCode'
        - name: sort
          in: query
          description: specify how the result is sorted, default is descending
          schema:
            type: string
            default: desc
            enum:
              - asc
              - desc
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PagingResult'
                  - type: object
                    properties:
                      Items:
                        type: array
                        description: The list containing the Themes
                        items:
                          type: object
                          properties:
                            Name:
                              type: string
                              description: A name of the template
                            TemplateCode:
                              type: string
                              description: A code identifying the template
              examples:
                templates:
                  summary: OK
                  value:
                    PageSize: 20
                    Total: 2
                    Items:
                      - Name: NDA template
                        TemplateCode: '00001'
                      - Name: Employment contract
                        TemplateCode: '00002'
      description: >-
        Retrieves the package templates available in the WebPortal, with their
        codes.


        A template code can be supplied when creating a package; the package is
        then

        created with all of the information defined in the template.
  /users/invite:
    post:
      tags:
        - Users
      summary: Invite user
      operationId: inviteUser
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserEmailInvitationRequest'
            examples:
              invite:
                summary: Invite users and assign user groups
                value:
                  Emails:
                    - jane.doe@comp.com
                    - john.roe@comp.com
                  UserGroups:
                    - Sales
                  CreationOptions:
                    IsSharedContact: true
                    InvitationLanguage: en
      responses:
        '202':
          description: Request is accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkInviteUsersResult'
              examples:
                accepted:
                  summary: Request is accepted
                  value:
                    SessionId: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
                    Link: >-
                      https://example.test/bulkactionsession/b459d74c-1f90-4d63-9f4a-6de9cead8c5e
        '400':
          description: Request failed validation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ValidationError'
              examples:
                validation-failed:
                  summary: Request failed validation
                  value:
                    - ErrorCode: EmailAddress.Invalid
                      ErrorMessage: The provided email address is invalid.
        '401':
          $ref: '#/components/responses/UnAuthorized'
      description: >-
        Invites one or more users to the NSEV environment by email and,

        optionally, adds them to user groups. A shared contact can be created
        from an

        invited user via the creation options.


        Inviting users is processed asynchronously: the response returns a
        `SessionId`

        that can be used to look up the invitation session's details.
  /absenceperiods:
    post:
      tags:
        - AbsencePeriods
      summary: Creates an absence period
      requestBody:
        description: Parameters for creating an absence period
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAbsencePeriod'
            examples:
              person-substitute:
                summary: Absence period with a single person substitute
                value:
                  User: ada.rodriguez@comp.com
                  StartDate: 2024-12-20T08:00:00+0200
                  EndDate: 2025-01-01T08:00:00+0200
                  Substitutes:
                    - Type: person
                      ActionTypes:
                        - signer
                        - receiver
                      AllowedToReassign: true
                      Language: en
                      Title: Ms.
                      FirstName: Jane
                      LastName: Doe
                      EmailAddress: jane.doe@comp.com
                      PhoneNumber: +1 202-918-2132
                      BirthDate: '1953-03-13'
                      ExternalReference: Client_XYZ_Account_Manager_1
      responses:
        '201':
          description: Absence period was created
          headers:
            Location:
              description: Location of the newly created absence period
              schema:
                type: string
                format: url
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AbsencePeriodResponse'
              examples:
                created:
                  summary: Absence period was created
                  value:
                    Id: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
                    User: ada.rodriguez@comp.com
                    StartDate: 2024-12-20T08:00:00+0200
                    EndDate: 2025-01-01T08:00:00+0200
                    Substitutes:
                      - Id: 1fdbad81-75e5-4cc8-b113-39255fa119d7
                        Type: person
                        ActionTypes:
                          - signer
                          - receiver
                        AllowedToReassign: true
                        Language: en
                        Title: Ms.
                        FirstName: Jane
                        LastName: Doe
                        EmailAddress: jane.doe@comp.com
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: An exception has occured
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/UserNotFoundError'
                    - $ref: '#/components/schemas/ContactGroupNotFoundError'
              examples:
                user-not-found:
                  summary: An exception has occurred
                  value:
                    - ErrorCode: User.NotFound
                      ErrorMessage: No user found with email address [hello@world.test].
        '409':
          description: >-
            The request conflicts with existing information and/or business
            rules
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/AbsencePeriodOverlappingError'
                    - $ref: '#/components/schemas/DuplicateActionTypeError'
              examples:
                overlap:
                  summary: >-
                    The request conflicts with existing information and/or
                    business rules
                  value:
                    - ErrorCode: AbsencePeriod.OverlapsWithExistingAbsencePeriod
                      ErrorMessage: >-
                        The provided absence period overlaps with an existing
                        absence period.
      description: >-
        Creates an absence period for a user and assigns the substitutes who
        take over

        that user's actions while they are away.


        Each substitute is a stakeholder of type `person`, `group` or
        `contactgroup`

        (the same stakeholder types used elsewhere in the API) and is assigned
        one or

        more action types - `approver`, `receiver`, `signer` or `formFiller`. A

        substitute can optionally be allowed to reassign packages to another
        user.


        The created absence period, and each of its substitutes, is returned
        with a

        generated `Id`.
    get:
      tags:
        - AbsencePeriods
      summary: Gets absence periods by email address
      parameters:
        - $ref: '#/components/parameters/email'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AbsencePeriodResponse'
              examples:
                absence-periods:
                  summary: OK
                  value:
                    - Id: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
                      User: ada.rodriguez@comp.com
                      StartDate: 2024-12-20T08:00:00+0200
                      EndDate: 2025-01-01T08:00:00+0200
                      Substitutes:
                        - Id: 1fdbad81-75e5-4cc8-b113-39255fa119d7
                          Type: person
                          ActionTypes:
                            - approver
                            - receiver
                          AllowedToReassign: false
                          Language: en
                          LastName: Doe
                          EmailAddress: jane.doe@comp.com
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      description: |-
        Retrieves the absence periods configured for a user, identified by email
        address. The response shape matches the create-absence-period operation.
  /absenceperiods/{absencePeriodId}:
    parameters:
      - $ref: '#/components/parameters/absencePeriodIdPathParam'
    get:
      tags:
        - AbsencePeriods
      summary: Gets an absence period by id
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AbsencePeriodResponse'
              examples:
                absence-period:
                  summary: OK
                  value:
                    Id: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
                    User: ada.rodriguez@comp.com
                    StartDate: 2024-12-20T08:00:00+0200
                    EndDate: 2025-01-01T08:00:00+0200
                    Substitutes:
                      - Id: 1fdbad81-75e5-4cc8-b113-39255fa119d7
                        Type: person
                        ActionTypes:
                          - signer
                          - approver
                        AllowedToReassign: true
                        Language: en
                        LastName: Doe
                        EmailAddress: jane.doe@comp.com
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: An exception has occured
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AbsencePeriodNotFoundError'
              examples:
                not-found:
                  summary: An exception has occurred
                  value:
                    - ErrorCode: AbsencePeriod.NotFound
                      ErrorMessage: No absence period found with the provided id.
      description: >-
        Retrieves a single absence period by its identifier. The response shape
        matches

        the create-absence-period operation.
    put:
      tags:
        - AbsencePeriods
      summary: Updates an absence period by id
      requestBody:
        description: Parameters for updating an absence period
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAbsencePeriod'
            examples:
              update:
                summary: Update an absence period
                value:
                  User: ada.rodriguez@comp.com
                  StartDate: 2024-12-20T08:00:00+0200
                  EndDate: 2025-01-01T08:00:00+0200
                  Substitutes:
                    - Id: 1fdbad81-75e5-4cc8-b113-39255fa119d7
                      Type: person
                      ActionTypes:
                        - signer
                        - receiver
                      AllowedToReassign: true
                      Language: en
                      Title: Ms.
                      FirstName: Jane
                      LastName: Doe
                      EmailAddress: jane.doe@comp.com
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AbsencePeriodResponse'
              examples:
                updated:
                  summary: OK
                  value:
                    Id: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
                    User: ada.rodriguez@comp.com
                    StartDate: 2024-12-20T08:00:00+0200
                    EndDate: 2025-01-01T08:00:00+0200
                    Substitutes:
                      - Id: 1fdbad81-75e5-4cc8-b113-39255fa119d7
                        Type: person
                        ActionTypes:
                          - signer
                          - receiver
                        AllowedToReassign: true
                        Language: en
                        LastName: Doe
                        EmailAddress: jane.doe@comp.com
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: An exception has occured
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/UserNotFoundError'
                    - $ref: '#/components/schemas/AbsencePeriodNotFoundError'
                    - $ref: '#/components/schemas/SubstituteNotFoundError'
                    - $ref: '#/components/schemas/ContactGroupNotFoundError'
              examples:
                not-found:
                  summary: An exception has occurred
                  value:
                    - ErrorCode: AbsencePeriod.NotFound
                      ErrorMessage: No absence period found with the provided id.
        '409':
          description: >-
            The request conflicts with existing information and/or business
            rules
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/AbsencePeriodOverlappingError'
                    - $ref: '#/components/schemas/DuplicateActionTypeError'
                    - $ref: '#/components/schemas/SubstituteTypeChangedError'
              examples:
                conflict:
                  summary: >-
                    The request conflicts with existing information and/or
                    business rules
                  value:
                    - ErrorCode: AbsencePeriod.OverlapsWithExistingAbsencePeriod
                      ErrorMessage: >-
                        The provided absence period overlaps with an existing
                        absence period.
      description: >-
        Updates an absence period by its identifier. The request and response
        shapes

        match the create-absence-period operation, with each existing substitute

        identified by its `Id`.
    delete:
      tags:
        - AbsencePeriods
      summary: Deletes an absence period by id
      responses:
        '204':
          description: Absence period was deleted
        '401':
          $ref: '#/components/responses/UnAuthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: An exception has occured
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AbsencePeriodNotFoundError'
              examples:
                not-found:
                  summary: An exception has occurred
                  value:
                    - ErrorCode: AbsencePeriod.NotFound
                      ErrorMessage: No absence period found with the provided id.
      description: >-
        Deletes an absence period by its identifier. Returns no content on
        success.
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        Bearer token authentication using JSON Web Tokens (JWT) or opaque
        tokens.


        **Usage**: Send the access token in the Authorization header:

        ```

        Authorization: Bearer <access_token>

        ```
  parameters:
    continuationToken:
      name: continuationToken
      in: query
      description: >-
        The token to return to request the next page: the next page number as a
        string

        (for example `'2'`), as returned in the previous response's
        `ContinuationToken`.
      schema:
        type: string
    maxQuantity:
      name: maxQuantity
      in: query
      description: The maximum number of results to return
      schema:
        type: integer
        minimum: 1
        maximum: 50
        default: 20
    sortOrder:
      name: sortOrder
      in: query
      description: specify how the result is sorted, default is ascending
      schema:
        type: string
        default: asc
        enum:
          - asc
          - desc
    pageNumber:
      name: pageNumber
      in: query
      description: The page to retrieve
      schema:
        type: integer
        minimum: 0
        default: 0
    pageSize:
      name: pageSize
      in: query
      description: Maximum number of records in the response
      schema:
        type: integer
        minimum: 1
        default: 20
    createdBefore:
      name: createdBefore
      in: query
      description: Select items created before given date
      schema:
        type: string
        format: date
        example: '2020-01-15'
    createdAfter:
      name: createdAfter
      in: query
      description: Select items created after given date
      schema:
        type: string
        format: date
        example: '2020-01-14'
    status:
      name: status
      in: query
      description: >-
        Select items that have a specific status. In addition to the live
        statuses, the

        value `Archived` is accepted to filter for archived items.
      schema:
        type: string
    documentGroupCode:
      name: documentGroupCode
      in: query
      description: Select items that have given documentGroupCode
      schema:
        type: string
    initiator:
      name: initiator
      in: query
      description: Select items that have given initiator email address
      schema:
        type: string
        format: email
        example: john.doe@example.org
    packageName:
      name: packageName
      in: query
      description: Select items that have given package name
      schema:
        type: string
    externalReference:
      name: externalReference
      in: query
      description: Select items that have given external reference
      schema:
        type: string
    packageIdPathParam:
      name: packageId
      in: path
      required: true
      description: The target package's unique identifier
      schema:
        $ref: '#/components/schemas/Package.Id'
    emailAddressQueryParam:
      name: emailAddress
      in: query
      required: true
      description: The email address of the person
      schema:
        $ref: '#/components/schemas/EmailAddress'
    documentIdPathParam:
      name: documentId
      in: path
      required: true
      description: The target document's unique identifier
      schema:
        $ref: '#/components/schemas/Document.Id'
    elementIdPathParam:
      name: elementId
      in: path
      required: true
      description: The target elements's unique identifier
      schema:
        $ref: '#/components/schemas/Element.Id'
    stakeholderIdPathParam:
      name: stakeholderId
      in: path
      required: true
      description: The target stakeholder's unique identifier
      schema:
        $ref: '#/components/schemas/Stakeholder.Id'
    culturePathParam:
      name: culture
      in: path
      required: true
      description: A language 2 letter ISO code (ISO 639-1)
      schema:
        type: string
    correlationIdPathParam:
      name: correlationId
      in: path
      required: true
      description: The target document's unique identifier
      schema:
        $ref: '#/components/schemas/CorrelationId'
    deletedBefore:
      name: deletedBefore
      in: query
      description: Select items deleted before given date
      schema:
        type: string
        format: date
        example: '2020-01-15 00:00:00+00:00'
    deletedAfter:
      name: deletedAfter
      in: query
      description: Select items deleted after given date
      schema:
        type: string
        format: date
        example: '2020-01-14 00:00:00+00:00'
    bulkActionSessionIdPathParam:
      name: bulkActionSessionId
      in: path
      required: true
      description: The unique identifier of the target bulk action session
      schema:
        $ref: '#/components/schemas/BulkActionSession.Id'
    email:
      required: true
      name: email
      in: query
      description: The user email address to search on
      schema:
        type: string
    absencePeriodIdPathParam:
      name: absencePeriodId
      in: path
      required: true
      description: An absence period id
      schema:
        allOf:
          - $ref: '#/components/schemas/Guid'
          - type: string
        description: This absence period's unique identifier
  schemas:
    ContinuationToken:
      type: string
      description: >-
        The token to pass as `continuationToken` to request the next page: the
        next page number as a string.
      example: '1'
    Error:
      title: Error
      type: object
      description: Something that went wrong
      example:
        ErrorCode: Something.WentWrong
        ErrorMessage: Something went wrong
      properties:
        ErrorCode:
          type: string
          description: >-
            An error code of something that went wrong, in the form of
            'Subject.Error:value'
        ErrorMessage:
          type: string
          description: A human-readable explanation of what went wrong
    ValidationError:
      title: Validation error
      allOf:
        - $ref: '#/components/schemas/Error'
        - description: Request failed validation
          example:
            ErrorCode: Name.MinimumLength:6
            ErrorMessage: The minimum length for a name is 6
    BusType:
      type: string
      enum:
        - Default
        - Render
        - Workflow
        - Sign
        - ServerSign
        - BulkSign
        - Notification
        - BulkAction
        - Jobs
        - Callback
        - MediumOperation
        - Event
        - AuditLog
        - Analytics
    PagingResult:
      type: object
      description: A list of items
      properties:
        PageSize:
          type: integer
          description: The requested page size
          example: 20
        Total:
          type: integer
          description: The total number of items
          example: 1
    PoisonCommandResponseItem:
      type: object
      properties:
        messageId:
          type: string
          description: The unique identifier of the poison message.
          example: 123e4567-e89b-12d3-a456-426614174000
        payload:
          type: object
          description: The payload of the poison message.
          example:
            key: value
        deliveryTime:
          type: string
          format: date-time
          description: The time in UTC the message has been delivered to the queue.
          example: '2024-04-27T10:20:30Z'
        retries:
          type: integer
          description: >-
            The number of times an attempt has been made to get the message from
            the queue and to process it.
          example: 3
        exception:
          type: string
          description: >-
            Information about the exception that made the message end up in the
            poison queue.
          example: System.Exception:...
          nullable: true
        correlationId:
          type: string
          description: The correlation identifier.
          example: CorrelationId
      required:
        - messageId
        - payload
        - deliveryTime
        - retries
        - correlationId
    PagingResultOfPoisonCommandResponseItem:
      allOf:
        - $ref: '#/components/schemas/PagingResult'
        - type: object
          properties:
            items:
              type: array
              description: The list of poison command response items.
              items:
                $ref: '#/components/schemas/PoisonCommandResponseItem'
          required:
            - items
    PoisonQueueRequestBase:
      type: object
      properties:
        busName:
          allOf:
            - $ref: '#/components/schemas/BusType'
            - description: The name of the bus from which the messages should be read.
            - example: Analytics
      required:
        - busName
    ResubmitPoisonQueueRequest:
      allOf:
        - $ref: '#/components/schemas/PoisonQueueRequestBase'
    CleanPoisonQueueRequest:
      allOf:
        - $ref: '#/components/schemas/PoisonQueueRequestBase'
    Guid:
      title: GUID
      type: string
      description: A globally unique identifier
      format: guid
      example: 00000000-0000-0000-0000-000000000000
    Package.Id:
      allOf:
        - $ref: '#/components/schemas/Guid'
        - type: string
          description: A package's unique identifier
    Package.BatchId:
      allOf:
        - $ref: '#/components/schemas/Guid'
        - type: string
          description: A batch's unique identifier, grouping multiple packages
    Package.Name:
      type: string
      description: >-
        Name of the package. It is shown in the NSEV WebPortal and used as the

        file name when the package is downloaded as a `.zip` file, so do not add
        a file

        extension.


        Avoid forbidden file-name characters - slash (`/`), backslash (`\`),
        question

        mark (`?`), percent (`%`), asterisk (`*`), colon (`:`), pipe (`|`),
        single

        quote, double quote (`"`), less-than (`<`) and greater-than (`>`) - and

        HTML-sensitive characters such as ampersand (`&`) and apostrophe. This
        list is

        not exhaustive. When using itsme signing, use only characters supported
        by

        ISO 8859-15; some software-generated characters such as curly
        apostrophes and

        long dashes are not supported.
      nullable: false
      minLength: 1
      maxLength: 150
      example: example package
    Package.Status:
      type: string
      description: The status of a package
      enum:
        - Draft
        - Pending
        - InProgress
        - Ending
        - Finished
        - Archived
        - Rejected
        - Revoked
        - Expired
        - Failed
        - Processing
        - ProcessingFailed
    CreationDate:
      type: string
      format: date-time
      description: When the resource was created
    ExpiryDate:
      type: string
      format: date-time
      description: When the resource will expire
    RevocationDate:
      type: string
      format: date-time
      nullable: true
      description: >-
        Date and time in UTC when the package got revoked. Will only be present
        for packages that are revoked.
    EmailAddress:
      title: Email address
      type: string
      format: email
      example: hello@world.test
    Package.Initiator:
      allOf:
        - $ref: '#/components/schemas/EmailAddress'
        - description: Email address of a known user of the webSigner portal
    Element.Id:
      allOf:
        - $ref: '#/components/schemas/Guid'
        - type: string
          description: An element's unique identifier
    Actor.Id:
      allOf:
        - $ref: '#/components/schemas/Guid'
        - type: string
          description: This actor's unique identifier
    Element.Type:
      type: string
      description: |
        The type of element - the discriminator across the element variants.
        The `ComboBoxField` value is available as of NSEV v8.5.
      nullable: false
      enum:
        - SigningField
        - TextBoxField
        - CheckBoxField
        - RadioGroup
        - ComboBoxField
    Element.Status:
      type: string
      description: The status of a document element
      enum:
        - Pending
        - InProgress
        - Rejected
        - Failed
        - Finished
        - Refused
    ExternalReference:
      type: string
      maxLength: 256
      description: >-
        External reference to this resource set by the calling application. NSEV

        does not use this value itself. When filtering packages, this matches
        the

        package-level external reference only, not document or field references.
    Element.MarkerType:
      type: string
      description: the type of marker (if set)
      nullable: true
      enum:
        - None
        - Text
        - PdfFormField
    Element.MarkerId:
      type: string
      description: A piece of text or PDF field identifier
      nullable: true
    UnplacedElementBaseResult:
      type: object
      description: An element on a document, e.g. a signing field
      required:
        - Type
      properties:
        Id:
          $ref: '#/components/schemas/Element.Id'
        ActorId:
          allOf:
            - $ref: '#/components/schemas/Actor.Id'
            - nullable: true
              type: string
        Type:
          $ref: '#/components/schemas/Element.Type'
        Status:
          $ref: '#/components/schemas/Element.Status'
        ExternalReference:
          $ref: '#/components/schemas/ExternalReference'
        MarkerType:
          $ref: '#/components/schemas/Element.MarkerType'
        MarkerId:
          $ref: '#/components/schemas/Element.MarkerId'
    SigningMethod:
      title: Signing method name
      type: string
      description: An NSEV signing method
      example: manual
    LegalNotice:
      title: Custom legal notice text
      type: object
      properties:
        Text:
          description: >-
            A custom legal notice the signer must retype before placing their
            signature. Use this

            when the notice is not one of the named notices configured in the
            Config Index. Write

            it in the same language as the package's documents. Legal notices
            are case-sensitive.
          type: string
          maxLength: 1000
          example: Read and approved
    UnplacedSigningFieldResult:
      title: Unplaced signing field (result)
      allOf:
        - $ref: '#/components/schemas/UnplacedElementBaseResult'
        - type: object
          description: A field that can be signed by an actor
          properties:
            Type:
              enum:
                - SigningField
            SigningMethods:
              type: array
              items:
                $ref: '#/components/schemas/SigningMethod'
            LegalNotice:
              $ref: '#/components/schemas/LegalNotice'
      example:
        Type: signingField
        SigningMethods:
          - manual
        LegalNotice:
          Text: read and approved
        Id: C923F37A-DD9F-4877-B81C-40F2940C51B0
        ActorId: 4F2C1AED-DAE3-44F5-9879-0E3FFF9ED0B8
        Status: Pending
        ExternalReference: external reference example
        MarkerType: PdfFormField
        MarkerId: '#SIG01'
    UnplacedFormFieldBaseResult:
      type: object
      description: A form field that can be completed by an actor
      properties:
        Name:
          type: string
          description: The name of the form field
        Label:
          type: string
          description: The label or alternative name of the form field
        ToolTipLabel:
          type: string
          description: The tool tip label of the form field
        IsRequired:
          type: boolean
          description: Is the form field required
    UnplacedCheckBoxFieldResult:
      title: Unplaced check box field (result)
      allOf:
        - $ref: '#/components/schemas/UnplacedElementBaseResult'
        - $ref: '#/components/schemas/UnplacedFormFieldBaseResult'
        - type: object
          description: Parameters for creating a check box field
          properties:
            Type:
              enum:
                - CheckBoxField
            DefaultValue:
              type: boolean
              description: Is the check box field checked by default
            Checked:
              type: boolean
              description: The value of the completed check box field
      example:
        Id: 5F2D5145-D31C-4D9E-8635-F687D7CC414A
        ActorId: A6BB68DD-F295-45B7-85D3-1D2DFE55A721
        Type: checkBoxField
        Status: Pending
        Name: checkBox1
        Label: some label
        ToolTipLabel: some tooltip
        IsRequired: false
        DefaultValue: true
        Checked: true
    InputType:
      title: Text box input type
      type: string
      description: >
        Available as of NSEV v8.5.

        A hint for how the text box is rendered. Defaults to `Text` when
        omitted. The hint does not

        constrain `DefaultValue`, `IsMultiline` or `CharLimit` - the API applies
        no format

        validation based on it.
      enum:
        - Text
        - Date
        - Time
        - DateTime
        - Number
    UnplacedTextBoxFieldResult:
      title: Unplaced text box field (result)
      allOf:
        - $ref: '#/components/schemas/UnplacedElementBaseResult'
        - $ref: '#/components/schemas/UnplacedFormFieldBaseResult'
        - type: object
          description: Parameters for creating a text box field
          properties:
            Type:
              enum:
                - TextBoxField
            DefaultValue:
              type: string
              description: The template for default value of the text box
            IsMultiline:
              type: boolean
              description: Defines if the text box field should be multiline
            CharLimit:
              type: integer
              nullable: true
              description: Limits the number of characters on the text box field
            InputType:
              $ref: '#/components/schemas/InputType'
            Value:
              type: string
              description: The value of the completed text box field
      example:
        Id: 5F2D5145-D31C-4D9E-8635-F687D7CC414A
        ActorId: A6BB68DD-F295-45B7-85D3-1D2DFE55A721
        Type: textBoxField
        Status: Pending
        ExternalReference: external reference
        Name: checkBox1
        Label: some label
        ToolTipLabel: some tooltip
        IsRequired: false
        DefaultValue: something
        IsMultiline: true
        CharLimit: 200
        Value: text
    UnplacedRadioOptionResult:
      allOf:
        - type: object
          description: Parameters for creating a radio button option
          properties:
            Name:
              type: string
              description: The name/choice of the option
            Label:
              type: string
              description: The label or alternative name of the option
            IsSelected:
              type: boolean
              description: Is the option pre-selected
    UnplacedRadioGroupResult:
      title: Unplaced radio group (result)
      allOf:
        - $ref: '#/components/schemas/UnplacedElementBaseResult'
        - $ref: '#/components/schemas/UnplacedFormFieldBaseResult'
        - type: object
          description: Parameters for creating a radio button group
          properties:
            Type:
              enum:
                - RadioGroup
            Selected:
              type: string
              description: The name of selected option
            Options:
              type: array
              description: The radio button group Options
              items:
                $ref: '#/components/schemas/UnplacedRadioOptionResult'
      example:
        Id: 5F2D5145-D31C-4D9E-8635-F687D7CC414A
        ActorId: A6BB68DD-F295-45B7-85D3-1D2DFE55A721
        Type: textBoxField
        Status: Pending
        ExternalReference: external reference
        Name: checkBox1
        Label: some label
        ToolTipLabel: some tooltip
        IsRequired: false
        Options:
          - Name: option1
            Label: option1 label
            IsSelected: true
          - Name: option2
            Label: option2 label
            IsSelected: false
    ComboBoxOptionResult:
      title: Combo box option (result)
      type: object
      description: |
        Available as of NSEV v8.5.
        A combo box option in a response.
      properties:
        DisplayLabel:
          type: string
          description: The display label shown to the end user
        ExportValue:
          type: string
          description: The value stored when this option is selected
    UnplacedComboBoxFieldResult:
      title: Unplaced combo box field (result)
      allOf:
        - $ref: '#/components/schemas/UnplacedElementBaseResult'
        - $ref: '#/components/schemas/UnplacedFormFieldBaseResult'
        - type: object
          description: |
            Available as of NSEV v8.5.
            A combo box (dropdown) field.
          properties:
            Type:
              enum:
                - ComboBoxField
            Options:
              type: array
              description: The combo box options
              items:
                $ref: '#/components/schemas/ComboBoxOptionResult'
            AllowCustomInput:
              type: boolean
              description: >-
                Whether the end user can type a custom value instead of
                selecting one of the options
            IsOverridable:
              type: boolean
              description: >-
                Whether the options can be modified. False when they are sourced
                from an existing PDF form

                field - via `FieldId` or a `@id` PDF-field marker; true for
                fields created with request-supplied

                options.
            Value:
              type: string
              description: The value of the completed combo box field
            DefaultValue:
              type: string
              description: The export value selected by default
      example:
        Id: 5F2D5145-D31C-4D9E-8635-F687D7CC414A
        ActorId: A6BB68DD-F295-45B7-85D3-1D2DFE55A721
        Type: ComboBoxField
        Status: Pending
        Name: Dropdown1
        Label: Select a country
        IsRequired: false
        Options:
          - DisplayLabel: United States
            ExportValue: US
          - DisplayLabel: United Kingdom
            ExportValue: UK
        AllowCustomInput: false
        IsOverridable: true
        DefaultValue: US
    UnplacedElementResult:
      oneOf:
        - $ref: '#/components/schemas/UnplacedSigningFieldResult'
        - $ref: '#/components/schemas/UnplacedCheckBoxFieldResult'
        - $ref: '#/components/schemas/UnplacedTextBoxFieldResult'
        - $ref: '#/components/schemas/UnplacedRadioGroupResult'
        - $ref: '#/components/schemas/UnplacedComboBoxFieldResult'
      discriminator:
        propertyName: Type
        mapping:
          SigningField: '#/components/schemas/UnplacedSigningFieldResult'
          CheckBoxField: '#/components/schemas/UnplacedCheckBoxFieldResult'
          TextBoxField: '#/components/schemas/UnplacedTextBoxFieldResult'
          RadioGroup: '#/components/schemas/UnplacedRadioGroupResult'
          ComboBoxField: '#/components/schemas/UnplacedComboBoxFieldResult'
    Document.Id:
      allOf:
        - $ref: '#/components/schemas/Guid'
        - type: string
          description: A document's unique identifier
    Document.Name:
      type: string
      nullable: false
      description: Name of the document
      minLength: 1
      maxLength: 150
      example: example document
    MediaType:
      nullable: false
      type: string
      format: mediaType
      description: The media type of a file
      example: application/pdf
    Language:
      type: string
      format: languageCode
      description: A country's 2 letter ISO code (ISO 639-1)
      example: en
    Document.Status:
      type: string
      description: The status of a document
      enum:
        - Draft
        - Pending
        - InProgress
        - Ending
        - Finished
        - Rejected
        - Revoked
        - Expired
        - Failed
        - Processing
        - ProcessingFailed
    ElementBase:
      type: object
      description: An element on a document, e.g. a signing field
      required:
        - Type
      properties:
        Id:
          $ref: '#/components/schemas/Element.Id'
        ActorId:
          allOf:
            - $ref: '#/components/schemas/Actor.Id'
            - nullable: true
              description: Is null when no actor has been assigned to this field yet
              type: string
        Type:
          $ref: '#/components/schemas/Element.Type'
        Status:
          $ref: '#/components/schemas/Element.Status'
        ExternalReference:
          $ref: '#/components/schemas/ExternalReference'
        CompletedDate:
          type: string
          format: dateTime
    Element.Location:
      type: object
      description: where an element is placed
      required:
        - Page
        - Left
        - Top
      properties:
        Page:
          type: integer
          description: >-
            The page of the document the element is placed on. Pages are
            1-based: 1 is the first page; 0 must not be used. To count from the
            end, use negative integers: -1 is the last page, -2 the
            second-to-last, and so on.
        Top:
          type: number
          format: float
          minimum: 0
          description: how far from the top edge of the document this is placed
        Left:
          type: number
          format: float
          minimum: 0
          description: how far from the left edge of the document this is placed
      example:
        Page: 2
        Top: 200
        Left: 200
    KeyPairMapping:
      type: object
      description: >-
        A mapping between signing method and the keypair to be used for signing
        with this method. If a signing method is not mentioned in this list,
        then the default keypair will be used when signing
      properties:
        SigningMethodName:
          description: The name of an NSEV signing method
          type: string
          example: MailOtp:MailOtp
        KeyPair:
          description: >-
            The name of the keypair that is used for signing if the
            corresponding signing method is chosen
          type: string
          example: MyKeyPair
    Element.Dimensions:
      title: Element dimensions
      type: object
      description: >
        The size of an element in points. The minimum width and height depend on
        the element

        type - a signing field must be at least 50 × 30, other elements at least
        10 × 10.

        See the [Field positioning guide](/nsev/build/guides/field-positioning).
      required:
        - Width
        - Height
      properties:
        Width:
          type: number
          format: float
          description: width of the element
          maximum: 999999
        Height:
          type: number
          format: float
          description: height of the element
          maximum: 999999
      example:
        Width: 200
        Height: 200
    SigningField:
      title: Signing field
      allOf:
        - $ref: '#/components/schemas/ElementBase'
        - type: object
          description: A field that can be signed by an actor
          properties:
            Location:
              $ref: '#/components/schemas/Element.Location'
            UsedSigningMethod:
              type: string
              description: The signingmethod that was used to sign this signingfield
            SigningMethods:
              type: array
              items:
                $ref: '#/components/schemas/SigningMethod'
            KeyPairMappings:
              type: array
              items:
                $ref: '#/components/schemas/KeyPairMapping'
            LegalNotice:
              $ref: '#/components/schemas/LegalNotice'
            Dimensions:
              $ref: '#/components/schemas/Element.Dimensions'
    FormFieldBase:
      type: object
      description: A form field that can be completed by an actor
      properties:
        Name:
          type: string
          description: The name of the form field
        Label:
          type: string
          description: The label or alternative name of the form field
        ToolTipLabel:
          type: string
          description: The tool tip label of the form field
        IsRequired:
          type: boolean
          description: Is the form field required
    CheckBoxField:
      title: Check box field
      allOf:
        - $ref: '#/components/schemas/ElementBase'
        - $ref: '#/components/schemas/FormFieldBase'
        - type: object
          description: Parameters for creating a check box field
          properties:
            Location:
              $ref: '#/components/schemas/Element.Location'
            Dimensions:
              $ref: '#/components/schemas/Element.Dimensions'
            DefaultValue:
              type: boolean
              description: Is the check box field checked by default
            Checked:
              type: boolean
              description: The value of the completed check box field
    TextBoxField:
      title: Text box field
      allOf:
        - $ref: '#/components/schemas/ElementBase'
        - $ref: '#/components/schemas/FormFieldBase'
        - type: object
          description: Parameters for creating a text box field
          properties:
            Location:
              $ref: '#/components/schemas/Element.Location'
            Dimensions:
              $ref: '#/components/schemas/Element.Dimensions'
            DefaultValue:
              type: string
              description: The template for default value of the text box
            IsMultiline:
              type: boolean
              description: Defines if the text box field should be multiline
            CharLimit:
              type: integer
              nullable: true
              description: Limits the number of characters on the text box field
            InputType:
              $ref: '#/components/schemas/InputType'
            Value:
              type: string
              description: The value of the completed text box field
    RadioOption:
      allOf:
        - type: object
          description: Parameters for creating a radio button option
          properties:
            Name:
              type: string
              description: The name/choice of the option
            Label:
              type: string
              description: The label or alternative name of the option
            IsSelected:
              type: boolean
              description: Is the option pre-selected
            Location:
              $ref: '#/components/schemas/Element.Location'
            Dimensions:
              $ref: '#/components/schemas/Element.Dimensions'
    RadioGroup:
      title: Radio group
      allOf:
        - $ref: '#/components/schemas/ElementBase'
        - $ref: '#/components/schemas/FormFieldBase'
        - type: object
          description: Parameters for creating a radio button group
          properties:
            Selected:
              type: string
              description: The name of selected option
            Options:
              type: array
              description: The radio button group Options
              items:
                $ref: '#/components/schemas/RadioOption'
    ComboBoxField:
      title: Combo box field
      allOf:
        - $ref: '#/components/schemas/ElementBase'
        - $ref: '#/components/schemas/FormFieldBase'
        - type: object
          description: |
            Available as of NSEV v8.5.
            A combo box (dropdown) field.
          properties:
            Location:
              $ref: '#/components/schemas/Element.Location'
            Dimensions:
              $ref: '#/components/schemas/Element.Dimensions'
            Options:
              type: array
              description: The combo box options
              items:
                $ref: '#/components/schemas/ComboBoxOptionResult'
            AllowCustomInput:
              type: boolean
              description: >-
                Whether the end user can type a custom value instead of
                selecting one of the options
            IsOverridable:
              type: boolean
              description: >-
                Whether the options can be modified. False when they are sourced
                from an existing PDF form

                field - via `FieldId` or a `@id` PDF-field marker; true for
                fields created with request-supplied

                options.
            Value:
              type: string
              description: The value of the completed combo box field
            DefaultValue:
              type: string
              description: The export value selected by default
    Element:
      oneOf:
        - $ref: '#/components/schemas/SigningField'
        - $ref: '#/components/schemas/CheckBoxField'
        - $ref: '#/components/schemas/TextBoxField'
        - $ref: '#/components/schemas/RadioGroup'
        - $ref: '#/components/schemas/ComboBoxField'
      discriminator:
        propertyName: Type
        mapping:
          SigningField: '#/components/schemas/SigningField'
          CheckBoxField: '#/components/schemas/CheckBoxField'
          TextBoxField: '#/components/schemas/TextBoxField'
          RadioGroup: '#/components/schemas/RadioGroup'
          ComboBoxField: '#/components/schemas/ComboBoxField'
    ProofCorrelationId:
      type: string
      deprecated: true
      description: Id for correlating with other resources in the proofs system
    Document.OrderIndex:
      type: integer
      description: The Order Index of the document.
    DocumentCreatedSync:
      type: object
      description: A single document
      additionalProperties: false
      properties:
        Id:
          $ref: '#/components/schemas/Document.Id'
        PackageId:
          $ref: '#/components/schemas/Package.Id'
        Name:
          $ref: '#/components/schemas/Document.Name'
        CreationDate:
          $ref: '#/components/schemas/CreationDate'
        MediaType:
          allOf:
            - $ref: '#/components/schemas/MediaType'
            - enum:
                - application/pdf
                - application/xml
        Language:
          $ref: '#/components/schemas/Language'
        Status:
          $ref: '#/components/schemas/Document.Status'
        Elements:
          type: array
          description: The document's elements
          items:
            $ref: '#/components/schemas/Element'
        ExternalReference:
          $ref: '#/components/schemas/ExternalReference'
        ProofCorrelationId:
          $ref: '#/components/schemas/ProofCorrelationId'
        OrderIndex:
          $ref: '#/components/schemas/Document.OrderIndex'
    Document:
      allOf:
        - $ref: '#/components/schemas/DocumentCreatedSync'
        - type: object
      properties:
        IsActionNeeded:
          type: boolean
          description: >-
            Indicates that the document is not fully processed and user must
            take an action to keep/remove signatures/markers. (presented only
            for draft packages if true)
        ErrorCode:
          type: string
          description: >-
            The code of error occured during async document uploading.
            (presented only for processingFailed document)
        HasSignatures:
          type: boolean
          description: >-
            If present, the document data contains signatures. (Returns only for
            document with IsActionNeeded)
        HasSigningFields:
          type: boolean
          description: >-
            If present, the document data contains signing field markers.
            (Returns only for document with IsActionNeeded)
        HasFormFields:
          type: boolean
          description: >-
            If present, the document data contains form field markers. (Returns
            only for document with IsActionNeeded)
    Stakeholder.Id:
      allOf:
        - $ref: '#/components/schemas/Guid'
        - type: string
          description: A stakeholder's unique identifier
    Stakeholder.Type:
      type: string
      description: >-
        The type of stakeholder, and the discriminator across the stakeholder
        variants.


        - **Person** - a single individual; only that person can act.

        - **Group** - a group of people defined inline; any member may act on
        behalf of
          the group, and once one member acts the others cannot.
        - **ContactGroup** - references a contact group created in the WebPortal
        by its
          code; behaves like a group. Exists only while the package is in draft and is
          converted to **Group** when the package moves to pending.
        - **Undecided** - the implicit stakeholder a package starts with before
        any
          stakeholder has been assigned; it cannot be deleted.
      nullable: false
      enum:
        - Undecided
        - Person
        - Group
        - ContactGroup
    Actor.Type:
      type: string
      description: >-
        The type of action an actor performs on a package, and the discriminator
        across

        the actor variants.


        - **FormFiller** - fills TextBoxField, CheckBoxField, RadioGroup and
        ComboBoxField
          (NSEV v8.5+) elements; does
          not sign or approve. Must be placed in the first process step.
        - **Approver** - approves a document as fit for signing, before any
        signer acts.
          Must be placed in the first process step (may share it with FormFillers).
        - **Signer** - signs one or more signing fields.

        - **Receiver** - receives a copy of the fully signed document; takes no
        action and
          must be placed in the last process step.
      enum:
        - Signer
        - Receiver
        - Approver
        - FormFiller
    Actor.Status:
      type: string
      description: >-
        The status of an actor's action.


        - **Draft** - the package is still in draft; the action is not yet
        active.

        - **Waiting** - the action is waiting for an earlier process step to
        complete.

        - **Available** - the action is ready to be performed.

        - **InProgress** - the action is being performed.

        - **Failed** - the action failed.

        - **Finished** - the action was completed.

        - **Rejected** - the actor rejected the document.

        - **Skipped** - the action was skipped (for example via skip
        approvers/signers).
      enum:
        - Draft
        - Waiting
        - Available
        - InProgress
        - Failed
        - Finished
        - Rejected
        - Skipped
    ActorBase:
      allOf:
        - type: object
          description: An action to be performed
          additionalProperties: false
          properties:
            Id:
              $ref: '#/components/schemas/Actor.Id'
            Type:
              $ref: '#/components/schemas/Actor.Type'
            Status:
              $ref: '#/components/schemas/Actor.Status'
            SuppressNotifications:
              type: boolean
              default: false
              description: suppress the notifications for this actor
        - type: object
          properties:
            ActionUrls:
              type: array
              items:
                type: object
                description: links to interact with the package for this stakeholder
                properties:
                  Email:
                    type: string
                    format: email
                    description: >-
                      email address of the person stakeholder that will have to
                      perform this action
                  Url:
                    type: string
                    format: url
                    description: >-
                      link to interact with the package for this person
                      stakeholder
                  Type:
                    type: string
                    description: Type of action url
                    enum:
                      - Approver
                      - FormFiller
                      - Signer
                      - Preview
                      - Download
                      - Archive
        - type: object
          properties:
            Links:
              type: array
              description: Only present when the actor's stakeholder is a person.
              items:
                type: string
                format: url
                description: links to interact with the package for this person stakeholder
            MemberLinks:
              type: array
              description: >-
                Only present when the actor's stakeholder is a group or contact
                group.
              items:
                type: object
                description: links to interact with the package for this group stakeholder
                properties:
                  Email:
                    type: string
                    format: email
                    description: >-
                      email address of the member that will have to perform this
                      action
                  Link:
                    type: string
                    format: url
                    description: >-
                      link to interact with the package for this stakeholder
                      member
    ActorResult:
      type: object
      description: The result of a completed action
      properties:
        CompletedBy:
          type: object
          properties:
            Email:
              type: string
              format: email
              example: john@doe.test
            VerifiedName:
              type: string
              nullable: true
              example: John Doe
              description: >-
                The name of a person taken from third party authentication
                services.
        CompletedDate:
          type: string
          format: dateTime
    SignerActorResult:
      allOf:
        - $ref: '#/components/schemas/ActorResult'
        - type: object
          properties:
            RejectReason:
              type: string
              description: why a signer rejected signing
    SignerActor:
      title: Signer
      allOf:
        - $ref: '#/components/schemas/ActorBase'
        - type: object
          description: Signs one or more signing fields
          properties:
            Type:
              enum:
                - Signer
            Result:
              $ref: '#/components/schemas/SignerActorResult'
            Elements:
              type: array
              description: The actor's elements
              items:
                oneOf:
                  - $ref: '#/components/schemas/SigningField'
            RedirectUrl:
              type: string
              format: url
              description: >
                Url to which the stakeholder is redirected after completing this
                action
            RedirectType:
              type: string
              enum:
                - AfterSession
                - Immediately
                - AfterDelay
                - AfterCompletion
              description: >
                When stakeholder gets redirected after completing this action
                  * afterSession - Redirect after signing session is ended, but before package is completed (only important for last signer).
                  * immediately - Redirect as soon as possible.
                  * afterDelay - Redirect after some delay (defined on frontend).
                  * afterCompletion - Redirect after the package is completed.

                Only valid together with RedirectUrl - the API rejects
                RedirectType without it.
            BackButtonUrl:
              type: string
              format: url
              description: >-
                URL to which the end user is sent after pressing close session
                button
              example: https://homepage.example.test
    ReceiverActor:
      title: Receiver
      allOf:
        - $ref: '#/components/schemas/ActorBase'
        - type: object
          description: Can download a copy of the fully signed document
          properties:
            Type:
              enum:
                - Receiver
    ApproverActorResult:
      allOf:
        - $ref: '#/components/schemas/ActorResult'
        - type: object
          properties:
            RejectReason:
              type: string
              description: why an approver rejected the package
    ApproverActor:
      title: Approver
      allOf:
        - $ref: '#/components/schemas/ActorBase'
        - type: object
          description: Determines whether a document is fit for signing
          properties:
            Type:
              enum:
                - Approver
            RedirectUrl:
              type: string
              format: url
              description: >
                Url to which the stakeholder is redirected after completing this
                action, always as soon as possible
            BackButtonUrl:
              type: string
              format: url
              description: >-
                URL to which the end user is sent after pressing close session
                button
              example: https://homepage.example.test
            Result:
              $ref: '#/components/schemas/ApproverActorResult'
    FormFillerActorResult:
      allOf:
        - $ref: '#/components/schemas/ActorResult'
        - type: object
          properties:
            RejectReason:
              type: string
              description: why a form filler rejected the package
    FormFillerActor:
      title: Form filler
      allOf:
        - $ref: '#/components/schemas/ActorBase'
        - type: object
          description: Completes one or more form fields
          properties:
            Type:
              enum:
                - FormFiller
            Elements:
              type: array
              description: The actor's elements
              items:
                oneOf:
                  - $ref: '#/components/schemas/CheckBoxField'
                  - $ref: '#/components/schemas/TextBoxField'
                  - $ref: '#/components/schemas/RadioGroup'
                  - $ref: '#/components/schemas/ComboBoxField'
            RedirectUrl:
              type: string
              format: url
              description: >
                Url to which the stakeholder is redirected after completing this
                action
            RedirectType:
              type: string
              enum:
                - AfterSession
                - Immediately
                - AfterDelay
                - AfterCompletion
              description: >
                When stakeholder gets redirected after completing this action
                  * afterSession - Redirect after signing session is ended, but before package is completed (only important for last signer).
                  * immediately - Redirect as soon as possible.
                  * afterDelay - Redirect after some delay (defined on frontend).
                  * afterCompletion - Redirect after the package is completed.

                Only valid together with RedirectUrl - the API rejects
                RedirectType without it.
            BackButtonUrl:
              type: string
              format: url
              description: >-
                URL to which the end user is sent after pressing close session
                button
              example: https://homepage.example.test
            Result:
              $ref: '#/components/schemas/FormFillerActorResult'
    Actor:
      oneOf:
        - $ref: '#/components/schemas/SignerActor'
        - $ref: '#/components/schemas/ReceiverActor'
        - $ref: '#/components/schemas/ApproverActor'
        - $ref: '#/components/schemas/FormFillerActor'
      discriminator:
        propertyName: Type
        mapping:
          Signer: '#/components/schemas/SignerActor'
          Receiver: '#/components/schemas/ReceiverActor'
          Approver: '#/components/schemas/ApproverActor'
          FormFiller: '#/components/schemas/FormFillerActor'
      example:
        Type: signer
        Status: available
        Elements:
          - Id: 00000000-0000-0000-0000-000000000000
            Type: signingField
            Location:
              Page: 2
              Top: 250
              Left: 250
            Dimensions:
              Width: 230
              Height: 230
    StakeholderBase:
      type: object
      description: A person or group with an interest in a package
      additionalProperties: false
      required:
        - Type
      properties:
        Id:
          $ref: '#/components/schemas/Stakeholder.Id'
        PackageId:
          $ref: '#/components/schemas/Package.Id'
        Type:
          $ref: '#/components/schemas/Stakeholder.Type'
        Actors:
          type: array
          description: The actions to be performed
          items:
            $ref: '#/components/schemas/Actor'
        ExternalReference:
          $ref: '#/components/schemas/ExternalReference'
    UndecidedStakeholder:
      title: Undecided stakeholder
      allOf:
        - $ref: '#/components/schemas/StakeholderBase'
        - type: object
          description: Unspecified stakeholder
          required:
            - Type
          properties:
            Type:
              type: string
              description: The type of stakeholder
              nullable: false
              enum:
                - Undecided
    Stakeholder.FirstName:
      type: string
      maxLength: 150
      description: First name of the stakeholder
    Stakeholder.LastName:
      type: string
      maxLength: 150
      description: Last name of the stakeholder
    PhoneNumber:
      type: string
      example: +32xxxxxxxxx
      description: >-
        Phone number used to receive an SMS OTP. Always include the country code
        (for

        example +32xxxxxxxxx); use a leading plus sign rather than "00" as the

        international dialing prefix, and never include spaces.
    AdditionalProperties:
      type: object
      description: >-
        Additional stakeholder properties configured in the Contact Properties
        Settings of

        the configuration - any extra stakeholder information the administrator
        requires

        (for example maiden name or nationality). Two properties are configured
        by default

        in every environment: **BeId** (the stakeholder's national security
        number) and

        **BeLawyer** (their lawyer ID). When a mandated signing rule is applied
        to a

        property, that property becomes mandatory and its value is checked
        against the

        data extracted from the signing certificate or returned by the signing
        service; a

        match is required for the stakeholder to be mandated to sign. Use Get
        signing

        methods to see which additional properties are mandatory for each
        signing method.
      additionalProperties:
        type: object
      example:
        BeId: '12345678900'
        BeLawyer: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
    Person:
      type: object
      description: A person
      required:
        - Language
        - LastName
        - EmailAddress
      properties:
        Language:
          allOf:
            - $ref: '#/components/schemas/Language'
            - description: The person's language
        Title:
          type: string
          maxLength: 100
          description: The person's title
          example: Ms.
        FirstName:
          type: string
          maxLength: 150
          description: The person's first name
          example: Jane
        LastName:
          type: string
          maxLength: 150
          description: The person's last name
          example: Doe
        EmailAddress:
          allOf:
            - $ref: '#/components/schemas/EmailAddress'
            - description: The person's email address
        PhoneNumber:
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'
            - description: The person's phone number
            - example: +1 202-918-2132
        BirthDate:
          type: string
          format: date
        ExternalReference:
          allOf:
            - $ref: '#/components/schemas/ExternalReference'
            - description: The person's external reference
            - example: Client_XYZ_Account_Manager
        AdditionalProperties:
          allOf:
            - $ref: '#/components/schemas/AdditionalProperties'
            - description: The person's additional properties
    Substitute.AllowedToReassign:
      type: object
      properties:
        AllowedToReassign:
          type: boolean
          description: >-
            Indicates whether the substitute is allowed to reassign the actor to
            another party
    SubstituteActor:
      properties:
        Id:
          $ref: '#/components/schemas/Actor.Id'
        Type:
          $ref: '#/components/schemas/Actor.Type'
    StakeholderSubstitute:
      required:
        - Language
        - LastName
        - EmailAddress
      allOf:
        - $ref: '#/components/schemas/Person'
        - $ref: '#/components/schemas/Substitute.AllowedToReassign'
        - type: object
          properties:
            Actor:
              $ref: '#/components/schemas/SubstituteActor'
    PersonStakeholder:
      title: Person stakeholder
      allOf:
        - $ref: '#/components/schemas/StakeholderBase'
        - type: object
          description: A single individual
          required:
            - Language
            - LastName
            - EmailAddress
          properties:
            Type:
              type: string
              description: The type of stakeholder
              nullable: false
              enum:
                - Person
            Language:
              $ref: '#/components/schemas/Language'
            FirstName:
              $ref: '#/components/schemas/Stakeholder.FirstName'
            LastName:
              $ref: '#/components/schemas/Stakeholder.LastName'
            EmailAddress:
              $ref: '#/components/schemas/EmailAddress'
            PhoneNumber:
              $ref: '#/components/schemas/PhoneNumber'
            BirthDate:
              type: string
              format: date
            AdditionalProperties:
              $ref: '#/components/schemas/AdditionalProperties'
            Substitutes:
              type: array
              description: Active substitutes of the person
              items:
                $ref: '#/components/schemas/StakeholderSubstitute'
      example:
        Id: 00000000-0000-0000-0000-000000000000
        PackageId: 00000000-0000-0000-0000-000000000000
        Type: person
        Actors:
          - Id: 00000000-0000-0000-0000-000000000000
            Type: signer
            Status: available
            Links:
              - https://dothething.test
          - Id: 00000000-0000-0000-0000-000000000000
            Type: signer
            Status: unavailable
          - Id: 00000000-0000-0000-0000-000000000000
            Type: signer
            Status: skipped
        ExternalReference: string
        Language: en
        FirstName: string
        LastName: string
        EmailAddress: hello@world.test
        BirthDate: '2020-01-22'
    GroupMember:
      required:
        - Language
        - LastName
        - EmailAddress
      properties:
        Language:
          $ref: '#/components/schemas/Language'
        FirstName:
          type: string
          maxLength: 150
        LastName:
          type: string
          maxLength: 150
        EmailAddress:
          $ref: '#/components/schemas/EmailAddress'
        BirthDate:
          type: string
          format: date
        PhoneNumber:
          $ref: '#/components/schemas/PhoneNumber'
        ExternalReference:
          $ref: '#/components/schemas/ExternalReference'
        AdditionalProperties:
          $ref: '#/components/schemas/AdditionalProperties'
        Substitutes:
          type: array
          description: Active substitutes of the group member
          items:
            $ref: '#/components/schemas/StakeholderSubstitute'
    GroupStakeholder:
      title: Group stakeholder
      allOf:
        - $ref: '#/components/schemas/StakeholderBase'
        - type: object
          description: >-
            a group of people where a single member will have to perform an
            action
          properties:
            Type:
              type: string
              description: The type of stakeholder
              nullable: false
              enum:
                - Group
            GroupName:
              type: string
              maxLength: 128
              description: Name of the group
            Members:
              type: array
              description: Members of the group
              items:
                $ref: '#/components/schemas/GroupMember'
      example:
        Id: 00000000-0000-0000-0000-000000000000
        PackageId: 00000000-0000-0000-0000-000000000000
        Type: group
        Actors:
          - Id: 00000000-0000-0000-0000-000000000000
            Type: signer
            Status: available
            MemberLinks:
              - Email: zu@li.test
                Link: https://dothething.test
              - Email: john@doe.test
                Link: https://alsocompleteyouraction.test
        GroupName: Group123
        Members:
          - Language: en
            FirstName: John
            LastName: Doe
            EmailAddress: john@doe.test
            BirthDate: '1990-01-16'
          - Language: en
            FirstName: Zu
            LastName: Li
            EmailAddress: zu@li.test
            BirthDate: '1991-03-14'
    ContactGroupStakeholder:
      title: Contact group stakeholder
      allOf:
        - $ref: '#/components/schemas/StakeholderBase'
        - type: object
          description: >-
            A contact group defined in NSEV where a single member will have to
            perform an action, is converted to 'group' when the package is
            submitted
          properties:
            Type:
              type: string
              description: The type of stakeholder
              nullable: false
              enum:
                - ContactGroup
            ContactGroupCode:
              type: string
              description: an NSEV contactgroup identifier
            Members:
              description: The members of the referenced contact group
              type: array
              items:
                $ref: '#/components/schemas/GroupMember'
      example:
        Id: 00000000-0000-0000-0000-000000000000
        PackageId: 00000000-0000-0000-0000-000000000000
        Type: contactGroup
        ContactGroupCode: '00002'
        Actors:
          - Id: 00000000-0000-0000-0000-000000000000
            Type: signer
            Status: available
            MemberLinks:
              - Email: john@doe.test
                Link: https://alsocompleteyouraction.test
              - Email: zu@li.test
                Link: https://dothething.test
        ExternalReference: string
        Members:
          - Language: en
            FirstName: John
            LastName: Doe
            EmailAddress: john@doe.test
            BirthDate: '1990-01-16'
          - Language: en
            FirstName: Zu
            LastName: Li
            EmailAddress: zu@li.test
            BirthDate: '1991-03-14'
    Stakeholder:
      oneOf:
        - $ref: '#/components/schemas/UndecidedStakeholder'
        - $ref: '#/components/schemas/PersonStakeholder'
        - $ref: '#/components/schemas/GroupStakeholder'
        - $ref: '#/components/schemas/ContactGroupStakeholder'
      discriminator:
        propertyName: Type
        mapping:
          Undecided: '#/components/schemas/UndecidedStakeholder'
          Person: '#/components/schemas/PersonStakeholder'
          Group: '#/components/schemas/GroupStakeholder'
          ContactGroup: '#/components/schemas/ContactGroupStakeholder'
    Package.DocumentGroupCode:
      type: string
      description: >-
        Identifier of the document group the package is uploaded to. By default
        an

        initiator uploads to their personal "My Documents" folder, which cannot
        be

        shared. An NSEV admin can configure additional document groups so users

        can collaborate on each other's packages. To use "My Documents", omit
        this

        parameter or pass `00001`; to use a specific group, pass its document
        group

        code. Use the Get document groups call to discover the configured codes.
    WarningBase:
      type: object
      description: |
        A notice of a possible problem so it can be resolved or prevented
      properties:
        ResourceType:
          type: string
          description: The subject of the warning
          enum:
            - process
            - package
            - document
            - archiving
        Code:
          type: string
        Message:
          type: string
    ProcessWarning:
      title: Process warning
      allOf:
        - $ref: '#/components/schemas/WarningBase'
        - type: object
          description: >
            A warning about the process of a package.  

            E.g. group members that don't have the necessary data to sign with a
            signing method
          properties:
            Stakeholder:
              type: object
              description: The stakeholder involved
              properties:
                Id:
                  $ref: '#/components/schemas/Stakeholder.Id'
                ExternalReference:
                  $ref: '#/components/schemas/ExternalReference'
            Actor:
              description: The actor involved
              properties:
                Id:
                  $ref: '#/components/schemas/Actor.Id'
      example:
        ResourceType: process
        Code: ContactGroup.SomeMissingPhoneNumbers
        Message: >-
          Some of the group members don't have a phone number required for
          [SmsOTP] signing type.
        Stakeholder:
          Id: 82c6b4f4-70fe-4fff-b176-6df0f4e79293
          ExternalReference: userXYZ
        Actor:
          Id: 73462bf5-8430-411d-befb-b35c92f35e10
    PackageWarning:
      title: Package warning
      allOf:
        - $ref: '#/components/schemas/WarningBase'
        - type: object
          description: |
            A warning about the package.  
            E.g. the package size exceeded the recommended limit.
      example:
        ResourceType: package
        Code: Package.RecommendedMaxSize:150
        Message: Recommended size of the package is 150 MB
    DocumentWarning:
      title: Document warning
      allOf:
        - $ref: '#/components/schemas/WarningBase'
        - type: object
          description: |
            A warning about the document of a package. 
            E.g. the document size exceeded the recommended limit.
          properties:
            Document:
              type: object
              description: The document involved
              properties:
                Id:
                  $ref: '#/components/schemas/Document.Id'
                ExternalReference:
                  $ref: '#/components/schemas/ExternalReference'
      example:
        ResourceType: document
        Code: Document.RecommendedMaxSize:100
        Message: Recommended maximum document size is 100 MB.
        Document:
          Id: 02caccbb-91b4-4e7a-902a-0e0cfc9cf134
          ExternalReference: doc1
    Warning:
      oneOf:
        - $ref: '#/components/schemas/ProcessWarning'
        - $ref: '#/components/schemas/PackageWarning'
        - $ref: '#/components/schemas/DocumentWarning'
      discriminator:
        propertyName: ResourceType
        mapping:
          process: '#/components/schemas/ProcessWarning'
          package: '#/components/schemas/PackageWarning'
          document: '#/components/schemas/DocumentWarning'
    AutomaticReminder:
      description: >-
        Contains information about a package's automatic reminder settings.
        Please note that values are taken from configuration defaults, if
        request object is empty.
      properties:
        IsSendAutomaticRemindersEnabled:
          type: boolean
        DaysBeforeFirstReminder:
          type: integer
          minimum: 1
        IsRepeatRemindersEnabled:
          type: boolean
        RepeatReminders:
          type: integer
          minimum: 1
    ExpirationReminder:
      description: >-
        Contains information about a package's expiration reminder settings.
        Please note that values are taken from configuration defaults, if
        request object is empty.
      properties:
        IsSendExpirationRemindersEnabled:
          type: boolean
        DaysBeforeExpirationReminder:
          type: integer
          minimum: 1
    OtpAuthenticationSetting:
      description: Contains settings for the package OTP authentication
      properties:
        IsSmsOtpAuthenticationEnabled:
          type: boolean
          nullable: false
        IsMailOtpAuthenticationEnabled:
          type: boolean
          nullable: false
    SigningMethodWithKeyPair:
      title: Signing method with key pair
      type: object
      description: >-
        A signing method, optionally pinned to a key pair. In requests, a bare
        signing-method name

        string is also accepted anywhere this object is expected, as shorthand
        for `{ "Name": "<method>" }`.

        Responses always return the object form.
      required:
        - Name
      properties:
        Name:
          description: The name of an NSEV signing method
          type: string
          example: MailOtp:MailOtp
        KeyPair:
          description: >-
            the name of the keypair to be used for signing, the default keypair
            will be used when null
          type: string
          example: MyKeyPair
    Package:
      type: object
      description: Response model for a package
      additionalProperties: false
      properties:
        Id:
          $ref: '#/components/schemas/Package.Id'
        BatchId:
          $ref: '#/components/schemas/Package.BatchId'
        Name:
          $ref: '#/components/schemas/Package.Name'
        Status:
          $ref: '#/components/schemas/Package.Status'
        IsActionNeeded:
          type: boolean
          description: >-
            If present, the package contains not fully uploaded documents.
            Signatures/markers were detected and user must take an action to
            keep/remove them.
        CreationDate:
          $ref: '#/components/schemas/CreationDate'
        ExpiryDate:
          $ref: '#/components/schemas/ExpiryDate'
        RevocationDate:
          $ref: '#/components/schemas/RevocationDate'
        Initiator:
          $ref: '#/components/schemas/Package.Initiator'
        UnplacedElements:
          type: array
          description: This package's elements that aren't placed aynywhere yet
          items:
            $ref: '#/components/schemas/UnplacedElementResult'
        Documents:
          type: array
          description: This package's documents
          items:
            $ref: '#/components/schemas/Document'
        Stakeholders:
          type: array
          description: This package's stakeholders
          items:
            $ref: '#/components/schemas/Stakeholder'
        DefaultLegalNotice:
          allOf:
            - $ref: '#/components/schemas/LegalNotice'
            - type: object
              description: The default legal notice that will be added to a signing field
        ExternalReference:
          $ref: '#/components/schemas/ExternalReference'
        DocumentGroupCode:
          $ref: '#/components/schemas/Package.DocumentGroupCode'
        ThemeCode:
          type: string
          description: identifier of the theme this package has
        CallBackUrl:
          type: string
          format: url
          description: >-
            url that will be called each time a signature has been put on the
            document
        NotificationCallBackUrl:
          type: string
          format: url
          description: url that will be called when the signer requests a new signing url
        F2fSigningUrl:
          type: string
          format: url
          description: >-
            Link to the package which allows to start a face to face signing
            session
        PreviewUrl:
          type: string
          format: url
          description: Link to the package which allows only a preview of documents
        DefaultRedirectUrl:
          type: string
          format: url
          description: >
            Default url to which stakeholders will be redirected after
            completing their actions.

            Set on package submit, when actor has no RedirectUrl.
        F2fRedirectUrl:
          type: string
          format: url
          description: >
            Url to which the end user is redirected after all fields have been
            signed with ‘face to face’ signing.
        IsUnsignedContentDownloadable:
          type: boolean
          description: >
            Whether a signer can download the unsigned content of this package
            or not

            Default when not specified is taken from config ( Customization
            Settings > IsDownloadUnsignedFilesEnabled )
        IsReassignEnabled:
          type: boolean
          description: >
            Whether a stakeholder can reassign his/her action ( actor ) to
            another party.  

            Default when not specified is taken from config ( Customization
            Settings > IsReassignEnabled )
        ActionUrlExpirationPeriodInDays:
          type: integer
          nullable: true
          minimum: 1
          description: >
            This parameter determines after how many days the action URLs must
            expire when they are not used.

            When no value is entered, this parameter takes its value from the
            Config Index setting IsActionUrlExpirationEnabled

            under Customization Settings. 

            The maximum value equals the number of days left until 9999-12-31.
        ProofCorrelationId:
          $ref: '#/components/schemas/ProofCorrelationId'
        AddInitiatorAsReceiver:
          type: boolean
          nullable: true
          description: >
            If true, adds the initiator as a receiver on submit.   This property
            is only available on draft packages.
        MustBeArchived:
          type: boolean
          nullable: false
          description: >-
            If true, the package will be sent to the external archive when
            status is FINISHED.
        ArchiveAuditProofs:
          type: boolean
          nullable: false
          description: >-
            If true, the audit proofs will be sent to the external archive when
            package status is FINISHED.
        ArchiveAuditTrail:
          type: boolean
          nullable: false
          description: >-
            If true, the audit trail will be sent to the external archive when
            package status is FINISHED.
        Warnings:
          type: array
          items:
            $ref: '#/components/schemas/Warning'
        AutomaticReminder:
          $ref: '#/components/schemas/AutomaticReminder'
        ExpirationReminder:
          $ref: '#/components/schemas/ExpirationReminder'
        OtpAuthenticationSetting:
          $ref: '#/components/schemas/OtpAuthenticationSetting'
        DefaultSigningMethods:
          type: array
          nullable: true
          description: >
            Available as of NSEV v8.5.

            Default signing methods applied to every signing field that is
            created on the package

            without explicitly configured signing methods - whether at package
            or actor creation,

            through the create element endpoints, or from marker-matched fields
            at document upload.

            Only populated while the package is a draft: the defaults are copied
            onto each such field

            the moment it is created, and on submit this package-level property
            is cleared. Not exposed on the template

            object itself, but a package created from a template inherits the
            source package's

            defaults.
          items:
            $ref: '#/components/schemas/SigningMethodWithKeyPair'
    PackageListDetailed:
      title: Detailed packages
      description: |-
        A page of packages in their full representation, returned when the
        `detailed` query parameter is `true` (the default).
      allOf:
        - $ref: '#/components/schemas/PagingResult'
        - type: object
          properties:
            Items:
              type: array
              description: The packages on this page, each in full detail.
              items:
                $ref: '#/components/schemas/Package'
    PackageSimple:
      type: object
      description: A simplified response model for a package.
      properties:
        Id:
          $ref: '#/components/schemas/Package.Id'
        BatchId:
          $ref: '#/components/schemas/Package.BatchId'
        Name:
          $ref: '#/components/schemas/Package.Name'
        Status:
          $ref: '#/components/schemas/Package.Status'
        CreationDate:
          $ref: '#/components/schemas/CreationDate'
        ExpiryDate:
          $ref: '#/components/schemas/ExpiryDate'
        RevocationDate:
          $ref: '#/components/schemas/RevocationDate'
        Initiator:
          $ref: '#/components/schemas/Package.Initiator'
        IsActionNeeded:
          type: boolean
        ExternalReference:
          $ref: '#/components/schemas/ExternalReference'
        DocumentGroupCode:
          $ref: '#/components/schemas/Package.DocumentGroupCode'
    PackageListSimple:
      title: Simplified packages
      description: |-
        A page of packages as lightweight summaries, returned when the
        `detailed` query parameter is `false`.
      allOf:
        - $ref: '#/components/schemas/PagingResult'
        - type: object
          properties:
            Items:
              type: array
              description: The packages on this page, each as a simplified summary.
              items:
                $ref: '#/components/schemas/PackageSimple'
    CreateElementBase:
      type: object
      description: >
        Parameters common to every created element, including where it is
        placed. Choose **one**

        placement method and supply only its fields:


        - **Explicit coordinates** - supply `Location` and `Dimensions`.

        - **Text marker** - supply `Marker` (a code embedded in the document
        text).

        - **Existing PDF form field** - supply `FieldId`.


        Do not combine methods. Radio groups are placed per-option (see
        `CreateRadioGroup`), and a

        server-signed signing field may be created invisible with none of these.
        For the full rules,

        marker formats and per-type minimum dimensions, see the

        [Field positioning guide](/nsev/build/guides/field-positioning).
      additionalProperties: false
      required:
        - Type
      properties:
        Type:
          type: string
          description: the type of element
          enum:
            - SigningField
            - CheckBoxField
            - TextBoxField
            - RadioGroup
            - ComboBoxField
        ExternalReference:
          $ref: '#/components/schemas/ExternalReference'
        Location:
          allOf:
            - $ref: '#/components/schemas/Element.Location'
            - description: >-
                Explicit placement. Supply together with `Dimensions`. Omit when
                using `Marker` or `FieldId`.
        Dimensions:
          allOf:
            - $ref: '#/components/schemas/Element.Dimensions'
            - description: >-
                Size in points. Supply together with `Location`. Omit when using
                `Marker` or `FieldId`.
        Marker:
          type: string
          pattern: >-
            ^[#@][a-zA-Z]+(?:\d*\.)?\d+(?:_(?:TB_|CB_|DD_)?(?:\d*\.)?\d+_(?:\d*\.)?\d+#)?$
          description: >-
            A piece of text inside the document marking where the element must
            be placed; it encodes the element's location and dimensions. Omit
            when using `Location`/`Dimensions` or `FieldId`. Recommended to
            embed at document-upload time, because after document conversion the
            marker may no longer be present. The format depends on the element
            type:


            - **SigningField** - a `#`-prefixed text marker `#id_height_width#`
            (for example `#SIG01_50_120#`), or a `#`-prefixed PDF field id `#id`
            that names an existing signature field.

            - **Form fields** (TextBoxField, CheckBoxField, ComboBoxField) - an
            `@`-prefixed text marker `@id_height_width#`, with
            `@id_TB_height_width#` for a text box, `@id_CB_height_width#` for a
            check box and `@id_DD_height_width#` for a combo box (NSEV v8.5+),
            or a `@`-prefixed PDF field id `@id` that names an existing form
            field.

            - **RadioGroup** cannot be placed with a text marker; use Options
            instead.


            See the [Field positioning
            guide](/nsev/build/guides/field-positioning).
        FieldId:
          type: string
          description: >-
            The name of an existing form field in the uploaded document to
            attach this element to; must be unique within the document. Omit
            when using `Location`/`Dimensions` or `Marker`. Recommended to do
            this at document-upload time, because after document conversion the
            field may no longer exist.
    CreateLegalNotice:
      oneOf:
        - $ref: '#/components/schemas/LegalNotice'
        - type: object
          title: Named legal notice from Config Index
          properties:
            Name:
              description: >-
                The name of a legal notice configured in the Config Index (for
                example `LegalNotice1`),

                whose text is also set there. The language the notice is
                displayed in depends on the

                language of the document. Use either `Name` or `Text`, not both.
              type: string
              maxLength: 20
              example: LegalNotice1
    CreateSigningField:
      title: Signing field
      allOf:
        - $ref: '#/components/schemas/CreateElementBase'
        - type: object
          description: Parameters for creating a signing field
          properties:
            Type:
              enum:
                - SigningField
            SigningMethods:
              type: array
              items:
                $ref: '#/components/schemas/SigningMethodWithKeyPair'
              description: >-
                The signing methods that may be used to sign this signing field.
                Always supply an

                array, even for a single method. Each entry is an object with a
                `Name` and an optional

                `KeyPair`; a bare signing-method name string is also accepted as
                shorthand for `{ "Name": "<method>" }`.

                When omitted, the package's `DefaultSigningMethods` (NSEV v8.5+)
                are applied to the field.
            LegalNotice:
              allOf:
                - $ref: '#/components/schemas/CreateLegalNotice'
              description: >-
                An optional legal notice added to the signing field: text the
                signer must retype

                before signing. Supply either a custom `Text` or the `Name` of a
                notice configured

                in the Config Index. When using a long legal notice, size the
                signing field

                accordingly - a small field with a long notice can shrink the
                font until the text

                is unreadable.
    CreateFormFieldBase:
      allOf:
        - $ref: '#/components/schemas/CreateElementBase'
        - type: object
          description: Parameters for creating a form field element
          additionalProperties: false
          properties:
            Name:
              type: string
              description: >-
                The name of the form field. Must be unique per document. Only
                use `Name` when placing

                the field by explicit location and dimensions or by marker; do
                not use it when

                referencing an existing form field with `FieldId`.
            Label:
              type: string
              description: The label or alternative name of the form field.
            ToolTipLabel:
              type: string
              description: >-
                The text shown as a tooltip when the user hovers over the form
                field. When the

                document already contains a prefilled form field with a tooltip,
                leave this null to

                avoid overwriting the original value.
            IsRequired:
              type: boolean
              default: false
              description: >-
                Whether the form field is mandatory. When true, the end user
                must complete it. When

                the document already contains a prefilled form field, leave this
                null to avoid

                overwriting the original value. Defaults to false.
    CreateCheckBoxField:
      title: Check box field
      allOf:
        - $ref: '#/components/schemas/CreateFormFieldBase'
        - type: object
          description: Parameters for creating a check box field
          properties:
            Type:
              enum:
                - CheckBoxField
            DefaultValue:
              type: boolean
              default: false
              description: >-
                Whether the checkbox is checked by default. The end user can
                still change it. When

                the document already contains a prefilled form field, leave this
                false to avoid

                overwriting the existing value. Defaults to false.
    CreateTextBoxField:
      title: Text box field
      allOf:
        - $ref: '#/components/schemas/CreateFormFieldBase'
        - type: object
          description: Parameters for creating a text box field
          properties:
            Type:
              enum:
                - TextBoxField
            DefaultValue:
              type: string
              description: >-
                A value prefilled into the text box, which the end user can
                change. When the document

                already contains a prefilled form field, leave this null to
                avoid overwriting the

                existing value.
            IsMultiline:
              type: boolean
              default: false
              description: >-
                Whether the text box accepts multiple lines. When true, the text
                box is scrollable.

                Defaults to false.
            CharLimit:
              type: integer
              nullable: true
              description: >-
                The maximum number of characters that may be entered in the text
                box.
            InputType:
              $ref: '#/components/schemas/InputType'
    CreateRadioOption:
      allOf:
        - type: object
          description: Parameters for creating a radio button option
          properties:
            Name:
              type: string
              description: The name (choice value) of the radio button.
            Label:
              type: string
              description: The label or alternative name of the radio button.
            IsSelected:
              type: boolean
              description: Whether this radio button is selected by default.
            Location:
              $ref: '#/components/schemas/Element.Location'
            Dimensions:
              $ref: '#/components/schemas/Element.Dimensions'
    CreateRadioGroup:
      title: Radio group
      type: object
      description: >
        Parameters for creating a radio button group. Place the group in **one**
        of two ways:


        - **By coordinates** - supply `Options`, each button positioned by its
        own `Location` and `Dimensions`.

        - **On an existing PDF field** - supply `FieldId`.


        Do not combine the two. A radio group cannot be placed with a text
        marker. For the full

        rules see the [Field positioning
        guide](/nsev/build/guides/field-positioning).
      additionalProperties: false
      properties:
        Type:
          type: string
          description: the type of element
          enum:
            - RadioGroup
        ExternalReference:
          $ref: '#/components/schemas/ExternalReference'
        Name:
          type: string
          description: >-
            The name of the radio group. Must be unique per document. Do not use
            `Name` when

            referencing an existing radio group with `FieldId`.
        Label:
          type: string
          description: The label or alternative name of the form field
        ToolTipLabel:
          type: string
          description: The tool tip label of the form field
        IsRequired:
          type: boolean
          default: false
          description: >-
            Whether the radio group is mandatory. When true, the end user must
            select an option.

            When the document already contains a prefilled form field, leave
            this null to avoid

            overwriting the original value. Defaults to false.
        Options:
          type: array
          description: >-
            The radio buttons in the group, each positioned by its own
            `Location` and `Dimensions`.

            Supply these to place the group by coordinates; omit when using
            `FieldId`.
          items:
            $ref: '#/components/schemas/CreateRadioOption'
        FieldId:
          type: string
          description: >-
            The name of an existing input field on the document. Supply this to
            place the group on

            an existing PDF field; omit when supplying `Options`. Recommended to
            do this at document

            upload time, because after a document conversion the field with this
            identifier may no longer

            exist.
    ComboBoxOption:
      title: Combo box option
      type: object
      description: >
        Available as of NSEV v8.5.

        A combo box option: the label shown to the end user and the value stored
        when it is selected.
      required:
        - DisplayLabel
      properties:
        DisplayLabel:
          type: string
          description: The display label shown to the end user
          maxLength: 256
        ExportValue:
          type: string
          description: >-
            The value stored when this option is selected. When omitted, the
            `DisplayLabel` is used as the value.
          maxLength: 256
    CreateComboBoxField:
      title: Combo box field
      allOf:
        - $ref: '#/components/schemas/CreateFormFieldBase'
        - type: object
          description: >
            Available as of NSEV v8.5.

            Parameters for creating a combo box (dropdown) field. When `FieldId`
            references an

            existing combo box in the PDF, the options come from that PDF field
            and `Options`

            must not be provided; otherwise `Options` is required.
          properties:
            Type:
              enum:
                - ComboBoxField
            Options:
              type: array
              description: >-
                The combo box options. Required unless `FieldId` is set, in
                which case the options come

                from the PDF field and this must not be provided. Option values
                (the `ExportValue`, or the

                `DisplayLabel` when no `ExportValue` is set) must be unique
                within the field.
              items:
                $ref: '#/components/schemas/ComboBoxOption'
              minItems: 1
              maxItems: 100
            AllowCustomInput:
              type: boolean
              default: false
              description: >-
                Whether the end user can type a custom value instead of
                selecting one of the options. Defaults to false.
            DefaultValue:
              type: string
              maxLength: 2048
              description: >-
                The value selected by default, which the end user can change.
                When `Options` are supplied,

                it must match the `ExportValue` (or the `DisplayLabel` when no
                `ExportValue` is set) of one

                of them, even when `AllowCustomInput` is true - and because
                option values are capped at 256

                characters, the effective maximum length is 256. When `FieldId`
                is set, the value is applied

                to the PDF-sourced options as-is; when omitted, the PDF field's
                own default is kept.
    CreateElementFromUnplacedElement:
      title: Place an unplaced element
      type: object
      description: >
        Parameters for placing an existing unplaced element, identified by
        `UnplacedElementId`.

        Choose **one** placement method and supply only its fields:


        - **Explicit coordinates** - supply `Location` and `Dimensions`.

        - **Text marker** - supply `Marker` (a code embedded in the document
        text).

        - **Radio group** - supply `Options`, each button positioned by its own
        `Location` and `Dimensions`
          (used when the unplaced element is a radio group, instead of `Location`/`Marker`).

        Do not combine methods. For the full rules and marker formats see the

        [Field positioning guide](/nsev/build/guides/field-positioning).
      additionalProperties: false
      required:
        - UnplacedElementId
      properties:
        UnplacedElementId:
          $ref: '#/components/schemas/Element.Id'
        ExternalReference:
          $ref: '#/components/schemas/ExternalReference'
        Location:
          allOf:
            - $ref: '#/components/schemas/Element.Location'
            - description: >-
                Explicit placement. Supply together with `Dimensions`. Omit when
                using `Marker` or `Options`.
        Dimensions:
          allOf:
            - $ref: '#/components/schemas/Element.Dimensions'
            - description: >-
                Size in points. Supply together with `Location`. Omit when using
                `Marker` or `Options`.
        Marker:
          description: >-
            A piece of text inside the document where an element must be. It
            encodes the location

            and dimensions of the element. Omit when using
            `Location`/`Dimensions` or `Options`. Recommended

            to embed at document-upload time, because after document conversion
            the marker may no longer

            be present. Its format depends on the element type:


            - **SigningField** - a `#`-prefixed text marker `#id_height_width#`
            (for example `#SIG01_50_120#`), or a `#`-prefixed PDF field id `#id`
            that names an existing signature field.

            - **Form fields** (TextBoxField, CheckBoxField, ComboBoxField) - an
            `@`-prefixed text marker `@id_height_width#`, with
            `@id_TB_height_width#` for a text box, `@id_CB_height_width#` for a
            check box and `@id_DD_height_width#` for a combo box (NSEV v8.5+),
            or a `@`-prefixed PDF field id `@id` that names an existing form
            field. When placing an unplaced **combo box**, only the
            combo-box-specific `@id_DD_height_width#` form is accepted - the
            generic `@id_height_width#` marker is rejected for this element
            type.

            - **RadioGroup** cannot be placed with a text marker; use Options
            instead.


            See the [Field positioning
            guide](/nsev/build/guides/field-positioning).
          type: string
          pattern: >-
            ^[#@][a-zA-Z]+(?:\d*\.)?\d+(?:_(?:TB_|CB_|DD_)?(?:\d*\.)?\d+_(?:\d*\.)?\d+#)?$
        Options:
          description: >-
            Radio-group buttons, each with a `Name`, `Location` and
            `Dimensions`. Supply this only

            when the unplaced element is a radio group; omit when using
            `Location`/`Dimensions` or `Marker`.
          type: array
          items:
            type: object
            properties:
              Name:
                type: string
                description: The name of the unplaced option
              Location:
                $ref: '#/components/schemas/Element.Location'
              Dimensions:
                $ref: '#/components/schemas/Element.Dimensions'
    CreateElement:
      oneOf:
        - $ref: '#/components/schemas/CreateElementFromUnplacedElement'
        - $ref: '#/components/schemas/CreateSigningField'
        - $ref: '#/components/schemas/CreateCheckBoxField'
        - $ref: '#/components/schemas/CreateTextBoxField'
        - $ref: '#/components/schemas/CreateRadioGroup'
        - $ref: '#/components/schemas/CreateComboBoxField'
      discriminator:
        propertyName: Type
        mapping:
          SigningField: '#/components/schemas/CreateSigningField'
          CheckBoxField: '#/components/schemas/CreateCheckBoxField'
          TextBoxField: '#/components/schemas/CreateTextBoxField'
          RadioGroup: '#/components/schemas/CreateRadioGroup'
          ComboBoxField: '#/components/schemas/CreateComboBoxField'
      example:
        Type: signingField
        Location:
          Page: 2
          Top: 200
          Left: 200
        Dimensions:
          Width: 200
          Height: 200
    CreateDocument:
      type: object
      description: Parameters for creating a document
      additionalProperties: false
      required:
        - Name
        - Language
      properties:
        Name:
          type: string
          description: >-
            Name of the document, displayed in the WebPortal. Do not include a
            file extension.

            The name must not contain special characters such as slash,
            backslash, question

            mark, percent, asterisk, colon, pipe, single quote, double quote,
            less-than or

            greater-than. When itsme is used as a signing method, restrict the
            name to

            characters supported by ISO 8859-15; some software-generated
            characters such as

            curly apostrophes and long dashes are not supported.
          minLength: 1
          maxLength: 150
        Language:
          allOf:
            - $ref: '#/components/schemas/Language'
            - description: >-
                Language used in signature texts and in legal notices when an
                actor's

                LegalNoticeCode is set. Supported values: en, nl, de, fr, es,
                da, nb, sv, fi, lv,

                pl, hu, it, pt, ro.
        IsOptional:
          type: boolean
          default: false
          description: >-
            Determines whether the document is optional. Default value is false.
            When set to

            true, actors may choose not to form fill/sign the document.
        ExternalReference:
          $ref: '#/components/schemas/ExternalReference'
        Elements:
          type: array
          description: >-
            A list of elements (that aren't linked to an actor at once) on the
            created document
          items:
            $ref: '#/components/schemas/CreateElement'
        ProofCorrelationId:
          type: string
          deprecated: true
          description: >-
            Id for correlating this document with other resources in the proofs
            system
    DocumentActions:
      type: object
      description: >-
        Document actions to be performed on Draft document with IsActionNeeded
        flag set to true.
      properties:
        KeepSignatures:
          type: boolean
          description: >-
            When true, existing signatures detected in the document are applied
            to the document

            file. Default is false. Cannot be true at the same time as
            KeepFormFields.
          default: false
        KeepSigningFields:
          type: boolean
          description: >-
            When true, detected signing field markers are converted to actual
            signing fields.

            Default is false.
          default: false
        KeepFormFields:
          type: boolean
          description: >-
            When true, detected form field markers are converted to actual form
            fields.

            Default is false. Cannot be true at the same time as KeepSignatures.
          default: false
    CreateDocument.DocumentOptions:
      type: object
      allOf:
        - properties:
            TargetType:
              type: string
              description: >-
                The media type the document will be converted to. Only takes
                effect when the

                server is configured for document conversion.
              enum:
                - application/pdf
                - application/xml
            PdfOptions:
              type: object
              description: >-
                Optional PDF conversion and validation parameters. Only applies
                when the target

                type is application/pdf.
              properties:
                TargetFormat:
                  type: string
                  description: >-
                    The targetFormat defines if an extra conversion needs to be
                    done
                  enum:
                    - pdf
                    - pdfa1a
                    - pdfa2a
                  example: pdfa1a
                PdfErrorHandling:
                  type: string
                  description: How to deal with PDFs containing minor flaws
                  enum:
                    - Ignore
                    - DetectWarn
                    - DetectFail
                    - DetectFixWarn
                    - DetectFixFail
        - $ref: '#/components/schemas/DocumentActions'
    CreateDocument.Base64Document:
      type: object
      description: Contains a document's base64 data and media type
      additionalProperties: false
      required:
        - Base64data
      properties:
        Base64data:
          type: string
          description: Attached document
          format: base64
          nullable: false
          minLength: 1
          maxLength: 200000000
    CreateDocumentWithBase64Document:
      allOf:
        - $ref: '#/components/schemas/CreateDocument'
        - type: object
          required:
            - DocumentOptions
          properties:
            DocumentOptions:
              allOf:
                - $ref: '#/components/schemas/CreateDocument.DocumentOptions'
                - $ref: '#/components/schemas/CreateDocument.Base64Document'
                - required:
                    - ContentType
                  properties:
                    ContentType:
                      allOf:
                        - $ref: '#/components/schemas/MediaType'
                        - enum:
                            - application/pdf
                            - application/xml
                            - application/msword
                            - >-
                              application/vnd.openxmlformats-officedocument.wordprocessingml.document
                            - text/plain
            RepresentationOptions:
              allOf:
                - $ref: '#/components/schemas/CreateDocument.Base64Document'
                - required:
                    - ContentType
                  properties:
                    ContentType:
                      allOf:
                        - $ref: '#/components/schemas/MediaType'
                        - enum:
                            - application/pdf
    CreateStakeholderBase:
      type: object
      description: Parameters for creating a stakeholder
      additionalProperties: false
      required:
        - Type
      properties:
        Type:
          $ref: '#/components/schemas/Stakeholder.Type'
        ExternalReference:
          $ref: '#/components/schemas/ExternalReference'
    CreatePersonStakeholder:
      title: Person stakeholder
      allOf:
        - $ref: '#/components/schemas/CreateStakeholderBase'
        - type: object
          required:
            - Language
            - LastName
            - EmailAddress
          properties:
            Type:
              enum:
                - Person
            Language:
              $ref: '#/components/schemas/Language'
            FirstName:
              $ref: '#/components/schemas/Stakeholder.FirstName'
            LastName:
              $ref: '#/components/schemas/Stakeholder.LastName'
            EmailAddress:
              $ref: '#/components/schemas/EmailAddress'
            BirthDate:
              type: string
              format: date
              description: >-
                Date of birth in YYYY-MM-DD format. Activating mandated signer
                validation in

                the configuration may make this parameter effectively required.
            PhoneNumber:
              $ref: '#/components/schemas/PhoneNumber'
            AdditionalProperties:
              $ref: '#/components/schemas/AdditionalProperties'
    CreateGroupMember:
      type: object
      description: A member of a group stakeholder
      required:
        - Language
        - LastName
        - EmailAddress
      properties:
        Language:
          $ref: '#/components/schemas/Language'
        FirstName:
          $ref: '#/components/schemas/Stakeholder.FirstName'
        LastName:
          $ref: '#/components/schemas/Stakeholder.LastName'
        EmailAddress:
          $ref: '#/components/schemas/EmailAddress'
        BirthDate:
          type: string
          format: date
          description: Date of birth in YYYY-MM-DD format.
        PhoneNumber:
          $ref: '#/components/schemas/PhoneNumber'
        ExternalReference:
          $ref: '#/components/schemas/ExternalReference'
        AdditionalProperties:
          $ref: '#/components/schemas/AdditionalProperties'
    CreateGroupStakeholder:
      title: Group stakeholder
      allOf:
        - $ref: '#/components/schemas/CreateStakeholderBase'
        - type: object
          additionalProperties: false
          description: Parameters for creating a group stakeholder
          required:
            - GroupName
            - Members
          properties:
            Type:
              enum:
                - Group
            GroupName:
              type: string
              maxLength: 128
              description: Name of the group.
            Members:
              type: array
              description: Members of the group
              items:
                $ref: '#/components/schemas/CreateGroupMember'
    CreateContactGroupStakeholder:
      title: Contact group stakeholder
      allOf:
        - $ref: '#/components/schemas/CreateStakeholderBase'
        - type: object
          description: Parameters for creating a contactGroup stakeholder
          required:
            - ContactGroupCode
          properties:
            Type:
              enum:
                - ContactGroup
            ContactGroupCode:
              type: string
              description: |-
                Code generated when the contact group was created in the NSEV
                WebPortal.
    CreatePackage.ActorBase:
      type: object
      properties:
        Type:
          $ref: '#/components/schemas/Actor.Type'
        SuppressNotifications:
          type: boolean
          default: false
          description: >-
            suppress the notifications for this actor


            See [Callbacks and redirects →
            SuppressNotifications](/nsev/build/guides/callbacks#suppressnotifications-deliver-links-yourself).
        ProcessStep:
          type: integer
          description: >
            Created actor will be placed in given processStep.  

            **_Note_:** _all_ approvers have to come in the first step, all
            receivers in the last. With no other actor types in those groups.
          minimum: 0
    CreatePackage.Actor:
      oneOf:
        - allOf:
            - $ref: '#/components/schemas/CreatePackage.ActorBase'
            - type: object
              title: Signer
              description: Signs one or more signing fields
              properties:
                Type:
                  enum:
                    - Signer
                Elements:
                  type: array
                  description: The actor's elements
                  items:
                    allOf:
                      - $ref: '#/components/schemas/CreateSigningField'
                      - title: New signing field on a document
                        properties:
                          DocumentIndex:
                            type: integer
                            minimum: 0
                            description: >-
                              this element will be placed on document with given
                              index in passed documents
                RedirectUrl:
                  type: string
                  format: url
                  description: >-
                    Url to which the stakeholder is redirected after completing
                    this action


                    See [Callbacks and redirects →
                    RedirectUrl](/nsev/build/guides/callbacks#redirecturl-where-a-user-goes-after-acting).
                RedirectType:
                  type: string
                  enum:
                    - AfterSession
                    - Immediately
                    - AfterDelay
                    - AfterCompletion
                  description: >
                    When stakeholder gets redirected after completing this
                    action
                      * AfterSession - Redirect after signing session is ended, but before package is completed (only important for last signer).
                      * Immediately - Redirect as soon as possible.
                      * AfterDelay - Redirect after some delay (defined on frontend).
                      * AfterCompletion - Redirect after the package is completed.

                    Only valid together with RedirectUrl - the API rejects
                    RedirectType without it.


                    See [Callbacks and redirects →
                    RedirectType](/nsev/build/guides/callbacks#redirecttype-when-the-redirect-fires).
                BackButtonUrl:
                  type: string
                  format: url
                  description: >-
                    URL to which the end user is sent after pressing close
                    session button
                  example: https://homepage.example.test
        - allOf:
            - $ref: '#/components/schemas/CreatePackage.ActorBase'
            - type: object
              title: Receiver
              description: Can download a copy of the fully signed document
              properties:
                Type:
                  enum:
                    - Receiver
        - allOf:
            - $ref: '#/components/schemas/CreatePackage.ActorBase'
            - type: object
              title: Approver
              description: Determines whether a document is fit for signing
              properties:
                Type:
                  enum:
                    - Approver
                RedirectUrl:
                  type: string
                  format: url
                  description: >-
                    Url to which the stakeholder is redirected after completing
                    this action


                    See [Callbacks and redirects →
                    RedirectUrl](/nsev/build/guides/callbacks#redirecturl-where-a-user-goes-after-acting).
                BackButtonUrl:
                  type: string
                  format: url
                  description: >-
                    URL to which the end user is sent after pressing close
                    session button
                  example: https://homepage.example.test
        - allOf:
            - $ref: '#/components/schemas/CreatePackage.ActorBase'
            - type: object
              title: Form filler
              description: Completes form fields on a document
              properties:
                Type:
                  enum:
                    - FormFiller
                Elements:
                  type: array
                  description: The actor's elements
                  items:
                    oneOf:
                      - allOf:
                          - $ref: '#/components/schemas/CreateCheckBoxField'
                          - title: New check box field on a document
                            properties:
                              DocumentIndex:
                                type: integer
                                minimum: 0
                                description: >-
                                  this element will be placed on document with
                                  given index in passed documents
                      - allOf:
                          - $ref: '#/components/schemas/CreateTextBoxField'
                          - title: New text box field on a document
                            properties:
                              DocumentIndex:
                                type: integer
                                minimum: 0
                                description: >-
                                  this element will be placed on document with
                                  given index in passed documents
                      - allOf:
                          - $ref: '#/components/schemas/CreateRadioGroup'
                          - title: New radio group on a document
                            properties:
                              DocumentIndex:
                                type: integer
                                minimum: 0
                                description: >-
                                  this element will be placed on document with
                                  given index in passed documents
                RedirectUrl:
                  type: string
                  format: url
                  description: >-
                    Url to which the stakeholder is redirected after completing
                    this action


                    See [Callbacks and redirects →
                    RedirectUrl](/nsev/build/guides/callbacks#redirecturl-where-a-user-goes-after-acting).
                RedirectType:
                  type: string
                  enum:
                    - AfterSession
                    - Immediately
                    - AfterDelay
                    - AfterCompletion
                  description: >
                    When stakeholder gets redirected after completing this
                    action
                      * afterSession - Redirect after signing session is ended, but before package is completed (only important for last signer).
                      * immediately - Redirect as soon as possible.
                      * afterDelay - Redirect after some delay (defined on frontend).
                      * afterCompletion - Redirect after the package is completed.

                    Only valid together with RedirectUrl - the API rejects
                    RedirectType without it.


                    See [Callbacks and redirects →
                    RedirectType](/nsev/build/guides/callbacks#redirecttype-when-the-redirect-fires).
                BackButtonUrl:
                  type: string
                  format: url
                  description: >-
                    URL to which the end user is sent after pressing close
                    session button
                  example: https://homepage.example.test
    CreatePackage.Stakeholder:
      allOf:
        - oneOf:
            - $ref: '#/components/schemas/CreatePersonStakeholder'
            - $ref: '#/components/schemas/CreateGroupStakeholder'
            - $ref: '#/components/schemas/CreateContactGroupStakeholder'
          discriminator:
            propertyName: Type
            mapping:
              Person: '#/components/schemas/CreatePersonStakeholder'
              Group: '#/components/schemas/CreateGroupStakeholder'
              ContactGroup: '#/components/schemas/CreateContactGroupStakeholder'
        - properties:
            actors:
              type: array
              description: The actions to be performed ( a list of actors )
              items:
                $ref: '#/components/schemas/CreatePackage.Actor'
    ExternalApiPackageAutomaticReminder:
      description: >-
        Contains information about automatic reminder settings for the package
        which will be created. Please note that values are taken from
        configuration defaults for the response, if object is empty.
      properties:
        IsSendAutomaticRemindersEnabled:
          type: boolean
          nullable: true
        DaysBeforeFirstReminder:
          type: integer
          nullable: true
          minimum: 1
        IsRepeatRemindersEnabled:
          type: boolean
          nullable: true
        RepeatReminders:
          type: integer
          nullable: true
          minimum: 1
    ExternalApiPackageExpirationReminder:
      description: >-
        Contains information about expiration reminder settings for the package
        which will be created. Please note that values are taken from
        configuration defaults for the response, if object is empty.
      properties:
        IsSendExpirationRemindersEnabled:
          type: boolean
          nullable: true
        DaysBeforeExpirationReminder:
          type: integer
          nullable: true
          minimum: 1
    ExternalOtpAuthenticationSetting:
      description: Contains settings for the package OTP authentication
      properties:
        IsSmsOtpAuthenticationEnabled:
          type: boolean
          nullable: true
        IsMailOtpAuthenticationEnabled:
          type: boolean
          nullable: true
    Package.TemplateCode:
      type: string
      description: >-
        Identifier of the template the package is created from. The package
        inherits

        everything defined in the template; you can still add or change
        information

        with additional API calls. When a template code is used, the only other

        mandatory parameter is `Initiator`; `Name`, `ExternalReference` and

        `ProofCorrelationId` are optional and all other settings are taken from
        the

        template.
    CreatePackage:
      oneOf:
        - type: object
          title: Create package
          description: Request for creating a package
          additionalProperties: false
          required:
            - Name
            - Initiator
          properties:
            Name:
              $ref: '#/components/schemas/Package.Name'
            Initiator:
              $ref: '#/components/schemas/Package.Initiator'
            Status:
              type: string
              description: >-
                Status the package will have once created. By default a package
                is created

                in `Draft`. Set `Pending` to send it for signing immediately.
              default: Draft
              enum:
                - Draft
                - Pending
            DocumentGroupCode:
              $ref: '#/components/schemas/Package.DocumentGroupCode'
            ExpiryDate:
              allOf:
                - $ref: '#/components/schemas/ExpiryDate'
                - description: >-
                    Date and time when the package (and every document in it)
                    expires and

                    can no longer be form filled, approved or signed. ISO 8601
                    date-time.
            Documents:
              type: array
              items:
                $ref: '#/components/schemas/CreateDocumentWithBase64Document'
            Stakeholders:
              type: array
              items:
                $ref: '#/components/schemas/CreatePackage.Stakeholder'
            DefaultLegalNotice:
              allOf:
                - $ref: '#/components/schemas/CreateLegalNotice'
                - type: object
                  description: >-
                    The default legal notice that will be added to a signer when
                    none was specified
            ThemeCode:
              type: string
              description: >-
                Theme code applied to the package's look and feel. When omitted,
                the theme

                configured at environment level in the Config Index - or at
                document-group

                level if applicable - is used.
            CallBackUrl:
              type: string
              format: url
              description: >-
                Absolute URL, without query parameters, that NSEV calls with an

                HTTP POST whenever the package's status changes, so an external
                system can

                react. Callbacks fire on end-user actions such as: a user
                changing the

                package from Draft to Pending or revoking it in the Document
                Portal,

                confirming in a drag-and-drop editor, a signer completing all
                their fields

                or rejecting, all signers signing, an approver approving, form
                fillers

                completing fields, or the system setting the package to Failed.
                API

                requests never trigger a callback.


                The POST body is `application/json` containing `packageId` and

                `packageStatus`, e.g.

                `{"packageId":"d2912916-c555-47af-b666-1e8cf2eb9dfa","packageStatus":"Finished"}`.

                If the external system needs more information it can issue a Get
                package by

                ID call. The callback has a 100-second timeout: if your service
                does not

                respond in time, NSEV forces the timeout and finishes the flow
                as if

                it had received `200 OK`, so respond as quickly as possible and
                run any

                follow-up work asynchronously. On error, NSEV retries the
                callback

                3 times over 3 retry cycles by default (configurable by
                administrators).


                See [Callbacks and redirects →
                CallBackUrl](/nsev/build/guides/callbacks#callbackurl-status-change-callbacks).
            NotificationCallBackUrl:
              type: string
              format: url
              description: >-
                URL called each time a signer requests a new signing URL. NSEV
                uses

                one-time signing URLs, so a link expires once clicked and a new
                one must be

                requested; when set, this URL lets a remote service decide what
                to do

                instead of sending the usual email.


                The remote service is called once per user action (no retry
                unless the end

                user requests another notification) with an `application/json`
                POST body

                containing `packageId`, `actorId`, `language` and
                `notificationTypeKey`.

                Current `notificationTypeKey` values are `SendActionUrl` (the
                single-use

                action link was already used and a new one was requested) and

                `SendDownloadUrl` (the single-use download link was already used
                and a new

                one was requested); ignore other values without erroring, as the
                list may

                grow. NSEV waits for the service to finish before returning
                control

                to the end user, so it must respond within seconds. This is
                separate from

                `SuppressNotifications`. On error, NSEV retries 3 times over 3
                retry

                cycles by default.


                See [Callbacks and redirects →
                NotificationCallBackUrl](/nsev/build/guides/callbacks#notificationcallbackurl-regenerating-one-time-signing-links).
            DefaultRedirectUrl:
              type: string
              format: url
              description: >
                Default url to which stakeholders will be redirected after
                completing their actions.

                Set on package submit, when actor has no RedirectUrl.

                See [Callbacks and redirects →
                DefaultRedirectUrl](/nsev/build/guides/callbacks#defaultredirecturl-a-package-wide-fallback).
            F2fRedirectUrl:
              type: string
              format: url
              description: >-
                Absolute URL, without query parameters, that the end user is
                redirected to

                after signing or rejecting all fields face to face in the
                Document Portal.

                Do not confuse this with a regular redirect URL - it applies
                only to

                face-to-face signing.


                NSEV appends `SessionID` (the package signing session, i.e. the

                package ID), `Status` (`FINISHED`, `REJECTED` or `INVALIDTOKEN`)
                and

                `PackageExternalReference` (the package's `ExternalReference`).
                Because the

                redirect happens client-side the end user can counterfeit it, so
                verify the

                outcome through a second secure channel (the callback URL) or by
                checking

                session state, then confirm with a Get package status call.


                During asynchronous signing, configuring an F2fRedirectUrl
                removes the

                Close button (which would otherwise let the signer leave while
                signing

                continues in the background); signers instead see a message that
                they will

                be redirected.

                See [Callbacks and redirects →
                F2fRedirectUrl](/nsev/build/guides/callbacks#f2fredirecturl-face-to-face-signing-only).
            IsUnsignedContentDownloadable:
              type: boolean
              nullable: true
              description: >-
                Whether an actor can download the package from the WYSIWYS (What
                You See Is

                What You Sign) page before form filling, approving, signing or
                rejecting -

                for example to print and read it on paper. When omitted, the
                value of the

                Config Index setting `IsDownloadUnsignedFilesEnabled`
                (Customization

                Settings) is used.
            IsReassignEnabled:
              type: boolean
              nullable: true
              description: >-
                Whether a stakeholder may reassign their action to another
                party. When

                omitted, the value of the Config Index setting
                `IsReassignEnabled`

                (Customization Settings) is used.
            ExternalReference:
              $ref: '#/components/schemas/ExternalReference'
            ActionUrlExpirationPeriodInDays:
              type: integer
              nullable: true
              minimum: 1
              description: >-
                Number of days after which unused action URLs expire. When
                omitted, the

                value is taken from the Config Index setting
                `IsActionUrlExpirationEnabled`

                (Customization Settings). The maximum equals the number of days
                left until

                9999-12-31.
            ProofCorrelationId:
              $ref: '#/components/schemas/ProofCorrelationId'
            AddInitiatorAsReceiver:
              type: boolean
              nullable: true
              description: >-
                Whether the initiator is added as a receiver of the package
                automatically,

                so you do not have to add them with a Create actor call.
                Overrides the environment-level

                `IsAddInitiatorAsReceiverEnabled` setting; when that setting is
                already

                true, every initiator is added as receiver and passing this is
                unnecessary.
            MustBeArchived:
              type: boolean
              nullable: true
              description: >-
                Whether the package is sent to the external archive when it
                reaches the

                Finished status. Ignored when archiving

                is not configured at environment level; when archiving is
                configured, every

                package is archived by default, so passing this is unnecessary.
            ArchiveAuditProofs:
              type: boolean
              nullable: true
              description: >-
                Whether the audit proofs are sent to the external archive when
                the package

                is Finished. Ignored when archiving is

                not configured or audit proofs are disabled in the audit tools
                or archive

                settings.
            ArchiveAuditTrail:
              type: boolean
              nullable: true
              description: >-
                Whether the audit trail is sent to the external archive when the
                package is

                Finished. Ignored when archiving is not

                configured or the audit trail is disabled in the audit tools or
                archive

                settings.
            AutomaticReminder:
              $ref: '#/components/schemas/ExternalApiPackageAutomaticReminder'
            ExpirationReminder:
              $ref: '#/components/schemas/ExternalApiPackageExpirationReminder'
            OtpAuthenticationSetting:
              $ref: '#/components/schemas/ExternalOtpAuthenticationSetting'
            DefaultSigningMethods:
              type: array
              nullable: true
              description: >
                Available as of NSEV v8.5.

                Default signing methods to apply to every signing field created
                on this package

                without explicitly configured signing methods - whether in this
                request, on later

                create actor or create element calls, or from marker-matched
                fields at document

                upload. Only populated while the package is a draft: the
                defaults are copied onto each

                such field the moment it is created, and on submit this
                package-level property is

                cleared. Duplicate

                method names are rejected, and a server-signing method cannot be
                combined with any

                other method. Each entry also accepts a bare signing-method name
                string as shorthand

                for `{ "Name": "<method>" }`.
              items:
                $ref: '#/components/schemas/SigningMethodWithKeyPair'
        - type: object
          title: Create package from template
          description: Request for creating a package from the templates
          additionalProperties: false
          properties:
            Name:
              $ref: '#/components/schemas/Package.Name'
            Initiator:
              $ref: '#/components/schemas/Package.Initiator'
            TemplateCode:
              $ref: '#/components/schemas/Package.TemplateCode'
            ExternalReference:
              $ref: '#/components/schemas/ExternalReference'
            ProofCorrelationId:
              $ref: '#/components/schemas/ProofCorrelationId'
            SingleMarkerMatchPerElement:
              type: boolean
              nullable: true
              description: >
                Controls the lifecycle of unplaced elements identified by
                document markers. Defaults to 'false'.
                  - 'false' (or 'null'): Allows an element definition to be matched by markers in multiple documents; cleanup of remaining unplaced elements is deferred.
                  - 'true': Each element definition can only be matched by one marker during document confirmation; the definition is removed after being placed.
      example:
        Name: example pending package
        Initiator: hello@world.test
        Status: pending
        ExpiryDate: '2020-01-17T12:33:47.923Z'
        DefaultLegalNotice:
          Name: LegalNotice1
        Documents:
          - Name: my first document
            Language: en
            ExternalReference: doc0
            DocumentOptions:
              TargetType: application/pdf
              PdfOptions:
                TargetFormat: pdfa1a
              Base64data: string
              ContentType: application/pdf
          - Name: my second document
            Language: en
            ExternalReference: doc1
            DocumentOptions:
              TargetType: application/pdf
              Base64data: string
              ContentType: application/pdf
        Stakeholders:
          - Type: person
            Language: en
            FirstName: John
            LastName: Doe
            EmailAddress: john@doe.test
            BirthDate: '1990-01-16'
            PhoneNumber: +32xxxxxxxxx
            AdditionalProperties:
              BeId: '12345678900'
              BeLawyer: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
            Actors:
              - Type: signer
                ProcessStep: 0
                Elements:
                  - Type: signingField
                    DocumentIndex: 0
                    Location:
                      Page: 2
                      Top: 200
                      Left: 200
                    Dimensions:
                      Width: 200
                      Height: 200
                    SigningMethods:
                      - Manual:Handwritten
                      - Name: SMSCode:SmsOtp
                        KeyPair: Custom keypair
          - Type: group
            GroupName: Great mates
            Members:
              - Language: en
                FirstName: John
                LastName: Doe
                EmailAddress: john@doe.test
                BirthDate: '1990-01-16'
              - Language: en
                FirstName: Zu
                LastName: Li
                EmailAddress: zu@li.test
                BirthDate: '1991-03-14'
            Actors:
              - Type: signer
                ProcessStep: 1
                Elements:
                  - Type: signingField
                    DocumentIndex: 1
                    Location:
                      Page: 2
                      Top: 200
                      Left: 200
                    Dimensions:
                      Width: 200
                      Height: 200
        ThemeCode: string
        CallBackUrl: https://callback.test
        NotificationCallBackUrl: https://notifications.test
        IsUnsignedContentDownloadable: true
        ExternalReference: myFirstPackage
        MustBeArchived: true
        ArchiveAuditProofs: false
        ArchiveAuditTrail: false
        AutomaticReminder:
          IsSendAutomaticRemindersEnabled: true
          DaysBeforeFirstReminder: 5
          IsRepeatRemindersEnabled: true
          RepeatReminders: 5
        ExpirationReminder:
          IsSendExpirationRemindersEnabled: true
          DaysBeforeExpirationReminder: 5
        OtpAuthenticationSetting:
          IsSmsOtpAuthenticationEnabled: false
          IsMailOtpAuthenticationEnabled: false
    PackageCreatedSync:
      type: object
      description: Response model for a created package
      additionalProperties: false
      properties:
        Id:
          $ref: '#/components/schemas/Package.Id'
        Name:
          $ref: '#/components/schemas/Package.Name'
        Status:
          $ref: '#/components/schemas/Package.Status'
        CreationDate:
          $ref: '#/components/schemas/CreationDate'
        ExpiryDate:
          $ref: '#/components/schemas/ExpiryDate'
        RevocationDate:
          $ref: '#/components/schemas/RevocationDate'
        Initiator:
          $ref: '#/components/schemas/Package.Initiator'
        UnplacedElements:
          type: array
          description: This package's elements that aren't placed aynywhere yet
          items:
            $ref: '#/components/schemas/Element'
        Documents:
          type: array
          description: This package's documents
          items:
            $ref: '#/components/schemas/DocumentCreatedSync'
        Stakeholders:
          type: array
          description: This package's stakeholders
          items:
            $ref: '#/components/schemas/Stakeholder'
        DefaultLegalNotice:
          allOf:
            - $ref: '#/components/schemas/LegalNotice'
            - type: object
              description: The default legal notice that will be added to a signing field
        ExternalReference:
          $ref: '#/components/schemas/ExternalReference'
        DocumentGroupCode:
          $ref: '#/components/schemas/Package.DocumentGroupCode'
        ThemeCode:
          type: string
          description: identifier of the theme this package has
        CallBackUrl:
          type: string
          format: url
          description: >-
            url that will be called each time a signature has been put on the
            document
        NotificationCallBackUrl:
          type: string
          format: url
          description: url that will be called when the signer requests a new signing url
        F2fSigningUrl:
          type: string
          format: url
          description: >-
            Link to the package which allows to start a face to face signing
            session
        PreviewUrl:
          type: string
          format: url
          description: Link to the package which allows only a preview of documents
        DefaultRedirectUrl:
          type: string
          format: url
          description: >
            Default url to which stakeholders will be redirected after
            completing their actions.

            Set on package submit, when actor has no RedirectUrl.
        F2fRedirectUrl:
          type: string
          format: url
          description: >
            Url to which the end user is redirected after all fields have been
            signed with ‘face to face’ signing.
        IsUnsignedContentDownloadable:
          type: boolean
          description: >
            Whether a signer can download the unsigned content of this package
            or not

            Default when not specified is taken from config ( Customization
            Settings > IsDownloadUnsignedFilesEnabled )
        IsReassignEnabled:
          type: boolean
          description: >
            Whether a stakeholder can reassign his/her action ( actor ) to
            another party.  

            Default when not specified is taken from config ( Customization
            Settings > IsReassignEnabled )
        ActionUrlExpirationPeriodInDays:
          type: integer
          nullable: true
          minimum: 1
          description: >
            This parameter determines after how many days the action URLs must
            expire when they are not used.

            When no value is entered, this parameter takes its value from the
            Config Index setting IsActionUrlExpirationEnabled

            under Customization Settings. 

            The maximum value equals the number of days left until 9999-12-31.
        ProofCorrelationId:
          $ref: '#/components/schemas/ProofCorrelationId'
        AddInitiatorAsReceiver:
          type: boolean
          nullable: true
          description: >
            If true, adds the initiator as a receiver on submit.   This property
            is only available on draft packages.
        MustBeArchived:
          type: boolean
          nullable: false
          description: >-
            If true, the package will be sent to the external archive when
            status is FINISHED.
        ArchiveAuditProofs:
          type: boolean
          nullable: false
          description: >-
            If true, the audit proofs will be sent to the external archive when
            package status is FINISHED.
        ArchiveAuditTrail:
          type: boolean
          nullable: false
          description: >-
            If true, the audit trail will be sent to the external archive when
            package status is FINISHED.
        Warnings:
          type: array
          items:
            $ref: '#/components/schemas/Warning'
        AutomaticReminder:
          $ref: '#/components/schemas/AutomaticReminder'
        ExpirationReminder:
          $ref: '#/components/schemas/ExpirationReminder'
        OtpAuthenticationSetting:
          $ref: '#/components/schemas/OtpAuthenticationSetting'
        DefaultSigningMethods:
          type: array
          nullable: true
          description: >
            Available as of NSEV v8.5.

            Default signing methods applied to every signing field that is
            created on the package

            without explicitly configured signing methods - whether at package
            or actor creation,

            through the create element endpoints, or from marker-matched fields
            at document upload.

            Only populated while the package is a draft: the defaults are copied
            onto each such field

            the moment it is created, and on submit this package-level property
            is cleared. Not exposed on the template

            object itself, but a package created from a template inherits the
            source package's

            defaults.
          items:
            $ref: '#/components/schemas/SigningMethodWithKeyPair'
    NotFoundError:
      title: Not found
      allOf:
        - $ref: '#/components/schemas/Error'
        - description: The resource could not be found
      example:
        ErrorCode: Document.NotFound:00000000-0000-0000-0000-000000000000
        ErrorMessage: >-
          The document with id '00000000-0000-0000-0000-000000000000' could not
          be found
    PackageNotFoundError:
      title: Package not found
      allOf:
        - $ref: '#/components/schemas/NotFoundError'
      example:
        ErrorCode: Package.NotFound:00000000-0000-0000-0000-000000000000
        ErrorMessage: >-
          The package with id '00000000-0000-0000-0000-000000000000' could not
          be found
    Package.PlaceElementsActionUrlResult:
      type: object
      description: |
        Response model for the Place elements action url.
      properties:
        ActionUrl:
          type: string
          description: The package elements editor url.
          format: url
    Package.StatusResponse:
      allOf:
        - type: string
          enum:
            - DraftActionNeeded
        - $ref: '#/components/schemas/Package.Status'
    UpdateOrderIndexDocument:
      type: object
      required:
        - DocumentId
        - OrderIndex
      properties:
        DocumentId:
          $ref: '#/components/schemas/Document.Id'
        OrderIndex:
          $ref: '#/components/schemas/Document.OrderIndex'
    UpdateOrderIndices:
      type: object
      description: Request for updating order indices in a package
      additionalProperties: false
      required:
        - Documents
      properties:
        Documents:
          type: array
          items:
            $ref: '#/components/schemas/UpdateOrderIndexDocument'
      example:
        Documents:
          - DocumentId: 6DC70FA5-05D3-4185-ACE3-2A9833D48361
            OrderIndex: 2
          - DocumentId: 31A445ED-9897-4436-8CF3-721787938631
            OrderIndex: 1
    CreateTemplateFromPackage:
      type: object
      description: Creates template from given package
      required:
        - TemplateName
      properties:
        TemplateName:
          type: string
          description: The name of to be created template
    PackagesActorsInfoResult:
      type: object
      description: The actors information
      additionalProperties: false
      properties:
        ActorId:
          $ref: '#/components/schemas/Actor.Id'
        Status:
          $ref: '#/components/schemas/Actor.Status'
        Type:
          $ref: '#/components/schemas/Actor.Type'
        StakeholderId:
          $ref: '#/components/schemas/Stakeholder.Id'
        PackageId:
          $ref: '#/components/schemas/Package.Id'
        PackageName:
          $ref: '#/components/schemas/Package.Name'
        CreationDate:
          $ref: '#/components/schemas/CreationDate'
        Initiator:
          $ref: '#/components/schemas/Package.Initiator'
        Documents:
          type: array
          items:
            properties:
              Id:
                $ref: '#/components/schemas/Document.Id'
              Name:
                $ref: '#/components/schemas/Document.Name'
    DocumentNotFoundError:
      title: Document not found
      allOf:
        - $ref: '#/components/schemas/NotFoundError'
      example:
        ErrorCode: Document.NotFound:00000000-0000-0000-0000-000000000000
        ErrorMessage: >-
          The document with id '00000000-0000-0000-0000-000000000000' could not
          be found
    DocumentNotFoundInPackageError:
      title: Document not found in package
      allOf:
        - $ref: '#/components/schemas/NotFoundError'
      example:
        ErrorCode: Document.NotFoundInPackage:00000000-0000-0000-0000-000000000000
        ErrorMessage: >-
          The document with id [00000000-0000-0000-0000-000000000000]  was found
          in package with id [00000000-0000-0000-0000-000000000000]
    UnplacedElementBase:
      type: object
      description: An unplaced element on a package, e.g. a signing field
      required:
        - Type
      properties:
        Type:
          $ref: '#/components/schemas/Element.Type'
        ExternalReference:
          $ref: '#/components/schemas/ExternalReference'
    UnplacedSigningField:
      title: Unplaced signing field
      allOf:
        - $ref: '#/components/schemas/UnplacedElementBase'
        - type: object
          description: A field that can be signed by an actor
          properties:
            Type:
              enum:
                - SigningField
            SigningMethods:
              type: array
              items:
                $ref: '#/components/schemas/SigningMethodWithKeyPair'
              description: >-
                The signing methods that may be used to sign this signing field.
                Always supply an

                array, even for a single method. Each entry is an object with a
                `Name` and an optional

                `KeyPair`; a bare signing-method name string is also accepted as
                shorthand for

                `{ "Name": "<method>" }`. When omitted, the package's
                `DefaultSigningMethods`

                (NSEV v8.5+) are applied to the field.
            LegalNotice:
              allOf:
                - $ref: '#/components/schemas/CreateLegalNotice'
              description: >-
                An optional legal notice added to the signing field. Supply
                either a custom `Text`

                or the `Name` of a notice configured in the Config Index.
      example:
        Type: SigningField
        ExternalReference: Field1
        SigningMethods:
          - manual
        LegalNotice:
          Text: Read and approved
    UnplacedFormFieldBase:
      type: object
      description: A unplaced form field
      required:
        - Name
      properties:
        Name:
          type: string
          description: The name of the form field
          maxLength: 256
        Label:
          type: string
          description: The label or alternative name of the form field
          maxLength: 256
        ToolTipLabel:
          type: string
          description: The tool tip label of the form field
          maxLength: 256
        IsRequired:
          type: boolean
    UnplacedCheckBox:
      title: Unplaced check box
      allOf:
        - $ref: '#/components/schemas/UnplacedElementBase'
        - $ref: '#/components/schemas/UnplacedFormFieldBase'
        - type: object
          description: Parameters for creating an unplaced check box element
          properties:
            Type:
              enum:
                - CheckBoxField
            CheckedByDefault:
              type: boolean
              description: Checked by default indicator
      example:
        Type: checkBoxField
        ExternalReference: Field check box
        Name: CheckBox1
        Label: CheckBoxLabel
        ToolTipLabel: check box tooptip
        IsRequired: false
        CheckedByDefault: false
    UnplacedTextBox:
      title: Unplaced text box
      allOf:
        - $ref: '#/components/schemas/UnplacedElementBase'
        - $ref: '#/components/schemas/UnplacedFormFieldBase'
        - type: object
          description: Parameters for creating an unplaced text box element
          properties:
            Type:
              enum:
                - TextBoxField
            DefaultValue:
              type: string
              description: Default text box value
              maxLength: 2048
            IsMultiline:
              type: boolean
              description: Multiline indicator
            CharLimit:
              type: integer
              nullable: true
              description: Limits the number of characters on the text box field
              minimum: 1
              maximum: 2048
            InputType:
              $ref: '#/components/schemas/InputType'
      example:
        Type: textBoxField
        Name: TextBox1
        Label: textBoxLabel
        ToolTipLabel: textBoxTooltip
        IsRequired: true
        ExternalReference: Field3
        DefaultValue: something
        IsMultiline: true
        CharLimit: 200
    UnplacedRadioOption:
      type: object
      description: Parameters for creating a radio button option
      required:
        - Name
      properties:
        Name:
          type: string
          description: The name/choice of the option
          maxLength: 256
        Label:
          type: string
          description: The label or alternative name of the option
          maxLength: 256
        IsSelected:
          type: boolean
          description: Is the option pre-selected
    UnplacedRadioGroup:
      title: Unplaced radio group
      allOf:
        - $ref: '#/components/schemas/UnplacedElementBase'
        - $ref: '#/components/schemas/UnplacedFormFieldBase'
        - type: object
          description: Parameters for creating an unplaced radio button group
          required:
            - Options
          properties:
            Type:
              enum:
                - RadioGroup
            Options:
              type: array
              description: >-
                The radio buttons in the group. Supply at least two. For an
                unplaced radio group each

                option carries only its name and label - positions are assigned
                later when the group

                is placed.
              items:
                $ref: '#/components/schemas/UnplacedRadioOption'
              minItems: 2
      example:
        Type: radioGroup
        Name: radioGroup1
        Label: radioGroup1Label
        ExternalReference: Field4
        Options:
          - IsSelected: true
            Name: buton1
            Label: label1
          - IsSelected: false
            Name: buton2
            Label: label2
    UnplacedComboBox:
      title: Unplaced combo box
      allOf:
        - $ref: '#/components/schemas/UnplacedElementBase'
        - $ref: '#/components/schemas/UnplacedFormFieldBase'
        - type: object
          description: |
            Available as of NSEV v8.5.
            Parameters for creating an unplaced combo box (dropdown) element.
          properties:
            Type:
              enum:
                - ComboBoxField
            Options:
              type: array
              description: >-
                The combo box options. When supplied, provide at least one, and
                option values (the

                `ExportValue`, or the `DisplayLabel` when no `ExportValue` is
                set) must be unique within

                the field.
              items:
                $ref: '#/components/schemas/ComboBoxOption'
              minItems: 1
              maxItems: 100
            AllowCustomInput:
              type: boolean
              default: false
              description: >-
                Whether the end user can type a custom value instead of
                selecting one of the options. Defaults to false.
            DefaultValue:
              type: string
              maxLength: 2048
              description: >-
                The value selected by default, which the end user can change.
                When `Options` are supplied, must match the `ExportValue`

                (or the `DisplayLabel` when no `ExportValue` is set) of one of
                the `Options`, even when

                `AllowCustomInput` is true. Because option values are capped at
                256 characters, the effective

                maximum length is 256, despite the 2048-character validation
                ceiling.
      example:
        Type: ComboBoxField
        Name: Dropdown1
        Label: Select a country
        ExternalReference: Field5
        Options:
          - DisplayLabel: United States
            ExportValue: US
          - DisplayLabel: United Kingdom
            ExportValue: UK
        AllowCustomInput: false
        DefaultValue: US
    UnplacedElement:
      oneOf:
        - $ref: '#/components/schemas/UnplacedSigningField'
        - $ref: '#/components/schemas/UnplacedCheckBox'
        - $ref: '#/components/schemas/UnplacedTextBox'
        - $ref: '#/components/schemas/UnplacedRadioGroup'
        - $ref: '#/components/schemas/UnplacedComboBox'
      discriminator:
        propertyName: Type
        mapping:
          SigningField: '#/components/schemas/UnplacedSigningField'
          CheckBoxField: '#/components/schemas/UnplacedCheckBox'
          TextBoxField: '#/components/schemas/UnplacedTextBox'
          RadioGroup: '#/components/schemas/UnplacedRadioGroup'
          ComboBoxField: '#/components/schemas/UnplacedComboBox'
    ElementNotFoundError:
      title: Element not found
      allOf:
        - $ref: '#/components/schemas/NotFoundError'
      example:
        ErrorCode: Element.NotFound:00000000-0000-0000-0000-000000000000
        ErrorMessage: >-
          The element with id '00000000-0000-0000-0000-000000000000' could not
          be found
    CreateActorBase:
      type: object
      description: Parameters for creating an actor
      additionalProperties: false
      required:
        - Type
      properties:
        Type:
          $ref: '#/components/schemas/Actor.Type'
        SuppressNotifications:
          type: boolean
          default: false
          description: >-
            suppress the notifications for this actor


            See [Callbacks and redirects →
            SuppressNotifications](/nsev/build/guides/callbacks#suppressnotifications-deliver-links-yourself).
        RedirectUrl:
          type: string
          format: url
          description: >-
            Url to which the stakeholder is redirected after completing this
            action


            See [Callbacks and redirects →
            RedirectUrl](/nsev/build/guides/callbacks#redirecturl-where-a-user-goes-after-acting).
    CreateSignerActor:
      title: Signer
      allOf:
        - $ref: '#/components/schemas/CreateActorBase'
        - type: object
          description: Signs one or more signing fields
          properties:
            Type:
              enum:
                - Signer
            Elements:
              type: array
              description: The actor's elements
              items:
                oneOf:
                  - allOf:
                      - $ref: '#/components/schemas/CreateSigningField'
                      - title: New signing field on a document
                        properties:
                          DocumentId:
                            $ref: '#/components/schemas/Document.Id'
                  - title: Existing element by Id
                    properties:
                      Id:
                        $ref: '#/components/schemas/Element.Id'
            RedirectUrl:
              type: string
              format: url
              description: >-
                Url to which the stakeholder is redirected after completing this
                action


                See [Callbacks and redirects →
                RedirectUrl](/nsev/build/guides/callbacks#redirecturl-where-a-user-goes-after-acting).
            RedirectType:
              type: string
              enum:
                - AfterSession
                - Immediately
                - AfterDelay
                - AfterCompletion
              description: >
                When stakeholder gets redirected after completing this action
                  * afterSession - Redirect after signing session is ended, but before package is completed (only important for last signer).
                  * immediately - Redirect as soon as possible.
                  * afterDelay - Redirect after some delay (defined on frontend).
                  * afterCompletion - Redirect after the package is completed.

                Only valid together with RedirectUrl - the API rejects
                RedirectType without it.


                See [Callbacks and redirects →
                RedirectType](/nsev/build/guides/callbacks#redirecttype-when-the-redirect-fires).
            BackButtonUrl:
              type: string
              format: url
              description: >-
                URL to which the end user is sent after pressing close session
                button
              example: https://homepage.example.test
          example:
            Type: signer
            SuppressNotifications: false
            Elements:
              - Type: signingField
                Location:
                  Page: 2
                  Top: 200
                  Left: 200
                Dimensions:
                  Width: 200
                  Height: 200
                SigningMethods:
                  - manual
                  - beid
    CreateApproverActor:
      title: Approver
      allOf:
        - $ref: '#/components/schemas/CreateActorBase'
        - type: object
          description: Determines whether a document is fit for signing
          properties:
            Type:
              enum:
                - Approver
            RedirectUrl:
              type: string
              format: url
              description: >-
                Url to which the stakeholder is redirected after completing this
                action


                See [Callbacks and redirects →
                RedirectUrl](/nsev/build/guides/callbacks#redirecturl-where-a-user-goes-after-acting).
            BackButtonUrl:
              type: string
              format: url
              description: >-
                URL to which the end user is sent after pressing close session
                button
              example: https://homepage.example.test
      example:
        Type: approver
    CreateFormFillerActor:
      title: Form filler
      allOf:
        - $ref: '#/components/schemas/CreateActorBase'
        - type: object
          description: Completes form fields on a document
          properties:
            Type:
              enum:
                - FormFiller
            RedirectUrl:
              type: string
              format: url
              description: >-
                Url to which the stakeholder is redirected after completing this
                action


                See [Callbacks and redirects →
                RedirectUrl](/nsev/build/guides/callbacks#redirecturl-where-a-user-goes-after-acting).
            RedirectType:
              type: string
              enum:
                - AfterSession
                - Immediately
                - AfterDelay
                - AfterCompletion
              description: >
                When stakeholder gets redirected after completing this action
                  * afterSession - Redirect after signing session is ended, but before package is completed (only important for last signer).
                  * immediately - Redirect as soon as possible.
                  * afterDelay - Redirect after some delay (defined on frontend).
                  * afterCompletion - Redirect after the package is completed.

                Only valid together with RedirectUrl - the API rejects
                RedirectType without it.


                See [Callbacks and redirects →
                RedirectType](/nsev/build/guides/callbacks#redirecttype-when-the-redirect-fires).
            Elements:
              type: array
              description: The actor's elements
              items:
                oneOf:
                  - allOf:
                      - $ref: '#/components/schemas/CreateCheckBoxField'
                      - title: New check box field on a document
                        properties:
                          DocumentId:
                            $ref: '#/components/schemas/Document.Id'
                  - allOf:
                      - $ref: '#/components/schemas/CreateTextBoxField'
                      - title: New text box field on a document
                        properties:
                          DocumentId:
                            $ref: '#/components/schemas/Document.Id'
                  - allOf:
                      - $ref: '#/components/schemas/CreateRadioGroup'
                      - title: New radio group on a document
                        properties:
                          DocumentId:
                            $ref: '#/components/schemas/Document.Id'
                  - allOf:
                      - $ref: '#/components/schemas/CreateComboBoxField'
                      - title: New combo box field on a document
                        properties:
                          DocumentId:
                            $ref: '#/components/schemas/Document.Id'
                  - title: Existing element by Id
                    properties:
                      Id:
                        $ref: '#/components/schemas/Element.Id'
            BackButtonUrl:
              type: string
              format: url
              description: >-
                URL to which the end user is sent after pressing close session
                button
              example: https://homepage.example.test
      example:
        Type: formFiller
        Elements:
          - Type: CheckBoxField
            Name: MyCheckBox1
            ToolTipLabel: Tick me!
            IsRequired: false
            DefaultValue: true
            Location:
              Page: 1
              Top: 200
              Left: 200
            Dimensions:
              Width: 10
              Height: 10
    CreateReceiverActor:
      title: Receiver
      allOf:
        - $ref: '#/components/schemas/CreateActorBase'
        - type: object
          description: Can download a copy of the fully signed document
          properties:
            Type:
              enum:
                - Receiver
      example:
        Type: receiver
    CreateActor:
      oneOf:
        - $ref: '#/components/schemas/CreateSignerActor'
        - $ref: '#/components/schemas/CreateApproverActor'
        - $ref: '#/components/schemas/CreateFormFillerActor'
        - $ref: '#/components/schemas/CreateReceiverActor'
      discriminator:
        propertyName: Type
        mapping:
          Signer: '#/components/schemas/CreateSignerActor'
          Approver: '#/components/schemas/CreateApproverActor'
          FormFiller: '#/components/schemas/CreateFormFillerActor'
          Receiver: '#/components/schemas/CreateReceiverActor'
      example:
        Type: signer
        SuppressNotifications: false
        Elements:
          - Id: 5a5365e1-3780-47c7-9657-a1496be6ea5e
          - Type: signingField
            DocumentId: c05866bc-6b5a-4b5b-a4c1-b76895469f6f
            Location:
              Page: 2
              Top: 200
              Left: 200
            Dimensions:
              Width: 200
              Height: 200
    CreateStakeholder:
      allOf:
        - oneOf:
            - $ref: '#/components/schemas/CreatePersonStakeholder'
            - $ref: '#/components/schemas/CreateGroupStakeholder'
            - $ref: '#/components/schemas/CreateContactGroupStakeholder'
          discriminator:
            propertyName: Type
            mapping:
              Person: '#/components/schemas/CreatePersonStakeholder'
              Group: '#/components/schemas/CreateGroupStakeholder'
              ContactGroup: '#/components/schemas/CreateContactGroupStakeholder'
        - type: object
          properties:
            Actors:
              type: array
              description: The actions to be performed ( a list of actors )
              items:
                $ref: '#/components/schemas/CreateActor'
      example:
        Type: group
        GroupName: Great mates
        Actors:
          - Type: signer
            Elements:
              - Type: signingField
                Location:
                  Page: 2
                  Top: 200
                  Left: 200
                Dimensions:
                  Width: 200
                  Height: 200
        Members:
          - Language: en
            FirstName: John
            LastName: Doe
            EmailAddress: john@doe.test
            BirthDate: '1990-01-16'
          - Language: en
            FirstName: Zu
            LastName: Li
            EmailAddress: zu@li.test
            BirthDate: '1991-03-14'
            AdditionalProperties:
              BeId: '12345678900'
              BeLawyer: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
    StakeholderNotFoundError:
      title: Stakeholder not found
      allOf:
        - $ref: '#/components/schemas/NotFoundError'
      example:
        ErrorCode: Stakeholder.NotFound:00000000-0000-0000-0000-000000000000
        ErrorMessage: >-
          The stakeholder with id '00000000-0000-0000-0000-000000000000' could
          not be found
    ActorNotFoundError:
      title: Actor not found
      allOf:
        - $ref: '#/components/schemas/NotFoundError'
      example:
        ErrorCode: Actor.NotFound:00000000-0000-0000-0000-000000000000
        ErrorMessage: >-
          The actor with id '00000000-0000-0000-0000-000000000000' could not be
          found
    ReassignPersonStakeholder:
      type: object
      description: The new person stakeholder that replaces the appointed actor
      required:
        - Type
        - Language
        - LastName
        - EmailAddress
      properties:
        Type:
          type: string
          description: The type of stakeholder
          enum:
            - Person
        Language:
          $ref: '#/components/schemas/Language'
        FirstName:
          $ref: '#/components/schemas/Stakeholder.FirstName'
        LastName:
          $ref: '#/components/schemas/Stakeholder.LastName'
        EmailAddress:
          $ref: '#/components/schemas/EmailAddress'
        PhoneNumber:
          $ref: '#/components/schemas/PhoneNumber'
        BirthDate:
          type: string
          format: date
          description: Date of birth in YYYY-MM-DD format.
        AdditionalProperties:
          $ref: '#/components/schemas/AdditionalProperties'
        ExternalReference:
          $ref: '#/components/schemas/ExternalReference'
    ReassignActor:
      type: object
      required:
        - Stakeholder
        - ReassignmentReason
      properties:
        Stakeholder:
          $ref: '#/components/schemas/ReassignPersonStakeholder'
        ReassignmentReason:
          type: string
          description: The reason for the reassignment. Required.
    ProcessStep:
      type: array
      items:
        allOf:
          - $ref: '#/components/schemas/Actor'
          - type: object
            properties:
              StakeholderId:
                $ref: '#/components/schemas/Stakeholder.Id'
      example:
        - Id: 00000000-0000-0000-0000-000000000003
          StakeholderId: 00000000-0000-0000-0000-000000000003
          Type: signer
          Status: available
          Links:
            - https://completeyouraction.test
        - Id: 00000000-0000-0000-0000-000000000002
          StakeholderId: 00000000-0000-0000-0000-000000000002
          Type: signer
          Status: available
          MemberLinks:
            - Email: john@doe.test
              Link: https://alsocompleteyouraction.test
            - Email: zu@li.test
              Link: https://dothething.test
    CreateActorWithStakeholderId:
      allOf:
        - $ref: '#/components/schemas/CreateActor'
        - type: object
          required:
            - StakeholderId
          properties:
            StakeholderId:
              $ref: '#/components/schemas/Stakeholder.Id'
    ProcessStepNotFoundError:
      title: Process step not found
      allOf:
        - $ref: '#/components/schemas/NotFoundError'
      example:
        ErrorCode: ProcessStep.NotFound:2
        ErrorMessage: The process step with index '2' could not be found
    KeyPair:
      type: object
      description: representation of a signing key pair
      properties:
        Name:
          type: string
          description: Name of the key pair
          example: myKeyPair
        DisplayNames:
          type: object
          description: The name per language that will be shown to a signer
          additionalProperties:
            type: string
          example:
            en: my key pair
            nl: mijn sleutelpaar
            fr: ma paire de clefs
    ConfiguredSigningMethod:
      type: object
      description: A configured signing method in NSEV
      properties:
        IsActive:
          type: boolean
          description: >-
            Whether the signingMethod can be used for creating new signing
            fields
        Name:
          type: string
          description: The configured name of the signing method
          example: my_manual_signing
        DisplayNames:
          type: object
          description: The name per language that will be shown to a signer
          additionalProperties:
            type: string
          example:
            en: manual
            nl: manueel
            fr: manuscrite
        DisplayNamesInitiator:
          type: object
          description: >-
            The name per language that should be shown to the initiator when
            creating the package.
          additionalProperties:
            type: string
          example:
            en: manual signature + sealing
            nl: manuele handtekening + sealing
            fr: signature manuelle + sealing
        Descriptions:
          type: object
          description: >-
            Description of the signing method per language to provide more
            information about the signing method during package creation.
          additionalProperties:
            type: string
          example:
            en: The user will have to draw using their mouse
            nl: De gebruiker zal moeten tekenen met zijn muis
            fr: L'utilisateur devra dessiner à l'aide de sa souris
        RequiredProperties:
          type: array
          description: The required properties for mandated signing
          items:
            type: string
          example:
            - BeId
            - FirstName
            - BirthDate
        KeyPairs:
          type: array
          description: available KeyPairs that can be used to sign with this method
          items:
            $ref: '#/components/schemas/KeyPair'
    AuditTrailPackageDocument:
      type: object
      properties:
        Id:
          allOf:
            - $ref: '#/components/schemas/Guid'
            - type: string
              description: A document's unique identifier
              nullable: true
        Name:
          $ref: '#/components/schemas/Document.Name'
        PagesCount:
          type: integer
          example: 10
          nullable: true
        SignedFieldsCount:
          type: integer
          description: |
            The number of signed fields on the document.
          example: 4
          nullable: true
    AuditEventType:
      type: string
      nullable: false
      description: >
        Unique name defining the event type. The list is not exhaustive and
        subject to extension.
      example: SignActionCompleted
      enum:
        - PackageCreated
        - PackageSubmitted
        - PackageDeleted
        - PackageExpired
        - PackageExtended
        - PackageRevoked
        - PackageFinished
        - PackageRejected
        - PackageSentToReceiver
        - PackageApprovalEnded
        - PackageEnded
        - PackageActionInvitationSent
        - PackageActionReminderSent
        - PackageViewedByPerson
        - UnsignedPackageDownloadedByAnonymous
        - UnsignedPackageDownloadedByPerson
        - DocumentsRefusedBySigner
        - FormFieldsRefused
        - MailOtpAuthenticationCodeSent
        - MailOtpAuthenticationSuccessful
        - SmsOtpAuthenticationCodeSent
        - SmsOtpAuthenticationSuccessful
        - PhoneNumberVerified
        - SmsOtpSent
        - MailVerified
        - MailOtpSent
        - PackageActionRejected
        - PackageActionInProgress
        - PackageActionFailed
        - ApproveActionCompleted
        - FormFillActionCompleted
        - SignActionCompleted
        - PackageActionReassigned
        - PackageActionReassignedByUser
        - DocumentDownloadedByAnonymous
        - DocumentDownloadedByPerson
        - DocumentDownloadedByUser
        - PackageDownloadedByAnonymous
        - PackageDownloadedByPerson
        - PackageDownloadedByUser
    PackageAuditDetail:
      type: object
      description: >
        Additional information about the package that is relevant for the
        package events: Not empty for events that affect the package itself.
      properties:
        ApiSource:
          type: string
          nullable: true
          description: >
            The source of the API that initiated the event. Not empty for
            `PackageSubmitted`, `PackageDeleted`, `PackageCreated`,
            `PackageRevoked` events.
          enum:
            - Unknown
            - PortalApi
            - WebPortalApiV3
            - WebPortalApiV4
        TemplateCode:
          type: string
          nullable: true
          description: >
            Identifier of the template from which the package was created. Not
            empty when `PackageCreated` event indicates the package was created
            from a template.
        Documents:
          type: array
          description: |
            State of documents at time of the event.
          items:
            $ref: '#/components/schemas/AuditTrailPackageDocument'
    AuditTrailActionDocument:
      type: object
      properties:
        Id:
          allOf:
            - $ref: '#/components/schemas/Guid'
            - type: string
              description: A document's unique identifier
              nullable: true
        Name:
          $ref: '#/components/schemas/Document.Name'
    ActionAuditDetail:
      type: object
      description: >
        Additional information about the actor that is relevant for the action
        events: Not empty for events that affect an actor itself.
      properties:
        ActorId:
          allOf:
            - $ref: '#/components/schemas/Guid'
            - type: string
              description: An actor's (action) unique identifier
              nullable: false
        PersonId:
          allOf:
            - $ref: '#/components/schemas/Guid'
            - type: string
              description: A person's (stakeholder) unique identifier
              nullable: true
        EmailAddress:
          allOf:
            - $ref: '#/components/schemas/EmailAddress'
            - type: string
              description: The person's email address
              nullable: true
        Documents:
          type: array
          description: >
            Affected documents during an action (Approved, FormFilled or
            Signed).
          items:
            $ref: '#/components/schemas/AuditTrailActionDocument'
        SigningMethods:
          type: array
          description: |
            Used signing methods for a `SignActionCompleted` event.
          items:
            $ref: '#/components/schemas/SigningMethodWithKeyPair'
    AuditTrailResponse:
      type: object
      properties:
        RequestedOn:
          type: string
          description: Date of request for this audit trail.
          format: date-time
          example: '2024-08-27T09:09:46Z'
        PackageInfo:
          type: object
          properties:
            Id:
              $ref: '#/components/schemas/Package.Id'
            Name:
              $ref: '#/components/schemas/Package.Name'
            CreatedOn:
              type: string
              description: Date of package creation
              format: date-time
              example: '2024-08-14T13:24:49Z'
            Initiator:
              $ref: '#/components/schemas/Package.Initiator'
            Status:
              $ref: '#/components/schemas/Package.Status'
            Documents:
              type: array
              items:
                $ref: '#/components/schemas/AuditTrailPackageDocument'
        Events:
          type: array
          description: A list of events that occured during the lifecycle of the package
          items:
            type: object
            properties:
              Id:
                allOf:
                  - $ref: '#/components/schemas/Guid'
                  - type: string
                    description: Unique identifier of an event
              CreatedOn:
                type: string
                description: Date of event creation
                format: date-time
                example: '2024-08-14T13:24:49Z'
              IpAddress:
                type: string
                description: The ip address of the user that made the event happen
                example: 127.1.0.0
              Type:
                $ref: '#/components/schemas/AuditEventType'
              User:
                allOf:
                  - $ref: '#/components/schemas/EmailAddress'
                  - type: string
                    description: >-
                      The email address of the logged in application user that
                      made the event happen
                    nullable: true
              PackageDetail:
                $ref: '#/components/schemas/PackageAuditDetail'
              ActionDetail:
                $ref: '#/components/schemas/ActionAuditDetail'
    CorrelationId:
      allOf:
        - $ref: '#/components/schemas/Guid'
        - type: string
          description: A unique identifer used for correlation.
    DocumentInfo:
      type: object
      description: A audit proof info of document
      properties:
        Name:
          $ref: '#/components/schemas/Document.Name'
        DocumentId:
          $ref: '#/components/schemas/Document.Id'
        CorrelationId:
          type: string
          description: The correlation Id
    ProofInfo:
      type: object
      description: Audit proof information of a package
      properties:
        PackageId:
          $ref: '#/components/schemas/Package.Id'
        PackageName:
          $ref: '#/components/schemas/Package.Name'
        CorrelationId:
          type: string
          description: The correlation id
        PackageCreationDate:
          $ref: '#/components/schemas/CreationDate'
        PackageDeletionDate:
          type: string
          format: date-time
          description: When the package was deleted
        DelayedDeletionDate:
          type: string
          format: date-time
          description: When the resource will be deleted automatically
        Documents:
          type: array
          description: This package's documents with audit proofs
          items:
            $ref: '#/components/schemas/DocumentInfo'
    BulkSignRequest:
      type: object
      description: >-
        Request for creating bulk sign session. When only an EmailAddress is
        provided, all available actors will be chosen.
      additionalProperties: false
      allOf:
        - type: object
          required:
            - EmailAddress
          properties:
            EmailAddress:
              $ref: '#/components/schemas/EmailAddress'
            Language:
              $ref: '#/components/schemas/Language'
        - oneOf:
            - type: object
              title: By actor identifiers
              properties:
                Actors:
                  description: Identifiers of actors to create a bulk sign session for.
                  type: array
                  nullable: true
                  items:
                    $ref: '#/components/schemas/Guid'
            - type: object
              title: By package identifiers
              properties:
                Packages:
                  description: >-
                    Identifiers of packages to create a bulk sign session for.
                    Only available actors will be selected.
                  type: array
                  nullable: true
                  items:
                    $ref: '#/components/schemas/Guid'
    BulkSignSessionResult:
      properties:
        ActionUrl:
          type: string
          format: url
          description: Url to the bulk sign session
          example: https://example.test
    BulkModifyStatusRequest:
      type: object
      description: Request for bulk modify package status action
      required:
        - PackageIds
        - Status
      properties:
        PackageIds:
          type: array
          items:
            $ref: '#/components/schemas/Guid'
        Status:
          type: string
          enum:
            - Pending
            - Revoked
          description: >-
            The status the packages must be updated to. Supported transitions
            are

            draft to Pending and pending to Revoked.
        SuppressNotifications:
          type: boolean
          description: >-
            When true, no notifications are sent for the status change. Only
            applies

            when Status is Revoked.
          default: false
    BulkActionSession.Id:
      allOf:
        - $ref: '#/components/schemas/Guid'
        - description: A bulk action session unique identifier
    BulkRemovePackagesRequest:
      type: object
      description: Request for bulk remove package action
      required:
        - PackageIds
      properties:
        PackageIds:
          type: array
          items:
            $ref: '#/components/schemas/Guid'
        DelayedDeletionTime:
          type: integer
          description: >-
            Number of days the packages' audit proofs are kept after the
            packages are

            deleted. When omitted, the environment's configured delayed deletion
            time

            applies. Set to 0 to keep audit proofs indefinitely until they are
            removed

            with an explicit delete-audit-proofs call.
          minimum: 0
          nullable: true
    BulkActionRequest:
      type: object
      description: Request for bulk action
      additionalProperties: false
      required:
        - PackageIds
      properties:
        PackageIds:
          type: array
          items:
            $ref: '#/components/schemas/Guid'
    BulkActionExpiryDateRequest:
      type: object
      description: Request for bulk update expiry date package action
      required:
        - PackageIds
      properties:
        PackageIds:
          type: array
          items:
            $ref: '#/components/schemas/Package.Id'
        ExpirationTimestamp:
          $ref: '#/components/schemas/ExpiryDate'
    BulkActionSkipRequest:
      type: object
      description: Request for bulk skip actors package action
      required:
        - PackageIds
      properties:
        PackageIds:
          type: array
          items:
            $ref: '#/components/schemas/Package.Id'
        Target:
          type: string
          enum:
            - ToSigners
            - ToFinished
          description: >-
            Where the packages must be moved to. ToSigners skips approvers and
            form

            fillers and moves the packages to the signing phase; ToFinished
            skips any

            remaining signers and ends the signing flow.
    BulkActionAuditTrailRequest:
      type: object
      description: Request for requesting audit trails in bulk
      required:
        - PackageIds
      properties:
        PackageIds:
          type: array
          items:
            $ref: '#/components/schemas/Package.Id'
        Culture:
          allOf:
            - $ref: '#/components/schemas/Language'
            - {}
    BulkPackageActionDetailsBaseResult:
      type: object
      description: The information of succeeded package action.
      properties:
        PackageId:
          $ref: '#/components/schemas/Guid'
        ExecutedTime:
          type: string
          format: dateTime
    BulkPackageActionFailedResult:
      allOf:
        - $ref: '#/components/schemas/BulkPackageActionDetailsBaseResult'
        - properties:
            ErrorCode:
              type: string
            ErrorMessage:
              type: string
    BulkPackageActionDetail:
      type: object
      description: The bulk action session information per package.
      properties:
        Succeeded:
          type: array
          items:
            $ref: '#/components/schemas/BulkPackageActionDetailsBaseResult'
        Failed:
          type: array
          items:
            $ref: '#/components/schemas/BulkPackageActionFailedResult'
    BulkPackageActionInfoResult:
      type: object
      description: The bulk package action session information.
      properties:
        SessionId:
          allOf:
            - $ref: '#/components/schemas/Guid'
            - description: The bulk action session unique identifier..
        Action:
          type: string
          enum:
            - DeletePackage
            - DownloadPackage
            - NotifyActors
            - RevokePackage
            - SkipPackagePhase
            - ExtendPackage
            - RequestAuditTrails
            - DeleteAuditProofs
            - PackageStatusUpdate
            - SoftDeletePackage
          description: The bulk action type.
        Status:
          type: string
          enum:
            - Pending
            - Finishing
            - Finished
          description: The bulk action status.
        Total:
          type: integer
          description: Total items in the bulk action session.
        Succeeded:
          type: integer
          description: The number of the succeeded actions.
        Failed:
          type: integer
          description: The number of the failed actions.
        FinishedTime:
          type: string
          format: dateTime
          description: The bulk action session end time.
        Details:
          $ref: '#/components/schemas/BulkPackageActionDetail'
    BulkActionDetailsBaseResult:
      type: object
      description: The information of succeeded item action.
      properties:
        Id:
          oneOf:
            - $ref: '#/components/schemas/Guid'
            - $ref: '#/components/schemas/EmailAddress'
          description: The item unique identifier.
        ExecutedTime:
          type: string
          format: dateTime
    BulkActionFailedResult:
      allOf:
        - $ref: '#/components/schemas/BulkActionDetailsBaseResult'
        - properties:
            ErrorCode:
              type: string
            ErrorMessage:
              type: string
    BulkActionDetail:
      type: object
      description: The bulk action session information per item.
      properties:
        Succeeded:
          type: array
          items:
            $ref: '#/components/schemas/BulkActionDetailsBaseResult'
        Failed:
          type: array
          items:
            $ref: '#/components/schemas/BulkActionFailedResult'
    BulkActionInfoResult:
      type: object
      description: The bulk action session information.
      properties:
        SessionId:
          $ref: '#/components/schemas/Guid'
        Action:
          type: string
          enum:
            - DeletePackage
            - DownloadPackage
            - NotifyActors
            - RevokePackage
            - SkipPackagePhase
            - ExtendPackage
            - RequestAuditTrails
            - DeleteAuditProofs
            - PackageStatusUpdate
            - SoftDeletePackage
            - UserEmailInvitationNotification
        Status:
          type: string
          enum:
            - Pending
            - Finishing
            - Finished
        Total:
          type: integer
        Succeeded:
          type: integer
        Failed:
          type: integer
        FinishedTime:
          type: string
          format: dateTime
        Details:
          $ref: '#/components/schemas/BulkActionDetail'
    UserGroup.Name:
      type: string
      description: A user group name.
    UserCreationOptions:
      type: object
      description: Defines the user creation options.
      properties:
        IsSharedContact:
          type: boolean
          description: When true, a shared contact is created for each invited user.
        InvitationLanguage:
          type: string
          description: >-
            Language used for the invitation email, as a two-letter ISO 639-1
            code.
          example: nl
          enum:
            - en
            - nl
            - de
            - fr
            - es
            - da
            - nb
            - sv
            - fi
            - lv
            - pl
            - hu
            - it
            - pt
            - ro
    UserEmailInvitationRequest:
      type: object
      description: Request for sending the user invitation email
      required:
        - Emails
      properties:
        Emails:
          type: array
          items:
            $ref: '#/components/schemas/EmailAddress'
        UserGroups:
          type: array
          items:
            $ref: '#/components/schemas/UserGroup.Name'
        CreationOptions:
          $ref: '#/components/schemas/UserCreationOptions'
    BulkInviteUsersResult:
      type: object
      description: The bulk invite users request information.
      properties:
        SessionId:
          $ref: '#/components/schemas/Guid'
        Link:
          type: string
          format: url
          description: url for retrieving bulk invite users session details
    AbsencePeriod.Id:
      type: object
      description: An absence period id
      properties:
        Id:
          allOf:
            - $ref: '#/components/schemas/Guid'
            - description: This absence period's unique identifier
    AbsencePeriodBase:
      type: object
      required:
        - User
        - StartDate
      properties:
        User:
          allOf:
            - $ref: '#/components/schemas/EmailAddress'
            - description: The user's email address
        StartDate:
          type: string
          format: date-time
          description: The start of this absence period
        EndDate:
          type: string
          format: date-time
          description: The end of this absence period
    Substitute.Id:
      type: object
      description: A substitute id
      properties:
        Id:
          allOf:
            - $ref: '#/components/schemas/Guid'
            - description: >-
                This substitute's unique identifier (Note: when this property is
                omitted in a request, a new substitute will be created)
    CreateSubstituteBase:
      type: object
      description: A person or group that can replace a stakeholder to perform an action
      required:
        - Type
        - ActionTypes
      allOf:
        - type: object
          properties:
            Type:
              type: string
              enum:
                - person
                - group
                - contactgroup
              description: The type of substitute
            ActionTypes:
              type: array
              description: The types of actions this substitute will be able to perform
              items:
                type: string
                enum:
                  - approver
                  - receiver
                  - signer
                  - formFiller
        - $ref: '#/components/schemas/Substitute.AllowedToReassign'
    CreatePersonSubstitute:
      title: Person substitute
      type: object
      description: >-
        A person that can replace a stakeholder to perform an action in a
        package
      required:
        - Type
        - Language
        - LastName
        - EmailAddress
      allOf:
        - $ref: '#/components/schemas/CreateSubstituteBase'
        - $ref: '#/components/schemas/Person'
        - type: object
          properties:
            Type:
              enum:
                - person
    UpdatePersonSubstitute:
      title: Person substitute
      type: object
      allOf:
        - $ref: '#/components/schemas/Substitute.Id'
        - $ref: '#/components/schemas/CreatePersonSubstitute'
    PersonSubstituteResponse:
      title: Person substitute
      type: object
      required:
        - Id
      allOf:
        - $ref: '#/components/schemas/UpdatePersonSubstitute'
    CreateGroupSubstitute:
      title: Group substitute
      type: object
      description: >-
        A group of which at most one member can replace a stakeholder to perform
        an action in a package
      required:
        - Type
        - GroupName
        - Members
      allOf:
        - $ref: '#/components/schemas/CreateSubstituteBase'
        - type: object
          properties:
            GroupName:
              type: string
              maxLength: 128
              description: Name of the substitute group
              example: Finance Team
            Members:
              type: array
              description: Members of the substitute group
              items:
                $ref: '#/components/schemas/Person'
            ExternalReference:
              allOf:
                - $ref: '#/components/schemas/ExternalReference'
                - example: Finance_Team_Area_1
            Type:
              enum:
                - group
    UpdateGroupSubstitute:
      title: Group substitute
      type: object
      allOf:
        - $ref: '#/components/schemas/Substitute.Id'
        - $ref: '#/components/schemas/CreateGroupSubstitute'
    GroupSubstituteResponse:
      title: Group substitute
      type: object
      required:
        - Id
      allOf:
        - $ref: '#/components/schemas/UpdateGroupSubstitute'
    ContactGroupCode:
      type: string
      description: a portal contact group identifier
      example: 7
    CreateContactGroupSubstitute:
      title: Contact group substitute
      type: object
      description: >-
        A group of which at most one member can replace a stakeholder to perform
        an action in a package
      required:
        - Type
        - ContactGroupCode
      allOf:
        - $ref: '#/components/schemas/CreateSubstituteBase'
        - type: object
          properties:
            ContactGroupCode:
              $ref: '#/components/schemas/ContactGroupCode'
            Type:
              enum:
                - contactgroup
    UpdateContactGroupSubstitute:
      title: Contact group substitute
      type: object
      allOf:
        - $ref: '#/components/schemas/Substitute.Id'
        - $ref: '#/components/schemas/CreateContactGroupSubstitute'
    ContactGroupSubstituteResponse:
      title: Contact group substitute
      type: object
      description: >-
        A group of which at most one member can replace a stakeholder to perform
        an action in a package
      required:
        - Id
      allOf:
        - $ref: '#/components/schemas/UpdateContactGroupSubstitute'
        - type: object
          properties:
            GroupName:
              type: string
              maxLength: 128
              description: Name of the substitute group
              example: Finance Team
            Members:
              type: array
              description: Members of the substitute group
              items:
                $ref: '#/components/schemas/Person'
            ExternalReference:
              allOf:
                - $ref: '#/components/schemas/ExternalReference'
                - example: Finance_Team_Area_1
    SubstituteResponse:
      oneOf:
        - $ref: '#/components/schemas/PersonSubstituteResponse'
        - $ref: '#/components/schemas/GroupSubstituteResponse'
        - $ref: '#/components/schemas/ContactGroupSubstituteResponse'
      discriminator:
        propertyName: Type
        mapping:
          person: '#/components/schemas/PersonSubstituteResponse'
          group: '#/components/schemas/GroupSubstituteResponse'
          contactgroup: '#/components/schemas/ContactGroupSubstituteResponse'
    AbsencePeriodResponse:
      type: object
      required:
        - Id
      allOf:
        - $ref: '#/components/schemas/AbsencePeriod.Id'
        - $ref: '#/components/schemas/AbsencePeriodBase'
        - type: object
          properties:
            Substitutes:
              type: array
              items:
                $ref: '#/components/schemas/SubstituteResponse'
              description: The substitutes assigned for this absence period
      example:
        Id: 9EB8D3B2-2FF5-495D-BCDC-0A054B087B80
        User: ada.rodriguez@comp.com
        StartDate: 2024-12-20T08:00:00+0200
        EndDate: 2025-01-01T08:00:00+0200
        Substitutes:
          - Id: B0056F8B-6891-4E48-AF21-01A52DA94B34
            Type: person
            ActionTypes:
              - signer
              - receiver
            AllowedToReassign: true
            Language: en
            Title: Ms.
            FirstName: Jane
            LastName: Doe
            EmailAddress: jane.doe@comp.com
            PhoneNumber: +1 202-918-2132
            BirthDate: '1953-03-13'
            ExternalReference: Client_XYZ_Account_Manager_1
            AdditionalProperties:
              BeId: '12345678900'
              BeLawyer: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
          - Id: B83BFA5F-7300-412E-A781-D99B798FFDC5
            Type: contactgroup
            ActionTypes:
              - formFiller
            AllowedToReassign: false
            ContactGroupCode: '00005'
            GroupName: Musicians
            Members:
              - Language: en
                Title: Sir
                FirstName: Herbie
                LastName: Hancock
                EmailAddress: herbie@comp.com
                BirthDate: '1940-04-12'
                AdditionalProperties:
                  BeId: '12345678912'
              - Language: en
                Title: Mr.
                FirstName: Wayne
                LastName: Shorter
                EmailAddress: wayne@comp.com
                BirthDate: '1933-08-25'
            ExternalReference: string
          - Id: 1FDBAD81-75E5-4CC8-B113-39255FA119D7
            Type: group
            ActionTypes:
              - approver
            AllowedToReassign: false
            GroupName: C-Level team
            Members:
              - Language: en
                Title: Ms.
                FirstName: Isla
                LastName: Giles
                EmailAddress: isla.giles@comp.com
                PhoneNumber: '+324876752'
                BirthDate: '2001-03-13'
                AdditionalProperties:
                  BeLawyer: 12f5974c-1f90-4d63-9f4a-6de9cead8c5e
              - Language: en
                Title: Mr.
                FirstName: Devon
                LastName: Barnett
                EmailAddress: devon.barnett@comp.com
                PhoneNumber: '+324876752'
                BirthDate: '1989-03-13'
                AdditionalProperties:
                  BeLawyer: afe1974c-1f90-4d63-9f4a-6de9cead8c5e
    CreateSubstitute:
      oneOf:
        - $ref: '#/components/schemas/CreatePersonSubstitute'
        - $ref: '#/components/schemas/CreateGroupSubstitute'
        - $ref: '#/components/schemas/CreateContactGroupSubstitute'
      discriminator:
        propertyName: Type
        mapping:
          person: '#/components/schemas/CreatePersonSubstitute'
          group: '#/components/schemas/CreateGroupSubstitute'
          contactgroup: '#/components/schemas/CreateContactGroupSubstitute'
    CreateAbsencePeriod:
      type: object
      required:
        - User
        - StartDate
      allOf:
        - $ref: '#/components/schemas/AbsencePeriodBase'
        - type: object
          properties:
            Substitutes:
              type: array
              items:
                $ref: '#/components/schemas/CreateSubstitute'
              description: The substitutes assigned for this absence period
      example:
        User: ada.rodriguez@comp.com
        StartDate: 2024-12-20T08:00:00+0200
        EndDate: 2025-01-01T08:00:00+0200
        Substitutes:
          - Type: person
            ActionTypes:
              - signer
              - receiver
            AllowedToReassign: true
            Language: en
            Title: Ms.
            FirstName: Jane
            LastName: Doe
            EmailAddress: jane.doe@comp.com
            PhoneNumber: +1 202-918-2132
            BirthDate: '1953-03-13'
            ExternalReference: Client_XYZ_Account_Manager_1
            AdditionalProperties:
              BeId: '12345678900'
              BeLawyer: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
          - Type: contactgroup
            ActionTypes:
              - formFiller
            AllowedToReassign: false
            ContactGroupCode: '00005'
          - Type: group
            ActionTypes:
              - approver
            AllowedToReassign: false
            GroupName: C-Level team
            Members:
              - Language: en
                Title: Ms.
                FirstName: Isla
                LastName: Giles
                EmailAddress: isla.giles@comp.com
                PhoneNumber: '+324876752'
                BirthDate: '2001-03-13'
                AdditionalProperties:
                  BeLawyer: 12f5974c-1f90-4d63-9f4a-6de9cead8c5e
              - Language: en
                Title: Mr.
                FirstName: Devon
                LastName: Barnett
                EmailAddress: devon.barnett@comp.com
                PhoneNumber: '+324876752'
                BirthDate: '1989-03-13'
                AdditionalProperties:
                  BeLawyer: afe1974c-1f90-4d63-9f4a-6de9cead8c5e
    UserNotFoundError:
      title: User not found
      allOf:
        - $ref: '#/components/schemas/NotFoundError'
        - description: User could not be found
      example:
        ErrorCode: User.NotFound
        ErrorMessage: No user found with email address [hello@world.test].
    ContactGroupNotFoundError:
      title: Contact group not found
      allOf:
        - $ref: '#/components/schemas/NotFoundError'
        - description: Contact group could not be found
      example:
        ErrorCode: ContactGroup.NotFound:00123
        ErrorMessage: No contact group with code 00123 could be found.
    AbsencePeriodOverlappingError:
      title: Absence period overlapping
      allOf:
        - $ref: '#/components/schemas/Error'
        - description: Absence period overlaps with existing absence period
    DuplicateActionTypeError:
      title: Duplicate action type
      allOf:
        - $ref: '#/components/schemas/Error'
        - description: >-
            The absence period contains more than one substitute for one action
            type
    AbsencePeriodNotFoundError:
      title: Absence period not found
      allOf:
        - $ref: '#/components/schemas/NotFoundError'
        - description: Absence period could not be found
      example:
        ErrorCode: AbsencePeriod.NotFound
        ErrorMessage: >-
          Absence period with Id '00000000-0000-0000-0000-000000000000' could
          not be found
    UpdateSubstitute:
      oneOf:
        - $ref: '#/components/schemas/UpdatePersonSubstitute'
        - $ref: '#/components/schemas/UpdateGroupSubstitute'
        - $ref: '#/components/schemas/UpdateContactGroupSubstitute'
      discriminator:
        propertyName: Type
        mapping:
          person: '#/components/schemas/UpdatePersonSubstitute'
          group: '#/components/schemas/UpdateGroupSubstitute'
          contactgroup: '#/components/schemas/UpdateContactGroupSubstitute'
    UpdateAbsencePeriod:
      type: object
      required:
        - Id
      allOf:
        - $ref: '#/components/schemas/AbsencePeriodBase'
        - $ref: '#/components/schemas/AbsencePeriod.Id'
        - type: object
          properties:
            Substitutes:
              type: array
              items:
                $ref: '#/components/schemas/UpdateSubstitute'
              description: The substitutes assigned for this absence period
      example:
        User: ada.rodriguez@comp.com
        StartDate: 2024-12-20T08:00:00+0200
        EndDate: 2025-01-01T08:00:00+0200
        Substitutes:
          - Id: 1FDBAD81-75E5-4CC8-B113-39255FA119D7
            Type: person
            ActionTypes:
              - signer
              - receiver
            AllowedToReassign: true
            Language: en
            Title: Ms.
            FirstName: Jane
            LastName: Doe
            EmailAddress: jane.doe@comp.com
            PhoneNumber: +1 202-918-2132
            BirthDate: '1953-03-13'
            ExternalReference: Client_XYZ_Account_Manager_1
            AdditionalProperties:
              BeId: '12345678900'
              BeLawyer: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
          - Type: contactgroup
            ActionTypes:
              - formFiller
            AllowedToReassign: false
            ContactGroupCode: '00005'
          - Type: group
            ActionTypes:
              - approver
            AllowedToReassign: false
            GroupName: C-Level team
            Members:
              - Language: en
                Title: Ms.
                FirstName: Isla
                LastName: Giles
                EmailAddress: isla.giles@comp.com
                PhoneNumber: '+324876752'
                BirthDate: '2001-03-13'
                AdditionalProperties:
                  BeLawyer: 12f5974c-1f90-4d63-9f4a-6de9cead8c5e
              - Language: en
                Title: Mr.
                FirstName: Devon
                LastName: Barnett
                EmailAddress: devon.barnett@comp.com
                PhoneNumber: '+324876752'
                BirthDate: '1989-03-13'
                AdditionalProperties:
                  BeLawyer: afe1974c-1f90-4d63-9f4a-6de9cead8c5e
    SubstituteNotFoundError:
      title: Substitute not found
      allOf:
        - $ref: '#/components/schemas/NotFoundError'
        - description: Substitute could not be found
      example:
        ErrorCode: Substitute.NotFound
        ErrorMessage: >-
          Substitute with Id '00000000-0000-0000-0000-000000000000' could not be
          found
    SubstituteTypeChangedError:
      title: Substitute type changed
      allOf:
        - $ref: '#/components/schemas/Error'
        - description: A substitute's type was attempted to change
  responses:
    UnAuthorized:
      description: Caller is unauthorized to perform this operation
    ValidationFailed:
      description: Request failed validation
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/ValidationError'
    PackageCreated:
      description: Package was created
      headers:
        Location:
          description: Location of the newly created package
          schema:
            type: string
            format: url
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/PackageCreatedSync'
              - type: object
                properties:
                  Warnings:
                    type: array
                    description: Warnings raised while creating the package
                    items:
                      $ref: '#/components/schemas/Warning'
          examples:
            existing:
              summary: Package was created
              value:
                Id: CD758AE3-5382-48B2-A4F3-DD76C7200EE0
                Name: example pending package
                Initiator: hello@world.test
                Status: pending
                ExpiryDate: '2020-01-17T12:33:47.923Z'
                DefaultLegalNotice:
                  Name: LegalNotice1
                Documents:
                  - Id: 1E501B99-9F0F-4F12-9AD9-6C737C6394E8
                    Name: my first document
                    Language: en
                    ExternalReference: doc0
                    ProofCorrelationId: correlation identifier
                    DocumentOptions:
                      TargetType: application/pdf
                      PdfOptions:
                        TargetFormat: pdfa1a
                      Base64data: string
                      ContentType: application/pdf
                  - Id: 1BAE1A85-BF29-426C-A9B6-D7BD330CF4CD
                    Name: my second document
                    Language: en
                    ExternalReference: doc1
                    DocumentOptions:
                      TargetType: application/pdf
                      Base64data: string
                      ContentType: application/pdf
                stakeholders:
                  - Id: C2CEBEEF-A9BB-4BF8-9FD9-7F78EBC80CC2
                    Type: person
                    Language: en
                    FirstName: John
                    LastName: Doe
                    EmailAddress: john@doe.test
                    BirthDate: '1990-01-16'
                    PhoneNumber: +32xxxxxxxxx
                    AdditionalProperties:
                      BeId: '12345678900'
                      BeLawyer: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
                    Actors:
                      - Id: 5D197888-8660-4374-BB42-102A4F6E35C4
                        Type: signer
                        ProcessStep: 0
                        Elements:
                          - Id: F77A4B19-ADEB-495B-A098-1E99DB0E42FD
                            Type: signingField
                            DocumentIndex: 0
                            Location:
                              Page: 2
                              Top: 200
                              Left: 200
                            Dimensions:
                              Width: 200
                              Height: 200
                            SigningMethods:
                              - Manual:Handwritten
                              - SMSCode:SmsOtp
                            KeyPairMappings:
                              - SigningMethodName: SMSCode:SmsOtp
                                KeyPair: Custom keypair
                        Links:
                          - >-
                            https://api.example.test/signinit?packageSignId=cd758ae3-5382-48b2-a4f3-dd76c7200ee0&token=123
                  - Id: 57274DC0-2B9F-4A1E-B9FD-CFD1C1893683
                    Type: group
                    GroupName: Great mates
                    Members:
                      - Id: 750FC8F4-00D0-4247-AA5A-9323A1E1F740
                        Language: en
                        FirstName: John
                        LastName: Doe
                        EmailAddress: john@doe.test
                        BirthDate: '1990-01-16'
                      - Id: BE89E158-4278-41E7-BF33-7EE6F8B2ECFB
                        Language: en
                        FirstName: Zu
                        LastName: Li
                        EmailAddress: zu@li.test
                        BirthDate: '1991-03-14'
                    Actors:
                      - Id: F62C2D0D-42E2-48E9-BA4B-C9825290C474
                        Type: signer
                        ProcessStep: 1
                        Elements:
                          - Id: E62DB347-5ED1-48DA-91A3-90A660AA18CC
                            Type: signingField
                            DocumentIndex: 1
                            Location:
                              Page: 2
                              Top: 200
                              Left: 200
                            Dimensions:
                              Width: 200
                              Height: 200
                        Links:
                          - >-
                            https://api.example.test/signinit?packageSignId=cd758ae3-5382-48b2-a4f3-dd76c7200ee0&token=321
                ThemeCode: string
                CallBackUrl: https://callback.test
                NotificationCallBackUrl: https://notifications.test
                IsUnsignedContentDownloadable: true
                ExternalReference: myFirstPackage
                MustBeArchived: true
                ArchiveAuditProofs: false
                ArchiveAuditTrail: false
                AutomaticReminder:
                  IsSendAutomaticRemindersEnabled: true
                  DaysBeforeFirstReminder: 5
                  IsRepeatRemindersEnabled: true
                  RepeatReminders: 5
                ExpirationReminder:
                  IsSendExpirationRemindersEnabled: true
                  DaysBeforeExpirationReminder: 5
                OtpAuthenticationSetting:
                  IsSmsOtpAuthenticationEnabled: false
                  IsMailOtpAuthenticationEnabled: false
            package-created:
              summary: Package was created
              value:
                Id: CD758AE3-5382-48B2-A4F3-DD76C7200EE0
                Name: example pending package
                Initiator: hello@world.test
                Status: pending
                ExpiryDate: '2020-01-17T12:33:47.923Z'
                DefaultLegalNotice:
                  Name: LegalNotice1
                Documents:
                  - Id: 1E501B99-9F0F-4F12-9AD9-6C737C6394E8
                    Name: my first document
                    Language: en
                    ExternalReference: doc0
                    ProofCorrelationId: correlation identifier
                    DocumentOptions:
                      TargetType: application/pdf
                      PdfOptions:
                        TargetFormat: pdfa1a
                      Base64data: string
                      ContentType: application/pdf
                  - Id: 1BAE1A85-BF29-426C-A9B6-D7BD330CF4CD
                    Name: my second document
                    Language: en
                    ExternalReference: doc1
                    DocumentOptions:
                      TargetType: application/pdf
                      Base64data: string
                      ContentType: application/pdf
                stakeholders:
                  - Id: C2CEBEEF-A9BB-4BF8-9FD9-7F78EBC80CC2
                    Type: person
                    Language: en
                    FirstName: John
                    LastName: Doe
                    EmailAddress: john@doe.test
                    BirthDate: '1990-01-16'
                    PhoneNumber: +32xxxxxxxxx
                    AdditionalProperties:
                      BeId: '12345678900'
                      BeLawyer: b459d74c-1f90-4d63-9f4a-6de9cead8c5e
                    Actors:
                      - Id: 5D197888-8660-4374-BB42-102A4F6E35C4
                        Type: signer
                        ProcessStep: 0
                        Elements:
                          - Id: F77A4B19-ADEB-495B-A098-1E99DB0E42FD
                            Type: signingField
                            DocumentIndex: 0
                            Location:
                              Page: 2
                              Top: 200
                              Left: 200
                            Dimensions:
                              Width: 200
                              Height: 200
                            SigningMethods:
                              - Manual:Handwritten
                              - SMSCode:SmsOtp
                            KeyPairMappings:
                              - SigningMethodName: SMSCode:SmsOtp
                                KeyPair: Custom keypair
                        Links:
                          - >-
                            https://api.example.test/signinit?packageSignId=cd758ae3-5382-48b2-a4f3-dd76c7200ee0&token=123
                  - Id: 57274DC0-2B9F-4A1E-B9FD-CFD1C1893683
                    Type: group
                    GroupName: Great mates
                    Members:
                      - Id: 750FC8F4-00D0-4247-AA5A-9323A1E1F740
                        Language: en
                        FirstName: John
                        LastName: Doe
                        EmailAddress: john@doe.test
                        BirthDate: '1990-01-16'
                      - Id: BE89E158-4278-41E7-BF33-7EE6F8B2ECFB
                        Language: en
                        FirstName: Zu
                        LastName: Li
                        EmailAddress: zu@li.test
                        BirthDate: '1991-03-14'
                    Actors:
                      - Id: F62C2D0D-42E2-48E9-BA4B-C9825290C474
                        Type: signer
                        ProcessStep: 1
                        Elements:
                          - Id: E62DB347-5ED1-48DA-91A3-90A660AA18CC
                            Type: signingField
                            DocumentIndex: 1
                            Location:
                              Page: 2
                              Top: 200
                              Left: 200
                            Dimensions:
                              Width: 200
                              Height: 200
                        Links:
                          - >-
                            https://api.example.test/signinit?packageSignId=cd758ae3-5382-48b2-a4f3-dd76c7200ee0&token=321
                ThemeCode: string
                CallBackUrl: https://callback.test
                NotificationCallBackUrl: https://notifications.test
                IsUnsignedContentDownloadable: true
                ExternalReference: myFirstPackage
                MustBeArchived: true
                ArchiveAuditProofs: false
                ArchiveAuditTrail: false
                AutomaticReminder:
                  IsSendAutomaticRemindersEnabled: true
                  DaysBeforeFirstReminder: 5
                  IsRepeatRemindersEnabled: true
                  RepeatReminders: 5
                ExpirationReminder:
                  IsSendExpirationRemindersEnabled: true
                  DaysBeforeExpirationReminder: 5
                OtpAuthenticationSetting:
                  IsSmsOtpAuthenticationEnabled: false
                  IsMailOtpAuthenticationEnabled: false
    NotFound.Package:
      description: Package could not be found
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/PackageNotFoundError'
    DocumentCreated:
      description: Document was created
      headers:
        Location:
          description: Location of the newly created document
          schema:
            type: string
            format: url
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DocumentCreatedSync'
    NotFound.DocumentInPackage:
      description: Document could not be found in package
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/DocumentNotFoundInPackageError'
    ProcessResponse:
      description: OK
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/ProcessStep'
          example:
            - - Id: 00000000-0000-0000-0000-000000000001
                StakeholderId: 00000000-0000-0000-0000-000000000001
                Type: approver
            - - Id: 00000000-0000-0000-0000-000000000003
                StakeholderId: 00000000-0000-0000-0000-000000000003
                Type: formFiller
                Elements:
                  - Type: CheckBoxField
                    Name: MyCheckBox1
                    ToolTipLabel: Check me!
                    IsRequired: true
                    DefaultValue: true
                    Location:
                      Page: 3
                      Top: 200
                      Left: 200
                    Dimensions:
                      Width: 10
                      Height: 10
            - - Id: 00000000-0000-0000-0000-000000000003
                StakeholderId: 00000000-0000-0000-0000-000000000003
                Type: signer
                Elements:
                  - Type: signingField
                    ExternalReference: myManualField
                    SigningMethods:
                      - manual
                    Location:
                      Page: 1
                      Top: 200
                      Left: 200
                    Dimensions:
                      Width: 200
                      Height: 200
              - Id: 00000000-0000-0000-0000-000000000002
                StakeholderId: 00000000-0000-0000-0000-000000000002
                Type: signer
                Elements:
                  - Type: signingField
                    SigningMethods:
                      - beid
                    Location:
                      Page: 2
                      Top: 200
                      Left: 200
                    Dimensions:
                      Width: 200
                      Height: 200
            - - Id: 00000000-0000-0000-0000-000000000004
                StakeholderId: 00000000-0000-0000-0000-000000000004
                Type: signer
                Elements:
                  - Type: signingField
                    ExternalReference: myManualField
                    SigningMethods:
                      - itsme
                    Location:
                      Page: 1
                      Top: 400
                      Left: 400
                    Dimensions:
                      Width: 200
                      Height: 200
            - - Id: 00000000-0000-0000-0000-000000000005
                StakeholderId: 00000000-0000-0000-0000-000000000005
                Type: receiver
    Forbidden:
      description: It is forbidden to perform this operation
  requestBodies:
    CreateDocument:
      description: Parameters for creating a document
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateDocumentWithBase64Document'
          examples:
            existing:
              summary: PDF document (existing spec example)
              value:
                Name: string
                Language: en
                ExternalReference: string
                Elements:
                  - Type: signingField
                    ExternalReference: myManualField
                    SigningMethods:
                      - manual
                    Location:
                      Page: 1
                      Top: 200
                      Left: 200
                    Dimensions:
                      Width: 200
                      Height: 200
                  - Type: signingField
                    ExternalReference: myBeidField
                    FieldId: signme
                    SigningMethods:
                      - beid
                    Location:
                      Page: 2
                      Top: 200
                      Left: 200
                    Dimensions:
                      Width: 200
                      Height: 200
                ProofCorrelationId: string
                DocumentOptions:
                  targetType: application/pdf
                  pdfOptions:
                    targetFormat: pdfa1a
                  base64data: string
                  contentType: application/pdf
            pdf-base64:
              summary: PDF document with two signing fields (Base64, application/json)
              value:
                Name: string
                Language: en
                ExternalReference: string
                Elements:
                  - Type: signingField
                    ExternalReference: myManualField
                    SigningMethods:
                      - manual
                    Location:
                      Page: 1
                      Top: 200
                      Left: 200
                    Dimensions:
                      Width: 200
                      Height: 200
                  - Type: signingField
                    ExternalReference: myBeidField
                    FieldId: signme
                    SigningMethods:
                      - beid
                    Location:
                      Page: 2
                      Top: 200
                      Left: 200
                    Dimensions:
                      Width: 200
                      Height: 200
                ProofCorrelationId: string
                DocumentOptions:
                  targetType: application/pdf
                  pdfOptions:
                    targetFormat: pdfa1a
                  base64data: string
                  contentType: application/pdf
            async-keep-signatures:
              summary: Asynchronous upload preserving existing signatures and fields
              value:
                name: string
                language: en
                externalReference: string
                documentOptions:
                  targetType: application/pdf
                  contentType: application/pdf
                  pdfOptions:
                    targetFormat: pdf
                    pdfErrorHandling: detectfixwarn
                  KeepSignatures: false
                  KeepSigningFields: false
                  KeepFormFields: false
                  base64data: string
        multipart/form-data:
          schema:
            type: object
            required:
              - Document
              - Parameters
            properties:
              Parameters:
                allOf:
                  - $ref: '#/components/schemas/CreateDocument'
                  - type: object
                    properties:
                      DocumentOptions:
                        $ref: '#/components/schemas/CreateDocument.DocumentOptions'
              Document:
                description: Multipart attached document
                type: string
                format: binary
              Representation:
                description: Multipart attached representation
                type: string
                format: binary
          encoding:
            document:
              contentType: >-
                application/msword,
                application/vnd.openxmlformats-officedocument.wordprocessingml.document,
                application/pdf, text/plain, application/xml
            representation:
              contentType: application/pdf
    ConfirmDocumentActionsRequest:
      description: Actions to be performed on Draft document with IsActionNeeded flag
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DocumentActions'
          examples:
            keep-nothing:
              summary: Discard detected signatures and fields
              value:
                KeepSignatures: false
                KeepSigningFields: false
                KeepFormFields: false
    SetProofOnDocumentLocationExternalV3Demand:
      description: Set the 'External' Proof for the Document's Location
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - LocationId
              - Name
              - Type
              - Content
            properties:
              LocationId:
                allOf:
                  - $ref: '#/components/schemas/Guid'
                  - type: object
                description: The unique identifier of the location
              Name:
                type: string
                description: The name of the proof
              Description:
                type: string
                description: The description of the proof
              Type:
                type: string
                description: The type of the proof
                enum:
                  - SIGNATURE_CERTIFICATE
                  - SIGNATURE_CERTIFICATE_CHAIN
                  - SIGNATURE_CERTIFICATE_CRL
                  - SIGNED_PDF
                  - TIME_STAMP_CERTIFICATE
                  - TIME_STAMP_CERTIFICATE_CHAIN
                  - TIME_STAMP_CERTIFICATE_CRL
                  - OTHER
              Content:
                type: string
                description: The content of the proof in base64 encoded version
              IpAddress:
                type: string
                description: The ip address
