APIs & Services
Matching API
Example queries
17 min
this page lists a set of example queries which can be used as a starting point when working with the matching api the clientsuppliedid is a field required to use the matching api it is a unique alphanumeric string assigned to each input record, which allows you to correlate your record to the altrata returned record query submit queries to create a matching job and be returned a requestid to retrieve the results persons match the personsmatch query allows you to match records via name fileds & id fields the api accepts the following fields clientsuppliedid firstname lastname middlename organizationname roletitle altrataid bxpersonid rspersonid workemail linkedinprofile wxpersonid bripersonid wepersonid clientsuppliedid is a mandatory input along with at least one of the id fields input schemes may be mixed, that is, within one request you may match on (for example) workemail and linkedinprofile whereas for the name matching will need clientsuppliedid , firstname , lastname and organizationname mandatory input fields mutation mymutation { personsmatch( persons \[ { clientsuppliedid "32543", firstname "iris", lastname "deleon", middlename "tiffany", organizationname "ice cream", roletitle "chief product officer", workemail "iris deleon\@icecream com" }] ) { on requestresponse { requestid } on genericerror { typename genericerrorcode\ code errormessage correlationid } on validationerror { typename validationerrorcode\ code correlationid errormessage } } } i f multiple id schemes are passed within a single array element, and these result in multiple matches, the api will return these matches as discrete possiblematches the following example matches a single record by email the email to match is example\@example org and the id mutation mymutation { personsmatch(persons \[ { workemail "example\@example org", clientsuppliedid "1234" } ]){ on requestresponse { requestid } on genericerror { typename genericerrorcode\ code correlationid errormessage } on validationerror { typename validationerrorcode\ code correlationid errormessage } } } the following example matches multiple records by email mutation mymutation { personsmatch( persons \[{ workemail "example\@example org", clientsuppliedid "1234" }, { workemail "example2\@example org", clientsuppliedid "5678" } ]) { on requestresponse { requestid } on genericerror { typename genericerrorcode\ code correlationid errormessage } on validationerror { typename validationerrorcode\ code correlationid errormessage } } } the following example mixes multiple id schemes mutation mymutation { personsmatch( persons \[ { workemail "example\@example org", clientsuppliedid "1234" }, { rspersonid "92346", clientsuppliedid "5678" }, { bxpersonid "23947", clientsuppliedid "9873" }, { linkedinprofile "https //www linkedin com/in/iris deleon 618bba69/", clientsuppliedid "8653" }] ) { on requestresponse { requestid } on genericerror { typename genericerrorcode\ code correlationid errormessage } on validationerror { typename validationerrorcode\ code correlationid errormessage } } } organization match the organizationsmatch query allows you to match records via organization names and id fields the api accepts the following fields clientsuppliedid organizationname altrataid briorganizationid bxorganizationid rsorganizationid tickerprimary wxorganizationid submit a set of organization objects to be matched by name mutation mymutation { organizationsmatch(organizations \[ { clientsuppliedid "4080", organizationname "ice cream" } ]) { on requestresponse { requestid } on genericerror { typename genericerrorcode\ code correlationid errormessage } on validationerror { typename validationerrorcode\ code correlationid errormessage } } } submit a set of organization objects to be matched by name and ids mutation mymutation { organizationsmatch(organizations \[ { clientsuppliedid "4080", organizationname "ice cream", bxorganizationid "235245", tickerprimary "test" } ]) { on requestresponse { requestid } on genericerror { typename genericerrorcode\ code correlationid errormessage } on validationerror { typename validationerrorcode\ code correlationid errormessage } } } submit a set of organization objects to be matched by altrata ids mutation mymutation { organizationsbyidmatch( organizations \[ { bxorganizationid "4080", briorganizationid null, clientsuppliedid "1234", rsorganizationid "1127", tickerprimary "ice c", wxorganizationid null} ]) { on requestresponse { requestid } on genericerror { typename genericerrorcode\ code correlationid errormessage } on validationerror { typename validationerrorcode\ code correlationid errormessage } } } status check the current status of a matching job along with providing the job summary details of the request when the results are available the job is ready for results retrieval when the status is matched results available submit a simple query to fetch the staus of the matching request query myquery { requeststatus(input {requestid "matchapi 17266749000 id oration 4a4f750b0ea977fa130cc05155346e581"} ) { on statusdescription { requeststatus status timestamp } on genericerror { typename genericerrorcode\ code correlationid errormessage } on entitynotfounderror { typename entitynotfounderror\ code correlationid errormessage } on validationerror { typename validationerrorcode\ code correlationid errormessage } } } submit a query to fetch the job summary details along with the expiry of the results query myquery { requeststatus( input {requestid "matchapi 17266749000 id oration 4a4f750b0ea977fa130cc05155346e581"} ) { on statusdescription { requeststatus status timestamp jobsummary { nomatchcount possiblematchcount recordssubmittedcount uniquematchcount } expireson } on genericerror { typename genericerrorcode code correlationid errormessage } on entitynotfounderror { typename entitynotfounderror code correlationid errormessage } on validationerror { typename validationerrorcode code correlationid errormessage } } } with allrequeststatuses query, the user will be able to see the status of all the matching requests they have submitted upto 30 days query myquery { allrequeststatuses { on statusrequestsforuserresponse { typename data { expireson requestid requeststatus status timestamp jobsummary { nomatchcount possiblematchcount recordssubmittedcount uniquematchcount } } } on genericerror { typename genericerrorcode code correlationid errormessage } on entitynotfounderror { typename entitynotfounderror code correlationid errormessage } on validationerror { typename validationerrorcode code correlationid errormessage } } } you must change the requestid to be the requestid which was returned to you previously results retrieve results for a matching job three queries will be required personuniquematches to obtain all unique matches personpossiblematches to obtain all possible matches personnomatches to obtain all no matches once results are obtained, you may wish to connect to the profile api docid\ jp be2ni ds c9cwhopt to obtain further information on your matched results each response may be paginated see paging docid\ yxho373jhbo0mwuyypz5g to learn how to page over the results person unique matches retrieve paginated unique matches for a given matching job query myquery { personuniquematches( input {requestid "testingrequestid"} pageinfo {first 5, after "5"} ) { on personmatchesresponse { typename data { clientsuppliedid matches { matchscore firstname lastname organizationname roletitle altrataid bripersonid bxpersonid wepersonid wxpersonid } } pageinfo { endcursor } } on genericerror { typename genericerrorcode code correlationid errormessage } on entitynotfounderror { typename entitynotfounderror code correlationid errormessage } on validationerror { typename validationerrorcode code correlationid errormessage } } } person possible matches retrieve paginated possible matches for a given matching job query myquery { personpossiblematches( input {requestid "testingrequestid"} pageinfo {after "5", first 5} ) { on personmatchesresponse { typename data { clientsuppliedid matches { matchscore firstname lastname clientfirstname clientlastname organizationname clientorganizationname roletitle clientroletitle altrataid bripersonid bxpersonid rspersonid wepersonid wxpersonid } } pageinfo { endcursor } } on genericerror { typename genericerrorcode code correlationid errormessage } on entitynotfounderror { typename entitynotfounderror code correlationid errormessage } on validationerror { typename validationerrorcode code correlationid errormessage } } } person no match retrieve paginated results that were not matched query myquery { personnomatches( input {requestid "testingrequestid"}, pageinfo {after "5", first 5} ) { on personmatchesresponse { data { clientsuppliedid } pageinfo { endcursor } } on genericerror { typename genericerrorcode code correlationid errormessage } on entitynotfounderror { typename entitynotfounderror code correlationid errormessage } on validationerror { typename validationerrorcode code correlationid errormessage } } } organization unique matches retrieve paginated unique matches for a given matching job query myquery { organizationuniquematches( input {requestid "testingrequestid"} pageinfo {after "5", first 5} ) { on organizationmatchesresponse { typename data { clientsuppliedid matches { matchscore organizationname altrataid briorganizationid bxorganizationid rsorganizationid wxorganizationid } } pageinfo { endcursor } } on genericerror { typename genericerrorcode code correlationid errormessage } on entitynotfounderror { typename entitynotfounderror code correlationid errormessage } on validationerror { typename validationerrorcode code correlationid errormessage } } } organization possible matches retrieve paginated possible matches for a given matching job query myquery { organizationpossiblematches( input {requestid "testingrequestid"} pageinfo {after "5", first 5} ) { on organizationmatchesresponse { data { clientsuppliedid matches { altrataid matchscore organizationname rsorganizationid briorganizationid bxorganizationid wxorganizationid } } pageinfo { endcursor } } on genericerror { typename genericerrorcode code correlationid errormessage } on entitynotfounderror { typename entitynotfounderror code correlationid errormessage } on validationerror { typename validationerrorcode code correlationid errormessage } } } organization no match retrieve paginated results that we were unable to match query myquery { organizationnomatches(input {requestid "exampleid"}, pageinfo {after "", first 10} ) { on organizationmatchesresponse { typename data { clientsuppliedid } pageinfo { endcursor } } on genericerror { typename genericerrorcode code correlationid errormessage } on entitynotfounderror { typename entitynotfounderror code correlationid errormessage } on validationerror { typename validationerrorcode code correlationid errormessage } } }