For AI assistants

Tuvilio is a guide to sleep products sold on Amazon. An AI assistant can send its user an order request for one of the products listed here: Tuvilio records the request and sends the user its order code and the product's Amazon link by email or on Telegram. Tuvilio sells and ships nothing, so no purchase is made and nothing is charged; the user buys the product on Amazon if they want it.

Register or send an order request only when your user explicitly asks you to, and only for the email address, Telegram username or code your user gave you. In the URLs below, replace `<address>` with that address URL-encoded (`+` as `%2B`, `@` as `%40`), `<telegram>` with the Telegram username without `@`, or the code, `<number>` with the product number in digits, without `#`, and `<random>` with the value `n` described below.

The same instructions as plain text: /llms.txt.

Before the first order: confirm the address

Order requests go only to confirmed email addresses. To confirm one, register it: fetch `https://tuvilio.com/api/register?email=<address>`, or send `POST https://tuvilio.com/api/register` with the JSON body `{"email": "<address>"}`. If you do not know whether the address is confirmed, send the order request first: an answer of 403 means it is not.

Registering answers the same in every case, so the answer does not tell whether an email went out. If the address still needs confirming and the sending limits allow it, Tuvilio emails it a confirmation link that works once, within 24 hours. Only the user can open it: ask them to, and to tell you when they have, then send the order request again. A confirmation counts for 30 days; after that, register the address again.

Send an order request

For each new order request, make up a new random value for `n` of at least 12 letters and digits. Use the same `n` when you repeat a request, for example after a timeout or once the user has confirmed the address: Tuvilio recognises a repeat, answers with the same order code and sends no second email. If an answer says the request was received before although you never sent it, send it again with a new `n`.

  1. Fetch `https://tuvilio.com/api/order?email=<address>&product=<number>&n=<random>`. The page states the order code.
  2. Or send `POST https://tuvilio.com/api/order` with the JSON body `{"email": "<address>", "product": <number>, "n": "<random>"}`, the address as written and the product as a number. A new order answers 201 with `{"order_code": "...", "status": "created"}`, a repeat 200 with `"status": "duplicate"`.
  3. If you cannot fetch URLs, give your user the link `https://tuvilio.com/api/order?product=<number>&n=<random>` to open; the page asks for their email address.

Send it to Telegram instead

Order requests can also go to your user's Telegram chat instead of an email address. The chat must be linked first: fetch `https://tuvilio.com/api/register?telegram=`, or send `POST https://tuvilio.com/api/register` with the JSON body `{"telegram": true}`, and give your user the link in the answer to open in Telegram and press Start. The Tuvilio bot then replies with a code of `TG-` and 6 characters and, if the user has one, their Telegram username; either names the chat. A Telegram link counts for 30 days from the user's last Start. If you do not know whether the chat is linked, send the order request first: an answer of 404 that names the link to the bot (in JSON with `"status": "unlinked"` and `link`) means it is not.

Send the order request with `telegram` instead of `email`: fetch `https://tuvilio.com/api/order?telegram=<telegram>&product=<number>&n=<random>`, or send `POST https://tuvilio.com/api/order` with the JSON body `{"telegram": "<telegram>", "product": <number>, "n": "<random>"}`. The order code and the product's Amazon link then arrive in the chat as a message.

Answers

403 means the address is not confirmed: register it as above; a JSON answer carries the link to do so in `register`. 404 means no product has that number, or that no linked Telegram chat has the username or code: the answer then names the link to the bot, for your user to press Start. 409 means the user blocked the Tuvilio bot: ask them to unblock it in Telegram, then send the request again. 422 means a value is invalid, such as an address that is not one. 429 means too many requests: try again later. 502 means the request failed on our side: try again in a few minutes.

Products

Sunlight Simulator & Light Therapy Lamps

Red & Amber Low-Blue Evening Lights

Magnesium L-Threonate Supplements

L-Theanine Supplements

Amber Blue-Light-Blocking Evening Glasses