Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.9 KiB
1.9 KiB
name, description
| name | description |
|---|---|
| upload-lista | Use when the user provides a list of products and quantities to add to the Chá do Martin wishlist at chadomartin.omeu.website. Triggers on "adicionar itens", "upload lista", "adicionar à lista do Martin", or when given a product/quantity table. |
Upload Lista — Chá do Martin
Adds items to the "Chá do Martin" wishlist via the admin API.
Config
- URL:
https://chadomartin.omeu.website - Wishlist ID:
r7ug0ez62x7ljx8c870ofwcv - Admin token: read from
/home/adriano/chadebebe/.env(keyADMIN_TOKEN) - Auth: cookie
adm_token=<token>sent with every request
Instructions
The user will provide a list of items (name + quantity). For each item:
-
Load the admin token:
ADMIN_TOKEN=$(grep ADMIN_TOKEN /home/adriano/chadebebe/.env | cut -d= -f2) -
POST to the items endpoint:
curl -s -X POST \ "https://chadomartin.omeu.website/api/wishlists/r7ug0ez62x7ljx8c870ofwcv/items" \ -H "Content-Type: application/json" \ -H "Cookie: adm_token=${ADMIN_TOKEN}" \ -d '{"name": "<PRODUCT NAME>", "quantity": <QTY>}' -
Check the response for
"id"to confirm success. If it contains"error", report it. -
After all items are posted, print a summary table:
Item Qty Status ... ... ✓ / ✗
Input formats accepted
- Free text: "3x fralda tamanho P, 2x body branco"
- Markdown table with Name/Quantidade columns
- Numbered list: "1. Fralda P — 3 unidades"
Parse whatever the user gives and map to name + quantity before calling the API.
Notes
quantitymust be an integer ≥ 1 (defaults to 1 if omitted)nameis required;description,imageUrl,purchaseUrlsare optional — only include if the user provides them- Items are appended to the end of the list (sortOrder is set automatically)
- Run all POSTs in parallel where possible to be fast