ЕСОЗ - публічна документація
RC_(CSI-1787)_Sign declaration request v3
Create declaration
Check authentication_method_current
SELECT authentication_method_current FROM declaration_requests WHERE id = {:id}
If "type" = "OFFLINE"
set declaration status to "PENDING_VERIFICATION" “active”
set reason to 'offline'
if "type" = "OTP" - set declaration status to "ACTIVE" “active”
if "type" = "NA" - check parent_declaration_id, if not null than set declaration status to "ACTIVE" “active”
Check persons 'no_tax_id' flag
if 'no_tax_id'=true and parent_declaration_id is null
set declaration status to "PENDING_VERIFICATION" “active”
set reason to 'no_tax_id'
if ‘no_tax_id’=true and parent_declaration_id is not null - set declaration status to "ACTIVE" “active”
Create a new declaration by adding a new entity to the declarations table ops_db without declaration_id.
if there is existing record in the declarations table with the same id and declaration_request_id, return ok to IL
ЕСОЗ - публічна документація