# Step 2: Set Up Products and Inventory import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import IfApp from '_core/components/IfApp.tsx'; This guide walks you through listing your products and pushing stock and pricing data so your items are ready to sell. By the end, your SKUs will have live stock quantities and prices in Seller Lab. ## Prerequisites - Warehouse setup complete — see [Warehouse Setup][fbpi/warehouse-setup] - API credentials and an active session — see [Authenticating Your Requests][authenticating-requests] ## Step 1 — Create Your Product Catalog Create products in one of two ways: - **Manually** — create your SKUs in Seller Lab by following the [Product Listing Guide][product-listing-guide] - **Via API** — use the Content API's `UpsertProduct` endpoint to submit products programmatically; see [Submit a Product][content-submit-product] Create products in one of two ways: - **Manually** — follow the [Product Listing Guide][namshi-product-listing-guide] - **Via API** — contact the Namshi Tech Team to get access to the product creation endpoint **You'll know this worked when** your PSKUs appear in Seller Lab with a confirmed SKU ID. --- ## Step 2 — Push Stock Quantities Call `UpdateStock` (`POST /stock/v1/stock-update`) to set available quantities for each SKU in your warehouse. Send one item per SKU per warehouse; you can batch multiple SKUs in a single request. ```python session = get_authenticated_session() response = session.post( "https://noon-api-gateway.noon.partners/stock/v1/stock-update", json={ "items": [ { "warehouse_code": "WH-NOON-001", "partner_sku": "MY-SKU-001", "qty": 50, "processing_time": "1d" } ] }, headers={"User-Agent": "MyApp/1.0.0"}, timeout=30, ) response.raise_for_status() result = response.json() ``` ```javascript const client = await getAuthenticatedClient(); const response = await client.post( "https://noon-api-gateway.noon.partners/stock/v1/stock-update", { items: [ { warehouse_code: "WH-NOON-001", partner_sku: "MY-SKU-001", qty: 50, processing_time: "1d" } ] }, { headers: { "Content-Type": "application/json", "User-Agent": "MyApp/1.0.0" } } ); ``` Key request fields: | Field | Type | Description | |---|---|---| | `warehouse_code` | string | Your integration warehouse code | | `partner_sku` | string | Your internal SKU identifier | | `qty` | integer | Available units. Set to `0` to mark as out of stock | | `processing_time` | string | Pick-and-pack time, e.g. `"1d"` for one day | **Response:** ```json { "items": [ { "warehouse_code": "WH-NOON-001", "partner_sku": "MY-SKU-001", "status": { "status_code": "OK", "message": "" } } ] } ``` **You'll know this worked when** every item in the response has `"status_code": "OK"`. This API can return errors inside a 200 response — check every item's `status.status_code` even when the HTTP status is 200. | Error | What it means | What to do | |---|---|---| | Item-level non-OK `status_code` | That SKU failed to update | Check `status.message` for the reason and retry that item | | HTTP 401 | Session expired | Re-authenticate and retry | For the full schema, see [UpdateStock][update-stock] and [GetStock][get-stock]. --- ## Step 3 — Set Prices Call `BatchUpsertPricing` (`POST /pricing/v1/pricing/upsert`) to set the price for each SKU per country. For the full schema, see [BatchUpsertPricing][upsert-pricing-noon]. Call `BatchUpsertLocalPricing` (`POST /pricing/v1/local/upsert`) to set the local price for each SKU per country. `is_active` is not available on this endpoint; use `qty: 0` in UpdateStock to remove a product from sale. For the full schema, see [BatchUpsertLocalPricing][upsert-pricing-namshi]. `country_code` accepts: `"ae"` (UAE), `"sa"` (Saudi Arabia), `"eg"` (Egypt). Set one entry per SKU per country. ```python session = get_authenticated_session() response = session.post( "https://noon-api-gateway.noon.partners/pricing/v1/pricing/upsert", json={ "items": [ { "partner_sku": "MY-SKU-001", "country_code": "ae", "price": 149.99, "msrp": 179.99, "is_active": True } ] }, headers={"User-Agent": "MyApp/1.0.0"}, timeout=30, ) response.raise_for_status() result = response.json() ``` ```javascript const client = await getAuthenticatedClient(); const response = await client.post( "https://noon-api-gateway.noon.partners/pricing/v1/pricing/upsert", { items: [ { partner_sku: "MY-SKU-001", country_code: "ae", price: 149.99, msrp: 179.99, is_active: true } ] }, { headers: { "Content-Type": "application/json", "User-Agent": "MyApp/1.0.0" } } ); ``` ```python session = get_authenticated_session() response = session.post( "https://noon-api-gateway.noon.partners/pricing/v1/local/upsert", json={ "items": [ { "partner_sku": "MY-SKU-001", "country_code": "ae", "price": 149.99, "msrp": 179.99 } ] }, headers={"User-Agent": "MyApp/1.0.0"}, timeout=30, ) response.raise_for_status() result = response.json() ``` ```javascript const client = await getAuthenticatedClient(); const response = await client.post( "https://noon-api-gateway.noon.partners/pricing/v1/local/upsert", { items: [ { partner_sku: "MY-SKU-001", country_code: "ae", price: 149.99, msrp: 179.99 } ] }, { headers: { "Content-Type": "application/json", "User-Agent": "MyApp/1.0.0" } } ); ``` Key request fields: | Field | Type | noon | namshi | Description | |---|---|---|---|---| | `partner_sku` | string | ✓ | ✓ | Your internal SKU identifier | | `country_code` | string | ✓ | ✓ | Target market: `"ae"`, `"sa"`, or `"eg"` | | `price` | number | ✓ | ✓ | Selling price in local currency | | `msrp` | number | ✓ | ✓ | Crossed-out price shown on the listing page | | `is_active` | boolean | ✓ | — | Set to `false` to delist the SKU without zeroing stock | **Response:** ```json { "items": [ { "partner_sku": "MY-SKU-001", "country_code": "ae", "status": { "status_code": "OK", "message": "" } } ] } ``` **You'll know this worked when** every item in the response has `"status_code": "OK"`. Check each item — this API can return errors inside a 200 response. For the noon pricing schema, see [BatchUpsertPricing][upsert-pricing-noon] and [BatchGetPricing][get-pricing-noon]. For the namshi pricing schema, see [BatchUpsertLocalPricing][upsert-pricing-namshi] and [BatchUpsertGlobalPricing][upsert-global-pricing-namshi]. --- ## Keeping Stock and Pricing Current Your integration must maintain accurate stock and pricing throughout the order lifecycle: - **Mark out of stock** — set `qty: 0` in UpdateStock when a SKU runs out. noon stops routing new orders for that SKU immediately. - **Restock** — push a new `qty` value when inventory is replenished. - **Delist a SKU (noon)** — set `is_active: false` in BatchUpsertPricing to remove the offer without clearing stock. Set back to `true` to relist. - **Delist a SKU (namshi)** — set `qty: 0` to stop sales for that SKU. :::warning Unacknowledged stock that runs out after an order is placed causes order **Kills**. Keep your stock sync frequent enough to avoid overselling. ::: --- ## Next Steps - [Managing Your Orders][fbpi/order-flow] — process orders end to end once your inventory is live - [UpdateStock API Reference][update-stock] — full schema for the stock update endpoint - [BatchUpsertPricing API Reference][upsert-pricing-noon] — full noon pricing schema[BatchUpsertPricing API Reference][upsert-pricing-namshi] — full namshi pricing schema