openapi: 3.1.0
x-stoplight:
  id: pctwv62vzxrk6
info:
  title: Wunder MaaS API
  description: Wunder Mobility API for MaaS Integrations
  version: 1.0.0
  contact:
    name: Wunder Mobility GmbH
    url: 'https://wundermobility.com'
    email: info@wundermobility.com
servers:
  - url: 'https://{environment}.api.gourban.services/v1/{tenant}/maas'
    description: Wunder MaaS API
    variables:
      environment:
        default: go
        enum:
          - go
          - go-staging
      tenant:
        default: demo
        description: Tenant identifier of your system. Usually 8 characters.
tags:
  - name: maas
    description: MaaS endpoints
  - name: Customers
    description: Customer endpoints
  - name: Bookings
    description: Bookings endpoints
  - name: Rentals
    description: Rentals endpoints
  - name: Invoices
    description: Invoices endpoints
paths:
  /bookings:
    get:
      summary: GET bookings
      operationId: getBookingsByBranch
      parameters:
        - name: branchId
          in: query
          required: false
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BookingListDTO'
      tags:
        - Bookings
        - maas
  '/bookings/{bookingId}':
    get:
      summary: 'GET bookings/{bookingId}'
      operationId: getBookingById
      parameters:
        - name: bookingId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Booking'
      tags:
        - Bookings
        - maas
  /customers:
    get:
      summary: GET customers
      operationId: findAllCustomers
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/MaaSUser"
      tags:
        - Customers
        - maas
    post:
      summary: POST customers
      operationId: createMaaSUser
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddMaaSUser'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MaaSUser'
      tags:
        - Customers
        - maas
  '/customers/{impersonationId}':
    get:
      summary: 'GET customers/{impersonationId}'
      operationId: findCustomerById
      parameters:
        - name: impersonationId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MaaSUser'
      tags:
        - Customers
        - maas
    patch:
      summary: 'PATCH customers/{impersonationId}'
      operationId: updateUserById
      parameters:
        - name: impersonationId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchMaaSUser'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MaaSUser'
      tags:
        - Customers
        - maas
  '/customers/{impersonationId}/verifications':
    post:
      summary: 'POST customers/{impersonationId}/verifications'
      operationId: createVerification
      parameters:
        - name: impersonationId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MaasCreateVerificationRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerificationAttempt'
      tags:
        - Customers
        - maas
  /invoices:
    get:
      summary: GET invoices
      operationId: findAllInvoices
      parameters:
        - name: branchId
          in: query
          required: false
          schema:
            type: integer
            format: int64
        - name: invoiceType
          in: query
          required: false
          schema:
            type: string
            enum:
              - REGULAR
              - BUSINESS
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/InvoiceListDTO'
      tags:
        - Invoices
        - maas
  '/invoices/{invoiceId}':
    get:
      summary: 'GET invoices/{invoiceId}'
      operationId: findInvoiceById
      parameters:
        - name: invoiceId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LineItemInvoice'
      tags:
        - Invoices
        - maas
  '/invoices/{invoiceId}/set-paid-externally':
    post:
      summary: "POST invoices/{invoiceId}/set-paid-externally"
      operationId: setInvoicePaidExternally
      description: |
        Sets the state of the invoice to `PAID_EXTERNALLY`.
        > Requires Permission `MAAS_INVOICE_UPDATE`
      parameters:
        - name: invoiceId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '204':
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Void"
      tags:
        - Invoices
        - maas
  '/rentals/{rentalId}':
    get:
      summary: 'GET rentals/{rentalId}'
      operationId: getRentalById
      parameters:
        - name: rentalId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Rental'
        '404':
          description: Not Found
      tags:
        - Rentals
        - maas
