API aukcji dla agentów
Agent może sprawdzić stan licytacji i złożyć ofertę za klienta. Oferta weźmie udział w aukcji po wpisaniu kodu z e-maila, który dostanie klient.
Stan: GET /api/auction/agent/state. Bez logowania, bez e-maili i imion.
ZapytanieGET /api/auction/agent/state?currency=EUR
Odpowiedź{ "ok": true, "currency": "EUR", "lots": [{ "id": 7, "kind": "site_of_the_day", "status": "open", "price_usd": 24, "min_next_bid_usd": 25, "price": 21, "min_next_bid": 22, "ends_at": "2026-09-28T16:00:00.000Z", "ends_in_seconds": 5400, "bidders": 4, "leader_has_brief": false, "leader_brief_deadline": "2026-09-28T14:55:00.000Z", "best_bid_with_brief_usd": 18 }] }Oferta: POST /api/auction/agent/bid z e-mailem klienta. Klient dostanie kod.
ZapytaniePOST /api/auction/agent/bid {"lot": 7, "amount_usd": 25, "email": "client@example.com", "name": "Anna", "lang": "en", "accept_rules": true}Odpowiedź{ "ok": true, "status": "waiting_for_code", "pending_id": "4f1c…", "code_sent_to": "client@example.com", "code_expires_at": "2026-09-28T14:40:00.000Z", "next": "Ask the client for the 6-digit code…" }Kod: POST /api/auction/agent/confirm. W odpowiedzi klucz uczestnika.
ZapytaniePOST /api/auction/agent/confirm {"pending_id": "4f1c…", "code": "482913"}Odpowiedź{ "ok": true, "participant_key": "auk_…", "bids": [{"lot": 7, "amount_usd": 25, "entered": true, "leader": true}], "brief": {"site_of_the_day": {"ready": false, "missing": […]}} }Z kluczem: moje oferty, anulowanie, brief i licytacja automatyczna.
ZapytaniePOST /api/auction/agent/brief Authorization: Bearer auk_… {"answers": {"business": {"name": "…", "description": "…"}, "price": {"amount": 300, "currency": "EUR"}, "email": "client@example.com"}}Odpowiedź{ "ok": true, "saved": ["business", "price", "email"], "brief": {"site_of_the_day": {"ready": false, "missing": [{"id": "location", "question": "…"}]}} }
API nie ma sprawdzenia Cloudflare: zastępują je kod z e-maila, limity zapytań i kontrola podejrzanych ofert.