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

# Gets Bank Synchronization Statuses

> Retrieves all bank synchronization statuses for all consumers of your program:
- UNKNOWN: The status is unknown, most of the time because the consumer hasn't synced his/her account yet.
- DISABLED: The synchronization has been disabled for this connection.
- ERROR: Synchronization error (bad credentials and/or consumer has an action to make on his/her bank website side).
- CHALLENGE_REQUIRED: Consumer has to input a special code sent by his/her bank to acknowledge the synchronization.
- SCRAPPING: The consumer's bank account is being synchronized.
- SUCCESS: The consumer's bank account synchronization succeeded.
- SCA_REQUIRED: A complete SCA process must be performed by updating the connection.
- SCA_REQUIRED_AND_OTP: A complete SCA process must be performed by updating the connection.
- WEBAUTH_REQUIRED: A complete authentication process is required by updating the connection via redirect.
- WRONG_PASS: The consumer has to input their credentials because they are invalid or obsolete.
- ACTION_NEEDED: The consumer has to perform a special action in their bank website. More details are available in "error_message".




## OpenAPI

````yaml /program/api/openapi/legacy/1.1.4/connector.json get /connections-statuses
openapi: 3.0.2
info:
  description: >
    ## Welcome to PayLead API Documentation !

    With this documentation, we will help you go through the phases of

    basic implementation, and help you understand the basic steps to let you
    reach your objectives through our API.

    ## Versioning

    Our API supports versioning, so be sure to set the right version in the
    header, using the Client-Api-Version field :


    ex : X-Api-Version = 1.0.0

    ## Response code

    Our API returns standard HTTP response codes to indicate success or failure
    of the API requests. For

    errors, we also return a customized error message inside the JSON response.
    You can see the returned

    HTTP status codes below.


    |Code|Title|Description

    |------|------|------|

    |200|OK|Request successful

    |201|Created|Resource successfully created

    |204|No Content|Request successful with no content returned

    |400|Bad Request|Request was unacceptable

    |401|Unauthorised|API key provided is invalid

    |402|Request Failed|Valid parameters but the request failed

    |403|Forbidden|Access is forbidden.

    |404|Not Found|Resource does not exist

    |409|Conflict|The request could not be completed due to a conflict with the
    current state of the target resource

    |429|Too Many Requests|The user has sent too many requests in a given amount
    of time ("rate limiting").

    |500, 502, 503, 504|Server Errors|Something went wrong with the PayLead API


    ## Error handling

    In case of error our API returns errors based on JSON API principles,
    especially for 4xx errors.

    An error response contains an unique id which can be used for investigation.

    In addition, you will find a message explaining the error, a readable code
    and a meta object containing more details.


    You can see an example below.


    >> ~~~~

    >> {

    >>     'errors': {

    >>             'target_account': [

    >>                 {

    >>                 'code': 'FORMAT_ERROR',

    >>                 'message': 'Invalid IBAN; it should be 4-34 characters,
    only upper-case letters and digits.',

    >>                 'meta': {

    >>                     'value': 'SOME-INVALID-IBAN'

    >>                 }

    >>             }

    >>         ]

    >>     },

    >>     'id': '784db0c2-0e87-40d4-aa62-3e801135ccf7'

    >> }

    >> ~~~~

    ## Language — Content Negotiation

    If your program has been configured to support multiple languages, the API
    will respect the `Accept-Language` header as defined in
    [RFC7231](https://tools.ietf.org/html/rfc7231#section-5.3.5).


    For each incoming request, the best language will be selected by matching
    the list of languages accepted by the client with the list of languages
    supported by the program.


    For example, with a header of `Accept-Language: fr-FR,en-GB;q=0.8,en;q=0.3`:

      * If supported languages are `fr-FR, en-GB`, the best match is `fr-FR`;
      * If supported languages are `en-GB, fr-FR`, the best match is `fr-FR`;
      * If supported languages are `fr-BE, nl-BE`, the best match is `fr-BE`;
      * If supported languages are `it-IT, en-US`, the best match is `en-US`;
      * If supported languages are `de-CH, it-CH`, the best match is `de-CH`.


    The selected language will be exposed through the `Content-Language` header.


    *Note:* If some fields haven't been translated yet, they will be returned in
    the program's primary language.
  title: PayLead API
  version: 1.1.4
servers:
  - url: https://api.sandbox.paylead.tech
security:
  - ApiKeyAuth: []
paths:
  /connections-statuses:
    get:
      tags:
        - Bank Synchronization
      summary: Gets Bank Synchronization Statuses
      description: >
        Retrieves all bank synchronization statuses for all consumers of your
        program:

        - UNKNOWN: The status is unknown, most of the time because the consumer
        hasn't synced his/her account yet.

        - DISABLED: The synchronization has been disabled for this connection.

        - ERROR: Synchronization error (bad credentials and/or consumer has an
        action to make on his/her bank website side).

        - CHALLENGE_REQUIRED: Consumer has to input a special code sent by
        his/her bank to acknowledge the synchronization.

        - SCRAPPING: The consumer's bank account is being synchronized.

        - SUCCESS: The consumer's bank account synchronization succeeded.

        - SCA_REQUIRED: A complete SCA process must be performed by updating the
        connection.

        - SCA_REQUIRED_AND_OTP: A complete SCA process must be performed by
        updating the connection.

        - WEBAUTH_REQUIRED: A complete authentication process is required by
        updating the connection via redirect.

        - WRONG_PASS: The consumer has to input their credentials because they
        are invalid or obsolete.

        - ACTION_NEEDED: The consumer has to perform a special action in their
        bank website. More details are available in "error_message".
      parameters:
        - description: Filter by last_successful_sync
          in: query
          name: last_successful_sync
          schema:
            type: string
        - description: the page number
          in: query
          name: page
          required: false
          schema:
            minimum: 1
            type: integer
        - description: the number of elements per page
          in: query
          name: per_page
          required: false
          schema:
            maximum: 100
            minimum: 1
            type: integer
        - description: Sort by given attribute
          in: query
          name: sort
          schema:
            enum:
              - status
              - last_successful_sync
              - '-status'
              - '-last_successful_sync'
            type: string
        - description: Filter by status
          in: query
          name: status
          schema:
            enum:
              - UNKNOWN
              - DISABLED
              - ERROR
              - CHALLENGE_REQUIRED
              - SCRAPPING
              - SUCCESS
              - SCA_REQUIRED
              - WEBAUTH_REQUIRED
              - WRONG_PASS
              - ACTION_NEEDED
              - WAITING_FOR_VALIDATION
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  items:
                    items:
                      $ref: '#/components/schemas/BankConnectionEnrollment'
                    type: array
                  meta:
                    properties:
                      page:
                        type: integer
                      per_page:
                        type: integer
                      total:
                        type: integer
          description: OK
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Not allowed to access the resource
        '404':
          description: Not found
        '405':
          description: Method not allowed
        '422':
          description: Unprocessable Entity
components:
  schemas:
    BankConnectionEnrollment:
      properties:
        bank_id:
          description: Bank unique UUID
          example: 03a7ab14-397d-4df5-a472-ab9b45de175e
          readOnly: true
          type: string
        bank_name:
          description: Name of the bank.
          readOnly: true
          type: string
        connection_status:
          description: Status of scrapping connection to consumer banks
          example: SUCCESS
          readOnly: true
          type: string
        consumer_id:
          description: 'UUID : unique ID of a consumer'
          readOnly: true
          type: string
        error:
          description: String representation of error status
          readOnly: true
          type: string
        error_message:
          description: The description of the error, if available.
          nullable: true
          readOnly: true
          type: string
        first_sync:
          description: Date of first successful sync.
          format: date-time
          readOnly: true
          type: string
        last_successful_sync:
          description: Last successful update
          format: date-time
          readOnly: true
          type: string
        last_sync:
          description: Last attempt of sync
          format: date-time
          readOnly: true
          type: string
        next_try:
          description: Last attempt of sync
          format: date-time
          readOnly: true
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````