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.

Query String parameters

sku String (optional)

The SKU used to get listing IDs.

Returns

<ProductMappings>

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

TotalCount Integer

The total number of results in the collection. Can be larger than the number of returned results.

Page Integer

The index of the current page of results (starts at 1).

PageSize Integer

The number of results in the current page.

List Collection of <ProductMapping> or null

A list of the results in the current page.

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": [
    {
    },
    {
    }
  ]
}