--- swagger: "2.0" info: x-ibm-name: digital-consents-api title: Digital Consents API version: 1.0.0 description: Управление цифровым согласием (физ. лицо) contact: name: АО «Банк ЦентрКредит» email: api@bcc.kz schemes: - https basePath: /v1/digital-consent/individual consumes: - application/json produces: - application/json securityDefinitions: Authorization: type: oauth2 description: Токен аутентификации, полученный при вызове сервиса авторизации flow: application scopes: bcc.application.govtech.api: Allow access to Goventment Services API tokenUrl: https://api.bcc.kz/bcc/production/v2/oauth/token x-ibm-configuration: testable: true enforced: true phase: realized paths: /{id}/send-otp: post: tags: - DigitalConsentIndividualController summary: Отправка SMS кода для подтверждения действия (согласие, отзыв) по ЦС description: | Создание черновика ЦС для физ. лица (с формированием документа для дальнейшего подтверждения) Возможные коды ошибок: VALIDATION_EXCEPTION | INTERNAL_ERROR | DIGITAL_CONSENT_NOT_FOUND INVALID_STATE | OTP_SEND_FAILURE | DIGITAL_CONSENT_INDIVIDUAL_INVALID_DOCUMENT DIGITAL_CONSENT_INDIVIDUAL_OTP_ALREADY_CONFIRMED operationId: sendOtp parameters: - name: Accept-Language in: header description: Код культуры KK | RU | EN required: true type: string - name: id in: path description: Идентификатор ЦС required: true type: integer format: int64 - name: requestBody required: true in: body schema: $ref: '#/definitions/DigitalConsentIndividualSendOtpRequestDto' description: Тело запроса consumes: - application/json produces: - application/json responses: 200: description: OK parameters: - name: id type: integer required: true in: path format: int32 /{id}/confirm-otp: post: tags: - DigitalConsentIndividualController summary: Подтверджение действия (согласие, отзыв) по ЦС полученным SMS кодом description: | Возможные коды ошибок: VALIDATION_EXCEPTION | INTERNAL_ERROR | DIGITAL_CONSENT_NOT_FOUND INVALID_STATE | OTP_CONFIRM_INCORRECT_PARAMETERS | OTP_CONFIRM_FAILURE OTP_CONFIRM_REJECTED | DIGITAL_CONSENT_INDIVIDUAL_OTP_ALREADY_CONFIRMED DIGITAL_CONSENT_INDIVIDUAL_INVALID_DOCUMENT | OTP_CONFIRM_INVALID_DOCUMENT_CHECKSUM operationId: confirmOtp parameters: - name: id in: path description: Идентификатор ЦС required: true type: integer format: int64 - name: body required: true in: body schema: $ref: '#/definitions/DigitalConsentIndividualConfirmWithOtpRequestDto' responses: 200: description: OK parameters: - name: id type: integer required: true in: path format: int32 /{id}/confirm-biometry: post: tags: - DigitalConsentIndividualController summary: Подтвердить прохождение биометрии description: | Возможные коды ошибок: VALIDATION_EXCEPTION | INTERNAL_ERROR | DIGITAL_CONSENT_NOT_FOUND INVALID_STATE | DIGITAL_CONSENT_INDIVIDUAL_DOCUMENT_IS_NOT_CONFIRMED DIGITAL_CONSENT_INDIVIDUAL_INVALID_DOCUMENT | BIOMETRY_VERIFY_FAILURE BIOMETRY_VERIFY_REJECTED | BIOMETRY_VERIFY_EXPIRED operationId: confirmBiometry parameters: - name: id in: path description: Идентификатор ЦС required: true type: integer format: int64 - in: body name: body required: true schema: $ref: '#/definitions/DigitalConsentIndividualConfirmBiometryRequestDto' consumes: - application/json produces: - application/json responses: 200: description: OK /revoke: post: tags: - DigitalConsentIndividualController summary: Отзыв ЦС description: | Создание черновика ЦС для физ. лица (с формированием документа для дальнейшего подтверждения) Возможные коды ошибок: VALIDATION_EXCEPTION | INTERNAL_ERROR | BMG_VERIFICATION_INCORRECT_PARAMETERS BMG_VERIFICATION_NOT_REGISTERED | BMG_VERIFICATION_FAILURE DIGITAL_CONSENT_INDIVIDUAL_ACTIVE_NOT_EXIST | PRODUCT_NOT_AVAILABLE operationId: startRevokeConsent parameters: - in: body name: body required: true schema: $ref: '#/definitions/DigitalConsentIndividualRevokeRequestDto' consumes: - application/json produces: - '*/*' responses: 200: description: OK schema: $ref: '#/definitions/DigitalConsentIndividualRevokeResponseDto' /draft: post: tags: - DigitalConsentIndividualController summary: Создание черновика ЦС description: | Создание черновика ЦС для физ. лица (с формированием документа для дальнейшего подтверждения) Возможные коды ошибок: VALIDATION_EXCEPTION | INTERNAL_ERROR | BMG_VERIFICATION_INCORRECT_PARAMETERS BMG_VERIFICATION_NOT_REGISTERED | BMG_VERIFICATION_FAILURE DIGITAL_CONSENT_INDIVIDUAL_ACTIVE_EXIST | PRODUCT_NOT_AVAILABLE operationId: createDigitalConsentDraft parameters: - in: body name: body required: true schema: $ref: '#/definitions/DigitalConsentIndividualCreateDraftRequestDto' consumes: - application/json produces: - '*/*' responses: 200: description: OK schema: $ref: '#/definitions/DigitalConsentIndividualCreateDraftResponseDto' /{id}: get: tags: - DigitalConsentIndividualController summary: Получить ЦС по идентификатору description: | Возможные коды ошибок: VALIDATION_EXCEPTION | INTERNAL_ERROR | DIGITAL_CONSENT_NOT_FOUND operationId: getDigitalConsentById_1 parameters: - name: id in: path description: Идентификатор ЦС required: true type: integer format: int64 - name: signerIin in: query description: ИИН клиента required: true type: string produces: - '*/*' responses: 200: description: OK schema: $ref: '#/definitions/DigitalConsentIndividualResponseDto' parameters: - name: id type: integer required: true in: path format: int32 - name: signerIin type: string required: true in: query description: ИИН /{id}/init-biometry: post: tags: - DigitalConsentIndividualController summary: Инициализация прохождения биометрии description: |2 Возможные коды ошибок: VALIDATION_EXCEPTION | INTERNAL_ERROR | DIGITAL_CONSENT_NOT_FOUND INVALID_STATE | OTP_SEND_FAILURE | DIGITAL_CONSENT_INDIVIDUAL_INVALID_DOCUMENT DIGITAL_CONSENT_INDIVIDUAL_OTP_ALREADY_CONFIRMED operationId: initBiometry parameters: - name: id in: path description: Идентификатор ЦС required: true type: integer format: int64 - name: requestBody required: true in: body schema: $ref: '#/definitions/DigitalConsentIndividualInitBiometryRequestDto' description: Тело запроса consumes: - application/json produces: - application/json responses: 200: description: OK schema: $ref: '#/definitions/DigitalConsentIndividualInitBiometryResponseDto' parameters: - name: id type: integer required: true in: path format: int32 /list/by-signer/{signerIin}: get: tags: - DigitalConsentIndividualController summary: Получить список цифровых согласий по физ. лицу description: | Возможные коды ошибок: VALIDATION_EXCEPTION | INTERNAL_ERROR | DIGITAL_CONSENT_NOT_FOUND operationId: getDigitalConsentBySigner parameters: - name: signerIin in: path description: ИИН клиента required: true type: string - name: page in: query description: Номер страницы required: false type: integer format: int32 default: 0 - name: size in: query description: Количество элементов на странице required: false type: integer format: int32 default: 10 produces: - '*/*' responses: 200: description: OK schema: $ref: '#/definitions/PageDigitalConsentIndividualResponseDto' parameters: - name: signerIin type: string required: true in: path /check-state/{signerIin}: get: tags: - DigitalConsentIndividualController summary: Проверка наличия активного цифрового согласия description: | Возможные коды ошибок: VALIDATION_EXCEPTION | INTERNAL_ERROR | PRODUCT_NOT_AVAILABLE operationId: checkState parameters: - name: signerIin in: path description: ИИН клиента required: true type: string produces: - '*/*' responses: 200: description: OK schema: $ref: '#/definitions/DigitalConsentIndividualCheckStateResponseDto' parameters: - name: signerIin type: string required: true in: path definitions: DigitalConsentIndividualResponseDto: type: object properties: id: type: integer format: int64 createDate: type: string format: date-time updateDate: type: string format: date-time partner: $ref: '#/definitions/PartnerShortInfoDto' product: $ref: '#/definitions/ProductShortInfoDto' signerClientId: type: string description: Идентификатор клиента signerClientIdn: type: string description: БИН клиента signerClientName: type: string description: Наименование компании signerIin: type: string description: ИИН физ. лица signerData: $ref: '#/definitions/UserIndividualDto' state: type: string description: Текущий статус цифрового согласия (DRAFT - черновик, ACTIVE - подписан, REVOKED - отозван, DELETED - удален, EXPIRED - истекший) example: ACTIVE enum: - DRAFT - ACTIVE - REVOKED - DELETED - EXPIRED startDate: type: string description: Дата создания заявки format: date example: "2022-09-01" endDate: type: string description: Дата окончания цифрового согласия (максимальный срок 1 год) format: date example: "2023-09-01" description: Ответ цифрового согласия (физ. лицо) DigitalConsentIndividualSendOtpRequestDto: type: object required: - signerIin properties: signerIin: type: string maxLength: 12 minLength: 12 description: ИИН физ. лица example: "123456789012" description: Данные для получения OTP кода через SMS по цифровому согласию DigitalConsentIndividualConfirmWithOtpRequestDto: type: object required: - documentContentBase64 - otpCode - signerIin properties: signerIin: type: string maxLength: 12 minLength: 12 description: ИИН физ. лица example: "123456789012" documentContentBase64: type: string description: Документ согласия (отзыва) в формате base64 otpCode: type: string description: OTP код description: Данные подверждения (согласие, отзыв) по цифровому согласию с OTP (физ. лицо) DigitalConsentIndividualConfirmBiometryRequestDto: type: object required: - biometryRefId - signerIin properties: signerIin: type: string maxLength: 12 minLength: 12 description: ИИН физ. лица example: "123456789012" biometryRefId: type: string description: Идентификатор пройденной биометрии description: Данные подверждения (согласие, отзыв) биометрией (физ. лицо) DigitalConsentIndividualRevokeRequestDto: type: object required: - signerIin - signerPhone properties: signerIin: type: string maxLength: 12 minLength: 12 description: ИИН физ. лица example: "123456789012" signerPhone: type: string description: Номер телефона физ. лица example: "77771234567" description: Данные для старта процесса отзыва цифрового согласия (физ. лицо) DigitalConsentIndividualRevokeResponseDto: type: object properties: id: type: integer format: int64 createDate: type: string format: date-time updateDate: type: string format: date-time partner: $ref: '#/definitions/PartnerShortInfoDto' product: $ref: '#/definitions/ProductShortInfoDto' signerClientId: type: string description: Идентификатор клиента signerClientIdn: type: string description: БИН клиента signerClientName: type: string description: Наименование компании signerIin: type: string description: ИИН физ. лица signerData: $ref: '#/definitions/UserIndividualDto' state: type: string description: Текущий статус цифрового согласия(DRAFT - черновик, ACTIVE - подписан, REVOKED - отозван, DELETED - удален, EXPIRED - истекший) example: "2022-09-01" enum: - DRAFT - ACTIVE - REVOKED - DELETED - EXPIRED startDate: type: string description: Дата создания заявки format: date example: "2022-09-01" endDate: type: string description: Дата окончания цифрового согласия (максимальный срок 1 год) format: date example: "2023-09-01" digitalConsentDocumentContentBase64: type: string description: Документ цифрового согласия (base64) description: Ответ инициализации отзыва цифрового согласия (физ. лицо) PartnerShortInfoDto: type: object required: - partnerBin - partnerNameLongKz - partnerNameLongRu - partnerNameShort - responsiblePersonName properties: id: type: integer format: int64 partnerNameShort: type: string maxLength: 50 minLength: 0 partnerBin: type: string maxLength: 100 minLength: 0 responsiblePersonName: type: string maxLength: 100 minLength: 0 partnerNameLongKz: type: string maxLength: 100 minLength: 0 partnerNameLongRu: type: string maxLength: 100 minLength: 0 description: Партнер ProductShortInfoDto: type: object required: - apiName properties: id: type: integer format: int64 apiName: type: string maxLength: 20 minLength: 0 description: Услуга UserIndividualDto: type: object properties: iin: type: string description: ИИН физ. лица phone: type: string description: Номер телефона lastname: type: string description: Фамилия пользователя firstname: type: string description: Имя пользователя middlename: type: string description: Отчество пользователя description: Данные о пользователе (физ. лицо) DigitalConsentIndividualCreateDraftRequestDto: type: object required: - signerIin - signerPhone properties: signerIin: type: string maxLength: 12 minLength: 12 description: ИИН физ. лица example: "123456789012" signerPhone: type: string description: Номер телефона физ. лица example: "77771234567" description: Данные создания черновика цифрового согласия (физ. лицо) DigitalConsentIndividualCreateDraftResponseDto: type: object properties: id: type: integer format: int64 createDate: type: string format: date-time updateDate: type: string format: date-time partner: $ref: '#/definitions/PartnerShortInfoDto' product: $ref: '#/definitions/ProductShortInfoDto' signerClientId: type: string description: Идентификатор клиента signerClientIdn: type: string description: БИН клиента signerClientName: type: string description: Наименование компании signerIin: type: string description: ИИН физ. лица signerData: $ref: '#/definitions/UserIndividualDto' state: type: string description: Текущий статус цифрового согласия(DRAFT - черновик, ACTIVE - подписан, REVOKED - отозван, DELETED - удален, EXPIRED - истекший) example: "2022-09-01" enum: - DRAFT - ACTIVE - REVOKED - DELETED - EXPIRED startDate: type: string description: Дата создания заявки format: date example: "2022-09-01" endDate: type: string description: Дата окончания цифрового согласия (максимальный срок 1 год) format: date example: "2023-09-01" digitalConsentDocumentContentBase64: type: string description: Документ цифрового согласия (base64) description: Ответ после создания черновика цифрового согласия (физ. лицо) PageDigitalConsentIndividualResponseDto: type: object properties: totalPages: type: integer format: int32 totalElements: type: integer format: int64 pageable: $ref: '#/definitions/PageableObject' numberOfElements: type: integer format: int32 first: type: boolean last: type: boolean sort: $ref: '#/definitions/Sort' size: type: integer format: int32 content: type: array items: $ref: '#/definitions/DigitalConsentIndividualResponseDto' number: type: integer format: int32 empty: type: boolean PageableObject: type: object properties: paged: type: boolean unpaged: type: boolean pageSize: type: integer format: int32 pageNumber: type: integer format: int32 sort: $ref: '#/definitions/Sort' offset: type: integer format: int64 Sort: type: object properties: unsorted: type: boolean sorted: type: boolean empty: type: boolean DigitalConsentIndividualCheckStateResponseDto: properties: active: type: boolean description: Наличие активного ЦС example: "true" additionalProperties: false description: Ответ проверки статуса цифрового согласия (физ. лицо) DigitalConsentIndividualInitBiometryRequestDto: properties: signerIin: type: string description: ИИН физ. лица callbackUrl: type: string description: URL для отправки результата прохождения биометрии ibmClientId: type: string description: client-id Партнера (IBM) для формирования redirectUri ibmAccessToken: type: string description: Временный авторизационный токен (IBM) Партнера для формирования redirectUri redirectUri: type: string description: URL страницы для перенаправления после прохождения биометрии additionalProperties: false description: Данные для инициализации биометрии (физ. лицо) required: - ibmClientId - ibmAccessToken - callbackUrl - signerIin DigitalConsentIndividualInitBiometryResponseDto: properties: biometryUri: type: string description: URL, по которому открывается веб-страница для прохождения биометрии additionalProperties: false description: Ответ инициализации биометрии (физ. лицо) tags: [] security: - Authorization: - bcc.application.govtech.api x-ibm-endpoints: - endpointUrl: https://api.bcc.kz:10443/bcc/production description: Альтернативная точка подключения для вызова сервиса в продуктивной среде. Зарегистрированное на портале developer.bcc.kz приложение должно быть в режиме "PRODUCTION" type: - production - development - endpointUrl: https://api.bcc.kz/bcc/production description: Точка подключения для вызова сервиса в продуктивной среде. Зарегистрированное на портале developer.bcc.kz приложение должно быть в режиме "PRODUCTION" type: - production - endpointUrl: https://api-test.bcc.kz/bcc/production description: Точка подключения для вызова сервисов в тестовой среде. Зарегистрированное на портале developer.bcc.kz приложение должно быть в режиме "DEVELOPMENT" type: - development ...