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

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

API specification

Add MPI record specification

API logic

Basic strategy

Search existing entity

Search for existing entity using POST data parameters:

MPI attributePre-conditionConditionPOST data attribute
MPI.person.last_namealwaysequal$.last_name
MPI.person.first_namealwaysequal$.first_name
MPI.person.birth_datealwaysequal$.birth_date
MPI.person.tax_idoptional (if $.tax_id is not null)equal$.tax_id
MPI.person.second_nameoptional (if $.tax_id is not null)equal$.second_name

Get MPI.person.id from result

In case result list consists more than one row - generate error Response__Error_ClarifySearchCriteria

Create new entity (If no record found)

Set following attributes as:

  • MPI.person.created_at = now()
  • MPI.person.created_by = actor (mpi_id)
  • MPI.person.modified_at = MPI.person.created_at
  • MPI.person.modified_by = MPI.person.created_by

Update existing entity (If record found)

Move existing record to MPI.person_hstr

Update existing record by MPI.person.id except:

  • MPI.person.history
  • MPI.person.created_at
  • MPI.person.created_by
  • No labels