MENU

Consumer API - Retailer API

Sometimes consumers (aka retailers when you are the wholesaler) ask if they can have API access to your products so that it is easier for them to update their own systems. Yes that is possible. 

Using the standard URLs for product and category pages, and changing the "accept" header to "application/json" they will get a copy of the product JSON schema, (or products in the category)

This concept is the same as how search engines and AI assistants read your web pages, and uses the same data format as them.

The schema defintion of product is the open source schema, as explained here: https://schema.org/Product

We only provide public facing elements in our schemas. Please contact us if you require customised schema elements to support your customer needs. Development fees will apply

Get Product Example

GET: https://demo.cms-tool.net/product/707048
(Accept: application/json)

{
  "offers": {
    "seller": {
      "@id": "https://demo.cms-tool.net#organization"
    },
    "priceValidUntil": "2027-05-02T16:50:55+1200",
    "priceCurrency": "NZD",
    "@type": "Offer",
    "price": "63.25",
    "availability": "https://schema.org/InStock",
    "url": "https://demo.cms-tool.net/product/707048",
    "itemCondition": "https://schema.org/NewCondition"
  },
  "image": "https://demo.cms-tool.net/images/294904/apple.jpg",
  "@type": "Product",
  "name": "Example Apple",
  "description": "This example demonstrates what a typical listing might look like. ",
  "mpn": "707048",
  "category": "Example Category A",
  "@context": "https://schema.org",
  "brand": {
    "@type": "Brand",
    "name": "The Super Demo WebSite"
  },
  "url": "https://demo.cms-tool.net/product/707048"
}

Member Only Pricing / Authentication

If your customer/retailers get special trade pricing from you, then they will get their member specific pricing. They just need to authenticate first

Best method to authenticate is to mimic our login page. Disregard any responses designed for humans, but retrieve the SECURITY_ID so that you can use if for subsequent requests

POST: https://demo.cms-tool.net/page/
enctype="multipart/form-data"
loginEmail=abc@myname.nz&loginHash=password 

$SessionID = response.getHeader("SECURITY_ID");

Then continue to get the pages you want, providing that same SECURITY_ID in all your requests. 

GET: https://demo.cms-tool.net/product/707048
Set Headers: SECURITY_ID=$SessionID  
Accept=application/json

Do not attempt a fresh login on every request, as this will cause you to be locked out for a period of time.  

When finished, it might be a good idea to logout.

GET: https://demo.cms-tool.net/page?memberLogout
Set Header: SECURITY_ID=$SessionID

Placing Orders

Coming soon will be the ability to place orders.