> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get For Selection

> Gets a migration summary for documents in the provided selection

NsApiSlow threshold: 5000 ms.
<para />## Online Restricted: ## The DocumentMigration agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.



## OpenAPI

````yaml /openapi/agent/openapi-v3-DocumentMigrationAgent.json post /api/v1/Agents/DocumentMigration/GetForSelection
openapi: 3.0.0
info:
  version: v1-Agents
  title: SuperOffice Agent API v1
  description: SuperOffice Agent API - DocumentMigrationAgent
  contact:
    name: SuperOffice DevNet
    url: https://docs.superoffice.com/en/api/index.html
    email: sdk@superoffice.com
servers:
  - url: http://localhost:56350
  - url: https://localhost:56350
security: []
tags: []
externalDocs:
  description: >-
    The SuperOffice DevNet Community has more documentation, examples, and
    discussion forums.
  url: https://community.superoffice.com/en/developer/
paths:
  /api/v1/Agents/DocumentMigration/GetForSelection:
    post:
      tags:
        - DocumentMigration_Agent
      summary: Get For Selection
      description: "Gets a migration summary for documents in the provided selection\n\nNsApiSlow threshold: 5000 ms.\r\n<para />## Online Restricted: ## The DocumentMigration agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps."
      operationId: v1DocumentMigrationAgent_GetForSelection
      parameters:
        - name: $select
          in: query
          description: >-
            Optional comma separated list of properties to include in the
            result. Other fields are then nulled out to reduce payload size:
            "Name,department,category". Default = show all fields.
          required: false
          schema:
            type: string
        - name: Accept-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code.
          required: false
          schema:
            type: string
        - name: SO-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code. Overrides Accept-Language value.
          required: false
          schema:
            type: string
        - name: SO-Culture
          in: header
          description: >-
            Number, date formatting in a specified culture (iso2 language) code.
            Partially overrides SO-Language/Accept-Language value. Ignored if no
            Language set.
          required: false
          schema:
            type: string
        - name: SO-TimeZone
          in: header
          description: >-
            Specify the timezone code that you would like date/time responses
            converted to.
          required: false
          schema:
            type: string
        - name: SO-AppToken
          in: header
          description: >-
            The application token that identifies the partner app. Used when
            calling Online WebAPI from a server.
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.DocumentMigrationCarriers.GetForSelectionRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.DocumentMigrationCarriers.GetForSelectionRequest
          application/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.DocumentMigrationCarriers.GetForSelectionRequest
          text/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.DocumentMigrationCarriers.GetForSelectionRequest
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.DocumentMigrationCarriers.GetForSelectionRequest
          application/json-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.DocumentMigrationCarriers.GetForSelectionRequest
          application/merge-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.DocumentMigrationCarriers.GetForSelectionRequest
        description: DocumentPluginId, SelectionId, IncludeEmails
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.DocumentMigrationItemList
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.DocumentMigrationItemList
            application/xml:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.DocumentMigrationItemList
            text/xml:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.DocumentMigrationItemList
            application/json-patch+json:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.DocumentMigrationItemList
            application/merge-patch+json:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.DocumentMigrationItemList
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.WebApi.v1.Carriers.DocumentMigrationCarriers.GetForSelectionRequest:
      description: >-
        GetForSelection: Gets a migration summary for documents in the provided
        selection
      type: object
      properties:
        DocumentPluginId:
          format: int32
          type: integer
        SelectionId:
          format: int32
          type: integer
        IncludeEmails:
          type: boolean
    SuperOffice.CRM.Services.DocumentMigrationItemList:
      description: "Carrier object for DocumentMigrationItemList.\r\nServices for the DocumentMigrationItemList Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IDocumentMigrationAgent\">DocumentMigration Agent</see>."
      type: object
      properties:
        NumDocumentsOmitted:
          format: int32
          description: >-
            Total amount of documents within the selection criteria, which has
            been omitted from the migration.
          type: integer
        NumDocumentsAlreadyMigrated:
          format: int32
          description: Documents already migrated to the requested documentplugin.
          type: integer
        Documents:
          description: List of documents to be migrated.
          type: array
          items:
            $ref: >-
              #/components/schemas/SuperOffice.CRM.Services.DocumentMigrationItem
        Associates:
          description: List of associates whose documents will be migrated.
          type: array
          items:
            $ref: >-
              #/components/schemas/SuperOffice.CRM.Services.DocumentMigrationAssociate
    SuperOffice.CRM.Services.DocumentMigrationItem:
      description: "Class used to summarize all document-properties relevant for migrating documents.\r\n<para />\r\nCarrier object for DocumentMigrationItem.\r\nServices for the DocumentMigrationItem Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IDocumentMigrationAgent\">DocumentMigration Agent</see>."
      type: object
      properties:
        DocumentId:
          format: int32
          description: Primary key
          type: integer
        ContactId:
          format: int32
          description: Contact ID of owning contact, may be 0
          type: integer
        PersonId:
          format: int32
          description: Person ID of person the appointment is with, may be 0
          type: integer
        SaleId:
          format: int32
          description: Owning sale, if any (may be 0)
          type: integer
        ProjectId:
          format: int32
          description: ID of project referred to, may be 0
          type: integer
        DocTmplId:
          format: int32
          description: Primary key
          type: integer
        AssociateId:
          format: int32
          description: ID of associate whose diary the appointment is in, REQUIRED
          type: integer
        UserGroupId:
          format: int32
          description: Primary key
          type: integer
        VisibleForId:
          format: int32
          description: Primary key
          type: integer
    SuperOffice.CRM.Services.DocumentMigrationAssociate:
      description: "Class used to map relationship between AssociateId and the user's email.\r\n<para />\r\nCarrier object for DocumentMigrationAssociate.\r\nServices for the DocumentMigrationAssociate Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IDocumentMigrationAgent\">DocumentMigration Agent</see>."
      type: object
      properties:
        AssociateId:
          format: int32
          description: Primary key
          type: integer
        EmailAddress:
          description: The address itself
          type: string

````

## Related topics

- [Get Selection Entity](/en/api/reference/restful/rest/selection/get-selection-entity.md)
- [Get Selection Summaries](/en/api/reference/restful/agent/selection_agent/get-selection-summaries.md)
- [Get Selection Category](/en/api/reference/restful/rest/list_selectioncategory/get-selection-category.md)
- [Get Selection For Find](/en/api/reference/restful/agent/selection_agent/get-selection-for-find.md)
