Website logo

Get all enquiries for a specific office/agency

Returns a page of listing enquiries received by the authenticated office/agency, newest first, optionally limited to a date range.

Authentication: requires the MyTradeMeRead permission. The office/agency is the member the access token was issued for; there is no office ID in the URL. The member must be a property agent account. Which enquiries are included: enquiries on listings owned by the authenticated member, enquiries on listings owned by agents whose office is the authenticated member, and enquiries received by those agents. There is no default date range: if neither startDate nor endDate is given, every matching enquiry is returned (page by page). Results are ordered by enquiry date, newest first. Errors: 400 if the access token does not identify a member ("'memberId' was not found in authentication token."), if page or pageSize is not an integer, if startDate or endDate is not a valid date, if page is less than 1 ("Page must be greater than 0."), if pageSize is outside 1 to 200 ("Page size must be between 1 and 200."), or if startDate is after endDate ("Start date cannot be after end date."). 403 if the authenticated member is not found or is not a property agent ("Access denied. Member is not a property agent.").

URL: https://api.trademe.co.nz/v1/Property/Enquiries/Office.{file_format}
HTTP Method: GET
Requires Authentication? Yes
Permission Required: MyTradeMeRead: Read your membership & listing data.
Supported Formats: XML, JSON
Rate Limited? Yes

URL parameters

file_format Enumeration (required) The format of the response.
xml Serialize responses into XML.
json Serialize responses into JSON.

Query String parameters

endDate String (optional)

Optional. Only return enquiries sent on or before this date (for example 2025-02-28). Any time component is ignored. The date is treated as midnight at the start of that day, so enquiries sent later on the end date itself are not included; use the following day to include the whole of the end date. If omitted, there is no upper limit. Must not be earlier than startDate.

page String (optional)

Optional. The page number to return, starting from 1. Defaults to 1. Must be an integer of 1 or more.

pageSize String (optional)

Optional. The number of enquiries per page. Defaults to 50. Must be an integer from 1 to 200.

startDate String (optional)

Optional. Only return enquiries sent on or after this date (for example 2025-01-31). Any time component is ignored (the date is treated as midnight at the start of that day). If omitted, there is no lower limit.

Returns

<OfficeEnquiriesCollectionResponse>

An OfficeEnquiriesCollectionResponse containing the requested page of enquiries (newest first) and the total number of matching enquiries across all pages.

Page Integer

The page number of this result, starting from 1. This is the page that was requested (default 1).

PageSize Integer

The page size used for this result (default 50, maximum 200). The final page may contain fewer enquiries.

TotalCount Integer

The total number of enquiries matching the request (including any date range) across all pages, not just this page.

List Collection of <OfficeEnquiryResponse> or null

The enquiries on this page, newest first. Empty if there are no matching enquiries on this page.

EnquiryId Integer

The unique ID of this enquiry.

ListingId Integer

The ID of the listing the enquiry was made on, as used in other Trade Me API listing methods.

EnquiryDate DateTime

The date and time the enquiry was sent. In JSON this is serialised as a .NET date value, for example "\/Date(1759800000000)\/" (milliseconds since 1/1/1970).

FirstName String or null

The enquirer's first name. An empty string if none was provided.

LastName String or null

The enquirer's last name. An empty string if none was provided.

Email String or null

The enquirer's email address.

ReceiverEmail String or null

The email address the enquiry was sent to (the listing's enquiry recipient).

PhoneNumber String or null

The enquirer's phone number. An empty string if none was provided.

Message String or null

The text of the enquiry message.

IsAuthenticated Boolean

True if the enquirer is an authenticated member; otherwise false.

EnquirerWantsAppraisal Boolean

True if the enquirer asked for an appraisal as part of the enquiry; otherwise false.

PropertyFilesUnlocked Boolean

True if the enquiry included a request to unlock the listing's property files; otherwise false.

Example XML Response (switch to JSON)

<OfficeEnquiriesCollectionResponse xmlns="http://api.trademe.co.nz/v1">
  <Page>123</Page>
  <PageSize>123</PageSize>
  <TotalCount>123</TotalCount>
  <List>
    <OfficeEnquiryResponse>
      <EnquiryId>123</EnquiryId>
      <ListingId>123</ListingId>
      <EnquiryDate>2018-01-01T00:00:00Z</EnquiryDate>
      <FirstName>ABC</FirstName>
      <LastName>ABC</LastName>
      <Email>ABC</Email>
      <ReceiverEmail>ABC</ReceiverEmail>
      <PhoneNumber>ABC</PhoneNumber>
      <Message>ABC</Message>
      <IsAuthenticated>false</IsAuthenticated>
      <EnquirerWantsAppraisal>false</EnquirerWantsAppraisal>
      <PropertyFilesUnlocked>false</PropertyFilesUnlocked>
    </OfficeEnquiryResponse>
    <OfficeEnquiryResponse>
      <EnquiryId>123</EnquiryId>
      <ListingId>123</ListingId>
      <EnquiryDate>2018-01-01T00:00:00Z</EnquiryDate>
      <FirstName>ABC</FirstName>
      <LastName>ABC</LastName>
      <Email>ABC</Email>
      <ReceiverEmail>ABC</ReceiverEmail>
      <PhoneNumber>ABC</PhoneNumber>
      <Message>ABC</Message>
      <IsAuthenticated>false</IsAuthenticated>
      <EnquirerWantsAppraisal>false</EnquirerWantsAppraisal>
      <PropertyFilesUnlocked>false</PropertyFilesUnlocked>
    </OfficeEnquiryResponse>
  </List>
</OfficeEnquiriesCollectionResponse>

Example JSON Response (switch to XML)

{
  "Page": 123,
  "PageSize": 123,
  "TotalCount": 123,
  "List": [
    {
      "EnquiryId": 123,
      "ListingId": 123,
      "EnquiryDate": "\/Date(1514764800)\/",
      "FirstName": "ABC",
      "LastName": "ABC",
      "Email": "ABC",
      "ReceiverEmail": "ABC",
      "PhoneNumber": "ABC",
      "Message": "ABC",
      "IsAuthenticated": false,
      "EnquirerWantsAppraisal": false,
      "PropertyFilesUnlocked": false
    },
    {
      "EnquiryId": 123,
      "ListingId": 123,
      "EnquiryDate": "\/Date(1514764800)\/",
      "FirstName": "ABC",
      "LastName": "ABC",
      "Email": "ABC",
      "ReceiverEmail": "ABC",
      "PhoneNumber": "ABC",
      "Message": "ABC",
      "IsAuthenticated": false,
      "EnquirerWantsAppraisal": false,
      "PropertyFilesUnlocked": false
    }
  ]
}