openapi: 3.0.1
info:
  title: O.B Engine Loans
  description: API O.B Engine Server
  termsOfService: 'http://example.com/terms/'
  contact:
    name: O.B Engine API Support
    url: 'http://www.example.com/support'
    email: support@example.com
  license:
    name: Apache 2.0
    url: 'https://www.apache.org/licenses/LICENSE-2.0.html'
  version: 1.0.0
  x-lxrinfo: {}
servers:
  - url: 'https://obengineAPI.uat-server.com:8443/v1'
    description: API server UAT 8443
  - url: 'https://obengineAPI.uat-server.com:443/v1'
    description: API server UAT 443
  - url: 'https://obengineAPI.production-server.com:8443/v1'
    description: API server producción
  - url: 'https://obengineAPI.production-server.com:443/v1'
    description: API server producción
security:
  - {}
tags:
  - name: API Loans
    description: |
      Exposed services:
      - Loan Application. 
      - Loan Enquiry .
      - General Enquiry. 
      - Loan Repayment Simulation by Account. 
      - Loan Repayment Simulation by Product.
      - Bill Summary and Payment Details Enquiry.
      - Bill Receipt Summary and Payment Details Enquiry.
      - Nonautomated Processes Enquiry.
      - Outstanding Bill Enquiry.
      - Simulation early delivery.
      - Early delivery.
      - Query of pending receipts
