You've created a product listing page (i.e. category or collection page) with your favorite CMS and now you want to display the price for each of the products. You have the SKU codes of the products you want to list.
A sample product listing page
To retrieve the price for each of the SKUs on the page, send a GET request to the /api/skusendpoint, filter it by code, and include the associated prices.
The following request retrieves the prices of the SKUs identified by a list of specific codes:
This API call doesn't return any detail about the availability of the SKUs because, for performance reasons, the inventory information is only returned when fetching a single SKU.
The image below shows the two main dynamic elements of the page (selling price and full price) and how each of these are mapped to a specific field of the price object.
A sample product listing page mapping
Available products and "Add to cart" button
To be sellable in a market, an SKU must have a price in the market's price list and at least one stock item in one of the market's stock locations, regardless of its quantity. This means that out-of-stock items are still considered sellable but they are not available and would return an error when trying to add them to the cart.
If you want to display the available products only and show an "Add to cart" button instead of a "View details" one, we recommend you to refine the above request with an additional filter to make sure that the returned SKUs have an available quantity.
The following request retrieves the prices of all the available SKUs: