# Offer API Quickstart import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; By the end of this guide, you'll have retrieved the live status, price, and stock for a SKU from the Offer API. ## Prerequisites - Authentication set up — see [Getting Credentials][getting-credentials] and [Authenticating Your Requests][authenticating-requests] ## Make your first call `GetProductOffers` (`GET /offer/v1/product/{partner_sku}`) retrieves all offer records for a partner SKU — one per country where you sell. It requires no prior domain-specific setup, making it the right starting point. ```python # get_authenticated_session() is provided in docs/snippets/auth.mdx — see Authenticating Your Requests session = get_authenticated_session() response = session.get( "https://noon-api-gateway.noon.partners/offer/v1/product/MYSKU-001", headers={"User-Agent": "MyApp/1.0.0"}, timeout=30, ) response.raise_for_status() result = response.json() ``` ```javascript // getAuthenticatedClient() is provided in docs/snippets/auth.mdx — see Authenticating Your Requests const client = await getAuthenticatedClient(); const response = await client.fetch( "https://noon-api-gateway.noon.partners/offer/v1/product/MYSKU-001", { headers: { "User-Agent": "MyApp/1.0.0" } } ); if (!response.ok) throw new Error(`Request failed: ${response.status}`); const result = await response.json(); ``` Replace `MYSKU-001` with a partner SKU from your catalog. **Response:** ```json { "partner_sku": "MYSKU-001", "sku": "Z1234567890123", "title": "Premium Wireless Headphones", "brand": "SoundPlus", "offers": [ { "offer_code": "AE-NOON-MYSKU-001", "country_code": "ae", "business_model": "noon", "price": { "amount": 149.99, "currency": "AED" }, "is_active": true, "active_net_stock": 25, "live_status": true, "offer_issues": [] }, { "offer_code": "SA-NOON-MYSKU-001", "country_code": "sa", "business_model": "noon", "price": null, "is_active": true, "active_net_stock": 0, "live_status": false, "offer_issues": [ { "reason": "Price missing", "subreason": "No active price", "description": "No price has been configured for this offer in this country." } ] } ] } ``` Valid values for `country_code`: `"ae"`, `"sa"`, `"eg"`. `business_model` is currently always `"noon"` — the only business model the Offer API supports. See the [Offer API Overview][offer-intro] for more on business models. In `offer_issues`, `reason` and `subreason` are human-readable text describing the blocking issue, and `description` gives a fuller explanation. They are descriptive text, not a fixed set of codes, so treat them as display strings rather than values to switch on. ## What you got back The `offers` array contains one entry per country where you sell. The first offer (`ae`) is live: `is_active` is `true`, `live_status` is `true`, and `offer_issues` is empty. The second offer (`sa`) is not live despite being active — `live_status` is `false` because `offer_issues` contains a blocking issue. When `live_status` is `false`, `offer_issues` always explains why. `price` is nullable. If no price is configured for a country-level offer, `price` will be `null` — always check before accessing `price.amount` or `price.currency`. ## Checking for errors A failed request returns a standard error envelope (`rpcStatus`) with four fields: `status_id` (a numeric identifier), `status_code` (a string code), `message` (a human-readable description), and `details` (an array of additional context). ```json { "status_id": 5, "status_code": "NOT_FOUND", "message": "No offer found for the given partner_sku.", "details": [] } ``` | HTTP status | What it means | What to do | |---|---|---| | `401` | Missing or invalid authentication | Re-authenticate — see [Authenticating Your Requests][authenticating-requests] | | `404` | No offer exists for this `partner_sku` in your catalog | Confirm the SKU exists in your catalog in Seller Lab. Partner SKUs are scoped to your account (unique per `partner_sku` + partner), so a `404` only means you have no SKU by that identifier — not that it belongs to another partner | | `429` | Rate limit exceeded | Back off and retry with exponential backoff | ## Where to go next - [GetProductOffers API Reference][offer-api-get-offers] — full request and response schema - [Pricing API][pricing-intro] — set prices and activate offers per country - [UpdateStock][update-stock] — update stock quantities per warehouse - [Offer API Overview][offer-intro] — what the Offer API is and when to use it