MENU navbar-image

Introduction

IMAC Connect API - Procurement, Inventory, Projects, and Field Operations Platform

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_TOKEN}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by logging in via the /api/v1/auth/login endpoint. Include the token in the Authorization header as: Bearer {token}.

Audit Logs

APIs for viewing audit logs (admin only)

Display a listing of audit logs.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/audit-logs" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/audit-logs"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/audit-logs

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Display the specified audit log.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/audit-logs/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/audit-logs/66529e01-d113-3473-8d6f-9e11e09332ea"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/audit-logs/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Dashboard & Analytics

APIs for dashboard KPIs, charts, and analytics

Get dashboard KPIs.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/dashboard/kpis" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/dashboard/kpis"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/dashboard/kpis

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get dashboard charts data.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/dashboard/charts" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/dashboard/charts"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/dashboard/charts

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get recent activities.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/dashboard/activities" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/dashboard/activities"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/dashboard/activities

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get procurement analytics.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/analytics/procurements" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/analytics/procurements"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/analytics/procurements

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get inventory analytics.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/analytics/inventory" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/analytics/inventory"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/analytics/inventory

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get project analytics.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/analytics/projects" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/analytics/projects"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/analytics/projects

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Endpoints

Authenticate user and return token.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/auth/login" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"qkunze@example.com\",
    \"password\": \"O[2UZ5ij-e\\/dl4m{o,\"
}"
const url = new URL(
    "http://imac.name/api/v1/auth/login"
);

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

let body = {
    "email": "qkunze@example.com",
    "password": "O[2UZ5ij-e\/dl4m{o,"
};

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

Request      

POST api/v1/auth/login

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Example: qkunze@example.com

password   string     

Example: O[2UZ5ij-e/dl4m{o,

Register a new user.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/auth/register" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"email\": \"kunde.eloisa@example.com\",
    \"password\": \"4[*UyPJ\\\"}6\",
    \"phone\": \"hdtqtqxbajwbpilpm\",
    \"first_name\": \"ufinllwloauydlsmsjury\",
    \"last_name\": \"vojcybzvrbyickznkyglo\",
    \"middle_name\": \"igmkwxphlvazjrcnfbaqy\",
    \"date_of_birth\": \"2020-03-09\"
}"
const url = new URL(
    "http://imac.name/api/v1/auth/register"
);

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

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "email": "kunde.eloisa@example.com",
    "password": "4[*UyPJ\"}6",
    "phone": "hdtqtqxbajwbpilpm",
    "first_name": "ufinllwloauydlsmsjury",
    "last_name": "vojcybzvrbyickznkyglo",
    "middle_name": "igmkwxphlvazjrcnfbaqy",
    "date_of_birth": "2020-03-09"
};

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

Request      

POST api/v1/auth/register

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

email   string     

Must be a valid email address. Must not be greater than 255 characters. Example: kunde.eloisa@example.com

password   string     

Must be at least 8 characters. Example: 4[*UyPJ"}6

phone   string  optional    

Must not be greater than 20 characters. Example: hdtqtqxbajwbpilpm

first_name   string  optional    

Must not be greater than 255 characters. Example: ufinllwloauydlsmsjury

last_name   string  optional    

Must not be greater than 255 characters. Example: vojcybzvrbyickznkyglo

middle_name   string  optional    

Must not be greater than 255 characters. Example: igmkwxphlvazjrcnfbaqy

date_of_birth   string  optional    

Must be a valid date. Must be a date before today. Example: 2020-03-09

Send password reset link.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/auth/forgot-password" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"qkunze@example.com\"
}"
const url = new URL(
    "http://imac.name/api/v1/auth/forgot-password"
);

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

let body = {
    "email": "qkunze@example.com"
};

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

Request      

POST api/v1/auth/forgot-password

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Example: qkunze@example.com

Reset password.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/auth/reset-password" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"token\": \"consequatur\",
    \"email\": \"carolyne.luettgen@example.org\",
    \"password\": \"ij-e\\/dl4m\"
}"
const url = new URL(
    "http://imac.name/api/v1/auth/reset-password"
);

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

let body = {
    "token": "consequatur",
    "email": "carolyne.luettgen@example.org",
    "password": "ij-e\/dl4m"
};

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

Request      

POST api/v1/auth/reset-password

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

token   string     

Example: consequatur

email   string     

Must be a valid email address. Example: carolyne.luettgen@example.org

password   string     

Must be at least 8 characters. Example: ij-e/dl4m

Logout user (revoke token).

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/auth/logout" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/auth/logout"
);

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

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

Request      

POST api/v1/auth/logout

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Revoke all user tokens.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/auth/logout-all" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/auth/logout-all"
);

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

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

Request      

POST api/v1/auth/logout-all

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Refresh the authentication token.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/auth/refresh" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/auth/refresh"
);

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

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

Request      

POST api/v1/auth/refresh

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get authenticated user.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/auth/me" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/auth/me"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/auth/me

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Activate a user.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/users/019a72f5-e572-70af-84d1-1706caf0c4db/activate" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/users/019a72f5-e572-70af-84d1-1706caf0c4db/activate"
);

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

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

Request      

POST api/v1/users/{user_uuid}/activate

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

user_uuid   string     

Example: 019a72f5-e572-70af-84d1-1706caf0c4db

Deactivate a user.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/users/019a72f5-e572-70af-84d1-1706caf0c4db/deactivate" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/users/019a72f5-e572-70af-84d1-1706caf0c4db/deactivate"
);

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

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

Request      

POST api/v1/users/{user_uuid}/deactivate

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

user_uuid   string     

Example: 019a72f5-e572-70af-84d1-1706caf0c4db

Reset user password.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/users/019a72f5-e572-70af-84d1-1706caf0c4db/reset-password" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"password\": \"O[2UZ5ij-e\\/dl4m{o,\"
}"
const url = new URL(
    "http://imac.name/api/v1/users/019a72f5-e572-70af-84d1-1706caf0c4db/reset-password"
);

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

let body = {
    "password": "O[2UZ5ij-e\/dl4m{o,"
};

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

Request      

POST api/v1/users/{user_uuid}/reset-password

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

user_uuid   string     

Example: 019a72f5-e572-70af-84d1-1706caf0c4db

Body Parameters

password   string     

Must be at least 8 characters. Example: O[2UZ5ij-e/dl4m{o,

Display a listing of users.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/users" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/users"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/users

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created user.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/users" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"email\": \"kunde.eloisa@example.com\",
    \"password\": \"4[*UyPJ\\\"}6\",
    \"phone\": \"hdtqtqxbajwbpilpm\",
    \"status\": \"suspended\",
    \"first_name\": \"ufinllwloauydlsmsjury\",
    \"last_name\": \"vojcybzvrbyickznkyglo\",
    \"middle_name\": \"igmkwxphlvazjrcnfbaqy\",
    \"date_of_birth\": \"2020-03-09\",
    \"gender\": \"male\",
    \"address\": \"mqeopfuudtdsufvyvddqa\",
    \"city\": \"mniihfqcoynlazghdtqtq\",
    \"state\": \"xbajwbpilpmufinllwloa\",
    \"country\": \"uydlsmsjuryvojcybzvrb\",
    \"postal_code\": \"yickznkygloigmkwx\"
}"
const url = new URL(
    "http://imac.name/api/v1/users"
);

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

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "email": "kunde.eloisa@example.com",
    "password": "4[*UyPJ\"}6",
    "phone": "hdtqtqxbajwbpilpm",
    "status": "suspended",
    "first_name": "ufinllwloauydlsmsjury",
    "last_name": "vojcybzvrbyickznkyglo",
    "middle_name": "igmkwxphlvazjrcnfbaqy",
    "date_of_birth": "2020-03-09",
    "gender": "male",
    "address": "mqeopfuudtdsufvyvddqa",
    "city": "mniihfqcoynlazghdtqtq",
    "state": "xbajwbpilpmufinllwloa",
    "country": "uydlsmsjuryvojcybzvrb",
    "postal_code": "yickznkygloigmkwx"
};

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

Request      

POST api/v1/users

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

email   string     

Must be a valid email address. Must not be greater than 255 characters. Example: kunde.eloisa@example.com

password   string     

