Overview
Trestle provides a participant reporting API so that Technology Providers (TPs) can report which brokers they have contracts with to the MLSs. Historically, this was done by passing around a spreadsheet. Trestle has provided a simple, standard way to report and read information about customer contracts.
Trestle provides this service, but not all MLSs use it. Some require individual contracts hosted in Trestle.
Using the Participant Reporting API is not much different from using the Trestle's WebAPI. They are both based on the OData standard and reading data from the endpoint is the same. The biggest difference is that the participant reporting API allows you to POST data to it.
Check out our PDF How-To for more information
As an alternative, you can download / upload a spreadsheet for Particiation Reporting. This option is available on the Participation Reporting tab in the Connection details area of your Trestle account.
Submitting Reports
For a quick refresher, as a TP, you have one or more products. Each of these products has one or more feed types. Each of these feed types is connected to one or more MLSs, and each of these feed type/MLS connections can have one or more customers associated with it. While using the participant reporting API, it is important to remember how these are tied together, as you will need to use the credentials for the correct product/feed type to report customers to the correct MLS.
Authentication
/trestle/oidc/connect/token
In order to submit reports, you must first be authenticated. The participant reporting API uses the same OAuth2 authentication as WebAPI. For WebAPI feeds, you will use scope=api
and for RETS feeds, you will use scope=rets
.
Submission
/trestle/report/TpParticipantReport
The endpoint accepts a JSON object in the POST body that identifies one or more of the MLS's members who use your service. It contains the following fields:
Field | Type | Required | Description |
---|---|---|---|
ReportDate | Date | Required | The day for which you are submitting a report in "YYYY-MM-DD" format. Must be less than 60 days in the past. |
ReportFrequency | Enumeration | Required | "Daily" or "Monthly". Must match the MLS's settings. |
Items | Array | Required | An array of members that are being reported. |
The members of the Items array each contain the following fields:
Field | Type | Required | Description |
---|---|---|---|
OriginatingSystemName | String | Required | The OSN that the member belongs to. |
ParticipantID | String | Conditional | The MLS id of the participant |
ParticipantFirstName | String | Conditional | Participant's first name |
ParticipantLastName | String | Conditional | Participant's last name |
ParticipantEmail | String | Optional | Participant's email address |
ParticipantOfficeID | String | Optional | The MLS id of the Office. |
ParticipantOffice | String | Optional | The name of the Office |
ParticipantType | Enumeration | Required | "Agent" or "Broker" |
DisplayURLs | Array | Required | Array of well-formed URLs. |
ServiceStartDate | Date | Required | The date you began providing service to this member in "YYYY-MM-DD" format. |
ServiceTerminationDate | Date | Optional | The date your service terminated with this member in "YYYY-MM-DD" format. |
Notes | String | Optional | A string you can tag this member with, for later retreival. |
The system requires that each member be identified by either a ParticipantID *or* a ParticipantFirstName and ParticipantLastName.
Example POST body
{
"ReportDate": "2020-02-02",
"ReportFrequency": "Daily",
"Items": [
{
"OriginatingSystemName": "ACTRIS2",
"ParticipantID": null,
"ParticipantFirstName": "Joe",
"ParticipantLastName": "Smith",
"ParticipantEmail": "joesmith@mailinator.com",
"ParticipantOfficeID": null,
"ParticipantOffice": null,
"ParticipantType": "Agent",
"DisplayURLs": [
"https://wwww.joesmithhomes.com"
],
"ServiceStartDate": "2019-08-22",
"ServiceTerminationDate": null,
"Notes": ""
}
]
}
Example Result
{
"@odata.context": "https://api-trestle.corelogic.com/trestle/report/$metadata#TpParticipantReport/$entity",
"TpParticipantReportID": 35,
"TpID": 196,
"BusinessProductID": 47,
"DataFeedID": 17,
"ReportDate": "2020-02-02",
"ReportFrequency": "Daily",
"TpNotes": null,
"Recieved": "2020-03-13T15:53:49.8458511Z",
"ErrorCode": "OK",
"ErrorDescription": null
}
Errors
A submission that fails any of the field requirements above will get a 400 Bad Request
response with a fairly descriptive error.
For example, if the URL field for the first (0th) item in the Items array contains the string "Foo Bar Baz", the response body will be:
{
"error": {
"code": "",
"message": "Items[0]:\nThis is not a URL! is not a well formed URL",
"details": [
{
"code": "",
"target": "Items[0]",
"message": "Foo Bar Baz is not a well formed URL"
}
]
}
}
Querying
/trestle/report/TpParticipantReport
Your report receipts can be queried and searched just like any OData endpoint. The unique ID field for these receipts is TpParticipantReportID.
Metadata
/trestle/report/$metadata
The metadata is returned in the same XML format as it is for WebAPI.
Getting Member Information
The member information you will need for submitting the reports can be obtained from the Member Resource via WebAPI or RETS.
Find ID and other details of a member
/trestle/odata/Member?$filter=MemberEmail eq 'test@testrealtor.com' and OriginatingSystemName eq 'MLSID'
The following key fields map to fields that are recommended in the report submission payload:
Member Field | Participant Report Field |
---|---|
MemberFirstName | ParticipantFirstName |
MemberLastName | ParticipantLastName |
MemberEmail | ParticipantEmail |
MemberType | ParticipantType Note: There are more MemberType s than ParticipantType s |
MemberMlsId | ParticipantID |
OfficeMlsId | ParticipantOfficeID |
OfficeName | ParticipantOffice |
OriginatingSystemName | OriginatingSystemName |