Developers
Pearl Cleaners & Alterations API
Public endpoints that let apps and AI agents read the published facts of Pearl Cleaners & Alterations (Vaughan · Hwy 7 & Jane) and send a callback request. No price list or turnaround time is published, so no endpoint returns one.
Authentication
Optional. Every endpoint works without an account, API key or token. Agents that prefer a bearer token can register anonymously and exchange the assertion for a one-hour access token. A token gives the same access as no token. If you send an invalid token you get a 401 with a WWW-Authenticate challenge.
curl -s https://pearlcleaners.ca/agent/identity -H 'content-type: application/json' -d '{"type":"anonymous"}'
curl -s https://pearlcleaners.ca/oauth2/token \
-d grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer \
-d assertion=IDENTITY_ASSERTION_FROM_ABOVEMetadata: oauth-protected-resource (RFC 9728) and oauth-authorization-server (RFC 8414, with an agent_auth block). Guide for agents: auth.md.
Endpoints
| Endpoint | What it does |
|---|---|
POST /mcp | Pearl Cleaners & Alterations MCP server (streamable HTTP, JSON-RPC). Tools: get_business_details, get_opening_hours, list_services, search_shop_info, get_offer_terms, request_callback. |
POST /mcp/docs | Docs MCP server. Tools: search_docs, fetch_doc. |
POST /ask | NLWeb v0.55 natural-language questions. JSON or server-sent events. |
POST /a2a | A2A JSON-RPC (message/send). Agent card at /.well-known/agent-card.json. |
GET /api/callback | Whether direct callback delivery is configured. |
POST /api/callback | Sends a callback request to the shop by email. Send only details the person asked you to share. |
POST /agent/identity | Optional anonymous agent registration. Returns a signed identity assertion. |
POST /oauth2/token | Exchanges the assertion (JWT-bearer grant) for an optional access token. POST /oauth2/revoke is also available. |
OpenAPI description: https://pearlcleaners.ca/openapi.json.
Example requests
List the MCP tools
curl -s https://pearlcleaners.ca/mcp \
-H 'content-type: application/json' \
-H 'accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Ask a question (NLWeb)
curl -s https://pearlcleaners.ca/ask \
-H 'content-type: application/json' \
-d '{"query":{"text":"Are you open on Saturday?"}}'Ask the A2A agent
curl -s https://pearlcleaners.ca/a2a \
-H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"message/send","params":{"message":{"role":"user","messageId":"m1","parts":[{"kind":"text","text":"Do you do alterations?"}]}}}'Request a callback
Example values only. Confirm the real name and phone number with the person first.
curl -s https://pearlcleaners.ca/api/callback \
-H 'content-type: application/json' \
-H 'Idempotency-Key: 6f1c2a9e-4b7d-4e21-9a3f-0c5d8e7b1a24' \
-d '{"name":"Sample Name","phone":"555-555-0100","service":"Dry cleaning","message":"Example request"}'Test mode (sandbox)
Add Pearl-Test-Mode: true (or ?test=true) to POST /api/callback. The request is fully validated and answered with {"ok":true,"test":true,"delivered":false}, and nothing is sent to the shop. All other endpoints are read-only.
A sandbox environment at https://pearlcleaners.ca/sandbox mirrors the API: /sandbox/api/callback, /sandbox/mcp, /sandbox/mcp/docs, /sandbox/ask and /sandbox/a2a. Every request there runs in test mode, and responses carry Pearl-Environment: sandbox.
curl -s https://pearlcleaners.ca/sandbox/api/callback \
-H 'content-type: application/json' \
-H 'Idempotency-Key: 0b6f7c1e-test-4c55-9d2a-5e8f3a1b7c90' \
-d '{"name":"Sample Name","phone":"555-555-0100"}'curl -s https://pearlcleaners.ca/api/callback \
-H 'content-type: application/json' \
-H 'Pearl-Test-Mode: true' \
-H 'Idempotency-Key: 0b6f7c1e-test-4c55-9d2a-5e8f3a1b7c90' \
-d '{"name":"Sample Name","phone":"555-555-0100"}'Web Bot Auth
The key directory at /.well-known/http-message-signatures-directory lists the Ed25519 key Pearl's server would sign its own automated requests with (HTTP Message Signatures), and the response is itself signed. Pearl's server does not crawl or call other sites today.
Versioning and deprecation
The API is version 1. Send the optional Pearl-Api-Version: 1 header; responses echo it. Breaking changes ship as a new version alongside the old one. A version being retired is marked deprecated: true in the OpenAPI document, and its responses carry Deprecation (RFC 9745) and Sunset (RFC 8594) headers at least 90 days before it is removed.
Rate limits: responses carry RateLimit-Policy and RateLimit headers. A 429 includes Retry-After.
Command line
The pearl-cleaners-mcp package also installs a pearl-cleaners command: npx -p pearl-cleaners-mcp pearl-cleaners hours (also services, contact, offer and ask "question").
Errors
400: invalid body; the error names the field.503from/api/callback: direct delivery is not configured. Give the person the phone number (437-914-9416) and email instead.