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

Skip to end of metadata
Go to start of metadata

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

Compare with Current View Version History

Version 1 Current »

Purpose

This WS is designed to return Person Request details.
Note: response of this method should be used for /wiki/spaces/CSI/pages/17612931150.

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 /wiki/spaces/CSI/pages/17612931150.

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 /wiki/spaces/CSI/pages/17613193262 or approved by /wiki/spaces/CSI/pages/17613422676 or signed by /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

  • No labels