Skip to content

The Popis API ​

Your software calls Popis: it sends the codebooks and reads count results. In the portal, choose the They access our API mode and click Generate Token (API sync). The token is shown only once — copy it right away.

Every call with its fields, examples and a Try it button: API reference

Access ​

  • Base URL: https://portal.popis.pro/api/v1
  • Headers:
http
Authorization: Bearer <your token>
Accept: application/json
Content-Type: application/json
Accept-Language: en

Accept-Language picks the language of messages in the response (e.g. en, sr).

Responses ​

Every response has the same shape:

json
{
  "status": true,
  "message": "success",
  "data": [ ... ],
  "meta": { "pagination": { "current_page": 1, "per_page": 50, "total": 128, "last_page": 3, "from": 1, "to": 50 } },
  "errors": [],
  "code": ""
}
HTTP codeMeaning
401The token is invalid or was revoked.
403No access; code PACKAGE_EXPIRED means the company's package has expired.
404The record doesn't exist.
422The data is invalid (details in errors), or the package limit would be exceeded.
429Too many requests (code TOO_MANY_ATTEMPTS): at most 600 requests a minute.

Reading the codebooks ​

http
GET /articles?page=1&per_page=200&search=milk
GET /fixed-assets
GET /locations
GET /warehouses

Parameters: page, per_page (default 10, at most 200), search, sort_by, sort_direction (asc / desc). Pages are described in meta.pagination.

Sending the codebooks (bulk-sync) ​

One request sends many records. Existing ones are matched by code and updated, new ones are added, and nothing is deleted.

http
POST /articles/bulk-sync
json
{
  "items": [
    { "code": "ART001", "name": "Milk 1L", "unit": "pcs", "price": 89.99, "tax_rate": 20, "weight": 1.05, "status": "active" },
    { "code": "ART002", "name": "White bread", "unit": "pcs" }
  ]
}

Response: {"synced": 2, "new": 1, "updated": 1}.

EndpointKeyFields
POST /articles/bulk-synccodename, unit, price, tax_rate, weight, description, status (active / inactive)
POST /fixed-assets/bulk-syncinventory_numbername, unit, serial_number, type (fixed_asset / small_inventory), quantity, price, description, status
POST /locations/bulk-synccodename, city, address, email, status
POST /warehouses/bulk-synccodename, location_code, status
  • Send locations before warehouses: a warehouse with an unknown location_code is skipped (response: {"synced": …, "skipped": …}).
  • If new records would exceed the package limit, the request is refused with 422.
  • Barcodes, packaging and item tracking are sent one item at a time, with POST /articles — the fields are described in the API reference.

Count results ​

http
GET /counts?completed_only=1&date_from=2026-09-01&date_to=2026-09-30

Filters: status, completed_only=1, type, date_from, date_to, location_id.

http
GET /counts/{id}/report-data
GET /counts/latest/report-data

Returns the count report (latest = the last completed count). Only completed count lists are included. Parameters: group_by_warehouse=1, warehouse_id, row_filter=uncounted or duplicates, page, per_page (default 50, at most 500). For this endpoint the pages are in data.pagination. The content of data:

json
{
  "count": { "id": 254, "number": "DOK-0022-2026", "type": "goods", "status": "completed", "location": "Location 1", "warehouse": "Main warehouse", "completed_at": "2026-09-18 10:15:00" },
  "items": [
    { "code": "ART001", "name": "Milk 1L", "unit": "pcs", "barcode": "8600001234567",
      "counted": 98, "in_stock": 100, "difference": -2, "price": 89.99,
      "counted_value": 8819.02, "stock_value": 8999.0, "diff_value": -179.98, "tax_rate": 20, "is_counted": true }
  ],
  "totals": { "unique_items": 1, "counted": 98, "in_stock": 100, "difference": -2, "counted_value": 8819.02, "stock_value": 8999.0 },
  "pagination": { "current_page": 1, "per_page": 50, "total": 1, "last_page": 1 }
}

in_stock and the stock values are there when the warehouse has stock. The same data is seen in the portal in the count report.