> ## 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.

# Test Connection

> Used by the Admin clients.

Testing if the connection data is sufficient to get a connection with the ERP system. The Connector should try to do some operations to check if the connection has sufficient rights to run. The connection has not been created yet. TestConnection is called without InitializeConnector being called first.
NsApiSlow threshold: 5000 ms.



## OpenAPI

````yaml /openapi/agent/openapi-v3-QuoteAgent.json post /api/v1/Agents/Quote/TestConnection
openapi: 3.0.0
info:
  version: v1-Agents
  title: SuperOffice Agent API v1
  description: SuperOffice Agent API - QuoteAgent
  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/Quote/TestConnection:
    post:
      tags:
        - Quote_Agent
      summary: Test Connection
      description: "Used by the Admin clients.\n\nTesting if the connection data is sufficient to get a connection with the ERP system. The Connector should try to do some operations to check if the connection has sufficient rights to run. The connection has not been created yet. TestConnection is called without InitializeConnector being called first.\r\nNsApiSlow threshold: 5000 ms."
      operationId: v1QuoteAgent_TestConnection
      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.QuoteCarriers.TestConnectionRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.QuoteCarriers.TestConnectionRequest
          application/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.QuoteCarriers.TestConnectionRequest
          text/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.QuoteCarriers.TestConnectionRequest
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.QuoteCarriers.TestConnectionRequest
          application/json-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.QuoteCarriers.TestConnectionRequest
          application/merge-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.QuoteCarriers.TestConnectionRequest
        description: ConnectorName, ConnectionData
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.PluginResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.PluginResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.PluginResponse'
            text/xml:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.PluginResponse'
            application/json-patch+json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.PluginResponse'
            application/merge-patch+json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.PluginResponse'
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.WebApi.v1.Carriers.QuoteCarriers.TestConnectionRequest:
      description: >-
        TestConnection: Used by the Admin clients. Testing if the connection
        data is sufficient to get a connection with the ERP system. The
        Connector should try to do some operations to check if the connection
        has sufficient rights to run. The connection has not been created yet.
        TestConnection is called without InitializeConnector being called first.
      type: object
      properties:
        ConnectorName:
          type: string
        ConnectionData:
          type: object
          additionalProperties:
            type: string
    SuperOffice.CRM.Services.PluginResponse:
      description: "PluginResponse exists to be able to respond with more than just a true/false, but also an explanation. Such an explanation can be displayed on for instance a disabled “Place Order” button.\r\n<para />\r\nCarrier object for PluginResponse.\r\nServices for the PluginResponse Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IQuoteAgent\">Quote Agent</see>."
      type: object
      properties:
        IsOk:
          description: >-
            Answer to the question / An indication if the operation went well.
            Equivalent to Status != Error
          type: boolean
        UserExplanation:
          description: >-
            A localized explanation to the answer. Text here is displayed to the
            user.
          type: string
        TechExplanation:
          description: Always in English
          type: string
        ErrorCode:
          description: An error code, if available.
          type: string
        Changes:
          $ref: '#/components/schemas/SuperOffice.CRM.Services.ChangedData'
        Status:
          description: >-
            QuoteStatus = Ok / OkWithInfo / Warn / Error. Error implies IsOk =
            false.
          enum:
            - Ok
            - OkWithInfo
            - Warning
            - Error
          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.Services.ChangedData:
      description: "Generic carrier, used in return values to indicate what data NetServer has changed 'behind the scenes' so clients can know what to update\r\n<para />\r\nCarrier object for ChangedData.\r\nServices for the ChangedData Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IQuoteAgent\">Quote Agent</see>."
      type: object
      properties:
        AddedRecords:
          description: Ids of added records.
          type: array
          items:
            $ref: '#/components/schemas/SuperOffice.CRM.Services.ChangedDataItem'
        UpdatedRecords:
          description: Ids of updated records.
          type: array
          items:
            $ref: '#/components/schemas/SuperOffice.CRM.Services.ChangedDataItem'
        DeletedRecords:
          description: Ids of deleted records.
          type: array
          items:
            $ref: '#/components/schemas/SuperOffice.CRM.Services.ChangedDataItem'
        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.Services.ChangedDataItem:
      description: "Tablename/recordid pair used to refer to records\r\n<para />\r\nCarrier object for ChangedDataItem.\r\nServices for the ChangedDataItem Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IQuoteAgent\">Quote Agent</see>."
      type: object
      properties:
        Tablename:
          description: Name of table, standardized to lowercase
          type: string
        RecordId:
          format: int32
          description: Id of record, should never be 0
          type: integer
        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.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

- [Test Connection By Config](/en/api/reference/restful/agent/erpsync_agent/test-connection-by-config.md)
- [Test Connection By Id](/en/api/reference/restful/agent/erpsync_agent/test-connection-by-id.md)
- [SuperOffice.WebApi.Data.Quote TestConnectionRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.Quote_TestConnectionRequest.md)
- [SuperOffice.WebApi.Data.ErpSync TestConnectionByConfigRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.ErpSync_TestConnectionByConfigRequest.md)
- [SuperOffice.WebApi.Data.ErpSync TestConnectionByIdRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.ErpSync_TestConnectionByIdRequest.md)
- [Setting up ERP Sync connection](/en/api/plugins/erp-connectors/setup-connection.md)
