...
Code Block |
---|
age = MONTHS_BETWEEN (now(), $.birth_date) / 12 |
...
Search existing MPI entity
- if tax_id is not null and age>=16
- search via
tax_id
+ first_name
+ last_name
MPI attribute | Pre-condition | Condition | POST data attribute |
---|
MPI.person.tax_id | optional | equal | $.tax_id |
MPI.person.first_name | always | equal | $.first_name |
MPI.person.last_name | always | equal | $.last_name |
- if tax_id is null and age>=16
- search via
first_name
+ last_name + birth_date
- if age<16
- search via
birth_certificate
+ birth_date
...
...
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 - if age<16
- search via
birth_certificate
+ birth_date
MPI attribute | Pre-condition | Condition | POST data attribute |
---|
MPI.person.phones.number (type=MOBILE) | optional |
(if $.phone_number is not null) | equal | $.phone_number |
MPI.person.birth_certificate |
always if $.person_age < 16optional | equal | $.birth_certificate |
- Return empty array if no data found
- Return only requested params, birth_place, second_name and merged_ids if data found
...
Code Block |
---|
language | xml |
---|
title | Response |
---|
collapse | true |
---|
|
{
"id":"b075f148-7f93-4fc2-b2ec-2d81b19a9b7b",
"first_name":"Петро",
"last_name":"Іванов",
"second_name":"Миколайович",
"birth_date":"1991-08-19T00:00:00.000Z19",
"birth_country":"Україна",
"birth_settlement":"Вінниця",
"merged_ids":[
"id":"7bca069f-21e4-4546-90cf-b65e3f39d93d"
]
} |
...