MENU navbar-image

Introduction

Authenticating requests

This API is not authenticated.

Auth

POST api/login

Example request:
const url = new URL(
    "http://localhost:8000/api/login"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "admin@gmail.com",
    "password": "ABC$123456"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/login

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

email   string   

Must be a valid email address. Example: admin@gmail.com

password   string   

Example: ABC$123456

GET api/logout

Example request:
const url = new URL(
    "http://localhost:8000/api/logout"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 198
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/logout

Headers

Authorization      

Example: Bearer {{token}}

POST api/register

Example request:
const url = new URL(
    "http://localhost:8000/api/register"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "naziv": "Naziv Firme",
    "imePrezime": "John Doe",
    "grad": "Krusevac",
    "adresa": "Adresa firme bb",
    "uloga": 1,
    "email": "radnik1@gmail.com",
    "password": "ABC$123456"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/register

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

naziv   string   

Example: Naziv Firme

imePrezime   string   

Must be at least 4 characters. Example: John Doe

grad   string   

Example: Krusevac

adresa   string   

Example: Adresa firme bb

uloga   integer   

Example: 1

Must be one of:
  • 1
email   string   

Must be a valid email address. Example: radnik1@gmail.com

password   string   

Must match the regex /^(?=.[A-Z])(?=.[@$!%?&])[A-Za-z\d@$!%?&]{6,}$/. Must be at least 6 characters. Example: ABC$123456

PUT api/changeGeneral

Example request:
const url = new URL(
    "http://localhost:8000/api/changeGeneral"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 1,
    "naziv": "Naziv Firme",
    "imePrezime": "John Doe",
    "grad": "Krusevac",
    "adresa": "Adresa firme bb",
    "email": "user1@gmail.com"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/changeGeneral

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

id   string   

Example: 1

naziv   string   

Example: Naziv Firme

imePrezime   string   

Must be at least 4 characters. Example: John Doe

grad   string   

Example: Krusevac

adresa   string   

Example: Adresa firme bb

email   string   

Must be a valid email address. Example: user1@gmail.com

PUT api/changePassword

Example request:
const url = new URL(
    "http://localhost:8000/api/changePassword"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "password": "ABC$123456"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/changePassword

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

password   string   

Must match the regex /^(?=.[A-Z])(?=.[@$!%?&])[A-Za-z\d@$!%?&]{6,}$/. Must be at least 6 characters. Example: ABC$123456

GET api/user

Example request:
const url = new URL(
    "http://localhost:8000/api/user"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 197
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/user

Headers

Authorization      

Example: Bearer {{token}}

AvansnaFaktura

PUT api/avansnaFaktura/generateCSV

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/avansnaFaktura/generateCSV"
);

const params = {
    "title": "Naziv",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/avansnaFaktura/generateCSV

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

ids   string  optional  

Example: 1,2,3

POST api/avansnaFaktura/generatePDF

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/avansnaFaktura/generatePDF"
);

const params = {
    "title": "Naziv",
    "orientation": "portrait",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/avansnaFaktura/generatePDF

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

orientation   string  optional  

Example: portrait

ids   string  optional  

Example: 1,2,3

GET api/avansnaFaktura/stats

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/avansnaFaktura/stats"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 153
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/avansnaFaktura/stats

Headers

Authorization      

Example: Bearer {{token}}

POST api/avansnaFaktura/batchUpdate

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/avansnaFaktura/batchUpdate"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/avansnaFaktura/batchUpdate

Headers

Authorization      

Example: Bearer {{token}}

POST api/avansnaFaktura/batchDelete

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/avansnaFaktura/batchDelete"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/avansnaFaktura/batchDelete

Headers

Authorization      

Example: Bearer {{token}}

PUT api/avansnaFaktura/storniraj/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/avansnaFaktura/storniraj/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/avansnaFaktura/storniraj/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

GET api/avansnaFaktura

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/avansnaFaktura"
);

const params = {
    "currentPage": "1",
    "pageSize": "10",
    "fromDate": "2022-01-01",
    "toDate": "2023-12-31",
    "searchQuery": "null",
    "isActive": "1",
    "sortColumn": "created_at",
    "sortDir": "asc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 152
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/avansnaFaktura

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

currentPage   integer  optional  

Example: 1

pageSize   integer  optional  

Example: 10

fromDate   string  optional  

Example: 2022-01-01

toDate   string  optional  

Example: 2023-12-31

searchQuery   string  optional  

Example: null

isActive   boolean  optional  

Example: true

sortColumn   string  optional  

Example: created_at

sortDir   string  optional  

Example: asc

POST api/avansnaFaktura

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/avansnaFaktura"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "brojDokumenta": "10\/23",
    "datumIzdavanja": "2023-10-25",
    "datumDospeca": "2023-11-30",
    "saPDV": false,
    "status": 0,
    "napomena": "Ne radi levi lift",
    "isActive": false,
    "ponuda_id": 1,
    "radni_nalog_id": 1,
    "lift_id": 1,
    "komitent_id": 1,
    "kategorija_id": 1,
    "avansna_faktura_stavke": [
        {
            "avansna_faktura_id": 1,
            "roba_id": 1,
            "usluga_id": null,
            "naziv": "Stavka 1",
            "kolicina": 1,
            "jedinicaMere": 1,
            "cena": 10
        },
        {
            "avansna_faktura_id": 1,
            "roba_id": null,
            "usluga_id": 1,
            "naziv": "Stavka 2",
            "kolicina": 1,
            "jedinicaMere": 1,
            "cena": 20
        },
        {
            "avansna_faktura_id": 1,
            "roba_id": 2,
            "usluga_id": null,
            "naziv": "Stavka 3",
            "kolicina": 1,
            "jedinicaMere": 1,
            "cena": 30
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/avansnaFaktura

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

brojDokumenta   string   

Example: 10/23

datumIzdavanja   string   

Must be a valid date. Example: 2023-10-25

datumDospeca   string   

Must be a valid date. Example: 2023-11-30

saPDV   boolean   

Example: false

status   integer   

Example: 0

Must be one of:
  • 0
  • 1
  • 2
  • 3
napomena   string   

Example: Ne radi levi lift

isActive   boolean   

Example: false

ponuda_id   integer  optional  

Example: 1

radni_nalog_id   integer  optional  

Example: 1

lift_id   integer  optional  

Example: 1

komitent_id   integer   

Example: 1

kategorija_id   integer   

Example: 1

avansna_faktura_stavke   string  optional  

GET api/avansnaFaktura/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/avansnaFaktura/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 151
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/avansnaFaktura/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PUT api/avansnaFaktura/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/avansnaFaktura/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "brojDokumenta": "10\/23",
    "datumIzdavanja": "2023-10-25",
    "datumDospeca": "2023-11-30",
    "saPDV": false,
    "status": 0,
    "napomena": "Ne radi levi lift",
    "isActive": false,
    "ponuda_id": 1,
    "radni_nalog_id": 1,
    "lift_id": 1,
    "komitent_id": 1,
    "kategorija_id": 1,
    "avansna_faktura_stavke": [
        {
            "avansna_faktura_id": 1,
            "roba_id": 1,
            "usluga_id": null,
            "naziv": "Stavka 1",
            "kolicina": 1,
            "jedinicaMere": 1,
            "cena": 10
        },
        {
            "avansna_faktura_id": 1,
            "roba_id": null,
            "usluga_id": 1,
            "naziv": "Stavka 2",
            "kolicina": 1,
            "jedinicaMere": 1,
            "cena": 20
        },
        {
            "avansna_faktura_id": 1,
            "roba_id": 2,
            "usluga_id": null,
            "naziv": "Stavka 3",
            "kolicina": 1,
            "jedinicaMere": 1,
            "cena": 30
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/avansnaFaktura/{id}

PATCH api/avansnaFaktura/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

brojDokumenta   string   

Example: 10/23

datumIzdavanja   string   

Must be a valid date. Example: 2023-10-25

datumDospeca   string   

Must be a valid date. Example: 2023-11-30

saPDV   boolean   

Example: false

status   integer   

Example: 0

Must be one of:
  • 0
  • 1
  • 2
  • 3
napomena   string   

Example: Ne radi levi lift

isActive   boolean   

Example: false

ponuda_id   integer  optional  

Example: 1

radni_nalog_id   integer  optional  

Example: 1

lift_id   integer  optional  

Example: 1

komitent_id   integer   

Example: 1

kategorija_id   integer   

Example: 1

avansna_faktura_stavke   string  optional  

DELETE api/avansnaFaktura/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/avansnaFaktura/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/avansnaFaktura/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

AvansnaFakturaStavke

GET api/avansnaFakturaStavke

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/avansnaFakturaStavke"
);

const params = {
    "currentPage": "1",
    "pageSize": "10",
    "fromDate": "2022-01-01",
    "toDate": "2023-12-31",
    "searchQuery": "null",
    "isActive": "1",
    "sortColumn": "created_at",
    "sortDir": "asc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 150
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/avansnaFakturaStavke

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

currentPage   integer  optional  

Example: 1

pageSize   integer  optional  

Example: 10

fromDate   string  optional  

Example: 2022-01-01

toDate   string  optional  

Example: 2023-12-31

searchQuery   string  optional  

Example: null

isActive   boolean  optional  

Example: true

sortColumn   string  optional  

Example: created_at

sortDir   string  optional  

Example: asc

POST api/avansnaFakturaStavke

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/avansnaFakturaStavke"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "avansna_faktura_id": 1,
    "roba_id": 1,
    "usluga_id": 1,
    "naziv": "Stavka 1",
    "kolicina": 1,
    "jedinicaMere": 1,
    "cena": 10
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/avansnaFakturaStavke

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

avansna_faktura_id   integer   

Example: 1

roba_id   integer  optional  

Example: 1

usluga_id   integer  optional  

Example: 1

naziv   string   

Example: Stavka 1

kolicina   number   

Example: 1

jedinicaMere   integer   

Example: 1

cena   number   

Example: 10

GET api/avansnaFakturaStavke/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/avansnaFakturaStavke/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 149
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/avansnaFakturaStavke/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PUT api/avansnaFakturaStavke/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/avansnaFakturaStavke/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "avansna_faktura_id": 1,
    "roba_id": 1,
    "usluga_id": 1,
    "naziv": "Stavka 1",
    "kolicina": 1,
    "jedinicaMere": 1,
    "cena": 10
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/avansnaFakturaStavke/{id}

PATCH api/avansnaFakturaStavke/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

avansna_faktura_id   integer   

Example: 1

roba_id   integer  optional  

Example: 1

usluga_id   integer  optional  

Example: 1

naziv   string   

Example: Stavka 1

kolicina   number   

Example: 1

jedinicaMere   integer   

Example: 1

cena   number   

Example: 10

DELETE api/avansnaFakturaStavke/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/avansnaFakturaStavke/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/avansnaFakturaStavke/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

Enums

GET api/enums

Example request:
const url = new URL(
    "http://localhost:8000/api/enums"
);

fetch(url, {
    method: "GET",
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 199
access-control-allow-origin: *
 

{
    "status": true,
    "message": "The data has been successfully displayed.",
    "data": {
        "JedinicaMere": {
            "None": 0,
            "kom": 1,
            "m": 2,
            "l": 3
        },
        "LiftType": {
            "None": 0,
            "Elektricni": 1,
            "Hidraulicni": 2
        },
        "RadnikType": {
            "None": 0,
            "Serviser": 1
        },
        "StatusDokumenta": {
            "None": 0,
            "Processing": 1,
            "Zavrsen": 2,
            "Storniran": 3
        },
        "UpravnikType": {
            "None": 0,
            "DomaceLice": 1,
            "ProfesionalniUpravnik": 2
        },
        "UserType": {
            "None": 0,
            "Admin": 1,
            "Radnik": 2,
            "Komitent": 3,
            "Upravnik": 4
        },
        "UslugaType": {
            "None": 0,
            "Cena": 1,
            "BrojRadnihSati": 2
        },
        "VrstaLifta": {
            "None": 0,
            "Putnicki": 1,
            "Teretni": 2,
            "MaloTeretni": 3
        },
        "NacinPlacanja": {
            "None": 0,
            "Virmanski": 1,
            "Gotovina": 2,
            "Avansno": 3
        },
        "VrstaFajla": {
            "Slika": "slika"
        },
        "Folder": {
            "User": "user",
            "Radnik": "radnik"
        },
        "VelicinaSlike": {
            "Mala": "mala",
            "Srednja": "srednja",
            "Velika": "velika"
        },
        "RobaUsluga": {
            "None": 0,
            "Roba": 1,
            "Usluga": 2
        }
    }
}
 

Request   

GET api/enums

Kategorija

PUT api/kategorija/generateCSV

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/kategorija/generateCSV"
);

const params = {
    "title": "Naziv",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/kategorija/generateCSV

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

ids   string  optional  

Example: 1,2,3

POST api/kategorija/generatePDF

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/kategorija/generatePDF"
);

const params = {
    "title": "Naziv",
    "orientation": "portrait",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/kategorija/generatePDF

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

orientation   string  optional  

Example: portrait

ids   string  optional  

Example: 1,2,3

GET api/kategorija/stats

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/kategorija/stats"
);

const params = {
    "searchQuery": "null",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 172
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/kategorija/stats

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

searchQuery   string  optional  

Example: null

POST api/kategorija/batchUpdate

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/kategorija/batchUpdate"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3",
    "isActive": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/kategorija/batchUpdate

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

isActive   boolean   

Example: false

POST api/kategorija/batchDelete

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/kategorija/batchDelete"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/kategorija/batchDelete

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

PUT api/kategorija/setDefault/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/kategorija/setDefault/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/kategorija/setDefault/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

GET api/kategorija/getDefault

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/kategorija/getDefault"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 171
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/kategorija/getDefault

Headers

Authorization      

Example: Bearer {{token}}

GET api/kategorija

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/kategorija"
);

const params = {
    "currentPage": "1",
    "pageSize": "10",
    "fromDate": "2022-01-01",
    "toDate": "2023-12-31",
    "searchQuery": "null",
    "isActive": "1",
    "sortColumn": "created_at",
    "sortDir": "asc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 170
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/kategorija

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

currentPage   integer  optional  

Example: 1

pageSize   integer  optional  

Example: 10

fromDate   string  optional  

Example: 2022-01-01

toDate   string  optional  

Example: 2023-12-31

searchQuery   string  optional  

Example: null

isActive   boolean  optional  

Example: true

sortColumn   string  optional  

Example: created_at

sortDir   string  optional  

Example: asc

POST api/kategorija

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/kategorija"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "naziv": "Kategorija 1",
    "isNaplativ": false,
    "isDefault": false,
    "isActive": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/kategorija

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

naziv   string   

Example: Kategorija 1

isNaplativ   boolean   

Example: false

isDefault   boolean  optional  

Example: false

isActive   boolean   

Example: false

GET api/kategorija/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/kategorija/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 169
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/kategorija/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PUT api/kategorija/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/kategorija/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "naziv": "Kategorija 1",
    "isNaplativ": false,
    "isDefault": false,
    "isActive": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/kategorija/{id}

PATCH api/kategorija/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

naziv   string   

Example: Kategorija 1

isNaplativ   boolean   

Example: false

isDefault   boolean  optional  

Example: false

isActive   boolean   

Example: false

DELETE api/kategorija/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/kategorija/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/kategorija/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

Komitent

PUT api/komitent/generateCSV

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/komitent/generateCSV"
);

const params = {
    "title": "Naziv",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/komitent/generateCSV

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

ids   string  optional  

Example: 1,2,3

POST api/komitent/generatePDF

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/komitent/generatePDF"
);

const params = {
    "title": "Naziv",
    "orientation": "portrait",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/komitent/generatePDF

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

orientation   string  optional  

Example: portrait

ids   string  optional  

Example: 1,2,3

GET api/komitent/stats

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/komitent/stats"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 184
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/komitent/stats

Headers

Authorization      

Example: Bearer {{token}}

POST api/komitent/batchUpdate

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/komitent/batchUpdate"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3",
    "isActive": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/komitent/batchUpdate

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

isActive   boolean   

Example: false

POST api/komitent/batchDelete

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/komitent/batchDelete"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/komitent/batchDelete

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

GET api/komitent

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/komitent"
);

const params = {
    "currentPage": "1",
    "pageSize": "10",
    "fromDate": "2022-01-01",
    "toDate": "2023-12-31",
    "searchQuery": "null",
    "isActive": "1",
    "sortColumn": "created_at",
    "sortDir": "asc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 183
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/komitent

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

currentPage   integer  optional  

Example: 1

pageSize   integer  optional  

Example: 10

fromDate   string  optional  

Example: 2022-01-01

toDate   string  optional  

Example: 2023-12-31

searchQuery   string  optional  

Example: null

isActive   boolean  optional  

Example: true

sortColumn   string  optional  

Example: created_at

sortDir   string  optional  

Example: asc

POST api/komitent

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/komitent"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "naziv": "John Doe",
    "grad": "Krusevac",
    "adresa": "Vidovdanska bb",
    "pib": "100123",
    "maticniBroj": "456987",
    "brojTelefona": "06X\/XXX-XX-XX",
    "isPDV": false,
    "uloga": 3,
    "isActive": false,
    "email": "komitent1@gmail.com",
    "password": "ABC$123456"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/komitent

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

naziv   string   

Example: John Doe

grad   string   

Example: Krusevac

adresa   string   

Example: Vidovdanska bb

pib   string   

Example: 100123

maticniBroj   string   

Example: 456987

brojTelefona   string   

Example: 06X/XXX-XX-XX

isPDV   boolean   

Example: false

uloga   integer   

Example: 3

Must be one of:
  • 3
isActive   boolean   

Example: false

email   string   

Must be a valid email address. Example: komitent1@gmail.com

password   string   

Must match the regex /^(?=.[A-Z])(?=.[@$!%?&])[A-Za-z\d@$!%?&]{6,}$/. Must be at least 6 characters. Example: ABC$123456

GET api/komitent/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/komitent/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 182
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/komitent/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PUT api/komitent/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/komitent/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "naziv": "John Doe",
    "grad": "Krusevac",
    "adresa": "Vidovdanska bb",
    "pib": "100123",
    "maticniBroj": "456987",
    "brojTelefona": "06X\/XXX-XX-XX",
    "isPDV": false,
    "uloga": 3,
    "isActive": false,
    "email": "komitent1@gmail.com",
    "password": "ABC$123456"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/komitent/{id}

PATCH api/komitent/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

naziv   string   

Example: John Doe

grad   string   

Example: Krusevac

adresa   string   

Example: Vidovdanska bb

pib   string   

Example: 100123

maticniBroj   string   

Example: 456987

brojTelefona   string   

Example: 06X/XXX-XX-XX

isPDV   boolean   

Example: false

uloga   integer   

Example: 3

Must be one of:
  • 3
isActive   boolean   

Example: false

email   string   

Must be a valid email address. Example: komitent1@gmail.com

password   string   

Must match the regex /^(?=.[A-Z])(?=.[@$!%?&])[A-Za-z\d@$!%?&]{6,}$/. Must be at least 6 characters. Example: ABC$123456

DELETE api/komitent/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/komitent/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/komitent/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

Lift

PUT api/lift/generateCSV

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/lift/generateCSV"
);

const params = {
    "title": "Naziv",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/lift/generateCSV

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

ids   string  optional  

Example: 1,2,3

POST api/lift/generatePDF

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/lift/generatePDF"
);

const params = {
    "title": "Naziv",
    "orientation": "portrait",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/lift/generatePDF

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

orientation   string  optional  

Example: portrait

ids   string  optional  

Example: 1,2,3

GET api/lift/stats

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/lift/stats"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 175
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/lift/stats

Headers

Authorization      

Example: Bearer {{token}}

POST api/lift/batchUpdate

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/lift/batchUpdate"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3",
    "isActive": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/lift/batchUpdate

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

isActive   boolean   

Example: false

POST api/lift/batchDelete

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/lift/batchDelete"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/lift/batchDelete

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

GET api/lift

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/lift"
);

const params = {
    "currentPage": "1",
    "pageSize": "10",
    "fromDate": "2022-01-01",
    "toDate": "2023-12-31",
    "searchQuery": "null",
    "isActive": "1",
    "sortColumn": "created_at",
    "sortDir": "asc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 174
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/lift

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

currentPage   integer  optional  

Example: 1

pageSize   integer  optional  

Example: 10

fromDate   string  optional  

Example: 2022-01-01

toDate   string  optional  

Example: 2023-12-31

searchQuery   string  optional  

Example: null

isActive   boolean  optional  

Example: true

sortColumn   string  optional  

Example: created_at

sortDir   string  optional  

Example: asc

POST api/lift

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/lift"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "naziv": "Lift 1",
    "grad": "Krusevac",
    "adresa": "Vidovdanska bb",
    "sifraProizvodjaca": "ABC-1234",
    "tip": 1,
    "vrstaLifta": 1,
    "nosivost": "250",
    "godinaProizvodnje": 2020,
    "brojStanica": "10",
    "vrstaMasine": "Vrsta 1",
    "saKucicom": false,
    "isActive": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/lift

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

naziv   string   

Example: Lift 1

grad   string   

Example: Krusevac

adresa   string   

Example: Vidovdanska bb

sifraProizvodjaca   string   

Example: ABC-1234

tip   integer   

Example: 1

vrstaLifta   integer   

Example: 1

nosivost   string   

Example: 250

godinaProizvodnje   string   

Example: 2020

brojStanica   string   

Example: 10

vrstaMasine   string   

Example: Vrsta 1

saKucicom   boolean   

Example: false

isActive   boolean   

Example: false

GET api/lift/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/lift/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 173
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/lift/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PUT api/lift/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/lift/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "naziv": "Lift 1",
    "grad": "Krusevac",
    "adresa": "Vidovdanska bb",
    "sifraProizvodjaca": "ABC-1234",
    "tip": 1,
    "vrstaLifta": 1,
    "nosivost": "250",
    "godinaProizvodnje": 2020,
    "brojStanica": "10",
    "vrstaMasine": "Vrsta 1",
    "saKucicom": false,
    "isActive": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/lift/{id}

PATCH api/lift/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

naziv   string   

Example: Lift 1

grad   string   

Example: Krusevac

adresa   string   

Example: Vidovdanska bb

sifraProizvodjaca   string   

Example: ABC-1234

tip   integer   

Example: 1

vrstaLifta   integer   

Example: 1

nosivost   string   

Example: 250

godinaProizvodnje   string   

Example: 2020

brojStanica   string   

Example: 10

vrstaMasine   string   

Example: Vrsta 1

saKucicom   boolean   

Example: false

isActive   boolean   

Example: false

DELETE api/lift/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/lift/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/lift/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

Marza

PUT api/marza/generateCSV

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/marza/generateCSV"
);

const params = {
    "title": "Naziv",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/marza/generateCSV

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

ids   string  optional  

Example: 1,2,3

POST api/marza/generatePDF

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/marza/generatePDF"
);

const params = {
    "title": "Naziv",
    "orientation": "portrait",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/marza/generatePDF

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

orientation   string  optional  

Example: portrait

ids   string  optional  

Example: 1,2,3

GET api/marza/stats

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/marza/stats"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 193
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/marza/stats

Headers

Authorization      

Example: Bearer {{token}}

POST api/marza/batchUpdate

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/marza/batchUpdate"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3",
    "isActive": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/marza/batchUpdate

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

isActive   boolean   

Example: false

POST api/marza/batchDelete

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/marza/batchDelete"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/marza/batchDelete

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

GET api/marza

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/marza"
);

const params = {
    "currentPage": "1",
    "pageSize": "10",
    "fromDate": "2022-01-01",
    "toDate": "2023-12-31",
    "searchQuery": "null",
    "isActive": "1",
    "sortColumn": "created_at",
    "sortDir": "asc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 192
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/marza

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

currentPage   integer  optional  

Example: 1

pageSize   integer  optional  

Example: 10

fromDate   string  optional  

Example: 2022-01-01

toDate   string  optional  

Example: 2023-12-31

searchQuery   string  optional  

Example: null

isActive   boolean  optional  

Example: true

sortColumn   string  optional  

Example: created_at

sortDir   string  optional  

Example: asc

POST api/marza

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/marza"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "naziv": "30%",
    "vrednost": 30,
    "isActive": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/marza

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

naziv   string   

Example: 30%

vrednost   integer   

Example: 30

isActive   boolean   

Example: false

GET api/marza/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/marza/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 191
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/marza/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PUT api/marza/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/marza/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "naziv": "30%",
    "vrednost": 30,
    "isActive": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/marza/{id}

PATCH api/marza/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

naziv   string   

Example: 30%

vrednost   integer   

Example: 30

isActive   boolean   

Example: false

DELETE api/marza/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/marza/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/marza/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

Ponuda

PUT api/ponuda/generateCSV

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ponuda/generateCSV"
);

const params = {
    "title": "Naziv",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/ponuda/generateCSV

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

ids   string  optional  

Example: 1,2,3

POST api/ponuda/generatePDF

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ponuda/generatePDF"
);

const params = {
    "title": "Naziv",
    "orientation": "portrait",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/ponuda/generatePDF

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

orientation   string  optional  

Example: portrait

ids   string  optional  

Example: 1,2,3

GET api/ponuda/stats

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ponuda/stats"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 159
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/ponuda/stats

Headers

Authorization      

Example: Bearer {{token}}

POST api/ponuda/batchUpdate

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ponuda/batchUpdate"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/ponuda/batchUpdate

Headers

Authorization      

Example: Bearer {{token}}

POST api/ponuda/batchDelete

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ponuda/batchDelete"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/ponuda/batchDelete

Headers

Authorization      

Example: Bearer {{token}}

PUT api/ponuda/storniraj/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ponuda/storniraj/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/ponuda/storniraj/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

GET api/ponuda/roba-usluga-list

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ponuda/roba-usluga-list"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 158
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/ponuda/roba-usluga-list

Headers

Authorization      

Example: Bearer {{token}}

GET api/ponuda

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ponuda"
);

const params = {
    "currentPage": "1",
    "pageSize": "10",
    "fromDate": "2022-01-01",
    "toDate": "2023-12-31",
    "searchQuery": "null",
    "isActive": "1",
    "sortColumn": "created_at",
    "sortDir": "asc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 157
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/ponuda

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

currentPage   integer  optional  

Example: 1

pageSize   integer  optional  

Example: 10

fromDate   string  optional  

Example: 2022-01-01

toDate   string  optional  

Example: 2023-12-31

searchQuery   string  optional  

Example: null

isActive   boolean  optional  

Example: true

sortColumn   string  optional  

Example: created_at

sortDir   string  optional  

Example: asc

POST api/ponuda

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ponuda"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "brojDokumenta": "10\/23",
    "datumPonude": "2023-10-25",
    "rokVazenja": "2023-11-30",
    "saPDV": false,
    "status": 0,
    "napomena": "Ne radi levi lift",
    "isActive": false,
    "zahtev_za_ponudu_id": 1,
    "lift_id": 1,
    "komitent_id": 1,
    "kategorija_id": 1,
    "ponuda_stavke": [
        {
            "ponuda_id": 1,
            "roba_id": 1,
            "usluga_id": null,
            "naziv": "Stavka 1",
            "kolicina": 1,
            "jedinicaMere": 1,
            "cena": 10
        },
        {
            "ponuda_id": 1,
            "roba_id": null,
            "usluga_id": 1,
            "naziv": "Stavka 2",
            "kolicina": 1,
            "jedinicaMere": 1,
            "cena": 20
        },
        {
            "ponuda_id": 1,
            "roba_id": 2,
            "usluga_id": null,
            "naziv": "Stavka 3",
            "kolicina": 1,
            "jedinicaMere": 1,
            "cena": 30
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/ponuda

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

brojDokumenta   string   

Example: 10/23

datumPonude   string   

Must be a valid date. Example: 2023-10-25

rokVazenja   string   

Must be a valid date. Example: 2023-11-30

saPDV   boolean   

Example: false

status   integer   

Example: 0

Must be one of:
  • 0
  • 1
  • 2
  • 3
napomena   string  optional  

Example: Ne radi levi lift

isActive   boolean   

Example: false

zahtev_za_ponudu_id   integer  optional  

Example: 1

lift_id   integer  optional  

Example: 1

komitent_id   integer   

Example: 1

kategorija_id   integer   

Example: 1

ponuda_stavke   string  optional  

GET api/ponuda/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ponuda/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 156
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/ponuda/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PUT api/ponuda/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ponuda/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "brojDokumenta": "10\/23",
    "datumPonude": "2023-10-25",
    "rokVazenja": "2023-11-30",
    "saPDV": false,
    "status": 0,
    "napomena": "Ne radi levi lift",
    "isActive": false,
    "zahtev_za_ponudu_id": 1,
    "lift_id": 1,
    "komitent_id": 1,
    "kategorija_id": 1,
    "ponuda_stavke": [
        {
            "ponuda_id": 1,
            "roba_id": 1,
            "usluga_id": null,
            "naziv": "Stavka 1",
            "kolicina": 1,
            "jedinicaMere": 1,
            "cena": 10
        },
        {
            "ponuda_id": 1,
            "roba_id": null,
            "usluga_id": 1,
            "naziv": "Stavka 2",
            "kolicina": 1,
            "jedinicaMere": 1,
            "cena": 20
        },
        {
            "ponuda_id": 1,
            "roba_id": 2,
            "usluga_id": null,
            "naziv": "Stavka 3",
            "kolicina": 1,
            "jedinicaMere": 1,
            "cena": 30
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/ponuda/{id}

PATCH api/ponuda/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

brojDokumenta   string   

Example: 10/23

datumPonude   string   

Must be a valid date. Example: 2023-10-25

rokVazenja   string   

Must be a valid date. Example: 2023-11-30

saPDV   boolean   

Example: false

status   integer   

Example: 0

Must be one of:
  • 0
  • 1
  • 2
  • 3
napomena   string  optional  

Example: Ne radi levi lift

isActive   boolean   

Example: false

zahtev_za_ponudu_id   integer  optional  

Example: 1

lift_id   integer  optional  

Example: 1

komitent_id   integer   

Example: 1

kategorija_id   integer   

Example: 1

ponuda_stavke   string  optional  

DELETE api/ponuda/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ponuda/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/ponuda/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PonudaStavke

GET api/ponudaStavke

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ponudaStavke"
);

const params = {
    "currentPage": "1",
    "pageSize": "10",
    "fromDate": "2022-01-01",
    "toDate": "2023-12-31",
    "searchQuery": "null",
    "isActive": "1",
    "sortColumn": "created_at",
    "sortDir": "asc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 155
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/ponudaStavke

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

currentPage   integer  optional  

Example: 1

pageSize   integer  optional  

Example: 10

fromDate   string  optional  

Example: 2022-01-01

toDate   string  optional  

Example: 2023-12-31

searchQuery   string  optional  

Example: null

isActive   boolean  optional  

Example: true

sortColumn   string  optional  

Example: created_at

sortDir   string  optional  

Example: asc

POST api/ponudaStavke

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ponudaStavke"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ponuda_id": 1,
    "roba_id": 1,
    "usluga_id": 1,
    "naziv": "Stavka 1",
    "kolicina": 1,
    "jedinicaMere": 1,
    "cena": 10
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/ponudaStavke

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ponuda_id   integer   

Example: 1

roba_id   integer  optional  

Example: 1

usluga_id   integer  optional  

Example: 1

naziv   string   

Example: Stavka 1

kolicina   number   

Example: 1

jedinicaMere   integer   

Example: 1

cena   number   

Example: 10

GET api/ponudaStavke/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ponudaStavke/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 154
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/ponudaStavke/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PUT api/ponudaStavke/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ponudaStavke/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ponuda_id": 1,
    "roba_id": 1,
    "usluga_id": 1,
    "naziv": "Stavka 1",
    "kolicina": 1,
    "jedinicaMere": 1,
    "cena": 10
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/ponudaStavke/{id}

PATCH api/ponudaStavke/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

ponuda_id   integer   

Example: 1

roba_id   integer  optional  

Example: 1

usluga_id   integer  optional  

Example: 1

naziv   string   

Example: Stavka 1

kolicina   number   

Example: 1

jedinicaMere   integer   

Example: 1

cena   number   

Example: 10

DELETE api/ponudaStavke/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ponudaStavke/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/ponudaStavke/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

Proizvodjac

PUT api/proizvodjac/generateCSV

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/proizvodjac/generateCSV"
);

const params = {
    "title": "Naziv",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/proizvodjac/generateCSV

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

ids   string  optional  

Example: 1,2,3

POST api/proizvodjac/generatePDF

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/proizvodjac/generatePDF"
);

const params = {
    "title": "Naziv",
    "orientation": "portrait",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/proizvodjac/generatePDF

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

orientation   string  optional  

Example: portrait

ids   string  optional  

Example: 1,2,3

GET api/proizvodjac/stats

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/proizvodjac/stats"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 190
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/proizvodjac/stats

Headers

Authorization      

Example: Bearer {{token}}

POST api/proizvodjac/batchUpdate

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/proizvodjac/batchUpdate"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3",
    "isActive": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/proizvodjac/batchUpdate

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

isActive   boolean   

Example: false

POST api/proizvodjac/batchDelete

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/proizvodjac/batchDelete"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/proizvodjac/batchDelete

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

GET api/proizvodjac

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/proizvodjac"
);

const params = {
    "currentPage": "1",
    "pageSize": "10",
    "fromDate": "2022-01-01",
    "toDate": "2023-12-31",
    "searchQuery": "null",
    "isActive": "1",
    "sortColumn": "created_at",
    "sortDir": "asc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 189
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/proizvodjac

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

currentPage   integer  optional  

Example: 1

pageSize   integer  optional  

Example: 10

fromDate   string  optional  

Example: 2022-01-01

toDate   string  optional  

Example: 2023-12-31

searchQuery   string  optional  

Example: null

isActive   boolean  optional  

Example: true

sortColumn   string  optional  

Example: created_at

sortDir   string  optional  

Example: asc

POST api/proizvodjac

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/proizvodjac"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "naziv": "Proizvodjac 1",
    "isActive": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/proizvodjac

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

naziv   string   

Example: Proizvodjac 1

isActive   boolean   

Example: false

GET api/proizvodjac/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/proizvodjac/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 188
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/proizvodjac/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PUT api/proizvodjac/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/proizvodjac/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "naziv": "Proizvodjac 1",
    "isActive": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/proizvodjac/{id}

PATCH api/proizvodjac/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

naziv   string   

Example: Proizvodjac 1

isActive   boolean   

Example: false

DELETE api/proizvodjac/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/proizvodjac/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/proizvodjac/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

RadniNalog

PUT api/radniNalog/generateCSV

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radniNalog/generateCSV"
);

const params = {
    "title": "Naziv",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/radniNalog/generateCSV

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

ids   string  optional  

Example: 1,2,3

POST api/radniNalog/generatePDF

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radniNalog/generatePDF"
);

const params = {
    "title": "Naziv",
    "orientation": "portrait",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/radniNalog/generatePDF

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

orientation   string  optional  

Example: portrait

ids   string  optional  

Example: 1,2,3

GET api/radniNalog/stats

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radniNalog/stats"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 162
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/radniNalog/stats

Headers

Authorization      

Example: Bearer {{token}}

POST api/radniNalog/batchUpdate

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radniNalog/batchUpdate"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/radniNalog/batchUpdate

Headers

Authorization      

Example: Bearer {{token}}

POST api/radniNalog/batchDelete

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radniNalog/batchDelete"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/radniNalog/batchDelete

Headers

Authorization      

Example: Bearer {{token}}

PUT api/radniNalog/storniraj/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radniNalog/storniraj/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/radniNalog/storniraj/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

GET api/radniNalog

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radniNalog"
);

const params = {
    "currentPage": "1",
    "pageSize": "10",
    "fromDate": "2022-01-01",
    "toDate": "2023-12-31",
    "searchQuery": "null",
    "isActive": "1",
    "sortColumn": "created_at",
    "sortDir": "asc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 161
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/radniNalog

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

currentPage   integer  optional  

Example: 1

pageSize   integer  optional  

Example: 10

fromDate   string  optional  

Example: 2022-01-01

toDate   string  optional  

Example: 2023-12-31

searchQuery   string  optional  

Example: null

isActive   boolean  optional  

Example: true

sortColumn   string  optional  

Example: created_at

sortDir   string  optional  

Example: asc

POST api/radniNalog

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radniNalog"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "brojDokumenta": "10\/23",
    "status": 0,
    "radnici_ids": "1,2",
    "brojRadnihSatiPoRadniku": 120,
    "cenaRadnogSataIzUgovora": 250,
    "napomena": "Ne radi levi lift",
    "isActive": false,
    "zahtev_za_radni_nalog_id": 1,
    "lift_id": 1,
    "kategorija_id": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/radniNalog

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

brojDokumenta   string   

Example: 10/23

status   integer   

Example: 0

Must be one of:
  • 0
  • 1
  • 2
  • 3
radnici_ids   string  optional  

Example: 1,2

brojRadnihSatiPoRadniku   integer   

Example: 120

cenaRadnogSataIzUgovora   number   

Example: 250

napomena   string   

Example: Ne radi levi lift

isActive   boolean   

Example: false

zahtev_za_radni_nalog_id   integer  optional  

Example: 1

lift_id   integer   

Example: 1

kategorija_id   integer   

Example: 1

GET api/radniNalog/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radniNalog/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 160
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/radniNalog/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PUT api/radniNalog/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radniNalog/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "brojDokumenta": "10\/23",
    "status": 0,
    "radnici_ids": "1,2",
    "brojRadnihSatiPoRadniku": 120,
    "cenaRadnogSataIzUgovora": 250,
    "napomena": "Ne radi levi lift",
    "isActive": false,
    "zahtev_za_radni_nalog_id": 1,
    "lift_id": 1,
    "kategorija_id": 1
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/radniNalog/{id}

PATCH api/radniNalog/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

brojDokumenta   string   

Example: 10/23

status   integer   

Example: 0

Must be one of:
  • 0
  • 1
  • 2
  • 3
radnici_ids   string  optional  

Example: 1,2

brojRadnihSatiPoRadniku   integer   

Example: 120

cenaRadnogSataIzUgovora   number   

Example: 250

napomena   string   

Example: Ne radi levi lift

isActive   boolean   

Example: false

zahtev_za_radni_nalog_id   integer  optional  

Example: 1

lift_id   integer   

Example: 1

kategorija_id   integer   

Example: 1

DELETE api/radniNalog/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radniNalog/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/radniNalog/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

Radnik

PUT api/radnik/generateCSV

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radnik/generateCSV"
);

const params = {
    "title": "Naziv",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/radnik/generateCSV

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

ids   string  optional  

Example: 1,2,3

POST api/radnik/generatePDF

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radnik/generatePDF"
);

const params = {
    "title": "Naziv",
    "orientation": "portrait",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/radnik/generatePDF

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

orientation   string  optional  

Example: portrait

ids   string  optional  

Example: 1,2,3

GET api/radnik/stats

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radnik/stats"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 196
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/radnik/stats

Headers

Authorization      

Example: Bearer {{token}}

PUT api/radnik/changeGeneral/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radnik/changeGeneral/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "imePrezime": "John Doe",
    "grad": "Krusevac",
    "adresa": "Adresa firme bb",
    "email": "user1@gmail.com"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/radnik/changeGeneral/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

imePrezime   string   

Must be at least 4 characters. Example: John Doe

grad   string   

Example: Krusevac

adresa   string   

Example: Adresa firme bb

email   string   

Must be a valid email address. Example: user1@gmail.com

PUT api/radnik/changePassword/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radnik/changePassword/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "password": "ABC$123456"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/radnik/changePassword/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

password   string   

Must match the regex /^(?=.[A-Z])(?=.[@$!%?&])[A-Za-z\d@$!%?&]{6,}$/. Must be at least 6 characters. Example: ABC$123456

POST api/radnik/uploadLogo/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radnik/uploadLogo/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/radnik/uploadLogo/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

Body Parameters

logo   file  optional  

Must be an image. Must not be greater than 2048 kilobytes.

POST api/radnik/removeLogo/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radnik/removeLogo/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/radnik/removeLogo/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

POST api/radnik/batchUpdate

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radnik/batchUpdate"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3",
    "isActive": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/radnik/batchUpdate

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

isActive   boolean   

Example: false

POST api/radnik/batchDelete

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radnik/batchDelete"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/radnik/batchDelete

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

GET api/radnik

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radnik"
);

const params = {
    "currentPage": "1",
    "pageSize": "10",
    "fromDate": "2022-01-01",
    "toDate": "2023-12-31",
    "searchQuery": "null",
    "isActive": "1",
    "sortColumn": "created_at",
    "sortDir": "asc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 195
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/radnik

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

currentPage   integer  optional  

Example: 1

pageSize   integer  optional  

Example: 10

fromDate   string  optional  

Example: 2022-01-01

toDate   string  optional  

Example: 2023-12-31

searchQuery   string  optional  

Example: null

isActive   boolean  optional  

Example: true

sortColumn   string  optional  

Example: created_at

sortDir   string  optional  

Example: asc

POST api/radnik

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radnik"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "imePrezime": "John Doe",
    "grad": "Krusevac",
    "adresa": "Vidovdanska bb",
    "brojTelefona": "06X\/XXX-XX-XX",
    "uloga": 2,
    "tip": 1,
    "isActive": false,
    "email": "radnik1@gmail.com",
    "password": "ABC$123456"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/radnik

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

imePrezime   string   

Example: John Doe

grad   string   

Example: Krusevac

adresa   string   

Example: Vidovdanska bb

brojTelefona   string   

Example: 06X/XXX-XX-XX

uloga   integer   

Example: 2

Must be one of:
  • 2
tip   integer   

Example: 1

isActive   boolean   

Example: false

email   string   

Must be a valid email address. Example: radnik1@gmail.com

password   string   

Must match the regex /^(?=.[A-Z])(?=.[@$!%?&])[A-Za-z\d@$!%?&]{6,}$/. Must be at least 6 characters. Example: ABC$123456

GET api/radnik/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radnik/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 194
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/radnik/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PUT api/radnik/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radnik/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "imePrezime": "John Doe",
    "grad": "Krusevac",
    "adresa": "Vidovdanska bb",
    "brojTelefona": "06X\/XXX-XX-XX",
    "uloga": 2,
    "tip": 1,
    "isActive": false,
    "email": "radnik1@gmail.com",
    "password": "ABC$123456"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/radnik/{id}

PATCH api/radnik/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

imePrezime   string   

Example: John Doe

grad   string   

Example: Krusevac

adresa   string   

Example: Vidovdanska bb

brojTelefona   string   

Example: 06X/XXX-XX-XX

uloga   integer   

Example: 2

Must be one of:
  • 2
tip   integer   

Example: 1

isActive   boolean   

Example: false

email   string   

Must be a valid email address. Example: radnik1@gmail.com

password   string   

Must match the regex /^(?=.[A-Z])(?=.[@$!%?&])[A-Za-z\d@$!%?&]{6,}$/. Must be at least 6 characters. Example: ABC$123456

DELETE api/radnik/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/radnik/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/radnik/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

Roba

PUT api/roba/generateCSV

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/roba/generateCSV"
);

const params = {
    "title": "Naziv",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/roba/generateCSV

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

ids   string  optional  

Example: 1,2,3

POST api/roba/generatePDF

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/roba/generatePDF"
);

const params = {
    "title": "Naziv",
    "orientation": "portrait",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/roba/generatePDF

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

orientation   string  optional  

Example: portrait

ids   string  optional  

Example: 1,2,3

GET api/roba/stats

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/roba/stats"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 187
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/roba/stats

Headers

Authorization      

Example: Bearer {{token}}

POST api/roba/batchUpdate

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/roba/batchUpdate"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3",
    "isActive": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/roba/batchUpdate

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

isActive   boolean   

Example: false

POST api/roba/batchDelete

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/roba/batchDelete"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/roba/batchDelete

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

GET api/roba

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/roba"
);

const params = {
    "currentPage": "1",
    "pageSize": "10",
    "fromDate": "2022-01-01",
    "toDate": "2023-12-31",
    "searchQuery": "null",
    "isActive": "1",
    "sortColumn": "created_at",
    "sortDir": "asc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 186
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/roba

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

currentPage   integer  optional  

Example: 1

pageSize   integer  optional  

Example: 10

fromDate   string  optional  

Example: 2022-01-01

toDate   string  optional  

Example: 2023-12-31

searchQuery   string  optional  

Example: null

isActive   boolean  optional  

Example: true

sortColumn   string  optional  

Example: created_at

sortDir   string  optional  

Example: asc

POST api/roba

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/roba"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "naziv": "Roba 1",
    "jedinicaMere": 1,
    "cena": 250,
    "isActive": false,
    "marza_id": 1,
    "proizvodjac_id": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/roba

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

naziv   string   

Example: Roba 1

jedinicaMere   integer   

Example: 1

cena   number   

Example: 250

isActive   boolean   

Example: false

marza_id   integer   

Example: 1

proizvodjac_id   integer   

Example: 1

GET api/roba/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/roba/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 185
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/roba/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PUT api/roba/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/roba/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "naziv": "Roba 1",
    "jedinicaMere": 1,
    "cena": 250,
    "isActive": false,
    "marza_id": 1,
    "proizvodjac_id": 1
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/roba/{id}

PATCH api/roba/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

naziv   string   

Example: Roba 1

jedinicaMere   integer   

Example: 1

cena   number   

Example: 250

isActive   boolean   

Example: false

marza_id   integer   

Example: 1

proizvodjac_id   integer   

Example: 1

DELETE api/roba/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/roba/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/roba/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

Ugovor

GET api/ugovor

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ugovor"
);

const params = {
    "currentPage": "1",
    "pageSize": "10",
    "fromDate": "2022-01-01",
    "toDate": "2023-12-31",
    "searchQuery": "null",
    "isActive": "1",
    "sortColumn": "created_at",
    "sortDir": "asc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 141
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/ugovor

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

currentPage   integer  optional  

Example: 1

pageSize   integer  optional  

Example: 10

fromDate   string  optional  

Example: 2022-01-01

toDate   string  optional  

Example: 2023-12-31

searchQuery   string  optional  

Example: null

isActive   boolean  optional  

Example: true

sortColumn   string  optional  

Example: created_at

sortDir   string  optional  

Example: asc

POST api/ugovor

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ugovor"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "brojDokumenta": "10\/23",
    "vaziDo": "2023-10-25",
    "zakljucan": false,
    "isActive": false,
    "upravnik_id": 1,
    "komitent_id": 1,
    "kategorija_id": 1,
    "ugovor_lift": [
        {
            "lift_id": 1,
            "cenaServisa": 10,
            "cenaRadnogSataSmena1": 10,
            "cenaRadnogSataSmena2": 10,
            "cenaRadnogSataSmena3": 10
        },
        {
            "lift_id": 1,
            "cenaServisa": 20,
            "cenaRadnogSataSmena1": 20,
            "cenaRadnogSataSmena2": 20,
            "cenaRadnogSataSmena3": 20
        },
        {
            "lift_id": 1,
            "cenaServisa": 30,
            "cenaRadnogSataSmena1": 30,
            "cenaRadnogSataSmena2": 30,
            "cenaRadnogSataSmena3": 30
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/ugovor

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

brojDokumenta   string   

Example: 10/23

vaziDo   string   

Must be a valid date. Example: 2023-10-25

zakljucan   boolean   

Example: false

isActive   boolean   

Example: false

upravnik_id   integer   

Example: 1

komitent_id   integer   

Example: 1

kategorija_id   integer   

Example: 1

ugovor_lift   string  optional  

GET api/ugovor/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ugovor/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 140
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/ugovor/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PUT api/ugovor/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ugovor/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "brojDokumenta": "10\/23",
    "vaziDo": "2023-10-25",
    "zakljucan": false,
    "isActive": false,
    "upravnik_id": 1,
    "komitent_id": 1,
    "kategorija_id": 1,
    "ugovor_lift": [
        {
            "lift_id": 1,
            "cenaServisa": 10,
            "cenaRadnogSataSmena1": 10,
            "cenaRadnogSataSmena2": 10,
            "cenaRadnogSataSmena3": 10
        },
        {
            "lift_id": 1,
            "cenaServisa": 20,
            "cenaRadnogSataSmena1": 20,
            "cenaRadnogSataSmena2": 20,
            "cenaRadnogSataSmena3": 20
        },
        {
            "lift_id": 1,
            "cenaServisa": 30,
            "cenaRadnogSataSmena1": 30,
            "cenaRadnogSataSmena2": 30,
            "cenaRadnogSataSmena3": 30
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/ugovor/{id}

PATCH api/ugovor/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

brojDokumenta   string   

Example: 10/23

vaziDo   string   

Must be a valid date. Example: 2023-10-25

zakljucan   boolean   

Example: false

isActive   boolean   

Example: false

upravnik_id   integer   

Example: 1

komitent_id   integer   

Example: 1

kategorija_id   integer   

Example: 1

ugovor_lift   string  optional  

DELETE api/ugovor/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ugovor/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/ugovor/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

UgovorLift

GET api/ugovorLift

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ugovorLift"
);

const params = {
    "currentPage": "1",
    "pageSize": "10",
    "fromDate": "2022-01-01",
    "toDate": "2023-12-31",
    "searchQuery": "null",
    "isActive": "1",
    "sortColumn": "created_at",
    "sortDir": "asc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 143
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/ugovorLift

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

currentPage   integer  optional  

Example: 1

pageSize   integer  optional  

Example: 10

fromDate   string  optional  

Example: 2022-01-01

toDate   string  optional  

Example: 2023-12-31

searchQuery   string  optional  

Example: null

isActive   boolean  optional  

Example: true

sortColumn   string  optional  

Example: created_at

sortDir   string  optional  

Example: asc

POST api/ugovorLift

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ugovorLift"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ugovor_id": 1,
    "lift_id": 1,
    "cenaServisa": 250,
    "cenaRadnogSataSmena1": 10,
    "cenaRadnogSataSmena2": 20,
    "cenaRadnogSataSmena3": 30
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/ugovorLift

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ugovor_id   integer   

Example: 1

lift_id   integer   

Example: 1

cenaServisa   number   

Example: 250

cenaRadnogSataSmena1   number   

Example: 10

cenaRadnogSataSmena2   number  optional  

Example: 20

cenaRadnogSataSmena3   number  optional  

Example: 30

GET api/ugovorLift/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ugovorLift/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 142
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/ugovorLift/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PUT api/ugovorLift/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ugovorLift/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ugovor_id": 1,
    "lift_id": 1,
    "cenaServisa": 250,
    "cenaRadnogSataSmena1": 10,
    "cenaRadnogSataSmena2": 20,
    "cenaRadnogSataSmena3": 30
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/ugovorLift/{id}

PATCH api/ugovorLift/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

ugovor_id   integer   

Example: 1

lift_id   integer   

Example: 1

cenaServisa   number   

Example: 250

cenaRadnogSataSmena1   number   

Example: 10

cenaRadnogSataSmena2   number  optional  

Example: 20

cenaRadnogSataSmena3   number  optional  

Example: 30

DELETE api/ugovorLift/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/ugovorLift/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/ugovorLift/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

Upravnik

PUT api/upravnik/generateCSV

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/upravnik/generateCSV"
);

const params = {
    "title": "Naziv",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/upravnik/generateCSV

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

ids   string  optional  

Example: 1,2,3

POST api/upravnik/generatePDF

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/upravnik/generatePDF"
);

const params = {
    "title": "Naziv",
    "orientation": "portrait",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/upravnik/generatePDF

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

orientation   string  optional  

Example: portrait

ids   string  optional  

Example: 1,2,3

GET api/upravnik/stats

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/upravnik/stats"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 178
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/upravnik/stats

Headers

Authorization      

Example: Bearer {{token}}

POST api/upravnik/batchUpdate

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/upravnik/batchUpdate"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3",
    "isActive": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/upravnik/batchUpdate

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

isActive   boolean   

Example: false

POST api/upravnik/batchDelete

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/upravnik/batchDelete"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/upravnik/batchDelete

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

GET api/upravnik

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/upravnik"
);

const params = {
    "currentPage": "1",
    "pageSize": "10",
    "fromDate": "2022-01-01",
    "toDate": "2023-12-31",
    "searchQuery": "null",
    "isActive": "1",
    "sortColumn": "created_at",
    "sortDir": "asc",
    "tip": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 177
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/upravnik

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

currentPage   integer  optional  

Example: 1

pageSize   integer  optional  

Example: 10

fromDate   string  optional  

Example: 2022-01-01

toDate   string  optional  

Example: 2023-12-31

searchQuery   string  optional  

Example: null

isActive   boolean  optional  

Example: true

sortColumn   string  optional  

Example: created_at

sortDir   string  optional  

Example: asc

tip   boolean  optional  

Example: true

POST api/upravnik

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/upravnik"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "imePrezime": "John Doe",
    "grad": "Krusevac",
    "adresa": "Vidovdanska bb",
    "brojTelefona": "06X\/XXX-XX-XX",
    "uloga": 4,
    "tip": 1,
    "isActive": false,
    "email": "upravnik1@gmail.com",
    "password": "ABC$123456"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/upravnik

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

imePrezime   string   

Example: John Doe

grad   string   

Example: Krusevac

adresa   string   

Example: Vidovdanska bb

brojTelefona   string   

Example: 06X/XXX-XX-XX

uloga   integer   

Example: 4

Must be one of:
  • 4
tip   string   

Example: 1

isActive   boolean   

Example: false

email   string   

Must be a valid email address. Example: upravnik1@gmail.com

password   string   

Must match the regex /^(?=.[A-Z])(?=.[@$!%?&])[A-Za-z\d@$!%?&]{6,}$/. Must be at least 6 characters. Example: ABC$123456

GET api/upravnik/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/upravnik/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 176
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/upravnik/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PUT api/upravnik/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/upravnik/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "imePrezime": "John Doe",
    "grad": "Krusevac",
    "adresa": "Vidovdanska bb",
    "brojTelefona": "06X\/XXX-XX-XX",
    "uloga": 4,
    "tip": 1,
    "isActive": false,
    "email": "upravnik1@gmail.com",
    "password": "ABC$123456"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/upravnik/{id}

PATCH api/upravnik/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

imePrezime   string   

Example: John Doe

grad   string   

Example: Krusevac

adresa   string   

Example: Vidovdanska bb

brojTelefona   string   

Example: 06X/XXX-XX-XX

uloga   integer   

Example: 4

Must be one of:
  • 4
tip   string   

Example: 1

isActive   boolean   

Example: false

email   string   

Must be a valid email address. Example: upravnik1@gmail.com

password   string   

Must match the regex /^(?=.[A-Z])(?=.[@$!%?&])[A-Za-z\d@$!%?&]{6,}$/. Must be at least 6 characters. Example: ABC$123456

DELETE api/upravnik/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/upravnik/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/upravnik/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

Usluga

PUT api/usluga/generateCSV

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/usluga/generateCSV"
);

const params = {
    "title": "Naziv",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/usluga/generateCSV

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

ids   string  optional  

Example: 1,2,3

POST api/usluga/generatePDF

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/usluga/generatePDF"
);

const params = {
    "title": "Naziv",
    "orientation": "portrait",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/usluga/generatePDF

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

orientation   string  optional  

Example: portrait

ids   string  optional  

Example: 1,2,3

GET api/usluga/stats

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/usluga/stats"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 181
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/usluga/stats

Headers

Authorization      

Example: Bearer {{token}}

POST api/usluga/batchUpdate

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/usluga/batchUpdate"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3",
    "isActive": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/usluga/batchUpdate

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

isActive   boolean   

Example: false

POST api/usluga/batchDelete

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/usluga/batchDelete"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/usluga/batchDelete

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

GET api/usluga

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/usluga"
);

const params = {
    "currentPage": "1",
    "pageSize": "10",
    "fromDate": "2022-01-01",
    "toDate": "2023-12-31",
    "searchQuery": "null",
    "isActive": "1",
    "sortColumn": "created_at",
    "sortDir": "asc",
    "tipUsluge": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 180
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/usluga

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

currentPage   integer  optional  

Example: 1

pageSize   integer  optional  

Example: 10

fromDate   string  optional  

Example: 2022-01-01

toDate   string  optional  

Example: 2023-12-31

searchQuery   string  optional  

Example: null

isActive   boolean  optional  

Example: true

sortColumn   string  optional  

Example: created_at

sortDir   string  optional  

Example: asc

tipUsluge   boolean  optional  

Example: true

POST api/usluga

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/usluga"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "naziv": "Usluga 1",
    "tipUsluge": 1,
    "cena": 200,
    "brojRadnihSati": 6,
    "isActive": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/usluga

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

naziv   string   

Example: Usluga 1

tipUsluge   integer   

Example: 1

cena   number  optional  

This field is required when tipUsluge is 1. Example: 200

brojRadnihSati   integer  optional  

This field is required when tipUsluge is 2. Example: 6

isActive   boolean   

Example: false

GET api/usluga/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/usluga/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 179
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/usluga/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PUT api/usluga/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/usluga/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "naziv": "Usluga 1",
    "tipUsluge": 1,
    "cena": 200,
    "brojRadnihSati": 6,
    "isActive": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/usluga/{id}

PATCH api/usluga/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

naziv   string   

Example: Usluga 1

tipUsluge   integer   

Example: 1

cena   number  optional  

This field is required when tipUsluge is 1. Example: 200

brojRadnihSati   integer  optional  

This field is required when tipUsluge is 2. Example: 6

isActive   boolean   

Example: false

DELETE api/usluga/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/usluga/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/usluga/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

ZahtevZaPonudu

PUT api/zahtevZaPonudu/generateCSV

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaPonudu/generateCSV"
);

const params = {
    "title": "Naziv",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/zahtevZaPonudu/generateCSV

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

ids   string  optional  

Example: 1,2,3

POST api/zahtevZaPonudu/generatePDF

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaPonudu/generatePDF"
);

const params = {
    "title": "Naziv",
    "orientation": "portrait",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/zahtevZaPonudu/generatePDF

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

orientation   string  optional  

Example: portrait

ids   string  optional  

Example: 1,2,3

GET api/zahtevZaPonudu/stats

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaPonudu/stats"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 165
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/zahtevZaPonudu/stats

Headers

Authorization      

Example: Bearer {{token}}

POST api/zahtevZaPonudu/batchUpdate

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaPonudu/batchUpdate"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3",
    "isActive": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/zahtevZaPonudu/batchUpdate

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

isActive   boolean   

Example: false

POST api/zahtevZaPonudu/batchDelete

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaPonudu/batchDelete"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/zahtevZaPonudu/batchDelete

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

PUT api/zahtevZaPonudu/storniraj/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaPonudu/storniraj/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/zahtevZaPonudu/storniraj/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

GET api/zahtevZaPonudu

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaPonudu"
);

const params = {
    "currentPage": "1",
    "pageSize": "10",
    "fromDate": "2022-01-01",
    "toDate": "2023-12-31",
    "searchQuery": "null",
    "isActive": "1",
    "sortColumn": "created_at",
    "sortDir": "asc",
    "status": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 164
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/zahtevZaPonudu

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

currentPage   integer  optional  

Example: 1

pageSize   integer  optional  

Example: 10

fromDate   string  optional  

Example: 2022-01-01

toDate   string  optional  

Example: 2023-12-31

searchQuery   string  optional  

Example: null

isActive   boolean  optional  

Example: true

sortColumn   string  optional  

Example: created_at

sortDir   string  optional  

Example: asc

status   boolean  optional  

Example: true

POST api/zahtevZaPonudu

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaPonudu"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "brojDokumenta": "10\/23",
    "napomena": "Opis ponude",
    "status": 0,
    "isActive": false,
    "lift_id": 1,
    "kategorija_id": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/zahtevZaPonudu

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

brojDokumenta   string   

Example: 10/23

napomena   string   

Example: Opis ponude

status   integer   

Example: 0

Must be one of:
  • 0
  • 1
  • 2
  • 3
isActive   boolean   

Example: false

lift_id   integer   

Example: 1

kategorija_id   integer   

Example: 1

GET api/zahtevZaPonudu/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaPonudu/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 163
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/zahtevZaPonudu/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PUT api/zahtevZaPonudu/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaPonudu/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "brojDokumenta": "10\/23",
    "napomena": "Opis ponude",
    "status": 0,
    "isActive": false,
    "lift_id": 1,
    "kategorija_id": 1
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/zahtevZaPonudu/{id}

PATCH api/zahtevZaPonudu/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

brojDokumenta   string   

Example: 10/23

napomena   string   

Example: Opis ponude

status   integer   

Example: 0

Must be one of:
  • 0
  • 1
  • 2
  • 3
isActive   boolean   

Example: false

lift_id   integer   

Example: 1

kategorija_id   integer   

Example: 1

DELETE api/zahtevZaPonudu/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaPonudu/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/zahtevZaPonudu/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

ZahtevZaRadniNalog

PUT api/zahtevZaRadniNalog/generateCSV

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaRadniNalog/generateCSV"
);

const params = {
    "title": "Naziv",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/zahtevZaRadniNalog/generateCSV

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

ids   string  optional  

Example: 1,2,3

POST api/zahtevZaRadniNalog/generatePDF

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaRadniNalog/generatePDF"
);

const params = {
    "title": "Naziv",
    "orientation": "portrait",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/zahtevZaRadniNalog/generatePDF

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

orientation   string  optional  

Example: portrait

ids   string  optional  

Example: 1,2,3

GET api/zahtevZaRadniNalog/stats

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaRadniNalog/stats"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 168
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/zahtevZaRadniNalog/stats

Headers

Authorization      

Example: Bearer {{token}}

POST api/zahtevZaRadniNalog/batchUpdate

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaRadniNalog/batchUpdate"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3",
    "isActive": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/zahtevZaRadniNalog/batchUpdate

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

isActive   boolean   

Example: false

POST api/zahtevZaRadniNalog/batchDelete

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaRadniNalog/batchDelete"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "1,2,3"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/zahtevZaRadniNalog/batchDelete

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

ids   string   

Example: 1,2,3

PUT api/zahtevZaRadniNalog/changeStatus/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaRadniNalog/changeStatus/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "status": 0
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/zahtevZaRadniNalog/changeStatus/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

status   integer   

Example: 0

Must be one of:
  • 0
  • 1
  • 2
  • 3

PUT api/zahtevZaRadniNalog/storniraj/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaRadniNalog/storniraj/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/zahtevZaRadniNalog/storniraj/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

GET api/zahtevZaRadniNalog

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaRadniNalog"
);

const params = {
    "currentPage": "1",
    "pageSize": "10",
    "fromDate": "2022-01-01",
    "toDate": "2023-12-31",
    "searchQuery": "null",
    "isActive": "1",
    "sortColumn": "created_at",
    "sortDir": "asc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 167
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/zahtevZaRadniNalog

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

currentPage   integer  optional  

Example: 1

pageSize   integer  optional  

Example: 10

fromDate   string  optional  

Example: 2022-01-01

toDate   string  optional  

Example: 2023-12-31

searchQuery   string  optional  

Example: null

isActive   boolean  optional  

Example: true

sortColumn   string  optional  

Example: created_at

sortDir   string  optional  

Example: asc

POST api/zahtevZaRadniNalog

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaRadniNalog"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "brojDokumenta": "10\/23",
    "licePodnosiocaZahteva": "Ime i prezime",
    "napomena": "Ne radi levi lift",
    "status": 0,
    "isActive": false,
    "lift_id": 1,
    "kategorija_id": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/zahtevZaRadniNalog

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

brojDokumenta   string   

Example: 10/23

licePodnosiocaZahteva   string   

Example: Ime i prezime

napomena   string   

Example: Ne radi levi lift

status   integer   

Example: 0

Must be one of:
  • 0
  • 1
  • 2
  • 3
isActive   boolean   

Example: false

lift_id   integer   

Example: 1

kategorija_id   integer   

Example: 1

GET api/zahtevZaRadniNalog/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaRadniNalog/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 166
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/zahtevZaRadniNalog/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PUT api/zahtevZaRadniNalog/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaRadniNalog/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "brojDokumenta": "10\/23",
    "licePodnosiocaZahteva": "Ime i prezime",
    "napomena": "Ne radi levi lift",
    "status": 0,
    "isActive": false,
    "lift_id": 1,
    "kategorija_id": 1
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/zahtevZaRadniNalog/{id}

PATCH api/zahtevZaRadniNalog/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

brojDokumenta   string   

Example: 10/23

licePodnosiocaZahteva   string   

Example: Ime i prezime

napomena   string   

Example: Ne radi levi lift

status   integer   

Example: 0

Must be one of:
  • 0
  • 1
  • 2
  • 3
isActive   boolean   

Example: false

lift_id   integer   

Example: 1

kategorija_id   integer   

Example: 1

DELETE api/zahtevZaRadniNalog/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zahtevZaRadniNalog/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/zahtevZaRadniNalog/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

ZavrsnaFaktura

PUT api/zavrsnaFaktura/generateCSV

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zavrsnaFaktura/generateCSV"
);

const params = {
    "title": "Naziv",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/zavrsnaFaktura/generateCSV

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

ids   string  optional  

Example: 1,2,3

POST api/zavrsnaFaktura/generatePDF

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zavrsnaFaktura/generatePDF"
);

const params = {
    "title": "Naziv",
    "orientation": "portrait",
    "ids": "1,2,3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/zavrsnaFaktura/generatePDF

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

title   string  optional  

Example: Naziv

orientation   string  optional  

Example: portrait

ids   string  optional  

Example: 1,2,3

GET api/zavrsnaFaktura/stats

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zavrsnaFaktura/stats"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 148
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/zavrsnaFaktura/stats

Headers

Authorization      

Example: Bearer {{token}}

POST api/zavrsnaFaktura/batchUpdate

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zavrsnaFaktura/batchUpdate"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/zavrsnaFaktura/batchUpdate

Headers

Authorization      

Example: Bearer {{token}}

POST api/zavrsnaFaktura/batchDelete

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zavrsnaFaktura/batchDelete"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/zavrsnaFaktura/batchDelete

Headers

Authorization      

Example: Bearer {{token}}

PUT api/zavrsnaFaktura/storniraj/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zavrsnaFaktura/storniraj/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/zavrsnaFaktura/storniraj/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

GET api/zavrsnaFaktura

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zavrsnaFaktura"
);

const params = {
    "currentPage": "1",
    "pageSize": "10",
    "fromDate": "2022-01-01",
    "toDate": "2023-12-31",
    "searchQuery": "null",
    "isActive": "1",
    "sortColumn": "created_at",
    "sortDir": "asc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 147
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/zavrsnaFaktura

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

currentPage   integer  optional  

Example: 1

pageSize   integer  optional  

Example: 10

fromDate   string  optional  

Example: 2022-01-01

toDate   string  optional  

Example: 2023-12-31

searchQuery   string  optional  

Example: null

isActive   boolean  optional  

Example: true

sortColumn   string  optional  

Example: created_at

sortDir   string  optional  

Example: asc

POST api/zavrsnaFaktura

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zavrsnaFaktura"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "brojDokumenta": "10\/23",
    "datumIzdavanja": "2023-10-25",
    "datumDospeca": "2023-11-26",
    "brojDana": 4,
    "rokPlacanja": "2023-11-30",
    "nacinPlacanja": 1,
    "saPDV": false,
    "status": 0,
    "napomena": "Ne radi levi lift",
    "isActive": false,
    "ponuda_id": 1,
    "radni_nalog_id": 1,
    "lift_id": 1,
    "komitent_id": 1,
    "kategorija_id": 1,
    "zavrsna_faktura_stavke": [
        {
            "zavrsna_faktura_id": 1,
            "roba_id": 1,
            "usluga_id": null,
            "naziv": "Stavka 1",
            "kolicina": 1,
            "jedinicaMere": 1,
            "cena": 10
        },
        {
            "zavrsna_faktura_id": 1,
            "roba_id": null,
            "usluga_id": 1,
            "naziv": "Stavka 2",
            "kolicina": 1,
            "jedinicaMere": 1,
            "cena": 20
        },
        {
            "zavrsna_faktura_id": 1,
            "roba_id": 2,
            "usluga_id": null,
            "naziv": "Stavka 3",
            "kolicina": 1,
            "jedinicaMere": 1,
            "cena": 30
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/zavrsnaFaktura

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

brojDokumenta   string   

Example: 10/23

datumIzdavanja   string   

Must be a valid date. Example: 2023-10-25

datumDospeca   string   

Must be a valid date. Example: 2023-11-26

brojDana   integer   

Example: 4

rokPlacanja   string   

Must be a valid date. Example: 2023-11-30

nacinPlacanja   integer   

Example: 1

Must be one of:
  • 0
  • 1
  • 2
  • 3
saPDV   boolean   

Example: false

status   integer   

Example: 0

Must be one of:
  • 0
  • 1
  • 2
  • 3
napomena   string   

Example: Ne radi levi lift

isActive   boolean   

Example: false

ponuda_id   integer  optional  

Example: 1

radni_nalog_id   integer  optional  

Example: 1

lift_id   integer  optional  

Example: 1

komitent_id   integer   

Example: 1

kategorija_id   integer   

Example: 1

zavrsna_faktura_stavke   string  optional  

GET api/zavrsnaFaktura/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zavrsnaFaktura/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 146
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/zavrsnaFaktura/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PUT api/zavrsnaFaktura/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zavrsnaFaktura/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "brojDokumenta": "10\/23",
    "datumIzdavanja": "2023-10-25",
    "datumDospeca": "2023-11-26",
    "brojDana": 4,
    "rokPlacanja": "2023-11-30",
    "nacinPlacanja": 1,
    "saPDV": false,
    "status": 0,
    "napomena": "Ne radi levi lift",
    "isActive": false,
    "ponuda_id": 1,
    "radni_nalog_id": 1,
    "lift_id": 1,
    "komitent_id": 1,
    "kategorija_id": 1,
    "zavrsna_faktura_stavke": [
        {
            "zavrsna_faktura_id": 1,
            "roba_id": 1,
            "usluga_id": null,
            "naziv": "Stavka 1",
            "kolicina": 1,
            "jedinicaMere": 1,
            "cena": 10
        },
        {
            "zavrsna_faktura_id": 1,
            "roba_id": null,
            "usluga_id": 1,
            "naziv": "Stavka 2",
            "kolicina": 1,
            "jedinicaMere": 1,
            "cena": 20
        },
        {
            "zavrsna_faktura_id": 1,
            "roba_id": 2,
            "usluga_id": null,
            "naziv": "Stavka 3",
            "kolicina": 1,
            "jedinicaMere": 1,
            "cena": 30
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/zavrsnaFaktura/{id}

PATCH api/zavrsnaFaktura/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

brojDokumenta   string   

Example: 10/23

datumIzdavanja   string   

Must be a valid date. Example: 2023-10-25

datumDospeca   string   

Must be a valid date. Example: 2023-11-26

brojDana   integer   

Example: 4

rokPlacanja   string   

Must be a valid date. Example: 2023-11-30

nacinPlacanja   integer   

Example: 1

Must be one of:
  • 0
  • 1
  • 2
  • 3
saPDV   boolean   

Example: false

status   integer   

Example: 0

Must be one of:
  • 0
  • 1
  • 2
  • 3
napomena   string   

Example: Ne radi levi lift

isActive   boolean   

Example: false

ponuda_id   integer  optional  

Example: 1

radni_nalog_id   integer  optional  

Example: 1

lift_id   integer  optional  

Example: 1

komitent_id   integer   

Example: 1

kategorija_id   integer   

Example: 1

zavrsna_faktura_stavke   string  optional  

DELETE api/zavrsnaFaktura/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zavrsnaFaktura/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/zavrsnaFaktura/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

ZavrsnaFakturaStavke

GET api/zavrsnaFakturaStavke

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zavrsnaFakturaStavke"
);

const params = {
    "currentPage": "1",
    "pageSize": "10",
    "fromDate": "2022-01-01",
    "toDate": "2023-12-31",
    "searchQuery": "null",
    "isActive": "1",
    "sortColumn": "created_at",
    "sortDir": "asc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 145
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/zavrsnaFakturaStavke

Headers

Authorization      

Example: Bearer {{token}}

Query Parameters

currentPage   integer  optional  

Example: 1

pageSize   integer  optional  

Example: 10

fromDate   string  optional  

Example: 2022-01-01

toDate   string  optional  

Example: 2023-12-31

searchQuery   string  optional  

Example: null

isActive   boolean  optional  

Example: true

sortColumn   string  optional  

Example: created_at

sortDir   string  optional  

Example: asc

POST api/zavrsnaFakturaStavke

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zavrsnaFakturaStavke"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "zavrsna_faktura_id": 1,
    "roba_id": 1,
    "usluga_id": 1,
    "naziv": "Stavka 1",
    "kolicina": 1,
    "jedinicaMere": 1,
    "cena": 10
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/zavrsnaFakturaStavke

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

Body Parameters

zavrsna_faktura_id   integer   

Example: 1

roba_id   integer  optional  

Example: 1

usluga_id   integer  optional  

Example: 1

naziv   string   

Example: Stavka 1

kolicina   number   

Example: 1

jedinicaMere   integer   

Example: 1

cena   number   

Example: 10

GET api/zavrsnaFakturaStavke/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zavrsnaFakturaStavke/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 144
access-control-allow-origin: *
 

{
    "error": "Unauthorised",
    "logedUser": null
}
 

Request   

GET api/zavrsnaFakturaStavke/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1

PUT api/zavrsnaFakturaStavke/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zavrsnaFakturaStavke/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "zavrsna_faktura_id": 1,
    "roba_id": 1,
    "usluga_id": 1,
    "naziv": "Stavka 1",
    "kolicina": 1,
    "jedinicaMere": 1,
    "cena": 10
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/zavrsnaFakturaStavke/{id}

PATCH api/zavrsnaFakturaStavke/{id}

Headers

Authorization      

Example: Bearer {{token}}

Content-Type      

Example: application/json

URL Parameters

id   integer   

Example: 1

Body Parameters

zavrsna_faktura_id   integer   

Example: 1

roba_id   integer  optional  

Example: 1

usluga_id   integer  optional  

Example: 1

naziv   string   

Example: Stavka 1

kolicina   number   

Example: 1

jedinicaMere   integer   

Example: 1

cena   number   

Example: 10

DELETE api/zavrsnaFakturaStavke/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/zavrsnaFakturaStavke/1"
);

const headers = {
    "Authorization": "Bearer {{token}}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/zavrsnaFakturaStavke/{id}

Headers

Authorization      

Example: Bearer {{token}}

URL Parameters

id   integer   

Example: 1