Developer API
With the Seconda API you can post listings programmatically, without opening the website. You need an API key from your account.
1. Make a key
Keys are made from your account, at Settings, API keys.
The key is shown only once, when you create it. Copy it then and keep it safe; you cannot see it again afterwards.
2. Authenticate
Send the key with every request, in one of the two headers:
Authorization: Bearer seconda_ab12cd34_...
# sau, la fel de bine:
X-API-Key: seconda_ab12cd34_...3. Create a listing
Send the listing data as JSON. The price is an integer, in minor units (15000 means 150.00 RON). Required: the title (5-80 characters), the description (20-3000 characters), the category (a leaf category slug) and the price (1-100,000 RON).
curl -X POST https://seconda.ro/api/v1/articole \
-H "Authorization: Bearer CHEIA_TA" \
-H "Content-Type: application/json" \
-d '{
"titlu": "Rochie de vara",
"descriere": "Rochie usoara din bumbac, purtata de doua ori, marimea M.",
"categorie": "femei-rochii",
"pret": 15000,
"moneda": "RON",
"moduriLivrare": ["personal", "curier"],
"tariLivrare": ["RO"]
}'The delivery field is also required to publish: "moduriLivrare", with at least one of "personal" (hand-over in person) and "curier" (courier or post); with courier, also "tariLivrare", the codes of the European Union countries you send to (for example "RO", "BG"). Without it, publishing returns 400 ANUNT_INVALID, and "eroare.detalii" lists the problem LIVRARE_LIPSA (field "moduriLivrare") or TARI_LIVRARE_LIPSA (field "tariLivrare").
The response contains the listing id, which you need for the next steps.
4. Upload photos
Send the photos as multipart, with the „poze” field repeated for each file. Between 1 and 20 photos, in JPEG, PNG or WebP format.
curl -X POST https://seconda.ro/api/v1/articole/ID_ARTICOL/poze \
-H "Authorization: Bearer CHEIA_TA" \
-F "[email protected]" \
-F "[email protected]"5. Publish the listing
Once you have added the photos, publish the listing so it appears in the catalog.
curl -X POST https://seconda.ro/api/v1/articole/ID_ARTICOL/publica \
-H "Authorization: Bearer CHEIA_TA"Confirmation e-mails
When you post manually, from the website, you get a confirmation e-mail for each listing. When you post through the API, with a key, you do not get an e-mail for each listing, but a single summary at the end of the day.