Must be at least 8 characters. Example: 4[*UyPJ"}6

phone   string  optional    

Must not be greater than 20 characters. Example: hdtqtqxbajwbpilpm

status   string  optional    

Example: suspended

Must be one of:
  • active
  • inactive
  • suspended
  • pending
first_name   string  optional    

Must not be greater than 255 characters. Example: ufinllwloauydlsmsjury

last_name   string  optional    

Must not be greater than 255 characters. Example: vojcybzvrbyickznkyglo

middle_name   string  optional    

Must not be greater than 255 characters. Example: igmkwxphlvazjrcnfbaqy

date_of_birth   string  optional    

Must be a valid date. Must be a date before today. Example: 2020-03-09

gender   string  optional    

Example: male

Must be one of:
  • male
  • female
  • other
address   string  optional    

Must not be greater than 500 characters. Example: mqeopfuudtdsufvyvddqa

city   string  optional    

Must not be greater than 255 characters. Example: mniihfqcoynlazghdtqtq

state   string  optional    

Must not be greater than 255 characters. Example: xbajwbpilpmufinllwloa

country   string  optional    

Must not be greater than 255 characters. Example: uydlsmsjuryvojcybzvrb

postal_code   string  optional    

Must not be greater than 20 characters. Example: yickznkygloigmkwx

Display the specified user.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/users/019a72f5-e572-70af-84d1-1706caf0c4db" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/users/019a72f5-e572-70af-84d1-1706caf0c4db"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/users/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 019a72f5-e572-70af-84d1-1706caf0c4db

Update the specified user.

requires authentication

Example request:
curl --request PUT \
    "http://imac.name/api/v1/users/019a72f5-e572-70af-84d1-1706caf0c4db" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"email\": \"kunde.eloisa@example.com\",
    \"password\": \"4[*UyPJ\\\"}6\",
    \"phone\": \"hdtqtqxbajwbpilpm\",
    \"status\": \"pending\",
    \"first_name\": \"ufinllwloauydlsmsjury\",
    \"last_name\": \"vojcybzvrbyickznkyglo\",
    \"middle_name\": \"igmkwxphlvazjrcnfbaqy\",
    \"date_of_birth\": \"2020-03-09\",
    \"gender\": \"female\",
    \"address\": \"mqeopfuudtdsufvyvddqa\",
    \"city\": \"mniihfqcoynlazghdtqtq\",
    \"state\": \"xbajwbpilpmufinllwloa\",
    \"country\": \"uydlsmsjuryvojcybzvrb\",
    \"postal_code\": \"yickznkygloigmkwx\"
}"
const url = new URL(
    "http://imac.name/api/v1/users/019a72f5-e572-70af-84d1-1706caf0c4db"
);

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

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "email": "kunde.eloisa@example.com",
    "password": "4[*UyPJ\"}6",
    "phone": "hdtqtqxbajwbpilpm",
    "status": "pending",
    "first_name": "ufinllwloauydlsmsjury",
    "last_name": "vojcybzvrbyickznkyglo",
    "middle_name": "igmkwxphlvazjrcnfbaqy",
    "date_of_birth": "2020-03-09",
    "gender": "female",
    "address": "mqeopfuudtdsufvyvddqa",
    "city": "mniihfqcoynlazghdtqtq",
    "state": "xbajwbpilpmufinllwloa",
    "country": "uydlsmsjuryvojcybzvrb",
    "postal_code": "yickznkygloigmkwx"
};

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

Request      

PUT api/v1/users/{uuid}

PATCH api/v1/users/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 019a72f5-e572-70af-84d1-1706caf0c4db

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

email   string  optional    

Must be a valid email address. Must not be greater than 255 characters. Example: kunde.eloisa@example.com

password   string  optional    

Must be at least 8 characters. Example: 4[*UyPJ"}6

phone   string  optional    

Must not be greater than 20 characters. Example: hdtqtqxbajwbpilpm

status   string  optional    

Example: pending

Must be one of:
  • active
  • inactive
  • suspended
  • pending
first_name   string  optional    

Must not be greater than 255 characters. Example: ufinllwloauydlsmsjury

last_name   string  optional    

Must not be greater than 255 characters. Example: vojcybzvrbyickznkyglo

middle_name   string  optional    

Must not be greater than 255 characters. Example: igmkwxphlvazjrcnfbaqy

date_of_birth   string  optional    

Must be a valid date. Must be a date before today. Example: 2020-03-09

gender   string  optional    

Example: female

Must be one of:
  • male
  • female
  • other
address   string  optional    

Must not be greater than 500 characters. Example: mqeopfuudtdsufvyvddqa

city   string  optional    

Must not be greater than 255 characters. Example: mniihfqcoynlazghdtqtq

state   string  optional    

Must not be greater than 255 characters. Example: xbajwbpilpmufinllwloa

country   string  optional    

Must not be greater than 255 characters. Example: uydlsmsjuryvojcybzvrb

postal_code   string  optional    

Must not be greater than 20 characters. Example: yickznkygloigmkwx

Remove the specified user.

requires authentication

Example request:
curl --request DELETE \
    "http://imac.name/api/v1/users/019a72f5-e572-70af-84d1-1706caf0c4db" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/users/019a72f5-e572-70af-84d1-1706caf0c4db"
);

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

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

Request      

DELETE api/v1/users/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 019a72f5-e572-70af-84d1-1706caf0c4db

Get customer projects.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/customers/66529e01-d113-3473-8d6f-9e11e09332ea/projects" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/customers/66529e01-d113-3473-8d6f-9e11e09332ea/projects"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/customers/{customer_uuid}/projects

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

customer_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Display a listing of customers.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/customers" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/customers"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/customers

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created customer.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/customers" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"vmqeopfuudtdsufvyvddq\",
    \"name\": \"amniihfqcoynlazghdtqt\",
    \"contact_person\": \"qxbajwbpilpmufinllwlo\",
    \"email\": \"schmitt.beulah@example.org\",
    \"phone\": \"smsjuryvojcybzvrb\",
    \"address\": \"yickznkygloigmkwxphlv\",
    \"city\": \"azjrcnfbaqywuxhgjjmzu\",
    \"state\": \"xjubqouzswiwxtrkimfca\",
    \"country\": \"tbxspzmrazsroyjpxmqes\",
    \"status\": \"suspended\",
    \"notes\": \"consequatur\"
}"
const url = new URL(
    "http://imac.name/api/v1/customers"
);

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

let body = {
    "code": "vmqeopfuudtdsufvyvddq",
    "name": "amniihfqcoynlazghdtqt",
    "contact_person": "qxbajwbpilpmufinllwlo",
    "email": "schmitt.beulah@example.org",
    "phone": "smsjuryvojcybzvrb",
    "address": "yickznkygloigmkwxphlv",
    "city": "azjrcnfbaqywuxhgjjmzu",
    "state": "xjubqouzswiwxtrkimfca",
    "country": "tbxspzmrazsroyjpxmqes",
    "status": "suspended",
    "notes": "consequatur"
};

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

Request      

POST api/v1/customers

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

code   string     

Must not be greater than 50 characters. Example: vmqeopfuudtdsufvyvddq

name   string     

Must not be greater than 255 characters. Example: amniihfqcoynlazghdtqt

contact_person   string  optional    

Must not be greater than 255 characters. Example: qxbajwbpilpmufinllwlo

email   string  optional    

Must be a valid email address. Must not be greater than 255 characters. Example: schmitt.beulah@example.org

phone   string  optional    

Must not be greater than 20 characters. Example: smsjuryvojcybzvrb

address   string  optional    

Must not be greater than 500 characters. Example: yickznkygloigmkwxphlv

city   string  optional    

Must not be greater than 255 characters. Example: azjrcnfbaqywuxhgjjmzu

state   string  optional    

Must not be greater than 255 characters. Example: xjubqouzswiwxtrkimfca

country   string  optional    

Must not be greater than 255 characters. Example: tbxspzmrazsroyjpxmqes

status   string  optional    

Example: suspended

Must be one of:
  • active
  • inactive
  • suspended
notes   string  optional    

Example: consequatur

Display the specified customer.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/customers/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/customers/66529e01-d113-3473-8d6f-9e11e09332ea"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/customers/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Update the specified customer.

requires authentication

Example request:
curl --request PUT \
    "http://imac.name/api/v1/customers/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"vmqeopfuudtdsufvyvddq\",
    \"name\": \"amniihfqcoynlazghdtqt\",
    \"contact_person\": \"qxbajwbpilpmufinllwlo\",
    \"email\": \"schmitt.beulah@example.org\",
    \"phone\": \"smsjuryvojcybzvrb\",
    \"address\": \"yickznkygloigmkwxphlv\",
    \"city\": \"azjrcnfbaqywuxhgjjmzu\",
    \"state\": \"xjubqouzswiwxtrkimfca\",
    \"country\": \"tbxspzmrazsroyjpxmqes\",
    \"status\": \"suspended\",
    \"notes\": \"consequatur\"
}"
const url = new URL(
    "http://imac.name/api/v1/customers/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

let body = {
    "code": "vmqeopfuudtdsufvyvddq",
    "name": "amniihfqcoynlazghdtqt",
    "contact_person": "qxbajwbpilpmufinllwlo",
    "email": "schmitt.beulah@example.org",
    "phone": "smsjuryvojcybzvrb",
    "address": "yickznkygloigmkwxphlv",
    "city": "azjrcnfbaqywuxhgjjmzu",
    "state": "xjubqouzswiwxtrkimfca",
    "country": "tbxspzmrazsroyjpxmqes",
    "status": "suspended",
    "notes": "consequatur"
};

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

Request      

PUT api/v1/customers/{uuid}

PATCH api/v1/customers/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Body Parameters

code   string  optional    

Must not be greater than 50 characters. Example: vmqeopfuudtdsufvyvddq

name   string  optional    

Must not be greater than 255 characters. Example: amniihfqcoynlazghdtqt

contact_person   string  optional    

Must not be greater than 255 characters. Example: qxbajwbpilpmufinllwlo

email   string  optional    

Must be a valid email address. Must not be greater than 255 characters. Example: schmitt.beulah@example.org

phone   string  optional    

Must not be greater than 20 characters. Example: smsjuryvojcybzvrb

address   string  optional    

Must not be greater than 500 characters. Example: yickznkygloigmkwxphlv

city   string  optional    

Must not be greater than 255 characters. Example: azjrcnfbaqywuxhgjjmzu

state   string  optional    

Must not be greater than 255 characters. Example: xjubqouzswiwxtrkimfca

country   string  optional    

Must not be greater than 255 characters. Example: tbxspzmrazsroyjpxmqes

status   string  optional    

Example: suspended

Must be one of:
  • active
  • inactive
  • suspended
notes   string  optional    

Example: consequatur

Remove the specified customer.

requires authentication

Example request:
curl --request DELETE \
    "http://imac.name/api/v1/customers/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/customers/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

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

Request      

DELETE api/v1/customers/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Items

APIs for managing inventory items

Get item stock levels.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/items/66529e01-d113-3473-8d6f-9e11e09332ea/stock-levels" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/items/66529e01-d113-3473-8d6f-9e11e09332ea/stock-levels"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/items/{item_uuid}/stock-levels

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

item_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Get item price lists.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/items/66529e01-d113-3473-8d6f-9e11e09332ea/price-lists" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/items/66529e01-d113-3473-8d6f-9e11e09332ea/price-lists"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/items/{item_uuid}/price-lists

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

item_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Display a listing of items.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/items" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/items"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/items

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created item.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/items" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"vmqeopfuudtdsufvyvddq\",
    \"name\": \"amniihfqcoynlazghdtqt\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"category\": \"dtdsufvyvddqamniihfqc\",
    \"unit_of_measure\": \"oynlazghdtqtqxbajwbpi\",
    \"base_price\": 41,
    \"status\": \"active\"
}"
const url = new URL(
    "http://imac.name/api/v1/items"
);

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

