APIs & Services
Example GraphQL Queries
6 min
the altrata profile and matching apis utilize graphql, allowing clients to specify the exact data they need the example queries provided below illustrate different structures for constructing these graphql requests, including the parameters available for input and the nesting of specific data fields that are specific to each api's data model let's jump in! matching api query examples query 1 submitting initial matching request using client supplied id, first name, last name, organization name, and role title query myquery { personsmatch( persons {clientsuppliedid "123", firstname "brian", lastname "alster", organizationname "altrata", roletitle "ceo"} ) { requestid } } response will return a unique id for the matching request, such as the one below { "data" { "personsmatch" { "requestid" "matchapi 1750784160000 name person 43016618cbc091b979c6f411dd56b6d7a2af3669" } } query 2 checking matching request status leveraging the description and status fields query myquery { requeststatus( input {requestid "matchapi 1750784160000 name person 43016618cbc091b979c6f411dd56b6d7a2af3669"} ) { on statusdescription { description status } } } response example detailed below { "data" { "requeststatus" { "description" "the matching process has started on your request", "status" "matching started" } } } query 3 retrieving matching results in the example below, we leverage the unique matches query to retrieve exact results other queries that can be leveraged include possible matches and no matches query myquery { personuniquematches( input {requestid "matchapi 1750786560000 name person 43016618cbc091b979c6f411dd56b6d7a2af3669"} ) { on personmatchesresponse { typename data { clientsuppliedid matchresultid matchresulttype matches { altrataid firstname lastname roletitle organizationname } } } } } response { "data" { "personuniquematches" { " typename" "personmatchesresponse", "data" \[ { "clientsuppliedid" "321", "matchresultid" "5a1b3ecd7dff4aa7b1661ca771936593", "matchresulttype" "unique match", "matches" \[ { "altrataid" "1 per 154231153", "firstname" "brian", "lastname" "alster", "roletitle" "chief executive officer", "organizationname" "altrata ltd" } ] } ] } } } profile api query examples query 1 organization keyword search request query myquery { organizationkeywordsearch(filter {searchkeyword "deloitte llp"}) { on organizationpagedresult { typename items { id organizationname organizationtype sectorprimary website } } } } response { "data" { "organizationkeywordsearch" { " typename" "organizationpagedresult", "items" \[ { "id" "1 org 17182296", "organizationname" "deloitte llp", "organizationtype" "private", "sectorprimary" "banking & finance", "website" null }, { "id" "1 org 4056885", "organizationname" "deloitte us llp", "organizationtype" "private", "sectorprimary" "business & consumer services", "website" "http //www2 deloitte com" }, { "id" "1 org 37928218", "organizationname" "deloitte canada llp", "organizationtype" "private", "sectorprimary" "business & consumer services", "website" "http //www2 deloitte com/ca/en html" }, { "id" "1 org 410918223", "organizationname" "deloitte llp (guernsey)", "organizationtype" "private", "sectorprimary" null, "website" "www2 deloitte com/uk/en/footerlinks/office locator/offshore/guernsey html" }, { "id" "1 org 442241759", "organizationname" "deloitte nse llp", "organizationtype" "private", "sectorprimary" "banking & finance", "website" null }, { "id" "1 org 528421724", "organizationname" "deloitte llp (isle of man)", "organizationtype" "other", "sectorprimary" null, "website" null }, { "id" "1 org 9599760", "organizationname" "deloitte llp (kazakhstan)", "organizationtype" "private", "sectorprimary" "business & consumer services", "website" "www deloitte kz/" }, { "id" "1 org 413389443", "organizationname" "deloitte nwe llp", "organizationtype" "other", "sectorprimary" null, "website" null }, { "id" "1 org 446081739", "organizationname" "deloitte tcf llp", "organizationtype" "private", "sectorprimary" "business & consumer services", "website" null }, { "id" "1 org 8801911", "organizationname" "deloitte tax llp", "organizationtype" "private", "sectorprimary" "business & consumer services", "website" "www deloitte com" } ] } } }