Versions Compared

Key

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

Table of Contents

Purpose

...

Create new Black list user

  1. Create new record in prm.black_list_users 


Destination
Source
Description
id
Autogenerated
tax_idRequest: $.tax_id
is_activeConst: true
inserted_atTimestamp: now()Get current date-time
inserted_byToken: user_idExtract user from token
updated_atTimestamp: now()Get current date-time
updated_byToken: user_idExtract user from token

Deactivate black list user

This WS  is design to update flags "is_active" for Black list users.

Authorize

  1. Verify the validity of access token
    1. In case error - generate 401 response
  2. Check user scope (scope = 'bl_user:deactivate') in order to perform this action
    1. In case error - generate 403 response

Validate PK Black list User

  1. Check exist `Black_list_user` by $.id.

    1. if invalid - return 404 error (message: "User in black list with id={$.id} doesn't exist.")

Validate status

  1. Validate `is_active` == TRUE
    1. if invalid  - return 409 error (message: "User in black list is not active and can't be deactivated")

Deactivate black list user

Update black list user record by $.id  set values:


Destination

Source

is_active

FALSE

updated_at:timestamp
updated_byuser_id
Get black list user
by
ID

This WS is designed to return Black list user detail.

Input parameters (filters)

  • id 

Logic WS

  1. Verify the validity of access token
    1. In case error - generate 401 response
  2. Check user scopes in order to perform this action (scope = 'bl_user:read')
    1. In case error - generate 403 response
Validate PK Black list User 
Check that "Black_list_
user
" exist:in case error - return 404 error (message: "Tax
_id
is not in black list")

Get black list user List

This WS is designed to return Black list users list.

Input parameters (filters)

  • id (optional)
  • tax_id (optiona)
  • is_active (optional)

Authorize user

  1. Verify the validity of access token
    1. In case error - generate 401 response
  2. Check user scopes in order to perform this action (scope = 'bl_user:read')
    1. In case error - generate 403 response

Query data

  1. Get all records from prm.black_list_users filtered by:
    1. query params: query params


Query paramCondition
idexact match
tax_idexact match
is_activeexact-match