paths:
  /loans:
    get:
      tags:
        - API Loans
      summary: Loans of a person.
      description: Check a person's loans at O.B Engine.
      operationId: loangGet
      parameters:
        - $ref: '#/components/parameters/X-Request-ID'
        - $ref: '#/components/parameters/X-Channel'
      responses:
        '200':
          $ref: '#/components/responses/getLoansOut'
        '400':
          $ref: '#/components/responses/BAD_REQUEST_400_OB'
        '401':
          $ref: '#/components/responses/UNAUTHORIZED_401_OB'
        '403':
          $ref: '#/components/responses/FORBIDDEN_403_OB'
        '404':
          $ref: '#/components/responses/NOT_FOUND_404_OB'
        '500':
          $ref: '#/components/responses/INTERNAL_SERVER_ERROR_500_OB'
    post:
      tags:
        - API Loans
      summary: Loan registration.
      description: Definition of loan discharge
      operationId: loansPost
      requestBody:
        description: Data required to register a loan
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewLoanInput'
      responses:
        '200':
          $ref: '#/components/responses/NewLoanOut'
        '400':
          $ref: '#/components/responses/BAD_REQUEST_400_OB'
        '401':
          $ref: '#/components/responses/UNAUTHORIZED_401_OB'
        '403':
          $ref: '#/components/responses/FORBIDDEN_403_OB'
        '404':
          $ref: '#/components/responses/NOT_FOUND_404_OB'
        '500':
          $ref: '#/components/responses/INTERNAL_SERVER_ERROR_500_OB'
  '/loans/{loanAccountId}':
    get:
      tags:
        - API Loans
      summary: Loan detail.
      description: Check the details of a loan at O.B Engine.
      operationId: loanDetailGet
      parameters:
        - $ref: '#/components/parameters/X-Request-ID'
        - $ref: '#/components/parameters/X-Channel'
        - $ref: '#/components/parameters/loanAccountId'
      responses:
        '200':
          $ref: '#/components/responses/getLoanDetailOut'
        '400':
          $ref: '#/components/responses/BAD_REQUEST_400_OB'
        '401':
          $ref: '#/components/responses/UNAUTHORIZED_401_OB'
        '403':
          $ref: '#/components/responses/FORBIDDEN_403_OB'
        '404':
          $ref: '#/components/responses/NOT_FOUND_404_OB'
        '500':
          $ref: '#/components/responses/INTERNAL_SERVER_ERROR_500_OB'
  '/loans/simulate/{loanAccountId}':
    get:
      tags:
        - API Loans
      summary: Depreciation table simulation (account).
      description: Depreciation table simulation in  O.B Engine.
      operationId: loanSimulateAccountGet
      parameters:
        - $ref: '#/components/parameters/X-Request-ID'
        - $ref: '#/components/parameters/X-Channel'
        - $ref: '#/components/parameters/loanAccountId'
      responses:
        '200':
          $ref: '#/components/responses/simulateOut'
        '400':
          $ref: '#/components/responses/BAD_REQUEST_400_OB'
        '401':
          $ref: '#/components/responses/UNAUTHORIZED_401_OB'
        '403':
          $ref: '#/components/responses/FORBIDDEN_403_OB'
        '404':
          $ref: '#/components/responses/NOT_FOUND_404_OB'
        '500':
          $ref: '#/components/responses/INTERNAL_SERVER_ERROR_500_OB'
  '/loans/simulate/prod/{loanCodProd}':
    get:
      tags:
        - API Loans
      summary: Depreciation table simulation (product).
      description: Loan contracting simulation at O.B Engine about a producto.
      operationId: loanSimulateProductGet
      parameters:
        - $ref: '#/components/parameters/X-Request-ID'
        - $ref: '#/components/parameters/X-Channel'
        - $ref: '#/components/parameters/loanCodProd'
      responses:
        '200':
          $ref: '#/components/responses/simulateOut'
        '400':
          $ref: '#/components/responses/BAD_REQUEST_400_OB'
        '401':
          $ref: '#/components/responses/UNAUTHORIZED_401_OB'
        '403':
          $ref: '#/components/responses/FORBIDDEN_403_OB'
        '404':
          $ref: '#/components/responses/NOT_FOUND_404_OB'
        '500':
          $ref: '#/components/responses/INTERNAL_SERVER_ERROR_500_OB'
  '/loans/receipts/{loanAccountId}/_charged':
    get:
      tags:
        - API Loans
      summary: Receipts charged.
      description: Bill Receipt Summary and Payment Details Enquiry Onesait Banking Engine.
      operationId: loanReceiptsChargedGet
      parameters:
        - $ref: '#/components/parameters/X-Request-ID'
        - $ref: '#/components/parameters/X-Channel'
        - $ref: '#/components/parameters/loanAccountId'
        - $ref: '#/components/parameters/dateFrom'
        - $ref: '#/components/parameters/dateTo'
      responses:
        '200':
          $ref: '#/components/responses/receiptChargedOut'
        '400':
          $ref: '#/components/responses/BAD_REQUEST_400_OB'
        '401':
          $ref: '#/components/responses/UNAUTHORIZED_401_OB'
        '403':
          $ref: '#/components/responses/FORBIDDEN_403_OB'
        '404':
          $ref: '#/components/responses/NOT_FOUND_404_OB'
        '500':
          $ref: '#/components/responses/INTERNAL_SERVER_ERROR_500_OB'
  '/loans/receipts/{loanAccountId}/_billed':
    get:
      tags:
        - API Loans
      summary: Receipts billed.
      description: Bill Summary and Payment Details Enquiry Onesait Banking Engine.
      operationId: loanReceiptsbilledGet
      parameters:
        - $ref: '#/components/parameters/X-Request-ID'
        - $ref: '#/components/parameters/X-Channel'
        - $ref: '#/components/parameters/loanAccountId'
        - $ref: '#/components/parameters/receiptId'
        - $ref: '#/components/parameters/valueDate'
      responses:
        '200':
          $ref: '#/components/responses/receiptBilledOut'
        '400':
          $ref: '#/components/responses/BAD_REQUEST_400_OB'
        '401':
          $ref: '#/components/responses/UNAUTHORIZED_401_OB'
        '403':
          $ref: '#/components/responses/FORBIDDEN_403_OB'
        '404':
          $ref: '#/components/responses/NOT_FOUND_404_OB'
        '500':
          $ref: '#/components/responses/INTERNAL_SERVER_ERROR_500_OB'
  '/loans/{loanAccountId}/receipts/deliveries/_pending':
    post:
      tags:
        - API Loans
      summary: Receipts pending.
      description: Outstanding Bill Enquiry.
      operationId: deliveriesPendingReceiptsGET
      parameters:
        - $ref: '#/components/parameters/X-Request-ID'
        - $ref: '#/components/parameters/X-Channel'
        - $ref: '#/components/parameters/loanAccountId'
      requestBody:
        description: Body required for manual delivery of pending receipts
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/deliveriesPendingInput'
      responses:
        '200':
          $ref: '#/components/responses/retrocesionesOut'
        '400':
          $ref: '#/components/responses/BAD_REQUEST_400_OB'
        '401':
          $ref: '#/components/responses/UNAUTHORIZED_401_OB'
        '403':
          $ref: '#/components/responses/FORBIDDEN_403_OB'
        '404':
          $ref: '#/components/responses/NOT_FOUND_404_OB'
        '500':
          $ref: '#/components/responses/INTERNAL_SERVER_ERROR_500_OB'
  '/loans/events/{loanAccountId}/aperiodic/scheduled':
    get:
      tags:
        - API Loans
      summary: Nonautomated Processes
      description: Nonautomated Processes Enquiry.
      operationId: aperiodicEventsScheduledGet
      parameters:
        - $ref: '#/components/parameters/X-Request-ID'
        - $ref: '#/components/parameters/X-Channel'
        - $ref: '#/components/parameters/loanAccountId'
        - $ref: '#/components/parameters/dateFrom'
      responses:
        '200':
          $ref: '#/components/responses/earlyDeliveryOut'
        '400':
          $ref: '#/components/responses/BAD_REQUEST_400_OB'
        '401':
          $ref: '#/components/responses/UNAUTHORIZED_401_OB'
        '403':
          $ref: '#/components/responses/FORBIDDEN_403_OB'
        '404':
          $ref: '#/components/responses/NOT_FOUND_404_OB'
        '500':
          $ref: '#/components/responses/INTERNAL_SERVER_ERROR_500_OB'
  '/loans/receipts/{loanAccountId}/_pending':
    get:
      tags:
        - API Loans
      summary: Query of pending receipts
      description: Query of pending receipts of a loan.
      operationId: queryPendingReceipts
      parameters:
        - $ref: '#/components/parameters/X-Request-ID'
        - $ref: '#/components/parameters/X-Channel'
        - $ref: '#/components/parameters/loanAccountId'
        - $ref: '#/components/parameters/valueDate'
      responses:
        '200':
          $ref: '#/components/responses/queryPendingReceiptsOut'
        '400':
          $ref: '#/components/responses/BAD_REQUEST_400_OB'
        '401':
          $ref: '#/components/responses/UNAUTHORIZED_401_OB'
        '403':
          $ref: '#/components/responses/FORBIDDEN_403_OB'
        '404':
          $ref: '#/components/responses/NOT_FOUND_404_OB'
        '500':
          $ref: '#/components/responses/INTERNAL_SERVER_ERROR_500_OB'
  '/loans/earlyDeliveries/{loanAccountId}/_simulate':
    get:
      tags:
        - API Loans
      summary: Early deliveries simulation.
      description: Simulation of early delivery to an ongoing loan.
      operationId: earlyDeliveries_simulate
      parameters:
        - $ref: '#/components/parameters/X-Request-ID'
        - $ref: '#/components/parameters/X-Channel'
        - $ref: '#/components/parameters/loanAccountId'
        - $ref: '#/components/parameters/valueDate'
        - $ref: '#/components/parameters/amount'
      responses:
        '200':
          $ref: '#/components/responses/aperiodicEventsScheludedOut'
        '400':
          $ref: '#/components/responses/BAD_REQUEST_400_OB'
        '401':
          $ref: '#/components/responses/UNAUTHORIZED_401_OB'
        '403':
          $ref: '#/components/responses/FORBIDDEN_403_OB'
        '404':
          $ref: '#/components/responses/NOT_FOUND_404_OB'
        '500':
          $ref: '#/components/responses/INTERNAL_SERVER_ERROR_500_OB'
  '/loans/{loanAccountId}/earlyDeliveries':
    put:
      tags:
        - API Loans
      summary: Early deliveries.
      description: Earlyarly delivery to an ongoing loan.
      operationId: earlyDeliveries
      parameters:
        - $ref: '#/components/parameters/X-Request-ID'
        - $ref: '#/components/parameters/X-Channel'
        - $ref: '#/components/parameters/loanAccountId'
      requestBody:
        description: Data necessary to make an advance delivery.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/earlyDeliveryInput'
      responses:
        '200':
          $ref: '#/components/responses/aperiodicEventsScheludedOut'
        '400':
          $ref: '#/components/responses/BAD_REQUEST_400_OB'
        '401':
          $ref: '#/components/responses/UNAUTHORIZED_401_OB'
        '403':
          $ref: '#/components/responses/FORBIDDEN_403_OB'
        '404':
          $ref: '#/components/responses/NOT_FOUND_404_OB'
        '500':
          $ref: '#/components/responses/INTERNAL_SERVER_ERROR_500_OB'
