EverReal
  • Introduction
  • Authentication
    • API ClientID and ClientSecret
    • Authentication limitations
  • Rate limiting
  • Helpers
    • Errors
    • Pagination
    • Formatting
  • How to guide
    • EverReal Data Import Process
      • Connect an Integration
      • Import Mappers
      • Ideal CSV Structure
      • Debug Imports
      • FAQ
    • Data import via GraphQL
  • Endpoints
    • Account users / members
    • Owners
      • Owners Query
      • Owners Mutation
    • Property Groups
      • Property Groups Query
      • Property Group Mutation
    • Properties
      • Properties Query
      • Properties Mutation
    • Units
      • Units Query
      • Units Mutation
    • Listing
      • Listing Query
      • Listing Mutation
    • Candidates
      • Candidates Query
      • Candidate Mutation
    • Messages
    • Contact Activites
    • Tenants
      • Tenants Query
      • Tenant Mutation
    • Contract
      • Contract Query
      • Contract Mutation
    • Contacts
      • Contact Mutation
      • Contact Query
    • Document management
      • Document management
      • Simple file upload
    • Tasks
      • Tasks Query
    • Protocols
      • Protocol Query
  • Webhooks
    • Owner Events
      • OWNER_CREATED
      • OWNER_UPDATED
      • OWNER_DELETED
    • Property Events
      • PROPERTY_CREATED
      • PROPERTY_UPDATED
      • PROPERTY_DELETED
    • Unit Events
      • UNIT_CREATED
      • UNIT_UPDATED
      • UNIT_DELETED
    • Listing Events
      • LISTING_ACTIVATED
      • LISTING_ARCHIVED
      • LISTING_UPDATED
      • LISTING_DEACTIVATED
      • LISTING_CREATED
      • LISTING_PUBLISHED_TO_CHANNEL
      • LISTING_UNPUBLISHED_FROM_CHANNEL
    • Candidates Events
      • CANDIDATE_PARSED
      • LISTING_CANDIDATE_APPLIED
    • Listing Contracting Events
      • LISTING_CONTRACT_FLOW_SIGNED
      • LISTING_CONTRACT_FLOW_PARTIALLY_SIGNED
      • LISTING_CONTRACT_FLOW_WITHDRAWN
      • LISTING_CONTRACT_FLOW_STARTED
    • Listing Scheduling Events
      • LISTING_CANDIDATE_SCHEDULE_TIMESLOT_BOOKING_REMOVED_CANDIDATE
      • LISTING_CANDIDATE_SCHEDULE_TIMESLOT_BOOKING_REMOVED_ADMIN
      • LISTING_CANDIDATE_SCHEDULE_TIMESLOT_BOOKED_CANDIDATE
      • LISTING_CANDIDATE_SCHEDULE_TIMESLOT_BOOKED_ADMIN
      • LISTING_CANDIDATE_SCHEDULE_NEW_TIMESLOTS_REQUESTED
      • LISTING_CANDIDATE_SCHEDULE_INVITED_VIEWING
    • Protocol Events
      • PROTOCOL_COMPLETED
  • Change log
    • Releases
      • Introducing Mappers
      • Enhancements for GraphQL
      • Enhancements for Querying
      • Enhancements for Webhooks
    • Upcoming
      • Introduced Querying Protocol in GraphQL
Powered by GitBook
On this page

Was this helpful?

  1. Endpoints

Messages

Entity responsible for message operations

GraphQL interface for messages.

enum MESSAGE_SENT_BY {
  ADMIN
  CANDIDATE
}

type MessageAttachment {
  id: String
  name: String
  resourcePath: String
  type: String
  size: Int
}

type Message {
  id: String
  candidateId: String
  sentBy: MESSAGE_SENT_BY
  userId: String
  text: String
  user: User
  replyToMessageId: String
  isRead: Boolean
  attachments: [MessageAttachment]
}

input MessageFilterPaging {
  filter: MessageFilter
  paging: GraphPaging
  sort: GraphSorting
}

input MessageFilter {
  candidateId: String
  contactId: String
  listingId: String
}

type Query {
  messages(input: MessageFilterPaging): [Message]
}

Usage of Query:

query message($candidateId: String, $contactId: String, $listingId: String) {
    messages(
      input: {
        filter: {
          candidateId: $candidateId
          contactId: $contactId
          listingId: $listingId
        }
      }
    ) {
      id
      candidateId
      sentBy
      text
      isRead
      attachments {
        id
        name
        resourcePath
        type
        size
      }
    }
  }

Variables:

Using either of these 3 should give an error if no variables not given.

{
"candidateId": "a50ddf78-c792-4461-b77e-c36ec444ddb5", 
"contactId": "6aec3680-a1de-4e5b-b3d9-67cb4b4727f6",
"listingId": "1840826c-08aa-419c-9779-c0a0dfcbd190"
}
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 message($candidateId: String, $contactId: String, $externalContactId: String, $listingId: String) {\n    messages(\n      input: {\n        filter: {\n          candidateId: $candidateId\n          contactId: $contactId\n          externalContactId: $externalContactId\n          listingId: $listingId\n        }\n      }\n    ) {\n      id\n      candidateId\n      sentBy\n      text\n      isRead\n      attachments {\n        id\n        name\n        resourcePath\n        type\n        size\n      }\n    }\n  }","variables":{"candidateId":"a50ddf78-c792-4461-b77e-c36ec444ddb5","contactId":"6aec3680-a1de-4e5b-b3d9-67cb4b4727f6","listingId":"1840826c-08aa-419c-9779-c0a0dfcbd190"}}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer ....");
myHeaders.append("Content-Type", "application/json");

var graphql = JSON.stringify({
  query: "query message($candidateId: String, $contactId: String, $externalContactId: String, $listingId: String) {\n    messages(\n      input: {\n        filter: {\n          candidateId: $candidateId\n          contactId: $contactId\n          externalContactId: $externalContactId\n          listingId: $listingId\n        }\n      }\n    ) {\n      id\n      candidateId\n      sentBy\n      text\n      isRead\n      attachments {\n        id\n        name\n        resourcePath\n        type\n        size\n      }\n    }\n  }",
  variables: {"candidateId":"a50ddf78-c792-4461-b77e-c36ec444ddb5","contactId":"6aec3680-a1de-4e5b-b3d9-67cb4b4727f6","listingId":"1840826c-08aa-419c-9779-c0a0dfcbd190"}
})
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));

PreviousCandidate MutationNextContact Activites

Last updated 2 years ago

Was this helpful?