Wayflyer User Details API

The User Details API from Wayflyer — 4 operation(s) for user details.

OpenAPI Specification

wayflyer-user-details-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Embedded Finance Auth User Details API
  version: '1'
  description: ''
servers:
- url: https://api.wayflyer.com/financing/
  description: Production
tags:
- name: User Details
paths:
  /company/user-details/:
    get:
      operationId: wf_embedded_finance_service_apps_web_core_views_user_details_get_user_details
      summary: Get user details
      parameters:
      - $ref: '#/components/parameters/ApiVersion'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserDetailsResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
      description: 'Get user details for the authenticated user.


        Returns the current user details including email and phone number.

        User is extracted from the authentication token.'
      tags:
      - User Details
      security:
      - CompanyToken: []
    put:
      operationId: wf_embedded_finance_service_apps_web_core_views_user_details_update_user_details
      summary: Update user details
      parameters:
      - $ref: '#/components/parameters/ApiVersion'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserDetailsResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateUserDetailsErrorResponse'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '423':
          description: Locked
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateUserDetailsErrorResponse'
      description: 'Update user details for the authenticated user.


        User details can only be updated a few times before any application is submitted to prevent abuse. User details

        cannot be updated after an application is submitted.'
      tags:
      - User Details
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserDetailsRequest'
        required: true
      security:
      - CompanyToken: []
  /company/embedded-application/:
    post:
      operationId: wf_embedded_finance_service_apps_sandbox_views_embedded_application_start_embedded_application
      summary: Start an embedded application
      parameters:
      - $ref: '#/components/parameters/ApiVersion'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddedApplicationStatusResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
      description: 'Start an embedded application for the company.

        The returned schema will let the user know if additional details are required to submit the application and

        provide the application ID to track the application status in subsequent API calls.

        If an open embedded application already exists for the company, a 400 error is returned.'
      tags:
      - User Details
      security:
      - CompanyToken: []
    get:
      operationId: wf_embedded_finance_service_apps_sandbox_views_embedded_application_get_embedded_application
      summary: Get an embedded application
      parameters:
      - $ref: '#/components/parameters/ApiVersion'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddedApplicationStatusResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
      description: 'Get the status of the open embedded application for the company.

        The returned schema will let the user know if additional details are required to submit the application and

        provide the application ID to track the application status in subsequent API calls.

        If no open embedded application exists for the company, a 404 error is returned.'
      tags:
      - User Details
      security:
      - CompanyToken: []
  /company/embedded-application/submit/:
    post:
      operationId: wf_embedded_finance_service_apps_sandbox_views_embedded_application_submit_embedded_application
      summary: Submit embedded application
      parameters:
      - $ref: '#/components/parameters/ApiVersion'
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitEmbeddedApplicationErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitEmbeddedApplicationErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitEmbeddedApplicationErrorResponse'
      description: 'Submit the open embedded application for review.


        All required details (user details and company details) must be provided

        before the application can be submitted. Once submitted, details can no

        longer be edited.'
      tags:
      - User Details
      security:
      - CompanyToken: []
  /company/embedded-application/mark-ineligible/:
    post:
      operationId: wf_embedded_finance_service_apps_sandbox_views_embedded_application_mark_ineligible
      summary: Mark embedded application as ineligible
      parameters:
      - $ref: '#/components/parameters/ApiVersion'
      responses:
        '204':
          description: No Content
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarkIneligibleErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarkIneligibleErrorResponse'
      tags:
      - User Details
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MarkIneligibleRequest'
        required: true
      security:
      - CompanyToken: []
