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

# Create a registration

> Creates a single registration for the authenticated partner i.e. triggers a workflow to guide the user through the necessary steps to register its organization with Qonto. The response provides a registration ID for tracking the registration progress. 

This endpoint supports existing company registration, new company creation, and Qonto Invoicing onboarding, determined by the `legal_flow` attribute.

<Note>
  For German companies and freelancers, specific schemas are used with 
  adapted requirements.
</Note>




## OpenAPI

````yaml post /register/registrations
openapi: 3.0.3
info:
  title: Onboarding API
  version: '1.0'
  license:
    name: Proprietary
    url: https://qonto.com/terms
servers:
  - url: https://thirdparty-sandbox.staging.qonto.co
    description: Sandbox
  - url: https://onboarding-partners.qonto.com
    description: Production
security:
  - apiKey: []
    qontoPartnerId: []
tags:
  - name: Registrations
    description: Endpoints for Registration resource
  - name: Files
    description: Endpoints for file management throughout the company creation process.
  - name: Webhooks
    description: Endpoints to configure webhook to be notified about registration progress.
paths:
  /register/registrations:
    post:
      tags:
        - Registrations
      summary: Create a registration
      description: >
        Creates a single registration for the authenticated partner i.e.
        triggers a workflow to guide the user through the necessary steps to
        register its organization with Qonto. The response provides a
        registration ID for tracking the registration progress. 


        This endpoint supports existing company registration, new company
        creation, and Qonto Invoicing onboarding, determined by the `legal_flow`
        attribute.


        <Note>
          For German companies and freelancers, specific schemas are used with 
          adapted requirements.
        </Note>
      operationId: registrations/create
      parameters:
        - $ref: '#/components/parameters/X-Qonto-Staging-Token'
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/post-cc'
                - $ref: '#/components/schemas/post-ec'
                - $ref: '#/components/schemas/post-cc-de'
                - $ref: '#/components/schemas/registration-existing-companies-germany'
                - $ref: '#/components/schemas/post-qf'
            examples:
              Company Creation:
                $ref: '#/components/examples/post-cc-example'
              Existing Company:
                $ref: '#/components/examples/post-ec-example'
              German Company Creation:
                $ref: '#/components/examples/post-cc-de-example'
              German Existing Company:
                $ref: '#/components/examples/post-existing-companies-de-example'
              Qonto Invoicing:
                $ref: '#/components/examples/post-qf-example'
      responses:
        '201':
          description: Returns the registration created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  registration:
                    $ref: '#/components/schemas/registration'
        '400':
          $ref: '#/components/responses/400-bad-request'
        '401':
          $ref: '#/components/responses/401-unauthorized'
        '409':
          $ref: '#/components/responses/409-conflict'
        '418':
          $ref: '#/components/responses/418-teapot'
        '422':
          $ref: '#/components/responses/422-unprocessable-entity'
        '500':
          $ref: '#/components/responses/500-internal-servor-error'
      security:
        - apiKey: []
          qontoPartnerId: []
