Table of Contents |
---|
Purpose
...
Create new Black list user
Destination | Source | Description |
---|---|---|
id | Autogenerated | |
tax_id | Request: $.tax_id | |
is_active | Const: true | |
inserted_at | Timestamp: now() | Get current date-time |
inserted_by | Token: user_id | Extract user from token |
updated_at | Timestamp: now() | Get current date-time |
updated_by | Token: user_id | Extract user from token |
Deactivate black list user
This WS is design to update flags "is_active" for Black list users.
Authorize
- Verify the validity of access token
- In case error - generate 401 response
- Check user scope (scope = 'bl_user:deactivate') in order to perform this action
- In case error - generate 403 response
Validate PK Black list User
Check exist `Black_list_user` by $.id.
if invalid - return 404 error (message: "User in black list with id={$.id} doesn't exist.")
Validate status
- Validate `is_active` == TRUE
- 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_by | user_id |
This WS is designed to return Black list user detail.
Input parameters (filters)
- id
Logic WS
- Verify the validity of access token
- In case error - generate 401 response
- Check user scopes in order to perform this action (scope = 'bl_user:read')
- 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
- Verify the validity of access token
- In case error - generate 401 response
- Check user scopes in order to perform this action (scope = 'bl_user:read')
- In case error - generate 403 response
Query data
- Get all records from black_list_users filtered by:
- query params: query params
Query param | Condition |
---|---|
id | exact match |
tax_id | exact match |
is_active | exact-match |