Direct Web API — CRM

The Direct Web API provides a direct, bidirectional OData connection to the Matrix MLS CRM database. Resources include Contacts, EmailHistory, Lists (carts), PortalContents (with AddListingNote / MarkAsViewed / SetListingPreference actions), SavedSearches, UserRegistry, and a DashboardAPI for aggregated MyListings, HotSheet, MarketWatch, Concierge, and Timeline data. Authentication is OpenID Connect via Clareity Single Sign-On or basic authentication. Standard OData $select / $expand / $orderby / $filter query options are supported.

OpenAPI Specification

corelogic-direct-webapi-crm-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: CoreLogic Trestle Direct Web API — CRM
  version: '1.0'
  description: >-
    The Direct Web API provides a direct, bidirectional OData connection to
    the Matrix MLS CRM database. Resources include Contacts, EmailHistory,
    Lists, PortalContents, SavedSearches, UserRegistry, and an aggregated
    DashboardAPI. Authentication is OpenID Connect via Clareity Single Sign-On
    or HTTP Basic. OData query options ($select, $expand, $orderby, $filter)
    apply throughout.
  contact:
    name: Trestle Support
    email: trestlesupport@cotality.com
    url: https://trestle-documentation.corelogic.com/direct-webapi-crm-reference.html
  license:
    name: Proprietary
    url: https://www.cotality.com/terms-of-use
servers:
  - url: https://api.cotality.com/trestle/odata
    description: Direct Web API CRM production server
security:
  - oidcClareity: []
  - basicAuth: []
tags:
  - name: Contacts
    description: CRM contact records (name, address, phone, email).
  - name: EmailHistory
    description: Outbound messages sent to contacts.
  - name: Lists
    description: Property lists / carts attached to contacts.
  - name: PortalContents
    description: Contact-scoped listing notes, views, and preferences.
  - name: SavedSearches
    description: Saved listing search criteria with auto-email schedules.
  - name: UserRegistry
    description: Per-user preference key/value store.
  - name: DashboardAPI
    description: Aggregated dashboard data for the agent home screen.
