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

RC_(CSI-1787)_Sign declaration request v3

Create declaration

  1. Check authentication_method_current

    SELECT authentication_method_current FROM declaration_requests WHERE id = {:id}
    1. If "type" = "OFFLINE"

      1.  set declaration status to "PENDING_VERIFICATION" “active”

      2. set reason to 'offline'

    2. if "type" = "OTP" - set declaration status to "ACTIVE"  “active”

    3. if "type" = "NA" - check parent_declaration_id, if not null than set declaration status to "ACTIVE" “active”

  2. Check persons 'no_tax_id' flag

    1. if 'no_tax_id'=true and parent_declaration_id is null

      1. set declaration status to "PENDING_VERIFICATION" “active”

      2. set reason to 'no_tax_id'

    2. if ‘no_tax_id’=true and parent_declaration_id is not null - set declaration status to "ACTIVE" “active”

  3. Create a new declaration by adding a new entity to the declarations table ops_db without declaration_id.

    1. if there is existing record in the declarations table with the same id and declaration_request_id, return ok to IL

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