components:
  parameters:
    X-Qonto-Staging-Token:
      name: X-Qonto-Staging-Token
      in: header
      description: >-
        Required only for Sandbox API requests; to get one, please sign up to
        the [Developer Portal](https://developers.qonto.com/).
      schema:
        type: string
  schemas:
    post-cc:
      title: Request payload for Company Creation flow
      type: object
      properties:
        legal_flow:
          type: string
          description: |
            Identifies the type of registration process:
              - `company_creation`: Initiates a new company registration.
              - `existing_company`: Registers an existing company.
          enum:
            - company_creation
        locale:
          type: string
          description: >
            Only a subset is supported from [IETF Language
            Tags](https://en.wikipedia.org/wiki/IETF_language_tag)
          enum:
            - en
            - fr
            - it
            - de
            - es
            - pt
          example: fr
        partner_redirect_url:
          type: string
          description: >
            The URL where the user will be redirected after the registration
            process is completed. 

            If not provided, then the user will be redirected to Qonto's
            application.


            Note: this parameter is allowed only for embed applications.
          example: https://example.com/users/123456/dashboard
          nullable: true
        partner_user:
          type: object
          description: Describes the user that owns the flow on the partner side.
          properties:
            first_name:
              nullable: true
              type: string
              example: John
            last_name:
              nullable: true
              type: string
              example: Doe
            email:
              nullable: true
              type: string
              description: >-
                It should match this regex
                `/\A[\x21-\x39\x41-\x7E]+@[\x21-\x39\x41-\x7E]+\.[\x21-\x39\x41-\x7E]+\z/`
              example: example-partner-user@qonto.com
          required:
            - first_name
            - last_name
            - email
        organization:
          $ref: '#/components/schemas/organization'
        stakeholders:
          type: array
          items:
            $ref: '#/components/schemas/stakeholder'
        oauth:
          $ref: '#/components/schemas/oauth_params'
      required:
        - locale
        - partner_user
        - organization
        - stakeholders
    post-ec:
      title: Request payload for Existing Company flow
      type: object
      properties:
        legal_flow:
          type: string
          description: |
            Identifies the type of registration process:
              - `company_creation`: Initiates a new company registration.
              - `existing_company`: Registers an existing company.
          enum:
            - existing_company
        locale:
          type: string
          description: >
            Only a subset is supported from [IETF Language
            Tags](https://en.wikipedia.org/wiki/IETF_language_tag)
          enum:
            - en
            - fr
            - it
            - de
            - es
            - pt
          example: fr
        partner_redirect_url:
          type: string
          description: >
            The URL where the user will be redirected after the registration
            process is completed. 

            If not provided, then the user will be redirected to Qonto's
            application.


            Note: this parameter is allowed only for embed applications.
          example: https://example.com/users/123456/dashboard
          nullable: true
        partner_user:
          type: object
          description: Describes the user that owns the flow on the partner side.
          properties:
            first_name:
              nullable: true
              type: string
              example: John
            last_name:
              nullable: true
              type: string
              example: Doe
            email:
              nullable: true
              type: string
              description: >-
                It should match this regex
                `/\A[\x21-\x39\x41-\x7E]+@[\x21-\x39\x41-\x7E]+\.[\x21-\x39\x41-\x7E]+\z/`
              example: example-partner-user@qonto.com
          required:
            - first_name
            - last_name
            - email
        organization:
          type: object
          properties:
            legal_number:
              type: string
              description: Registration number of the organization
              example: '81948962600047'
          required:
            - legal_number
        oauth:
          $ref: '#/components/schemas/oauth_params'
      required:
        - locale
        - partner_user
        - organization
    post-cc-de:
      title: Request payload for German Company Creation flow
      type: object
      properties:
        legal_flow:
          type: string
          description: |
            Identifies the type of registration process:
              - `company_creation`: Initiates a new company registration.
          enum:
            - company_creation
        locale:
          type: string
          description: >
            Only a subset is supported from [IETF Language
            Tags](https://en.wikipedia.org/wiki/IETF_language_tag)
          enum:
            - de
            - en
          example: de
        partner_user:
          type: object
          description: >-
            Describes the user that owns the flow on the partner side (required
            if no owner stakeholder provided).
          properties:
            first_name:
              type: string
              example: John
              description: Required if no owner stakeholder provided
            last_name:
              type: string
              example: Doe
              description: Required if no owner stakeholder provided
            email:
              type: string
              description: >-
                Required if organization ID is missing. It should match this
                regex
                `/\A[\x21-\x39\x41-\x7E]+@[\x21-\x39\x41-\x7E]+\.[\x21-\x39\x41-\x7E]+\z/`
              example: example-partner-user@qonto.com
        organization:
          type: object
          description: Organization details for German registration
          properties:
            id:
              type: string
              format: uuid
              description: >-
                Organization ID shared with partner (required for whitelabel
                partner)
              example: 6367b150-ce8c-40c4-8e0a-5535119fde70
            legal_name:
              type: string
              description: Legal name of the business (optional)
              example: Qonto
              nullable: true
            legal_form:
              type: string
              description: Selected legal form
              enum:
                - Einzelunternehmer
                - Freiberufler
                - UG in Gründung (i.G.)
                - GmbH in Gründung (i.G.)
              example: Einzelunternehmer
            legal_country:
              type: string
              description: Legal country, always DE
              enum:
                - DE
              example: DE
            legal_registration_date:
              type: string
              format: date
              description: Date of legal registration (at notary or tax office)
              example: '2008-02-02'
              nullable: true
            activity:
              type: string
              description: Activity description free text
              example: Activity description free text
              nullable: true
            address:
              type: object
              description: Business address
              properties:
                line_1:
                  type: string
                  example: Lohmühlenstr. 65
                line_2:
                  nullable: true
                  type: string
                  example: Room 5
                postal_code:
                  type: string
                  example: '13505'
                city:
                  type: string
                  example: Berlin
                country:
                  type: string
                  description: ISO country code, always DE
                  enum:
                    - DE
                  example: DE
          required:
            - legal_form
            - legal_country
        stakeholders:
          type: array
          description: Optional array of stakeholders (Only owner is supported for now)
          items:
            type: object
            properties:
              is_owner:
                type: boolean
                description: Indicates if this stakeholder is the owner
                example: true
              first_name:
                type: string
                description: First name of the stakeholder
                example: John
              last_name:
                type: string
                description: Last name of the stakeholder
                example: Doe
              gender:
                type: string
                description: Gender of the stakeholder
                enum:
                  - male
                  - female
                example: male
                nullable: true
              email:
                type: string
                description: Email address of the stakeholder
                example: john.doe@gmail.com
                nullable: true
              nationality:
                type: string
                description: ISO country code for nationality
                example: DE
                nullable: true
              birth_date:
                type: string
                format: date
                description: Birth date of the stakeholder
                example: '1995-01-01'
                nullable: true
              birth_address:
                type: object
                description: Birth address of the stakeholder
                properties:
                  city:
                    type: string
                    example: Berlin
                  country:
                    type: string
                    description: ISO country code
                    example: DE
                nullable: true
              address:
                type: object
                description: Personal address of the stakeholder
                properties:
                  line_1:
                    type: string
                    example: Hundsteinweg 76
                  line_2:
                    type: string
                    example: ''
                    nullable: true
                  postal_code:
                    type: string
                    example: '12107'
                  city:
                    type: string
                    example: Berlin
                  country:
                    type: string
                    description: ISO country code
                    example: DE
                nullable: true
            required:
              - is_owner
              - first_name
              - last_name
        oauth:
          $ref: '#/components/schemas/oauth_params'
      required:
        - legal_flow
        - locale
        - organization
    registration-existing-companies-germany:
      title: Request payload for German Existing Company flow
      type: object
      properties:
        legal_flow:
          type: string
          description: |
            Identifies the type of registration process:
              - `existing_company`: Registers an existing company.
          enum:
            - existing_company
        locale:
          type: string
          description: >
            Only a subset is supported from [IETF Language
            Tags](https://en.wikipedia.org/wiki/IETF_language_tag)
          enum:
            - en
            - fr
            - it
            - de
            - es
            - pt
          example: de
        partner_redirect_url:
          type: string
          description: >
            The URL where the user will be redirected after the registration
            process is completed. 

            Note: For some partners it is required to provide this parameter.
          example: https://example.com/users/123456/dashboard
          nullable: true
        partner_user:
          type: object
          description: Describes the user that owns the flow on the partner side.
          properties:
            first_name:
              nullable: false
              type: string
              example: John
            last_name:
              nullable: false
              type: string
              example: Doe
            email:
              nullable: false
              type: string
              description: >-
                It should match this regex
                `/\A[\x21-\x39\x41-\x7E]+@[\x21-\x39\x41-\x7E]+\.[\x21-\x39\x41-\x7E]+\z/`
              example: example-partner-user@qonto.com
          required:
            - first_name
            - last_name
            - email
        organization:
          type: object
          properties:
            legal_name:
              nullable: false
              type: string
              example: Qonto
            legal_number:
              nullable: true
              type: string
              description: Registration number of the organization
              example: HRB123458B
            legal_form:
              nullable: false
              type: string
              enum:
                - GmbH UG Einzelunternehmer Freiberufler
            legal_registration_date:
              nullable: true
              type: string
              format: date
              description: Foundation date of organization
            address:
              type: object
              properties:
                line_1:
                  nullable: false
                  type: string
                  example: Lohmühlenstr. 65
                line_2:
                  nullable: true
                  type: string
                  example: Room 5
                postal_code:
                  nullable: false
                  type: string
                  example: '13505'
                city:
                  nullable: false
                  type: string
                  example: Berlin
                country:
                  nullable: false
                  type: string
                  enum:
                    - DE
                  example: DE
                  description: ISO country code
              required:
                - line_1
                - postal_code
                - city
                - country
          required:
            - legal_name
            - legal_form
            - address
        stakeholders:
          type: array
          minItems: 1
          description: >
            For freelancers, the stakeholders list must include exactly one
            item, which must correspond to the partner user.
          items:
            title: Stakeholder
            type: object
            properties:
              ubo:
                nullable: false
                type: boolean
                example: false
              legal_representative:
                nullable: false
                type: boolean
                example: true
              first_name:
                nullable: false
                type: string
                example: Zoe
              last_name:
                nullable: false
                type: string
                example: Jenkins
              nationality:
                nullable: true
                type: string
                description: ISO country code
                example: DE
              birth_date:
                nullable: true
                type: string
                format: date
                example: '1993-08-17'
                description: |
                  The stakeholder's birth date.

                  When present it should be between today and 150 years ago
              birth_address:
                type: object
                properties:
                  country:
                    nullable: true
                    type: string
                    description: ISO country code
                    example: DE
            required:
              - first_name
              - last_name
        oauth:
          $ref: '#/components/schemas/oauth_params'
      required:
        - locale
        - partner_user
        - organization
        - stakeholders
    post-qf:
      title: Request payload for Qonto Invoicing flow
      type: object
      properties:
        legal_flow:
          type: string
          description: |
            Identifies the type of registration process:
              - `company_creation`: Initiates a new company registration.
              - `existing_company`: Registers an existing company.
              - `qonto_invoicing`: Onboards a company through the Qonto Invoicing flow.
          enum:
            - qonto_invoicing
        locale:
          type: string
          description: >
            Only a subset is supported from [IETF Language
            Tags](https://en.wikipedia.org/wiki/IETF_language_tag)
          enum:
            - en
            - fr
            - it
            - de
            - es
            - pt
            - nl
          example: fr
        partner_redirect_url:
          type: string
          description: >
            The URL where the user will be redirected after the registration
            process is completed.

            If not provided, then the user will be redirected to Qonto's
            application.


            Note: this parameter is allowed only for embed applications.
          example: https://example.com/users/123456/dashboard
          nullable: true
        partner_user:
          type: object
          description: Describes the user that owns the flow on the partner side.
          properties:
            first_name:
              type: string
              example: Jean
            last_name:
              type: string
              example: Dupont
            email:
              type: string
              description: >-
                It should match this regex
                `/\A[\x21-\x39\x41-\x7E]+@[\x21-\x39\x41-\x7E]+\.[\x21-\x39\x41-\x7E]+\z/`
              example: jean.dupont@example.com
          required:
            - first_name
            - last_name
            - email
        organization:
          type: object
          properties:
            legal_name:
              type: string
              example: Acme France
            legal_number:
              type: string
              description: 14-digit SIRET number of the organization
              example: '81948962600013'
            legal_country:
              type: string
              description: ISO country code
              enum:
                - FR
              example: FR
            address:
              type: object
              properties:
                line_1:
                  type: string
                  example: 42 Rue Etienne Marcel
                line_2:
                  nullable: true
                  type: string
                  example: Apt 4B
                postal_code:
                  type: string
                  example: '75002'
                  maxLength: 5
                  minLength: 5
                city:
                  type: string
                  example: Paris
                country:
                  type: string
                  enum:
                    - FR
                  example: FR
              required:
                - line_1
                - postal_code
                - city
                - country
          required:
            - legal_name
            - legal_number
            - legal_country
            - address
        oauth:
          $ref: '#/components/schemas/oauth_params'
      required:
        - legal_flow
        - locale
        - partner_user
        - organization
    registration:
      title: Registration
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          example: a584b060-8c96-488d-8bbb-74f0d3d2803c
        legal_flow:
          type: string
          description: |
            Identifies the type of registration process:
              - `company_creation`: Initiates a new company registration.
              - `existing_company`: Registers an existing company.
              - `qonto_invoicing`: Onboards a company through the Qonto Invoicing flow.
          default: company_creation
          enum:
            - company_creation
            - existing_company
            - qonto_invoicing
        flow:
          readOnly: true
          type: object
          properties:
            type:
              type: string
              description: >
                Describe the flow this registration is eligible into.


                Available statuses:

                - manual: User will have to supply all information

                - seamless: User won't be asked whatever has been provided from
                the registration partner
              enum:
                - manual
                - seamless
              example: seamless
            breakdown:
              description: Only available for `manual` flows
              nullable: true
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                  detail:
                    type: string
                  source:
                    type: object
                    properties:
                      pointer:
                        type: string
          required:
            - type
            - breakdown
        status:
          type: string
          description: >
            Whether this registration process if finished or not. This will be
            "pending" by default.
          enum:
            - created
            - pending
            - user_started
            - price_plan_selected
            - contract_signed
            - submitted
            - capital_deposit_activated
            - capital_deposit_request_signed
            - capital_deposit_certificate_signed
            - completed
          readOnly: true
          example: pending
        redirection_link:
          type: string
          description: >
            A unique link associated to the specific user, where they can start
            their journey to create an account at Qonto.


            In Sandbox, this link points to a Sandbox-only domain that is
            protected by our internal OneLogin gate. Before opening it in a
            browser, follow the browser bypass described in [Accessing the
            Sandbox environment](/get-started/general/sandbox-access). In
            Production, the link is publicly accessible.
          readOnly: true
          example: https://xyz.qonto.com/registrations/ID
        partner_redirect_url:
          type: string
          description: >
            The URL where the user will be redirected after the registration
            process is completed. 

            If not provided, then the user will be redirected to Qonto's
            application.


            Note: this parameter is allowed only for embed applications.
          example: https://example.com/users/123456/dashboard
          nullable: true
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
          example: '2021-08-17T12:31:32.689Z'
        updated_at:
          type: string
          format: date-time
          readOnly: true
          example: '2021-08-17T14:00:00.689Z'
        locale:
          type: string
          description: >
            Only a subset is supported from [IETF Language
            Tags](https://en.wikipedia.org/wiki/IETF_language_tag)
          enum:
            - en
            - fr
            - it
            - de
            - es
            - pt
          example: fr
        partner_user:
          type: object
          description: Describes the user that owns the flow on the partner side.
          properties:
            first_name:
              nullable: true
              type: string
              example: John
            last_name:
              nullable: true
              type: string
              example: Doe
            email:
              nullable: true
              type: string
              description: >-
                It should match this regex
                `/\A[\x21-\x39\x41-\x7E]+@[\x21-\x39\x41-\x7E]+\.[\x21-\x39\x41-\x7E]+\z/`
              example: example-partner-user@qonto.com
          required:
            - first_name
            - last_name
            - email
        organization:
          $ref: '#/components/schemas/organization'
        stakeholders:
          type: array
          items:
            $ref: '#/components/schemas/stakeholder'
      required:
        - locale
        - partner_user
        - organization
        - stakeholders
    organization:
      title: Organization
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        entity_type:
          type: string
          description: Organization type
          nullable: false
          enum:
            - freelancer
            - company
          example: company
          default: company
        legal_name:
          nullable: true
          type: string
          example: Qonto
        legal_form:
          nullable: true
          type: string
          enum:
            - SAS
            - SASU
            - SARL
            - EURL
            - SELARL
            - SNC
            - SCI
            - Autre société civile
          description: |
            Legal form can be one of the following ones:

            For FR:
              * SAS - Société par action simplifiée
              * SASU - Société par action simplifiée unipersonnelle
              * SARL - Société à responsabilité limitée
              * EURL - Entreprise unipersonnelle à responsabilité limitée
              * SELARL - Société d'exercice libéral à responsabilité limitée
              * SNC - Société en nom collectif
              * SCI - Société civile immobilière
              * Autre société civile
          example: SAS
        legal_number:
          nullable: true
          type: string
          description: Registration number of the organization
        legal_sector:
          nullable: true
          type: string
          description: >-
            [NACE
            code](https://ec.europa.eu/competition/elojade/isef/index.cfm?fuseaction=tree_nace&form_name=dsp_form&pickup_field=nace_code&pickup_field_id=nace_code_id&myLabel=PICKUP_nace_code_myLabel&show_all=0)
            of organization
          example: K.64.11
        legal_registration_date:
          nullable: true
          type: string
          format: date
          description: Foundation date of organization
        legal_vat_number:
          nullable: true
          type: string
          description: >
            VAT identification number, used only when `registration.legal_flow
            == 'existing_company'`


            When provided and legal country is DE it should match this regex
            `/\ADE\d{9}\z/`
        address:
          type: object
          properties:
            line_1:
              nullable: true
              type: string
              example: Rue La Fayette 20B
            line_2:
              nullable: true
              type: string
              example: Room 5
            postal_code:
              nullable: true
              type: string
              example: '75009'
            city:
              nullable: true
              type: string
              example: Paris
            country:
              nullable: true
              type: string
              description: >
                ISO country code


                Supported countries for `registration.legal_flow:
                company_creation`:
                  * FR

                Supported countries for `registration.legal_flow:
                existing_company`:
                  * DE
              example: FR
          required:
            - line_1
            - postal_code
            - city
            - country
        total_capital_amount:
          type: object
          properties:
            value:
              nullable: false
              type: string
              description: >-
                The total capital amount for this organization. Cannot be null
                or zero.
              example: '1023.43'
            currency:
              nullable: false
              type: string
              enum:
                - EUR
              example: EUR
          required:
            - value
            - currency
      required:
        - legal_name
        - legal_form
        - address
        - total_capital_amount
    stakeholder:
      title: Stakeholder
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        capital_amount:
          type: object
          properties:
            value:
              nullable: false
              type: string
              description: >
                The capital amount for this stakeholder.

                A stakeholder will be defined as a Ultimate Beneficial Owner for
                contributions over 25% of the total contibution amount.

                Note that this value cannot be null. It can be 0 if this
                stakeholder is not a physical shareholder, but a legal
                representative only. They must have legal entities in this case.
              example: '1023.43'
            currency:
              nullable: false
              type: string
              enum:
                - EUR
              example: EUR
          required:
            - value
            - currency
        is_owner:
          nullable: true
          type: boolean
          description: >
            Mark the stakeholder as the owner of the Qonto Account.

            An organization can have exactly one owner.

            The Account owner is the sole person responsible for opening the
            account and can close it at any time
          example: true
        first_name:
          nullable: true
          type: string
          example: Leeroy
        last_name:
          nullable: true
          type: string
          example: Jenkins
        email:
          nullable: true
          type: string
          description: >-
            The stakeholder's email. Should be present for all. It should match
            this regex
            `/\A[\x21-\x39\x41-\x7E]+@[\x21-\x39\x41-\x7E]+\.[\x21-\x39\x41-\x7E]+\z/`
          example: leeroy.jenkins@qonto.com
        gender:
          nullable: true
          type: string
          enum:
            - male
            - female
            - other
          example: male
        phone_number:
          nullable: true
          type: string
          description: >
            The stakeholder's phone number. Should be present for owners.


            The supported format is: exit code + country code + national
            subscriber number.


            The exit code in the majority of countries is "00", you can use also
            "+".


            The phone number can include a whitespace after the country code.


            Examples:


            +33 123456789


            0033 123456789


            +33123456789


            0033123456789
          example: '0033123456789'
        nationality:
          nullable: true
          type: string
          description: ISO country code
          example: FR
        birth_date:
          nullable: true
          type: string
          format: date-time
          example: '2021-08-17T12:31:32.689Z'
          description: |
            The stakeholder's birth date.

            When present it should be between today and 150 years ago
        birth_address:
          type: object
          properties:
            postal_code:
              nullable: true
              type: string
              example: '75009'
              description: required to have a value only if country=FR
            city:
              nullable: true
              type: string
              example: Paris
            country:
              nullable: true
              type: string
              description: ISO country code
              example: FR
          required:
            - postal_code
            - city
            - country
        residence_address:
          type: object
          properties:
            line_1:
              nullable: true
              type: string
              example: Rue La Fayette 20B
            postal_code:
              nullable: true
              type: string
              example: '75009'
            city:
              nullable: true
              type: string
              example: Paris
            country:
              nullable: true
              type: string
              description: ISO country code
              example: FR
          required:
            - line_1
            - postal_code
            - city
            - country
        shareholding_type:
          nullable: true
          type: string
          enum:
            - physical
          description: >-
            Use `physical` only if the stakeholder is a physical shareholder.
            Use `null` or don't provide this field if the stakeholder is not a
            physical shareholder, but a legal representative of one or more
            legal entities.
          example: physical
        share_capital_origin:
          type: array
          description: >
            Origin of share capital funds.

            This field is only relevant when the stakeholder is a physical
            shareholder (`shareholding_type: physical`).

            Use an empty list or omit this field if the stakeholder is not a
            physical shareholder, but a legal representative only.
          items:
            type: string
            enum:
              - personal_savings
              - donation
              - real_estate_sale
              - disposal_of_securities
              - business_sale
              - employment_or_business_income
              - dividends
              - shareholder_current_account
              - insurance_payout
              - other_origins
        legal_entities:
          type: array
          items:
            $ref: '#/components/schemas/legal_entity'
            description: >
              List of the legal entities for which this stakeholder is the legal
              representative.

              A legal entity is a company or other entity contributing to the
              share capital (not natural person).
      required:
        - capital_amount
        - is_owner
        - first_name
        - last_name
        - email
        - gender
        - phone_number
        - nationality
        - birth_date
        - birth_address
        - residence_address
    oauth_params:
      title: OAuth Parameters
      type: object
      properties:
        generate_tokens:
          type: boolean
          description: >-
            If true, the oauth `authorization_code` will be generated after
            contract is signed. All other fields are mandatory if this is true.
          example: true
          default: false
        client_id:
          type: string
          description: The client_id used to generate the oauth `authorization_code`
          example: 52ba9631-de19-4e8a-a47f-ba24e2bebc9e
        scopes:
          type: string
          description: >-
            The scopes to be used to generate the OAuth `authorization_code`.
            Same as [the authorization code
            retrieval](/business-api/authentication/oauth2/retrieve_authorization),
            you should pass them in a single string, with a space as a
            separator.
          example: >-
            organization.read offline_access attachment.write
            internal_transfer.write
        state:
          type: string
          description: >
            It is a security parameters to protect against forgery attacks
            and/or to keep the session state between the request and the
            callback.


            You need to pass a value that is unique to the user.

            At the end of the authentication process, you should compare the
            received state with the one you provided to make sure they are
            equals.
          minLength: 8
          nullable: true
        redirect_uri:
          type: string
          description: >
            The redirect_uri used to generate the oauth `authorization_code`.
            Should be one allowed by the client_id. 


            This URL will be called by Qonto to send the `authorization_code`
            and the `state` parameter, as described in the [oauth
            flow](https://api-doc.qonto.com/docs/business-api/cde5db03720d5-the-o-auth-flow).

            In addition to these parameters, the `registration_id` will be added
            to the query string.


            Please note that this will be a server to server call: there will be
            no Cookies sent with this request. If you need to retrieve your
            session, please use the `state` field.
          example: https://example.com/oauth/callback
    errors:
      title: Errors
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                readOnly: true
              detail:
                type: string
                readOnly: true
              source:
                type: object
                properties:
                  pointer:
                    type: string
                readOnly: true
            required:
              - code
              - detail
    legal_entity:
      title: Legal Entity
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        legal_name:
          nullable: false
          type: string
          description: Legal name of this legal entity
          example: Qonto
        legal_number:
          nullable: false
          type: string
          description: SIRET number of this legal entity
          example: 123456789
        legal_country:
          nullable: true
          type: string
          description: ISO country code
          example: FR
        capital_amount:
          nullable: true
          type: string
          description: >
            The capital amount for this legal entity as legal shareholder. Note
            that this value cannot be 0.
          example: '1023.43'
        share_capital_origin:
          type: array
          description: Origin of share capital funds.
          items:
            type: string
            enum:
              - personal_savings
              - donation
              - real_estate_sale
              - disposal_of_securities
              - business_sale
              - employment_or_business_income
              - dividends
              - shareholder_current_account
              - insurance_payout
              - other_origins
      required:
        - legal_name
        - legal_number
  examples:
    post-cc-example:
      value:
        legal_flow: company_creation
        locale: en
        partner_redirect_url: https://example.com/users/123456/dashboard
        partner_user:
          first_name: John
          last_name: Doe
          email: example-partner-user@qonto.com
        organization:
          entity_type: company
          legal_name: Qonto
          legal_form: SAS
          legal_sector: K.64.11
          legal_registration_date: '2019-08-24'
          legal_vat_number: '123456789'
          address:
            line_1: Rue La Fayette 20B
            line_2: Room 5
            postal_code: '75009'
            city: Paris
            country: FR
          total_capital_amount:
            value: '3641.74'
            currency: EUR
        stakeholders:
          - capital_amount:
              value: '1023.43'
              currency: EUR
            is_owner: true
            first_name: Leeroy
            last_name: Jenkins
            email: leeroy.jenkins@qonto.com
            gender: male
            phone_number: '0033123456789'
            nationality: FR
            birth_date: '2021-08-17T12:31:32.689Z'
            birth_address:
              postal_code: '75009'
              city: Paris
              country: FR
            residence_address:
              line_1: Rue La Fayette 20B
              postal_code: '75009'
              city: Paris
              country: FR
            shareholding_type: physical
            share_capital_origin:
              - personal_savings
              - employment_or_business_income
          - capital_amount:
              value: '0'
              currency: EUR
            is_owner: false
            first_name: Jane
            last_name: Doe
            email: jane.doe@qonto.com
            gender: female
            phone_number: '0033123456780'
            nationality: FR
            birth_date: '2020-08-17T12:31:32.689Z'
            birth_address:
              postal_code: '75009'
              city: Paris
              country: FR
            residence_address:
              line_1: Rue La Fayette 17A
              postal_code: '75009'
              city: Paris
              country: FR
            shareholding_type: null
            share_capital_origin: []
            legal_entities:
              - legal_name: Good Company
                legal_number: '123456789'
                legal_country: FR
                capital_amount:
                  value: '2618.31'
                  currency: EUR
                share_capital_origin:
                  - dividends
    post-ec-example:
      value:
        legal_flow: existing_company
        locale: en
        partner_redirect_url: https://example.com/users/123456/dashboard
        partner_user:
          email: example-patner-user@qonto.com
          first_name: John
          last_name: Doe
        organization:
          legal_number: '123232323'
    post-cc-de-example:
      value:
        legal_flow: company_creation
        locale: de
        organization:
          id: 6367b150-ce8c-40c4-8e0a-5535119fde70
          legal_country: DE
          legal_name: Qonto
          legal_form: Einzelunternehmer
          legal_registration_date: '2008-02-02'
          activity: Activity description free text
          address:
            line_1: Lohmühlenstr. 65
            line_2: Room 5
            postal_code: '13505'
            city: Berlin
            country: DE
        partner_user:
          first_name: John
          last_name: Doe
          email: john.doe@gmail.com
        stakeholders:
          - is_owner: true
            first_name: John
            last_name: Doe
            gender: male
            email: john.doe@gmail.com
            nationality: DE
            birth_date: '1995-01-01'
            birth_address:
              city: Berlin
              country: DE
            address:
              line_1: Hundsteinweg 76
              line_2: ''
              postal_code: '12107'
              city: Berlin
              country: DE
    post-existing-companies-de-example:
      value:
        legal_flow: existing_company
        locale: de
        partner_redirect_url: https://example.com/users/123456/dashboard
        partner_user:
          email: example-patner-user@qonto.com
          first_name: John
          last_name: Doe
        organization:
          legal_name: Qonto
          legal_number: HRB123458B
          legal_form: GmbH
          legal_registration_date: '2010-01-23'
          address:
            line_1: Lohmühlenstr. 65
            line_2: Room 5
            postal_code: '13505'
            city: Berlin
            country: DE
        stakeholders:
          - ubo: true
            legal_representative: false
            first_name: Zoe
            last_name: Shou
            nationality: FR
            birth_date: null
            birth_address:
              country: null
          - ubo: true
            legal_representative: false
            first_name: John
            last_name: Doe
            nationality: DE
            birth_date: '1983-08-17'
            birth_address:
              country: DE
          - ubo: true
            legal_representative: true
            first_name: Leeroy
            last_name: Jenkins
            nationality: DE
            birth_date: null
            birth_address:
              country: null
        oauth:
          generate_tokens: true
          client_id: 52ba9631-de19-4e8a-a47f-ba24e2bebc9e
          scopes: >-
            organization.read offline_access attachment.write
            internal_transfer.write
          state: ''
          redirect_uri: https://www.qonto.com/oauth/callback
    post-qf-example:
      value:
        legal_flow: qonto_invoicing
        locale: fr
        partner_redirect_url: https://example.com/users/123456/dashboard
        partner_user:
          first_name: Jean
          last_name: Dupont
          email: jean.dupont@example.com
        organization:
          legal_name: Acme France
          legal_number: '81948962600013'
          legal_country: FR
          address:
            line_1: 42 Rue Etienne Marcel
            postal_code: '75002'
            city: Paris
            country: FR
    unauthorized:
      value:
        errors:
          - code: unauthorized
            detail: You must authenticate to perform API requests
    conflict:
      value:
        errors:
          - code: conflict
            detail: Type do not match server's endpoint
            source:
              pointer: /data/type
          - code: conflict
            detail: ID do not match server's endpoint
            source:
              pointer: /data/id
    unprocessable-entity:
      value:
        errors:
          - code: <error-code>
            detail: <relevant-detail>
            source:
              pointer: <ie /data/attributes/attr_name>
  responses:
    400-bad-request:
      description: Returns a bad request error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errors'
    401-unauthorized:
      description: Returns an unauthorized error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errors'
          examples:
            Example:
              $ref: '#/components/examples/unauthorized'
    409-conflict:
      description: >-
        Returns a conflict error if the specified resource identifier didn't
        match the data/id parameter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errors'
          examples:
            Example:
              $ref: '#/components/examples/conflict'
    418-teapot:
      description: Returns a teapot error if the payload submitted is not eligible.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errors'
    422-unprocessable-entity:
      description: >-
        Returns an unprocessable entity error if any required parameters are
        missing, or if validation rules are not respected.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errors'
          examples:
            Example:
              $ref: '#/components/examples/unprocessable-entity'
    500-internal-servor-error:
      description: Returns an internal server error.
  securitySchemes:
    apiKey:
      type: http
      description: >
        Bearer authorization header: `Bearer <token>`.

        To get your `<token>`, please sign up to the [Developer
        Portal](https://developers.qonto.com/).
      scheme: bearer
      bearerFormat: JWT
    qontoPartnerId:
      type: apiKey
      description: >
        API Key authorization header: `Qonto-Partner-Id: <partner_id>`.

        To get your `<partner_id>` please, sign up to the [Developer
        Portal](https://developers.qonto.com/).
      name: Qonto-Partner-Id
      in: header

````