Availability Service Tutorials

How to specify availability, popularity, or stock level for a product

This tutorial describes how to specify availability, popularity, and stock level for a single product.
Information about a specific product's availability, popularity, and stock levels is stored inside the Availability object.Take a look at the relationships between the Availability object and other resources in the Emporix Digital Commerce Platform: Availability class diagram

Before you start

Make sure you created a product. For more information, check out How to add your first product.

Create the Availability object

To add availability-related information for a specific product, you need to send a request to the Creating a new availability for a product endpoint.
Loading...

Retrieve the availability information of a product

To check if a product's availability was added successfully, you need to send a request to the Retrieving a product's availability endpoint with the product's ID in the request body.
attention
You can also retrieve availability information for multiple products at once by sending a request to the Retrieving product availabilities for a site endpoint.
Loading...

How to calculate a product bundle's stock level

The Availability Service makes it possible to automatically calculate the stock level of a product bundle. The value is always equal to the lowest stock level of the bundled products.

attention

For a product bundle's availability to be calculated, all products in the bundle need to have their availability and stock levels specified. Otherwise, the bundle will be treated as unavailable.

Before you start

Make sure the following requirements are fulfilled:

  • You have already created all products that make up the bundle.
info

For instructions, check out How to add your first product.

  • You have already specified stock levels for all products that make up the bundle.
  • You have already created a product bundle.
info

Retrieve the product bundle's availability information

To find out what the stock level of a product bundle is, you need to send a request to the Retrieving a product's availability endpoint with the product bundle's ID in the path.
Loading...

The response includes both the availability information of the bundle as a whole, as well as the bundled products.