Pređi na sadržaj

Referenca

Katalog

Proizvodi i usluge sa cenom, jedinicom mere, GTIN-om i poreskim oznakama; uvoz i izvoz CSV-a.

6 operacija

Pročitaj proizvod

get/v1/products/{productId}

Scope catalogue:read

Jedan proizvod po identifikatoru.

Parametri

getProduct: Parametri
PoljeGdeTipOpis
productIdobaveznopathuuid

Primer

GET /v1/products/{productId}
curl -X GET "https://api.bokapos.rs/v1/products/d2e3f4a5-b6c7-4d8e-9f0a-1b2c3d4e5f60" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN"

Odgovori

getProduct: Odgovori
200 OKProductProduct
404 Not FoundResource does not exist within the authenticated tenant scopeErrorCode
200 OK
{
  "id": "d2e3f4a5-b6c7-4d8e-9f0a-1b2c3d4e5f60",
  "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
  "sku": "BT-HP-001",
  "gtin": "8606012345678",
  "name": "Bluetooth slušalice",
  "unitOfMeasure": "kom",
  "grossUnitPrice": 8990,
  "taxLabels": [
    "F"
  ],
  "isActive": true,
  "createdAt": "2026-08-22T10:00:00.000Z",
  "updatedAt": "2026-08-22T10:00:00.000Z"
}
Odgovor: Product

Opisi polja su preuzeti iz OpenAPI ugovora i na engleskom su; nazivi polja i vrednosti su isti u oba jezika.

getProduct: Odgovor
PoljeTipOpis
idobaveznouuid
taxpayerIdobaveznouuid
skuobaveznostring
gtinopcionostring| null (može biti null)
nameobaveznostring
unitOfMeasureopcionostring| null (može biti null)
grossUnitPriceobaveznonumber

>= 0

taxLabelsobaveznoarray<string>
isActiveobaveznoboolean
createdAtobaveznodate-time
updatedAtobaveznodate-time

Izmeni proizvod

put/v1/products/{productId}

Scope catalogue:write

Zamena svih uređivih polja. Obveznik je nepromenljiv; deaktivacija čuva istorijske snimke na računima.

Beleške iz ugovora (OpenAPI, engleski)

The owning taxpayer is immutable; deactivation preserves historical receipt snapshots.

Parametri

updateProduct: Parametri
PoljeGdeTipOpis
productIdobaveznopathuuid

Telo zahteva application/json

updateProduct: Telo zahteva
PoljeTipOpis
skuobaveznostring

min 1max 100

gtinopcionostring| null (može biti null)

max 32

nameobaveznostring

min 1max 500

unitOfMeasureobaveznostring

min 1max 50

grossUnitPriceobaveznonumber

>= 0step 0.01

taxLabelsobaveznoarray<string>

min 1 itemsunique

isActiveobaveznoboolean

Primer

PUT /v1/products/{productId}
curl -X PUT "https://api.bokapos.rs/v1/products/d2e3f4a5-b6c7-4d8e-9f0a-1b2c3d4e5f60" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "sku": "BT-HP-001",
  "gtin": "8606012345678",
  "name": "Bluetooth slušalice Pro",
  "unitOfMeasure": "kom",
  "grossUnitPrice": 9490,
  "taxLabels": [
    "F"
  ],
  "isActive": true
}'

Odgovori

updateProduct: Odgovori
200 OKUpdated productProduct
404 Not FoundResource does not exist within the authenticated tenant scopeErrorCode
409 ConflictThe requested resource conflicts with an existing tenant-scoped recordConflict
422 Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
200 OK
{
  "id": "d2e3f4a5-b6c7-4d8e-9f0a-1b2c3d4e5f60",
  "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
  "sku": "BT-HP-001",
  "gtin": "8606012345678",
  "name": "Bluetooth slušalice Pro",
  "unitOfMeasure": "kom",
  "grossUnitPrice": 9490,
  "taxLabels": [
    "F"
  ],
  "isActive": true,
  "createdAt": "2026-08-22T10:00:00.000Z",
  "updatedAt": "2026-09-04T12:00:00.000Z"
}
Odgovor: Product

