AGRO24 partnerių importas

Paskyra → Masinis skelbimų importas. Pateikite CSV arba XML, peržiūrėkite patikrą ir patvirtinkite tinkamų įrašų įkėlimą. Galite nurodyti tiesioginę viešą HTTPS nuorodą. Bandomojoje versijoje palikite importo langą atidarytą; nutrūkus ryšiui istorijoje pasirinkite importą ir „Tęsti importą“.

CSV šablonas · XML šablonas

Svarbiausios taisyklės / Core rules

Laukai / Fields

LaukasReikšmė
external_idPrivalomas / required; 1–100 letters, numbers, _ . : / -
title5–90 characters
description25 meaningful letters/digits; max 500
category / subcategoryAGRO24 categories below; choose defaults in the form if absent
brand / model / production_yearMachine make, model and year (1950–next year); model/year optional for parts
price / currencyPositive price; max 2 decimal places; EUR / PLN / SEK
vat_mode / vat_rategross = VAT included; net = excluding VAT; not_separate = VAT not separated; unspecified = unknown. gross/net require VAT percentage 0–40
country_code / cityISO two-letter country code, e.g. LT / LV / EE / PL / DE / SE; city required
seller_name / contact_phoneSeller name and valid phone number. Country prefix recommended
listing_type / statussale / rent; active / reserved / sold / hidden
images1–15 public HTTPS image URLs, separated by |
power_hp / engine_hours / used_in_lithuaniaOptional numeric power/hours; usage: yes / no
rent_periodRequired for rent: hour / day / week / month
youtube_urlOptional YouTube video URL

Technikos kategorijos / Machine categories

Žemės ūkis

Traktoriai · Javų kombainai · Savaeigiai purkštuvai · Pašarų smulkintuvai · Savaeigės šienapjovės · Kita savaeigė technika · Plūgai · Kultivatoriai · Diskiniai skutikai · Sėjamosios · Prikabinami purkštuvai · Pakabinami purkštuvai · Ruloniniai presai · Rulonų vyniotuvai · Šienapjovės · Grėbliai ir vartytuvai · Tankinimo volai · Trąšų barstytuvai · Priekabos · Kiti padargai

Statyba

Ekskavatoriai · Krautuvai · Teleskopiniai krautuvai · Buldozeriai · Kita statybinė technika

Automobiliai

Lengvieji automobiliai · Visureigiai · Komerciniai automobiliai · Priekabos

Dalys ir aksesuarai

Traktorių dalys · Kombainų dalys · Plūgų dalys · Kultivatorių dalys · Diskinių skutiklių dalys · Sėjamųjų dalys · Purkštuvų dalys · Presų dalys · Rulonų vyniotuvų dalys · Šienapjovių dalys · Grėblių ir vartytuvų dalys · Pašarų smulkintuvų dalys · Volų dalys · Trąšų barstytuvų dalys · Priekabų dalys · Ekskavatorių dalys · Krautuvų dalys · Teleskopinių krautuvų dalys · Buldozerių dalys · Automobilių dalys · Komercinių automobilių ir sunkvežimių dalys · Kitos dalys ir aksesuarai

Miško technika

Medvežės (forvarderiai) · Medkirtės (harvesteriai) · Miškovežiai sunkvežimiai · Miško priekabos · Miško krautuvai ir manipuliatoriai · Miško traktoriai (skideriai) · Medienos smulkintuvai · Malkų ruošimo įranga · Kita miško technika

Miško technikos dalys

Medvežių dalys · Medkirčių dalys · Miškovežių sunkvežimių dalys · Miško priekabų dalys · Miško technikos dalys

API – programuotojui / Developer

Endpoint: POST /.netlify/functions/agro24-import. Authenticate with the seller’s valid Supabase access token in Authorization: Bearer … . Tokens and refresh credentials belong to that seller; never use the portal’s server secret. Requests with a browser Origin must match the portal. In the private preview Netlify access protection also applies.

Actions: catalog; preview (format csv/xml/json, source_key, text or url, optional defaults); commit (job_id); status (job_id); work (processes a resumable slice for the authenticated owner); retry (job_id); list. JSON preview text is a serialized array of full listing objects using the fields above. Poll status; call work until state=done in the preview. Inspect every item state and error; a successful HTTP response alone does not mean every row was published. Handle access-token refresh through your own Supabase seller session. A dedicated long-lived partner key is not implemented.

{"action":"preview","source_key":"inventory","format":"xml","url":"https://your-company.example/export.xml"}

Do not call work concurrently. Resume after connection failures; external IDs and atomic publishing prevent duplicate listings. Existing manually posted listings are never automatically matched by title or overwritten. Match existing records only through an explicitly established import ID.

Paleidimas administratoriui / Deployment

Apply partner-import.sql after the existing listings, specs and validation migrations. All four import tables have RLS and no anon/authenticated table privileges. Service-only invoker RPCs and verified /auth/v1/user ownership are required. Dependencies are pinned in package-lock.json; update generated content/taxonomy with node scripts/build-import-shared.cjs when changing source validators or categories.

The Netlify scheduled handler has a 30-second limit and only runs automatically on a published deploy. Do not enable AGRO24_IMPORT_SCHEDULE_ENABLED=true in a preview. When publishing the intended version, explicitly set that environment variable and verify the scheduled function’s invocations and a real partner feed end-to-end. Currently preview jobs continue while the seller’s dialog is open or when manually resumed.