# Shoprite — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access product listings, specials, categories, and store information from Shoprite.co.za. Search products, browse departments, retrieve pricing and availability by store location, and compare prices across retailers.

**Category:** E-commerce | **Website:** [shoprite.co.za/](https://shoprite.co.za/) | **Docs:** [parse.bot/marketplace/27e77286-b2f4-4357-b50d-5eadfebe0687/shoprite-co-za-api](https://parse.bot/marketplace/27e77286-b2f4-4357-b50d-5eadfebe0687/shoprite-co-za-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-shoprite-co-za-api-27e77286/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### compare_prices

Compare prices for a product across multiple retailers. Returns pricing results from each available retailer for the given search term.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Product name to search and compare. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-shoprite-co-za-api-27e77286/compare_prices \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### get_all_departments

Retrieve all top-level product departments/categories available on the Shoprite website. Returns department IDs and names needed for browsing products by category via get_products_by_category.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-shoprite-co-za-api-27e77286/get_all_departments \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_all_specials

Retrieve current promotional/special products from the Shoprite specials page. Returns up to 20 products per page with real-time pricing, deal types, and availability. Products include bundle deals, price reductions, and multi-buy offers.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number (0-indexed). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-shoprite-co-za-api-27e77286/get_all_specials \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>"}'
```

### get_product_detail

Retrieve full details for a specific product by its product code/SKU. Returns name, description, pricing, and availability. Product codes can be obtained from search_products, get_all_specials, or get_products_by_category results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_code` | string | Yes | Product SKU/code (e.g. '10136301EA'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-shoprite-co-za-api-27e77286/get_product_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_code":"<string>"}'
```

### get_products_by_category

Retrieve products within a specific department/category by searching the product catalogue. Returns up to 20 products per page. Use category_id and category_name values from get_all_departments results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | Yes | Category ID from get_all_departments results (MongoDB ObjectId, e.g. '670437dc7a8738098af92e27'). |
| `category_name` | string | Yes | Category name from get_all_departments results (e.g. 'Bakery', 'Fruit & Vegetables'). |
| `page` | integer | No | Page number (0-indexed). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-shoprite-co-za-api-27e77286/get_products_by_category \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_id":"<string>","category_name":"<string>","page":"<integer>"}'
```

### get_store_locator

List all Shoprite stores from the store finder. Returns store details including name, address, phone number, GPS coordinates, and weekly opening hours. Useful for finding store IDs to pass to set_preferred_store.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-shoprite-co-za-api-27e77286/get_store_locator \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_products

Full-text search across the Shoprite product catalog. Returns up to 20 matching products per page with real-time pricing and availability. Matches against product names.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number (0-indexed). |
| `query` | string | Yes | Search query term. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-shoprite-co-za-api-27e77286/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```

### set_preferred_store

Set the preferred store for pricing and availability context. This affects which store's stock levels and prices appear in product results for subsequent requests within the same session. Store IDs can be obtained from get_store_locator.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `store_id` | string | Yes | Store ID from get_store_locator results (e.g. '7549'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-shoprite-co-za-api-27e77286/set_preferred_store \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"store_id":"<string>"}'
```
