Request & response mapping
Exactly how repliyo builds the request to your API and reads the response: URL placeholders, JSONPath, errors and timeouts.
The request repliyo sends
repliyo takes your URL template, replaces each {placeholder} with the value it found in the customer's message, and calls the result with the method you chose.
GET https://shop.example.com/api/orders/48291
Authorization: Bearer <your token>- •Everything the customer said that matters travels in the URL. Whether you choose GET or POST, repliyo sends no request body, so design your endpoint to read from the path or query string.
- •Only one custom header is supported, set as a name and value on the endpoint. It is sent on every call.
- •If your template contains a placeholder repliyo has no value for, the URL is called as written, placeholder and all. Keep endpoints tolerant of that, or use the question types that supply the placeholders you use.
Placeholders by question type
| Question type | Placeholders you can use |
|---|---|
| Order status | {order_id} |
| Order list | {user_id} |
| Product info | {product_id} |
| Product search | {query} |
| Booking | {booking_date} {booking_time} {service_type} {booking_id} |
When your site has identified the visitor, {user_id}is also available in any endpoint's URL, filled with the ID from the signed token. Use it to return only that customer's records.
For product search, {query}is the customer's search terms joined into one string. If a customer names a product instead of giving its ID and you've only set up product search, repliyo falls back to searching by that name.
How repliyo reads your response
{
"order_id": "48291",
"status": "shipped",
"estimated_delivery": "2026-10-02",
"tracking_url": "https://carrier.example.com/track/48291"
}With a response path. Set a JSONPath such as $.status or $.data.messageand repliyo uses exactly that part. One plain value is used as it is; several matches become a short bulleted list (up to ten); no match gives the customer a “couldn't find any results” reply.
Without a response path. repliyo summarises the response. If your JSON wraps results under data, results, items, products or orders, it looks inside. For each record it prefers a readable field such as name, title, label, status or message, and shows up to three records.
Not JSON? If your API returns plain text, the first 500 characters are used.
For short factual questions — price, stock, status, delivery date — repliyo may use Claude to turn your response into a one-line answer instead of quoting the whole record. Return concise, well-named fields and you'll get better replies either way.
Field names that unlock richer replies
On Professional and above, repliyo can show order and product replies as structured cards. It recognises these field names in your JSON, so using them costs you nothing:
- •Orders: status, delivered_at, estimated_delivery, tracking_url or tracking_link
- •Products: name, title or label; product_id, id or sku; image_url, image or photo; cta_url, url or link
Errors and timeouts
- •Timeout: repliyo waits up to 10 seconds for your API. After that the customer sees “That request took too long. Please try again in a moment.”
- •403 or 404: Both are treated as “not found” and the customer sees “I couldn’t find that in your account. Please double-check the details.” either way. This is deliberate: it stops anyone from guessing order numbers by telling real ones from fake ones. Don’t use 403 or 404 for anything other than “this record isn’t available to this person”.
- •Any other error, or unreachable: Other 4xx and 5xx responses, and calls that can’t connect at all, give the customer “I had trouble fetching that information right now. Please try again in a moment.” Your error body is never shown. If you see this, check the URL is public and uses HTTPS.
Next
Learn how visitors are identified before order and booking data is returned in Authentication, then see the question-type guides for orders, products and bookings.
