# Agentplace over HTTP

For agents without an MCP client. Read [SKILL.md](https://agentplace.crossup.ai/SKILL.md) first: the voice, the rules for links, prices and checkout, and how to use SalesPilot's `next[]` are the same.

Three doors over the same catalog, all without auth, CORS open:

1. **MCP over plain HTTP** (the same tools as SKILL.md): `POST https://agentplace.crossup.ai/mcp`.
2. **UCP REST**: `POST https://agentplace.crossup.ai/ucp/v1/catalog/search`, `/lookup` and `/product`, same bodies as the `catalog` argument of the tools, same `messages[]` and `next[]`.
3. **REST API v1** (OpenAPI 3.1 at https://agentplace.crossup.ai/openapi.json): `GET https://agentplace.crossup.ai/api/v1/products?q=…`.

## MCP over HTTP

Every call is one stateless JSON-RPC `POST`: no session, no `initialize` needed, no required order. Send `Accept: application/json, text/event-stream`. The body comes back as JSON or as one Server-Sent Events `data:` line with the same JSON.

```sh
agentplace_mcp() { # agentplace_mcp '<JSON-RPC body>'
  curl -sS -m 30 https://agentplace.crossup.ai/mcp \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json, text/event-stream' \
    -H 'MCP-Protocol-Version: 2025-06-18' \
    --data-binary "$1" | sed -n -e 's/^data: //p' -e t -e '/^{/p'
}

# The tools and their exact input schemas
agentplace_mcp '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

# Search, with SalesPilot's next[] in the answer
agentplace_mcp '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"search_catalog","arguments":{"catalog":{"query":"sérum vitamina c","pagination":{"limit":3}}}}}'

# A product with the shopper's options
agentplace_mcp '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"get_product","arguments":{"catalog":{"id":"<product GID>","selected":[{"name":"Talle","label":"M"}]}}}}'

# What SalesPilot adds to a cart
agentplace_mcp '{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"get_recommendations","arguments":{"moment":"cart","lines":[{"product":"<product GID>","quantity":1}]}}}'
```

HTTP 200 may carry a JSON-RPC `error` or a tool `result`. In a result, read `structuredContent` (the same JSON is in `content[0].text`) and check `isError`: `true` means the text says what went wrong and what to do. HTTP 429 means wait `Retry-After` seconds. Never put credentials in arguments: there are none to send.

## UCP REST

```sh
curl -sS -X POST https://agentplace.crossup.ai/ucp/v1/catalog/search -H 'Content-Type: application/json' \
  -d '{"query":"sábanas 2 plazas","filters":{"price":{"max":6000000},"available":true},"pagination":{"limit":5}}'

curl -sS -X POST https://agentplace.crossup.ai/ucp/v1/catalog/product -H 'Content-Type: application/json' \
  -d '{"id":"<product GID>","selected":[{"name":"Color","label":"Negro"}]}'
```

The answers follow the UCP 2026-08-25 catalog schemas and add `next[]` at the root. The UCP profile is at https://agentplace.crossup.ai/.well-known/ucp. Checkout is not a UCP capability here: carts are created on each store's checkout through `create_checkout` (MCP) or `POST https://agentplace.crossup.ai/api/v1/checkouts`, and the shopper pays there.

## REST API v1

```sh
curl -sS 'https://agentplace.crossup.ai/api/v1/products?q=protector%20solar&in_stock=true&per_page=5'
curl -sS 'https://agentplace.crossup.ai/api/v1/products/<store>/<id>'    # the product with its Storegraph neighborhood
curl -sS 'https://agentplace.crossup.ai/api/v1/stores'
```

Errors are `application/problem+json` with a `hint`. Rate limit: 120 requests per 60 s per client on the product endpoints, MCP and UCP.
