Getting your page ready…
Requests & replies
What Wayo sends and what your system returns.
What Wayo sends
Choose a connection that matches your existing endpoint. These formats also work with the SDK.
Chat API · POST JSON
{"message":"Do you have a city bike in stock?"}Webhook · POST JSON
{"from":"wayo","text":"Do you have a city bike in stock?"}REST API · GET
https://your-business.example/search?q=Do%20you%20have%20a%20city%20bike%3FDifferent parameter names, methods or nested response fields? Use Custom HTTP.
Direct API and SDK replies are different
| Connection method | What you return |
|---|---|
| Existing API, connected directly | JSON. Wayo looks for text in common fields such as reply, answer, result, text or message. If none match, it uses the JSON itself. |
| Python or JavaScript SDK handler | Plain text, or an object with a nonempty reply string. The SDK wraps plain text as JSON for you. |
Existing REST API · valid JSON response
{"answer":"We have 4 city bikes in stock."}SDK handler · return this object, or just its reply text
{"reply":"We have 4 city bikes in stock."}You do not need Custom HTTP merely because your API calls the field answer.
Add stock and prices when useful
Reply with an optional structured offer
{
"reply": "The city bike is sold out.",
"offers": [
{
"title": "City bike",
"price": 180,
"currency": "USD",
"per": "item",
"available": false
}
]
}Use numbers for prices and a currency code such as USD. Only include facts from your system. For unrelated questions, return a reply with can_help: false. If the lookup fails, report failure rather than guessing stock.
Sessions and fresh data
Inbox conversations can include an opaque session value. Use it to keep conversation context; it is not a customer’s authenticated identity. SDK handlers receive it as their optional second argument.
Optional max_age tells Wayo how many whole seconds a reply can be reused for that asker. Omit it when stock or prices change frequently. A2A returns text or data parts through its own protocol.