API LIBRARY
Collapse Sidebar Menu
Expand Drawer

Submitting Reports

ENDPOINT URL

POST https://api-prod.corelogic.com/trestle/report/TpParticipantReport

AUTHENTICATION

This endpoint uses the same OAuth2 bearer token as the rest of the WebAPI.

Note that your ID, your product, and the data feed are all identified from your auth token. This means that to report users to an MLS that use different products or feeds, you will need to authenticate to the correct feed.

POST details

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:

ReportDate - String in "YYYY-MM-DD" format. The day for which you are submitting a report. REQUIRED. Must be less than 60 days in the past.
ReportFrequency - String, of value "Daily" or "Monthly". Must match the MLS's settings.
Items [] - An array of JSON objects describing the members that are being reported.

The members of the Items array each contain the following fields:

OriginatingSystemName - String, REQUIRED. The OSN that the member belongs to.
ParticipantID - String, REQUIRED* The MLS id of the participant
ParticipantFirstName - String, REQUIRED*
ParticipantLastName - String, REQUIRED*
ParticipantEmail - String, optional
ParticipantOfficeID - String, optional. The MLS id of the Office.
ParticipantOffice - String, optional. The name of the Office
ParticipantType - String, REQUIRED. Possible values: "Agent", "Broker"
ProductURLs - Array of Strings, REQUIRED. String members of this array must be well-formed URLs.
ServiceStartDate - String, REQUIRED.  "YYYY-MM-DD" format. The date you began providing service to this member.
ServiceTerminationDate - String, optional. "YYYY-MM-DD" format. The date your service terminated with this member.
Notes - String, optional. A string you can tag this member with, for later retreival.

* The system requires that each Item contain a ParticipantID, OR a ParticipantFirstName and ParticipantLastName.


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"
           }
        ]
    }
}
Example

Code Example

{
 "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",
     "ProductURLs": [
       "https://wwww.joesmithhomes.com"
     ],
     "ServiceStartDate": "2019-08-22",
     "ServiceTerminationDate": null,
     "Notes": ""
   }
 ]
}

Result

{
    "@odata.context": "https://api-prod.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
}