ЕСОЗ - публічна документація

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

Requirements

This method allows to resend sms with OTP-code to the person’s verified phone. Used verify approval method in case OTP wasn’t delivered in first time.

Specification

  1. Resend SMS on Approval

Validations

Authorization

  1. Verify the validity of access token
    1. Return 401 in case of validation fails
  2. Check user scope approval:create in order to perform this action
    1. Return 403 in case of invalid scope

Validate authentication method

  1. Resend SMS on Approval is allowed for persons with person_authentication_method.type = OTP or THIRD_PERSON (where third_person.person_authentication_method.type = OTP)
    1. Return 409 in case of validation fails (message "Resend SMS is not allowed for this authentication method")

Service Logic

  1. Search for approval by patient_id + approval_id
    1. Validate person by patient.id
      1. In case error return 404 (message "Person not found")
    2. Validate approval by approval.id
      1. In case error return 404 (message "Approval with such id is not found")
  2. Send SMS with OTP-code to persons person_authentication_method.phone_number
  • No labels