Validate request
- Validate mandatory query params
- first_name
- last_name
- birth_date
- Validate optional query params
- second_name
- tax_id
- birth_certificate
- phone_number
- Validate mandatory query params
Logic
- if tax_id is not null and age>=16
- search via
tax_id
+first_name
+last_name
- search via
- if tax_id is null and age>=16
- search via
first_name
+last_name + birth_date
- search via
- if age<16
- search via
birth_certificate
+birth_date
- search via
Calculate age
age = MONTHS_BETWEEN (now(), $.birth_date) / 12
Search existing MPI entity
Search for existing entity using GET query parameters:
MPI attribute | Pre-condition | Condition | POST data attribute |
---|---|---|---|
MPI.person.last_name | always | equal | $.last_name |
MPI.person.first_name | always | equal | $.first_name |
MPI.person.birth_date | always | equal | $.birth_date |
MPI.person.tax_id | optional (if $.tax_id is not null) | equal | $.tax_id |
MPI.person.second_name | optional (if $.tax_id is not null) | equal | $.second_name |
MPI.person.phones.number (type=MOBILE) | optional (if $.phone_number is not null) | equal | $.phone_number |
MPI.person.birth_certificate | always if $.person_age < 16 | equal | $.birth_certificate |
- Return empty array if no data found
- Return only requested params, birth_place, second_name and merged_ids if data found
For example: