openapi: 3.0.3 info: title: BeClever APIs 2.0 description: version: 1.0.11 servers: - url: https://beclevercorp.com/api/v2 tags: - name: originations description: Everything about your customer's onboarding - name: accounts description: Manage customer's accounts - name: loans description: Manage customer's loans paths: /accounts/{accountId}: get: tags: - accounts summary: find account by accountId description: Returns a single account operationId: AccounttByAccountId parameters: - name: accountId in: path description: accountId of account to return required: true schema: type: integer format: int64 responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/AccountResponse' '400': description: Invalid ID supplied '404': description: accountId not found /accounts/{accountId}/thirdPartyAccounts: get: tags: - accounts summary: list all third party accounts associated to a accountId description: Returns a list of third party accounts operationId: thirdPartyAccountsByAccountId parameters: - name: accountId in: path description: accountId of account to return data from required: true schema: type: integer format: int64 responses: '200': description: successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/ThirdPartyAccount' '400': description: Invalid ID supplied '404': description: accountId not found /accounts/{accountId}/transactions: post: tags: - accounts summary: add transactions identified by type description: Transaction applied operationId: AddTransaction parameters: - name: accountId in: path description: accountId of account to return transactions required: true schema: type: integer format: int64 requestBody: description: Add transaction content: application/json: schema: $ref: '#/components/schemas/Transaction' required: true responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/Transaction' '400': description: Invalid ID supplied '404': description: accountId not found '409': description: transaction could not be applied get: tags: - accounts summary: transactions by accountId description: Returns a list of transactions associated to an account operationId: TransactionsByAccountId parameters: - name: accountId in: path description: accountId of account to return transactions required: true schema: type: integer format: int64 - name: filter in: query description: name of the filter to be applied required: false schema: type: string - name: last_Id in: query description: last ID given last time query was called required: false schema: type: string - name: result_Count in: query description: number of max rows expected required: false schema: type: integer format: int32 responses: '200': description: successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/Transaction' '400': description: Invalid ID supplied content: application/json: schema: $ref: '#/components/schemas/GenericError' '404': description: accountId not found content: application/json: schema: $ref: '#/components/schemas/GenericError' /accounts/{accountId}/transactions/{transactionId}: get: tags: - accounts summary: transaction by transactionId description: Returns a transaction identified by transactionId operationId: TransactionByTransactionId parameters: - name: accountId in: path description: accountId of account to return transactions required: true schema: type: integer format: int64 - name: transactionId in: path description: transactionId to get required: true schema: type: integer format: int64 responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/Transaction' '400': description: Invalid ID supplied content: application/json: schema: $ref: '#/components/schemas/GenericError' '404': description: accountId not found content: application/json: schema: $ref: '#/components/schemas/GenericError' /accounts/{accountId}/notifications: get: tags: - accounts summary: notifications by accountId description: Returns a list of notifications associated to an account operationId: NotificationsByaccountId parameters: - name: accountId in: path description: accountId of account to return transactions required: true schema: type: integer format: int64 - name: filter in: query description: name of the filter to be applied required: false schema: type: string - name: last_Id in: query description: last ID given last time query was called required: false schema: type: string - name: result_Count in: query description: number of max rows expected required: false schema: type: integer format: int32 responses: '200': description: successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/Notification' '400': description: Invalid ID supplied content: application/json: schema: $ref: '#/components/schemas/GenericError' '404': description: accountId not found content: application/json: schema: $ref: '#/components/schemas/GenericError' /accounts/{accountId}/loans: post: tags: - loans summary: add loan description: loan applied operationId: AddLoan parameters: - name: accountId in: path description: accountId of account to associate the loan with required: true schema: type: integer format: int64 requestBody: description: Add Loan content: application/json: schema: $ref: '#/components/schemas/Loan' required: true responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/Loan' '400': description: Invalid ID supplied content: application/json: schema: $ref: '#/components/schemas/GenericError' '404': description: accountId not found content: application/json: schema: $ref: '#/components/schemas/GenericError' '409': description: loan could not be added content: application/json: schema: $ref: '#/components/schemas/GenericError' get: tags: - loans summary: loans by accountId description: Returns a list of loans associated to an account operationId: LoansByaccountId parameters: - name: accountId in: path description: accountId of account to return loans required: true schema: type: integer format: int64 - name: filter in: query description: name of the filter to be applied required: false schema: type: string - name: last_Id in: query description: last ID given last time query was called required: false schema: type: string - name: result_Count in: query description: number of max rows expected required: false schema: type: integer format: int32 responses: '200': description: successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/Loan' '400': description: Invalid ID supplied content: application/json: schema: $ref: '#/components/schemas/GenericError' '404': description: accountId not found content: application/json: schema: $ref: '#/components/schemas/GenericError' /accounts/{accountId}/loans/{loanId}/installments: get: tags: - loans summary: installments by loanId description: Returns a list of installments associated to a loan operationId: installmentsByLoanId parameters: - name: accountId in: path description: loanId of loan to return installments required: true schema: type: integer format: int64 - name: loanId in: path description: loanId of loan to return installments required: true schema: type: integer format: int64 - name: filter in: query description: name of the filter to be applied required: false schema: type: string - name: last_Id in: query description: last ID given last time query was called required: false schema: type: string - name: result_Count in: query description: number of max rows expected required: false schema: type: integer format: int32 responses: '200': description: successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/Installment' '400': description: Invalid ID supplied content: application/json: schema: $ref: '#/components/schemas/GenericError' '404': description: accountId not found content: application/json: schema: $ref: '#/components/schemas/GenericError' /loans/payments: post: tags: - loans summary: cancel loan's installments description: Cancels as many installments as users selects operationId: CancelLoanInstallments requestBody: description: Cancel loan's installments content: application/json: schema: $ref: '#/components/schemas/CancelLoanInstallmentRequest' responses: '200': description: successful operation '409': description: Could not apply cancelation content: application/json: schema: $ref: '#/components/schemas/GenericError' /originations/{entityId}: post: tags: - originations summary: starts customer onboarding process creating an origination and using customer email as the customer id Crea una nueva originación para utilizar en el proceso de onboarding con el mail del usuario como identificación del cliente description: Creates a new origination for customer onboarding operationId: createOrigination parameters: - name: entityId in: path description: entityId of new origination required: true schema: type: integer format: int64 requestBody: description: Creates a new origination content: application/json: schema: $ref: '#/components/schemas/OriginationRequest' responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Origination' '400': description: Could not add origination content: application/json: schema: $ref: '#/components/schemas/GenericError' /originations/{entityId}/{originationId}: put: tags: - originations summary: updates customer onboarding process description: Updates an origination for customer onboarding operationId: updateOrigination parameters: - name: entityId in: path description: entityId of new origination required: true schema: type: integer format: int64 - name: originationId in: path description: ID of origination to return required: true schema: type: integer format: int64 requestBody: description: Updates existing origination content: application/json: schema: $ref: '#/components/schemas/OriginationUpdateRequest' responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Origination' get: tags: - originations summary: find origination by ID description: Returns a single origination operationId: OriginationtById parameters: - name: entityId in: path description: entityId of new origination required: true schema: type: integer format: int64 - name: originationId in: path description: ID of origination to return required: true schema: type: integer format: int64 responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/Origination' '400': description: Invalid ID supplied '404': description: Origination not found /originations/{entityId}/{originationId}:validateEmail: post: tags: - originations summary: validates customer mail for onboarding process description: Validates mail for customer onboarding operationId: validateMailOrigination parameters: - name: entityId in: path description: entityId of new origination required: true schema: type: integer format: int64 - name: originationId in: path description: ID of origination required: true schema: type: integer format: int64 - name: resend in: query description: 0 for initial validation, 1 to resend verification code required: true schema: type: integer format: int64 responses: '200': description: Successful operation /originations/{entityId}/{originationId}:sendCodeToPhoneNumber: post: tags: - originations summary: sends validation code to customer's phone number for onboarding process description: sends validation code to customer's phone number for onboarding process operationId: sendCodeToPhoneNumberOrigination requestBody: description: Phone number to send the code to content: application/json: schema: $ref: '#/components/schemas/SendCodeToPhoneNumberRequest' parameters: - name: entityId in: path description: entityId of new origination required: true schema: type: integer format: int64 - name: originationId in: path description: ID of origination required: true schema: type: integer format: int64 responses: '200': description: Successful operation /originations/{entityId}/{originationId}:validatePhoneNumber: post: tags: - originations summary: validates customer phone number for onboarding process description: Validates phone number for customer onboarding operationId: validatePhoneNumberOrigination requestBody: description: caption and code to validate phone number content: application/json: schema: $ref: '#/components/schemas/ValidatePhoneNumberRequest' parameters: - name: entityId in: path description: entityId of new origination required: true schema: type: integer format: int64 - name: originationId in: path description: ID of origination required: true schema: type: integer format: int64 responses: '200': description: Successful operation /originations/{entityId}/{originationId}:createPassword: post: tags: - originations summary: creates customer password for onboarding process description: creates password for customer onboarding operationId: createPasswordOrigination parameters: - name: entityId in: path description: entityId of new origination required: true schema: type: integer format: int64 - name: originationId in: path description: ID of origination required: true schema: type: integer format: int64 requestBody: description: creates password to associated with the entity_id/origination_id content: application/json: schema: $ref: '#/components/schemas/CreatePassword' responses: '200': description: Successful operation /originations/{entityId}/{originationId}:validateIdentity: post: tags: - originations summary: creates customer password for onboarding process description: creates password for customer onboarding operationId: validateIdentityOrigination parameters: - name: entityId in: path description: entityId of new origination required: true schema: type: integer format: int64 - name: originationId in: path description: ID of origination required: true schema: type: integer format: int64 responses: '200': description: Successful operation components: schemas: AccountResponse: type: object properties: customer_name: type: string example: John Doe accountId_alias: type: string example: nothing.else.matters balance: type: number format: double transactions: type: array items: $ref: '#/components/schemas/Transaction' loans: type: array items: $ref: '#/components/schemas/Loan' CreatePassword: type: object properties: password: type: string description: customer password CancelLoanInstallmentRequest: type: object properties: entity_id: type: integer format: int32 description: Entity where the account belongs account_id: type: integer format: int64 description: Account used to cancell the installments third_party_account_id: type: string description: Third party account associated to the entity/account to be used to cancel the installments. If empty, entity/account will be used amount: type: number format: double installments: type: array items: $ref: '#/components/schemas/InstallmentsToCancell' GenericError: type: object properties: result: type: boolean message: type: string inner_http_return_code: type: integer inner_exception_message: type: string Installment: type: object properties: Installment_id: type: string due_date: type: string format: date principal_repayment: type: number format: double interest: type: number format: double fee: type: number format: double installment_state: type: string InstallmentsToCancell: type: object properties: entity_id: type: integer format: int32 loan_id: type: integer format: int64 installment_number: type: integer format: int32 amount: type: number format: double Loan: type: object properties: loan_id: type: integer format: int64 product_id: type: integer format: int64 currency_id: type: integer format: int64 amount: type: number format: double request_date: type: string format: date first_due_date: type: string format: date installment_count: type: integer format: int16 Notification: type: object properties: notification_id: type: string notification_type: type: string notification_date: type: string format: date notification_message: type: string Origination: type: object properties: origination_id: type: integer format: int64 example: 198772 OriginationRequest: type: object properties: email: type: string example: someone@somedomain.net fiscal_condition_id: type: integer description: 0 for natural person, 1 for company OriginationUpdateRequest: type: object properties: is_politically_exposed_person: type: boolean example: false last_name: type: string example: Doe name: type: string example: Joe birth_date: type: string format: date example: 2001-12-15 sex_id: type: string example: M number_type_id: type: integer description: for argentinian use only - 1 DNI, 2 CUIT number_id: type: string description: identification number for customer employment_type_id: type: integer description: for argentinian use only - 1 monotributo, 2 empleado financial_information_unit: type: boolean description: has obligatorio to inform to financial information unit address: type: string address_number: type: string address_aparment: type: string address_floor: type: string address_postal_code: type: string address_province: type: integer terms_and_condition_acceptance: type: boolean SendCodeToPhoneNumberRequest: type: object properties: area_code: type: integer format: int64 example: 11 phone_number: type: integer format: int64 example: 36433030 Transaction: type: object properties: transaction_id: type: string transaction_date: type: string format: date-time transaction_type: type: string currency_id: type: integer format: int32 third_party_account: type: string entity_branch: type: string description: type: string ammount: type: number format: double ThirdPartyAccount: type: object properties: third_party: type: string example: Bank of America account_type: type: string example: debit card account_id: type: string example: 12345 ValidatePhoneNumberRequest: type: object properties: code: type: string example: 12345 requestBodies: CreatePassword: description: CreatePassword object that has to be sent to associate with origination content: application/json: schema: $ref: '#/components/schemas/CreatePassword' OriginationRequest: description: Origination object that has to be added to origination list content: application/json: schema: $ref: '#/components/schemas/OriginationRequest' SendCodeToPhoneNumberRequest: description: SendCodeToPhoneNumberRequest object that has phone number information content: application/json: schema: $ref: '#/components/schemas/SendCodeToPhoneNumberRequest' ValidatePhoneNumberRequest: description: ValidatePhoneNumberRequest object that holds phone number validation codes content: application/json: schema: $ref: '#/components/schemas/ValidatePhoneNumberRequest' CancelLoanInstallmentRequest: description: CancelLoanInstallmentRequest object that holds information to cancel loan's installments content: application/json: schema: $ref: '#/components/schemas/CancelLoanInstallmentRequest' securitySchemes: api_key: type: apiKey name: api_key in: header