components:
  schemas:
    JsonGUser:
      type: object
      properties:
        id:
          type: integer
          format: int64
        firstName:
          type: string
        lastName:
          type: string
    JsonGroup:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
        email:
          type: string
        phone:
          type: string
    BillingInformation:
      type: object
      properties:
        legalName:
          type: string
        vatNumber:
          type: string
        registrationNumber:
          type: string
        iban:
          type: string
        logoBase64:
          type: string
        currencySymbol:
          type: string
    AddressInfo:
      type: object
      properties:
        street:
          type: string
        postcode:
          type: string
        city:
          type: string
        country:
          type: string
    BranchContactInfo:
      type: object
      properties:
        publicName:
          type: string
        websiteUrl:
          type: string
        billingInformation:
          $ref: '#/components/schemas/BillingInformation'
        address:
          $ref: '#/components/schemas/AddressInfo'
        email:
          type: string
        phone:
          type: string
        customFields:
          type: string
    JsonBranch:
      type: object
      properties:
        id:
          type: integer
          format: int64
        code:
          type: string
        name:
          type: string
        contactInfo:
          $ref: '#/components/schemas/BranchContactInfo'
        currency:
          type: string
    JsonVehicle:
      type: object
      properties:
        id:
          type: integer
          format: int64
        licensePlate:
          type: string
        code:
          type: string
        name:
          type: string
        chargingState:
          type: string
          enum:
            - UNKNOWN
            - UNPLUGGED
            - PLUGGED
            - CHARGING
        stateOfCharge:
          type: integer
          format: int32
        remainingKilometers:
          type: integer
          format: int32
        categoryId:
          type: integer
          format: int64
        benefits:
          type: string
          enum:
            - DISCOUNTED
            - REWARDED
        rewardStationIds:
          type: array
          items:
            type: integer
            format: int64
        position:
          $ref: '#/components/schemas/Point'
        rentalState:
          type: string
          enum:
            - AVAILABLE
            - RESERVATION
            - DRIVING
            - PARKING
            - DELIVERED
        module:
          $ref: '#/components/schemas/JsonModule'
    BigDecimal:
      type: object
      properties: { }
    JsonRentalPrice:
      type: object
      properties:
        priceGross:
          $ref: '#/components/schemas/BigDecimal'
    JsonRental:
      type: object
      properties:
        id:
          type: integer
          format: int64
        state:
          type: string
          enum:
            - RESERVATION
            - ACTIVE
            - EXPIRED
            - ENDED
            - CANCELLED
            - ENDED_NO_MOVEMENT
        startTime:
          type: string
          format: date-time
        endTime:
          type: string
          format: date-time
        startAddress:
          type: string
        vehicle:
          $ref: '#/components/schemas/JsonVehicle'
        price:
          $ref: '#/components/schemas/JsonRentalPrice'
        startKilometers:
          type: number
          format: double
        endKilometers:
          type: number
          format: double
    BookingPrice:
      type: object
      properties:
        estimated:
          type: boolean
        grossPrice:
          $ref: '#/components/schemas/BigDecimal'
        netPrice:
          $ref: '#/components/schemas/BigDecimal'
        currency:
          type: string
    BookingListDTO:
      type: object
      properties:
        id:
          type: integer
          format: int64
        state:
          type: string
          enum:
            - BOOKED
            - APPROVED
            - DELIVERED
            - SUCCESSFUL
            - CANCELED
            - ABORTED
            - EXPIRED
            - DECLINED
        startTime:
          type: string
          format: date-time
        endTime:
          type: string
          format: date-time
        vehicleCategoryId:
          type: integer
          format: int64
        type:
          type: string
          enum:
            - STATION
            - FLOATING
        rentalType:
          type: string
          enum:
            - PERSONAL
            - BUSINESS
            - SERVICE
        guser:
          $ref: '#/components/schemas/JsonGUser'
        group:
          $ref: '#/components/schemas/JsonGroup'
        branch:
          $ref: '#/components/schemas/JsonBranch'
        endBranch:
          $ref: '#/components/schemas/JsonBranch'
        rental:
          $ref: '#/components/schemas/JsonRental'
        vehicle:
          $ref: '#/components/schemas/JsonVehicle'
        price:
          $ref: '#/components/schemas/BookingPrice'
    UserDevice:
      type: object
      properties:
        deviceFamily:
          type: string
        osFamily:
          type: string
        osMajor:
          type: string
        osMinor:
          type: string
        osPatch:
          type: string
        osPatchMinor:
          type: string
        userAgentFamily:
          type: string
        userAgentMajor:
          type: string
        userAgentMinor:
          type: string
        userAgentPatch:
          type: string
    Balance:
      type: object
      properties:
        id:
          type: integer
          format: int64
        branchId:
          type: integer
          format: int64
        ownerId:
          type: integer
          format: int64
        value:
          $ref: '#/components/schemas/BigDecimal'
        remainingVouchersGrossValue:
          $ref: '#/components/schemas/BigDecimal'
        name:
          type: string
        defaultBalance:
          type: boolean
        currency:
          type: string
    Credits:
      type: object
      properties:
        remainingValueNet:
          $ref: '#/components/schemas/BigDecimal'
        remainingValueGross:
          $ref: '#/components/schemas/BigDecimal'
    Annotation:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
        properties:
          type: string
    GUser:
      type: object
      properties:
        id:
          type: integer
          format: int64
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        firstName:
          type: string
        lastName:
          type: string
        email:
          type: string
        birthdate:
          type: string
          format: date
        phone:
          type: string
        userDevice:
          $ref: '#/components/schemas/UserDevice'
        customProperties:
          type: string
        dashboardProperties:
          type: string
        phoneIsVerified:
          type: boolean
        emailIsVerified:
          type: boolean
        licenseExpirationDate:
          type: string
          format: date
        licenseVerificationState:
          type: string
          enum:
            - UNVERIFIED
            - CREATED
            - PROCESSING
            - VERIFIED
            - REJECTED
            - RETRY
            - VERIFIED_BUT_NEEDS_CHECK
            - EXPIRED_LICENSE
            - REVIEW
            - PENDING_REVERIFICATION
        manualVerificationState:
          type: string
          enum:
            - UNVERIFIED
            - PROCESSING
            - VERIFIED
            - REJECTED
            - RETRY
        paymentSourceIsAvailable:
          type: boolean
        paymentState:
          type: string
          enum:
            - NONE
            - PUSH_INITIATED
            - PUSH_COMPLETED
            - SOURCE_ADDED
            - INVOICING
        sourceType:
          type: string
          enum:
            - APPLE_PAY
            - CREDIT_CARD
            - GOOGLE_PAY
            - PAY_PAL
            - IDEAL
            - SOFORT
            - BANCONTACT
            - KLARNA
            - GENERIC_PUSH
            - GENERIC_RECURRING
        paymentStates:
          type: integer
          format: int64
        creditStatus:
          type: string
          enum:
            - PENDING
            - GREEN
            - YELLOW
            - RED
            - FAILED
        signupFeeSettled:
          type: boolean
        street:
          type: string
        postcode:
          type: string
        city:
          type: string
        country:
          type: string
        referralCode:
          type: string
        blockState:
          type: string
          enum:
            - NOT_BLOCKED
            - BLOCKED_UNKNOWN
            - BLOCKED_BY_ADMIN
            - BLOCKED_BY_ADMINDELETE
            - GROUP_DELETED
            - GROUP_BLOCKED_MANUAL_APPROVAL_REQUIRED
            - GROUP_BLOCKED_MANUAL_APPROVAL_REJECTED
        receiveNewsletter:
          type: boolean
        newsletterOptions:
          $ref: "#/components/schemas/NewsletterOptions"
        rides:
          type: integer
          format: int64
        ridesKilometers:
          type: number
          format: double
        co2SavedInG:
          type: number
          format: double
        homeBillableBranchId:
          type: integer
          format: int64
        fileIds:
          type: array
          items:
            type: integer
            format: int64
        balances:
          type: array
          items:
            $ref: '#/components/schemas/Balance'
        credits:
          $ref: '#/components/schemas/Credits'
        annotations:
          type: array
          items:
            $ref: '#/components/schemas/Annotation'
        signInMethods:
          type: string
          enum:
            - EMAIL
            - SMS
            - SOCIAL_GOOGLE
            - SOCIAL_APPLE
            - SOCIAL_FACEBOOK
            - API
            - PIM_OPENID
        drivingLicenseCategories:
          type: array
          items:
            type: string
        impersonateUuid:
          type: string
        authId:
          type: string
        requestedDeletion:
          type: boolean
    Part:
      type: object
      properties:
        name:
          type: string
        code:
          type: string
        critical:
          type: boolean
        posX:
          type: number
          format: double
        posY:
          type: number
          format: double
    VehicleCategoryFeature:
      type: object
      properties:
        icon:
          type: string
        title:
          type: string
    SharedVehicleProperties:
      type: object
      properties:
        imageUrl:
          type: string
        checksum:
          type: string
        parts:
          type: array
          items:
            $ref: '#/components/schemas/Part'
        capacity:
          type: integer
          format: int32
        cancellationTags:
          type: array
          items:
            type: string
        applicableMaintenanceActionKeys:
          type: array
          items:
            type: string
        vehicleCategoryFeatures:
          type: array
          items:
            $ref: '#/components/schemas/VehicleCategoryFeature'
        concurrentRentalCount:
          type: integer
          format: int32
        concurrentBookingCount:
          type: integer
          format: int32
        proximityCheckForServiceAppToggle:
          type: boolean
        proximityCheckForServiceAppDistanceInMeters:
          type: integer
          format: int32
        attributes:
          type: string
    SOCLevels:
      type: object
      properties:
        medium:
          type: integer
          format: int32
        low:
          type: integer
          format: int32
        critical:
          type: integer
          format: int32
    IoTBatteryLevels:
      type: object
      properties:
        medium:
          type: number
          format: float
        low:
          type: number
          format: float
        critical:
          type: number
          format: float
    CoreVehicleProperties:
      type: object
      properties:
        socLevels:
          $ref: '#/components/schemas/SOCLevels'
        ioTBatteryLevels:
          $ref: '#/components/schemas/IoTBatteryLevels'
        rentalAdditionPriceCalcs:
          type: string
        priceCalcKey:
          type: string
        rentalRequirementsKey:
          type: string
        preEndRentalActionsKey:
          type: string
        remainingKilometers:
          type: integer
          format: int32
        chargingTimeFactor:
          type: number
          format: double
        cooldownTimeSeconds:
          type: integer
          format: int64
        bookingQuota:
          type: number
          format: double
        maxSpeedInWarningArea:
          type: integer
          format: int32
        maxSpeed:
          type: integer
          format: int32
        useCardReaderLedsOnVehicleCommand:
          type: boolean
        bookingVehicleSelectionMinSoC:
          type: integer
          format: int64
        bookingVehicleSelectionMethod:
          type: string
          enum:
            - TIME_SINCE_LAST_RENTAL
            - SOC_MILEAGE
            - LOWEST_IOT_VOLTAGE
            - IOT_ASC_MILEAGE_ASC
            - IOT_ASC_SOC_DESC_MILEAGE_ASC
        approachVehicleActions:
          type: array
          items:
            type: string
            enum:
              - START
              - STOP
              - SET_OUT_OF_ORDER
              - SET_OPERATIONAL
              - OPEN_SADDLE
              - LOCATE
              - REFRESH
              - DELAY
              - UPDATE_BRANCH_WITH_BUSINESS_AREA_STRICT
              - ADD_ANNOTATION
              - REMOVE_ANNOTATION
              - SET_MAX_SPEED
              - LOCK
              - UNLOCK
              - OPEN_TAILBOX
              - LOCK_TAILBOX
              - UNLOCK_TAILBOX
        deployVehicleActions:
          type: array
          items:
            type: string
            enum:
              - START
              - STOP
              - SET_OUT_OF_ORDER
              - SET_OPERATIONAL
              - OPEN_SADDLE
              - LOCATE
              - REFRESH
              - DELAY
              - UPDATE_BRANCH_WITH_BUSINESS_AREA_STRICT
              - ADD_ANNOTATION
              - REMOVE_ANNOTATION
              - SET_MAX_SPEED
              - LOCK
              - UNLOCK
              - OPEN_TAILBOX
              - LOCK_TAILBOX
              - UNLOCK_TAILBOX
        leaveVehicleActions:
          type: array
          items:
            type: string
            enum:
              - START
              - STOP
              - SET_OUT_OF_ORDER
              - SET_OPERATIONAL
              - OPEN_SADDLE
              - LOCATE
              - REFRESH
              - DELAY
              - UPDATE_BRANCH_WITH_BUSINESS_AREA_STRICT
              - ADD_ANNOTATION
              - REMOVE_ANNOTATION
              - SET_MAX_SPEED
              - LOCK
              - UNLOCK
              - OPEN_TAILBOX
              - LOCK_TAILBOX
              - UNLOCK_TAILBOX
        closeVehicleActions:
          type: array
          items:
            type: string
            enum:
              - START
              - STOP
              - SET_OUT_OF_ORDER
              - SET_OPERATIONAL
              - OPEN_SADDLE
              - LOCATE
              - REFRESH
              - DELAY
              - UPDATE_BRANCH_WITH_BUSINESS_AREA_STRICT
              - ADD_ANNOTATION
              - REMOVE_ANNOTATION
              - SET_MAX_SPEED
              - LOCK
              - UNLOCK
              - OPEN_TAILBOX
              - LOCK_TAILBOX
              - UNLOCK_TAILBOX
        tompProperties:
          type: string
        rentalOperationOverrides:
          type: string
          enum:
            - START
            - END
            - DRIVE
            - PARK
            - OPEN_TAILBOX
            - PRE_END
            - PRE_START
        useIoTSoCLevel:
          type: boolean
        useIoTBatteryLevel:
          type: boolean
        useHelmetsTracking:
          type: boolean
        ignoreSoC:
          type: boolean
        triggerDockingInfoUpdateEnabled:
          type: boolean
        triggerDockingInfoUpdateCommand:
          type: string
        stationChargingToggle:
          type: boolean
        chargingLimit:
          type: integer
          format: int32
        useOutOfRentalActivityMonitoring:
          type: boolean
        type:
          type: string
    VehicleCategory:
      type: object
      properties:
        id:
          type: integer
          format: int64
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        createdBy:
          $ref: '#/components/schemas/GUser'
        updatedBy:
          $ref: '#/components/schemas/GUser'
        parentId:
          type: integer
          format: int64
        name:
          type: string
        description:
          type: string
        appProperties:
          type: string
        dashboardProperties:
          type: string
        sharedProperties:
          $ref: '#/components/schemas/SharedVehicleProperties'
        coreProperties:
          $ref: '#/components/schemas/CoreVehicleProperties'
        bookable:
          type: boolean
        vehicleCommandIds:
          type: array
          items:
            type: integer
            format: int64
        actionIds:
          type: array
          items:
            type: integer
            format: int64
    CoordinateSequence:
      type: object
      properties: { }
    Envelope:
      type: object
      properties: { }
    PrecisionModel:
      type: object
      properties:
        scale:
          type: number
          format: double
    CoordinateSequenceFactory:
      type: object
      properties: { }
    GeometryFactory:
      type: object
      properties:
        precisionModel:
          $ref: '#/components/schemas/PrecisionModel'
        coordinateSequenceFactory:
          $ref: '#/components/schemas/CoordinateSequenceFactory'
        SRID:
          type: integer
          format: int32
    Object:
      type: object
      properties: { }
    Point:
      type: object
      properties:
        coordinates:
          $ref: '#/components/schemas/CoordinateSequence'
        envelope:
          $ref: '#/components/schemas/Envelope'
        factory:
          $ref: '#/components/schemas/GeometryFactory'
        SRID:
          type: integer
          format: int32
        userData:
          $ref: '#/components/schemas/Object'
    Duration:
      type: object
      properties:
        seconds:
          type: integer
          format: int64
    Price:
      type: object
      properties:
        interval:
          type: integer
          format: int64
        gross:
          $ref: '#/components/schemas/BigDecimal'
        grossString:
          type: string
        net:
          $ref: '#/components/schemas/BigDecimal'
        netString:
          type: string
        timeUnit:
          type: string
          enum:
            - NANOSECONDS
            - MICROSECONDS
            - MILLISECONDS
            - SECONDS
            - MINUTES
            - HOURS
            - DAYS
    RentalDiscount:
      type: object
      properties:
        discountPercentage:
          $ref: '#/components/schemas/BigDecimal'
        discountValue:
          $ref: '#/components/schemas/BigDecimal'
    PricingInformation:
      type: object
      properties:
        unlock:
          $ref: '#/components/schemas/Price'
        driving:
          $ref: '#/components/schemas/Price'
        parking:
          $ref: '#/components/schemas/Price'
        reservation:
          $ref: '#/components/schemas/Price'
        drivingPerKilometer:
          $ref: '#/components/schemas/Price'
        estimation:
          $ref: '#/components/schemas/Price'
        discount:
          $ref: '#/components/schemas/RentalDiscount'
        surcharge:
          $ref: '#/components/schemas/BigDecimal'
    Voucherable:
      type: object
      properties:
        id:
          type: integer
          format: int64
        branchId:
          type: integer
          format: int64
        value:
          $ref: '#/components/schemas/BigDecimal'
        code:
          type: string
        name:
          type: string
        description:
          type: string
        iconUrl:
          type: string
        state:
          type: string
          enum:
            - INACTIVE
            - ACTIVE
        maxRedeemLimit:
          type: integer
          format: int64
        redeemCount:
          type: integer
          format: int64
        signup:
          type: boolean
        showInUserApp:
          type: boolean
        applicableBranchIds:
          type: array
          items:
            type: integer
            format: int64
        applicableVehicleCategoryIds:
          type: array
          items:
            type: integer
            format: int64
        customProperties:
          type: string
    ConstraintVoucher:
      type: object
      properties:
        rentalRebate:
          $ref: '#/components/schemas/BigDecimal'
        discount:
          $ref: '#/components/schemas/BigDecimal'
        numberOfRentals:
          type: integer
          format: int32
        remainingNumberOfRentals:
          type: integer
          format: int32
        validFrom:
          type: string
          format: date-time
        validUntil:
          type: string
          format: date-time
        status:
          type: string
          enum:
            - ACTIVE
            - EXPIRED
            - USED_UP
            - CANCELED
            - NOT_REDEEMED
            - PENDING
        validityTimeUnit:
          type: string
          enum:
            - NANOS
            - MICROS
            - MILLIS
            - SECONDS
            - MINUTES
            - HOURS
            - HALF_DAYS
            - DAYS
            - WEEKS
            - MONTHS
            - YEARS
            - DECADES
            - CENTURIES
            - MILLENNIA
            - ERAS
            - FOREVER
        validityPeriod:
          type: integer
          format: int32
        validityDateUntil:
          type: string
          format: date-time
        id:
          type: integer
          format: int64
        voucherable:
          $ref: '#/components/schemas/Voucherable'
        voucherableCode:
          type: string
        branch:
          type: integer
          format: int64
        branchId:
          type: integer
          format: int64
        name:
          type: string
        voucherType:
          type: string
          enum:
            - SIGNUP
            - PACKAGE
            - REFERRAL
            - PROMOTION
            - BY_ADMIN
            - UNKNOWN
            - SETTLEMENT
            - TOP_UP
            - CORRECTION
            - SUBSCRIPTION
            - REWARD
            - SINGLE_USE
            - SETTLEMENT_EXTERNAL
            - CASHBACK
            - CUSTOMER_CARE
            - COLLECTION_INVOICE
            - RIDE_PASS
        currency:
          type: string
        invoiceId:
          type: integer
          format: int64
        extInvoiceNumber:
          type: string
        valueNet:
          $ref: '#/components/schemas/BigDecimal'
        remainingValueNet:
          $ref: '#/components/schemas/BigDecimal'
        valueGross:
          $ref: '#/components/schemas/BigDecimal'
        remainingValueGross:
          $ref: '#/components/schemas/BigDecimal'
        redemptionCode:
          type: string
        description:
          type: string
        guser:
          $ref: '#/components/schemas/JsonGUser'
        signup:
          type: boolean
        applicableBranchIds:
          type: array
          items:
            type: integer
            format: int64
        applicableVehicleCategoryIds:
          type: array
          items:
            type: integer
            format: int64
        requiredAnnotationIds:
          type: array
          items:
            type: integer
            format: int64
        redeemWindowStart:
          type: string
          format: date-time
        redeemWindowEnd:
          type: string
          format: date-time
        prerequisitesMet:
          type: boolean
    JsonModule:
      type: object
      properties:
        id:
          type: integer
          format: int64
        externalId:
          type: string
        secondaryExternalId:
          type: string
        iccid:
          type: string
        macAddress:
          type: string
        type:
          type: string
          enum:
            - NIU
            - NIU_MC
            - DUMMY
            - NIU_PRTCL
            - NINEBOT_ES2
            - CUCA_BIKE
            - TRACKER
            - COMODULE_NINEBOT_ES2
            - GOVECS_GOT
            - NINEBOT_ES2_TLT
            - MANUAL_KICKSCOOTER
            - MANUAL_BICYCLE
            - NIU_TLT
            - SUPER_SOCO_TLT_125
            - CAR_TLT
            - SEGWAY_V1
            - NIU_V2
            - CAR_TLT_RELAIS
            - LANNMARKER_ZIMO
            - INVERS_CAR
            - DEVICE_CLOUD
            - NIU_V2_READ
    Vehicle:
      type: object
      properties:
        id:
          type: integer
          format: int64
        code:
          type: string
        uuid:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        branchId:
          type: integer
          format: int64
        licensePlate:
          type: string
        stateOfCharge:
          type: integer
          format: int32
        iotStateOfCharge:
          type: integer
          format: int32
        iotModuleLevel:
          type: number
          format: float
        categoryId:
          type: integer
          format: int64
        category:
          $ref: '#/components/schemas/VehicleCategory'
        serviceState:
          type: string
          enum:
            - OPERATIONAL
            - LOW_SOC
            - OUT_OF_ORDER
            - RETIRED
            - CRITICAL_SOC
            - IN_SERVICE
        serviceStateV2:
          type: string
          enum:
            - FUNCTIONAL
            - INSPECT
            - RELOCATE
            - COLLECT
            - SERVICE_ON_SITE
            - SERVICE_WORKSHOP
            - SERVICE_EXTERNAL
            - REPLACE
            - IMPOUNDED
            - LOST
            - RETIRED
            - OTHER
            - READY_FOR_DEPLOYMENT
            - MAINTENANCE
            - WAITING_FOR_PARTS
            - UNREPAIRABLE
            - DEFLEETED
            - OPERATIONAL_HOLD
            - AWAITING_ACTION
            - SERVICE_MECHANICS
            - REGULATORY_INSPECTION_READY
            - REGULATORY_INSPECTION
            - SERVICE_WORKSHOP_INSURANCE
            - SERVICE_WORKSHOP_QUEUE
            - READY_FOR_DEPLOYMENT_NEW
            - COLLECT_EXTERNAL
        chargingState:
          type: string
          enum:
            - UNKNOWN
            - UNPLUGGED
            - PLUGGED
            - CHARGING
        batteryLevel:
          type: string
          enum:
            - UNKNOWN
            - HIGH
            - LOW
            - CRITICAL
            - MEDIUM
        powerState:
          type: string
          enum:
            - UNKNOWN
            - 'OFF'
            - 'ON'
        carLockState:
          type: string
          enum:
            - UNKNOWN
            - 'UNLOCKED'
            - 'LOCKED'
        reward:
          type: boolean
        rewardInvalidationAt:
          type: string
          format: date-time
        position:
          $ref: '#/components/schemas/Point'
        address:
          type: string
        kilometers:
          type: number
          format: double
        rentalState:
          type: string
          enum:
            - AVAILABLE
            - RESERVATION
            - DRIVING
            - PARKING
            - DELIVERED
        legalInspectionDate:
          type: string
          format: date
        name:
          type: string
        vin:
          type: string
        remainingKilometers:
          type: integer
          format: int32
        fileIds:
          type: array
          items:
            type: integer
            format: int64
        annotations:
          type: array
          items:
            $ref: '#/components/schemas/Annotation'
        customProperties:
          type: string
        serviceStateLastModifiedAt:
          type: string
          format: date-time
        serviceStateV2LastModifiedAt:
          type: string
          format: date-time
        batteryLevelLastModifiedAt:
          type: string
          format: date-time
        lastOperationalAt:
          type: string
          format: date-time
        rentalStateLastModifiedAt:
          type: string
          format: date-time
        powerStateLastModifiedAt:
          type: string
          format: date-time
        lastEndedRentalAt:
          type: string
          format: date-time
        positionLastModifiedAt:
          type: string
          format: date-time
        lastOnlineAt:
          type: string
          format: date-time
        inactiveFor:
          $ref: '#/components/schemas/Duration'
        lastOutOfOrderAt:
          type: string
          format: date-time
        pricing:
          $ref: '#/components/schemas/PricingInformation'
        applicableVouchers:
          type: array
          items:
            $ref: '#/components/schemas/ConstraintVoucher'
        rewardStationIds:
          type: array
          items:
            type: integer
            format: int64
        module:
          $ref: '#/components/schemas/JsonModule'
        currency:
          type: string
        benefits:
          type: string
          enum:
            - DISCOUNTED
            - REWARDED
        type:
          type: string
          enum:
            - NIU
            - NIU_MC
            - DUMMY
            - NIU_PRTCL
            - NINEBOT_ES2
            - CUCA_BIKE
            - TRACKER
            - COMODULE_NINEBOT_ES2
            - GOVECS_GOT
            - NINEBOT_ES2_TLT
            - MANUAL_KICKSCOOTER
            - MANUAL_BICYCLE
            - NIU_TLT
            - SUPER_SOCO_TLT_125
            - CAR_TLT
            - SEGWAY_V1
            - NIU_V2
            - CAR_TLT_RELAIS
            - LANNMARKER_ZIMO
            - INVERS_CAR
            - DEVICE_CLOUD
            - NIU_V2_READ
        numberOfPersons:
          type: integer
          format: int32
        typeName:
          type: string
        initialStateOfCharge:
          type: integer
          format: int32
    RentalFeedback:
      type: object
      properties:
        rating:
          type: integer
          format: int32
        ratingDescription:
          type: string
    RentalPhase:
      type: object
      properties:
        state:
          type: string
          enum:
            - DRIVING
            - PARKING
            - RESERVATION_FREE
            - RESERVATION_PAID
        startTime:
          type: string
          format: date-time
        startKilometers:
          type: number
          format: double
        startPosition:
          $ref: '#/components/schemas/Point'
        startAddress:
          type: string
    RentalPrice:
      type: object
      properties:
        priceForReservationNet:
          $ref: '#/components/schemas/BigDecimal'
        priceForDrivingNet:
          $ref: '#/components/schemas/BigDecimal'
        priceForParkingNet:
          $ref: '#/components/schemas/BigDecimal'
        nonRebatablePriceNet:
          $ref: '#/components/schemas/BigDecimal'
        priceForReservationGross:
          $ref: '#/components/schemas/BigDecimal'
        priceForDrivingGross:
          $ref: '#/components/schemas/BigDecimal'
        priceForParkingGross:
          $ref: '#/components/schemas/BigDecimal'
        nonRebatablePriceGross:
          $ref: '#/components/schemas/BigDecimal'
        rebateNet:
          $ref: '#/components/schemas/BigDecimal'
        rebateGross:
          $ref: '#/components/schemas/BigDecimal'
        surchargeNet:
          $ref: '#/components/schemas/BigDecimal'
        surchargeGross:
          $ref: '#/components/schemas/BigDecimal'
    AppliedRentalRebate:
      type: object
      properties:
        type:
          type: string
          enum:
            - GEOFENCE_PROMOTION
            - PACKAGE
            - SUBSCRIPTION
            - REWARD
            - FREE_REWARD
            - SINGLE_USE_VOUCHER
            - SIGNUP_REFERRAL
            - CASHBACK
            - CUSTOMER_CARE
            - VEHICLE_PROMOTION
            - PROMOTION
            - GEOFENCE_SURCHARGE
            - RIDE_PASS
        voucherable:
          $ref: '#/components/schemas/Voucherable'
        name:
          type: string
        amountNet:
          $ref: '#/components/schemas/BigDecimal'
        amountGross:
          $ref: '#/components/schemas/BigDecimal'
    Deposit:
      type: object
      properties:
        state:
          type: string
          enum:
            - ACTIVE
            - RELEASED
            - CHARGED
            - FAILED_TO_RELEASE
        expiresAt:
          type: string
          format: date-time
        amount:
          $ref: '#/components/schemas/BigDecimal'
    Rental:
      type: object
      properties:
        id:
          type: integer
          format: int64
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        rentalId:
          type: integer
          format: int64
        guserId:
          type: integer
          format: int64
        guser:
          $ref: '#/components/schemas/GUser'
        branchId:
          type: integer
          format: int64
        endBranchId:
          type: integer
          format: int64
        branchName:
          type: string
        endBranchName:
          type: string
        vehicle:
          $ref: '#/components/schemas/Vehicle'
        state:
          type: string
          enum:
            - RESERVATION
            - ACTIVE
            - EXPIRED
            - ENDED
            - CANCELLED
            - ENDED_NO_MOVEMENT
        startTime:
          type: string
          format: date-time
        driveStartTime:
          type: string
          format: date-time
        endTime:
          type: string
          format: date-time
        startKilometers:
          type: number
          format: double
        startPosition:
          $ref: '#/components/schemas/Point'
        startAddress:
          type: string
        fileIds:
          type: array
          items:
            type: integer
            format: int64
        additions:
          type: array
          items:
            type: string
        totalDuration:
          $ref: '#/components/schemas/Duration'
        feedback:
          $ref: '#/components/schemas/RentalFeedback'
        bookingId:
          type: integer
          format: int64
        type:
          type: string
          enum:
            - PERSONAL
            - BUSINESS
            - SERVICE
        reason:
          type: string
        balanceName:
          type: string
        userGroupCode:
          type: string
        externalReference:
          type: string
        phases:
          type: array
          items:
            $ref: '#/components/schemas/RentalPhase'
        price:
          $ref: '#/components/schemas/RentalPrice'
        estimatedPrice:
          $ref: '#/components/schemas/RentalPrice'
        currency:
          type: string
        appliedRebates:
          type: array
          items:
            $ref: '#/components/schemas/AppliedRentalRebate'
        annotations:
          type: array
          items:
            $ref: '#/components/schemas/Annotation'
        deposit:
          $ref: '#/components/schemas/Deposit'
        linkedRentalId:
          type: integer
          format: int64
        startSoc:
          type: integer
          format: int32
        endSoc:
          type: integer
          format: int32
    InvoicePriceDto:
      type: object
      properties:
        priceOfRentalsNet:
          $ref: '#/components/schemas/BigDecimal'
        rebateNet:
          $ref: '#/components/schemas/BigDecimal'
        subTotalNet:
          $ref: '#/components/schemas/BigDecimal'
        paymentRebateNet:
          $ref: '#/components/schemas/BigDecimal'
        priceOfRentalsGross:
          $ref: '#/components/schemas/BigDecimal'
        rebateGross:
          $ref: '#/components/schemas/BigDecimal'
        subTotalGross:
          $ref: '#/components/schemas/BigDecimal'
        paymentRebateGross:
          $ref: '#/components/schemas/BigDecimal'
        netPrice:
          $ref: '#/components/schemas/BigDecimal'
        containedTax:
          $ref: '#/components/schemas/BigDecimal'
        grossPrice:
          $ref: '#/components/schemas/BigDecimal'
    PaymentDetails:
      type: object
      properties:
        last4:
          type: string
        creditCardBrand:
          type: string
    CostCenter:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
        externalReference:
          type: string
    Invoice:
      type: object
      properties:
        id:
          type: integer
          format: int64
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        invoiceId:
          type: string
        guser:
          $ref: '#/components/schemas/GUser'
        branchId:
          type: integer
          format: int64
        state:
          type: string
          enum:
            - OPEN
            - CLOSED
            - BILLED
            - PAID
            - EXCEPTION_OPENING
            - EXCEPTION_BILLING
            - EXCEPTION_SEPA
            - EXCEPTION_PAYING
            - IGNORE
            - DISPUTED
            - IN_PAYMENT
            - PUSH_WAITING_FOR_USER
            - PUSH_CANCELLED_BY_USER
            - PUSH_BANK_REFUSED
            - PUSH_ERROR_INITIALISING
            - REFUND_IN_PROGRESS
            - REFUNDED
            - EXCEPTION_REFUND
            - THREE_DS_WAITING_FOR_USER
            - THREE_DS_FAILED
            - COLLECTION
            - PAID_EXTERNALLY
            - REFUNDED_EXTERNALLY
            - UNKNOWN
            - BILLED_EXTERNAL_COLLECTION
        invoiceState:
          type: string
          enum:
            - BILLED
            - SETTLED
            - PAYMENT_FAILED
            - REFUNDED
            - DUE
            - OVER_DUE
        title:
          type: string
        invoiceDate:
          type: string
          format: date-time
        dueDate:
          type: string
          format: date-time
        price:
          $ref: '#/components/schemas/InvoicePriceDto'
        currency:
          type: string
        paymentId:
          type: integer
          format: int64
        paymentDetails:
          $ref: '#/components/schemas/PaymentDetails'
        chargeId:
          type: string
        refundedInvoiceId:
          type: integer
          format: int64
        refundingInvoiceIds:
          type: array
          items:
            type: integer
            format: int64
        costCenter:
          $ref: '#/components/schemas/CostCenter'
    CostCenterResponseDto:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
        description:
          type: string
        userGroupId:
          type: integer
          format: int64
        externalReference:
          type: string
        contactEmail:
          type: string
        defaultForUserGroup:
          type: boolean
    Booking:
      type: object
      properties:
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        id:
          type: integer
          format: int64
        guserId:
          type: integer
          format: int64
        guser:
          $ref: '#/components/schemas/GUser'
        rentalId:
          type: integer
          format: int64
        rental:
          $ref: '#/components/schemas/Rental'
        branchId:
          type: integer
          format: int64
        branchName:
          type: string
        endBranchId:
          type: integer
          format: int64
        endBranchName:
          type: string
        vehicleId:
          type: integer
          format: int64
        vehicle:
          $ref: '#/components/schemas/JsonVehicle'
        vehicleCategoryId:
          type: integer
          format: int64
        startTime:
          type: string
          format: date-time
        endTime:
          type: string
          format: date-time
        state:
          type: string
          enum:
            - BOOKED
            - APPROVED
            - DELIVERED
            - SUCCESSFUL
            - CANCELED
            - ABORTED
            - EXPIRED
            - DECLINED
        type:
          type: string
          enum:
            - STATION
            - FLOATING
        invoice:
          $ref: '#/components/schemas/Invoice'
        costs:
          $ref: '#/components/schemas/BigDecimal'
        startPosition:
          $ref: '#/components/schemas/Point'
        startPositionRadius:
          type: number
          format: double
        estimatedPrice:
          $ref: '#/components/schemas/Price'
        userGroupCode:
          type: string
        rentalType:
          type: string
          enum:
            - PERSONAL
            - BUSINESS
            - SERVICE
        reason:
          type: string
        rejectionReason:
          type: string
        externalReference:
          type: string
        applicableVouchers:
          type: array
          items:
            $ref: '#/components/schemas/ConstraintVoucher'
        additions:
          type: array
          items:
            type: string
        linkedBookingId:
          type: integer
          format: int64
        costCenter:
          $ref: '#/components/schemas/CostCenterResponseDto'
    AddMaaSUser:
      type: object
      properties:
        email:
          type: string
        phone:
          type: string
        phoneNumber:
          type: string
        branchId:
          type: integer
          format: int64
        firstName:
          type: string
        lastName:
          type: string
        birthdate:
          type: string
          format: date
        street:
          type: string
        postcode:
          type: string
        city:
          type: string
        country:
          type: string
        note:
          type: string
        language:
          type: string
        licenseVerificationState:
          type: string
          enum:
            - UNVERIFIED
            - CREATED
            - PROCESSING
            - VERIFIED
            - REJECTED
            - RETRY
            - VERIFIED_BUT_NEEDS_CHECK
            - EXPIRED_LICENSE
            - REVIEW
            - PENDING_REVERIFICATION
        licenseExpirationDate:
          type: string
          format: date
        drivingLicenseCategories:
          type: array
          items:
            type: string
        manualVerificationState:
          type: string
          enum:
            - UNVERIFIED
            - PROCESSING
            - VERIFIED
            - REJECTED
            - RETRY
        paymentState:
          type: string
          enum:
            - NONE
            - PUSH_INITIATED
            - PUSH_COMPLETED
            - SOURCE_ADDED
            - INVOICING
        extRef:
          type: string
        customProperties:
          type: string
        newsletterOptions:
          $ref: "#/components/schemas/NewsletterOptions"
    JsonGUserEmail:
      type: object
      properties:
        email:
          type: string
        id:
          type: integer
          format: int64
        firstName:
          type: string
        lastName:
          type: string
    JsonPrice:
      type: object
      properties:
        netPrice:
          $ref: '#/components/schemas/BigDecimal'
        containedTax:
          $ref: '#/components/schemas/BigDecimal'
        grossPrice:
          $ref: '#/components/schemas/BigDecimal'
        grossRefund:
          $ref: '#/components/schemas/BigDecimal'
        currency:
          type: string
    InvoiceListDTO:
      type: object
      properties:
        id:
          type: integer
          format: int64
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        invoiceId:
          type: string
        guser:
          $ref: '#/components/schemas/JsonGUserEmail'
        branchId:
          type: integer
          format: int64
        state:
          type: string
          enum:
            - OPEN
            - CLOSED
            - BILLED
            - PAID
            - EXCEPTION_OPENING
            - EXCEPTION_BILLING
            - EXCEPTION_SEPA
            - EXCEPTION_PAYING
            - IGNORE
            - DISPUTED
            - IN_PAYMENT
            - PUSH_WAITING_FOR_USER
            - PUSH_CANCELLED_BY_USER
            - PUSH_BANK_REFUSED
            - PUSH_ERROR_INITIALISING
            - REFUND_IN_PROGRESS
            - REFUNDED
            - EXCEPTION_REFUND
            - THREE_DS_WAITING_FOR_USER
            - THREE_DS_FAILED
            - COLLECTION
            - PAID_EXTERNALLY
            - REFUNDED_EXTERNALLY
            - UNKNOWN
            - BILLED_EXTERNAL_COLLECTION
        invoiceDate:
          type: string
          format: date-time
        price:
          $ref: '#/components/schemas/JsonPrice'
        paymentId:
          type: integer
          format: int64
        chargeId:
          type: string
        createdBy:
          $ref: '#/components/schemas/JsonGUserEmail'
    LineItem:
      type: object
      properties:
        id:
          type: integer
          format: int64
        description:
          type: string
        netPrice:
          $ref: '#/components/schemas/BigDecimal'
        taxPercentage:
          $ref: '#/components/schemas/BigDecimal'
        tax:
          $ref: '#/components/schemas/BigDecimal'
        grossPrice:
          $ref: '#/components/schemas/BigDecimal'
        refundedLineItemId:
          type: integer
          format: int64
        bookingId:
          type: integer
          format: int64
        rentalId:
          type: integer
          format: int64
    LineItemInvoice:
      type: object
      properties:
        id:
          type: integer
          format: int64
        invoiceId:
          type: string
        title:
          type: string
        description:
          type: string
        netPrice:
          $ref: '#/components/schemas/BigDecimal'
        containedTax:
          $ref: '#/components/schemas/BigDecimal'
        grossPrice:
          $ref: '#/components/schemas/BigDecimal'
        lineItems:
          type: array
          items:
            $ref: '#/components/schemas/LineItem'
        state:
          type: string
          enum:
            - OPEN
            - CLOSED
            - BILLED
            - PAID
            - EXCEPTION_OPENING
            - EXCEPTION_BILLING
            - EXCEPTION_SEPA
            - EXCEPTION_PAYING
            - IGNORE
            - DISPUTED
            - IN_PAYMENT
            - PUSH_WAITING_FOR_USER
            - PUSH_CANCELLED_BY_USER
            - PUSH_BANK_REFUSED
            - PUSH_ERROR_INITIALISING
            - REFUND_IN_PROGRESS
            - REFUNDED
            - EXCEPTION_REFUND
            - THREE_DS_WAITING_FOR_USER
            - THREE_DS_FAILED
            - COLLECTION
            - PAID_EXTERNALLY
            - REFUNDED_EXTERNALLY
            - UNKNOWN
            - BILLED_EXTERNAL_COLLECTION
        paymentId:
          type: integer
          format: int64
        currency:
          type: string
        refundedInvoiceId:
          type: integer
          format: int64
        refundingInvoiceIds:
          type: array
          items:
            type: integer
            format: int64
    PatchMaaSUser:
      type: object
      properties:
        email:
          type: string
        phone:
          type: string
        branchId:
          type: integer
          format: int64
        firstName:
          type: string
        lastName:
          type: string
        birthdate:
          type: string
          format: date
        street:
          type: string
        postcode:
          type: string
        city:
          type: string
        country:
          type: string
        note:
          type: string
        language:
          type: string
        licenseVerificationState:
          type: string
          enum:
            - UNVERIFIED
            - CREATED
            - PROCESSING
            - VERIFIED
            - REJECTED
            - RETRY
            - VERIFIED_BUT_NEEDS_CHECK
            - EXPIRED_LICENSE
            - REVIEW
            - PENDING_REVERIFICATION
        licenseExpirationDate:
          type: string
          format: date
        drivingLicenseCategories:
          type: array
          items:
            type: string
        manualVerificationState:
          type: string
          enum:
            - UNVERIFIED
            - PROCESSING
            - VERIFIED
            - REJECTED
            - RETRY
        paymentState:
          type: string
          enum:
            - NONE
            - PUSH_INITIATED
            - PUSH_COMPLETED
            - SOURCE_ADDED
            - INVOICING
        extRef:
          type: string
        customProperties:
          type: string
        blockState:
          type: string
          enum:
            - NOT_BLOCKED
            - BLOCKED_UNKNOWN
            - BLOCKED_BY_ADMIN
            - BLOCKED_BY_ADMINDELETE
            - GROUP_DELETED
            - GROUP_BLOCKED_MANUAL_APPROVAL_REQUIRED
            - GROUP_BLOCKED_MANUAL_APPROVAL_REJECTED
        newsletterOptions:
          $ref: '#/components/schemas/NewsletterOptions'
    NewsletterOptions:
      type: object
      properties:
        receiveNews:
          type: boolean
        receiveMarketingOffers:
          type: boolean
    MaaSUser:
      type: object
      properties:
        id:
          type: integer
          format: int64
        firstName:
          type: string
        lastName:
          type: string
        email:
          type: string
        birthdate:
          type: string
          format: date
        phone:
          type: string
        customProperties:
          type: string
        licenseVerificationState:
          type: string
          enum:
            - UNVERIFIED
            - CREATED
            - PROCESSING
            - VERIFIED
            - REJECTED
            - RETRY
            - VERIFIED_BUT_NEEDS_CHECK
            - EXPIRED_LICENSE
            - REVIEW
            - PENDING_REVERIFICATION
        manualVerificationState:
          type: string
          enum:
            - UNVERIFIED
            - PROCESSING
            - VERIFIED
            - REJECTED
            - RETRY
        paymentState:
          type: string
          enum:
            - NONE
            - PUSH_INITIATED
            - PUSH_COMPLETED
            - SOURCE_ADDED
            - INVOICING
        creditStatus:
          type: string
          enum:
            - PENDING
            - GREEN
            - YELLOW
            - RED
            - FAILED
        street:
          type: string
        postcode:
          type: string
        city:
          type: string
        country:
          type: string
        referralCode:
          type: string
        blockState:
          type: string
          enum:
            - NOT_BLOCKED
            - BLOCKED_UNKNOWN
            - BLOCKED_BY_ADMIN
            - BLOCKED_BY_ADMINDELETE
            - GROUP_DELETED
            - GROUP_BLOCKED_MANUAL_APPROVAL_REQUIRED
            - GROUP_BLOCKED_MANUAL_APPROVAL_REJECTED
        newsletterOptions:
          $ref: '#/components/schemas/NewsletterOptions'
        impersonateUuid:
          type: string
    MaasCreateVerificationRequest:
      type: object
      required:
        - documentVerificationType
        - verificationState
      properties:
        firstName:
          type: string
          description: Owner’s given first name as shown on the document.
        lastName:
          type: string
          description: Owner’s given last name as shown on the document.
        birthdate:
          type: string
          format: date-time
          description: Owner’s birthdate as shown on the document.
        idNumber:
          type: string
          description: The unique identification number of the person.
        documentNumber:
          type: string
          description: The unique identification number printed on the document.
        documentCountry:
          type: string
          description: The country that issued the document.
        documentValidFrom:
          type: string
          format: date-time
          description: Specifies the starting date of validity of the document.
        documentValidUntil:
          type: string
          format: date-time
          description: Specifies the expiration date of the document.
        documentVerificationType:
          type: string
          enum:
            - DRIVING_LICENSE
            - ANY
          description: DRIVING_LICENSE is used for driving license verification. ANY is used for ID verification.
        verificationState:
          type: string
          enum:
            - VERIFIED
            - VERIFIED_BUT_NEEDS_CHECK
            - REJECTED
        documentType:
          type: string
          enum:
            - PASSPORT
            - ID_CARD
            - DRIVERS_LICENSE
            - RESIDENCE_PERMIT
            - OTHER
        drivingLicenseCategoryObjects:
          type: array
          description: Needed only if 'documentVerificationType' is set to 'DRIVING_LICENSE'.
          items:
            $ref: '#/components/schemas/DrivingLicenseCategoryObject'
    VerificationAttempt:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        sessionUuid:
          type: string
          format: uuid
        attemptUuid:
          type: string
          format: uuid
        linkToHub:
          type: string
        status:
          type: string
          enum:
            - created
            - approved
            - resubmission_requested
            - declined
            - expired
            - abandoned
            - started
            - review
            - submitted
            - inflow_completed
        mediaList:
          type: array
          items:
            $ref: '#/components/schemas/VerificationMedia'
        firstName:
          type: string
        lastName:
          type: string
        birthdate:
          type: string
          format: date
        reason:
          type: string
        idNumber:
          type: string
        documentNumber:
          type: string
        documentCountry:
          type: string
        documentValidFrom:
          type: string
          format: date
        documentValidUntil:
          type: string
          format: date
        documentVerificationType:
          type: string
          enum:
            - DRIVING_LICENSE
            - ANY
        documentType:
          type: string
          enum:
            - PASSPORT
            - ID_CARD
            - DRIVERS_LICENSE
            - RESIDENCE_PERMIT
            - OTHER
        acceptanceTime:
          type: string
          format: date-time
        decisionTime:
          type: string
          format: date-time
        verificationType:
          type: string
          enum:
            - VERIFF_SDK
            - ONFIDO_SDK
            - ONFIDO_WEB
            - MANUAL
        verificationId:
          type: integer
          format: int64
        drivingLicenseCategories:
          type: array
          items:
            $ref: '#/components/schemas/DrivingLicenseCategoryObject'
    VerificationMedia:
      type: object
      properties:
        uuid:
          type: string
        mimetype:
          type: string
        name:
          type: string
        size:
          type: string
    DrivingLicenseCategoryObject:
      type: object
      properties:
        category:
          type: string
        codes:
          type: array
          items:
            type: string
        expiryDate:
          type: string
          format: date
        obtainmentDate:
          type: string
          format: date
    Void:
      type: object
      properties: { }
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
security:
  - jwtAuth: [ ]
