{"openapi":"3.0.1","info":{"title":"1672.parb-Authentication-s-rest-v1","description":"1.36017 Аутентификация клиента в точках продаж и контакт-центре Банка","contact":{"url":"https://wiki.corp.dev.vtb/pages/viewpage.action?pageId=1070018594"},"version":"1.0.0"},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/hahahahba/1312/1.0.0"},{"url":"http://parb-auth-v2.ss5-genr02-parb-sso-ift.apps.ss5-genr02.test.vtb.ru","description":"K3","variables":{}},{"url":"http://parb-auth.k4-vtbid.apps.kt-oscp.vtb24.ru","description":"K4","variables":{}},{"url":"http://parb-auth.k10-vtbid.apps.k10-oscp.vtb24.ru","description":"K10","variables":{}}],"paths":{"/v1/authentication/logout":{"post":{"tags":["authentication-controller"],"summary":"Invalidate jwt token","description":"Invalidate jwt token","operationId":"closeToken","parameters":[{"name":"sessionId","in":"query","description":"Identifier of client session.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"OK"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"},"example":{"type":"invalid_request","message":"Некорректный запрос","message_title":"Укажите все необходимые параметры и повторите попытку позже!"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"},"example":{"type":"generic_error","message":"Ошибка операции","message_title":"Ошибка операции, попробуйте повторить позже."}}}}}}},"/v1/authentication/createSession":{"post":{"tags":["authentication-controller"],"summary":"Create session in session data service","description":"Create session in session data service","operationId":"createSession","responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"type":"string","format":"uuid"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"},"example":{"type":"generic_error","message":"Ошибка операции","message_title":"Ошибка операции, попробуйте повторить позже."}}}}}}},"/v1/authentication/authenticate":{"post":{"tags":["authentication-controller"],"summary":"Authenticate","description":"Authenticate request","operationId":"authenticate","parameters":[{"name":"Authorization","in":"header","description":"Token to retrieve user's session. Cannot be null or empty.","required":false,"schema":{"type":"string"}},{"name":"X-Device-FingerPrint","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Real-Ip","in":"header","required":false,"schema":{"type":"string"}},{"name":"x-epa-ctxi","in":"header","required":false,"schema":{"type":"string"}},{"name":"x-epa-sub","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticateResponse"},"example":{"name":"Иванов","birthday":"01-01-1970","address":"Ворнонеж, Ул. Туполева, д. 5, кв 62"}}}},"204":{"description":"OK, there aren't any questions to be answered"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"},"example":{"type":"invalid_request","message":"Некорректный запрос","message_title":"Укажите все необходимые параметры и повторите попытку позже!"}}}},"403":{"description":"Client in blacklist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"},"example":{"type":"user_in_blacklist","message":"Клиент в черном списке","message_title":"Клиент в черном списке. Операция не может быть выполнена."}}}},"404":{"description":"Client or trusted phone not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"},"examples":{"Client not found":{"description":"Client not found","value":{"type":"user_not_found","message":"Пользователь не найден","message_title":"Пользователь не найден. Проверьте наличие ДКО у клиента."}},"Phone not found":{"description":"Phone not found","value":{"type":"phone_not_found","message":"Доверенный номер телефона не найден","message_title":"Доверенный номер телефона не найден. Необходимо актуализировать информацию о доверенном номере телефона."}}}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"},"example":{"type":"generic_error","message":"Ошибка операции","message_title":"Ошибка операции, попробуйте повторить позже."}}}}}}},"/v1/authentication/listRiskLevel":{"get":{"tags":["authentication-controller"],"summary":"Temporary, for testing. List risk levels if isForceCC. Null, otherwise","operationId":"listRiskLevel","parameters":[{"name":"x-epa-sub","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Prompt user with operation risk level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRiskLevelResult"},"example":{"riskLevels":["highrisk","lowrisk","common","block"],"operationClasses":["SMS_INFO_CANCEL","CREDIT_CARD","DEPOSIT","OTHER"]}}}},"204":{"description":"No need to ask user about operation risk level","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/v1/authentication/authSMSTest":{"get":{"tags":["authentication-controller"],"operationId":"authSMSTest","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"ErrorResponseDto":{"type":"object","properties":{"type":{"maxLength":255,"type":"string","description":"Type of error"},"message":{"maxLength":4096,"type":"string","description":"Error message"},"message_title":{"maxLength":4096,"type":"string","description":"Title of error message"},"additional_properties":{"type":"object","additionalProperties":{"type":"string","description":"Additional properties"},"description":"Additional properties"}}},"AuthenticateRequest":{"required":["operationId","sessionId"],"type":"object","properties":{"sessionId":{"maxLength":255,"type":"string","description":"Identifier of client session"},"operationId":{"maxLength":255,"type":"string","description":"Operation ID. Ex.: START_PARB_TPCC_BLOCKING_VTB_ONLINE_ACCOUNT"},"riskLevel":{"type":"string","description":"Operation risk level","enum":["highrisk","lowrisk","common","block"]},"operationClass":{"type":"string","description":"Operation class","enum":["SMS_INFO_CANCEL","CREDIT_CARD","DEPOSIT","OTHER"]},"isFromTrustedPhone":{"type":"boolean","description":"For testing only. If \"true\", ignores mobilePhone field and assume call made from trusted phone number"},"mobilePhone":{"maxLength":255,"type":"string","description":"Mobile phone the call has been made from"},"isNamePatronymicAnswered":{"type":"boolean","description":"Given name and patronymic have been answered successfully"},"isSurnameAnswered":{"type":"boolean","description":"Surname has been answered successfully"},"isNameAnswered":{"type":"boolean","description":"Full name (surname, first name, and patronymic) have been answered successfully"},"isPassportAnswered":{"type":"boolean","description":"Passport has been answered successfully"},"isBirthdayAnswered":{"type":"boolean","description":"Birthday has been answered successfully"},"isAddressAnswered":{"type":"boolean","description":"Address number has been answered successfully"},"isMobilePhoneAnswered":{"type":"boolean","description":"Mobile phone has been answered successfully"},"codeSendMethod":{"type":"string","description":"User chose SMS delivery method","enum":["SMS","EMAIL"]},"isCodeAnswered":{"type":"boolean","description":"Code (aka SMS code) has been answered successfully"},"questionChoice":{"type":"string","description":"Client has chosen next question","enum":["LAST_CARD_OPERATION","CARD_EXPIRE_DATE","CARD_CREDIT_LIMIT","DEPOSIT_AMOUNT","DEPOSIT_INTEREST_RATE","DEPOSIT_NAME","DEPOSIT_OPEN_DATE","MASTER_ACCOUNT_OPERATIONS"]},"isChosenQuestionAnswered":{"type":"boolean","description":"Client has answered the question of their choice"}},"description":"Required information to authenticate the client. Cannot be null or empty."},"AuthenticateResponse":{"type":"object","properties":{"namePatronymic":{"maxLength":255,"type":"string","description":"Client given name and patronymic"},"surname":{"maxLength":255,"type":"string","description":"Client surname"},"name":{"maxLength":255,"type":"string","description":"Client full name (last name, patronymic, and surname)"},"passport":{"maxLength":255,"type":"string","description":"Passport of client"},"birthday":{"pattern":"^[0-9]{2}-[0-9]{2}-[0-9]{4}$","type":"string","description":"Birthday of client in format dd-MM-yyyy","format":"date-time"},"address":{"maxLength":255,"type":"string","description":"Client apartment number or house number"},"mobilePhone":{"maxLength":255,"type":"string","description":"Mobile phone. Basically the trusted phone number"},"code":{"$ref":"#/components/schemas/CodeObj"},"questionChoices":{"type":"array","description":"Client chooses next question","items":{"$ref":"#/components/schemas/QuestionChoiceItem"}},"cardOperations":{"type":"array","description":"Active cards and their operations","items":{"$ref":"#/components/schemas/CardOperations"}},"cardsExpireDate":{"type":"array","description":"Active cards with their expire date","items":{"$ref":"#/components/schemas/CardExpireDate"}},"cardsCreditLimit":{"type":"array","description":"Active cards with their credit limit","items":{"$ref":"#/components/schemas/CardCreditLimit"}},"depositBalance":{"type":"array","description":"Deposit balance","items":{"$ref":"#/components/schemas/DepositBalance"}},"depositInterestRate":{"type":"array","description":"Deposit interest rate","items":{"$ref":"#/components/schemas/DepositInterestRate"}},"depositNames":{"type":"array","description":"Deposit name","items":{"type":"string","description":"Deposit name"}},"depositOpenDate":{"type":"array","description":"Deposit open/last prolongation date","items":{"$ref":"#/components/schemas/DepositOpenDate"}},"masterAccountOperations":{"type":"array","description":"Last 5 master account operations","items":{"$ref":"#/components/schemas/Operation"}},"codeSendMethods":{"type":"array","items":{"$ref":"#/components/schemas/CodeSendMethodItem"}}}},"CardCreditLimit":{"type":"object","properties":{"maskedNumber":{"type":"string","description":"Masked card number"},"creditLimit":{"type":"number","description":"Credit limit"}},"description":"Active cards with their credit limit"},"CardExpireDate":{"type":"object","properties":{"maskedNumber":{"type":"string","description":"Masked card number"},"expireDate":{"type":"string","description":"Expire date","format":"date-time"}},"description":"Active cards with their expire date"},"CardOperations":{"type":"object","properties":{"maskedNumber":{"type":"string","description":"Credit card masked number"},"cardOperations":{"type":"array","description":"Operations","items":{"$ref":"#/components/schemas/Operation"}}},"description":"Active cards and associated operations"},"CodeObj":{"maxLength":255,"type":"object","properties":{"emailOrPhone":{"maxLength":255,"type":"string","description":"Email or phone number where code has been sent"},"code":{"type":"string","description":"Code (aka SMS)"}},"description":"Code (aka SMS code)"},"CodeSendMethodItem":{"type":"object","properties":{"code":{"type":"string","enum":["SMS","EMAIL"]},"text":{"type":"string"}},"description":"Code sending method for display","example":[{"code":"EMAIL","text":"Отправить по e-mail"},{"code":"SMS","text":"Отправить SMS"}]},"DepositBalance":{"type":"object","properties":{"name":{"type":"string","description":"Deposit name"},"balance":{"type":"number","description":"Balance"},"balanceCurrency":{"type":"string","description":"Balance currency"}},"description":"Deposit balance"},"DepositInterestRate":{"type":"object","properties":{"name":{"type":"string","description":"Deposit name"},"interestRate":{"type":"number","description":"Interest rate"}},"description":"Deposit interest rate"},"DepositOpenDate":{"type":"object","properties":{"name":{"type":"string","description":"Deposit name"},"openDate":{"pattern":"yyyy-MM-dd'T'HH:mm:ss.SSSXXX","type":"string","description":"Open date","format":"date-time"},"lastProlongationDate":{"pattern":"yyyy-MM-dd'T'HH:mm:ss.SSSXXX","type":"string","description":"Last prolongation date","format":"date-time"}},"description":"Deposit open/last prolongation date"},"Operation":{"type":"object","properties":{"name":{"maxLength":255,"type":"string","description":"Name of operation"},"card":{"maxLength":255,"type":"string","description":"Card of operation"},"dateTime":{"pattern":"yyyy-MM-dd'T'HH:mm:ss.SSSXXX","type":"string","description":"Date and time of operation","format":"date-time"},"amount":{"maxLength":255,"type":"string","description":"Amount of operation"},"status":{"maxLength":255,"type":"string","description":"Status of operation"},"currency":{"maxLength":255,"type":"string","description":"ISO currency code of operation"}},"description":"Last 5 master account operations"},"QuestionChoiceItem":{"type":"object","properties":{"code":{"type":"string","enum":["LAST_CARD_OPERATION","CARD_EXPIRE_DATE","CARD_CREDIT_LIMIT","DEPOSIT_AMOUNT","DEPOSIT_INTEREST_RATE","DEPOSIT_NAME","DEPOSIT_OPEN_DATE","MASTER_ACCOUNT_OPERATIONS"]},"text":{"type":"string"},"questionChoiceClass":{"type":"string","enum":["CARD","DEPOSIT","MASTER_ACCOUNT"]}},"description":"Client chooses next question"},"ListRiskLevelResult":{"type":"object","properties":{"riskLevels":{"type":"array","items":{"type":"string","enum":["highrisk","lowrisk","common","block"]}},"operationClasses":{"type":"array","items":{"type":"string","enum":["SMS_INFO_CANCEL","CREDIT_CARD","DEPOSIT","OTHER"]}}}}}}}