Website logo

Retrieve SKUs and stock levels

Retrieves a list of product codes and stock levels associated with the authenticated user's active listings. The results will return data from feeds and My Products.

Feeds and My Products are no longer supported via the Trade Me API; please use the Tradevine API instead. The list returned by this API will now always be empty.

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

<ProductMappings>

A list of product mappings for all the listings created in the last 24 hours

TotalCount Integer TotalCount
Page Integer Page
PageSize Integer PageSize
List Collection of <ProductMapping> or null InnerList

Examples

Returns all listings with SKU and stock level:
https://api.trademe.co.nz/v1/mytrademe/productmappings.xml

Returns all listings with the SKU 1234:
https://api.trademe.co.nz/v1/mytrademe/productmappings.xml?sku=1234

Returns the SKU of listings 294105146:
https://api.trademe.co.nz/v1/mytrademe/productmappings.xml?listing_id=294105146

Example XML Response (switch to JSON)

<ProductMappings xmlns="http://api.trademe.co.nz/v1">
  <TotalCount>123</TotalCount>
  <Page>123</Page>
  <PageSize>123</PageSize>
  <List>
    <ProductMapping />
    <ProductMapping />
  </List>
</ProductMappings>

Example JSON Response (switch to XML)

{
  "TotalCount": 123,
  "Page": 123,
  "PageSize": 123,
  "List": [
    {
    },
    {
    }
  ]
}