Opisi polja su preuzeti iz OpenAPI ugovora i na engleskom su; nazivi polja i vrednosti su isti u oba jezika.

updateProduct: Odgovor
PoljeTipOpis
idobaveznouuid
taxpayerIdobaveznouuid
skuobaveznostring
gtinopcionostring| null (može biti null)
nameobaveznostring
unitOfMeasureopcionostring| null (može biti null)
grossUnitPriceobaveznonumber

>= 0

taxLabelsobaveznoarray<string>
isActiveobaveznoboolean
createdAtobaveznodate-time
updatedAtobaveznodate-time

Uvezi katalog (CSV)

post/v1/products/import

Scope catalogue:write

Sve ili ništa: do 1.000 redova ili 5 MB, oznake razdvojene sa |. Prihvata i CSV iz srpskog Excela (BOM, sep=;, decimalni zarez).

Beleške iz ugovora (OpenAPI, engleski)

The import is all-or-nothing, accepts at most 1,000 rows or 5 MB, and uses `|` between tax labels.

Parametri

importProducts: Parametri
PoljeGdeTipOpis
taxpayerIdobaveznoqueryuuid

Telo zahteva text/csv

text/csv

Primer

POST /v1/products/import
curl -X POST "https://api.bokapos.rs/v1/products/import?taxpayerId=3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN" \
  -H "Content-Type: text/csv" \
  --data-binary @katalog.csv

Odgovori

importProducts: Odgovori
200 OKImport countsProductImportResult
404 Not FoundResource does not exist within the authenticated tenant scopeErrorCode
409 ConflictThe requested resource conflicts with an existing tenant-scoped recordConflict
422 Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
200 OK
{
  "created": 1,
  "updated": 1,
  "total": 2
}
Odgovor: ProductImportResult

Opisi polja su preuzeti iz OpenAPI ugovora i na engleskom su; nazivi polja i vrednosti su isti u oba jezika.

importProducts: Odgovor
PoljeTipOpis
createdobaveznointeger

>= 0

updatedobaveznointeger

>= 0

totalobaveznointeger

>= 1<= 1000

Izvezi katalog (CSV)

get/v1/products/export

Scope catalogue:read

Deterministički CSV jednog obveznika, isti format kao uvoz.

Parametri

exportProducts: Parametri
PoljeGdeTipOpis
taxpayerIdobaveznoqueryuuid

Primer

GET /v1/products/export
curl -X GET "https://api.bokapos.rs/v1/products/export?taxpayerId=3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN" \
  --output katalog.csv

Odgovori

exportProducts: Odgovori
200 OKCatalogue CSV using invariant decimals and `|`-separated tax labels
404 Not FoundResource does not exist within the authenticated tenant scopeErrorCode
200 OK · text/csv
sku,name,gtin,unitOfMeasure,grossUnitPrice,taxLabels,isActive
BT-HP-001,Bluetooth slušalice,8606012345678,kom,8990.00,F,true
SRV-INST,Instalacija,,h,4000.00,F,true
Odgovor: ErrorCode

Opisi polja su preuzeti iz OpenAPI ugovora i na engleskom su; nazivi polja i vrednosti su isti u oba jezika.

exportProducts: Odgovor
PoljeTipOpis
codeobaveznostring
messageopcionostring

Lista proizvoda

get/v1/products

Scope catalogue:read

Katalog po obvezniku, sa pretragom po nazivu, šifri ili GTIN-u i filterom aktivnosti. Stranice preko cursor-a.

Parametri

listProducts: Parametri
PoljeGdeTipOpis
taxpayerIdopcionoqueryuuid
searchopcionoquerystring

max 200

isActiveopcionoqueryboolean
cursoropcionoqueryuuid
pageSizeopcionoqueryinteger

>= 1<= 200default 50

Primer

GET /v1/products
curl -X GET "https://api.bokapos.rs/v1/products?taxpayerId=3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11&search=slu%C5%A1alice&isActive=true" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN"

