Rentberry User Verification API

User Verification

OpenAPI Specification

rentberry-user-verification-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Rentberry User Verification API
  description: Renting Done Right. Finally.
  version: 4
tags:
- name: User Verification
  description: User Verification
paths:
  /v{version}/user/verify/callback:
    post:
      tags:
      - User Verification
      summary: Handle IDology verification callback.
      description: Available since API version 1. Webhook endpoint for IDology verification service callbacks.
      operationId: post_api_v1_user_verify_callback
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
          pattern: \d+
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: IDology callback payload
              type: object
      responses:
        '200':
          description: Callback processed successfully.
        '400':
          description: Invalid callback payload
  /v{version}/user/verify:
    post:
      tags:
      - User Verification
      summary: Start user verification process (US only).
      description: Available since API version 1. Step 1 of US user verification process using IDology.
      operationId: post_api_v1_user_verify
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
          pattern: \d+
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountVerifyType'
      responses:
        '200':
          description: Verification started successfully.
          content:
            application/json:
              schema:
                properties:
                  user:
                    $ref: '#/components/schemas/User2'
                  status:
                    type: boolean
                  questions:
                    type: boolean
                  transactionId:
                    type: integer
                  questionsData:
                    type: array
                    items:
                      type: object
                type: object
        '400':
          description: Validation failed or phone not verified
        '401':
          description: Unauthorized
        '409':
          description: Already verified or max attempts reached
      security:
      - XAuthToken: []
  /v{version}/user/verify/verify-init:
    post:
      tags:
      - User Verification
      summary: Initialize verification process (non-US).
      description: Available since API version 1. Step 1 of international user verification process.
      operationId: post_api_v1_user_verify_init
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
          pattern: \d+
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerifyInitType'
      responses:
        '200':
          description: Verification initialized successfully.
          content:
            application/json:
              schema:
                properties:
                  transactionId:
                    description: Transaction ID for document upload
                    type: integer
                type: object
        '400':
          description: Validation failed or phone not verified
        '401':
          description: Unauthorized
        '409':
          description: Already verified or has pending request
      security:
      - XAuthToken: []
  /v{version}/user/verify/verify-by-documents:
    post:
      tags:
      - User Verification
      summary: Upload documents for verification (non-US).
      description: Available since API version 1. Step 2 of international user verification process.
      operationId: post_api_v1_user_verify_by_documents
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
          pattern: \d+
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/VerifyByDocumentsType'
      responses:
        '200':
          description: Documents uploaded successfully.
        '400':
          description: Invalid documents or validation failed
        '401':
          description: Unauthorized
        '409':
          description: Already verified or has pending request
      security:
      - XAuthToken: []
  /v{version}/user/verify/verify-document-status:
    get:
      tags:
      - User Verification
      summary: Check document verification status (non-US).
      description: Available since API version 1. Step 3 of international user verification - check processing status.
      operationId: get_api_v1_user_verify_document_status
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
          pattern: \d+
      responses:
        '200':
          description: Returns verification status.
          content:
            application/json:
              schema:
                properties:
                  status:
                    description: Verification status or null if no request
                    type:
                    - string
                    - 'null'
                type: object
        '401':
          description: Unauthorized
        '403':
          description: Verification violated
      security:
      - XAuthToken: []
  /v{version}/user/verify/answer:
    post:
      tags:
      - User Verification
      summary: Submit verification question answers (US only).
      description: Available since API version 1. Step 2 of US user verification process.
      operationId: post_api_v1_user_verify_answers
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
          pattern: \d+
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnswersVerifyQuestionsType'
      responses:
        '200':
          description: Answers submitted successfully.
          content:
            application/json:
              schema:
                properties:
                  user:
                    $ref: '#/components/schemas/User2'
                  status:
                    description: Verification status
                    type: boolean
                type: object
        '400':
          description: Invalid answers or validation failed
        '401':
          description: Unauthorized
        '409':
          description: Already verified
      security:
      - XAuthToken: []
