> ## 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 My Opportunities

> Returning the opportunities (open sales) belonging to the user currently logged on

NsApiSlow threshold: 2000 ms.



## OpenAPI

````yaml /openapi/agent/openapi-v3-SaleAgent.json post /api/v1/Agents/Sale/GetMyOpportunities
openapi: 3.0.0
info:
  version: v1-Agents
  title: SuperOffice Agent API v1
  description: SuperOffice Agent API - SaleAgent
  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/Sale/GetMyOpportunities:
    post:
      tags:
        - Sale_Agent
      summary: Get My Opportunities
      description: >-
        Returning the opportunities (open sales) belonging to the user currently
        logged on


        NsApiSlow threshold: 2000 ms.
      operationId: v1SaleAgent_GetMyOpportunities
      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.SaleCarriers.GetMyOpportunitiesRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.SaleCarriers.GetMyOpportunitiesRequest
          application/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.SaleCarriers.GetMyOpportunitiesRequest
          text/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.SaleCarriers.GetMyOpportunitiesRequest
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.SaleCarriers.GetMyOpportunitiesRequest
          application/json-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.SaleCarriers.GetMyOpportunitiesRequest
          application/merge-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.SaleCarriers.GetMyOpportunitiesRequest
        description: Count
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SuperOffice.CRM.Services.Sale'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SuperOffice.CRM.Services.Sale'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SuperOffice.CRM.Services.Sale'
            text/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SuperOffice.CRM.Services.Sale'
            application/json-patch+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SuperOffice.CRM.Services.Sale'
            application/merge-patch+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SuperOffice.CRM.Services.Sale'
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.WebApi.v1.Carriers.SaleCarriers.GetMyOpportunitiesRequest:
      description: >-
        GetMyOpportunities: Returning the opportunities (open sales) belonging
        to the user currently logged on
      type: object
      properties:
        Count:
          format: int32
          type: integer
    SuperOffice.CRM.Services.Sale:
      description: "Carrier object for Sale.\r\nServices for the Sale Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.ISaleAgent\">Sale Agent</see>."
      type: object
      properties:
        ContactName:
          description: Contact name
          type: string
        SaleDate:
          format: date-time
          description: (expected / lost / won) sales date
          type: string
        SaleId:
          format: int32
          description: Primary key
          type: integer
        Probability:
          format: int32
          description: Actual probability, may differ from the one in the list
          type: integer
        Title:
          description: Sale heading (short description?)
          type: string
        Amount:
          format: double
          description: Total sale amount
          type: number
        Currency:
          description: Currency the sale was made in.
          type: string
        ProjectName:
          description: Project name
          type: string
        AssociateFullName:
          description: The sale's owner
          type: string
        Description:
          description: The sales description
          type: string
        Status:
          description: The sale's status, indicating wether the sale is open, sold or lost.
          enum:
            - Unknown
            - Open
            - Sold
            - Lost
            - Stalled
            - SaintAll
          type: string
        WeightedAmount:
          format: double
          description: The weighted amount ( amount *  probability / 100)
          type: number
        ProjectId:
          format: int32
          description: Optional project reference
          type: integer
        EarningPercent:
          format: double
          description: Earning as percent of total
          type: number
        Earning:
          format: double
          description: Earning on sale
          type: number
        ContactId:
          format: int32
          description: Optional contact reference
          type: integer
        AssociateId:
          format: int32
          description: The sale's owner id
          type: integer
        PersonId:
          format: int32
          description: The sale's contact persons id
          type: integer
        SaleTypeId:
          format: int32
          description: The sale's type id
          type: integer
        SaleTypeName:
          description: The sale's type name
          type: string
        PersonFullName:
          description: The name of the person this sale belongs to.
          type: string
        Completed:
          description: >-
            The Sale completed state. The completed state is either Started or
            Completed. NotStarted is treated as Started. The value maps to the
            Done database field.
          enum:
            - Unknown
            - NotStarted
            - Started
            - Completed
          type: string
        ActiveErpLinks:
          format: int32
          description: The number of active erp links
          type: integer
        NextDueDate:
          format: date-time
          description: >-
            Next due date, this is a denormalization of 'closest future activity
            date, or most recent if no future activities'. Maintained by the
            system, but very convenient for searching.
          type: string
        Number:
          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.Sale GetMyOpportunitiesRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.Sale_GetMyOpportunitiesRequest.md)
- [NSSaleAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSSaleAgent.md)
- [SuperOffice.WebApi.Agents.ISaleAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.ISaleAgent.md)
- [SuperOffice.WebApi.Agents.SaleAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.SaleAgent.md)
- [Get My Owner](/en/api/reference/restful/agent/person_agent/get-my-owner.md)
- [Get My Person](/en/api/reference/restful/agent/person_agent/get-my-person.md)
