/
RC_(CSI-1323)_IL.Get Person request by ID v2

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

RC_(CSI-1323)_IL.Get Person request by ID v2

Purpose

This WS is designed to return Person Request details.
Note: response of this method should be used for Sign person request v2.

Key points

  1. Only authenticated and authorized user can obtain Person Request details.

  2. Service returns only person request related to the same legal entity as the user.

Specification

Apiary

Main differences from V1

  1. Confidant_person is an object, not an array, so response from this method works for Sign person request v2.

Authorization

  • Verify the validity of access token

    • in case of error - return 401 (“Invalid access token”) in case of validation fails

  • Verify that token is not expired

    • in case of error - return 401 (“Invalid access token”)

  • Check user scopes in order to perform this action (scope = 'person_request:read')

    • return 403 (“Your scope does not allow to access this resource. Missing allowances: person_request:read”) in case of invalid scope(s)

Validate Person Request

  1. Check that person request with such ID exists in the system (is_active = true)

    1. In case of error - return 404.

  2. Check that person request belongs to the same legal entity as the user

    1. In case of error - return 403.

Validate backwards compatibility

This WS can obtain only person requests that were created by https://e-health-ua.atlassian.net/wiki/spaces/CSI/pages/17613193262 or approved by https://e-health-ua.atlassian.net/wiki/spaces/CSI/pages/17613422676 or signed by https://e-health-ua.atlassian.net/wiki/spaces/CSI/pages/17612931150

  • Check that person_request.version field is equal to 2

    • in case of error - return 422 ('Person request cannot be processed by the version 2 of the service, use version 1 instead')

Service logic

  • Get Person Request by id from IL.person_requests

  • Render response according to specification

Related content

RC_(CSI-1323)_Reject Person Request v2
RC_(CSI-1323)_Reject Person Request v2
More like this
RC_(CSI-1323)_Approve person request v2
RC_(CSI-1323)_Approve person request v2
Read with this
RC_(CSI-1323)_Get Person Request by ID
RC_(CSI-1323)_Get Person Request by ID
More like this
RC_(CSI-1323)_Confidant person relationship verification status model
RC_(CSI-1323)_Confidant person relationship verification status model
Read with this
PIS. Get Person request list_EN
PIS. Get Person request list_EN
More like this
RC_(CSI-1323)_Get Person requests list
RC_(CSI-1323)_Get Person requests list
Read with this

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