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

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 5 Next »


Specification

APIARY

Purpose

This WS is design to deactivate relationship after reorganization by NHS admin. This action must be done in case reorganization reorganized MSP.

Input parameters

parent_id

Authorize

    1. Verify the validity of access token
      1. in case of error return 401 ('Access denied')
    2. Check user scope related_legal_entities:deactivate in order to perform this action
      1. in case of error generate 401 response ('Invalid scopes')

Validate request

  1. Validate that relationship exists
    1. Find $parent_id in prm.related_legal_entites
      1. in case of error return 404  error view $id ('Invalid id')
  2. Validate that relationship is active
    1. Check is_active=true
      1. in case of error return 409  error view $id ('The relationship between legal entities is already deactivated ')
  3.  Validate all child legal entities are closed
    1. Find legal entities in prm.legal_entities by child_id and check status='CLOSED'
      1. in case of error return 422  error view $id ('Child legal entities must be closed ')

Save request

Update record to PRM.RELATED_LEGAL_ENTITIES by $ID


fieldvalue
is_activefalse
updated_atnow()
updated_by$user_id
  • No labels