Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • validate person_id, third_person_id UUID

    • in case error return 422

  • search person by person_id, third_person_id in MPI 

    • in case error return 422, "Such person doesn't exist"

Generate verification code

Invoke Initialize OTP to generate one time two passwords and send it to person number and third_person number. At this stage, the patients receive an SMS messages to confirm this two phone and the consent to add new auth method to person

Phone_numbers:

  1. mpi.person_auth_method.value, where person_id = $.person_id and id_primary=True

  2. mpi.person_auth_method.value, where person_id = $.third_person.id and type = OTP

cURL example

Code Block
curl -X POST \
  http://localhost:4000/verifications \
  -H 'content-type: application/json' \
  -d '{
  "phone_number": "+380936235985"
}'