EMS - API Documentation - PersonMerge
Markedsrelatert informasjon finnes her….
Introduction
Person merge
Duplicate records (persons) may be introduced to the system. Duplicate person records may be merged and processed. When two or more person records are merged, a new person record is created with a new PersonId. This new PersonId is used as the foreign key to the membership, payment and other person related entities.
The 3.party are informed of person merge function through the Service Bus Queue.
There will be an information message (changeType = 9) about the affected record before it’s changed or created.
3.party should expect the following sequence of messages in case of person merge:
Insert message for New Person with Merged person IDs
Old person 1 message with change type 2
Old person 2 message with change type 2
Information message about New organization/club Membership
a. Information message about New Person with Merged person IDs
b. Add new Membership message with Merged Membership IDsInformation message about old organization/club membership
a. Information message about old person 1
b. Soft delete old membership (Old person 1 Club membership(s))Information message about old organization/club membership
a. Information message about old person 2
b. Soft delete old membership (Old person 2 Club membership(s))Information message about New organization/Gren for new person
a. Information message about New Person with Merged person IDs
b. Add new ActiveMembership message with Merged ActiveMembership IDsInformation message about old organization/Gren membership
a. Information message about old person 1
b. Soft delete old Activemembership (Old person 1 Gren membership(s))Information message about old organization/Gren membership
a. Information message about old person 2
b. Soft delete old Activemembership (Old person 2 Gren membership(s))
10. Update Sports number for new person from old person 1
11. Update Sports number for new person from old person 2
12. Delete old gren Membership person 1
13. Delete old club Membership person 1
14. Delete old gren Membership person 2
15. Delete old club Membership person 2
16. Delete old person 1
17. Delete old person 2
It is the 3.party´s responsibility to read person merge messages and process them on their side, remove duplicate person records and maintain consistency with NIF data.
Example of messages 3. party should expect when duplicate person records are merged.
Insert message for New Person with Merged person IDs
"body": { "PersonId": 8339484, "SportNo": "M010620TRO03", "GenderId": 1, "BirthDate": "2020-06-01T00:00:00", "IsDead": false, "DeathDate": null, "IsDeleted": false, "IsValidated": false, "LastName": "Adolfsen", "FirstName": "Trond", "AccountId": null, "CitizenshipRegionId": 1500152, "ProfilePictureId": null, "AddressLine1": "Oslo", "AddressLine2": null, "PostCode": "0010", "City": "OSLO", "PostCodeId": 14892, "Country": "Norge", "CountryId": 1500152, "Email": "Trond.Adolfsen@mailinator.com", "Email2": null, "Email3": null, "PrivatePhone": null, "WorkPhone": null, "MobilePhone": null, "RegistrationPhone": null, "RegistrationPhoneCountryCode": null, "IsSecretAddress": false, "IsSecretPrivatePhone": false, "IsSecretWorkPhone": false, "IsSecretMobilePhone": false, "IsSecretEmail": false, "IsSecretEmail2": null, "IsSecretEmail3": null, "OrgIdOwner": 19426, "MergedPersonIds": "8339482,8339483" }
Information message about New organization/club Membership
"body": { "OrgId": 19426, "OrgNo": "KL01010001", "OrgName": "Idd Sportsklubb", "Abbreviation": "Idd Sportsklubb", "DescribingName": "Idd Sportsklubb", "OrgTypeId": 5, "AccountId": 5284797, "IsActive": true, "SportId": 16, "TerminationDate": null, "TerminationReasonId": null, "Comment": null, "OrganisationNumber": "883927842", "MunicipalityId": 500001, "FoundedDate": "2005-05-31T00:00:00", "AddressLine1": "Idd sportsklubb", "AddressLine2": "PB 7 Risum", "PostCode": "1761", "City": "HALDEN", "PostCodeId": 215339, "Country": "Norge", "CountryId": 1500152, "VisitAddressLine1": "Aspedammenveien 46", "VisitAddressLine2": "1766", "VisitPostCode": "HALDEN", "VisitCity": null, "VisitPostCodeId": 10946, "Email": "info@iddsk.no", "Homepage": "www.iddsk.no", "Telephone1": null, "Telephone2": "09876542", "MobilePhone": "87654321", "Fax": null, "IsSecretAddress": false, "IsSecretTelephone1": false, "IsSecretTelephone2": false, "IsSecretMobilePhone": false, "IsSecretFax": false, "IsSecretEmail": false, "Longitude": "5.347138599999994", "Latitude": "60.4837661", "OrgIdOwner": 19426, "ParentOrgId": null, "ParentOrgTypeId": null }
Information message about New Person with Merged person IDs
"body": {
"PersonId": 8339484,
"SportNo": "M010620TRO03",
"GenderId": 1,
"BirthDate": "2020-06-01T00:00:00",
"IsDead": false,
"DeathDate": null,
"IsDeleted": false,
"IsValidated": false,
"LastName": "Adolfsen",
"FirstName": "Trond",
"AccountId": null,
"CitizenshipRegionId": 1500152,
"ProfilePictureId": null,
"AddressLine1": "Oslo",
"AddressLine2": null,
"PostCode": "0010",
"City": "OSLO",
"PostCodeId": 14892,
"Country": "Norge",
"CountryId": 1500152,
"Email": "Trond.Adolfsen@mailinator.com",
"Email2": null,
"Email3": null,
"PrivatePhone": null,
"WorkPhone": null,
"MobilePhone": null,
"RegistrationPhone": null,
"RegistrationPhoneCountryCode": null,
"IsSecretAddress": false,
"IsSecretPrivatePhone": false,
"IsSecretWorkPhone": false,
"IsSecretMobilePhone": false,
"IsSecretEmail": false,
"IsSecretEmail2": null,
"IsSecretEmail3": null,
"OrgIdOwner": 19426,
"MergedPersonIds": "8339482,8339483"
}
4. Add new Membership message with Merged Membership IDs
"body": {
"MembershipId": 24704636,
"PersonId": 8339484,
"OrgId": 19426,
"FromDate": "2020-06-12T00:00:00",
"IsDeleted": 0,
"IsPassive": 0,
"MembershipStatusId": 2,
"OrgIdOwner": 19426,
"MergedMembershipIds": "39921546,39921554"
}
5. Information message about old organization/club membership
"body": {
"OrgId": 19426,
"OrgNo": "KL01010001",
"OrgName": "Idd Sportsklubb",
"Abbreviation": "Idd Sportsklubb",
"DescribingName": "Idd Sportsklubb",
"OrgTypeId": 5,
"AccountId": 5284797,
"IsActive": true,
"SportId": 16,
"TerminationDate": null,
"TerminationReasonId": null,
"Comment": null,
"OrganisationNumber": "883927842",
"MunicipalityId": 500001,
"FoundedDate": "2005-05-31T00:00:00",
"AddressLine1": "Idd sportsklubb",
"AddressLine2": "PB 7 Risum",
"PostCode": "1761",
"City": "HALDEN",
"PostCodeId": 215339,
"Country": "Norge",
"CountryId": 1500152,
"VisitAddressLine1": "Aspedammenveien 46",
"VisitAddressLine2": "1766",
"VisitPostCode": "HALDEN",
"VisitCity": null,
"VisitPostCodeId": 10946,
"Email": "info@iddsk.no",
"Homepage": "www.iddsk.no",
"Telephone1": null,
"Telephone2": "09876542",
"MobilePhone": "87654321",
"Fax": null,
"IsSecretAddress": false,
"IsSecretTelephone1": false,
"IsSecretTelephone2": false,
"IsSecretMobilePhone": false,
"IsSecretFax": false,
"IsSecretEmail": false,
"Longitude": "5.347138599999994",
"Latitude": "60.4837661",
"OrgIdOwner": 19426,
"ParentOrgId": null,
"ParentOrgTypeId": null
}
6. Information message about old person 1
"body": {
"PersonId": 8339482,
"SportNo": "M010620TRO01",
"GenderId": 1,
"BirthDate": "2020-06-01T00:00:00",
"IsDead": false,
"DeathDate": null,
"IsDeleted": false,
"IsValidated": false,
"LastName": "Adolfsen",
"FirstName": "Trond",
"AccountId": null,
"CitizenshipRegionId": 1500152,
"ProfilePictureId": null,
"AddressLine1": "Oslo",
"AddressLine2": null,
"PostCode": "0010",
"City": "OSLO",
"PostCodeId": 14892,
"Country": "Norge",
"CountryId": 1500152,
"Email": "Trond.Adolfsen@mailinator.com",
"Email2": null,
"Email3": null,
"PrivatePhone": null,
"WorkPhone": null,
"MobilePhone": null,
"RegistrationPhone": null,
"RegistrationPhoneCountryCode": null,
"IsSecretAddress": false,
"IsSecretPrivatePhone": false,
"IsSecretWorkPhone": false,
"IsSecretMobilePhone": false,
"IsSecretEmail": false,
"IsSecretEmail2": false,
"IsSecretEmail3": false,
"OrgIdOwner": 19426,
"MergedPersonIds": null
}
7. Soft delete old membership (Old person 1 Club membership(s))
"body": {
"MembershipId": 39921546,
"PersonId": 8339482,
"OrgId": 19426,
"IsDeleted": 1,
"IsPassive": 1,
"MembershipStatusId": 4
}
8. Information message about old organization/club membership
"body": {
"OrgId": 19426,
"OrgNo": "KL01010001",
"OrgName": "Idd Sportsklubb",
"Abbreviation": "Idd Sportsklubb",
"DescribingName": "Idd Sportsklubb",
"OrgTypeId": 5,
"AccountId": 5284797,
"IsActive": true,
"SportId": 16,
"TerminationDate": null,
"TerminationReasonId": null,
"Comment": null,
"OrganisationNumber": "883927842",
"MunicipalityId": 500001,
"FoundedDate": "2005-05-31T00:00:00",
"AddressLine1": "Idd sportsklubb",
"AddressLine2": "PB 7 Risum",
"PostCode": "1761",
"City": "HALDEN",
"PostCodeId": 215339,
"Country": "Norge",
"CountryId": 1500152,
"VisitAddressLine1": "Aspedammenveien 46",
"VisitAddressLine2": "1766",
"VisitPostCode": "HALDEN",
"VisitCity": null,
"VisitPostCodeId": 10946,
"Email": "info@iddsk.no",
"Homepage": "www.iddsk.no",
"Telephone1": null,
"Telephone2": "09876542",
"MobilePhone": "87654321",
"Fax": null,
"IsSecretAddress": false,
"IsSecretTelephone1": false,
"IsSecretTelephone2": false,
"IsSecretMobilePhone": false,
"IsSecretFax": false,
"IsSecretEmail": false,
"Longitude": "5.347138599999994",
"Latitude": "60.4837661",
"OrgIdOwner": 19426,
"ParentOrgId": null,
"ParentOrgTypeId": null
}
9. Information message about old person 2
"body": {
"PersonId": 8339483,
"SportNo": "M010620TRO02",
"GenderId": 1,
"BirthDate": "2020-06-01T00:00:00",
"IsDead": false,
"DeathDate": null,
"IsDeleted": false,
"IsValidated": false,
"LastName": "Adolfsen",
"FirstName": "Trond",
"AccountId": null,
"CitizenshipRegionId": 1500152,
"ProfilePictureId": null,
"AddressLine1": "Oslo",
"AddressLine2": null,
"PostCode": "0010",
"City": "OSLO",
"PostCodeId": 14892,
"Country": "Norge",
"CountryId": 1500152,
"Email": "Trond.Adolfsen@mailinator.com",
"Email2": null,
"Email3": null,
"PrivatePhone": null,
"WorkPhone": null,
"MobilePhone": null,
"RegistrationPhone": null,
"RegistrationPhoneCountryCode": null,
"IsSecretAddress": false,
"IsSecretPrivatePhone": false,
"IsSecretWorkPhone": false,
"IsSecretMobilePhone": false,
"IsSecretEmail": false,
"IsSecretEmail2": false,
"IsSecretEmail3": false,
"OrgIdOwner": 19426,
"MergedPersonIds": null
}
10. Soft delete old membership (Old person 2 Club membership(s))
"body": {
"MembershipId": 39921554,
"PersonId": 8339483,
"OrgId": 19426,
"IsDeleted": 1,
"IsPassive": 1,
"MembershipStatusId": 4
}
11. Information message about New organization/Gren for new person
"body": {
"OrgId": 819185,
"OrgNo": "GN01010001381",
"OrgName": "Idd Sportsklubb",
"Abbreviation": "Idd Sportsklubb",
"DescribingName": "Idd Sportsklubb - Orientering",
"OrgTypeId": 14,
"AccountId": 5669501,
"IsActive": true,
"SportId": 153,
"TerminationDate": null,
"TerminationReasonId": null,
"Comment": null,
"OrganisationNumber": null,
"MunicipalityId": 500001,
"FoundedDate": null,
"AddressLine1": "Nyborg",
"AddressLine2": "Aspedammen",
"PostCode": "1766",
"City": "HALDEN",
"PostCodeId": 10946,
"Country": "Norge",
"CountryId": 1500152,
"VisitAddressLine1": "Aspedammenveien 46",
"VisitAddressLine2": "1766",
"VisitPostCode": "HALDEN",
"VisitCity": null,
"VisitPostCodeId": 10946,
"Email": "info@iddsk.no",
"Homepage": "www.iddsk.no",
"Telephone1": "",
"Telephone2": null,
"MobilePhone": "98856568",
"Fax": null,
"IsSecretAddress": false,
"IsSecretTelephone1": false,
"IsSecretTelephone2": false,
"IsSecretMobilePhone": false,
"IsSecretFax": false,
"IsSecretEmail": false,
"Longitude": null,
"Latitude": null,
"OrgIdOwner": 819185,
"ParentOrgId": 61874,
"ParentOrgTypeId": 6
}
12. Information message about New Person with Merged person IDs
"body": {
"PersonId": 8339484,
"SportNo": "M010620TRO03",
"GenderId": 1,
"BirthDate": "2020-06-01T00:00:00",
"IsDead": false,
"DeathDate": null,
"IsDeleted": false,
"IsValidated": false,
"LastName": "Adolfsen",
"FirstName": "Trond",
"AccountId": null,
"CitizenshipRegionId": 1500152,
"ProfilePictureId": null,
"AddressLine1": "Oslo",
"AddressLine2": null,
"PostCode": "0010",
"City": "OSLO",
"PostCodeId": 14892,
"Country": "Norge",
"CountryId": 1500152,
"Email": "Trond.Adolfsen@mailinator.com",
"Email2": null,
"Email3": null,
"PrivatePhone": null,
"WorkPhone": null,
"MobilePhone": null,
"RegistrationPhone": null,
"RegistrationPhoneCountryCode": null,
"IsSecretAddress": false,
"IsSecretPrivatePhone": false,
"IsSecretWorkPhone": false,
"IsSecretMobilePhone": false,
"IsSecretEmail": false,
"IsSecretEmail2": null,
"IsSecretEmail3": null,
"OrgIdOwner": 19426,
"MergedPersonIds": "8339482,8339483"
}
13. Add new ActiveMembership message with Merged ActiveMembership IDs
"body": {
"ActiveMembershipId": 24704642,
"PersonId": 8339484,
"OrgId": 819185,
"SportId": 153,
"FromDate": "2020-06-12T00:00:00",
"IsDeleted": 0,
"IsPassive": 0,
"ActiveMembershipStatusId": 2,
"OrgIdOwner": 819185,
"MergedActiveMembershipIds": "39921552,39921559"
}
14. Information message about old organization/Gren membership
"body": {
"OrgId": 819185,
"OrgNo": "GN01010001381",
"OrgName": "Idd Sportsklubb",
"Abbreviation": "Idd Sportsklubb",
"DescribingName": "Idd Sportsklubb - Orientering",
"OrgTypeId": 14,
"AccountId": 5669501,
"IsActive": true,
"SportId": 153,
"TerminationDate": null,
"TerminationReasonId": null,
"Comment": null,
"OrganisationNumber": null,
"MunicipalityId": 500001,
"FoundedDate": null,
"AddressLine1": "Nyborg",
"AddressLine2": "Aspedammen",
"PostCode": "1766",
"City": "HALDEN",
"PostCodeId": 10946,
"Country": "Norge",
"CountryId": 1500152,
"VisitAddressLine1": "Aspedammenveien 46",
"VisitAddressLine2": "1766",
"VisitPostCode": "HALDEN",
"VisitCity": null,
"VisitPostCodeId": 10946,
"Email": "info@iddsk.no",
"Homepage": "www.iddsk.no",
"Telephone1": "",
"Telephone2": null,
"MobilePhone": "98856568",
"Fax": null,
"IsSecretAddress": false,
"IsSecretTelephone1": false,
"IsSecretTelephone2": false,
"IsSecretMobilePhone": false,
"IsSecretFax": false,
"IsSecretEmail": false,
"Longitude": null,
"Latitude": null,
"OrgIdOwner": 819185,
"ParentOrgId": 61874,
"ParentOrgTypeId": 6
}
15. Information message about old person 1
"body": {
"PersonId": 8339482,
"SportNo": "M010620TRO01",
"GenderId": 1,
"BirthDate": "2020-06-01T00:00:00",
"IsDead": false,
"DeathDate": null,
"IsDeleted": false,
"IsValidated": false,
"LastName": "Adolfsen",
"FirstName": "Trond",
"AccountId": null,
"CitizenshipRegionId": 1500152,
"ProfilePictureId": null,
"AddressLine1": "Oslo",
"AddressLine2": null,
"PostCode": "0010",
"City": "OSLO",
"PostCodeId": 14892,
"Country": "Norge",
"CountryId": 1500152,
"Email": "Trond.Adolfsen@mailinator.com",
"Email2": null,
"Email3": null,
"PrivatePhone": null,
"WorkPhone": null,
"MobilePhone": null,
"RegistrationPhone": null,
"RegistrationPhoneCountryCode": null,
"IsSecretAddress": false,
"IsSecretPrivatePhone": false,
"IsSecretWorkPhone": false,
"IsSecretMobilePhone": false,
"IsSecretEmail": false,
"IsSecretEmail2": false,
"IsSecretEmail3": false,
"OrgIdOwner": 19426,
"MergedPersonIds": null
}
16. Soft delete old Activemembership (Old person 1 Gren membership(s))
"body": {
"ActiveMembershipId": 39921552,
"PersonId": 8339482,
"OrgId": 819185,
"SportId": 153,
"IsDeleted": 1,
"IsPassive": 1,
"ActiveMembershipStatusId": 4
}
17. Information message about old organization/Gren membership
"body": {
"OrgId": 819185,
"OrgNo": "GN01010001381",
"OrgName": "Idd Sportsklubb",
"Abbreviation": "Idd Sportsklubb",
"DescribingName": "Idd Sportsklubb - Orientering",
"OrgTypeId": 14,
"AccountId": 5669501,
"IsActive": true,
"SportId": 153,
"TerminationDate": null,
"TerminationReasonId": null,
"Comment": null,
"OrganisationNumber": null,
"MunicipalityId": 500001,
"FoundedDate": null,
"AddressLine1": "Nyborg",
"AddressLine2": "Aspedammen",
"PostCode": "1766",
"City": "HALDEN",
"PostCodeId": 10946,
"Country": "Norge",
"CountryId": 1500152,
"VisitAddressLine1": "Aspedammenveien 46",
"VisitAddressLine2": "1766",
"VisitPostCode": "HALDEN",
"VisitCity": null,
"VisitPostCodeId": 10946,
"Email": "info@iddsk.no",
"Homepage": "www.iddsk.no",
"Telephone1": "",
"Telephone2": null,
"MobilePhone": "98856568",
"Fax": null,
"IsSecretAddress": false,
"IsSecretTelephone1": false,
"IsSecretTelephone2": false,
"IsSecretMobilePhone": false,
"IsSecretFax": false,
"IsSecretEmail": false,
"Longitude": null,
"Latitude": null,
"OrgIdOwner": 819185,
"ParentOrgId": 61874,
"ParentOrgTypeId": 6
}
18. Information message about old person 2
"body": {
"PersonId": 8339483,
"SportNo": "M010620TRO02",
"GenderId": 1,
"BirthDate": "2020-06-01T00:00:00",
"IsDead": false,
"DeathDate": null,
"IsDeleted": false,
"IsValidated": false,
"LastName": "Adolfsen",
"FirstName": "Trond",
"AccountId": null,
"CitizenshipRegionId": 1500152,
"ProfilePictureId": null,
"AddressLine1": "Oslo",
"AddressLine2": null,
"PostCode": "0010",
"City": "OSLO",
"PostCodeId": 14892,
"Country": "Norge",
"CountryId": 1500152,
"Email": "Trond.Adolfsen@mailinator.com",
"Email2": null,
"Email3": null,
"PrivatePhone": null,
"WorkPhone": null,
"MobilePhone": null,
"RegistrationPhone": null,
"RegistrationPhoneCountryCode": null,
"IsSecretAddress": false,
"IsSecretPrivatePhone": false,
"IsSecretWorkPhone": false,
"IsSecretMobilePhone": false,
"IsSecretEmail": false,
"IsSecretEmail2": false,
"IsSecretEmail3": false,
"OrgIdOwner": 19426,
"MergedPersonIds": null
}
19. Soft delete old Activemembership (Old person 2 Gren membership(s))
"body": {
"ActiveMembershipId": 39921559,
"PersonId": 8339483,
"OrgId": 819185,
"SportId": 153,
"IsDeleted": 1,
"IsPassive": 1,
"ActiveMembershipStatusId": 4
}
20. Update Sports number for new person from old person 1
"body": {
"PersonID": 8339484
"SportsNo": “M13129DAV01”
}
21. Update Sports number for new person from old person 2
"body": {
"PersonID": 8339484
"SportsNo": “M13129DAV01”
}
22. Delete old gren Membership person 1
"body": {
"ActiveMembershipId": 39921552
}
23. Delete old club Membership person 1
"body": {
"MembershipId": 39921546
}
24. Delete old gren Membership person 2
"body": {
"ActiveMembershipId": 39921559
}
25. Delete old club Membership person 2
"body": {
"MembershipId": 39921554
}
26. Delete old person 1
"body": {
"PersonId": 8339483
}
27. Delete old person 2
"body": {
"PersonId": 8339482
}