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

# Get the bank connection details

> Returns all the information about bank connection `bank_external_id` for consumer `consumer_id`.



## OpenAPI

````yaml /program/api/openapi/legacy/1.1.2/injector.json get /consumers/{consumer_id}/banks/{bank_external_id}
openapi: 3.1.0
info:
  title: Thub API
  description: >+

    ## Welcome to PayLead Thub API Documentation!
        
    - Release Version: **None**

    - API Version: **1.1.2**


    This documentation is designed to help you go through the phases of

    basic implementation, and help you understand the basic steps to follow to

    reach your objectives via our API.


    ## Getting Started


    Our API is a RESTful API.


    A RESTful API explicitly takes advantage of HTTP methodologies defined by

    the RFC 2616 protocol. We use:


    - `GET` to retrieve a resource


    - `PUT`  to change the state of or update a resource, which can be an

    object, file or block


    - `POST` to create that resource


    - `DELETE` to remove it



    You can use the API to access all endpoints, such as the Transactions

    endpoint to post transactions, or the banks endpoint to get the list of

    available banks.



    The API is organized around REST. JSON is returned by all API responses,

    including errors. In all API requests, you must set `the content-type` HTTP

    header to application/JSON. All API requests must be made over HTTPS. Calls

    made over HTTP will fail.


    To access and work with our API, make sure you have been provided the

    following elements by our Ops team:


    - A developers Shift account 

    - Defined a bank mapping



    ## Versioning


    Our API supports versioning, so be sure to set the right version in the

    header, using the `X-Api-Version`



    ex: `X-Api-Version = 1.0.0`


    ## Base URL


    All API URLs referenced in this documentation start with the following base
    URL: `https://api.sandbox.paylead.fr/`


    ## 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 | Unauthorized          | Missing API Key or
    invalid                                                                        
    |

    | 403 | Forbidden             | Access is
    forbidden                                                                               
    |

    | 404 | Not Found             | Resource does not
    exist                                                                           
    |

    | 405 | Method not allowed    | he method is not allowed for the requested
    URL.                                                    |

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

    | 500 | Internal server error | Something went wrong with the PayLead
    API                                                          |

    | 503 | Internal server error | Some service are
    unavailable                                                                      
    |

  version: 1.1.2
servers: []
security: []
tags:
  - name: Health
    description: Route used to health-check the app
  - name: Consumers
    description: Routes used to query consumers resources
  - name: Bank
    description: Routes used to query banks resources
  - name: Bank Connection
    description: Routes used to query banks connections resources
  - name: Bank Account
    description: Routes used to query bank account resources
  - name: Bulk Transaction
    description: Routes used to create transactions with a bulk insert
  - name: Transaction
    description: >-
      Routes used to query transactions resources based on the transaction id or
      unique id that you defined
  - name: Atomic Transaction
    description: >-
      Routes used to query transactions resources based on the bank connection
      id, bank account id and transaction id
paths:
  /consumers/{consumer_id}/banks/{bank_external_id}:
    get:
      tags:
        - Bank Connection
      summary: Get the bank connection details
      description: >-
        Returns all the information about bank connection `bank_external_id` for
        consumer `consumer_id`.
      operationId: get--consumers-consumer_id-banks-bank_external_id
      parameters:
        - name: bank_external_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              Unique ID of the bank connection that you have registered when the
              bank connection was created.
            title: Bank External Id
          description: >-
            Unique ID of the bank connection that you have registered when the
            bank connection was created.
        - name: consumer_id
          in: path
          required: true
          schema:
            type: string
            minLength: 2
            maxLength: 100
            description: >-
              Unique ID of the consumer that you have registered when the user
              was onboarded.
            title: Consumer Id
          description: >-
            Unique ID of the consumer that you have registered when the user was
            onboarded.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankConnectionOutSchema'
        '400':
          description: Bad Request
          content:
            application/json:
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                message: Missing or invalid Authorization Header.
        '403':
          description: Forbidden
          content:
            application/json:
              example:
                message: You don’t have permission to access this resource.
        '404':
          description: Not Found
          content:
            application/json:
              example:
                message: Resource Not Found
        '409':
          description: Conflict
          content:
            application/json:
              example:
                message: Conflict error
        '500':
          description: Internal Server Error
          content:
            application/json:
              example:
                message: Internal Server Error
      security:
        - Authentication Token: []
components:
  schemas:
    BankConnectionOutSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        bank_id:
          type: string
          format: uuid
          title: Bank Id
      type: object
      required:
        - id
        - name
        - bank_id
      title: BankConnectionOutSchema
  securitySchemes:
    Authentication Token:
      type: http
      description: |-

        Enter your "Injector" API Key

        See Authentication section for more information
            
      scheme: bearer

````