How to display price and availability on a product page
You've created a product page with your favorite CMS and now you want to display the price and the availability of the selected product. You also need to implement the "add to cart" function on the related button.
A sample product page
To retrieve the price and availability of an SKU, send a GET request to the /api/skus/:id endpoint and include the associated prices.
The following request retrieves the price and the availability of the SKU identified by the "aBmNkPQRst" ID:
The image below shows the three main dynamic elements of the page (selling price, full price and inventory information) and how each of these are mapped to a specific field of the SKU or price objects.
A sample product page mapping
Getting the SKU ID from its code
If you have the SKU code and you want to retrieve the related ID, send a GET request to the /api/skus endpoint and filter it by code, taking care to request the ID field only.
The following request retrieves the ID of the SKU identified by the code "TSHIRTB5B5B5XL":