Customers Bank Loan API

The Loan API from Customers Bank — 6 operation(s) for loan.

Operations 7

GET /loan/{id} /loan/{id} - GET #
POST /loan/{id}/funding /loan/{id}/funding - POST #
GET /loan/{id}/funding /loan/{id}/funding - GET #
GET /loan/{id}/funding/{fundingInstructionId} /loan/{id}/funding/{fundingInstructionId} - GET #
GET /loan /loan - GET #
POST /loan/{id}/complete /loan/{id}/complete - POST #
POST /loan/{id}/cancel /loan/{id}/cancel - POST #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/customers-bank-loan-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

customers-bank-loan-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: ConsumerLending Loan API
  version: v1
servers:
- url: https://cubi-sandbox-api.customersbank.com/consumerlending/v1
tags:
- name: Loan
paths:
  /loan/{id}:
    get:
      tags:
      - Loan
      summary: /loan/{id} - GET
      description: Retrieve the details of a specific loan using its Id value.
      operationId: get-loan-id
      parameters:
      - name: id
        in: path
        description: ''
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.LoanResponseDto'
              examples:
                default:
                  value: null
            application/json:
              schema:
                $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.LoanResponseDto'
              example:
                id: string
                applicationId: string
                programId: string
                approvedAmount: 0
                amountFunded: 0
                originationFeeAmount: 0
                promotionExpiryDate: string
                merchantDiscountRateAmount: 0
                disbursementDate: string
                maturityDate: string
                status: Open
            text/json:
              schema:
                $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.LoanResponseDto'
              example:
                id: string
                applicationId: string
                programId: string
                approvedAmount: 0
                amountFunded: 0
                originationFeeAmount: 0
                promotionExpiryDate: string
                merchantDiscountRateAmount: 0
                disbursementDate: string
                maturityDate: string
                status: Open
        '400':
          description: BadRequest
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.1
                title: One or more validation errors occurred.
                status: 400
                traceId: string
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.2
                title: Unauthorized
                status: 401
                traceId: string
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.4
                title: Forbidden
                status: 403
                traceId: string
        '404':
          description: NotFound
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.5
                title: Not Found
                status: 404
                traceId: string
        '422':
          description: UnprocessableEntity
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc4918#section-11.2
                title: Unprocessable Entity
                status: 422
                traceId: string
        '500':
          description: InternalServerError
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.6.1
                title: An error occurred while processing your request.
                status: 500
                traceId: string
  /loan/{id}/funding:
    post:
      tags:
      - Loan
      summary: /loan/{id}/funding - POST
      description: Submit a funding instruction to initiate a disbursement for the specified loan.
      operationId: post-loan-id-funding
      parameters:
      - name: id
        in: path
        description: ''
        required: true
        schema:
          type: string
          format: uuid
      - name: x-idempotency-key
        in: header
        description: Unique request idenitfier for idempotency.
        required: true
        schema:
          type: string
          format: uuid
        example: 951dc66d-aaee-4591-8ee7-7ca0d2648e77
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.FundingInstructionDto'
            example:
            - amountToFund: 0
              routingNumber: string
              accountNumber: string
              accountName: string
              accountType: Checking
              platformReferenceNumber: string
          text/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.FundingInstructionDto'
            example:
            - amountToFund: 0
              routingNumber: string
              accountNumber: string
              accountName: string
              accountType: Checking
              platformReferenceNumber: string
          application/*+json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.FundingInstructionDto'
            example:
            - amountToFund: 0
              routingNumber: string
              accountNumber: string
              accountName: string
              accountType: Checking
              platformReferenceNumber: string
      responses:
        '202':
          description: Accepted
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.FundingSubmissionResponseDto'
              examples:
                default:
                  value: null
            application/json:
              schema:
                $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.FundingSubmissionResponseDto'
              example:
                id: string
                fundingInstructions:
                - platformReferenceNumber: string
                  fundingInstructionId: string
            text/json:
              schema:
                $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.FundingSubmissionResponseDto'
              example:
                id: string
                fundingInstructions:
                - platformReferenceNumber: string
                  fundingInstructionId: string
        '400':
          description: BadRequest
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.1
                title: One or more validation errors occurred.
                status: 400
                traceId: string
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.2
                title: Unauthorized
                status: 401
                traceId: string
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.4
                title: Forbidden
                status: 403
                traceId: string
        '404':
          description: NotFound
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.5
                title: Not Found
                status: 404
                traceId: string
        '422':
          description: UnprocessableEntity
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc4918#section-11.2
                title: Unprocessable Entity
                status: 422
                traceId: string
        '500':
          description: InternalServerError
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.6.1
                title: An error occurred while processing your request.
                status: 500
                traceId: string
    get:
      tags:
      - Loan
      summary: /loan/{id}/funding - GET
      description: Retrieve a list of funding instruction details that have been submitted on the specified loan.
      operationId: get-loan-id-funding
      parameters:
      - name: id
        in: path
        description: ''
        required: true
        schema:
          type: string
          format: uuid
      - name: submissionId
        in: query
        description: The funding submission id to search loan funding instructions for
        schema:
          type: string
          format: uuid
          example: 00000000-0000-0000-0000-000000000000
        example: 00000000-0000-0000-0000-000000000000
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Cubi.Common.Abstractions.Paginated_Cubi.ConsumerLending.WebApi.Dto.LoanFundingResponseDto'
              examples:
                default:
                  value: null
            application/json:
              schema:
                $ref: '#/components/schemas/Cubi.Common.Abstractions.Paginated_Cubi.ConsumerLending.WebApi.Dto.LoanFundingResponseDto'
              example:
                pageSize: 0
                pageOffset: 0
                totalPages: 0
                totalItemCount: 0
                items:
                - id: string
                  submissionId: string
                  loanId: string
                  applicationId: string
                  accountNumber: string
                  accountName: string
                  accountType: Checking
                  routingNumber: string
                  amountToFund: 0
                  fundingType: OnDemand
                  fundingState: Unfunded
                  receivedDate: string
                  sentToRailDate: string
                  platformReferenceNumber: string
                  rejectionReason: string
            text/json:
              schema:
                $ref: '#/components/schemas/Cubi.Common.Abstractions.Paginated_Cubi.ConsumerLending.WebApi.Dto.LoanFundingResponseDto'
              example:
                pageSize: 0
                pageOffset: 0
                totalPages: 0
                totalItemCount: 0
                items:
                - id: string
                  submissionId: string
                  loanId: string
                  applicationId: string
                  accountNumber: string
                  accountName: string
                  accountType: Checking
                  routingNumber: string
                  amountToFund: 0
                  fundingType: OnDemand
                  fundingState: Unfunded
                  receivedDate: string
                  sentToRailDate: string
                  platformReferenceNumber: string
                  rejectionReason: string
        '400':
          description: BadRequest
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.1
                title: One or more validation errors occurred.
                status: 400
                traceId: string
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.2
                title: Unauthorized
                status: 401
                traceId: string
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.4
                title: Forbidden
                status: 403
                traceId: string
        '404':
          description: NotFound
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.5
                title: Not Found
                status: 404
                traceId: string
        '422':
          description: UnprocessableEntity
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc4918#section-11.2
                title: Unprocessable Entity
                status: 422
                traceId: string
        '500':
          description: InternalServerError
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.6.1
                title: An error occurred while processing your request.
                status: 500
                traceId: string
  /loan/{id}/funding/{fundingInstructionId}:
    get:
      tags:
      - Loan
      summary: /loan/{id}/funding/{fundingInstructionId} - GET
      description: Retrieve the details of a specific funding instruction, using its Id, for the specified loan.
      operationId: get-loan-id-funding-fundinginstructionid
      parameters:
      - name: id
        in: path
        description: ''
        required: true
        schema:
          type: string
          format: uuid
      - name: fundingInstructionId
        in: path
        description: ''
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.LoanFundingResponseDto'
              examples:
                default:
                  value: null
            application/json:
              schema:
                $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.LoanFundingResponseDto'
              example:
                id: string
                submissionId: string
                loanId: string
                applicationId: string
                accountNumber: string
                accountName: string
                accountType: Checking
                routingNumber: string
                amountToFund: 0
                fundingType: OnDemand
                fundingState: Unfunded
                receivedDate: string
                sentToRailDate: string
                platformReferenceNumber: string
                rejectionReason: string
            text/json:
              schema:
                $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.LoanFundingResponseDto'
              example:
                id: string
                submissionId: string
                loanId: string
                applicationId: string
                accountNumber: string
                accountName: string
                accountType: Checking
                routingNumber: string
                amountToFund: 0
                fundingType: OnDemand
                fundingState: Unfunded
                receivedDate: string
                sentToRailDate: string
                platformReferenceNumber: string
                rejectionReason: string
        '400':
          description: BadRequest
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.1
                title: One or more validation errors occurred.
                status: 400
                traceId: string
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.2
                title: Unauthorized
                status: 401
                traceId: string
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.4
                title: Forbidden
                status: 403
                traceId: string
        '404':
          description: NotFound
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.5
                title: Not Found
                status: 404
                traceId: string
        '500':
          description: InternalServerError
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.6.1
                title: An error occurred while processing your request.
                status: 500
                traceId: string
  /loan:
    get:
      tags:
      - Loan
      summary: /loan - GET
      description: Retrieve a paginated list of loans filtered by the search options provided.
      operationId: get-loan
      parameters:
      - name: paginateResults
        in: query
        schema:
          type: boolean
      - name: page
        in: query
        schema:
          type: integer
          format: int32
      - name: perPage
        in: query
        schema:
          type: integer
          format: int32
      - name: sortOn
        in: query
        schema:
          type: string
      - name: sortAscending
        in: query
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Cubi.Common.Abstractions.Paginated_Cubi.ConsumerLending.WebApi.Dto.LoanResponseDto'
              examples:
                default:
                  value: null
            application/json:
              schema:
                $ref: '#/components/schemas/Cubi.Common.Abstractions.Paginated_Cubi.ConsumerLending.WebApi.Dto.LoanResponseDto'
              example:
                pageSize: 0
                pageOffset: 0
                totalPages: 0
                totalItemCount: 0
                items:
                - id: string
                  applicationId: string
                  programId: string
                  approvedAmount: 0
                  amountFunded: 0
                  originationFeeAmount: 0
                  promotionExpiryDate: string
                  merchantDiscountRateAmount: 0
                  disbursementDate: string
                  maturityDate: string
                  status: Open
            text/json:
              schema:
                $ref: '#/components/schemas/Cubi.Common.Abstractions.Paginated_Cubi.ConsumerLending.WebApi.Dto.LoanResponseDto'
              example:
                pageSize: 0
                pageOffset: 0
                totalPages: 0
                totalItemCount: 0
                items:
                - id: string
                  applicationId: string
                  programId: string
                  approvedAmount: 0
                  amountFunded: 0
                  originationFeeAmount: 0
                  promotionExpiryDate: string
                  merchantDiscountRateAmount: 0
                  disbursementDate: string
                  maturityDate: string
                  status: Open
        '400':
          description: BadRequest
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.1
                title: One or more validation errors occurred.
                status: 400
                traceId: string
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.2
                title: Unauthorized
                status: 401
                traceId: string
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.4
                title: Forbidden
                status: 403
                traceId: string
        '404':
          description: NotFound
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.5
                title: Not Found
                status: 404
                traceId: string
        '422':
          description: UnprocessableEntity
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc4918#section-11.2
                title: Unprocessable Entity
                status: 422
                traceId: string
        '500':
          description: InternalServerError
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.6.1
                title: An error occurred while processing your request.
                status: 500
                traceId: string
  /loan/{id}/complete:
    post:
      tags:
      - Loan
      summary: /loan/{id}/complete - POST
      description: Declare that the process to complete a loan is being initiated. A loan can immediately be completed if there are no outstanding fundings being processed. If there are outstanding fundings being processed the loan well be marked as pending completion until those fundings have been successfully processed which will trigger completing the loan. Once completed the loan can no longer be funded.
      operationId: post-loan-id-complete
      parameters:
      - name: id
        in: path
        description: ''
        required: true
        schema:
          type: string
          format: uuid
      - name: x-idempotency-key
        in: header
        description: Unique request idenitfier for idempotency.
        required: true
        schema:
          type: string
          format: uuid
        example: d288e766-b5ca-4f97-b5e6-751a143a4621
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.LoanCompletionDetailsDto'
            example:
              completionReason: string
              isEarlyCompletion: true
          text/json:
            schema:
              $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.LoanCompletionDetailsDto'
            example:
              completionReason: string
              isEarlyCompletion: true
          application/*+json:
            schema:
              $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.LoanCompletionDetailsDto'
            example:
              completionReason: string
              isEarlyCompletion: true
      responses:
        '202':
          description: Accepted
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.LoanCompletionReponseDto'
              examples:
                default:
                  value: null
            application/json:
              schema:
                $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.LoanCompletionReponseDto'
              example:
                id: string
            text/json:
              schema:
                $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.LoanCompletionReponseDto'
              example:
                id: string
        '400':
          description: BadRequest
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.1
                title: One or more validation errors occurred.
                status: 400
                traceId: string
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.2
                title: Unauthorized
                status: 401
                traceId: string
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.4
                title: Forbidden
                status: 403
                traceId: string
        '404':
          description: NotFound
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.5
                title: Not Found
                status: 404
                traceId: string
        '422':
          description: UnprocessableEntity
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc4918#section-11.2
                title: Unprocessable Entity
                status: 422
                traceId: string
        '500':
          description: InternalServerError
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.6.1
                title: An error occurred while processing your request.
                status: 500
                traceId: string
  /loan/{id}/cancel:
    post:
      tags:
      - Loan
      summary: /loan/{id}/cancel - POST
      description: Declare that a loan's status is being changed to cancelled. Once cancelled the loan can no longer be funded.
      operationId: post-loan-id-cancel
      parameters:
      - name: id
        in: path
        description: ''
        required: true
        schema:
          type: string
          format: uuid
      - name: x-idempotency-key
        in: header
        description: Unique request idenitfier for idempotency.
        required: true
        schema:
          type: string
          format: uuid
        example: 2ad7c34d-7841-433d-986a-64269a9b7d05
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.LoanCancellationDetailsDto'
            example:
              cancellationReason: string
          text/json:
            schema:
              $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.LoanCancellationDetailsDto'
            example:
              cancellationReason: string
          application/*+json:
            schema:
              $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.LoanCancellationDetailsDto'
            example:
              cancellationReason: string
      responses:
        '202':
          description: Accepted
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.LoanCancellationResponseDto'
              examples:
                default:
                  value: null
            application/json:
              schema:
                $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.LoanCancellationResponseDto'
              example:
                id: string
            text/json:
              schema:
                $ref: '#/components/schemas/Cubi.ConsumerLending.WebApi.Dto.LoanCancellationResponseDto'
              example:
                id: string
        '400':
          description: BadRequest
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.5.1
                title: One or more validation errors occurred.
                status: 400
                traceId: string
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
              exam

# --- truncated at 32 KB (46 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/customers-bank/refs/heads/main/openapi/customers-bank-loan-api-openapi.yml