paths:
  /Contacts:
    get:
      operationId: queryContacts
      summary: Query Contacts
      description: Returns contact records matching OData query options.
      tags:
        - Contacts
      responses:
        '200':
          description: OData collection of Contact records.
          content:
            application/json:
              schema:
                type: object
    post:
      operationId: createContact
      summary: Create Contact
      description: Creates a new contact record.
      tags:
        - Contacts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Contact'
      responses:
        '201':
          description: Created Contact record.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
  /Contacts({ContactKeyNumeric}):
    get:
      operationId: getContact
      summary: Get Contact
      description: Returns a single Contact by its numeric key.
      tags:
        - Contacts
      parameters:
        - name: ContactKeyNumeric
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: A single Contact record.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
    patch:
      operationId: updateContact
      summary: Update Contact
      description: Updates an existing Contact record.
      tags:
        - Contacts
      parameters:
        - name: ContactKeyNumeric
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Contact'
      responses:
        '204':
          description: Contact updated.
    delete:
      operationId: deleteContact
      summary: Delete Contact
      description: Deletes a Contact record.
      tags:
        - Contacts
      parameters:
        - name: ContactKeyNumeric
          in: path
          required: true
          schema:
            type: integer
      responses:
        '204':
          description: Contact deleted.
  /Contacts({ContactKeyNumeric})/PortalContents:
    get:
      operationId: getContactPortalContents
      summary: Get Contact Portal Contents
      description: Returns the PortalContents records associated with a contact.
      tags:
        - Contacts
        - PortalContents
      parameters:
        - name: ContactKeyNumeric
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OData collection of PortalContents records.
          content:
            application/json:
              schema:
                type: object
  /EmailHistory:
    get:
      operationId: queryEmailHistory
      summary: Query Email History
      description: Returns email-history records for messages sent to contacts.
      tags:
        - EmailHistory
      responses:
        '200':
          description: OData collection of EmailHistory records.
          content:
            application/json:
              schema:
                type: object
    post:
      operationId: createEmailHistory
      summary: Create Email History Record
      description: Records an email sent to a contact.
      tags:
        - EmailHistory
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailHistory'
      responses:
        '201':
          description: Created EmailHistory record.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailHistory'
  /EmailHistory({EmailHistoryKeyNumeric}):
    get:
      operationId: getEmailHistory
      summary: Get Email History Record
      description: Returns a single EmailHistory record.
      tags:
        - EmailHistory
      parameters:
        - name: EmailHistoryKeyNumeric
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: A single EmailHistory record.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailHistory'
  /Lists:
    get:
      operationId: queryLists
      summary: Query Lists
      description: Returns property list / cart records attached to contacts.
      tags:
        - Lists
      responses:
        '200':
          description: OData collection of List records.
          content:
            application/json:
              schema:
                type: object
    post:
      operationId: createList
      summary: Create List
      description: Creates a new property list / cart.
      tags:
        - Lists
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/List'
      responses:
        '201':
          description: Created List record.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List'
  /Lists(ListKey={ListKey},ClassName={ClassName}):
    get:
      operationId: getList
      summary: Get List
      description: Returns a single List by composite key.
      tags:
        - Lists
      parameters:
        - name: ListKey
          in: path
          required: true
          schema:
            type: string
        - name: ClassName
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A single List record.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List'
  /PortalContents:
    get:
      operationId: queryPortalContents
      summary: Query Portal Contents
      description: Returns PortalContents records (listing notes, views, preferences).
      tags:
        - PortalContents
      responses:
        '200':
          description: OData collection of PortalContents records.
          content:
            application/json:
              schema:
                type: object
    post:
      operationId: createPortalContent
      summary: Create Portal Content Record
      description: Creates a new PortalContents record.
      tags:
        - PortalContents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PortalContent'
      responses:
        '201':
          description: Created PortalContents record.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortalContent'
  /PortalContents/AddListingNote:
    post:
      operationId: addListingNote
      summary: Add Listing Note
      description: OData action that attaches a note to a listing for a contact's portal.
      tags:
        - PortalContents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '204':
          description: Note added.
  /PortalContents/MarkAsViewed:
    post:
      operationId: markAsViewed
      summary: Mark Listing As Viewed
      description: OData action that marks a listing as viewed in a contact's portal.
      tags:
        - PortalContents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '204':
          description: Listing marked as viewed.
  /PortalContents/SetListingPreference:
    post:
      operationId: setListingPreference
      summary: Set Listing Preference
      description: OData action that sets a contact's preference flag on a listing.
      tags:
        - PortalContents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '204':
          description: Preference set.
  /SavedSearches:
    get:
      operationId: querySavedSearches
      summary: Query Saved Searches
      description: Returns SavedSearch records (listing search criteria for auto-email).
      tags:
        - SavedSearches
      responses:
        '200':
          description: OData collection of SavedSearch records.
          content:
            application/json:
              schema:
                type: object
    post:
      operationId: createSavedSearch
      summary: Create Saved Search
      description: Creates a new SavedSearch record.
      tags:
        - SavedSearches
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SavedSearch'
      responses:
        '201':
          description: Created SavedSearch record.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SavedSearch'
  /SavedSearches({SavedSearchKeyNumeric})/Default.GetSavedSearchListingIDs():
    get:
      operationId: getSavedSearchListingIds
      summary: Get Saved Search Listing IDs
      description: OData function that returns the listing IDs currently matching a saved search.
      tags:
        - SavedSearches
      parameters:
        - name: SavedSearchKeyNumeric
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Array of matching listing IDs.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
  /UserRegistry:
    get:
      operationId: queryUserRegistry
      summary: Query User Registry
      description: Returns per-user preference key/value records.
      tags:
        - UserRegistry
      responses:
        '200':
          description: OData collection of UserRegistry records.
          content:
            application/json:
              schema:
                type: object
    post:
      operationId: createUserRegistryEntry
      summary: Create User Registry Entry
      description: Creates a new user registry key/value entry.
      tags:
        - UserRegistry
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '201':
          description: Created entry.
  /UserRegistry/GetAllowedKeys():
    get:
      operationId: getAllowedKeys
      summary: Get Allowed Registry Keys
      description: Returns the list of allowed key names for the UserRegistry.
      tags:
        - UserRegistry
      responses:
        '200':
          description: Array of allowed key names.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
  /DashboardAPI/GetAggregatedData:
    get:
      operationId: getAggregatedDashboardData
      summary: Get Aggregated Dashboard Data
      description: Returns MyListings, HotSheet, MarketWatch, Concierge, and Timeline data for the agent dashboard.
      tags:
        - DashboardAPI
      responses:
        '200':
          description: Aggregated dashboard payload.
          content:
            application/json:
              schema:
                type: object
components:
  securitySchemes:
    oidcClareity:
      type: openIdConnect
      openIdConnectUrl: https://api.cotality.com/trestle/oidc/.well-known/openid-configuration
    basicAuth:
      type: http
      scheme: basic
  schemas:
    Contact:
      type: object
      description: A CRM Contact record.
      properties:
        ContactKeyNumeric:
          type: integer
        FirstName:
          type: string
        LastName:
          type: string
        Email:
          type: string
        Phone:
          type: string
        Address:
          type: string
        City:
          type: string
        StateOrProvince:
          type: string
        PostalCode:
          type: string
        ModificationTimestamp:
          type: string
          format: date-time
    EmailHistory:
      type: object
      description: A record of a message sent to a contact.
      properties:
        EmailHistoryKeyNumeric:
          type: integer
        ContactKeyNumeric:
          type: integer
        Subject:
          type: string
        Body:
          type: string
        SentTimestamp:
          type: string
          format: date-time
    List:
      type: object
      description: A property list / cart attached to a contact.
      properties:
        ListKey:
          type: string
        ClassName:
          type: string
        ContactKeyNumeric:
          type: integer
        Name:
          type: string
        ModificationTimestamp:
          type: string
          format: date-time
    PortalContent:
      type: object
      description: Per-contact listing note, view, or preference.
      properties:
        PortalContentKey:
          type: string
        ContactKeyNumeric:
          type: integer
        ListingKey:
          type: string
        Note:
          type: string
        Preference:
          type: string
        Viewed:
          type: boolean
        ModificationTimestamp:
          type: string
          format: date-time
    SavedSearch:
      type: object
      description: A saved listing search with optional auto-email schedule.
      properties:
        SavedSearchKeyNumeric:
          type: integer
        ContactKeyNumeric:
          type: integer
        Name:
          type: string
        Criteria:
          type: string
        EmailFrequency:
          type: string
        ModificationTimestamp:
          type: string
          format: date-time