Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel3

Required parameters are marked with "*"

Якщо інформації по відповідному параметру немає, потрібно зазначити: “APIparagraph not found”.

Purpose*

It can be processed in both sync and async methods depends on Server decision.

...

Specification*

Page Properties

Link

https://ehealthmedicaleventsapimedicaleventsmisapi.docs.apiary.io/#reference/approvals/resend-sms-on-approval/resend-sms-on-approval

Resource

/api/patients/{{patiend_id}}/approvals/{{id}}/actions/resend

Scope

approval:create

Components

Approvals

Microservices

API paragraph not found

Protocol type

REST

Request type

PATCH

Sync/Async

Async

Public/Private/Internal

Public

...

API paragraph not found

Authorize*

  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

Request to process the request using a token in the headers

Headers*

Наприклад:

  • Content-Type:application/json

  • Authorization:Bearer d368a4b0-4a0e-457a-b267-32359fa6288f

...

Validate authentication method

  1. Resend SMS on Approval is allowed for person_authentication_method which was specified on Create Approval in the authorize_with field.

    1. Return 409 in case of validation fails (message "Resend SMS is not allowed for this authentication method")

Processing*

Service Logic

  1. Search for approval by patient_id + approval_id

    1. Validate person by http://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 phone from approvals.urgent.phone_number

Response structure*

See on Apiary

...