# Matkop - Mock ICA Product Catalog API

A mock API that mimics the ICA Sweden grocery store product catalog for development and testing.

## Authentication

Use the hardcoded token for all requests:

```
Authorization: Bearer matkop-dev-token
```

## Quick Start

```bash
# List products
curl -H "Authorization: Bearer matkop-dev-token" \
  "https://matkop.devblanket.com/stores/1004394/api/v5/products?limit=10"

# Search products
curl -H "Authorization: Bearer matkop-dev-token" \
  "https://matkop.devblanket.com/stores/1004394/api/v5/products/search?term=milk"

# Get categories
curl -H "Authorization: Bearer matkop-dev-token" \
  "https://matkop.devblanket.com/stores/1004394/api/v5/categories"
```

## Endpoints

| Method | Path | Description |
|--------|------|-------------|
| GET | `/api/v5/stores` | List all stores |
| GET | `/api/v5/stores/{storeId}` | Get store details |
| GET | `/stores/{storeId}/api/v5/categories` | List categories |
| GET | `/stores/{storeId}/api/v5/products` | List products |
| GET | `/stores/{storeId}/api/v5/products/search?term=X` | Search products |
| GET | `/stores/{storeId}/api/v5/products/{id}` | Get single product |

### Query Parameters

- `limit` - Results per page (default: 50, max: 100)
- `offset` - Pagination offset
- `term` - Search term (for search endpoint)
- `categoryId` - Filter by category

### Store IDs

Use any of: `1004394`, `1003456`, `1002789`, `1001234`, `1005678`

## Data

- **200 products** across 8 categories (dairy, bread, meat, produce, beverages, frozen, pantry, hygiene)
- **5 stores** in the Stockholm area
- Swedish grocery products with prices in SEK

## OpenAPI Specification

Full schema: [`/openapi.json`](./openapi.json)

## Purpose

Mock API for developing integrations before having real ICA API access. When you get real access, swap the base URL and auth - your code stays the same.
