# PhotoPrint API and agent documentation

Official developer documentation for **PhotoPrint (פוטו פרינט)**, an Israeli online shop for photo prints and Jewish art on canvas, tempered glass and acrylic blocks, at https://photo-print.co.il/. Every interface below is public, free, read-only and needs no API key. Agents cannot order, manage carts or pay; send shoppers to the product page to buy.

## Quick start

```bash
curl 'https://photo-print.co.il/wp-json/wc/store/v1/products?search=%D7%91%D7%A8%D7%9B%D7%94&per_page=5'
curl 'https://photo-print.co.il/ask?query=%D7%91%D7%A8%D7%9B%D7%AA%20%D7%94%D7%91%D7%99%D7%AA'
curl -X POST https://photo-print.co.il/mcp -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```

## REST API (WooCommerce Store API)

- OpenAPI 3.1 spec: https://photo-print.co.il/openapi.json
- `GET /wp-json/wc/store/v1/products` with params `search`, `category`, `slug`, `per_page` (up to 100), `page`, `orderby`, `order`, `min_price`, `max_price`
- `GET /wp-json/wc/store/v1/products/{id}`
- `GET /wp-json/wc/store/v1/products/categories`
- Prices are strings in minor units; divide by 10^`currency_minor_unit`.
- Errors are JSON: `{"code":"woocommerce_rest_product_invalid_id","message":"...","data":{"status":404}}`

## NLWeb-style search

`GET https://photo-print.co.il/ask?query=<keywords>` returns `{query, results:[{url,name,site,score,description,schema_object}]}`

## MCP server

- Endpoint: `https://photo-print.co.il/mcp` (Streamable HTTP, JSON-RPC 2.0, JSON responses, stateless)
- Server card: https://photo-print.co.il/.well-known/mcp/server-card.json
- Tools: `search_products`, `get_product`, `list_categories`, `get_store_info` (all read-only)

## A2A agent

- Agent card: https://photo-print.co.il/.well-known/agent-card.json
- Endpoint: `POST https://photo-print.co.il/a2a`, method `message/send` with a text part

## WebMCP

Storefront pages register the same read-only tools with `navigator.modelContext` for in-browser agents (not on cart, checkout or account pages).

## Content for language models

- https://photo-print.co.il/llms.txt and https://photo-print.co.il/llms-full.txt
- Homepage as Markdown: `Accept: text/markdown`; pages and posts as Markdown: append `.md`
- Agent skills: https://photo-print.co.il/.well-known/agent-skills/index.json
- Agent catalog (ARD): https://photo-print.co.il/.well-known/ai-catalog.json
- API catalog (RFC 9727): https://photo-print.co.il/.well-known/api-catalog

## Authentication

None needed. Every endpoint is anonymous and read-only; do not send cookies or an Authorization header. Details: https://photo-print.co.il/auth.md

## Example responses

`GET /wp-json/wc/store/v1/products?per_page=1` returns an array of products:

```json
[{"id":123,"name":"...","permalink":"https://photo-print.co.il/product/...","is_in_stock":true,"prices":{"price":"24900","regular_price":"24900","currency_code":"ILS","currency_minor_unit":2},"categories":[{"id":15,"name":"...","slug":"..."}]}]
```

MCP `tools/call` for `search_products`:

```bash
curl -X POST https://photo-print.co.il/mcp -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"search_products","arguments":{"query":"canvas","limit":5}}}'
```

### JavaScript

```js
const r = await fetch('https://photo-print.co.il/wp-json/wc/store/v1/products?search=canvas&per_page=5');
const products = await r.json();
console.log(r.headers.get('RateLimit'), products.map(p => p.name));
```

### Python

```python
import requests
r = requests.get('https://photo-print.co.il/ask', params={'query': 'canvas'}, timeout=20)
r.raise_for_status()
for item in r.json()['results']:
    print(item['name'], item['url'])
```

## Rate limits

The quota is 60 requests per 60 seconds per client. Responses announce it with the IETF RateLimit headers:

```
RateLimit-Policy: "default";q=60;w=60
RateLimit: "default";r=60;t=60
X-RateLimit-Limit: 60
```

If you exceed it you get HTTP 429 with a `Retry-After` header (seconds). Back off for that long, then retry with exponential backoff. Cache product and category responses for at least 10 minutes.

## Errors

`/ask` returns RFC 9457 problem details with `Content-Type: application/problem+json`:

```json
{"type":"https://photo-print.co.il/developers#error-missing_query","title":"Missing query","status":400,"detail":"Pass ?query=<keywords>","code":"missing_query"}
```

Store API routes return the WooCommerce error object `{code, message, data:{status}}`. MCP and A2A return JSON-RPC 2.0 error objects (`-32601` unknown method, `-32602` invalid params). Status codes: 400 bad input, 404 unknown product or path, 405 wrong method, 429 rate limited, 5xx temporary server error (retry later).

| Code | Meaning |
|---|---|
| `missing_query` | `/ask` called without `query` |
| `search_failed` | Search backend error, retry later |
| `woocommerce_rest_product_invalid_id` | Product id does not exist |
| `rest_no_route` | Unknown REST path |

## Versioning and deprecation

The API is versioned in the path (`/wc/store/v1`) and every response carries `API-Version: 1`. Additive changes (new fields, new tools) can ship at any time, so ignore fields you do not know. Breaking changes ship only as a new path version. A version being retired is announced at least 90 days ahead: its responses then carry a `Deprecation` header (RFC 9745) and a `Sunset` header (RFC 8594) with the removal date, plus `Link: <https://photo-print.co.il/developers#versioning-and-deprecation>; rel="deprecation"`, and the change is listed in the changelog below.

## Changelog

- 2026-11-23: RateLimit headers, problem+json errors on `/ask`, versioning policy.
- 2026-11-22: OpenAPI 3.1 spec, MCP server, A2A agent card, `/ask`, agent skills, ai-catalog.
- No version is deprecated at this time.

## Testing and sandbox

All endpoints are read-only, so you can test them directly against production without side effects. There is no separate sandbox.

## Usage policy

Stay within the rate limit; identify your client in User-Agent; cache responses. Content signals: see https://photo-print.co.il/robots.txt.

## Support

Report API problems or ask for changes through the contact details below. Status of the site: https://photo-print.co.il/healthz.txt

## Contact

Phone or WhatsApp 054-6272421 (+972546272421) or https://photo-print.co.il/contact-us/. There is no public email address.
