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
Solution
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.
Example
The following request retrieves the prices of the SKUs identified by a list of specific codes:
On success, the API responds with a 200 OK status code, returning the four SKU objects with the prices included:
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. About that, please note that the above API call returns sellable products, but doesn't show any details about the availability of the SKUs because, for performance reasons, the inventory information is only returned when fetching a single SKU. Read this for more info on how to display just the available products.
Mapping
The image below shows the two main dynamic elements of the page (selling price and full price) and how each of these is mapped to a specific field of the price object.
A sample product listing page mapping
Additional notes
Available products and "Add to cart" button
Out-of-stock items are still considered sellable (i.e. they have a price and are associated with an existing stock item, only that the stock item quantity is equal to 0) 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 (i.e. they are associated with a stock item that has a quantity greater than 0).
The following request retrieves the prices of all the available SKUs:
On success, the API responds with a 200 OK status code, returning the SKU objects with the prices included (please note that the available products are only 3 out of the previous 4):