Contact Activites
Entity responsible for contact activity operations
GraphQL interface for messages.
type Query {
contactActivity(input: ActivityFilterPaging): [Activity]
}
enum COMPANY_CONTACT_ACTIVITY_CATEGORY {
EMAIL
NOTE
CALL
SMS
SEARCH_PROFILE_UPDATE
DATA_ROOM_VIEWED
USER_BLACKLISTED
USER_UNBLACKLISTED
}
type Activity {
id: String
companyId: String
listingId: String
candidateId: String
companyContactId: String
messageId: String
tenantId: String
searchProfileId: String
createdByUserId: String
category: COMPANY_CONTACT_ACTIVITY_CATEGORY
type: String
text: String
}
input ActivityFilterPaging {
filter: ActivityFilter
paging: GraphPaging
sort: GraphSorting
}
input ActivityFilter {
contactId: String
companyId: String
}
Usage of Query:
query contactActivity($companyId: String, $contactId: String) {
contactActivity(
input: { filter: { companyId: $companyId, contactId: $contactId } }
) {
id
companyId
listingId
candidateId
messageId
type
text
category
}
}
Variables:
Using either of these two, should give an error if no variables are not given.
{
"contactId": "6aec3680-a1de-4e5b-b3d9-67cb4b4727f6",
"companyId": "341de250-2fd6-11e7-9e51-ff0020488d44"
}
curl --location --request POST 'https://acme-qa.everreal-dev.co/api/reporting/graphql' \
--header 'Authorization: Bearer ...' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query contactActivity($companyId: String, $contactId: String, $externalContactId: String) {\n contactActivity(\n input: { filter: { companyId: $companyId, contactId: $contactId, externalContactId: $externalContactId } }\n ) {\n id\n companyId\n listingId\n candidateId\n messageId\n type\n text\n category\n }\n }","variables":{"contactId":"6aec3680-a1de-4e5b-b3d9-67cb4b4727f6","companyId":"341de250-2fd6-11e7-9e51-ff0020488d44"}}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer ....");
myHeaders.append("Content-Type", "application/json");
var graphql = JSON.stringify({
query: "query contactActivity($companyId: String, $contactId: String, $externalContactId: String) {\n contactActivity(\n input: { filter: { companyId: $companyId, contactId: $contactId, externalContactId: $externalContactId } }\n ) {\n id\n companyId\n listingId\n candidateId\n messageId\n type\n text\n category\n }\n }",
variables: {"contactId":"6aec3680-a1de-4e5b-b3d9-67cb4b4727f6","companyId":"341de250-2fd6-11e7-9e51-ff0020488d44"}
})
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: graphql,
redirect: 'follow'
};
fetch("https://acme-qa.everreal-dev.co/api/reporting/graphql", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Last updated