Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Specification

...

    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 $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 is 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

...