Website logo

Gets a list of your active listing counts grouped by category.

Gets a list of the authenticated user's active listing counts, grouped by category.

URL: https://api.trademe.co.nz/v1/mytrademe/sellingitems/categorycounts.{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.

Returns

<CategoryListingCountResponse>

A list of categories and the count of the user's active listings in each.

CategoryCounts Collection of <CampaignCategory> or null

The list of CategoryListingCount.

CategoryId String or null

The unique identifier of the category.

Name String or null

The display name of the category.

CategoryPath String or null

The category path.

ListingCount Integer

The total number of listings in this category.

Example XML Response (switch to JSON)

<CategoryListingCountResponse xmlns="http://api.trademe.co.nz/v1">
  <CategoryCounts>
    <CampaignCategory>
      <CategoryId>ABC</CategoryId>
      <Name>ABC</Name>
      <CategoryPath>ABC</CategoryPath>
      <ListingCount>123</ListingCount>
    </CampaignCategory>
    <CampaignCategory>
      <CategoryId>ABC</CategoryId>
      <Name>ABC</Name>
      <CategoryPath>ABC</CategoryPath>
      <ListingCount>123</ListingCount>
    </CampaignCategory>
  </CategoryCounts>
</CategoryListingCountResponse>

Example JSON Response (switch to XML)

{
  "CategoryCounts": [
    {
      "CategoryId": "ABC",
      "Name": "ABC",
      "CategoryPath": "ABC",
      "ListingCount": 123
    },
    {
      "CategoryId": "ABC",
      "Name": "ABC",
      "CategoryPath": "ABC",
      "ListingCount": 123
    }
  ]
}