{"openapi":"3.0.1","info":{"title":"Consumer decision service optimi","description":"API for retrieving consumer decision","version":"1.0.0"},"servers":[{"url":"https:\/\/demo.asiakastieto.fi\/"},{"url":"https:\/\/www.asiakastieto.fi\/"}],"paths":{"\/services\/consumer5\/REST":{"get":{"summary":"Retrieve consumer decision with person id","parameters":[{"name":"idnumber","in":"query","required":true,"schema":{"type":"string"},"example":"021060-979D","description":"person id of the target"},{"name":"version","in":"query","required":true,"schema":{"type":"string"},"example":2018,"description":"current consumer API main version 2018"},{"name":"qtype","in":"query","description":"specifies requested consumer data. Value 02 returns consumer credit decision","required":true,"schema":{"type":"string"},"example":"02"},{"name":"userid","in":"query","required":true,"description":"Your user id provided by Suomen Asiakastieto","schema":{"type":"string","minLength":6,"maxLength":12},"example":"myuserid"},{"name":"passwd","in":"query","required":true,"description":"Your password provided by Suomen Asiakastieto","schema":{"type":"string"},"example":"mypassword"},{"name":"enduser","in":"query","required":true,"description":"Chosen by you (1-12 chrs). Must be used when requesting consumer credit information. Can be some identiefer identifying requesting personell or system.","schema":{"type":"string"},"example":"testuser"},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["FI","SV","EN"]},"example":"EN"},{"name":"reqmsg","in":"query","required":true,"schema":{"type":"string"},"example":"DECISION","description":"value DECISION specifies consumer decision is requested"},{"name":"purpose","in":"query","required":true,"schema":{"type":"string"},"example":1,"description":"Purpose of the call is mandatory. Please see purpose codes from documentation."},{"name":"target","in":"query","required":false,"schema":{"type":"string","enum":["TAP1","PAP1"]},"example":"TAP1","description":"specifies target environment. Use TAP1 for demo and PAP1 for production"},{"name":"format","in":"query","required":true,"schema":{"type":"string","enum":["json","xml"]},"example":"json","description":"preferred response format. This swagger describes the json structure"},{"name":"model","in":"query","required":true,"schema":{"type":"string"},"example":"TESTX","description":"Name of the credit decision template"},{"name":"C6_input.code[0]","in":"query","required":false,"schema":{"type":"string"},"example":"A05","description":"custom parameter for the template"},{"name":"C6_input.value[0]","in":"query","required":false,"schema":{"type":"string"},"example":"A","description":"custom value for the template"},{"name":"C6_input.code[1]","in":"query","required":false,"schema":{"type":"string"},"example":"A05","description":"custom parameter for the template"},{"name":"C6_input.value[1]","in":"query","required":false,"schema":{"type":"string"},"example":1000,"description":"custom value for the template"},{"name":"timestamp","in":"query","required":true,"schema":{"type":"string"},"example":"2024052107063028+0000000","description":"timestamp of the call. By default queries cannot be older than 15 minutes."},{"name":"checksum","in":"query","required":true,"schema":{"type":"string","minLength":128,"maxLength":128},"example":"TESTCHECKSUMSUMFORSWAGGERTHATISNOTVALID917CFC8D23F75864C1852B65D263957C88D620C53DDBB4C10F6EB0630FBD1F8AA863FA103A2DB88146DED4967","description":"Checksum of the call that uses shared secret. Please see documentation on authentication."}],"responses":{"200":{"description":"Successful response. All responses fall under 200 also those with errors. In error situation and responseHeader\/responseStatus = 1 and errorMsg\/errorCode is present.","content":{"application\/json":{"schema":{"type":"object","properties":{"consumerResponse":{"type":"object","properties":{"responseHeader":{"type":"object","properties":{"languageCode":{"type":"string","example":"EN"},"timeStamp":{"type":"object","properties":{"date":{"type":"string","example":"2024-05-21"},"time":{"type":"string","example":"10:06:30"}}},"responseStatus":{"type":"string","example":"0"},"currencyCode":{"type":"string","example":"EUR","description":"always EUR"}}},"decisionProposalData":{"type":"object","properties":{"usecode":{"type":"string","example":"1"},"model":{"type":"object","properties":{"code":{"type":"string","example":"TESTX"},"name":{"type":"string","example":"Test template"}}},"customerData":{"type":"object","properties":{"personId":{"type":"string","example":"021060-979D"}}},"decisionProposal":{"type":"object","properties":{"prosessingDate":{"type":"string","example":"2024-08-21"},"proposal":{"type":"object","properties":{"code":{"type":"string","example":"0"},"text":{"type":"string","example":"Rejection is suggested."},"factorRow":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","example":"168"},"text":{"type":"string","example":"The person has payment defaults."}}}}}}}}}},"errorMessage":{"type":"object","properties":{"errorCode":{"type":"string","example":"VC6"},"errorText":{"type":"string","example":"Invalid identity number"}}}}}}}}}}}}}}}