> ## 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 Colleagues By Source

> Gets the persons working in the same company as the logged on user.

The list of person could be retrieved from the history list, the diary view list, or from all sources.
NsApiSlow threshold: 2000 ms.



## OpenAPI

````yaml /openapi/agent/openapi-v3-PersonAgent.json post /api/v1/Agents/Person/GetColleaguesBySource
openapi: 3.0.0
info:
  version: v1-Agents
  title: SuperOffice Agent API v1
  description: SuperOffice Agent API - PersonAgent
  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/Person/GetColleaguesBySource:
    post:
      tags:
        - Person_Agent
      summary: Get Colleagues By Source
      description: "Gets the persons working in the same company as the logged on user.\n\nThe list of person could be retrieved from the history list, the diary view list, or from all sources.\r\nNsApiSlow threshold: 2000 ms."
      operationId: v1PersonAgent_GetColleaguesBySource
      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.PersonCarriers.GetColleaguesBySourceRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.PersonCarriers.GetColleaguesBySourceRequest
          application/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.PersonCarriers.GetColleaguesBySourceRequest
          text/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.PersonCarriers.GetColleaguesBySourceRequest
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.PersonCarriers.GetColleaguesBySourceRequest
          application/json-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.PersonCarriers.GetColleaguesBySourceRequest
          application/merge-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.PersonCarriers.GetColleaguesBySourceRequest
        description: SourceType, Count
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SuperOffice.CRM.Services.Person'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SuperOffice.CRM.Services.Person'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SuperOffice.CRM.Services.Person'
            text/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SuperOffice.CRM.Services.Person'
            application/json-patch+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SuperOffice.CRM.Services.Person'
            application/merge-patch+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SuperOffice.CRM.Services.Person'
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.WebApi.v1.Carriers.PersonCarriers.GetColleaguesBySourceRequest:
      description: >-
        GetColleaguesBySource: Gets the persons working in the same company as
        the logged on user. The list of person could be retrieved from the
        history list, the diary view list, or from all sources.
      type: object
      properties:
        SourceType:
          enum:
            - Unknown
            - History
            - DiaryViewList
            - Department
            - All
          type: string
        Count:
          format: int32
          type: integer
    SuperOffice.CRM.Services.Person:
      description: "Carrier object for Person.\r\nServices for the Person Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IPersonAgent\">Person Agent</see>."
      type: object
      properties:
        Position:
          description: >-
            The position. This is a predefined SuperOffice value, different from
            Title
          type: string
        PersonId:
          format: int32
          description: Primary key
          type: integer
        Mrmrs:
          description: e.g. Mrs   sex_title
          type: string
        Firstname:
          description: First name
          type: string
        Lastname:
          description: Last name
          type: string
        MiddleName:
          description: Middle name or 'van' etc.
          type: string
        Title:
          description: Title
          type: string
        Description:
          description: Info text/description on person.
          type: string
        Email:
          description: First email on contact person.
          type: string
        FullName:
          description: >-
            Get the persons full name (internal name used in clients for
            employees).
          type: string
        DirectPhone:
          description: Returns the direct phone that belong to the contact person.
          type: string
        FormalName:
          description: >-
            Get formal name for a person, as used in labels. (Full name + person
            title + academic title)
          type: string
        CountryId:
          format: int32
          description: Country
          type: integer
        ContactId:
          format: int32
          description: Owning contact ID
          type: integer
        ContactName:
          description: The persons company name
          type: string
        Retired:
          format: int32
          description: >-
            1 = the user is retired and should have no rights, not appear in
            lists, etc.
          type: integer
        Rank:
          format: int32
          description: Display sort sequence for default sort order
          type: integer
        ActiveInterests:
          format: int32
          description: >-
            Number of records in pintr table; select count(*) from pintr pi
            where pi.person_id = this.person_id == activeInterests is always
            true
          type: integer
        ContactDepartment:
          description: The persons contact department
          type: string
        ContactCountryId:
          format: int32
          description: The persons contact country id
          type: integer
        ContactOrgNr:
          description: The persons contact organization number
          type: string
        FaxPhone:
          description: Returns the fax phone that belong to the contact person.
          type: string
        MobilePhone:
          description: Returns the mobile phone that belong to the contact person.
          type: string
        ContactPhone:
          description: Returns the direct phone that belong to the persons contact.
          type: string
        AssociateName:
          description: Name of the person's owner
          type: string
        AssociateId:
          format: int32
          description: Id of the item's owner (Associate id)
          type: integer
        UsePersonAddress:
          description: If 1, use person's address for mailing instead of company address
          type: boolean
        ContactFax:
          description: Actual phone number as eneterd by the user
          type: string
        Kanafname:
          description: Kana first name, used in Japanese versions only
          type: string
        Kanalname:
          description: Kana last name, used in Japanese versions only
          type: string
        Post1:
          description: Postal address, used in Japanese versions only
          type: string
        Post2:
          description: Postal address, used in Japanese versions only
          type: string
        Post3:
          description: Postal address, used in Japanese versions only
          type: string
        EmailName:
          description: E-mail description
          type: string
        ContactFullName:
          description: Company full name + department
          type: string
        ActiveErpLinks:
          format: int32
          description: How many active ERP links are there for this person?
          type: integer
        TicketPriorityId:
          format: int32
          description: Ticket priority ID
          type: integer
        SupportLanguageId:
          format: int32
          description: Support priority ID
          type: integer
        SupportAssociateId:
          format: int32
          description: Our support contact for this person
          type: integer
        CategoryName:
          description: The category list item name
          type: string
        PersonNumber:
          description: Alphanumeric user field
          type: string
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Security.TableRight:
      description: "Wraps a table right together with an explanatory reason.\r\nCode can indicate why access is restricted."
      type: object
      properties:
        Mask:
          type: string
        Reason:
          type: string
    SuperOffice.CRM.Security.FieldProperty:
      description: >-
        Class holding properties like field length, field type about a field in
        the carrier.
      type: object
      properties:
        FieldRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldRight'
        FieldType:
          type: string
        FieldLength:
          format: int32
          description: ''
          type: integer
    SuperOffice.CRM.Security.FieldRight:
      description: "Wraps the field right together with an explanatory reason.\r\nAlso adds logical operators to the field rights so that they can be easily combined."
      type: object
      properties:
        Mask:
          type: string
        Reason:
          type: string

````

## Related topics

- [SuperOffice.WebApi.Data.Person GetColleaguesBySourceRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.Person_GetColleaguesBySourceRequest.md)
- [NSPersonAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSPersonAgent.md)
- [SuperOffice.WebApi.Agents.PersonAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.PersonAgent.md)
- [SuperOffice.WebApi.Agents.IPersonAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IPersonAgent.md)
- [Get Colleagues](/en/api/reference/restful/agent/person_agent/get-colleagues.md)
- [Get Colleagues By Department](/en/api/reference/restful/agent/person_agent/get-colleagues-by-department.md)
