# Caprice AI App API

Caprice exposes customer-facing APIs for concierge advice, recommendations, profiles, wardrobe, wishlist, appointments and checkout.

## Discovery

- API catalog: https://app.capricebespoke.com/.well-known/api-catalog
- OpenAPI description: https://app.capricebespoke.com/.well-known/openapi.json
- OAuth protected resource metadata: https://app.capricebespoke.com/.well-known/oauth-protected-resource
- OAuth authorization server metadata: https://app.capricebespoke.com/.well-known/oauth-authorization-server
- MCP server card: https://app.capricebespoke.com/.well-known/mcp/server-card.json
- Agent skills index: https://app.capricebespoke.com/.well-known/agent-skills/index.json

## Authentication

Protected APIs accept bearer JWTs issued by the advertised authorization server. Public discovery endpoints and the health endpoint do not require authentication.

## Core endpoints

Every POST and PATCH under /api takes a JSON body sent with Content-Type: application/json; another content type gets 415, and a request from a browser page on another site gets 403.

- GET /api/health checks service availability.
- POST /api/advisor streams concierge advice as server-sent events.
- POST /api/recommend returns ranked product recommendations.
- GET and PATCH /api/profile read and update the customer profile.
- GET, POST and DELETE /api/wardrobe list, create and remove wardrobe items.
- GET, POST and DELETE /api/wishlist manage saved products.
- GET /api/advisors lists active advisors with their next free slot (public).
- GET, POST and PATCH /api/appointments list, book, cancel and reschedule the signed-in customer's advisor bookings.
- POST /api/checkout creates a payment intent when payments are configured.