let body = {
    "code": "vmqeopfuudtdsufvyvddq",
    "name": "amniihfqcoynlazghdtqt",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "category": "dtdsufvyvddqamniihfqc",
    "unit_of_measure": "oynlazghdtqtqxbajwbpi",
    "base_price": 41,
    "status": "active"
};

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

Request      

POST api/v1/items

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

code   string     

Must not be greater than 50 characters. Example: vmqeopfuudtdsufvyvddq

name   string     

Must not be greater than 255 characters. Example: amniihfqcoynlazghdtqt

description   string  optional    

Example: Dolores dolorum amet iste laborum eius est dolor.

category   string  optional    

Must not be greater than 255 characters. Example: dtdsufvyvddqamniihfqc

unit_of_measure   string  optional    

Must not be greater than 50 characters. Example: oynlazghdtqtqxbajwbpi

default_supplier_id   string  optional    

The id of an existing record in the suppliers table.

base_price   number  optional    

Must be at least 0. Example: 41

status   string  optional    

Example: active

Must be one of:
  • active
  • inactive

Display the specified item.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/items/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/items/66529e01-d113-3473-8d6f-9e11e09332ea"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/items/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Update the specified item.

requires authentication

Example request:
curl --request PUT \
    "http://imac.name/api/v1/items/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"vmqeopfuudtdsufvyvddq\",
    \"name\": \"amniihfqcoynlazghdtqt\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"category\": \"dtdsufvyvddqamniihfqc\",
    \"unit_of_measure\": \"oynlazghdtqtqxbajwbpi\",
    \"base_price\": 41,
    \"status\": \"active\"
}"
const url = new URL(
    "http://imac.name/api/v1/items/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

let body = {
    "code": "vmqeopfuudtdsufvyvddq",
    "name": "amniihfqcoynlazghdtqt",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "category": "dtdsufvyvddqamniihfqc",
    "unit_of_measure": "oynlazghdtqtqxbajwbpi",
    "base_price": 41,
    "status": "active"
};

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

Request      

PUT api/v1/items/{uuid}

PATCH api/v1/items/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Body Parameters

code   string  optional    

Must not be greater than 50 characters. Example: vmqeopfuudtdsufvyvddq

name   string  optional    

Must not be greater than 255 characters. Example: amniihfqcoynlazghdtqt

description   string  optional    

Example: Dolores dolorum amet iste laborum eius est dolor.

category   string  optional    

Must not be greater than 255 characters. Example: dtdsufvyvddqamniihfqc

unit_of_measure   string  optional    

Must not be greater than 50 characters. Example: oynlazghdtqtqxbajwbpi

default_supplier_id   string  optional    

The id of an existing record in the suppliers table.

base_price   number  optional    

Must be at least 0. Example: 41

status   string  optional    

Example: active

Must be one of:
  • active
  • inactive

Remove the specified item.

requires authentication

Example request:
curl --request DELETE \
    "http://imac.name/api/v1/items/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/items/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

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

Request      

DELETE api/v1/items/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Notifications

APIs for managing user notifications

Mark notification as read.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/notifications/66529e01-d113-3473-8d6f-9e11e09332ea/read" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/notifications/66529e01-d113-3473-8d6f-9e11e09332ea/read"
);

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

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

Request      

POST api/v1/notifications/{notification_uuid}/read

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

notification_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Mark all notifications as read.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/notifications/mark-all-read" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/notifications/mark-all-read"
);

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

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

Request      

POST api/v1/notifications/mark-all-read

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get unread notifications count.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/notifications/unread-count" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/notifications/unread-count"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/notifications/unread-count

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Display a listing of notifications for the authenticated user.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/notifications" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/notifications"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/notifications

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Display the specified notification.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/notifications/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/notifications/66529e01-d113-3473-8d6f-9e11e09332ea"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/notifications/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Remove the specified notification.

requires authentication

Example request:
curl --request DELETE \
    "http://imac.name/api/v1/notifications/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/notifications/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

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

Request      

DELETE api/v1/notifications/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Permissions

APIs for viewing permissions (read-only)

Display a listing of permissions.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/permissions" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/permissions"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/permissions

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Display the specified permission.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/permissions/019a72f5-e107-7002-b65b-660897661695" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/permissions/019a72f5-e107-7002-b65b-660897661695"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/permissions/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 019a72f5-e107-7002-b65b-660897661695

Price Lists

APIs for managing supplier price lists

Display a listing of price lists.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/price-lists" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/price-lists"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/price-lists

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created price list entry.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/price-lists" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"item_id\": \"consequatur\",
    \"supplier_id\": \"consequatur\",
    \"price\": 45,
    \"effective_from\": \"2025-11-12T10:13:20\",
    \"effective_to\": \"2106-12-11\",
    \"currency\": \"mqe\"
}"
const url = new URL(
    "http://imac.name/api/v1/price-lists"
);

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

let body = {
    "item_id": "consequatur",
    "supplier_id": "consequatur",
    "price": 45,
    "effective_from": "2025-11-12T10:13:20",
    "effective_to": "2106-12-11",
    "currency": "mqe"
};

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

Request      

POST api/v1/price-lists

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

item_id   string     

The id of an existing record in the items table. Example: consequatur

supplier_id   string     

The id of an existing record in the suppliers table. Example: consequatur

price   number     

Must be at least 0. Example: 45

effective_from   string     

Must be a valid date. Example: 2025-11-12T10:13:20

effective_to   string  optional    

Must be a valid date. Must be a date after effective_from. Example: 2106-12-11

currency   string  optional    

Must not be greater than 3 characters. Example: mqe

Display the specified price list entry.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/price-lists/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/price-lists/66529e01-d113-3473-8d6f-9e11e09332ea"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/price-lists/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Update the specified price list entry.

requires authentication

Example request:
curl --request PUT \
    "http://imac.name/api/v1/price-lists/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"price\": 73,
    \"effective_from\": \"2025-11-12T10:13:20\",
    \"effective_to\": \"2106-12-11\",
    \"currency\": \"mqe\"
}"
const url = new URL(
    "http://imac.name/api/v1/price-lists/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

let body = {
    "price": 73,
    "effective_from": "2025-11-12T10:13:20",
    "effective_to": "2106-12-11",
    "currency": "mqe"
};

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

Request      

PUT api/v1/price-lists/{uuid}

PATCH api/v1/price-lists/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Body Parameters

item_id   string  optional    

The id of an existing record in the items table.

supplier_id   string  optional    

The id of an existing record in the suppliers table.

price   number  optional    

Must be at least 0. Example: 73

effective_from   string  optional    

Must be a valid date. Example: 2025-11-12T10:13:20

effective_to   string  optional    

Must be a valid date. Must be a date after effective_from. Example: 2106-12-11

currency   string  optional    

Must not be greater than 3 characters. Example: mqe

Remove the specified price list entry.

requires authentication

Example request:
curl --request DELETE \
    "http://imac.name/api/v1/price-lists/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/price-lists/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

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

Request      

DELETE api/v1/price-lists/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Procurement Requests

APIs for managing procurement requests

Submit procurement request for approval.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/procurements/66529e01-d113-3473-8d6f-9e11e09332ea/submit" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/procurements/66529e01-d113-3473-8d6f-9e11e09332ea/submit"
);

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

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

Request      

POST api/v1/procurements/{procurementRequest_uuid}/submit

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

procurementRequest_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Approve procurement request.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/procurements/66529e01-d113-3473-8d6f-9e11e09332ea/approve" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/procurements/66529e01-d113-3473-8d6f-9e11e09332ea/approve"
);

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

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

Request      

POST api/v1/procurements/{procurementRequest_uuid}/approve

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

procurementRequest_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Reject procurement request.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/procurements/66529e01-d113-3473-8d6f-9e11e09332ea/reject" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/procurements/66529e01-d113-3473-8d6f-9e11e09332ea/reject"
);

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

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

Request      

POST api/v1/procurements/{procurementRequest_uuid}/reject

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

procurementRequest_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Convert approved procurement request to purchase order.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/procurements/66529e01-d113-3473-8d6f-9e11e09332ea/convert-to-po" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"supplier_id\": \"consequatur\",
    \"order_date\": \"2025-11-12T10:13:20\",
    \"required_date\": \"2106-12-11\",
    \"delivery_address\": \"mqeopfuudtdsufvyvddqa\",
    \"terms\": \"consequatur\"
}"
const url = new URL(
    "http://imac.name/api/v1/procurements/66529e01-d113-3473-8d6f-9e11e09332ea/convert-to-po"
);

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

let body = {
    "supplier_id": "consequatur",
    "order_date": "2025-11-12T10:13:20",
    "required_date": "2106-12-11",
    "delivery_address": "mqeopfuudtdsufvyvddqa",
    "terms": "consequatur"
};

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

Request      

POST api/v1/procurements/{procurementRequest_uuid}/convert-to-po

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

procurementRequest_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Body Parameters

supplier_id   string     

The id of an existing record in the suppliers table. Example: consequatur

order_date   string  optional    

Must be a valid date. Example: 2025-11-12T10:13:20

