> ## 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 Default Order By From Desired Columns

> Calculate the default orderby columns for a given provider and a set of desired columns.

This is the same algorithm that is used by the Find service method.
NsApiSlow threshold: 5000 ms.



## OpenAPI

````yaml /openapi/agent/openapi-v3-FindAgent.json post /api/v1/Agents/Find/GetDefaultOrderByFromDesiredColumns
openapi: 3.0.0
info:
  version: v1-Agents
  title: SuperOffice Agent API v1
  description: SuperOffice Agent API - FindAgent
  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/Find/GetDefaultOrderByFromDesiredColumns:
    post:
      tags:
        - Find_Agent
      summary: Get Default Order By From Desired Columns
      description: "Calculate the default orderby columns for a given provider and a set of desired columns.\n\nThis is the same algorithm that is used by the Find service method.\r\nNsApiSlow threshold: 5000 ms."
      operationId: v1FindAgent_GetDefaultOrderByFromDesiredColumns
      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.FindCarriers.GetDefaultOrderByFromDesiredColumnsRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.FindCarriers.GetDefaultOrderByFromDesiredColumnsRequest
          application/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.FindCarriers.GetDefaultOrderByFromDesiredColumnsRequest
          text/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.FindCarriers.GetDefaultOrderByFromDesiredColumnsRequest
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.FindCarriers.GetDefaultOrderByFromDesiredColumnsRequest
          application/json-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.FindCarriers.GetDefaultOrderByFromDesiredColumnsRequest
          application/merge-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.FindCarriers.GetDefaultOrderByFromDesiredColumnsRequest
        description: ProviderName, DesiredColumns
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.ArchiveLists.ArchiveOrderByInfo
            text/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.ArchiveLists.ArchiveOrderByInfo
            application/xml:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.ArchiveLists.ArchiveOrderByInfo
            text/xml:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.ArchiveLists.ArchiveOrderByInfo
            application/json-patch+json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.ArchiveLists.ArchiveOrderByInfo
            application/merge-patch+json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.ArchiveLists.ArchiveOrderByInfo
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.WebApi.v1.Carriers.FindCarriers.GetDefaultOrderByFromDesiredColumnsRequest:
      description: >-
        GetDefaultOrderByFromDesiredColumns: Calculate the default orderby
        columns for a given provider and a set of desired columns. This is the
        same algorithm that is used by the Find service method.
      type: object
      properties:
        ProviderName:
          type: string
        DesiredColumns:
          type: array
          items:
            type: string
    SuperOffice.CRM.ArchiveLists.ArchiveOrderByInfo:
      description: >-
        This class carries information about an ordering criterion for an
        archive
      type: object
      properties:
        Name:
          description: >-
            Programmatic name of the column to order by, semantically the same
            as the ArchiveColumnInfo
            {SuperOffice.CRM.ArchiveLists.ArchiveColumnInfo.Name}.
          type: string
        Direction:
          description: Direction to order
          enum:
            - ASC
            - DESC
          type: string

````

## Related topics

- [Get Default Order By](/en/api/reference/restful/agent/find_agent/get-default-order-by.md)
- [SuperOffice.WebApi.Data.Find GetDefaultOrderByFromDesiredColumnsRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.Find_GetDefaultOrderByFromDesiredColumnsRequest.md)
- [NSFindAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSFindAgent.md)
- [SuperOffice.WebApi.Agents.IFindAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IFindAgent.md)
- [SuperOffice.WebApi.Agents.FindAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.FindAgent.md)
- [Get Default Desired Columns](/en/api/reference/restful/agent/find_agent/get-default-desired-columns.md)