Odgovori

listProducts: Odgovori
200 OKProduct pageProductPage
400 Bad RequestThe command violates a Boka or fiscal ruleErrorCode
422 Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
200 OK
{
  "items": [
    {
      "id": "d2e3f4a5-b6c7-4d8e-9f0a-1b2c3d4e5f60",
      "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
      "sku": "BT-HP-001",
      "gtin": "8606012345678",
      "name": "Bluetooth slušalice",
      "unitOfMeasure": "kom",
      "grossUnitPrice": 8990,
      "taxLabels": [
        "F"
      ],
      "isActive": true,
      "createdAt": "2026-08-22T10:00:00.000Z",
      "updatedAt": "2026-08-22T10:00:00.000Z"
    }
  ],
  "nextCursor": null
}
Odgovor: ProductPage

Opisi polja su preuzeti iz OpenAPI ugovora i na engleskom su; nazivi polja i vrednosti su isti u oba jezika.

listProducts: Odgovor
PoljeTipOpis
itemsobaveznoarray<Product>
idobaveznouuid
taxpayerIdobaveznouuid
skuobaveznostring
gtinopcionostring| null (može biti null)
nameobaveznostring
unitOfMeasureopcionostring| null (može biti null)
grossUnitPriceobaveznonumber

>= 0

taxLabelsobaveznoarray<string>
isActiveobaveznoboolean
createdAtobaveznodate-time
updatedAtobaveznodate-time
nextCursorobaveznouuid| null (može biti null)

Dodaj proizvod

post/v1/products

Scope catalogue:write

Proizvod ili usluga sa šifrom, nazivom, jedinicom mere, bruto cenom (dve decimale) i poreskim oznakama. Stavke računa mogu, ali ne moraju, da se pozivaju na katalog.

Telo zahteva application/json

createProduct: Telo zahteva
PoljeTipOpis
taxpayerIdobaveznouuid
skuobaveznostring

min 1max 100

gtinopcionostring| null (može biti null)

max 32

nameobaveznostring

min 1max 500

unitOfMeasureobaveznostring

min 1max 50

grossUnitPriceobaveznonumber

>= 0step 0.01

taxLabelsobaveznoarray<string>

min 1 itemsunique

Primer

POST /v1/products
curl -X POST "https://api.bokapos.rs/v1/products" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
  "sku": "BT-HP-001",
  "gtin": "8606012345678",
  "name": "Bluetooth slušalice",
  "unitOfMeasure": "kom",
  "grossUnitPrice": 8990,
  "taxLabels": [
    "F"
  ]
}'

Odgovori

createProduct: Odgovori
201 CreatedProductProduct
409 ConflictThe requested resource conflicts with an existing tenant-scoped recordConflict
422 Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
201 Created
{
  "id": "d2e3f4a5-b6c7-4d8e-9f0a-1b2c3d4e5f60",
  "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
  "sku": "BT-HP-001",
  "gtin": "8606012345678",
  "name": "Bluetooth slušalice",
  "unitOfMeasure": "kom",
  "grossUnitPrice": 8990,
  "taxLabels": [
    "F"
  ],
  "isActive": true,
  "createdAt": "2026-08-22T10:00:00.000Z",
  "updatedAt": "2026-08-22T10:00:00.000Z"
}
409 Conflict
{
  "code": "CATALOGUE_SKU_ALREADY_EXISTS",
  "message": "A product with this SKU already exists for the taxpayer."
}
Odgovor: Product

Opisi polja su preuzeti iz OpenAPI ugovora i na engleskom su; nazivi polja i vrednosti su isti u oba jezika.

createProduct: Odgovor
PoljeTipOpis
idobaveznouuid
taxpayerIdobaveznouuid
skuobaveznostring
gtinopcionostring| null (može biti null)
nameobaveznostring
unitOfMeasureopcionostring| null (može biti null)
grossUnitPriceobaveznonumber

>= 0

taxLabelsobaveznoarray<string>
isActiveobaveznoboolean
createdAtobaveznodate-time
updatedAtobaveznodate-time