# /namshi/categories/products

`POST /api/namshi/categories/products`

Price: 20 credits

List Namshi products in a category (PLP) by category slug or URL, with the same rich filters and sorting as product search: brand, colour, price range, discount, delivery type, new arrivals, gender and category-specific size and attribute facets. Returns product cards with product title, brand, normal and sale price, discount, currency, images, stock, rating and colour variants.

## How to use it

List products in a Namshi category. Pass the category slug (e.g. women-clothing, men-shoes) or a category page URL as category. Each item has id (parentSku), sku, url, alias, product_title, brand, brand_code, normal_price, sale_price, discount_percent, deal_code, currency, image+images, videos, badges, stock_status/stock_label, is_rocket/is_global/is_outlet, has_variant, max_qty, listing_type, rating, review_count and grouped_products. Filter with brand_code, colour_family, discount_option, delivery_type, new_arrivals, price_min/price_max, selected_gender and the generic filters map; sort with sort_by and sort_dir. Use the returned id with the Namshi product endpoint for full details.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `region` (string) — Marketplace region (drives currency, stock and localisation) (default: "uae"; one of: "uae", "saudi", "kuwait", "qatar", "bahrain", "oman")
- `language` (string) — Content language (default: "en"; one of: "en", "ar")
- `count` (integer, required) — Max number of products to return (min: 1)
- `brand_code` (array) — Filter by brand codes (from the brands endpoint), e.g. nike, adidas (default: [])
- `colour_family` (array) — Filter by colour families (default: []; one of: "black", "white", "blue", "red", "green", "pink", "purple", "yellow", "beige", "brown", "grey", "silver", "gold", "orange", "multicolour", "metallic", "clear")
- `discount_option` (string, nullable) — Filter by discounted or full-price items (one of: "discounted", "full_price")
- `delivery_type` (string, nullable) — Filter by delivery type (one of: "standard", "global", "rocket")
- `new_arrivals` (boolean, nullable) — Keep only new arrivals when true
- `price_min` (number, nullable) — Minimum current price (min: 0)
- `price_max` (number, nullable) — Maximum current price (min: 0)
- `selected_gender` (string, nullable) — Restrict results to a gender department (one of: "women", "men")
- `sort_by` (string, nullable) — Sort field (one of: "recommended", "best_seller", "discount_percent", "arrival_date", "current_price")
- `sort_dir` (string, nullable) — Sort direction (one of: "asc", "desc")
- `filters` (object) — Additional category-specific facets as raw facet_code -> value(s) pairs (comma-separate multiple values), e.g. namshi_pattern -> floral or size_v2_clothing__alpha -> S,M. Available facet codes vary per category. (default: {})
  - `*` (string)
- `category` (string, required) — Category slug (or category page URL), e.g. women-clothing, men-shoes, women-beauty (examples: "women-clothing", "men-shoes"; minLength: 1)

## Response

### 200 — Successful Response

- `@type` (string) (default: "NamshiProductCard")
- `id` (string, required)
- `sku` (string, nullable)
- `url` (string, nullable)
- `alias` (string, nullable)
- `product_title` (string, nullable)
- `brand` (string, nullable)
- `brand_code` (string, nullable)
- `normal_price` (number, nullable)
- `sale_price` (number, nullable)
- `discount_percent` (integer, nullable)
- `deal_code` (string, nullable)
- `currency` (string, nullable)
- `image` (string, nullable)
- `images` (array) (default: [])
- `videos` (array) (default: [])
- `badges` (array) (default: [])
- `stock_status` (string, nullable)
- `stock_label` (string, nullable)
- `is_rocket` (boolean, nullable)
- `is_global` (boolean, nullable)
- `is_outlet` (boolean, nullable)
- `has_variant` (boolean, nullable)
- `max_qty` (integer, nullable)
- `listing_type` (string, nullable)
- `rating` (number, nullable)
- `review_count` (integer, nullable)
- `grouped_products` (array) (default: [])
  - `@type` (string) (default: "NamshiCardVariant")
  - `id` (string, required)
  - `sku` (string, nullable)
  - `url` (string, nullable)
  - `alias` (string, nullable)
  - `product_title` (string, nullable)
  - `brand` (string, nullable)
  - `group_value` (string, nullable)
  - `image` (string, nullable)
  - `normal_price` (number, nullable)
  - `sale_price` (number, nullable)
  - `discount_percent` (integer, nullable)

## Errors

### 422 — Validation Error

The request body did not validate

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

Category not found (well-formed but nonexistent category slug)

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

