Introduction
This documentation aims to provide all the information you need to work with our API.
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 {JWT_TOKEN}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your token by visiting your dashboard and clicking Generate API token.
Admins
Admin
Index Admins
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/v1/admin/admins?filter%5Bname%5D=John+Doe&filter%5Bemail%5D=johndoe%40somewhere.com&sort=name%2C-email&page=1&per_page=10" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/v1/admin/admins"
);
const params = {
"filter[name]": "John Doe",
"filter[email]": "johndoe@somewhere.com",
"sort": "name,-email",
"page": "1",
"per_page": "10",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, ok):
{
"message": "ok",
"data": {
"data": [
{
"id": "01jm56rsp3z3bmq9mw7rxp26br",
"name": "John Doe",
"email": "jhondoe@somewhere.com",
"email_verified_at": "2021-10-01T00:00:00.000000Z",
"created_at": "2021-10-01T00:00:00.000000Z",
"updated_at": "2021-10-01T00:00:00.000000Z"
}
]
}
}
Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Authentication
Admin
Login
Example request:
curl --request POST \
"http://localhost/api/v1/admin/authentication/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"admin@somewhere.com\",
\"password\": \"password\"
}"
const url = new URL(
"http://localhost/api/v1/admin/authentication/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "admin@somewhere.com",
"password": "password"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, ok):
{
"message": "ok",
"data": {
"access_token": "jwt_token",
"access_token_expires_at": "timestamp_on_which_access_token_expires"
}
}
Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Logout
requires authentication
Example request:
curl --request POST \
"http://localhost/api/v1/admin/authentication/logout" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/v1/admin/authentication/logout"
);
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200, ok):
{
"message": "ok",
"data": []
}
Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Endpoints
GET api/v1/payrolls/periods
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/v1/payrolls/periods" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/v1/payrolls/periods"
);
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Server Error"
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/v1/payrolls/period-dates
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/v1/payrolls/period-dates" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/v1/payrolls/period-dates"
);
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Server Error"
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/v1/payrolls/groups
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/v1/payrolls/groups" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/v1/payrolls/groups"
);
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Server Error"
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/v1/payrolls/analytics/last-three-months
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/v1/payrolls/analytics/last-three-months" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/v1/payrolls/analytics/last-three-months"
);
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "The payroll month field is required.",
"errors": {
"payroll_month": [
"The payroll month field is required."
]
}
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/v1/payrolls/analytics/total-income-currency
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/v1/payrolls/analytics/total-income-currency" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/v1/payrolls/analytics/total-income-currency"
);
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "The payroll group id field is required.",
"errors": {
"payroll_group_id": [
"The payroll group id field is required."
]
}
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/v1/payrolls/analytics/total-net-pay
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/v1/payrolls/analytics/total-net-pay" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/v1/payrolls/analytics/total-net-pay"
);
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "The payroll month field is required.",
"errors": {
"payroll_month": [
"The payroll month field is required."
]
}
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/v1/payrolls/groups/{id}/previous-months
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/v1/payrolls/groups/architecto/previous-months" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/v1/payrolls/groups/architecto/previous-months"
);
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Server Error"
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PATCH api/v1/payrolls/settings/main
requires authentication
Example request:
curl --request PATCH \
"http://localhost/api/v1/payrolls/settings/main" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/v1/payrolls/settings/main"
);
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/v1/payrolls/settings/main
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/v1/payrolls/settings/main" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/v1/payrolls/settings/main"
);
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Settings retrieved successfully",
"data": {
"id": "18334a40-71d4-11ec-b95c-436603e907c2",
"base_currency_code": "MMK",
"income_tax_option": "without_approximately",
"financial_month": 4,
"ho_approver_id": "843e6280-bf71-11e9-9489-d7bf3defe876",
"ho_finance_approver_id": "ddfdec00-8a1b-11ec-aa1c-ad215049e5d2"
}
}
Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/v1/payrolls/settings
requires authentication
Example request:
curl --request POST \
"http://localhost/api/v1/payrolls/settings" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/v1/payrolls/settings"
);
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PATCH api/v1/payrolls/settings/{id}
requires authentication
Example request:
curl --request PATCH \
"http://localhost/api/v1/payrolls/settings/architecto" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/v1/payrolls/settings/architecto"
);
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/v1/payrolls/settings/{id}
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/v1/payrolls/settings/architecto" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/v1/payrolls/settings/architecto"
);
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "The weekly hours field is required. (and 8 more errors)",
"errors": {
"weekly_hours": [
"The weekly hours field is required."
],
"calculate_working_days_type": [
"The calculate working days type field is required."
],
"policy_id": [
"The policy id field is required."
],
"ot_type": [
"The ot type field is required."
],
"ot_hourly_amount": [
"The ot hourly amount field is required."
],
"absent_multiple": [
"The absent multiple field is required."
],
"absent_type": [
"The absent type field is required."
],
"absent_amount": [
"The absent amount field is required."
],
"cut_off_for_late_join": [
"The cut off for late join field is required."
]
}
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/v1/payrolls/income-taxes/totals
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/v1/payrolls/income-taxes/totals" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/v1/payrolls/income-taxes/totals"
);
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Total income taxes retrieved successfully",
"data": []
}
Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/v1/users/entities
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/v1/users/entities" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/v1/users/entities"
);
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Server Error"
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/v1/users/workspaces/current
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/v1/users/workspaces/current" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/v1/users/workspaces/current"
);
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Server Error"
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Payroll Module
Manage payroll groups and employee adjustments.
Update Tax on Bonus
requires authentication
Example request:
curl --request PATCH \
"http://localhost/api/v1/payrolls/groups/9b40b8a3-1111-2222-3333/employees/8c51c9b4-4444-5555-6666/tax-on-bonus" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"tax_on_bonus\": 5000,
\"tax_on_bonus_operator\": \"+\"
}"
const url = new URL(
"http://localhost/api/v1/payrolls/groups/9b40b8a3-1111-2222-3333/employees/8c51c9b4-4444-5555-6666/tax-on-bonus"
);
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"tax_on_bonus": 5000,
"tax_on_bonus_operator": "+"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Income Types
requires authentication
Retrieve a list of employee income types with optional filtering.
Example request:
curl --request GET \
--get "http://localhost/api/v1/payrolls/income-types?filter%5Bid%5D=architecto&filter%5Bname%5D=architecto&filter%5Btype%5D=fixed&filter%5Benable%5D=1&sort=name" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/v1/payrolls/income-types"
);
const params = {
"filter[id]": "architecto",
"filter[name]": "architecto",
"filter[type]": "fixed",
"filter[enable]": "1",
"sort": "name",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Income types retrieved successfully.",
"data": [
{
"id": "81fec2c0-9a56-11ed-b751-e363a94b3b3d",
"name": "_Novated Lease",
"type": "net_deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "8af61750-9a56-11ed-b104-35815bc814c3",
"name": "_Yoma Plus",
"type": "net_deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "4086bc50-71d5-11ec-9f1e-b923515c1e7f",
"name": "A08 Meal",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "4120ba40-71d5-11ec-a016-eb55fe54078d",
"name": "A13 KidsSchool_Fees",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "41955560-71d5-11ec-b13c-bbd878695ced",
"name": "A20 PrevMonth_WDays",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "8dd94780-8a50-11ed-8b16-339709c6f69b",
"name": "aaa",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "be1c67d0-71d4-11ec-abbf-cff6cfec99bc",
"name": "Absent",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "07688f70-9b6a-11ec-817a-f11d66105d24",
"name": "Absent UAT",
"type": "deduction",
"enable": false,
"hide_in_setting": false
},
{
"id": "3f9a4bb0-71d5-11ec-bb23-7baf0af685dc",
"name": "Accommodation Allowance",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "22be3a30-4f79-11ed-845b-638d13859938",
"name": "Additional Allowance",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "a6954930-8b3e-11ed-9c88-b785b5124351",
"name": "afternet12",
"type": "net_deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "90698f50-26dc-11ee-b661-4576b4c17124",
"name": "Allowance",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "4012fe00-71d5-11ec-a4d9-0bfb692b9288",
"name": "AWS",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "184c8360-71d4-11ec-be4f-e1fc81b350d3",
"name": "Basic Salary",
"type": "allowance",
"enable": true,
"hide_in_setting": true
},
{
"id": "3ff5b860-71d5-11ec-b858-8196aa72def9",
"name": "Bonus",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "413de4e0-71d5-11ec-9bb6-993f8cc82cfe",
"name": "Claims",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "389375e0-6268-11ee-8d09-319d8b38b4ab",
"name": "COL",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "4067b0b0-71d5-11ec-849b-cfdc1bd2500d",
"name": "Commission",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "415ad910-71d5-11ec-8037-f7bfd56dc9db",
"name": "CPF Employer (Addition)",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "42a09210-71d5-11ec-b67a-471ad4e9f06a",
"name": "CPF_Employee",
"type": "deduction",
"enable": false,
"hide_in_setting": false
},
{
"id": "42bf0420-71d5-11ec-962d-4d43a0610405",
"name": "CPF_Employer (Deduction)",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "9d6f21c0-6fc4-11ed-964b-b9352d38ae1b",
"name": "custom income type",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "cd422e30-880f-11ed-97e8-61db4453f13b",
"name": "deduction Type Feature(Afternet)",
"type": "net_deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "a826b420-880f-11ed-ba6e-43aab0540d68",
"name": "Deduction type new",
"type": "net_deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "89230640-8b3e-11ed-8fc6-3b1377faa496",
"name": "deduction12",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "217945a0-2f7e-11ee-879c-795ed1982030",
"name": "Drink Allowance",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "1b7a3530-7ef5-11ec-bce6-31c59cd07988",
"name": "Earned Salary",
"type": "allowance",
"enable": true,
"hide_in_setting": true
},
{
"id": "b58e7560-795a-11ed-b97b-cf18096fdf9e",
"name": "education",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "d077b040-795a-11ed-a8a5-b7f075ad313d",
"name": "example",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "a4220b70-795a-11ed-a9ca-9fc00a03fbe0",
"name": "example",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "402f7520-71d5-11ec-9cee-5572aa539330",
"name": "Hardship",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "daad8dc0-9161-11ed-aa81-bb698bbad732",
"name": "Home Loan",
"type": "net_deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "420c5520-71d5-11ec-9ecd-595a6ca052e2",
"name": "Housing",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "18573310-71d4-11ec-907d-3763f550852e",
"name": "Income Tax",
"type": "deduction",
"enable": true,
"hide_in_setting": true
},
{
"id": "2afb31d0-9a56-11ed-b2e9-495f6096c06d",
"name": "KLH 1",
"type": "net_deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "31d972b0-9a56-11ed-9b61-a7516c14190d",
"name": "KLH 2",
"type": "net_deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "9dd95a90-2f73-11ee-85d2-cf68c8b4f339",
"name": "Ko PaiLay Tax",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "18616ca0-71d4-11ec-9a2c-791d355c94ef",
"name": "Late Penalty",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "d79a3f50-ec85-11ed-8430-4750d1f72d6b",
"name": "Leave Allowance",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "d81ebb00-ec85-11ed-a13d-ff2d5e4ab4f2",
"name": "Leave Deduction",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "bae96380-71e3-11ec-9961-6bcaedbaeadb",
"name": "Leave Refund",
"type": "allowance",
"enable": true,
"hide_in_setting": true
},
{
"id": "40c4f580-71d5-11ec-9dba-f5eab948f4ec",
"name": "Leave Refund (Manual)",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "40a4caf0-71d5-11ec-b709-455b413111e8",
"name": "Location",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "1d62b4c0-9b6a-11ec-8ea5-abe9052d8851",
"name": "LOP_UAT",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "0f11b880-8b2b-11ed-83fc-8b7687328afa",
"name": "Medical AR",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "6e049020-9807-11ed-a26c-d3ff5c7b19e7",
"name": "NDT Test",
"type": "net_deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "61d09d80-880f-11ed-87ed-3760b801115f",
"name": "New Deduction Type (AND)",
"type": "net_deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "41d24cb0-71d5-11ec-b20e-5dfe2721a9b7",
"name": "Notice Pay",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "42f9c700-71d5-11ec-95df-c79db2590d0e",
"name": "Novated Lease",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "ad4acaf0-d1ee-11ed-9ae9-8733dea70efe",
"name": "Off_Days Allowance",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "3fd72440-71d5-11ec-bccb-3d2189dced96",
"name": "Other Allowance",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "0ca6a690-4f7c-11ed-ad6c-97d494175550",
"name": "Other Deduction",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "41036940-71d5-11ec-93ea-a751274d9040",
"name": "OtherAdd NTaxable",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "40e4e720-71d5-11ec-b291-2d7aff3cfe87",
"name": "OtherAdd Taxable",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "42662820-71d5-11ec-8ccd-c96aa7b8f3cb",
"name": "OtherDedu Taxable",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "42839400-71d5-11ec-8206-d36a3bfe491d",
"name": "OtherDedu_NTaxable",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "18522650-71d4-11ec-9dbe-03da67d6b2a5",
"name": "Overtime",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "424664e0-71d5-11ec-ad69-b713cdefc05c",
"name": "Owing by Staff",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "4178d7b0-71d5-11ec-a8de-e98b6f659175",
"name": "Owning to Staff ",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "404b2f90-71d5-11ec-8e28-137c0766b715",
"name": "Performance Pay",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "089a74b0-31a9-11ee-bcdd-4945050e1552",
"name": "Phone Bill Allowonce",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "3fb958f0-71d5-11ec-9994-550f38c81d31",
"name": "S6 Meal Allowance",
"type": "allowance",
"enable": true,
"hide_in_setting": true
},
{
"id": "48c6e930-a049-11ec-ad25-d345fe3211c8",
"name": "Service Money",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "41ef0e80-71d5-11ec-9f0f-431088ce2f79",
"name": "Severance Pay",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "185c41c0-71d4-11ec-9535-1d40f473e7a8",
"name": "SSB",
"type": "deduction",
"enable": true,
"hide_in_setting": true
},
{
"id": "b370ec40-9566-11ec-8beb-fd556bd4f0f9",
"name": "SSB (ER)",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "b34ceb40-9566-11ec-87a2-f93d370e324c",
"name": "SSB (ER)",
"type": "allowance",
"enable": false,
"hide_in_setting": false
},
{
"id": "c187d6b0-8a50-11ed-b2cd-c7ec05b46584",
"name": "sss",
"type": "net_deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "42dc5f70-71d5-11ec-b72d-2bce14772dee",
"name": "Staff Loan",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "41b339b0-71d5-11ec-b960-fbca76587362",
"name": "Tax Refund",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "432554e0-c93e-11ec-a1b8-073530ae6e72",
"name": "Test",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "d4438e10-8d64-11ed-ad35-65aa5e9a5d20",
"name": "Test",
"type": "net_deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "0a295790-c945-11ec-a103-b3c354b889ab",
"name": "Test",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "7e37f9a0-4ec0-11ed-8ea2-d3e1725d07f8",
"name": "Test Allowance",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "f720fd50-2441-11ed-9e99-4b36f9413e2a",
"name": "Test allowance",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "0d6341c0-26dc-11ee-89ee-d50ecbbfc0ef",
"name": "Test Allowance (Wai)",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "fcbbb410-26db-11ee-8929-c93b7637220e",
"name": "Test Allowance(Wai)",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "db9f2400-2a74-11ed-bccf-f97b599e0001",
"name": "Test Benefits",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "c953fa20-8739-11ed-968f-b5dbfe853cae",
"name": "Test Deduction",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "cf7c6980-2444-11ed-afb1-3b1bdde68194",
"name": "Test Deduction",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "c590f950-9f4a-11f0-9c14-89bfa84911a5",
"name": "Test PSC Allowance",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "65d825e0-3577-11ed-aa50-5f99037b455c",
"name": "Test SWH",
"type": "allowance",
"enable": false,
"hide_in_setting": false
},
{
"id": "03b1a940-26dc-11ee-8569-33273caaeb48",
"name": "TestAllowance(Wai)",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "3d02e180-5101-11ed-8392-11129208153f",
"name": "Testing",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "6f591c40-8b3e-11ed-9dbe-951836ba4c61",
"name": "testing12",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "c6099370-9162-11ed-b26e-0bd46df599e1",
"name": "testings",
"type": "net_deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "2b859d80-3a56-11ee-acff-9d7cf7474643",
"name": "Today Allowance",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "5d020550-2dec-11ef-a438-ed4d1ccf7d2d",
"name": "Transportation",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "3f7d49a0-71d5-11ec-a833-95721d4b5426",
"name": "Transportation Allowance",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "4229ecb0-71d5-11ec-b832-cd9b82270331",
"name": "Transportation Deduction",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "55ae9d50-9550-11ed-ae67-bf80553f2001",
"name": "tt",
"type": "net_deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "08152470-8b2b-11ed-b6a0-79d938966557",
"name": "Uniform",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "186695d0-71d4-11ec-983e-4df05adff75e",
"name": "Unpaid",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "2c503620-26dc-11ee-a064-fb51e64acf76",
"name": "Wai",
"type": "allowance",
"enable": false,
"hide_in_setting": false
},
{
"id": "f9009d00-276c-11ee-a95c-afc2c0559a6a",
"name": "wai wai Theint",
"type": "allowance",
"enable": true,
"hide_in_setting": false
},
{
"id": "13ab2b60-8b2b-11ed-b674-618be8a01fc6",
"name": "Yoma Plus",
"type": "deduction",
"enable": true,
"hide_in_setting": false
},
{
"id": "b9c3fb70-8a50-11ed-bc4a-6bf442f0fb10",
"name": "zzz",
"type": "deduction",
"enable": true,
"hide_in_setting": false
}
]
}
Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Employee Income Types by Payroll Group
requires authentication
Retrieve all income types assigned to a specific employee within a given payroll group.
Example request:
curl --request GET \
--get "http://localhost/api/v1/payrolls/groups/architecto/employees/architecto/income-types" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/v1/payrolls/groups/architecto/employees/architecto/income-types"
);
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "No query results for model [YomaConnect\\Common\\Models\\Employee]."
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Employee Income Type
requires authentication
Update the income amount or additional data for a specific employee income type within a payroll group.
Example request:
curl --request PATCH \
"http://localhost/api/v1/payrolls/employee-income-types/8c51c9b4-5678-1234-5678" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"amount\": 150000.5,
\"data\": {
\"remark\": \"Bonus adjustment\"
}
}"
const url = new URL(
"http://localhost/api/v1/payrolls/employee-income-types/8c51c9b4-5678-1234-5678"
);
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"amount": 150000.5,
"data": {
"remark": "Bonus adjustment"
}
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"success": true,
"message": "Employee income type updated successfully.",
"data": {
"id": "8c51c9b4-5678-1234-5678",
"amount": 150000.5,
"data": {
"remark": "Bonus adjustment"
},
"employee_id": "emp-uuid-123",
"income_type_id": "inc-uuid-456"
}
}
Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Bulk Update Fix Amounts
requires authentication
Bulk update fixed income amounts for an employee by income types
Example request:
curl --request POST \
"http://localhost/api/v1/payrolls/employees/architecto/fix-amounts" \
--header "Authorization: Bearer {JWT_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"income_type_id\": \"architecto\",
\"amount\": 4326.41688,
\"start_date\": \"architecto\",
\"end_date\": \"architecto\",
\"effective_date\": \"architecto\"
}
]
}"
const url = new URL(
"http://localhost/api/v1/payrolls/employees/architecto/fix-amounts"
);
const headers = {
"Authorization": "Bearer {JWT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"income_type_id": "architecto",
"amount": 4326.41688,
"start_date": "architecto",
"end_date": "architecto",
"effective_date": "architecto"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Bulk fix amounts updated successfully.",
"status": 200,
"data": {
"employee_id": "uuid",
"updated_count": 3,
"items": [
{
"income_type_id": "uuid",
"amount": 150000,
"start_date": "2026-01-01",
"end_date": null,
"effective_date": "2026-01-01"
}
]
}
}
Example response (401, unauthenticated):
{
"message": "unauthenticated",
"data": [],
"errors": []
}
Example response (403, unauthorized):
{
"message": "unauthorized",
"data": [],
"errors": []
}
Example response (422, validation failed):
{
"message": "validation failed",
"data": [],
"errors": {
"field": [
"The field is required."
]
}
}
Example response (500, internal server error):
{
"message": "internal server error",
"data": [],
"errors": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.