required_date   string  optional    

Must be a valid date. Must be a date after or equal to order_date. Example: 2106-12-11

delivery_address   string  optional    

Must not be greater than 500 characters. Example: mqeopfuudtdsufvyvddqa

terms   string  optional    

Example: consequatur

Display a listing of procurement requests.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/procurements" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/procurements"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/procurements

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created procurement request.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/procurements" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"request_number\": \"vmqeopfuudtdsufvyvddq\",
    \"status\": \"draft\",
    \"priority\": \"urgent\",
    \"required_date\": \"2025-11-12T10:13:20\",
    \"notes\": \"consequatur\",
    \"items\": [
        {
            \"quantity\": 73,
            \"unit_price\": 45,
            \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
            \"notes\": \"consequatur\"
        }
    ]
}"
const url = new URL(
    "http://imac.name/api/v1/procurements"
);

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

let body = {
    "request_number": "vmqeopfuudtdsufvyvddq",
    "status": "draft",
    "priority": "urgent",
    "required_date": "2025-11-12T10:13:20",
    "notes": "consequatur",
    "items": [
        {
            "quantity": 73,
            "unit_price": 45,
            "description": "Dolores dolorum amet iste laborum eius est dolor.",
            "notes": "consequatur"
        }
    ]
};

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

Request      

POST api/v1/procurements

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

request_number   string  optional    

Must not be greater than 50 characters. Example: vmqeopfuudtdsufvyvddq

project_id   string  optional    

The id of an existing record in the projects table.

status   string  optional    

Example: draft

Must be one of:
  • draft
  • pending
  • approved
  • rejected
  • converted
priority   string  optional    

Example: urgent

Must be one of:
  • low
  • medium
  • high
  • urgent
required_date   string  optional    

Must be a valid date. Example: 2025-11-12T10:13:20

notes   string  optional    

Example: consequatur

items   object[]     

Must have at least 1 items.

item_id   string  optional    

The id of an existing record in the items table.

quantity   number     

Must be at least 0.01. Example: 73

unit_price   number  optional    

Must be at least 0. Example: 45

description   string  optional    

Example: Dolores dolorum amet iste laborum eius est dolor.

notes   string  optional    

Example: consequatur

Display the specified procurement request.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/procurements/consequatur" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/procurements/consequatur"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/procurements/{id}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the procurement. Example: consequatur

Update the specified procurement request.

requires authentication

Example request:
curl --request PUT \
    "http://imac.name/api/v1/procurements/consequatur" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"request_number\": \"vmqeopfuudtdsufvyvddq\",
    \"status\": \"approved\",
    \"priority\": \"high\",
    \"required_date\": \"2025-11-12T10:13:20\",
    \"notes\": \"consequatur\",
    \"items\": [
        {
            \"quantity\": 45,
            \"unit_price\": 56,
            \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
            \"notes\": \"consequatur\"
        }
    ]
}"
const url = new URL(
    "http://imac.name/api/v1/procurements/consequatur"
);

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

let body = {
    "request_number": "vmqeopfuudtdsufvyvddq",
    "status": "approved",
    "priority": "high",
    "required_date": "2025-11-12T10:13:20",
    "notes": "consequatur",
    "items": [
        {
            "quantity": 45,
            "unit_price": 56,
            "description": "Dolores dolorum amet iste laborum eius est dolor.",
            "notes": "consequatur"
        }
    ]
};

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

Request      

PUT api/v1/procurements/{id}

PATCH api/v1/procurements/{id}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the procurement. Example: consequatur

Body Parameters

request_number   string  optional    

Must not be greater than 50 characters. Example: vmqeopfuudtdsufvyvddq

project_id   string  optional    

The id of an existing record in the projects table.

status   string  optional    

Example: approved

Must be one of:
  • draft
  • pending
  • approved
  • rejected
  • converted
priority   string  optional    

Example: high

Must be one of:
  • low
  • medium
  • high
  • urgent
required_date   string  optional    

Must be a valid date. Example: 2025-11-12T10:13:20

notes   string  optional    

Example: consequatur

items   object[]  optional    

Must have at least 1 items.

item_id   string  optional    

The id of an existing record in the items table.

quantity   number     

Must be at least 0.01. Example: 45

unit_price   number  optional    

Must be at least 0. Example: 56

description   string  optional    

Example: Dolores dolorum amet iste laborum eius est dolor.

notes   string  optional    

Example: consequatur

Remove the specified procurement request.

requires authentication

Example request:
curl --request DELETE \
    "http://imac.name/api/v1/procurements/consequatur" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/procurements/consequatur"
);

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

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

Request      

DELETE api/v1/procurements/{id}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the procurement. Example: consequatur

Projects

APIs for managing projects

Get project procurements.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/projects/66529e01-d113-3473-8d6f-9e11e09332ea/procurements" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/projects/66529e01-d113-3473-8d6f-9e11e09332ea/procurements"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/projects/{project_uuid}/procurements

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

project_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Get project reports.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/projects/66529e01-d113-3473-8d6f-9e11e09332ea/reports" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/projects/66529e01-d113-3473-8d6f-9e11e09332ea/reports"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/projects/{project_uuid}/reports

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

project_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Display a listing of projects.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/projects" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/projects"
);

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

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

Example response (200):


{"success": true, "message": "Projects retrieved successfully", "data": [...], "pagination": {...}}
 

Request      

GET api/v1/projects

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created project.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/projects" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"vmqeopfuudtdsufvyvddq\",
    \"name\": \"amniihfqcoynlazghdtqt\",
    \"customer_id\": \"consequatur\",
    \"start_date\": \"2025-11-12T10:13:19\",
    \"end_date\": \"2106-12-11\",
    \"status\": \"cancelled\",
    \"budget\": 45,
    \"manager_id\": \"consequatur\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
    "http://imac.name/api/v1/projects"
);

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

let body = {
    "code": "vmqeopfuudtdsufvyvddq",
    "name": "amniihfqcoynlazghdtqt",
    "customer_id": "consequatur",
    "start_date": "2025-11-12T10:13:19",
    "end_date": "2106-12-11",
    "status": "cancelled",
    "budget": 45,
    "manager_id": "consequatur",
    "description": "Dolores dolorum amet iste laborum eius est dolor."
};

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

Request      

POST api/v1/projects

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

code   string     

Must not be greater than 50 characters. Example: vmqeopfuudtdsufvyvddq

name   string     

Must not be greater than 255 characters. Example: amniihfqcoynlazghdtqt

customer_id   string     

The id of an existing record in the customers table. Example: consequatur

start_date   string     

Must be a valid date. Example: 2025-11-12T10:13:19

end_date   string  optional    

Must be a valid date. Must be a date after start_date. Example: 2106-12-11

status   string  optional    

Example: cancelled

Must be one of:
  • planning
  • active
  • on_hold
  • completed
  • cancelled
budget   number  optional    

Must be at least 0. Example: 45

manager_id   string     

The id of an existing record in the users table. Example: consequatur

description   string  optional    

Example: Dolores dolorum amet iste laborum eius est dolor.

Display the specified project.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/projects/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/projects/66529e01-d113-3473-8d6f-9e11e09332ea"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/projects/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Update the specified project.

requires authentication

Example request:
curl --request PUT \
    "http://imac.name/api/v1/projects/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"vmqeopfuudtdsufvyvddq\",
    \"name\": \"amniihfqcoynlazghdtqt\",
    \"start_date\": \"2025-11-12T10:13:19\",
    \"end_date\": \"2106-12-11\",
    \"status\": \"completed\",
    \"budget\": 45,
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
    "http://imac.name/api/v1/projects/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

let body = {
    "code": "vmqeopfuudtdsufvyvddq",
    "name": "amniihfqcoynlazghdtqt",
    "start_date": "2025-11-12T10:13:19",
    "end_date": "2106-12-11",
    "status": "completed",
    "budget": 45,
    "description": "Dolores dolorum amet iste laborum eius est dolor."
};

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

Request      

PUT api/v1/projects/{uuid}

PATCH api/v1/projects/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Body Parameters

code   string  optional    

Must not be greater than 50 characters. Example: vmqeopfuudtdsufvyvddq

name   string  optional    

Must not be greater than 255 characters. Example: amniihfqcoynlazghdtqt

customer_id   string  optional    

The id of an existing record in the customers table.

start_date   string  optional    

Must be a valid date. Example: 2025-11-12T10:13:19

end_date   string  optional    

Must be a valid date. Must be a date after start_date. Example: 2106-12-11

status   string  optional    

Example: completed

Must be one of:
  • planning
  • active
  • on_hold
  • completed
  • cancelled
budget   number  optional    

Must be at least 0. Example: 45

manager_id   string  optional    

The id of an existing record in the users table.

description   string  optional    

Example: Dolores dolorum amet iste laborum eius est dolor.

Remove the specified project.

requires authentication

Example request:
curl --request DELETE \
    "http://imac.name/api/v1/projects/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/projects/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

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

Request      

DELETE api/v1/projects/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Purchase Orders

APIs for managing purchase orders

Submit purchase order for approval.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/purchase-orders/66529e01-d113-3473-8d6f-9e11e09332ea/submit" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/purchase-orders/66529e01-d113-3473-8d6f-9e11e09332ea/submit"
);

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

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

Request      

POST api/v1/purchase-orders/{purchaseOrder_uuid}/submit

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

purchaseOrder_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Approve purchase order.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/purchase-orders/66529e01-d113-3473-8d6f-9e11e09332ea/approve" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/purchase-orders/66529e01-d113-3473-8d6f-9e11e09332ea/approve"
);

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

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

Request      

POST api/v1/purchase-orders/{purchaseOrder_uuid}/approve

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

