# Pricing API Quickstart import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; By the end of this guide, you'll have retrieved live pricing data for SKUs from the Pricing API. ## Prerequisites - Authentication set up — see [Getting Credentials][getting-credentials] and [Authenticating Your Requests][authenticating-requests] ## Make your first call `BatchGetPricing` (`POST /pricing/v1/pricing/get`) retrieves current price, MSRP, and active status for one or more SKUs. It's the right starting point: it requires no prior setup beyond having SKUs in your catalog, and gives you an immediate view of your live pricing state. ```python # get_authenticated_session() is provided in docs/snippets/auth.mdx — see Authenticating Your Requests session = get_authenticated_session() response = session.post( "https://noon-api-gateway.noon.partners/pricing/v1/pricing/get", json={ "items": [ {"partner_sku": "MY-SKU-001", "country_code": "ae"}, {"partner_sku": "MY-SKU-002", "country_code": "ae"}, {"partner_sku": "MY-SKU-001", "country_code": "sa"}, ] }, headers={"User-Agent": "MyPricingSync/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.post( "https://noon-api-gateway.noon.partners/pricing/v1/pricing/get", { items: [ { partner_sku: "MY-SKU-001", country_code: "ae" }, { partner_sku: "MY-SKU-002", country_code: "ae" }, { partner_sku: "MY-SKU-001", country_code: "sa" }, ], }, { headers: { "Content-Type": "application/json", "User-Agent": "MyPricingSync/1.0.0", }, } ); const result = response.data; ``` Valid values for `country_code`: `"ae"`, `"sa"`, `"eg"`. **Response:** ```json { "items": [ { "partner_sku": "MY-SKU-001", "country_code": "ae", "status": { "status_id": 0, "status_code": "OK", "message": "" }, "price": 149.99, "msrp": 199.99, "is_active": true }, { "partner_sku": "MY-SKU-002", "country_code": "ae", "status": { "status_id": 0, "status_code": "OK", "message": "" }, "price": 89.00, "msrp": null, "is_active": true }, { "partner_sku": "MY-SKU-001", "country_code": "sa", "status": { "status_id": 5, "status_code": "NOT_FOUND", "message": "Pricing not configured for this SKU and country" }, "price": null, "msrp": null, "is_active": null } ] } ``` ## What you got back Each item in the response corresponds to a `partner_sku` + `country_code` pair from your request. `price` is the current selling price; `msrp` is the manufacturer's suggested retail price (`null` if not set). `is_active` indicates whether the SKU is currently active for sale in that country. The third item returned `NOT_FOUND` — noon has no pricing record for `MY-SKU-001` in SA. Use `BatchUpsertPricing` to create one. ## Checking for errors The Pricing API returns errors at two levels: - **Non-2xx HTTP response** — the entire request failed (authentication, authorization, or malformed payload). - **Per-item error within a 200 response** — the request succeeded but one or more items failed. Always check the `status` on each entry in `items`, even when the HTTP status is 200; a `status_code` other than `OK` means that item did not succeed. A single request can return a mix of successes and failures. HTTP 200 does not mean all items succeeded. ## Where to go next - [BatchUpsertPricing Reference][upsert-pricing-noon] — create or update price, MSRP, and active status for your SKUs - [BatchGetPricing Reference][get-pricing-noon] — full request and response schema for this call