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

# Test the connection with the provider

> Makes one real call to the provider with the saved sign-in details. On success the connection becomes `Callable` and the provider's setup data (its groups and payment sources) is read in the background. On failure `messageToken` says why. Repeated failed sign-ins can lock the account on the provider's side, so correct the details before testing again.



## OpenAPI

````yaml /api-reference/specs/integrations.json post /connections/{connectionId}/test
openapi: 3.0.1
info:
  title: Integrations Service
  description: Integrations API for FlowPayroll
  version: v1
servers:
  - url: https://api.sandbox.flowpayroll.ai/v1/integrations
security:
  - X-Auth-Token: []
tags:
  - name: Providers
    description: >-
      The providers Flow Payroll can send to, what each can do, and the sign-in
      details it needs.
  - name: Connections
    description: >-
      Your organisation's provider accounts: create one, save its sign-in
      details, test it, pause it, disconnect it or remove it.
  - name: Scheme links
    description: >-
      Which pension scheme sends through which connection. Linking is the
      opt-in: nothing is sent for a scheme until it is linked.
  - name: Activity
    description: >-
      Every submission to a provider and every read from it, with status,
      attempts and the provider reference. Retry what failed, cancel what has
      not gone yet.
  - name: Provider data
    description: >-
      How fresh the data read from the provider is, and how to refresh it on
      demand.
  - name: Initial import
    description: >-
      Read everything the provider already holds for the employer, so Flow
      Payroll starts in step with it.
paths:
  /connections/{connectionId}/test:
    post:
      tags:
        - Connections
      summary: Test the connection with the provider
      description: >-
        Makes one real call to the provider with the saved sign-in details. On
        success the connection becomes `Callable` and the provider's setup data
        (its groups and payment sources) is read in the background. On failure
        `messageToken` says why. Repeated failed sign-ins can lock the account
        on the provider's side, so correct the details before testing again.
      operationId: TestConnection
      parameters:
        - name: connectionId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestConnectionResponseResponseBody'
components:
  schemas:
    TestConnectionResponseResponseBody:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          $ref: '#/components/schemas/TestConnectionResponseContentResponse'
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
          nullable: true
      additionalProperties: false
    MessageWithTokenResponse:
      type: object
      properties:
        text:
          type: string
        token:
          type: string
        tokenArguments:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssueArgument'
          nullable: true
      additionalProperties: false
    TestConnectionResponseContentResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TestConnectionResponse'
        metadata:
          $ref: '#/components/schemas/ContentMetadataResponse'
      additionalProperties: false
    ValidationIssue:
      type: object
      properties:
        field:
          type: string
        reason:
          type: string
        reasonToken:
          type: string
        reasonTokenArguments:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssueArgument'
          nullable: true
      additionalProperties: false
    ValidationIssueArgument:
      type: object
      properties:
        name:
          type: string
        value:
          nullable: true
      additionalProperties: false
    TestConnectionResponse:
      type: object
      properties:
        success:
          type: boolean
        messageToken:
          type: string
          description: >-
            Stable, provider-agnostic reason code. Branch on this rather than on
            the accompanying message, which is default English intended for
            display and may be reworded. Use the token as an i18n lookup key.


            - `provider_rate_limited`: The provider asked us to slow down.
            Sending carries on automatically in a few minutes.

            - `provider_authentication_failed`: The provider rejected the
            sign-in details. Re-enter them on the connection, then try again.

            - `provider_validation_failed`: The provider rejected the submission
            because some of the details did not pass its checks.

            - `submission_incomplete`: Nothing was sent: some details the
            provider needs are missing. Fix the ones listed, then send again.

            - `provider_unavailable`: The provider could not be reached. It is
            retried automatically.

            - `connection_not_callable`: This connection is not ready to use.
            Finish connecting it, then test it, before sending.

            - `connection_circuit_open`: Sending is paused after repeated
            failures from the provider, and starts again automatically in about
            ten minutes.

            - `provider_account_locked`: The provider has locked this account.
            Sign in to the provider directly to unlock it, then test the
            connection.

            - `provider_partial_failure`: The provider accepted some of the
            workers and rejected the rest.

            - `provider_capability_unsupported`: The connected provider does not
            support this kind of submission.

            - `provider_circuit_open`: The provider is not responding for anyone
            right now. Sending is paused and starts again automatically once it
            recovers.

            - `provider_result_overdue`: The provider accepted this but has not
            returned a result in two days. Check it with the provider, then
            retry or cancel.

            - `provider_call_failed`: The provider did not complete the request.


            Treat an unrecognised token as a generic failure: the list grows.
          nullable: true
        message:
          type: string
          nullable: true
      additionalProperties: false
    ContentMetadataResponse:
      type: object
      properties:
        dateFormat:
          type: string
        dateTimeFormat:
          type: string
        paginationToken:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    X-Auth-Token:
      type: apiKey
      description: FlowPayroll JWT (raw token, no Bearer prefix)
      name: X-Auth-Token
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.