purchaseOrder_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Reject purchase order.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/purchase-orders/66529e01-d113-3473-8d6f-9e11e09332ea/reject" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/purchase-orders/66529e01-d113-3473-8d6f-9e11e09332ea/reject"
);

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

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

Request      

POST api/v1/purchase-orders/{purchaseOrder_uuid}/reject

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

purchaseOrder_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Display a listing of purchase orders.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/purchase-orders" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/purchase-orders"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/purchase-orders

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created purchase order.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/purchase-orders" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"po_number\": \"vmqeopfuudtdsufvyvddq\",
    \"supplier_id\": \"consequatur\",
    \"status\": \"rejected\",
    \"order_date\": \"2025-11-12T10:13:21\",
    \"required_date\": \"2106-12-11\",
    \"delivery_address\": \"consequatur\",
    \"terms\": \"consequatur\",
    \"items\": [
        {
            \"quantity\": 73,
            \"unit_price\": 45,
            \"tax_rate\": 16,
            \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
        }
    ]
}"
const url = new URL(
    "http://imac.name/api/v1/purchase-orders"
);

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

let body = {
    "po_number": "vmqeopfuudtdsufvyvddq",
    "supplier_id": "consequatur",
    "status": "rejected",
    "order_date": "2025-11-12T10:13:21",
    "required_date": "2106-12-11",
    "delivery_address": "consequatur",
    "terms": "consequatur",
    "items": [
        {
            "quantity": 73,
            "unit_price": 45,
            "tax_rate": 16,
            "description": "Dolores dolorum amet iste laborum eius est dolor."
        }
    ]
};

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

Request      

POST api/v1/purchase-orders

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

po_number   string  optional    

Must not be greater than 50 characters. Example: vmqeopfuudtdsufvyvddq

supplier_id   string     

The id of an existing record in the suppliers table. Example: consequatur

project_id   string  optional    

The id of an existing record in the projects table.

status   string  optional    

Example: rejected

Must be one of:
  • draft
  • pending
  • approved
  • rejected
  • issued
  • received
  • cancelled
order_date   string  optional    

Must be a valid date. Example: 2025-11-12T10:13:21

required_date   string  optional    

Must be a valid date. Must be a date after or equal to order_date. Example: 2106-12-11

delivery_address   string  optional    

Example: consequatur

terms   string  optional    

Example: consequatur

items   object[]     

Must have at least 1 items.

item_id   string  optional    

The id of an existing record in the items table.

quantity   number     

Must be at least 0.01. Example: 73

unit_price   number     

Must be at least 0. Example: 45

tax_rate   number  optional    

Must be at least 0. Must not be greater than 100. Example: 16

description   string  optional    

Example: Dolores dolorum amet iste laborum eius est dolor.

Display the specified purchase order.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/purchase-orders/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/purchase-orders/66529e01-d113-3473-8d6f-9e11e09332ea"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/purchase-orders/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Update the specified purchase order.

requires authentication

Example request:
curl --request PUT \
    "http://imac.name/api/v1/purchase-orders/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"po_number\": \"vmqeopfuudtdsufvyvddq\",
    \"status\": \"pending\",
    \"order_date\": \"2025-11-12T10:13:21\",
    \"required_date\": \"2106-12-11\",
    \"delivery_address\": \"consequatur\",
    \"terms\": \"consequatur\",
    \"items\": [
        {
            \"quantity\": 45,
            \"unit_price\": 56,
            \"tax_rate\": 5,
            \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
        }
    ]
}"
const url = new URL(
    "http://imac.name/api/v1/purchase-orders/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

let body = {
    "po_number": "vmqeopfuudtdsufvyvddq",
    "status": "pending",
    "order_date": "2025-11-12T10:13:21",
    "required_date": "2106-12-11",
    "delivery_address": "consequatur",
    "terms": "consequatur",
    "items": [
        {
            "quantity": 45,
            "unit_price": 56,
            "tax_rate": 5,
            "description": "Dolores dolorum amet iste laborum eius est dolor."
        }
    ]
};

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

Request      

PUT api/v1/purchase-orders/{uuid}

PATCH api/v1/purchase-orders/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Body Parameters

po_number   string  optional    

Must not be greater than 50 characters. Example: vmqeopfuudtdsufvyvddq

supplier_id   string  optional    

The id of an existing record in the suppliers table.

project_id   string  optional    

The id of an existing record in the projects table.

status   string  optional    

Example: pending

Must be one of:
  • draft
  • pending
  • approved
  • rejected
  • issued
  • received
  • cancelled
order_date   string  optional    

Must be a valid date. Example: 2025-11-12T10:13:21

required_date   string  optional    

Must be a valid date. Must be a date after or equal to order_date. Example: 2106-12-11

delivery_address   string  optional    

Example: consequatur

terms   string  optional    

Example: consequatur

items   object[]  optional    

Must have at least 1 items.

item_id   string  optional    

The id of an existing record in the items table.

quantity   number     

Must be at least 0.01. Example: 45

unit_price   number     

Must be at least 0. Example: 56

tax_rate   number  optional    

Must be at least 0. Must not be greater than 100. Example: 5

description   string  optional    

Example: Dolores dolorum amet iste laborum eius est dolor.

Remove the specified purchase order.

requires authentication

Example request:
curl --request DELETE \
    "http://imac.name/api/v1/purchase-orders/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/purchase-orders/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

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

Request      

DELETE api/v1/purchase-orders/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Reports

APIs for managing field reports

Submit report.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/reports/66529e01-d113-3473-8d6f-9e11e09332ea/submit" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/reports/66529e01-d113-3473-8d6f-9e11e09332ea/submit"
);

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

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

Request      

POST api/v1/reports/{report_uuid}/submit

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

report_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Upload attachment to report.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/reports/66529e01-d113-3473-8d6f-9e11e09332ea/attachments" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "file=@C:\Users\dell\AppData\Local\Temp\php57D8.tmp" 
const url = new URL(
    "http://imac.name/api/v1/reports/66529e01-d113-3473-8d6f-9e11e09332ea/attachments"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').files[0]);

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

Request      

POST api/v1/reports/{report_uuid}/attachments

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

report_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Body Parameters

file   file     

Must be a file. Must not be greater than 10240 kilobytes. Example: C:\Users\dell\AppData\Local\Temp\php57D8.tmp

Get report attachments.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/reports/66529e01-d113-3473-8d6f-9e11e09332ea/attachments" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/reports/66529e01-d113-3473-8d6f-9e11e09332ea/attachments"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/reports/{report_uuid}/attachments

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

report_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Delete report attachment.

requires authentication

Example request:
curl --request DELETE \
    "http://imac.name/api/v1/reports/66529e01-d113-3473-8d6f-9e11e09332ea/attachments/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/reports/66529e01-d113-3473-8d6f-9e11e09332ea/attachments/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

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

Request      

DELETE api/v1/reports/{report_uuid}/attachments/{attachment_uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

report_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

attachment_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Display a listing of reports.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/reports" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/reports"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/reports

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created report.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/reports" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"report_number\": \"vmqeopfuudtdsufvyvddq\",
    \"report_type\": \"amniihfqcoynlazghdtqt\",
    \"title\": \"qxbajwbpilpmufinllwlo\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"status\": \"submitted\",
    \"priority\": \"medium\",
    \"location_lat\": -90,
    \"location_lng\": -179
}"
const url = new URL(
    "http://imac.name/api/v1/reports"
);

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

let body = {
    "report_number": "vmqeopfuudtdsufvyvddq",
    "report_type": "amniihfqcoynlazghdtqt",
    "title": "qxbajwbpilpmufinllwlo",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "status": "submitted",
    "priority": "medium",
    "location_lat": -90,
    "location_lng": -179
};

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

Request      

POST api/v1/reports

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

report_number   string  optional    

Must not be greater than 50 characters. Example: vmqeopfuudtdsufvyvddq

project_id   string  optional    

The id of an existing record in the projects table.

report_type   string     

Must not be greater than 255 characters. Example: amniihfqcoynlazghdtqt

title   string     

Must not be greater than 255 characters. Example: qxbajwbpilpmufinllwlo

description   string  optional    

Example: Dolores dolorum amet iste laborum eius est dolor.

status   string  optional    

Example: submitted

Must be one of:
  • draft
  • submitted
  • reviewed
  • resolved
  • closed
priority   string  optional    

Example: medium

Must be one of:
  • low
  • medium
  • high
  • urgent
location_lat   number  optional    

Must be between -90 and 90. Example: -90

location_lng   number  optional    

Must be between -180 and 180. Example: -179

Display the specified report.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/reports/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/reports/66529e01-d113-3473-8d6f-9e11e09332ea"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/reports/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Update the specified report.

requires authentication

Example request:
curl --request PUT \
    "http://imac.name/api/v1/reports/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"report_number\": \"vmqeopfuudtdsufvyvddq\",
    \"report_type\": \"amniihfqcoynlazghdtqt\",
    \"title\": \"qxbajwbpilpmufinllwlo\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"status\": \"draft\",
    \"priority\": \"high\",
    \"location_lat\": -90,
    \"location_lng\": -179
}"
const url = new URL(
    "http://imac.name/api/v1/reports/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

let body = {
    "report_number": "vmqeopfuudtdsufvyvddq",
    "report_type": "amniihfqcoynlazghdtqt",
    "title": "qxbajwbpilpmufinllwlo",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "status": "draft",
    "priority": "high",
    "location_lat": -90,
    "location_lng": -179
};

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

Request      

PUT api/v1/reports/{uuid}

PATCH api/v1/reports/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Body Parameters

report_number   string  optional    

Must not be greater than 50 characters. Example: vmqeopfuudtdsufvyvddq

project_id   string  optional    

The id of an existing record in the projects table.

report_type   string  optional    

Must not be greater than 255 characters. Example: amniihfqcoynlazghdtqt

title   string  optional    

Must not be greater than 255 characters. Example: qxbajwbpilpmufinllwlo

description   string  optional    

Example: Dolores dolorum amet iste laborum eius est dolor.

status   string  optional    

Example: draft

Must be one of:
  • draft
  • submitted
  • reviewed
  • resolved
  • closed
priority   string  optional    

Example: high

Must be one of:
  • low
  • medium
  • high
  • urgent
location_lat   number  optional    

Must be between -90 and 90. Example: -90

location_lng   number  optional    

Must be between -180 and 180. Example: -179

Remove the specified report.

requires authentication

Example request:
curl --request DELETE \
    "http://imac.name/api/v1/reports/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/reports/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

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

Request      

DELETE api/v1/reports/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Roles

APIs for managing roles and permissions

Assign permissions to role.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/roles/019a72f5-e02f-70bb-9443-7cb5ab140c15/permissions" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
const url = new URL(
    "http://imac.name/api/v1/roles/019a72f5-e02f-70bb-9443-7cb5ab140c15/permissions"
);

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

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

Request      

POST api/v1/roles/{role_uuid}/permissions

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

role_uuid   string     

Example: 019a72f5-e02f-70bb-9443-7cb5ab140c15

Body Parameters

permission_ids   string[]  optional    

The id of an existing record in the permissions table.

Display a listing of roles.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/roles" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/roles"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/roles

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created role.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/roles" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores molestias ipsam sit.\",
    \"is_system\": true
}"
const url = new URL(
    "http://imac.name/api/v1/roles"
);

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

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores molestias ipsam sit.",
    "is_system": true
};

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

