# Écorce — fruits and vegetables Origin: https://ai.ecorce.app Audience: an external model, placing one buyer's basket. This site has one tool. Read today's list. Replace one basket. Read it back. You do not sign anyone in. You do not email the supplier. You do not add baskets together. You do not close a basket. The buyer gives you a token. The token is the only credential. Send it in the JSON body, never in a URL. Do not call any address that offers to tell you the current token. Do not use fl.ecorce.app. That desk is a different order, and this site will refuse its token on a write. Prices, units, and SPN names come from the list. Do not invent a SKU, a price, or an SPN name. Do not convert a unit. If you are unsure of a product, omit it. ## Read the list POST https://ai.ecorce.app/api/liste Content-Type: application/json {"token":""} Response shape: {"ok":true,"data":{...},"error":null} data fields: liste (date), client, statut (open or closed), articles. Each article: sku, spn, canadawide, unite, prix, section, qte. qte is what this basket already holds. prix null means the list has no price: do not order that sku. If you cannot see a product here, it cannot be ordered. ## Replace the basket POST https://ai.ecorce.app/api/panier Content-Type: application/json {"token":"","lignes":[{"sku":"","qte":1}]} This replaces the whole basket. Send every line you still want. An empty lignes array clears it. Optional notes is a string for the buyer, not an instruction to the supplier. A line is kept only when the sku is on the list and qte is a finite number greater than 0. data fields: gardes, refuses, total_estime, liste, client, statut. Each kept line: sku, spn, canadawide, unite, qte, prix_unitaire, total, prix_manquant. Each refusal: sku, qte, raison. raison is one of: sku_inconnu, qte_invalide, doublon. The first valid occurrence of a sku is kept. A repeat is doublon and does not change the quantity. total_estime is computed here. Do not send a price. If prix_manquant is true, the line is stored and the total ignores it. A closed basket returns 409. Do not retry a write. ## Read the basket back POST https://ai.ecorce.app/api/panier/lire Content-Type: application/json {"token":""} Same data as a replace, with refuses empty. Use this to check what was stored. Do not trust your own draft. ## Errors {"ok":false,"data":null,"error":{"code":"...","message":"..."}} 404 jeton_inconnu. 403 bureau (the live Écorce desk token). 409 ferme. 400 corps. 413 trop_de_lignes (more than 2000 lines). ## Not your job Closing, grouping, and sending are done by a person on /admin. You stop when the read-back matches the lines you meant to keep.