Documentation
API
REST API v1 for custom systems, ERP and POS.
Base: https://sidro-cjenici.vercel.app/api/v1 · OpenAPI 3.1: /api/v1/openapi.json
Authentication
Authorization: Bearer sidro_live_…
An admin creates keys in the dashboard. A key is shown once; only its hash is stored. Every key belongs to its own source: a full sync with that key only deactivates items it sent.
Errors and limits
{ "error": { "code": "invalid_request", "message": "…", "details": {} } }
400 · 401 · 402 plan_limit · 403 (plan without API) · 404 · 409 · 429 (120 requests per minute per key, Retry-After) · 500.
Writing the catalogue
curl -X PUT https://sidro-cjenici.vercel.app/api/v1/items \
-H "Authorization: Bearer $SIDRO_KEY" -H "Content-Type: application/json" \
-d '{"items":[{"sku":"KR-500","name":"Kruh bijeli 500 g","price":1.99,"unit":"g","unit_qty":500}]}'
Up to 500 items per request; invalid items come back in errors, the rest are written. Full catalogue in parts: the same full_sync.id in all parts and "final": true in the last one; items of that source that did not appear are deactivated (a sync that saw no items deactivates nothing). An omitted field means "leave unchanged", an explicit null clears it. If the SKU changes but source_ref stays the same, Sidro renames the item and keeps its anchor price and history.
Anchor price via the API
anchor_price on an item is applied only if the item has no confirmed anchor price yet. For a deliberate change use anchor_override: true + anchor_reason, or PUT /anchors/{sku} with a reason. Changes are audit-logged with the key name.
All endpoints are listed below.
Endpoints
/api/v1/pingRačunTest veze
Responses: 200, 401
/api/v1/orgRačunOrganizacija, paket, ograničenja i javne adrese
Responses: 200
/api/v1/itemsStavkePopis stavki
| Parameter | In | Type |
|---|---|---|
| updated_since | query | string |
| status | query | string (potvrdjena | za_provjeru | nedostaje) |
| q | query | string |
| limit | query | integer |
| cursor | query | string |
Responses: 200
/api/v1/itemsStavkeSkupni upis (upsert) do 500 stavki
Stavke se prepoznaju po `sku`. Neispravne stavke vraćaju se u `errors`, ostale se upisuju. Za cijeli katalog u više dijelova pošaljite isti `full_sync.id` u svim dijelovima i `final: true` u zadnjem — tada se deaktiviraju stavke istog izvora koje se nisu pojavile.
{
"items": [
{
"sku": "KR-500",
"name": "Kruh bijeli 500 g",
"brand": "Pekara Primjer",
"price": 1.99,
"unit": "g",
"unit_qty": 500,
"barcode": "3850000000014"
}
]
}Responses: 200, 402
/api/v1/items/{sku}StavkeStavka s poviješću cijena i revizijskim zapisom
| Parameter | In | Type |
|---|---|---|
| sku * | path | string |
Responses: 200, 404
/api/v1/items/{sku}StavkeDjelomična izmjena
| Parameter | In | Type |
|---|---|---|
| sku * | path | string |
Responses: 200
/api/v1/items/{sku}StavkeDeaktivacija (nikad brisanje)
| Parameter | In | Type |
|---|---|---|
| sku * | path | string |
Responses: 200
/api/v1/anchorsSidrene cijeneSidrene cijene za prikaz uz cijenu
| Parameter | In | Type |
|---|---|---|
| updated_since | query | string |
| limit | query | integer |
| cursor | query | string |
Responses: 200
/api/v1/anchors/{sku}Sidrene cijeneNamjerna izmjena sidrene cijene (s razlogom)
| Parameter | In | Type |
|---|---|---|
| sku * | path | string |
{
"anchor_price": 12.49,
"anchor_date": "2026-09-10",
"reason": "Ispravak prema blagajni 10. 9."
}Responses: 200
/api/v1/storesLokacijePopis lokacija s javnim adresama
Responses: 200
/api/v1/storesLokacijeNova lokacija
Responses: 201, 409
/api/v1/stores/{code}LokacijeIzmjena lokacije
| Parameter | In | Type |
|---|---|---|
| code * | path | string |
Responses: 200
/api/v1/publishObjavaObjavi cjenik odmah
Responses: 200
/api/v1/publicationsObjavaArhiva objava
| Parameter | In | Type |
|---|---|---|
| store | query | string |
| from | query | string |
| to | query | string |
Responses: 200
/api/v1/validationObjavaNalazi zadnje provjere i stanje sidrenih cijena
Responses: 200
Item fields
| Field | Type | Description |
|---|---|---|
| sku * | string | Šifra; ključ stavke unutar organizacije. |
| kind | string | proizvod, usluga |
| name * | string | |
| brand | string | null | |
| unit | string | null | kg, g, l, ml, m, m2, m3, kom, par, sat… |
| unit_qty | number | null | Neto količina izražena u `unit`. |
| barcode | string | null | |
| category | string | null | |
| legal_category | string | hrana, pice, kozmetika, sredstva_za_ciscenje, toaletne_potrepstine, proizvodi_za_kucanstvo, ostalo, usluga |
| price * | number | Redovna maloprodajna cijena (bez akcije). |
| special_price | number | null | |
| special_name | string | null | |
| special_from | string | null | |
| special_to | string | null | |
| available | boolean | |
| active | boolean | |
| store | string | null | Oznaka lokacije za cijenu po lokaciji (paket Lanac). |
| source_ref | string | null | Stalni vanjski ID. Promijeni li se šifra uz isti source_ref, Sidro preimenuje stavku i zadrži sidrenu cijenu i povijest. |
| source_created_at | string | null | |
| source_modified_at | string | null | Zadnja izmjena u izvoru — dokaz za automatsku sidrenu cijenu. |
| anchor_price | number | null | Primjenjuje se samo ako stavka još nema potvrđenu sidrenu cijenu, osim uz anchor_override. |
| anchor_date | string | null | |
| anchor_override | boolean | |
| anchor_reason | string |