Request      

POST api/v1/roles

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string  optional    

Must not be greater than 500 characters. Example: Dolores molestias ipsam sit.

is_system   boolean  optional    

Example: true

permission_ids   string[]  optional    

The id of an existing record in the permissions table.

Display the specified role.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/roles/019a72f5-e02f-70bb-9443-7cb5ab140c15" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/roles/019a72f5-e02f-70bb-9443-7cb5ab140c15"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/roles/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 019a72f5-e02f-70bb-9443-7cb5ab140c15

Update the specified role.

requires authentication

Example request:
curl --request PUT \
    "http://imac.name/api/v1/roles/019a72f5-e02f-70bb-9443-7cb5ab140c15" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores molestias ipsam sit.\",
    \"is_system\": true
}"
const url = new URL(
    "http://imac.name/api/v1/roles/019a72f5-e02f-70bb-9443-7cb5ab140c15"
);

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

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores molestias ipsam sit.",
    "is_system": true
};

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

Request      

PUT api/v1/roles/{uuid}

PATCH api/v1/roles/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 019a72f5-e02f-70bb-9443-7cb5ab140c15

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string  optional    

Must not be greater than 500 characters. Example: Dolores molestias ipsam sit.

is_system   boolean  optional    

Example: true

permission_ids   string[]  optional    

The id of an existing record in the permissions table.

Remove the specified role.

requires authentication

Example request:
curl --request DELETE \
    "http://imac.name/api/v1/roles/019a72f5-e02f-70bb-9443-7cb5ab140c15" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/roles/019a72f5-e02f-70bb-9443-7cb5ab140c15"
);

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

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

Request      

DELETE api/v1/roles/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 019a72f5-e02f-70bb-9443-7cb5ab140c15

Stock Management

APIs for managing stock levels and movements

Adjust stock level (increase or decrease).

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/stock-levels/adjust" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"item_id\": \"consequatur\",
    \"location\": \"mqeopfuudtdsufvyvddqa\",
    \"adjustment\": 11613.31890586,
    \"reason\": \"opfuudtdsufvyvddqamni\",
    \"notes\": \"consequatur\"
}"
const url = new URL(
    "http://imac.name/api/v1/stock-levels/adjust"
);

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

let body = {
    "item_id": "consequatur",
    "location": "mqeopfuudtdsufvyvddqa",
    "adjustment": 11613.31890586,
    "reason": "opfuudtdsufvyvddqamni",
    "notes": "consequatur"
};

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

Request      

POST api/v1/stock-levels/adjust

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

item_id   string     

The id of an existing record in the items table. Example: consequatur

location   string     

Must not be greater than 255 characters. Example: mqeopfuudtdsufvyvddqa

adjustment   number     

Example: 11613.31890586

reason   string     

Must not be greater than 500 characters. Example: opfuudtdsufvyvddqamni

notes   string  optional    

Example: consequatur

Transfer stock between locations.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/stock-levels/transfer" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"item_id\": \"consequatur\",
    \"location_from\": \"mqeopfuudtdsufvyvddqa\",
    \"location_to\": \"mniihfqcoynlazghdtqtq\",
    \"quantity\": 80,
    \"notes\": \"consequatur\"
}"
const url = new URL(
    "http://imac.name/api/v1/stock-levels/transfer"
);

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

let body = {
    "item_id": "consequatur",
    "location_from": "mqeopfuudtdsufvyvddqa",
    "location_to": "mniihfqcoynlazghdtqtq",
    "quantity": 80,
    "notes": "consequatur"
};

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

Request      

POST api/v1/stock-levels/transfer

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

item_id   string     

The id of an existing record in the items table. Example: consequatur

location_from   string     

Must not be greater than 255 characters. Example: mqeopfuudtdsufvyvddqa

location_to   string     

The value and location_from must be different. Must not be greater than 255 characters. Example: mniihfqcoynlazghdtqtq

quantity   number     

Must be at least 0.01. Example: 80

notes   string  optional    

Example: consequatur

Get low stock items.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/stock-levels/low-stock" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/stock-levels/low-stock"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/stock-levels/low-stock

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Display a listing of stock levels.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/stock-levels" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/stock-levels"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/stock-levels

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created stock level.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/stock-levels" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"item_id\": \"consequatur\",
    \"location\": \"mqeopfuudtdsufvyvddqa\",
    \"on_hand\": 45,
    \"reserved\": 46,
    \"reorder_level\": 28
}"
const url = new URL(
    "http://imac.name/api/v1/stock-levels"
);

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

let body = {
    "item_id": "consequatur",
    "location": "mqeopfuudtdsufvyvddqa",
    "on_hand": 45,
    "reserved": 46,
    "reorder_level": 28
};

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

Request      

POST api/v1/stock-levels

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

item_id   string     

The id of an existing record in the items table. Example: consequatur

location   string     

Must not be greater than 255 characters. Example: mqeopfuudtdsufvyvddqa

on_hand   number     

Must be at least 0. Example: 45

reserved   number  optional    

Must be at least 0. Example: 46

reorder_level   number  optional    

Must be at least 0. Example: 28

Display the specified stock level.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/stock-levels/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/stock-levels/66529e01-d113-3473-8d6f-9e11e09332ea"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/stock-levels/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Update the specified stock level.

requires authentication

Example request:
curl --request PUT \
    "http://imac.name/api/v1/stock-levels/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"location\": \"vmqeopfuudtdsufvyvddq\",
    \"on_hand\": 1,
    \"reserved\": 45,
    \"reorder_level\": 46
}"
const url = new URL(
    "http://imac.name/api/v1/stock-levels/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

let body = {
    "location": "vmqeopfuudtdsufvyvddq",
    "on_hand": 1,
    "reserved": 45,
    "reorder_level": 46
};

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

Request      

PUT api/v1/stock-levels/{uuid}

PATCH api/v1/stock-levels/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Body Parameters

item_id   string  optional    

The id of an existing record in the items table.

location   string  optional    

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

on_hand   number  optional    

Must be at least 0. Example: 1

reserved   number  optional    

Must be at least 0. Example: 45

reorder_level   number  optional    

Must be at least 0. Example: 46

Remove the specified stock level.

requires authentication

Example request:
curl --request DELETE \
    "http://imac.name/api/v1/stock-levels/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/stock-levels/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

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

Request      

DELETE api/v1/stock-levels/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Suppliers

APIs for managing suppliers

Get supplier price lists.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/suppliers/66529e01-d113-3473-8d6f-9e11e09332ea/price-lists" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/suppliers/66529e01-d113-3473-8d6f-9e11e09332ea/price-lists"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/suppliers/{supplier_uuid}/price-lists

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

supplier_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Display a listing of suppliers.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/suppliers" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/suppliers"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/suppliers

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created supplier.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/suppliers" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"vmqeopfuudtdsufvyvddq\",
    \"name\": \"amniihfqcoynlazghdtqt\",
    \"contact_person\": \"qxbajwbpilpmufinllwlo\",
    \"email\": \"schmitt.beulah@example.org\",
    \"phone\": \"smsjuryvojcybzvrb\",
    \"address\": \"yickznkygloigmkwxphlv\",
    \"payment_terms\": \"azjrcnfbaqywuxhgjjmzu\",
    \"rating\": 5,
    \"categories\": [
        \"consequatur\"
    ],
    \"status\": \"inactive\"
}"
const url = new URL(
    "http://imac.name/api/v1/suppliers"
);

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

let body = {
    "code": "vmqeopfuudtdsufvyvddq",
    "name": "amniihfqcoynlazghdtqt",
    "contact_person": "qxbajwbpilpmufinllwlo",
    "email": "schmitt.beulah@example.org",
    "phone": "smsjuryvojcybzvrb",
    "address": "yickznkygloigmkwxphlv",
    "payment_terms": "azjrcnfbaqywuxhgjjmzu",
    "rating": 5,
    "categories": [
        "consequatur"
    ],
    "status": "inactive"
};

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

Request      

POST api/v1/suppliers

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

code   string     

Must not be greater than 50 characters. Example: vmqeopfuudtdsufvyvddq

