YOM Docs

Stock

Once your Products are created, you can indicate their available Stock.

The Stock entity lets you manage the availability of Products across the different Distribution Centers. The fields associated with this entity include the name of the Distribution Center, the unique identifier of the Product, and the quantity available in Stock.

Why and how is stock used?

Stock is used in the sales app. Its main purpose is to give the seller the information needed to know whether a product is at risk of running out of stock when sold. Stock is modeled so that it is associated with a distribution center, and there is also an association between commerces and distribution centers. In general, there are two cases: one in which each commerce has a single distribution center, or the case in which it has several distribution centers. This covers whether you want to see a single stock figure or the stock of several locations.

Stock has 4 important characteristics: a reference to a product, a reference to the distribution center, the name of the distribution center, and the stock quantity.

The stock configuration supports two cases. One in which a commerce has a single distribution center, which is shown directly on the product card inside the app. And the case in which a commerce has several distribution centers, which means that to see the stock you need to tap a view stock button that displays the list of stock levels for all associated distribution centers. In this case you can configure commerces to have all distribution centers associated without having to specify them explicitly.

Endpoint

GET /api/stock

FILE <fecha>_<hora>_stock.csv

Fields

Field Type Requirement Description Examples
productId 📝 Text 🟢 Required Unique identifier of the product. "SKU001"
distributionCenterId 📝 Text 🟢 Required Unique identifier of the Distribution Center.
Distribution Center "CD27"
distributionCenterName 📝 Text ⚪ Optional Name of the Distribution Center.
Distribution Center "Centro de Distribución Norte"
quantity 🔢 Number 🟢 Required Available quantity in stock. 150

Response

The Stock endpoint response provides a JSON with detailed information about the availability of Products across the different Distribution Centers.

Response example

{
  "productId": "SKU001",
  "distributionCenterId": "CD27",
  "distributionCenterName": "Centro de Distribución Norte",
  "quantity": 150
}

This structure lets you manage and query Stock availability in YOM efficiently.

Previous steps

<aside> <img src="/icons/arrow-left_gray.svg" alt="/icons/arrow-left_gray.svg" width="40px" />

</aside>