Table of Contents |
---|
...
Decode content that is encrypted in an electronic digital signature.
Use Digital signature WS. Method checks digital signature and returns result.
See service specification
Validate DRFO
- Check that DRFO in Certificate details exists and not empty
- Check that DRFO in Certificate details is equal to DRFO in Party
- Get party.tax_id using employee_id in person payload
- Compare DRFO in Certificate with party.tax_id
- Convert DRFO and TAX_ID to uppercase
- Compare DRFO and TAX_ID as Cyrillic letters
- Convert DRFO to Cyrillic and compare as Cyrillic letters
- In case validation fails - generate 422 error
...
- Validate request using JSON schema (See specification)
- In case validation fails - generate 422 error
- Check person request status
- If status is not APPROVED, - returned error 'Incorrect status'
...
- Extract legal_entity_id (client_id) from token
- Extract employee_id from request
- Check if $.client_id=employees.legal_entity_id
- in case error return 422
Create/update person
If person.id
is in request then add mpi_id to person request. Update MPI.persons with new parameters.
If person.id
is not in request then create new person in status ACTIVE
or APPROVED
)
Update person request status
...