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

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 6 Current »


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

merged_to_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 $merged_to_id in prm.related_legal_entites
      1. in case of error return 404  error view $id ('Invalid id')
  2. Validate that relationships are active
    1. Check is_active=true
      1. in case of error return 409  error view $id ('The relationships between legal entities are already deactivated ')
  3.  Validate all merged_from legal entities are closed
    1. Find legal entities in prm.legal_entities by merged_from_id and check status='CLOSED'
      1. in case of error return 422  error view $id ('Merged_from 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