Contact Activites
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:
GraphQL
CURL
Javascript
Query:
query contactActivity($companyId: String, $contactId: String, $externalContactId: String) {
contactActivity(
input: { filter: { companyId: $companyId, contactId: $contactId, externalContactId: $externalContactId } }
) {
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"
}
Should looks something like this on "Postman 2"
curl --location --request POST 'https://acme-qa.everreal-dev.co/api/reporting/graphql' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI4NzYyNzE1MC1lZDM0LTQ3YjUtYWE0Zi00NWIyM2M4ZWI4MTYiLCJzdWIiOiI5NDQ0YzYzYy0wZmU2LTQ2YzAtYjUxMy1mOTU5YmY3YTI4YjkiLCJleHAiOjE2NTI2OTkwMDQsImlhdCI6MTY1MjY5NTQwNH0.mpAv2oUYU4PSYW1Z10bzz4wU0axr2CqDntV_lZMyrd0H0iFM7Ul3Co6xRnjcsnEqpI_4itkSeeStQH1wTXw_FWFAe3HB7cto2mndFZqZn-P0ZtA-Xfmb7nB8Gpm3vY8hNyjJkhznxMUKXeHzHp2yYISREl7oUK62v1HE2ameBA7PHmD_KuFMUJ6bzuZ_Iz6kEz5hE45wJMNbfsj0N369NOjt12dYsDu-7qR9t_KywZYB9JV6zllYZuhvycGOMfdPRB1qn39L2Xka-XwD5959wew0cYr5QLgFFdIUWtVWQLQXbib5CD1lNA5nGNeeUwLzm5sgD3xEJlG-4oGymEr1eg' \
--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 eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI4NzYyNzE1MC1lZDM0LTQ3YjUtYWE0Zi00NWIyM2M4ZWI4MTYiLCJzdWIiOiI5NDQ0YzYzYy0wZmU2LTQ2YzAtYjUxMy1mOTU5YmY3YTI4YjkiLCJleHAiOjE2NTI2OTkwMDQsImlhdCI6MTY1MjY5NTQwNH0.mpAv2oUYU4PSYW1Z10bzz4wU0axr2CqDntV_lZMyrd0H0iFM7Ul3Co6xRnjcsnEqpI_4itkSeeStQH1wTXw_FWFAe3HB7cto2mndFZqZn-P0ZtA-Xfmb7nB8Gpm3vY8hNyjJkhznxMUKXeHzHp2yYISREl7oUK62v1HE2ameBA7PHmD_KuFMUJ6bzuZ_Iz6kEz5hE45wJMNbfsj0N369NOjt12dYsDu-7qR9t_KywZYB9JV6zllYZuhvycGOMfdPRB1qn39L2Xka-XwD5959wew0cYr5QLgFFdIUWtVWQLQXbib5CD1lNA5nGNeeUwLzm5sgD3xEJlG-4oGymEr1eg");
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 modified 2mo ago
Copy link