name   string     

Must not be greater than 255 characters. Example: amniihfqcoynlazghdtqt

contact_person   string  optional    

Must not be greater than 255 characters. Example: qxbajwbpilpmufinllwlo

email   string  optional    

Must be a valid email address. Must not be greater than 255 characters. Example: schmitt.beulah@example.org

phone   string  optional    

Must not be greater than 20 characters. Example: smsjuryvojcybzvrb

address   string  optional    

Must not be greater than 500 characters. Example: yickznkygloigmkwxphlv

payment_terms   string  optional    

Must not be greater than 255 characters. Example: azjrcnfbaqywuxhgjjmzu

rating   integer  optional    

Must be at least 0. Must not be greater than 5. Example: 5

categories   string[]  optional    
status   string  optional    

Example: inactive

Must be one of:
  • active
  • inactive
  • suspended

Display the specified supplier.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/suppliers/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/suppliers/66529e01-d113-3473-8d6f-9e11e09332ea"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/suppliers/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Update the specified supplier.

requires authentication

Example request:
curl --request PUT \
    "http://imac.name/api/v1/suppliers/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"vmqeopfuudtdsufvyvddq\",
    \"name\": \"amniihfqcoynlazghdtqt\",
    \"contact_person\": \"qxbajwbpilpmufinllwlo\",
    \"email\": \"schmitt.beulah@example.org\",
    \"phone\": \"smsjuryvojcybzvrb\",
    \"address\": \"yickznkygloigmkwxphlv\",
    \"payment_terms\": \"azjrcnfbaqywuxhgjjmzu\",
    \"rating\": 5,
    \"categories\": [
        \"consequatur\"
    ],
    \"status\": \"active\"
}"
const url = new URL(
    "http://imac.name/api/v1/suppliers/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

let body = {
    "code": "vmqeopfuudtdsufvyvddq",
    "name": "amniihfqcoynlazghdtqt",
    "contact_person": "qxbajwbpilpmufinllwlo",
    "email": "schmitt.beulah@example.org",
    "phone": "smsjuryvojcybzvrb",
    "address": "yickznkygloigmkwxphlv",
    "payment_terms": "azjrcnfbaqywuxhgjjmzu",
    "rating": 5,
    "categories": [
        "consequatur"
    ],
    "status": "active"
};

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

Request      

PUT api/v1/suppliers/{uuid}

PATCH api/v1/suppliers/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Body Parameters

code   string  optional    

Must not be greater than 50 characters. Example: vmqeopfuudtdsufvyvddq

name   string  optional    

Must not be greater than 255 characters. Example: amniihfqcoynlazghdtqt

contact_person   string  optional    

Must not be greater than 255 characters. Example: qxbajwbpilpmufinllwlo

email   string  optional    

Must be a valid email address. Must not be greater than 255 characters. Example: schmitt.beulah@example.org

phone   string  optional    

Must not be greater than 20 characters. Example: smsjuryvojcybzvrb

address   string  optional    

Must not be greater than 500 characters. Example: yickznkygloigmkwxphlv

payment_terms   string  optional    

Must not be greater than 255 characters. Example: azjrcnfbaqywuxhgjjmzu

rating   integer  optional    

Must be at least 0. Must not be greater than 5. Example: 5

categories   string[]  optional    
status   string  optional    

Example: active

Must be one of:
  • active
  • inactive
  • suspended

Remove the specified supplier.

requires authentication

Example request:
curl --request DELETE \
    "http://imac.name/api/v1/suppliers/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/suppliers/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

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

Request      

DELETE api/v1/suppliers/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

System Settings

APIs for managing system settings (admin only)

Get a system setting by key.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/system/settings/key/consequatur" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/system/settings/key/consequatur"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/system/settings/key/{key}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

key   string     

The key. Example: consequatur

Display a listing of system settings.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/system/settings" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/system/settings"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/system/settings

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created system setting.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/system/settings" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"key\": \"vmqeopfuudtdsufvyvddq\",
    \"value\": \"consequatur\",
    \"description\": \"Dolorum amet iste laborum eius est dolor.\",
    \"type\": \"integer\"
}"
const url = new URL(
    "http://imac.name/api/v1/system/settings"
);

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

let body = {
    "key": "vmqeopfuudtdsufvyvddq",
    "value": "consequatur",
    "description": "Dolorum amet iste laborum eius est dolor.",
    "type": "integer"
};

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

Request      

POST api/v1/system/settings

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

key   string     

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

value   string     

Example: consequatur

description   string  optional    

Must not be greater than 500 characters. Example: Dolorum amet iste laborum eius est dolor.

type   string  optional    

Example: integer

Must be one of:
  • string
  • integer
  • boolean
  • json

Display the specified system setting.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/system/settings/consequatur" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/system/settings/consequatur"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/system/settings/{id}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the setting. Example: consequatur

Update the specified system setting.

requires authentication

Example request:
curl --request PUT \
    "http://imac.name/api/v1/system/settings/consequatur" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"key\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores molestias ipsam sit.\",
    \"type\": \"string\"
}"
const url = new URL(
    "http://imac.name/api/v1/system/settings/consequatur"
);

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

let body = {
    "key": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores molestias ipsam sit.",
    "type": "string"
};

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

Request      

PUT api/v1/system/settings/{id}

PATCH api/v1/system/settings/{id}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the setting. Example: consequatur

Body Parameters

key   string  optional    

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

value   string  optional    
description   string  optional    

Must not be greater than 500 characters. Example: Dolores molestias ipsam sit.

type   string  optional    

Example: string

Must be one of:
  • string
  • integer
  • boolean
  • json

Remove the specified system setting.

requires authentication

Example request:
curl --request DELETE \
    "http://imac.name/api/v1/system/settings/consequatur" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/system/settings/consequatur"
);

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

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

Request      

DELETE api/v1/system/settings/{id}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the setting. Example: consequatur

Timesheets

APIs for managing timesheet entries

Submit timesheet for approval.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/timesheets/66529e01-d113-3473-8d6f-9e11e09332ea/submit" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/timesheets/66529e01-d113-3473-8d6f-9e11e09332ea/submit"
);

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

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

Request      

POST api/v1/timesheets/{timesheet_uuid}/submit

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

timesheet_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Approve timesheet entry.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/timesheets/66529e01-d113-3473-8d6f-9e11e09332ea/approve" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/timesheets/66529e01-d113-3473-8d6f-9e11e09332ea/approve"
);

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

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

Request      

POST api/v1/timesheets/{timesheet_uuid}/approve

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

timesheet_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Reject timesheet entry.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/timesheets/66529e01-d113-3473-8d6f-9e11e09332ea/reject" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/timesheets/66529e01-d113-3473-8d6f-9e11e09332ea/reject"
);

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

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

Request      

POST api/v1/timesheets/{timesheet_uuid}/reject

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

timesheet_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Get timesheet summary.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/timesheets/summary" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/timesheets/summary"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/timesheets/summary

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Display a listing of timesheet entries.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/timesheets" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/timesheets"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/timesheets

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created timesheet entry.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/timesheets" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"project_id\": \"consequatur\",
    \"date\": \"2025-11-12T10:13:22\",
    \"hours\": 12,
    \"task_description\": \"consequatur\",
    \"location_lat\": -90,
    \"location_lng\": -179,
    \"location_address\": \"eopfuudtdsufvyvddqamn\",
    \"status\": \"approved\"
}"
const url = new URL(
    "http://imac.name/api/v1/timesheets"
);

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

let body = {
    "project_id": "consequatur",
    "date": "2025-11-12T10:13:22",
    "hours": 12,
    "task_description": "consequatur",
    "location_lat": -90,
    "location_lng": -179,
    "location_address": "eopfuudtdsufvyvddqamn",
    "status": "approved"
};

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

Request      

POST api/v1/timesheets

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

project_id   string     

The id of an existing record in the projects table. Example: consequatur

date   string     

Must be a valid date. Example: 2025-11-12T10:13:22

hours   number     

Must be at least 0.01. Must not be greater than 24. Example: 12

task_description   string  optional    

Example: consequatur

location_lat   number     

Must be between -90 and 90. Example: -90

location_lng   number     

Must be between -180 and 180. Example: -179

location_address   string  optional    

Must not be greater than 500 characters. Example: eopfuudtdsufvyvddqamn

status   string  optional    

Example: approved

Must be one of:
  • draft
  • submitted
  • approved
  • rejected

Display the specified timesheet entry.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/timesheets/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/timesheets/66529e01-d113-3473-8d6f-9e11e09332ea"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/timesheets/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Update the specified timesheet entry.

requires authentication

