Hartley & Webb
Developer API
A realistic retail API for a fictional British department store. Built for AI agent demos, integration testing, and prototyping customer service workflows.
Authentication
This API is open — no API keys or authentication headers are required. All endpoints are publicly accessible and intended for demo use.
Customers
Look up customer profiles by phone number, email, or account number. Returns loyalty tier, address, and contact details.
Find a customer by phone number, email address, or account number. Pass one query parameter. Phone numbers are normalised — spaces, dashes, and +44 prefix are all handled.
| Parameter | Type | Description | Example |
|---|---|---|---|
| phone optional | string | UK mobile or landline number | 07734521893 |
| email optional | string | Email address (case insensitive) | sarah.mitchell@gmail.com |
| account optional | string | Hartley & Webb account number | HW-100234 |
GET /api/customers?phone=07734521893
{
"found": true,
"customer": {
"id": "cust-001",
"account_number": "HW-100234",
"first_name": "Sarah",
"last_name": "Mitchell",
"email": "sarah.mitchell@gmail.com",
"phone": "07734 521893",
"address_line1": "45 Maple Road",
"city": "Bristol",
"postcode": "BS1 2AB",
"loyalty_points": 4820,
"tier": "gold",
"member_since": "2019-03-14"
}
}
{
"found": false,
"customer": null
}
Returns a single customer by their internal ID. Use this after a lookup to fetch the full profile.
| Parameter | Type | Description |
|---|---|---|
| id | string | Internal customer ID — e.g. cust-001 |
GET /api/customers/cust-001
Returns all orders placed by a customer, ordered most recent first, including a summary of the customer profile.
GET /api/customers/cust-001/orders
{
"customer": {
"id": "cust-001",
"first_name": "Sarah",
"last_name": "Mitchell",
"account_number": "HW-100234"
},
"orders": [
{
"id": "HW-ORD-002",
"status": "dispatched",
"total_amount": 429.00,
"delivery_method": "standard",
"tracking_number": "HW-TRK-88291183",
"created_at": "2026-04-05 11:30:00"
}
],
"total_orders": 3
}
Orders
Retrieve order details including all line items, delivery status, and tracking information.
Returns a single order with all line items. Order IDs follow the format HW-ORD-001.
| Status | Meaning |
|---|---|
| pending | Order received, not yet processed |
| processing | Being picked and packed |
| dispatched | Shipped — tracking number available |
| delivered | Confirmed delivered |
| returned | Customer returned the order |
| cancelled | Order was cancelled |
GET /api/orders/HW-ORD-001
{
"order": {
"id": "HW-ORD-001",
"customer_id": "cust-001",
"status": "delivered",
"total_amount": 1628.00,
"delivery_address": "45 Maple Road, Bristol, BS1 2AB",
"delivery_method": "express",
"tracking_number": "HW-TRK-88291047",
"created_at": "2026-03-01 09:15:00",
"updated_at": "2026-03-04 14:22:00",
"items": [
{
"product_id": "HW-E001",
"product_name": "Samsung 65\" QLED 4K Smart TV",
"quantity": 1,
"unit_price": 1299.00
},
{
"product_id": "HW-E002",
"product_name": "Sony WH-1000XM5 Wireless Headphones",
"quantity": 1,
"unit_price": 329.00
}
]
}
}
Products
Browse and search across 35 products in 10 departments. Filter by department slug or free-text search across name, description, and brand.
Returns all products. Filter using search or department query parameters, or combine both.
| Parameter | Type | Description |
|---|---|---|
| search optional | string | Full-text search across name, description, brand. Try: dyson, lego, coffee |
| department optional | string | Department slug — see departments for full list |
GET /api/products?department=electricals
GET /api/products?search=coffee
GET /api/products?department=beauty&search=elemis
{
"products": [
{
"id": "HW-E003",
"sku": "SKU-E003",
"name": "De'Longhi Magnifica Evo Coffee Machine",
"description": "Bean-to-cup coffee machine with LatteCrema system.",
"department_id": 1,
"department_name": "Electricals",
"brand": "De'Longhi",
"price": 649.00
}
],
"count": 1
}
Returns a single product by ID. Product IDs follow the pattern HW-E001 (Electricals), HW-H001 (Home), HW-WF001 (Women's Fashion), etc.
GET /api/products/HW-E005
Inventory
Check real-time stock levels for any product. Returns status label, exact stock count, and warehouse location.
Returns inventory status for a product. Stock statuses: in_stock (5+), low_stock (1–4), out_of_stock (0).
GET /api/inventory/HW-E004
{
"inventory": {
"product_id": "HW-E004",
"product_name": "Dyson V15 Detect Cordless Vacuum",
"stock_level": 0,
"in_stock": false,
"status": "out_of_stock",
"status_label": "Out of stock",
"price": 649.00
}
}
Departments
Returns all 10 departments with their slugs, used for filtering products.
{
"departments": [
{ "id": 1, "name": "Electricals", "slug": "electricals" },
{ "id": 2, "name": "Home & Furniture", "slug": "home-furniture" },
{ "id": 3, "name": "Women's Fashion", "slug": "womens-fashion" },
{ "id": 4, "name": "Men's Fashion", "slug": "mens-fashion" },
{ "id": 5, "name": "Children's", "slug": "childrens" },
{ "id": 6, "name": "Beauty & Fragrance", "slug": "beauty" },
{ "id": 7, "name": "Garden", "slug": "garden" },
{ "id": 8, "name": "Toys & Games", "slug": "toys" },
{ "id": 9, "name": "Sports & Leisure", "slug": "sports" },
{ "id": 10,"name": "Food & Beverage", "slug": "food" }
]
}
Demo customers
Twelve fictional UK customers across Gold, Silver, and Standard loyalty tiers. Use any of these to test customer lookup and order history endpoints.
| Name | Account | Phone | Tier | Notable |
|---|---|---|---|---|
| Sarah Mitchell | HW-100234 | 07734 521893 | Gold | Has a returned order |
| James Thornton | HW-100235 | 07891 234567 | Silver | Order in processing |
| Emma Clarke | HW-100236 | 07654 321098 | Standard | — |
| David Patel | HW-100237 | 07712 345678 | Gold | High spender |
| Charlotte Hughes | HW-100238 | 07823 456789 | Standard | Has a cancelled order |
| Michael Bennett | HW-100239 | 07934 567890 | Silver | Click & collect order |
| Sophie Williams | HW-100240 | 07845 678901 | Standard | — |
| Robert Davies | HW-100241 | 07756 789012 | Gold | Order currently processing |
| Olivia Johnson | HW-100242 | 07867 890123 | Standard | Has a returned order |
| Thomas Wilson | HW-100243 | 07978 901234 | Silver | Order placed today |
| Isabella Moore | HW-100244 | 07689 012345 | Standard | New customer |
| William Taylor | HW-100245 | 07590 123456 | Gold | 9,870 loyalty points |
Demo scenarios
Pre-built scenarios for testing AI agent conversations. Each is designed to exercise a different part of the API.
HW-ORD-002 is dispatched with tracking HW-TRK-88291183. Look up by phone 07734 521893.HW-ORD-018 (Phase Eight dress). Phone 07867 890123.HW-E004 (Dyson V15 Detect) — currently out of stock. Good for testing out-of-stock messaging.HW-ORD-013 was cancelled (garden furniture set, £799). Phone 07823 456789.HW-100245.07689 012345.HW-ORD-007 was click & collect (Ted Baker jacket + Paul Smith shirt). Phone 07934 567890.