# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/shoprite/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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/credits/shoprite/compare-prices \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/shoprite/get-all-departments \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/shoprite/get-all-specials \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/shoprite/get-product-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/shoprite/get-products-by-category \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/shoprite/get-store-locator \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/shoprite/search-products \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/shoprite/set-preferred-store \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"store_id":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.