Example request:
curl --request PUT \
    "http://imac.name/api/v1/timesheets/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date\": \"2025-11-12T10:13:22\",
    \"hours\": 20,
    \"task_description\": \"consequatur\",
    \"location_lat\": -90,
    \"location_lng\": -179,
    \"location_address\": \"eopfuudtdsufvyvddqamn\",
    \"status\": \"rejected\"
}"
const url = new URL(
    "http://imac.name/api/v1/timesheets/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

let body = {
    "date": "2025-11-12T10:13:22",
    "hours": 20,
    "task_description": "consequatur",
    "location_lat": -90,
    "location_lng": -179,
    "location_address": "eopfuudtdsufvyvddqamn",
    "status": "rejected"
};

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

Request      

PUT api/v1/timesheets/{uuid}

PATCH api/v1/timesheets/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Body Parameters

project_id   string  optional    

The id of an existing record in the projects table.

date   string  optional    

Must be a valid date. Example: 2025-11-12T10:13:22

hours   number  optional    

Must be at least 0.01. Must not be greater than 24. Example: 20

task_description   string  optional    

Example: consequatur

location_lat   number  optional    

Must be between -90 and 90. Example: -90

location_lng   number  optional    

Must be between -180 and 180. Example: -179

location_address   string  optional    

Must not be greater than 500 characters. Example: eopfuudtdsufvyvddqamn

status   string  optional    

Example: rejected

Must be one of:
  • draft
  • submitted
  • approved
  • rejected

Remove the specified timesheet entry.

requires authentication

Example request:
curl --request DELETE \
    "http://imac.name/api/v1/timesheets/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/timesheets/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

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

Request      

DELETE api/v1/timesheets/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Training Records

APIs for managing training records

Get expiring certifications.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/training-records/expiring" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/training-records/expiring"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/training-records/expiring

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Display a listing of training records.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/training-records" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/training-records"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/training-records

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created training record.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/training-records" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user_id\": \"consequatur\",
    \"course_name\": \"mqeopfuudtdsufvyvddqa\",
    \"provider\": \"mniihfqcoynlazghdtqtq\",
    \"completion_date\": \"2025-11-12T10:13:22\",
    \"expiry_date\": \"2106-12-11\",
    \"certificate_path\": \"mqeopfuudtdsufvyvddqa\",
    \"status\": \"expired\"
}"
const url = new URL(
    "http://imac.name/api/v1/training-records"
);

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

let body = {
    "user_id": "consequatur",
    "course_name": "mqeopfuudtdsufvyvddqa",
    "provider": "mniihfqcoynlazghdtqtq",
    "completion_date": "2025-11-12T10:13:22",
    "expiry_date": "2106-12-11",
    "certificate_path": "mqeopfuudtdsufvyvddqa",
    "status": "expired"
};

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

Request      

POST api/v1/training-records

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

user_id   string     

The id of an existing record in the users table. Example: consequatur

course_name   string     

Must not be greater than 255 characters. Example: mqeopfuudtdsufvyvddqa

provider   string  optional    

Must not be greater than 255 characters. Example: mniihfqcoynlazghdtqtq

completion_date   string     

Must be a valid date. Example: 2025-11-12T10:13:22

expiry_date   string  optional    

Must be a valid date. Must be a date after completion_date. Example: 2106-12-11

certificate_path   string  optional    

Must not be greater than 500 characters. Example: mqeopfuudtdsufvyvddqa

status   string  optional    

Example: expired

Must be one of:
  • active
  • expired
  • pending

Display the specified training record.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/training-records/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/training-records/66529e01-d113-3473-8d6f-9e11e09332ea"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/training-records/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Update the specified training record.

requires authentication

Example request:
curl --request PUT \
    "http://imac.name/api/v1/training-records/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"course_name\": \"vmqeopfuudtdsufvyvddq\",
    \"provider\": \"amniihfqcoynlazghdtqt\",
    \"completion_date\": \"2025-11-12T10:13:22\",
    \"expiry_date\": \"2106-12-11\",
    \"certificate_path\": \"mqeopfuudtdsufvyvddqa\",
    \"status\": \"expired\"
}"
const url = new URL(
    "http://imac.name/api/v1/training-records/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

let body = {
    "course_name": "vmqeopfuudtdsufvyvddq",
    "provider": "amniihfqcoynlazghdtqt",
    "completion_date": "2025-11-12T10:13:22",
    "expiry_date": "2106-12-11",
    "certificate_path": "mqeopfuudtdsufvyvddqa",
    "status": "expired"
};

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

Request      

PUT api/v1/training-records/{uuid}

PATCH api/v1/training-records/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Body Parameters

user_id   string  optional    

The id of an existing record in the users table.

course_name   string  optional    

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

provider   string  optional    

Must not be greater than 255 characters. Example: amniihfqcoynlazghdtqt

completion_date   string  optional    

Must be a valid date. Example: 2025-11-12T10:13:22

expiry_date   string  optional    

Must be a valid date. Must be a date after completion_date. Example: 2106-12-11

certificate_path   string  optional    

Must not be greater than 500 characters. Example: mqeopfuudtdsufvyvddqa

status   string  optional    

Example: expired

Must be one of:
  • active
  • expired
  • pending

Remove the specified training record.

requires authentication

Example request:
curl --request DELETE \
    "http://imac.name/api/v1/training-records/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/training-records/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

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

Request      

DELETE api/v1/training-records/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Vehicles

APIs for managing vehicles

Assign vehicle to project.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/vehicles/66529e01-d113-3473-8d6f-9e11e09332ea/assign" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"project_id\": \"consequatur\"
}"
const url = new URL(
    "http://imac.name/api/v1/vehicles/66529e01-d113-3473-8d6f-9e11e09332ea/assign"
);

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

let body = {
    "project_id": "consequatur"
};

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

Request      

POST api/v1/vehicles/{vehicle_uuid}/assign

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

vehicle_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Body Parameters

project_id   string     

The id of an existing record in the projects table. Example: consequatur

Unassign vehicle from project.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/vehicles/66529e01-d113-3473-8d6f-9e11e09332ea/unassign" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/vehicles/66529e01-d113-3473-8d6f-9e11e09332ea/unassign"
);

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

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

Request      

POST api/v1/vehicles/{vehicle_uuid}/unassign

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

vehicle_uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Display a listing of vehicles.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/vehicles" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/vehicles"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/vehicles

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created vehicle.

requires authentication

Example request:
curl --request POST \
    "http://imac.name/api/v1/vehicles" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"plate_number\": \"vmqeopfuudtdsufvyvddq\",
    \"type\": \"amniihfqcoynlazghdtqt\",
    \"make\": \"qxbajwbpilpmufinllwlo\",
    \"model\": \"auydlsmsjuryvojcybzvr\",
    \"year\": 2,
    \"status\": \"maintenance\",
    \"last_service_date\": \"2025-11-12T10:13:21\",
    \"odometer\": 84
}"
const url = new URL(
    "http://imac.name/api/v1/vehicles"
);

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

let body = {
    "plate_number": "vmqeopfuudtdsufvyvddq",
    "type": "amniihfqcoynlazghdtqt",
    "make": "qxbajwbpilpmufinllwlo",
    "model": "auydlsmsjuryvojcybzvr",
    "year": 2,
    "status": "maintenance",
    "last_service_date": "2025-11-12T10:13:21",
    "odometer": 84
};

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

Request      

POST api/v1/vehicles

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

plate_number   string     

Must not be greater than 50 characters. Example: vmqeopfuudtdsufvyvddq

type   string  optional    

Must not be greater than 255 characters. Example: amniihfqcoynlazghdtqt

make   string  optional    

Must not be greater than 255 characters. Example: qxbajwbpilpmufinllwlo

model   string  optional    

Must not be greater than 255 characters. Example: auydlsmsjuryvojcybzvr

year   integer  optional    

Must be at least 1900. Must not be greater than 2026. Example: 2

status   string  optional    

Example: maintenance

Must be one of:
  • available
  • assigned
  • maintenance
  • retired
assigned_project_id   string  optional    

The id of an existing record in the projects table.

last_service_date   string  optional    

Must be a valid date. Example: 2025-11-12T10:13:21

odometer   integer  optional    

Must be at least 0. Example: 84

Display the specified vehicle.

requires authentication

Example request:
curl --request GET \
    --get "http://imac.name/api/v1/vehicles/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/vehicles/66529e01-d113-3473-8d6f-9e11e09332ea"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "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
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/vehicles/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Update the specified vehicle.

requires authentication

Example request:
curl --request PUT \
    "http://imac.name/api/v1/vehicles/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"plate_number\": \"vmqeopfuudtdsufvyvddq\",
    \"type\": \"amniihfqcoynlazghdtqt\",
    \"make\": \"qxbajwbpilpmufinllwlo\",
    \"model\": \"auydlsmsjuryvojcybzvr\",
    \"year\": 2,
    \"status\": \"maintenance\",
    \"last_service_date\": \"2025-11-12T10:13:22\",
    \"odometer\": 84
}"
const url = new URL(
    "http://imac.name/api/v1/vehicles/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

let body = {
    "plate_number": "vmqeopfuudtdsufvyvddq",
    "type": "amniihfqcoynlazghdtqt",
    "make": "qxbajwbpilpmufinllwlo",
    "model": "auydlsmsjuryvojcybzvr",
    "year": 2,
    "status": "maintenance",
    "last_service_date": "2025-11-12T10:13:22",
    "odometer": 84
};

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

Request      

PUT api/v1/vehicles/{uuid}

PATCH api/v1/vehicles/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea

Body Parameters

plate_number   string  optional    

Must not be greater than 50 characters. Example: vmqeopfuudtdsufvyvddq

type   string  optional    

Must not be greater than 255 characters. Example: amniihfqcoynlazghdtqt

make   string  optional    

Must not be greater than 255 characters. Example: qxbajwbpilpmufinllwlo

model   string  optional    

Must not be greater than 255 characters. Example: auydlsmsjuryvojcybzvr

year   integer  optional    

Must be at least 1900. Must not be greater than 2026. Example: 2

status   string  optional    

Example: maintenance

Must be one of:
  • available
  • assigned
  • maintenance
  • retired
assigned_project_id   string  optional    

The id of an existing record in the projects table.

last_service_date   string  optional    

Must be a valid date. Example: 2025-11-12T10:13:22

odometer   integer  optional    

Must be at least 0. Example: 84

Remove the specified vehicle.

requires authentication

Example request:
curl --request DELETE \
    "http://imac.name/api/v1/vehicles/66529e01-d113-3473-8d6f-9e11e09332ea" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://imac.name/api/v1/vehicles/66529e01-d113-3473-8d6f-9e11e09332ea"
);

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

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

Request      

DELETE api/v1/vehicles/{uuid}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 66529e01-d113-3473-8d6f-9e11e09332ea