Hevn Inc Utils API

The Utils API from Hevn Inc — 10 operation(s) for utils.

OpenAPI Specification

hevn-inc-utils-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: HEVN 2FA Utils API
  description: Backend API for HEVN mobile neobank
  version: 0.1.2
servers:
- url: https://api.hevn.finance
  description: Production
tags:
- name: Utils
paths:
  /api/v1/utils/parse-iban:
    post:
      tags:
      - Utils
      summary: Parse IBAN from plain text
      description: Extract SEPA IBAN data from plain text using AI. Returns structured ImportIbanSepaData.
      operationId: parse_iban_text_api_v1_utils_parse_iban_post
      security:
      - HTTPBearer: []
      parameters:
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ParseIbanTextRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportIbanSepaData'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/utils/rates/{currency}:
    get:
      tags:
      - Utils
      summary: Get FX rates
      description: 'Public endpoint. Returns FX rates from the given currency to USD: `bankTransfer` (Swipelux), `card` (Wirex), and `usdRate` (exchangerate-api.com). `usdRate` is populated for every currency in the invoice Currency enum (G10 + AED/HKD).'
      operationId: get_rate_api_v1_utils_rates__currency__get
      parameters:
      - name: currency
        in: path
        required: true
        schema:
          type: string
          title: Currency
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/utils/bic/{bic}:
    get:
      tags:
      - Utils
      summary: Get BIC (SWIFT) info
      description: Look up bank/branch info by BIC code via API Ninjas.
      operationId: get_bic_info_api_v1_utils_bic__bic__get
      parameters:
      - name: bic
        in: path
        required: true
        schema:
          type: string
          title: Bic
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BicInfoResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/utils/rtn/{routing_number}:
    get:
      tags:
      - Utils
      summary: Validate US routing number (RTN)
      description: Look up US ABA/RTN routing number via API Ninjas.
      operationId: get_rtn_info_api_v1_utils_rtn__routing_number__get
      parameters:
      - name: routing_number
        in: path
        required: true
        schema:
          type: string
          title: Routing Number
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RtnLiteInfoResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/utils/iban/{iban}:
    get:
      tags:
      - Utils
      summary: Validate IBAN
      description: Validate IBAN and return bank/account info via API Ninjas.
      operationId: validate_iban_api_v1_utils_iban__iban__get
      parameters:
      - name: iban
        in: path
        required: true
        schema:
          type: string
          title: Iban
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IbanInfoResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/accounts/utils/parse-iban:
    post:
      tags:
      - Utils
      summary: Parse IBAN from plain text
      description: Extract SEPA IBAN data from plain text using AI. Returns structured ImportIbanSepaData.
      operationId: parse_iban_text_package_alias_api_v1_accounts_utils_parse_iban_post
      security:
      - HTTPBearer: []
      parameters:
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ParseIbanTextRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportIbanSepaData'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/accounts/utils/rates/{currency}:
    get:
      tags:
      - Utils
      summary: Get FX rates
      description: 'Public endpoint. Returns FX rates from the given currency to USD: `bankTransfer` (Swipelux), `card` (Wirex), and `usdRate` (exchangerate-api.com). `usdRate` is populated for every currency in the invoice Currency enum (G10 + AED/HKD).'
      operationId: get_rate_package_alias_api_v1_accounts_utils_rates__currency__get
      parameters:
      - name: currency
        in: path
        required: true
        schema:
          type: string
          title: Currency
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/accounts/utils/bic/{bic}:
    get:
      tags:
      - Utils
      summary: Get BIC (SWIFT) info
      description: Look up bank/branch info by BIC code via API Ninjas.
      operationId: get_bic_info_package_alias_api_v1_accounts_utils_bic__bic__get
      parameters:
      - name: bic
        in: path
        required: true
        schema:
          type: string
          title: Bic
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BicInfoResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/accounts/utils/rtn/{routing_number}:
    get:
      tags:
      - Utils
      summary: Validate US routing number (RTN)
      description: Look up US ABA/RTN routing number via API Ninjas.
      operationId: get_rtn_info_package_alias_api_v1_accounts_utils_rtn__routing_number__get
      parameters:
      - name: routing_number
        in: path
        required: true
        schema:
          type: string
          title: Routing Number
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RtnLiteInfoResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/accounts/utils/iban/{iban}:
    get:
      tags:
      - Utils
      summary: Validate IBAN
      description: Validate IBAN and return bank/account info via API Ninjas.
      operationId: validate_iban_package_alias_api_v1_accounts_utils_iban__iban__get
      parameters:
      - name: iban
        in: path
        required: true
        schema:
          type: string
          title: Iban
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IbanInfoResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    FincodesCity:
      properties:
        id:
          type: string
          title: Id
        country_id:
          type: string
          title: Country Id
        name:
          type: string
          title: Name
      type: object
      required:
      - id
      - country_id
      - name
      title: FincodesCity
    UserAddress:
      properties:
        streetAddress:
          anyOf:
          - type: string
          - type: 'null'
          title: Streetaddress
        addressLine2:
          anyOf:
          - type: string
          - type: 'null'
          title: Addressline2
        city:
          anyOf:
          - type: string
          - type: 'null'
          title: City
        state:
          anyOf:
          - type: string
          - type: 'null'
          title: State
        country:
          anyOf:
          - $ref: '#/components/schemas/CountryCode'
          - type: 'null'
        zip:
          anyOf:
          - type: string
          - type: 'null'
          title: Zip
      type: object
      title: UserAddress
      description: 'Address schema for user.


        Canonical field names: street_address, address_line_2, city, state, country, zip.

        Accepts legacy Align/IBAN field names (street_line_1, street_line_2, postal_code)

        for backward compatibility with existing JSONB data.'
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    RtnLiteInfoResponse:
      properties:
        id:
          type: string
          title: Id
        bank:
          anyOf:
          - $ref: '#/components/schemas/FincodesBank'
          - type: 'null'
        parsed_address:
          anyOf:
          - $ref: '#/components/schemas/UserAddress'
          - type: 'null'
      type: object
      required:
      - id
      title: RtnLiteInfoResponse
      description: Simplified RTN response with only bank and address.
    CountryCode:
      type: string
      enum:
      - AF
      - AX
      - AL
      - DZ
      - AS
      - AD
      - AO
      - AI
      - AQ
      - AG
      - AR
      - AM
      - AW
      - AU
      - AT
      - AZ
      - BS
      - BH
      - BD
      - BB
      - BY
      - BE
      - BZ
      - BJ
      - BM
      - BT
      - BO
      - BQ
      - BA
      - BW
      - BV
      - BR
      - IO
      - BN
      - BG
      - BF
      - BI
      - CV
      - KH
      - CM
      - CA
      - KY
      - CF
      - TD
      - CL
      - CN
      - CX
      - CC
      - CO
      - KM
      - CG
      - CD
      - CK
      - CR
      - CI
      - HR
      - CU
      - CW
      - CY
      - CZ
      - DK
      - DJ
      - DM
      - DO
      - EC
      - EG
      - SV
      - GQ
      - ER
      - EE
      - SZ
      - ET
      - FK
      - FO
      - FJ
      - FI
      - FR
      - GF
      - PF
      - TF
      - GA
      - GM
      - GE
      - DE
      - GH
      - GI
      - GR
      - GL
      - GD
      - GP
      - GU
      - GT
      - GG
      - GN
      - GW
      - GY
      - HT
      - HM
      - VA
      - HN
      - HK
      - HU
      - IS
      - IN
      - ID
      - IR
      - IQ
      - IE
      - IM
      - IL
      - IT
      - JM
      - JP
      - JE
      - JO
      - KZ
      - KE
      - KI
      - KP
      - KR
      - KW
      - KG
      - LA
      - LV
      - LB
      - LS
      - LR
      - LY
      - LI
      - LT
      - LU
      - MO
      - MG
      - MW
      - MY
      - MV
      - ML
      - MT
      - MH
      - MQ
      - MR
      - MU
      - YT
      - MX
      - FM
      - MD
      - MC
      - MN
      - ME
      - MS
      - MA
      - MZ
      - MM
      - NA
      - NR
      - NP
      - NL
      - NC
      - NZ
      - NI
      - NE
      - NG
      - NU
      - NF
      - MK
      - MP
      - 'NO'
      - OM
      - PK
      - PW
      - PS
      - PA
      - PG
      - PY
      - PE
      - PH
      - PN
      - PL
      - PT
      - PR
      - QA
      - RE
      - RO
      - RU
      - RW
      - BL
      - SH
      - KN
      - LC
      - MF
      - PM
      - VC
      - WS
      - SM
      - ST
      - SA
      - SN
      - RS
      - SC
      - SL
      - SG
      - SX
      - SK
      - SI
      - SB
      - SO
      - ZA
      - GS
      - SS
      - ES
      - LK
      - SD
      - SR
      - SJ
      - SE
      - CH
      - SY
      - TW
      - TJ
      - TZ
      - TH
      - TL
      - TG
      - TK
      - TO
      - TT
      - TN
      - TR
      - TM
      - TC
      - TV
      - UG
      - UA
      - AE
      - GB
      - US
      - UM
      - UY
      - UZ
      - VU
      - VE
      - VN
      - VG
      - VI
      - WF
      - EH
      - YE
      - ZM
      - ZW
      title: CountryCode
      description: ISO 3166-1 alpha-2 country codes.
    IbanInfoResponse:
      properties:
        id:
          type: string
          title: Id
        account_number:
          anyOf:
          - type: string
          - type: 'null'
          title: Account Number
        national_bank_code:
          anyOf:
          - type: string
          - type: 'null'
          title: National Bank Code
        national_branch_code:
          anyOf:
          - type: string
          - type: 'null'
          title: National Branch Code
        bic:
          anyOf:
          - $ref: '#/components/schemas/BicInfoResponse'
          - type: 'null'
        country:
          anyOf:
          - $ref: '#/components/schemas/FincodesCountry'
          - type: 'null'
      type: object
      required:
      - id
      title: IbanInfoResponse
      description: IBAN validation response from Fincodes API.
    BicInfoResponse:
      properties:
        id:
          type: string
          title: Id
        address:
          anyOf:
          - type: string
          - type: 'null'
          title: Address
        postcode:
          anyOf:
          - type: string
          - type: 'null'
          title: Postcode
        branch_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Branch Name
        branch_code:
          anyOf:
          - type: string
          - type: 'null'
          title: Branch Code
        country:
          anyOf:
          - $ref: '#/components/schemas/FincodesCountry'
          - type: 'null'
        city:
          anyOf:
          - $ref: '#/components/schemas/FincodesCity'
          - type: 'null'
        bank:
          anyOf:
          - $ref: '#/components/schemas/FincodesBank'
          - type: 'null'
        parsed_address:
          anyOf:
          - $ref: '#/components/schemas/UserAddress'
          - type: 'null'
          description: Parse address fields into UserAddress format.
          readOnly: true
      type: object
      required:
      - id
      - parsed_address
      title: BicInfoResponse
      description: BIC lookup response from Fincodes API.
    RateResponse:
      properties:
        bankTransfer:
          anyOf:
          - type: string
          - type: 'null'
          title: Banktransfer
        card:
          anyOf:
          - type: string
          - type: 'null'
          title: Card
        usdRate:
          anyOf:
          - type: string
          - type: 'null'
          title: Usdrate
      type: object
      title: RateResponse
      description: Combined FX rate response.
    FincodesBank:
      properties:
        id:
          type: string
          title: Id
        country_id:
          type: string
          title: Country Id
        code:
          type: string
          title: Code
        name:
          type: string
          title: Name
      type: object
      required:
      - id
      - country_id
      - code
      - name
      title: FincodesBank
    SlxAccountHolderRelationship:
      type: string
      enum:
      - self
      - employee
      - independent_contractor
      - vendor
      - supplier
      - subsidiary
      - affiliate
      - merchant
      - partner
      - customer
      - landlord
      - family
      - other
      title: SlxAccountHolderRelationship
      description: Relationship of the account holder to the customer.
    ImportIbanSepaData:
      properties:
        iban:
          type: string
          maxLength: 34
          minLength: 15
          title: Iban
        country:
          $ref: '#/components/schemas/CountryCode'
        currency:
          type: string
          maxLength: 3
          minLength: 3
          title: Currency
        accountHolderName:
          type: string
          maxLength: 255
          minLength: 1
          title: Accountholdername
        bankAddress:
          anyOf:
          - type: string
            maxLength: 512
            minLength: 1
          - type: 'null'
          title: Bankaddress
        bankName:
          anyOf:
          - type: string
            maxLength: 255
            minLength: 1
          - type: 'null'
          title: Bankname
        bic:
          anyOf:
          - type: string
            maxLength: 11
            minLength: 8
          - type: 'null'
          title: Bic
        label:
          anyOf:
          - type: string
            maxLength: 255
            minLength: 1
          - type: 'null'
          title: Label
        relationship:
          $ref: '#/components/schemas/SlxAccountHolderRelationship'
          default: self
      type: object
      required:
      - iban
      - country
      - currency
      - accountHolderName
      title: ImportIbanSepaData
      description: SEPA account data parsed from free-form text.
    ParseIbanTextRequest:
      properties:
        text:
          type: string
          maxLength: 5000
          minLength: 10
          title: Text
      type: object
      required:
      - text
      title: ParseIbanTextRequest
      description: Request to parse plain text and extract IBAN data.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FincodesCountry:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
      - id
      - name
      title: FincodesCountry
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      x-default: Bearer <token>
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Alternative HEVN API key header. The CLI defaults to Authorization Bearer unless configured with HEVN_API_KEY_HEADER=X-Api-Key.