{"openapi":"3.0.0","info":{"title":"1. PF Lender API","description":"1. PF Lender API","version":"1.0.0"},"servers":[{"url":"https://service.cashbot.cz/1pf/1.0.0"}],"tags":[{"name":"Lender","description":"Methods for lender API"}],"paths":{"/token/info/{token}":{"get":{"tags":["Lender"],"summary":"Get token info","operationId":"tokenInfo","parameters":[{"name":"token","in":"path","description":"Random number generated by Lender linked with the client loan application record given to Scoring via initial redirect","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenInfo"}}}},"400":{"description":"API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/scoring/data/{storageToken}":{"post":{"tags":["Lender"],"summary":"Save scoring data","operationId":"scoringData","parameters":[{"name":"storageToken","in":"path","description":"Random number generated by Lender linked with the client loan application record to which Scoring data should linked","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Scoring"}}}},"responses":{"200":{"description":"Scoring data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Scoring"}}}},"400":{"description":"API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/redirect/{redirectToken}":{"get":{"tags":["Lender"],"summary":"Redirect request","operationId":"redirect","parameters":[{"name":"redirectToken","in":"path","description":"Identifies a session that will be resurected after returning to Lender. (Lender session may get timed out after some time of inactivity)","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","description":"Data request status","required":true,"schema":{"type":"string"}}],"responses":{"302":{"description":"Redirect"},"400":{"description":"API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"TokenInfo":{"type":"object","description":"Token info","properties":{"storageToken":{"type":"string","nullable":true,"description":"Random number generated by Lender linked with the client loan application record to which Scoring data should linked"},"redirectToken":{"type":"string","nullable":true,"description":"Identifies a session that will be resurected after returning to Lender. (Lender session may get timed out after some time of inactivity)"},"customer":{"$ref":"#/components/schemas/Customer"},"preferredBank":{"type":"string","nullable":true,"description":"BankCode of the bank that should be preselected. if unknown or none code is given, no preselection follows"}}},"Customer":{"type":"object","description":"Client data used by Scoring to let Client to sign agreement. Some note about passing this data should be displayed by Lender.","properties":{"title":{"type":"string","nullable":true,"description":"Client title(s)"},"name":{"type":"string","nullable":true,"description":"Client name"},"surname":{"type":"string","nullable":true,"description":"Client surname"},"titleBehind":{"type":"string","nullable":true,"description":"Title(s) behind the name"},"dateOfBirth":{"type":"string","nullable":true,"description":"Date of birth of the client. Mandatory if no companyName and companyNumber is filled","format":"date"},"address":{"$ref":"#/components/schemas/Address"},"email":{"type":"string","nullable":true,"description":"Customer email"},"companyName":{"type":"string","nullable":true,"description":"Name of the company. Mandatory if no dateOfBirth is filled."},"companyNumber":{"type":"string","nullable":true,"description":"Identification number (IC) of the company. Mandatory if no dateOfBirth is filled."}}},"Address":{"type":"object","description":"Address of the client","properties":{"street":{"type":"string","nullable":true,"description":"Street and both house nos."},"city":{"type":"string","nullable":true,"description":"City name"},"zip":{"type":"string","nullable":true,"description":"Zip code"},"country":{"type":"string","nullable":true,"description":"Country name"}}},"Scoring":{"type":"object","description":"Scoring response","properties":{"url":{"type":"string","nullable":true,"description":"URL to portal"},"overview":{"$ref":"#/components/schemas/Overview"}}},"Overview":{"type":"object","description":"Summary of the whole period","properties":{"balance":{"type":"number","nullable":true,"description":"Account balance"},"initialBalance":{"type":"number","nullable":true,"description":"Initial account balance"},"maximum":{"type":"number","nullable":true,"description":"Maximum value for the complete period"},"minimum":{"type":"number","nullable":true,"description":"Minimum value for the complete period"},"receivedSum":{"type":"number","nullable":true,"description":"Total value received by the account for the period"},"sentSum":{"type":"number","nullable":true,"description":"Total value sent by the account for the period"},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Account"}}}},"Account":{"type":"object","description":"Client's account involved in transaction","properties":{"name":{"type":"string","nullable":true,"description":"Account name given by client"},"product":{"type":"string","nullable":true,"description":"Product name (account name) given by bank"},"currency":{"type":"string","nullable":true,"description":"Account currency"},"owners":{"type":"string","nullable":true,"description":"Names of owners of the account, separated by comma"},"identification":{"$ref":"#/components/schemas/BankAccount"},"servicer":{"$ref":"#/components/schemas/Servicer"},"balance":{"$ref":"#/components/schemas/Balance"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}}}},"Servicer":{"type":"object","description":"Servicer","properties":{"bankCode":{"type":"string","nullable":true,"description":"Bank code"},"countryCode":{"type":"string","nullable":true,"description":"ISO country code of a bank"}}},"CreditDebitIndicator":{"description":"CRDT/DBIT. Credit debit indicator. Indicates sending DBIT or receiving money CRDT.","type":"string","enum":["DBIT","CRDT"],"example":"DBIT"},"Balance":{"type":"object","description":"Account balance","properties":{"balanceDateTime":{"type":"string","nullable":true,"format":"date-time","description":"Date of balance in ISO format"},"balance":{"type":"number","nullable":true,"description":"Balance amount"},"code":{"type":"string","nullable":true,"description":"Bank internal code"},"creditLine":{"type":"number","nullable":true,"description":"Amount of the overdraft granted on the account"},"included":{"type":"boolean","nullable":true,"description":"Is overdraft included in the balance"},"creditDebitIndicator":{"$ref":"#/components/schemas/CreditDebitIndicator"}}},"Transaction":{"type":"object","properties":{"date":{"type":"string","nullable":true,"format":"date","description":"Date of transaction booking"},"amount":{"type":"number","nullable":true,"description":"Booked value"},"currency":{"type":"string","nullable":true,"description":"Transaction currency"},"bankTransactionCode":{"type":"string","nullable":true,"description":"Code of transaction"},"issuer":{"type":"string","nullable":true,"description":"Issuer of the transaction code"},"account":{"$ref":"#/components/schemas/BankAccount"},"creditDebitIndicator":{"$ref":"#/components/schemas/CreditDebitIndicator"},"relatedParties":{"$ref":"#/components/schemas/RelatedParties"},"remittanceInformation":{"$ref":"#/components/schemas/RemittanceInformation"},"additionalTransactionInformation":{"type":"string","nullable":true,"description":"Further additional information in unstructured format"},"otherInformation":{"type":"string","nullable":true,"description":"Other information in JSON format, mostly stg. that is present in one bank etc."}}},"RelatedParties":{"type":"object","description":"Related parties for payments from and to account","properties":{"debtor":{"$ref":"#/components/schemas/BankAccountOwner"},"debtorAccount":{"$ref":"#/components/schemas/BankAccount"},"creditor":{"$ref":"#/components/schemas/BankAccountOwner"},"creditorAccount":{"$ref":"#/components/schemas/BankAccount"}}},"BankAccountOwner":{"type":"object","properties":{"name":{"type":"string","nullable":true,"description":"Debtor account name"}}},"BankAccount":{"type":"object","description":"Bank account","properties":{"iban":{"type":"string","nullable":true,"description":"IBAN account number"},"other":{"$ref":"#/components/schemas/BankAccountNumber"},"name":{"type":"string","nullable":true,"description":"Account name"}}},"BankAccountNumber":{"type":"object","description":"Bank account number","properties":{"identification":{"type":"string","nullable":true,"description":"Identification of an account from which the money were sent"}}},"RemittanceInformation":{"type":"object","description":"Remittance information","properties":{"unstructured":{"type":"string","nullable":true,"description":"Unstructured data"},"structured":{"$ref":"#/components/schemas/Structured"}}},"Structured":{"type":"object","description":"Additional information in structured format","properties":{"creditorReferenceInformation":{"$ref":"#/components/schemas/CreditorReferenceInformation"}}},"CreditorReferenceInformation":{"type":"object","description":"Creditor reference information","properties":{"ks":{"type":"string","nullable":true,"description":"Constant symbol"},"vs":{"type":"string","nullable":true,"description":"Variable symbol"},"ss":{"type":"string","nullable":true,"description":"Specific symbol"}}},"Error":{"type":"object","description":"API error","properties":{"errorCode":{"type":"string","nullable":true,"description":"Error code"},"errorDescription":{"type":"string","nullable":true,"description":"Error description"}}}}}}