components:
  schemas:
    X-Channel:
      pattern: '[A-Z]{2}'
      type: string
      description: |
        Channel from which the request starts.
        **Example:**
        Canales posibles:

          * BE : Web Banking.
          * BT : Phone Banking.
          * FT : Front.
          * WS : WebServices.
      example: WS
    X-Request-ID:
      type: string
      description: |
        Unique Request Id Number.
      format: uuid
      example: 99435c7e-ad88-49ec-a2ad-99ddcb1f5555
    NewLoanInput:
      required:
        - amount
        - period
        - productCode
      type: object
      properties:
        productCode:
          type: string
          description: Desc
        amount:
          $ref: '#/components/schemas/amount'
        period:
          $ref: '#/components/schemas/period'
      description: |
        JSON Request body for a new loan.
    earlyDeliveryInput:
      required:
        - amount
        - valueDate
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/amountValue'
        valueDate:
          $ref: '#/components/schemas/typeDate'
      description: |
        JSON Request to make an early delivery.
    deliveriesPendingInput:
      required:
        - chargeAccount
        - amount
      type: object
      properties:
        valueData:
          $ref: '#/components/schemas/typeDate'
        chargeAccount:
          $ref: '#/components/schemas/ibanAccount'
        comissionFee:
          $ref: '#/components/schemas/typeCommissionFee'
        amount:
          $ref: '#/components/schemas/amountValue'
        CommissionAmountForDebitPositions:
          $ref: '#/components/schemas/amountValue'
      description: |
        Request body for manual delivery to pending receipts.
    NewLoanDetail:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/ibanAccount'
    NewLoanOut:
      type: object
      properties:
        result:
          $ref: '#/components/schemas/result'
        body:
          $ref: '#/components/schemas/NewLoanDetail'
      description: Salida OK
    simulateOutComplete:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/ibanAccount'
        openingDate:
          $ref: '#/components/schemas/typeDate'
        nominalAmount:
          $ref: '#/components/schemas/amount'
        paymentDeadline:
          $ref: '#/components/schemas/elementType'
        nominalInterest:
          $ref: '#/components/schemas/percentageValue'
        tae:
          $ref: '#/components/schemas/percentageValue'
        feeRate:
          $ref: '#/components/schemas/elementType'
        openingCommissionRate:
          $ref: '#/components/schemas/tarifaValue'
        openingCommissionPercentage:
          $ref: '#/components/schemas/percentageValue'
        minimumAmountCommissionOpening:
          $ref: '#/components/schemas/percentageValue'
        studyCommissionFee:
          $ref: '#/components/schemas/tarifaValue'
        studyCommissionPercentage:
          $ref: '#/components/schemas/percentageValue'
        minimumAmountCommissionStudy:
          $ref: '#/components/schemas/amount'
        Progressiveness:
          $ref: '#/components/schemas/percentageValue'
        currency:
          $ref: '#/components/schemas/currency'
        totalFee:
          $ref: '#/components/schemas/amount'
        totalAmortization:
          $ref: '#/components/schemas/amount'
        totalInterest:
          $ref: '#/components/schemas/amount'
        typesimulation:
          $ref: '#/components/schemas/elementType'
        simulationStatus:
          $ref: '#/components/schemas/elementType'
        detail:
          $ref: '#/components/schemas/simulateDetailList'
    simulateDetailList:
      type: array
      description: Detail lines of the amortization table.
      items:
        $ref: '#/components/schemas/simulateDetail'
    simulateDetail:
      type: object
      properties:
        receiptNumber:
          $ref: '#/components/schemas/receiptNumber'
        valueDate:
          $ref: '#/components/schemas/typeDate'
        interests:
          $ref: '#/components/schemas/amount'
        bonus:
          $ref: '#/components/schemas/amount'
        amortization:
          $ref: '#/components/schemas/amount'
        outstandingCapital:
          $ref: '#/components/schemas/amount'
        ampountLackCapital:
          $ref: '#/components/schemas/amount'
    simulateOut:
      type: object
      properties:
        result:
          $ref: '#/components/schemas/result'
        body:
          $ref: '#/components/schemas/simulateOutComplete'
    loanDetail:
      type: object
      properties:
        account:
          $ref: '#/components/schemas/accountDetail'
        pendingAmount:
          $ref: '#/components/schemas/amount'
        limitAmount:
          $ref: '#/components/schemas/amount'
        startAmount:
          $ref: '#/components/schemas/amount'
        product:
          $ref: '#/components/schemas/productDetail'
        currency:
          $ref: '#/components/schemas/currency'
        lastMovementDate:
          $ref: '#/components/schemas/typeDate'
      description: Detail of a loan.
    productDetail:
      type: object
      properties:
        subtype:
          $ref: '#/components/schemas/elementType'
        description:
          type: string
          description: Nombre del producto
        id:
          type: string
          description: Product ID
        type:
          $ref: '#/components/schemas/elementType'
      description: Product detail O.B Engine.
    currency:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/currencyNum'
        id:
          $ref: '#/components/schemas/currencyCode'
    loansList:
      type: array
      description: Loans list.
      items:
        $ref: '#/components/schemas/loanDetail'
    getLoansOut:
      type: object
      properties:
        result:
          $ref: '#/components/schemas/result'
        body:
          $ref: '#/components/schemas/loansList'
      description: Enquiry returns a list with every loan associated to a specific customer.
    getLoanDetailOut:
      type: object
      properties:
        result:
          $ref: '#/components/schemas/result'
        body:
          $ref: '#/components/schemas/loanDetail'
      description: Returns the detail of a loan.
    receiptChargedOut:
      type: object
      properties:
        result:
          $ref: '#/components/schemas/result'
        body:
          $ref: '#/components/schemas/receiptChargedComplete'
    receiptChargedComplete:
      type: object
      properties:
        iban:
          $ref: '#/components/schemas/ibanAccount'
        outstandingCapital:
          $ref: '#/components/schemas/amount'
        firstHolder:
          $ref: '#/components/schemas/holder'
        secondHolder:
          $ref: '#/components/schemas/holder'
        thirdHolder:
          $ref: '#/components/schemas/holder'
        totalAmortized:
          $ref: '#/components/schemas/amount'
        totalInterest:
          $ref: '#/components/schemas/amount'
        totalDelayed:
          $ref: '#/components/schemas/amount'
        totalIVA:
          $ref: '#/components/schemas/amount'
        totalCharged:
          $ref: '#/components/schemas/amount'
        totalAmortizedDelivery:
          $ref: '#/components/schemas/amount'
        totalInterestDelivery:
          $ref: '#/components/schemas/amount'
        totalDeliveryDelay:
          $ref: '#/components/schemas/amount'
        totalDeliveryIVA:
          $ref: '#/components/schemas/amount'
        totalDeliveryCharged:
          $ref: '#/components/schemas/amount'
        totalGiaranteeCommission:
          $ref: '#/components/schemas/amount'
        deliverDate:
          $ref: '#/components/schemas/typeDate'
        accountType:
          $ref: '#/components/schemas/elementType'
        currency:
          $ref: '#/components/schemas/currency'
        receipts:
          $ref: '#/components/schemas/receiptChargedList'
    receiptChargedList:
      type: array
      items:
        $ref: '#/components/schemas/receiptChargedDetail'
    receiptChargedDetail:
      type: object
      properties:
        receiptNumber:
          $ref: '#/components/schemas/receiptNumber'
        settlementDate:
          $ref: '#/components/schemas/typeDate'
        collectionDate:
          $ref: '#/components/schemas/typeDate'
        amortization:
          $ref: '#/components/schemas/amount'
        interests:
          $ref: '#/components/schemas/amount'
        iva:
          $ref: '#/components/schemas/amount'
        commissions:
          $ref: '#/components/schemas/amount'
        deloy:
          $ref: '#/components/schemas/amount'
        totalCharged:
          $ref: '#/components/schemas/amount'
        outstandingCapital:
          $ref: '#/components/schemas/amount'
    receiptBilledDetail:
      type: object
      properties:
        concept:
          $ref: '#/components/schemas/elementType'
        invoicedAmount:
          $ref: '#/components/schemas/amount'
        amountPaid:
          $ref: '#/components/schemas/amount'
        outstandingAmount:
          $ref: '#/components/schemas/amount'
    receiptBilledList:
      type: array
      items:
        $ref: '#/components/schemas/receiptBilledDetail'
    receiptBilledComplete:
      type: object
      properties:
        iban:
          $ref: '#/components/schemas/ibanAccount'
        chargeAccount:
          $ref: '#/components/schemas/idAccount'
        hoder:
          $ref: '#/components/schemas/holder'
        receipt:
          $ref: '#/components/schemas/receiptNumber'
        previousOutstandingCapital:
          $ref: '#/components/schemas/amount'
        laterCapital:
          $ref: '#/components/schemas/amount'
        tae:
          $ref: '#/components/schemas/percentageValue'
        currency:
          $ref: '#/components/schemas/currency'
        settlementDate:
          $ref: '#/components/schemas/typeDate'
        startDateReceipt:
          $ref: '#/components/schemas/typeDate'
        endDateReceipt:
          $ref: '#/components/schemas/typeDate'
        latePaymentDate:
          $ref: '#/components/schemas/typeDate'
        listReceipts:
          $ref: '#/components/schemas/receiptBilledList'
        totalCharged:
          $ref: '#/components/schemas/amount'
        totalPaid:
          $ref: '#/components/schemas/amount'
        totalPending:
          $ref: '#/components/schemas/amount'
        delayKey:
          $ref: '#/components/schemas/elementType'
    receiptBilledOut:
      type: object
      properties:
        result:
          $ref: '#/components/schemas/elementType'
        body:
          $ref: '#/components/schemas/receiptBilledComplete'
    aperiodicEventsScheludedOut:
      type: object
      properties:
        result:
          $ref: '#/components/schemas/result'
        body:
          $ref: '#/components/schemas/aperiodicEventsScheludedComplete'
    aperiodicEventsScheludedComplete:
      type: object
      properties:
        loanAccountId:
          $ref: '#/components/schemas/idAccount'
        aperiodicEventsScheluded:
          $ref: '#/components/schemas/aperiodicEventsList'
    aperiodicEventsList:
      type: array
      items:
        $ref: '#/components/schemas/aperiodicEventsDetail'
    aperiodicEventsDetail:
      type: object
      properties:
        dateFrom:
          $ref: '#/components/schemas/typeDate'
        state:
          $ref: '#/components/schemas/elementType'
        settlementPeriod:
          $ref: '#/components/schemas/elementType'
        amortizedPeriod:
          $ref: '#/components/schemas/elementType'
        debtorInterest:
          $ref: '#/components/schemas/percentageValue'
        minimumInterest:
          $ref: '#/components/schemas/percentageValue'
        maximumInterest:
          $ref: '#/components/schemas/percentageValue'
        referential:
          $ref: '#/components/schemas/elementType'
        differential:
          $ref: '#/components/schemas/percentageValue'
        reviewPeriod:
          $ref: '#/components/schemas/elementType'
        reviewDate:
          $ref: '#/components/schemas/typeDate'
        formCalculation:
          $ref: '#/components/schemas/elementType'
        reservationReference:
          $ref: '#/components/schemas/elementType'
        differentialReference:
          $ref: '#/components/schemas/elementType'
    retrocesionesOut:
      type: object
      properties:
        result:
          $ref: '#/components/schemas/result'
        body:
          $ref: '#/components/schemas/retrocesionesComplete'
    retrocesionesComplete:
      type: object
      properties:
        iban:
          $ref: '#/components/schemas/ibanAccount'
        holder:
          $ref: '#/components/schemas/holder'
        currency:
          $ref: '#/components/schemas/currency'
        amount:
          $ref: '#/components/schemas/amountValue'
        ammuntApplied:
          $ref: '#/components/schemas/amountValue'
        surplusAmount:
          $ref: '#/components/schemas/amountValue'
        canceledAmount:
          $ref: '#/components/schemas/elementType'
        setbacks:
          $ref: '#/components/schemas/setbacksList'
        notAvailable:
          $ref: '#/components/schemas/elementType'
        comision:
          $ref: '#/components/schemas/amountValue'
    setbacksList:
      type: array
      items:
        $ref: '#/components/schemas/retrocesionesDetail'
    retrocesionesDetail:
      type: object
      properties:
        receiptNumer:
          $ref: '#/components/schemas/serviceNumber'
        transaction:
          $ref: '#/components/schemas/elementType'
        operatingStatus:
          $ref: '#/components/schemas/elementType'
        ope4rationDate:
          $ref: '#/components/schemas/typeDate'
        valueDate:
          $ref: '#/components/schemas/typeDate'
        operationAmount:
          $ref: '#/components/schemas/amount'
        associatedService:
          $ref: '#/components/schemas/serviceNumber'
        supplementaryData:
          $ref: '#/components/schemas/filler1000'
    earlyDeliveryOut:
      type: object
      properties:
        result:
          $ref: '#/components/schemas/result'
        body:
          $ref: '#/components/schemas/earlyDeliveryComplete'
    earlyDeliveryComplete:
      type: object
      properties:
        idAccount:
          $ref: '#/components/schemas/idAccount'
        ibanChargeAccount:
          $ref: '#/components/schemas/ibanAccount'
        valueDate:
          $ref: '#/components/schemas/typeDate'
        previousOutstandingCapital:
          $ref: '#/components/schemas/amountValue'
        reducedReceipts:
          $ref: '#/components/schemas/numerical4'
        guaranteeSequence:
          $ref: '#/components/schemas/numerical3'
        waiverAvailable:
          $ref: '#/components/schemas/amountValue'
        deliveryMode:
          $ref: '#/components/schemas/typeDeliveryMode'
        deliveryAmount:
          $ref: '#/components/schemas/amountValue'
        amountFee:
          $ref: '#/components/schemas/amountValue'
        numberOfInstallments:
          $ref: '#/components/schemas/numerical4'
        earlyAmortization:
          $ref: '#/components/schemas/amountValue'
        earlyInterests:
          $ref: '#/components/schemas/amountValue'
        interestBonus:
          $ref: '#/components/schemas/amountValue'
        total:
          $ref: '#/components/schemas/amountValue'
        cer:
          $ref: '#/components/schemas/percentageValue'
        outstandingCapital:
          $ref: '#/components/schemas/amountValue'
        expirationDate:
          $ref: '#/components/schemas/typeDate'
        settlementStartDate:
          $ref: '#/components/schemas/amountValue'
        settlementEndDate:
          $ref: '#/components/schemas/amountValue'
        tae:
          $ref: '#/components/schemas/percentageValue'
        firstHolder:
          $ref: '#/components/schemas/holder'
        secondHolder:
          $ref: '#/components/schemas/holder'
        thirdHolder:
          $ref: '#/components/schemas/holder'
        fourthtHolder:
          $ref: '#/components/schemas/holder'
        setbacks:
          $ref: '#/components/schemas/retrocesionesDetail'
        totalCapital:
          $ref: '#/components/schemas/amountValue'
        totalInterests:
          $ref: '#/components/schemas/amountValue'
        totalIva:
          $ref: '#/components/schemas/amountValue'
        totalBonus:
          $ref: '#/components/schemas/amountValue'
        totalFees:
          $ref: '#/components/schemas/amountValue'
        increaseLifeLoans:
          $ref: '#/components/schemas/numerical4'
        deliveryCommission:
          $ref: '#/components/schemas/amountValue'
        interestDelivered:
          $ref: '#/components/schemas/amountValue'
        loanRepaymentSchedule:
          $ref: '#/components/schemas/earlyDeliveryList'
    earlyDeliveryList:
      type: array
      items:
        $ref: '#/components/schemas/earlyDeliveryDetail'
    earlyDeliveryDetail:
      type: object
      properties:
        receiptDate:
          $ref: '#/components/schemas/typeDate'
        capital:
          $ref: '#/components/schemas/amountValue'
        interest:
          $ref: '#/components/schemas/amountValue'
        iva:
          $ref: '#/components/schemas/amountValue'
        interestBonus:
          $ref: '#/components/schemas/amountValue'
        share:
          $ref: '#/components/schemas/amountValue'
        outstandingCapital:
          $ref: '#/components/schemas/amountValue'
        receiptNumber:
          $ref: '#/components/schemas/receiptNumber'
        delayKey:
          $ref: '#/components/schemas/amountValue'
    queryPendingReceiptsOut:
      type: object
      properties:
        result:
          $ref: '#/components/schemas/result'
        body:
          $ref: '#/components/schemas/queryPendingReceiptsComplete'
    queryPendingReceiptsComplete:
      type: object
      properties:
        idAccount:
          $ref: '#/components/schemas/idAccount'
        outstandingCapital:
          $ref: '#/components/schemas/amountValue'
        delayKey:
          $ref: '#/components/schemas/alphanumeric4'
        delay:
          $ref: '#/components/schemas/percentageValue'
        totalCapital:
          $ref: '#/components/schemas/amountValue'
        totalInterests:
          $ref: '#/components/schemas/amountValue'
        totalDelay:
          $ref: '#/components/schemas/amountValue'
        totalIVA:
          $ref: '#/components/schemas/amountValue'
        totalCharged:
          $ref: '#/components/schemas/amountValue'
        totalPendingPayment:
          $ref: '#/components/schemas/amountValue'
        totalCommissions:
          $ref: '#/components/schemas/amountValue'
        dateReceivedGuarantees:
          $ref: '#/components/schemas/amountValue'
        pendingGuarantees:
          $ref: '#/components/schemas/amountValue'
        pendingAmortization:
          $ref: '#/components/schemas/amountValue'
        pendingInterest:
          $ref: '#/components/schemas/amountValue'
        pendingDelay:
          $ref: '#/components/schemas/amountValue'
        pendingIVA:
          $ref: '#/components/schemas/amountValue'
        cins:
          $ref: '#/components/schemas/alphanumeric2'
        comissionAmountDebitPositions:
          $ref: '#/components/schemas/amountValue'
        listReceipts:
          $ref: '#/components/schemas/pendingReceiptList'
    pendingReceiptList:
      type: array
      items:
        $ref: '#/components/schemas/pendingReceiptDetail'
    pendingReceiptDetail:
      type: object
      properties:
        receiptDate:
          $ref: '#/components/schemas/typeDate'
        receiptNumber:
          $ref: '#/components/schemas/receiptNumber'
        interestType:
          $ref: '#/components/schemas/percentageValue'
        concept:
          $ref: '#/components/schemas/alphanumeric2'
        accountingCapital:
          $ref: '#/components/schemas/amountValue'
        interest:
          $ref: '#/components/schemas/amountValue'
        delay:
          $ref: '#/components/schemas/amountValue'
        iva:
          $ref: '#/components/schemas/amountValue'
        charged:
          $ref: '#/components/schemas/amountValue'
        pendingPayment:
          $ref: '#/components/schemas/amountValue'
        guaranteeSettlementCommission:
          $ref: '#/components/schemas/amountValue'
        pendingDeliveryCommission:
          $ref: '#/components/schemas/amountValue'
        debtorPositionCommission:
          $ref: '#/components/schemas/amountValue'
    typeCommissionFee:
      type: string
      description: Types of commission associated with a loan.
      enum:
        - No commission:
            value: '00000'
            description: no commission
        - Early Loan Delivery:
            value: PREN01
            description: Early loan delivery
      example: Early loan delivery
    typeDeliveryMode:
      type: string
      description: Types of delivery.
      enum:
        - A capital with fee recalculation:
            value: '1'
        - Upcoming capital expirations:
            value: '2'
        - To last capital expirations:
            value: '3'
        - Reduction of receipts:
            value: '4'
        - At last expirations with fee reaction:
            value: '5'
        - Delivery to capital anbd itnerests with fee reaction:
            value: '6'
        - Entrega reduce cuota:
            value: '7'
      example: A capital with fee recalculation
    accountDetail:
      type: object
      properties:
        iban:
          $ref: '#/components/schemas/ibanAccount'
        alias:
          type: string
          description: Account alias.
        id:
          $ref: '#/components/schemas/idAccount'
    elementType:
      type: object
      properties:
        name:
          type: string
          description: Item description
          example: Translation
        id:
          type: string
          description: Item identification code.
          example: Codes.
      description: Codes and translations.
    amount:
      required:
        - amount
        - currency
      type: object
      properties:
        currency:
          $ref: '#/components/schemas/currencyCode'
        amount:
          $ref: '#/components/schemas/amountValue'
      example:
        currency: EUR
        amount: '1568.96'
    result:
      required:
        - code
        - info
      type: object
      properties:
        code:
          type: string
          description: |
            CORE internal code.
          example: INF002
        info:
          type: string
          description: |
            More detailed and readable message describing the code returned by the execution of the service.
          example: Description of the returned code.
    period:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/typePeriod'
        value:
          $ref: '#/components/schemas/valuePeriodo'
    numerical4:
      pattern: '[0-9]{4}'
      type: string
      description: Numerical of length 4.
      example: '4444'
    numerical3:
      pattern: '[0-9]{3}'
      type: string
      description: Numerical of length 3.
      example: '333'
    loanCodProd:
      pattern: '[A-Z][0-9]{5}'
      type: string
      description: Product ID that defines a loan.
      example: PR001
    receiptNumber:
      pattern: '[A-Z]{4}'
      type: string
      description: Receipt number.
      example: AX01
    currencyCode:
      pattern: '[A-Z]{3}'
      type: string
      description: ISO 4217 alphabetical currency code.
      example: EUR
    currencyNum:
      pattern: '[0-9]{3}'
      type: string
      description: ISO 4217 numeric currency code.
      example: '978'
    amountValue:
      pattern: '-?[0-9]{1,14}[.]([0-9]{1,3})?'
      type: string
      description: |

        Value of the amount, formatted according to the currency that defines it
        Negative amounts marked by minus sign.
        The decimal separator is a point.

        **Example:**
        Valid representations for EUR with up to two decimals are:

          * 1056
          * 5768.2
          * -1.50
          * 5877.78
      example: '5877.78'
    tarifaValue:
      type: string
      example: C015678
    percentageValue:
      pattern: '[0-9]{1,3}[.]([0-9]{0,7})'
      type: string
      description: Percentage.
      example: '99.87'
    typePeriod:
      pattern: '[0-9]{2}'
      type: string
      description: |
        Type of period associated with the loan.
      example: '1'
    valuePeriodo:
      pattern: '[0-9]{1}'
      type: string
      description: |
        Value of the period associated with the loan.
      example: '6'
    typeDate:
      type: string
      description: Date
      format: date
      example: '2025-05-12'
    ibanAccount:
      maxLength: 24
      type: string
      description: |
        Alphanumeric code that identifies a specific bank account in a financial institution anywhere in the world.
      format: uri
      example: ES6621000418401234567891
    idAccount:
      maxLength: 18
      pattern: '[0-9]{18}'
      type: string
      description: |
        Internal account number in O.B Engine
      format: string
      example: '12345678901234568'
    holder:
      maxLength: 40
      pattern: '[A-Z][a-z]{40}'
      type: string
      description: |
        Name/Surname of a person.
      format: string
      example: NOMBRE APELLIDO1 APELLIDO 2
    filler1000:
      maxLength: 1000
      type: string
      description: |
        Additional information storage area.
      format: string
      example: '********************** FILLER DATA 1000 ***************'
    serviceNumber:
      maxLength: 15
      type: string
      pattern: '[0-9]{1,15}'
      example: 1471733
    alphanumeric2:
      maxLength: 2
      type: string
      pattern: '[0-9][A-Z][a-z]{2}'
      example: 99
    alphanumeric4:
      maxLength: 4
      type: string
      pattern: '[0-9][A-Z][a-z]{4}'
      example: 9999
    errorMessageCategory:
      type: string
      description: Error level.
      enum:
        - ERROR
        - WARNING
    MessageCode404_OB:
      type: string
      description: Message codes defined in O.B Engine for error code  HTTP 404 (NOT FOUND).
      enum:
        - RESOURCE_UNKNOWN
    MessageCode409_OB:
      type: string
      description: Message codes defined in O.B Engine for error code  HTTP 409 (CONFLICT).
      enum:
        - STATUS_INVALID
    errorMessage404_OB:
      required:
        - category
        - code
      type: object
      properties:
        category:
          $ref: '#/components/schemas/errorMessageCategory'
        code:
          $ref: '#/components/schemas/MessageCode404_OB'
        path:
          type: string
        text:
          $ref: '#/components/schemas/errorMessage404_OB'
    errorMessage409_OB:
      required:
        - category
        - code
      type: object
      properties:
        category:
          $ref: '#/components/schemas/errorMessageCategory'
        code:
          $ref: '#/components/schemas/MessageCode409_OB'
        path:
          type: string
        text:
          $ref: '#/components/schemas/errorMessage409_OB'
    errorMessage:
      type: object
      properties:
        code:
          type: string
          example: XXX
        message:
          type: string
          example: DESC XXX
    errorList:
      type: array
      description: Errors list
      items:
        $ref: '#/components/schemas/errorMessage'
  responses:
    getLoanDetailOut:
      description: Return loan detail.
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/getLoanDetailOut'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/getLoanDetailOut'
    NewLoanOut:
      description: Returns new loan.
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NewLoanOut'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/NewLoanOut'
    getLoansOut:
      description: Returns list of loans of a person.
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/getLoansOut'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/getLoansOut'
    simulateOut:
      description: Returns simulation chart of an account / loan product.
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/simulateOut'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/simulateOut'
    receiptChargedOut:
      description: Query of concepts charged from a receipt
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/receiptChargedOut'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/receiptChargedOut'
    receiptBilledOut:
      description: Check the invoiced concepts of a receipt.
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/receiptBilledOut'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/receiptBilledOut'
    aperiodicEventsScheludedOut:
      description: Query of  of planned aperiodic events.
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/aperiodicEventsScheludedOut'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/aperiodicEventsScheludedOut'
    retrocesionesOut:
      description: Manual deliveries to pending receipts.
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/retrocesionesOut'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/retrocesionesOut'
    earlyDeliveryOut:
      description: Early deliveries
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/earlyDeliveryOut'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/earlyDeliveryOut'
    queryPendingReceiptsOut:
      description: Query of pending receipts
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/queryPendingReceiptsOut'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/queryPendingReceiptsOut'
    BAD_REQUEST_400_OB:
      description: Bad Request
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorList'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/errorList'
    UNAUTHORIZED_401_OB:
      description: Unauthorized
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorList'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/errorList'
    FORBIDDEN_403_OB:
      description: Forbidden
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorList'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/errorList'
    NOT_FOUND_404_OB:
      description: Not found
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorList'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/errorList'
    METHOD_NOT_ALLOWED_405_OB:
      description: Method Not Allowed
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorList'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/errorList'
    NOT_ACCEPTABLE_406_OB:
      description: Not Acceptable
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
    REQUEST_TIMEOUT_408_OB:
      description: Request Timeout
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
    UNSUPPORTED_MEDIA_TYPE_415_OB:
      description: Unsupported Media Type
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
    TOO_MANY_REQUESTS_429_OB:
      description: Too Many Requests
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
    INTERNAL_SERVER_ERROR_500_OB:
      description: Internal Server Error
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
    SERVICE_UNAVAILABLE_503_OB:
      description: Service Unavailable
      headers:
        Location:
          $ref: '#/components/headers/Location'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
  parameters:
    X-Channel:
      name: X-Channel
      in: header
      description: Channel from which the request originates.
      required: true
      style: simple
      explode: false
      schema:
        $ref: '#/components/schemas/X-Channel'
    X-Request-ID:
      name: X-Request-ID
      in: header
      description: Unique Request Id Number.
      required: true
      style: simple
      explode: false
      schema:
        $ref: '#/components/schemas/X-Request-ID'
    loanAccountId:
      name: loanAccountId
      in: path
      description: Internal account number of the loan to be consulted.
      required: true
      style: simple
      explode: false
      schema:
        $ref: '#/components/schemas/idAccount'
    loanCodProd:
      name: loanCodProd
      in: path
      description: Product Id that defines a loan.
      required: true
      style: simple
      explode: false
      schema:
        $ref: '#/components/schemas/loanCodProd'
    dateFrom:
      name: dateFrom
      in: query
      description: Date from
      required: true
      schema:
        $ref: '#/components/schemas/typeDate'
      example: '2019-01-21T00:00:00.000Z'
    dateTo:
      name: dateTo
      in: query
      description: Date to.
      required: false
      schema:
        $ref: '#/components/schemas/typeDate'
      example: '2019-05-02T00:00:00.000Z'
    receiptId:
      name: receiptId
      in: query
      description: Número de recibo.
      required: false
      schema:
        $ref: '#/components/schemas/receiptNumber'
      example: 1234
    valueDate:
      name: valueDate
      in: query
      description: Value date.
      required: false
      schema:
        $ref: '#/components/schemas/typeDate'
      example: '2019-02-13T00:00:00.000Z'
    chargeAccount:
      name: chargeAccount
      in: query
      description: Charge account.
      required: false
      schema:
        $ref: '#/components/schemas/ibanAccount'
      example: ES6621000418401239999987
    amount:
      name: Amount
      in: query
      description: Amount.
      required: false
      schema:
        $ref: '#/components/schemas/amountValue'
      example: 189.36
  examples:
    loansPostExample:
      description: Request body new loan.
      value:
        productoCode: PPPOR
        amount: '3583.26'
        currency:
          id: EUR
          code: '978'
        period:
          type: '01'
          value: '6'
    loansPostResponseExample:
      description: Response new loan.
      value:
        result:
          code: '200'
          info: OK
        body:
          id: '329800735698586629295641978511506172918'
    getLoansOut:
      description: Response loans list.
      value:
        result:
          code: '200'
          info: OK
        body:
          - product:
              subtype:
                name: PRESTAMOS
                id: PR
              description: PRESTAMO PAGO COCINA
              id: PR007
              type:
                name: ACTIVO
                id: A
            startAmount:
              amount: 8000
              currency:
                code: '032'
                id: ARS
            limitAmount:
              amount: 1284.01
              currency:
                code: '032'
                id: ARS
            currency:
              code: '032'
              id: ARS
            account:
              formats:
                - format:
                    name: IBAN
                    id: IBAN
                  value: ES6968867819113534454879
                - format:
                    name: CCC
                    id: CCC
                  value: '68867819113534454879'
              alias: ''
              id: '149100011009408526'
            pendingAmount:
              amount: 1500.01
              currency:
                code: '032'
                id: ARS
            lastMovementDate: '2014-10-30T00:00:00.000Z'
          - product:
              subtype:
                name: PRESTAMOS
                id: PR
              description: CAR LOAN
              id: PR007
              type:
                name: ACTIVO
                id: A
            startAmount:
              amount: 10000
              currency:
                code: '032'
                id: ARS
            limitAmount:
              amount: 1284.01
              currency:
                code: '032'
                id: ARS
            currency:
              code: '032'
              id: ARS
            account:
              formats:
                - format:
                    name: IBAN
                    id: IBAN
                  value: ES6968867819113534454879
                - format:
                    name: CCC
                    id: CCC
                  value: '68867819113534454879'
              alias: ''
              id: '149100011009408526'
            pendingAmount:
              amount: 1400.01
              currency:
                code: '032'
                id: ARS
            lastMovementDate: '2014-10-30T00:00:00.000Z'
          - product:
              subtype:
                name: PRESTAMOS
                id: PR
              description: PERSONAL LOAN
              id: PR007
              type:
                name: ACTIVO
                id: A
            startAmount:
              amount: 1284.01
              currency:
                code: '840'
                id: USD
            limitAmount:
              amount: 1284.01
              currency:
                code: '840'
                id: USD
            currency:
              code: '840'
              id: USD
            account:
              formats:
                - format:
                    name: IBAN
                    id: IBAN
                  value: ES6968867819113534454879
                - format:
                    name: CCC
                    id: CCC
                  value: '68867819113534454879'
              alias: ''
              id: '149100011009408525'
            pendingAmount:
              amount: 1284.01
              currency:
                code: '840'
                id: USD
            lastMovementDate: '2014-10-30T00:00:00.000Z'
          - product:
              subtype:
                name: PRESTAMOS
                id: PR
              description: MOBILE LOAN
              id: PR007
              type:
                name: ACTIVO
                id: A
            startAmount:
              amount: 8000
              currency:
                code: '978'
                id: EUR
            limitAmount:
              amount: 1284.01
              currency:
                code: '978'
                id: EUR
            currency:
              code: '978'
              id: EUR
            account:
              formats:
                - format:
                    name: IBAN
                    id: IBAN
                  value: ES6968867819113534454879
                - format:
                    name: CCC
                    id: CCC
                  value: '68867819113534454879'
              alias: ''
              id: '149100011009408526'
            pendingAmount:
              amount: 1500.01
              currency:
                code: '978'
                id: EUR
            lastMovementDate: '2014-10-30T00:00:00.000Z'
          - product:
              subtype:
                name: PRESTAMOS
                id: PR
              description: CAR LOAN
              id: PR007
              type:
                name: ACTIVO
                id: A
            startAmount:
              amount: 10000
              currency:
                code: '978'
                id: EUR
            limitAmount:
              amount: 1284.01
              currency:
                code: '978'
                id: EUR
            currency:
              code: '978'
              id: EUR
            account:
              formats:
                - format:
                    name: IBAN
                    id: IBAN
                  value: ES6968867819113534454879
                - format:
                    name: CCC
                    id: CCC
                  value: '68867819113534454879'
              alias: ''
              id: '149100011009408526'
            pendingAmount:
              amount: 1400.01
              currency:
                code: '978'
                id: EUR
            lastMovementDate: '2014-10-30T00:00:00.000Z'
          - product:
              subtype:
                name: PRESTAMOS
                id: PR
              description: PERSONAL LOAN
              id: PR007
              type:
                name: ACTIVO
                id: A
            startAmount:
              amount: 1284.01
              currency:
                code: '978'
                id: EUR
            limitAmount:
              amount: 1284.01
              currency:
                code: '978'
                id: EUR
            currency:
              code: '978'
              id: EUR
            account:
              iban: ES6968867819113534454879
              alias: ''
              id: '149100011009408525'
            pendingAmount:
              amount: 1284.01
              currency:
                code: '978'
                id: EUR
            lastMovementDate: '2014-10-30T00:00:00.000Z'
    loansDetailResponseExample:
      description: Response loan detail.
      value:
        result:
          code: '200'
          info: OK
        body:
          product:
            subtype:
              name: PRESTAMOS
              id: PR
            description: HOME LOAN
            id: PR007
            type:
              name: ACTIVO
              id: A
          startAmount:
            amount: 8000
            currency:
              code: '032'
              id: ARS
          limitAmount:
            amount: 1284.01
            currency:
              code: '032'
              id: ARS
          currency:
            code: '032'
            id: ARS
          account:
            formats:
              - format:
                  name: IBAN
                  id: IBAN
                value: ES6968867819113534454879
              - format:
                  name: CCC
                  id: CCC
                value: '68867819113534454879'
            alias: ''
            id: '149100011009408526'
          pendingAmount:
            amount: 1500.01
            currency:
              code: '032'
              id: ARS
          lastMovementDate: '2014-10-30T00:00:00.000Z'
  headers:
    X-Request-ID:
      description: Unique Request Id Number.
      required: true
      style: simple
      explode: false
      schema:
        type: string
        format: uuid
      example: 99391c7e-ad88-49ec-a2ad-99ddcb1f7721
    Location:
      description: |
        Provide information about the location of a newly created resource
      required: false
      style: simple
      explode: false
      schema:
        type: string
        format: url
  securitySchemes:
    O.B oAuth2:
      type: oauth2
      description: O.B Engine Identity server
      flows:
        implicit:
          authorizationUrl: 'https://api.example.com/oauth2/authorize'
          refreshUrl: ' https://api.example.com/oauth2/refresh'
          scopes:
            loans: Servicios apificados préstamos
            others: Otros servicios
        password:
          tokenUrl: ' https://api.example.com/oauth2/token'
          refreshUrl: ' https://api.example.com/oauth2/refresh'
        clientCredentials:
          tokenUrl: ' https://api.example.com/oauth2/token'
          refreshUrl: ' https://api.example.com/oauth2/refresh'
        authorizationCode:
          authorizationUrl: ' https://api.example.com/oauth2/authorize'
          tokenUrl: ' https://api.example.com/oauth2/token'
          refreshUrl: ' https://api.example.com/oauth2/refresh'