components:
  schemas:
    IneligibleReason:
      enum:
      - unsupported_country
      - no_eligible_business_model
      title: IneligibleReason
      type: string
    EmbeddedApplicationStatusResponse:
      example:
        application_id: 550e8400-e29b-41d4-a716-446655440000
        required_details:
        - name: user_details
          status: incomplete
        - name: company_details
          status: complete
      properties:
        application_id:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          description: The ID of the embedded application
          title: Application Id
        required_details:
          description: A list of required details to submit the embedded application.
          items:
            $ref: '#/components/schemas/EmbeddedApplicationDetailStatus'
          title: Required Details
          type: array
      required:
      - application_id
      - required_details
      title: EmbeddedApplicationStatusResponse
      type: object
    UserDetailsRequest:
      properties:
        email:
          description: The email of the user
          format: email
          title: Email
          type: string
        first_name:
          anyOf:
          - maxLength: 255
            type: string
          - type: 'null'
          description: The first name of the user
          title: First Name
        last_name:
          anyOf:
          - maxLength: 255
            type: string
          - type: 'null'
          description: The last name of the user
          title: Last Name
        phone_number:
          anyOf:
          - maxLength: 16
            type: string
          - type: 'null'
          description: The user's phone number in E.164 format (e.g., +353861234567)
          title: Phone Number
      required:
      - email
      title: UserDetailsRequest
      type: object
    EmbeddedApplicationDetailStatus:
      properties:
        name:
          description: The name of the detail
          enum:
          - user_details
          - company_details
          title: Name
          type: string
        status:
          description: The status of the detail, either complete or incomplete
          enum:
          - complete
          - incomplete
          title: Status
          type: string
      required:
      - name
      - status
      title: EmbeddedApplicationDetailStatus
      type: object
    SubmitEmbeddedApplicationErrorResponse:
      properties:
        error_code:
          $ref: '#/components/schemas/SubmitEmbeddedApplicationErrorCode'
          description: Machine-readable error code
        detail:
          description: Human-readable error message
          title: Detail
          type: string
        ineligible_reasons:
          description: List of ineligibility reasons
          items:
            type: string
          title: Ineligible Reasons
          type: array
      required:
      - error_code
      - detail
      title: SubmitEmbeddedApplicationErrorResponse
      type: object
    SubmitEmbeddedApplicationErrorCode:
      enum:
      - details_incomplete
      - no_open_application
      - open_hosted_application_exists
      - duplicate_company
      - ineligible_application
      - registration_or_documents_required
      title: SubmitEmbeddedApplicationErrorCode
      type: string
    UpdateUserDetailsErrorCode:
      enum:
      - duplicate
      - too_many_revisions
      - application_already_submitted
      title: UpdateUserDetailsErrorCode
      type: string
    UpdateUserDetailsErrorResponse:
      properties:
        error_code:
          $ref: '#/components/schemas/UpdateUserDetailsErrorCode'
          description: Machine-readable error code
        detail:
          description: Human-readable error message
          title: Detail
          type: string
      required:
      - error_code
      - detail
      title: UpdateUserDetailsErrorResponse
      type: object
    MarkIneligibleRequest:
      properties:
        ineligible_reasons:
          description: One or more reasons the application is ineligible
          items:
            $ref: '#/components/schemas/IneligibleReason'
          minItems: 1
          title: Ineligible Reasons
          type: array
      required:
      - ineligible_reasons
      title: MarkIneligibleRequest
      type: object
    UserDetailsResponse:
      properties:
        email:
          anyOf:
          - format: email
            type: string
          - type: 'null'
          description: The email of the user
          title: Email
        first_name:
          anyOf:
          - type: string
          - type: 'null'
          description: The first name of the user
          title: First Name
        last_name:
          anyOf:
          - type: string
          - type: 'null'
          description: The last name of the user
          title: Last Name
        phone_number:
          anyOf:
          - type: string
          - type: 'null'
          description: The phone number of the user in E.164 format
          title: Phone Number
      title: UserDetailsResponse
      type: object
    MarkIneligibleErrorCode:
      enum:
      - no_open_application
      - not_started_by_user
      title: MarkIneligibleErrorCode
      type: string
    ErrorDetail:
      properties:
        detail:
          title: Detail
          type: string
      required:
      - detail
      title: ErrorDetail
      type: object
    MarkIneligibleErrorResponse:
      properties:
        error_code:
          $ref: '#/components/schemas/MarkIneligibleErrorCode'
          description: Machine-readable error code
        detail:
          description: Human-readable error message
          title: Detail
          type: string
      required:
      - error_code
      - detail
      title: MarkIneligibleErrorResponse
      type: object
  parameters:
    ApiVersion:
      in: header
      name: API-Version
      schema:
        title: API-Version
        type: string
        enum:
        - '1'
      required: false
  securitySchemes:
    CompanyToken:
      type: http
      scheme: bearer
    PartnerToken:
      type: http
      scheme: bearer