# Fetching products How Ritevo fetches products, prices and stock from wholesalers, how often, what happens to deleted products, several warehouses and price rules. Products come into Ritevo from integrations in the **Warehouses and wholesalers** category: we fetch them from wholesalers automatically, and you add them to your own warehouse yourself. You see them all in one place, with price and stock. > **Required integration:** You need an integration from the **Warehouses and wholesalers** category - for example [Hurtownia Karm](https://ritevo.com/en/docs/integrations/hurtownia-karm) or an [Own warehouse](https://ritevo.com/en/docs/integrations/own-warehouse). ## Where the products are All products are in the **Products** menu. The list shows the name, manufacturer, price, stock, SKU and the integration the product comes from. Stock is the sum of all the product's stock levels. You filter by integration, name, SKU, EAN, manufacturer, category, price, stock and whether the product is deleted. ## Where products come from - **Wholesaler** - we fetch products, prices and stock from the wholesaler's offer at the interval you set. - **Own warehouse** - you add products yourself with **Add product**, and enter price and stock in the product. ## How often we fetch products For each wholesaler you choose how often we fetch its offer in the **Sync interval** field on the integration page: - **Never** (API: "Never" = `NEVER`; value in `syncInterval`) - the offer is fetched only once, right after the integration is added. The default. - **LIVE** (API: "LIVE" = `LIVE`; value in `syncInterval`) - every hour. - **Every 2 hours** (API: "Every 2 hours" = `EVERY_2H`; value in `syncInterval`) - every two hours. - **Every 6 hours** (API: "Every 6 hours" = `EVERY_6H`; value in `syncInterval`) - every six hours. > **Good to know:** On every fetch we update products first, and prices and stock right after. An own warehouse fetches nothing - it changes only when you change something. ## What a product holds - **Basic data** - name, SKU, EAN and additional EANs, description, images, manufacturer, category, weight and dimensions. - **Price** - net amount, VAT rate and currency. Every product has one price. - **Stock** - the quantity in a given warehouse. A product can have several stock levels, for example the wholesaler's and your own. - **Status** - the **Active** and **Deleted** switches. > **Good to know:** Warehouse product prices are net. Price rules also work on the net price. All other prices in Ritevo, for example in orders, invoices and receipts, are gross. ## Several warehouses and wholesalers You can have many warehouse integrations at once, including several own warehouses. Every product belongs to one integration - the same SKU or EAN in two warehouses means two separate products that are not merged. You see which integration a product comes from in the **Integration** column and filter. ## When a product is deleted - **The product left the wholesaler** - on the next fetch we mark it as deleted, and its wholesaler stock drops to 0. If it comes back to the offer, it is active again on the following fetch. - **You delete a wholesaler product yourself** - the **Deleted** switch lasts only until the next fetch, when the wholesaler overwrites the product again. - **You delete a product from your own warehouse** - turn on **Deleted** in the product. You restore it by turning the switch off. - **In the list** - deleted products still show in the **Products** list. You hide them with the **Product deleted** filter. ## Changes to wholesaler products You can edit a wholesaler product, but on the next fetch the wholesaler overwrites the name, description, price, EAN, dimensions and other fields. Only stock levels you added yourself with **Add stock** stay. The wholesaler's stock levels go back to the supplier's values every time. > **Good to know:** A wholesaler product shows the **Product comes from an external supplier** warning. For a lasting price or stock change across the whole wholesaler, use transformation rules - described below. ## Price and stock rules Every warehouse integration page has **Transformation rules**: separate **Price rules** and **Stock rules**. They apply to every price and every stock level of that integration - fetched from the wholesaler and entered by you. Each rule has a **Value from** and **Value to** range, an **Operation** and an **Operand**. Operations: - **Multiplier** (API: "Multiplier" = `MULTIPLY`; value in `operation`) - multiplies the value by the operand, for example 1.3 adds a 30% margin. - **Add** (API: "Add" = `ADD`; value in `operation`) - adds the operand to the value. - **Subtract** (API: "Subtract" = `SUBTRACT`; value in `operation`) - subtracts the operand from the value. - **Set to** (API: "Set to" = `SET_TO`; value in `operation`) - replaces the value with the operand, for example sets stock to 0. Rules are checked in order from the top - the first one whose range matches the value is applied. Each list holds at most 20 rules, which you add with **Add rule**. > **Good to know:** Example: a price rule from 0 to 100 with the **Multiplier** operation and operand 1.5 raises cheap products by half, and the next one, from 100 to 100000 with operand 1.2, raises the more expensive ones by 20%. ## Products and orders - **Linking** - we do not link an order line to a product automatically. In the order details click **Link offer to product** and pick the product. The link stays for that offer in later orders from the same integration too. - **Packing assistant** - uses linked products and compares the scanned code with their EAN. A line without a link is marked **No warehouse link**. - **Stock** - a sale does not change stock in Ritevo: nothing is deducted or reserved. ## Deleting a warehouse integration Deleting the integration stops fetching, but its products, prices and stock levels stay in the **Products** list. After you restore the integration, fetching resumes at the next due time. ## What is not there yet - It does not merge the same products from different warehouses into one. - It does not import products from a file - you add products to your own warehouse in the app or through the API. - It does not deduct or reserve stock after a sale. - It does not send products to sales channels. ## Products through the API List: `GET /integrations/warehouses/products` (pages of up to 5000), one product: `GET /integrations/warehouses/products/{id}`. Writes are asynchronous (202) and take up to 1000 items per request: `PUT /integrations/warehouses/{integrationId}/products` (fields `externalId`, `sku`, `name`, `description`, `ean`, `additionalEans`, `images`, `manufacturer`, `category`, `weight`, `width`, `height`, `length`, `active`, `deleted`, `price`), `PUT .../products/prices` (`productId`, `amount`, `currency`, `vatRate`) and `PUT .../products/stocks` (`productId`, `externalId`, `warehouse`, `quantity`, `deleted`). A product with the same `externalId` in a given integration is updated instead of created. In responses `original` = `true` marks supplier data, `false` - changed by hand. Offer-to-product links: `GET` and `DELETE /integrations/warehouses/external-offer-assignments`; you create a link with `POST /orders/{orderId}/line-items/{lineItemId}/warehouse-link`. The current paths, fields, types and response codes are always in Swagger: https://api.ritevo.com/api/v1/api-docs. A wholesaler integration has `syncInterval` = `NEVER`, `LIVE` (every hour), `EVERY_2H` or `EVERY_6H`. `transformationRules` holds `priceRules` and `stockRules` - lists of up to 20 objects `valueFrom`, `valueTo`, `operation` (`MULTIPLY`, `ADD`, `SUBTRACT`, `SET_TO`) and `operand`. The first rule whose range matches wins. --- All help in one file: https://ritevo.com/llms-full.txt. Help map with links to every page: https://ritevo.com/llms.txt.