components:
  schemas:
    UserOauthProvider:
      properties:
        id:
          type: integer
        provider:
          type: string
        providerId:
          type: string
        connectId:
          type: string
        nameFirst:
          type: string
        nameLast:
          type: string
        pictureUrl:
          type: string
        appId:
          type: string
      type: object
    VerifyInitType:
      required:
      - nameFirst
      - nameLast
      properties:
        nameFirst:
          type: string
        nameLast:
          type: string
      type: object
    UserAddress2:
      required:
      - street
      - houseNumber
      - city
      - zip
      properties:
        street:
          type: string
          maxLength: 255
          minLength: 1
        houseNumber:
          type: string
          maxLength: 255
          minLength: 1
        streetType:
          type:
          - string
          - 'null'
          maxLength: 10
        city:
          type: string
          maxLength: 255
          minLength: 3
        state:
          $ref: '#/components/schemas/State2'
        zip:
          type: string
          maxLength: 9
          minLength: 5
      type: object
    UserCreditScore:
      properties:
        score:
          type: integer
        creditScoreUpdatedAt:
          type: string
          format: date-time
        alert:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      type: object
    RentalPaymentAccount:
      properties:
        stripeAccountId:
          type: string
        isStripeOnboardingFinished:
          type: boolean
          default: false
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      type: object
    UserStripeCustomer2:
      properties:
        customerId:
          type: string
        user:
          $ref: '#/components/schemas/User2'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      type: object
    AccountAddressType:
      required:
      - street
      - houseNumber
      - city
      - zip
      - stateId
      properties:
        street:
          type: string
        houseNumber:
          type: string
        streetType:
          type: string
        city:
          type: string
        zip:
          type: string
        stateId:
          type: integer
      type: object
    State2:
      properties:
        id:
          type: integer
        shortName:
          type:
          - string
          - 'null'
          default: null
          maxLength: 200
          minLength: 1
        name:
          type:
          - string
          - 'null'
          default: null
          maxLength: 255
          minLength: 1
      type: object
    User2:
      required:
      - nameFirst
      - nameLast
      - username
      - phone
      - birthday
      properties:
        hasPassword:
          type: boolean
        phoneCountryCode:
          type: string
        id:
          type: integer
        nameFirst:
          type: string
          maxLength: 255
          minLength: 2
        nameMiddle:
          type: string
          maxLength: 255
          minLength: 1
        nameLast:
          type: string
          maxLength: 255
          minLength: 2
        company:
          $ref: '#/components/schemas/Company'
        companyName:
          type: string
          maxLength: 255
          minLength: 1
        username:
          type: string
          maxLength: 255
          minLength: 1
        profilePictureThumbs:
          type: string
        phone:
          type: string
          maxLength: 15
          minLength: 7
        birthday:
          type: string
          format: date-time
        bio:
          type: string
          maxLength: 1500
        oauthProviders:
          type: array
          items:
            $ref: '#/components/schemas/UserOauthProvider'
        address:
          $ref: '#/components/schemas/UserAddress2'
        creditScore:
          $ref: '#/components/schemas/UserCreditScore'
        criminalReport:
          $ref: '#/components/schemas/UserCriminalReport'
        stripeCustomer:
          $ref: '#/components/schemas/UserStripeCustomer2'
        active:
          type: boolean
          default: true
        fromNotBerryForbiddenCountry:
          type: boolean
          default: false
        verified:
          type: boolean
          default: false
        emailVerified:
          type: boolean
          default: false
        phoneVerified:
          type: boolean
          default: false
        registered:
          type: boolean
          default: true
        emailNotVerifiedAfter:
          type: string
          format: date-time
        lastActiveAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        statusType:
          type: string
          default: regular
          enum:
          - regular
          - premium
          - premium_pending
          - vip
          - vip_pending
        authToken:
          type: string
        deleted:
          type: boolean
          default: false
        rentalPaymentAccount:
          $ref: '#/components/schemas/RentalPaymentAccount'
        newsletterSubscription:
          type: boolean
          default: false
        premiumPartner:
          type: boolean
          default: false
        locale:
          type: string
          default: en_US
          enum:
          - en_US
          - es_ES
        currency:
          type: string
        lengthUnit:
          type: string
          enum:
          - m
          - ft
        isRaiUser:
          type: boolean
          default: false
      type: object
    AnswersVerifyQuestionsType:
      required:
      - idNumber
      - answers
      properties:
        idNumber:
          type: integer
        answers:
          type: array
          items:
            $ref: '#/components/schemas/VerifyAnswerType'
      type: object
    AccountVerifyType:
      required:
      - nameFirst
      - nameLast
      - birthday
      - ssn
      - address
      properties:
        nameFirst:
          type: string
        nameLast:
          type: string
        birthday:
          type: integer
        ssn:
          type: string
        address:
          $ref: '#/components/schemas/AccountAddressType'
      type: object
    Company:
      properties:
        id:
          type: integer
        name:
          type: string
          maxLength: 255
          minLength: 1
        phone:
          type: integer
          maxLength: 15
          minLength: 7
        website:
          type: string
          maxLength: 255
          minLength: 1
        logoThumbs:
          type: string
        email:
          type: string
          maxLength: 255
          minLength: 1
        city:
          type: string
          maxLength: 255
          minLength: 1
        countryCode:
          type: string
          maxLength: 2
          minLength: 2
        provider:
          type: string
        externalId:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      type: object
    VerifyAnswerType:
      required:
      - type
      - answer
      properties:
        type:
          type: string
        answer:
          type: string
      type: object
    UserCriminalReport:
      properties:
        criminalRecordFound:
          type: boolean
          default: false
        status:
          type: integer
          maxLength: 10
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      type: object
    VerifyByDocumentsType:
      required:
      - image
      - backImage
      - faceImage
      - queryId
      - countryCode
      - documentType
      properties:
        image: []
        backImage: []
        faceImage: []
        queryId:
          type: string
        countryCode:
          type: string
        documentType:
          type: string
          enum:
          - driverLicense
          - idCard
          - passport
      type: object