API Documentation

Digitalis API reference

TEST Server:

https://test.digitalis.ba/api

Production Server:

https://digitalis.ba/api


AUTH
Authentication
Bearer Token Authorization

This API uses Bearer Token authentication. All requests must include a valid token in the Authorization header.

The token will be securely provided by our team.

Header Format

Authorization: Bearer YOUR_TOKEN_HERE

Example Request

GET /api/products HTTP/1.1
Host: https://test.digitalis.ba
Authorization: Bearer YOUR_TOKEN_HERE

GET
/api/brands
Get all brands

Returns a list of brands stored in the database.

Response Structure

FieldTypeDescription
successboolean1 on success, 0 on failure
messagestringError message if failed
dataarrayList of brands

Example SUCCESS

{
    "success": 1,
    "message": "",
    "data": [
        {
            "id": 1,
            "name": "Zilan"
        },
        {
            "id": 2,
            "name": "Samsung"
        },
        {
            ...
        }
    ]
}
GET
/api/supercategory
Get all super categories

Returns a list of SUPER categories stored in the database.

Response Structure

FieldTypeDescription
successboolean1 on success, 0 on failure
messagestringError message if failed
dataarrayList of super categories

Example SUCCESS

{
    "success": 1,
    "message": "",
    "data": [
        {
            "id": 1,
            "name": "Mobilni uređaji"
        },
        {
            "id": 2,
            "name": "Audio & Video"
        },
        {
            ...
        }
    ]
}
GET
/api/category
Get all categories

Returns a list of categories stored in the database.

Response Structure

FieldTypeDescription
successboolean1 on success, 0 on failure
messagestringError message if failed
dataarrayList of categories

Example SUCCESS

{
    "success": 1,
    "message": "",
    "data": [
        {
            "id": 1,
            "super_category_id": 2,
            "name": "HDMI & Video"
        },
        {
            "id": 2,
            "super_category_id": 2,
            "name": "Audio"
        },
        {
            ...
        }
    ]
}
GET
/api/category/subcategory
Get all subcategories

Returns a list of subcategories stored in the database.

Response Structure

FieldTypeDescription
successboolean1 on success, 0 on failure
messagestringError message if failed
dataarrayList of subcategories

Example SUCCESS

{
    "success": 1,
    "message": "",
    "data": [
        {
            "id": 1,
            "category_id": 1,
            "name": "HDMI"
        },
        {
            "id": 2,
            "category_id": 1,
            "name": "Scart"
        },
        {
            "id": 3,
            "category_id": 1,
            "name": "VGA"
        },
        {
            ...
        }
    ]
}
GET
/api/category/hierarchy
Category hierarchy

Returns categories with nested subcategories.

Response Structure

FieldTypeDescription
successboolean1 on success, 0 on failure
messagestringError message if failed
dataarrayContains categories with nested subcategories.

Example SUCCESS

{
    "success": 1,
    "message": "",
    "data": [
        {
            "id": 1,
            "name": "HDMI & Video",
            "sub": [
                {
                    "id": 1,
                    "category_id": 1,
                    "name": "HDMI"
                },
                {
                    "id": 2,
                    "category_id": 1,
                    "name": "Scart"
                },
                {
                    "id": 3,
                    "category_id": 1,
                    "name": "VGA"
                },
                {
                    ...
                }
            ]
        },
        {
            "id": 2,
            "name": "Audio",
            "sub": [
                {
                    "id": 1,
                    "category_id": 2,
                    "name": "3.5mm"
                },
                {
                    ...
                }
            ]
        },
        {
            ...
        }
    ]
}
GET
/api/products
Get all products

Returns a list of products stored in the database.

Response Structure

FieldTypeDescription
successboolean1 on success, 0 on failure
messagestringError message if failed
dataarrayList of products

Example SUCCESS

{
    "success": 1,
    "message": "",
    "data": [
        {
            "ID": 7775,
            "EAN": "3871284055003",
            "Model": "A4\/Solution",
            "name": "Papir za printer, A4, 80g, 500 listova",
            "brand_id": 1,
            "description": "Papir za Laser printer, Skenere, Fax aparate, InkJet printere, A4 ( 210 x 297 ), 80g , 500 listova pakovanje, bijeli.",
            "weight_netto": "2.5 kg",
            "weight": "2.5 kg",
            "weight_packed": "12.5 kg",
            "warranty": 12,
            "category_id": 71,
            "subcategory_id": 447,
            "RRPrice": "12.90",
            "stock": "20.00"
        },
        {
            "ID": 11991,
            "EAN": "3838883574014",
            "Model": "A3\/R-Copy",
            "name": "Papir za printer, A3, 80 g, 500 listova",
            "brand_id": 1,
            "description": "Papir za Laser printer, Skenere, InkJet printere, A3, 500 listova, 80 g ",
            "weight_netto": "5 kg",
            "weight": "5.02 kg",
            "weight_packed": "25.1 kg",
            "warranty": 12,
            "category_id": 71,
            "subcategory_id": 447,
            "action": 1,
            "RRPrice": "16.90",
            "RRPrice_before": "19.90",
            "date_start": "2026-08-11",
            "date_end": "2026-08-28",
            "stock": "1.00"
        }
    ],
    "current_page": 1,
    "total_pages": 18
}
POST
/api/orders/create
Creates document with products

Creates a document with products you sent.

POST Structure

FieldTypeDescription
pay (optional)int
  • 0 - Cash (default)
  • 1 - Credit card
  • 3 - Virman
delivery_price (optional)floatIf provided, a delivery item will be added to the document with this price.
INFORMATION OF BUYER
buyer.name *stringUser who buying
buyer.address *stringAddress for delivery
buyer.town *stringTown for delivery
buyer.zip *stringPostal code for delivery
buyer.email (optional)emailEmail of user for info
buyer.phone (optional)numericPhone of user for info
PRODUCTS (up to 100)
products.[ 0 .. 100 ].id *intProduct ID
products.[ 0 .. 100 ].qty *floatQuantity for order
products.[ 0 .. 100 ].price (optional)floatPrice per unit (if permitted, otherwise, standard price will be used)

POST EXAMPLE

{
    "pay": 1,
    "delivery_price": "0.00",
    "buyer": {
        "name": "Nedžad Alibašić",
        "address": "Moja ulica 45",
        "town": "Travnik",
        "zip": "72270",
        "email": "nedzad@digitalis.ba"
    },
    "products": [
        {
            "id": 1000,
            "qty": 4,
            "price": "6.90"
        },
        {
            "id": 1001,
            "qty": 5,
            "price": "7.90"
        },
        {
            "id": 1000,
            "qty": 6,
            "price": "6.90"
        }
    ]
}

Response Structure

FieldTypeDescription
successboolean1 on document created
messagestringError message if failed
idintDocument ID that is created

Example SUCCESS

{
    "success": 1,
    "message": "",
    "id": 1930968
}
GET
/api/orders/get/{id}
Get order data

Returns a data of order and products.

GET Structure

FieldTypeDescription
id *intThe ID of the order returned by the orders/create endpoint.

Response Structure

FieldTypeDescription
successboolean1 on success, 0 on failure
messagestringError message if failed
dataarrayarray of data of order and products

Example SUCCESS

{
    "success": 1,
    "message": "",
    "data": {
        "oid_id": 1,
        "products": [
            {
                "aid": 1000,
                "price": "19.90",
                "rebate": "34.3",
                "quantity_ordered": 5,
                "quantity_delivered": 3
            },
            {
                ...
            }
        ]
    }
}