Introduction
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-token".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
ACL
Endpoints for managing roles and permissions.
Roles
Endpoints for managing roles.
List
requires authentication role index
List roles.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/acl/roles?q=Role+name" \
--header "Authorization: Bearer cED66P5fb8V1g4av3kZdhea" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/roles"
);
const params = {
"q": "Role name",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer cED66P5fb8V1g4av3kZdhea",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "d28d0fb9-679c-338c-811d-b9efd9afe1e2",
"name": "rerum-6aeddb57e347f",
"display_name": "Ut occaecati nobis occaecati nihil.",
"permissions_count": null
},
{
"id": "2b05d563-ab58-3144-8bbb-763cdfc09643",
"name": "eum-6aeddb57e6323",
"display_name": "Dolores maiores dicta esse quaerat et iste.",
"permissions_count": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Create
requires authentication role store
Create a new role.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/acl/roles" \
--header "Authorization: Bearer aPEgkvfdcbhZ4636eD1aV85" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"display_name\": \"Example Name\",
\"permissions\": [
\"cb92d89a-a6a1-3511-9986-2993c522d1e6\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/roles"
);
const headers = {
"Authorization": "Bearer aPEgkvfdcbhZ4636eD1aV85",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"display_name": "Example Name",
"permissions": [
"cb92d89a-a6a1-3511-9986-2993c522d1e6"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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
requires authentication role update
Update a role.
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/acl/roles/1" \
--header "Authorization: Bearer kEf1hdv68Zag4V536bacPDe" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"display_name\": \"Example Name\",
\"permissions\": [
\"27a39612-83ec-321f-a1cc-4f9d4bb7e7b0\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/roles/1"
);
const headers = {
"Authorization": "Bearer kEf1hdv68Zag4V536bacPDe",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"display_name": "Example Name",
"permissions": [
"27a39612-83ec-321f-a1cc-4f9d4bb7e7b0"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Show
requires authentication role show
Show a role.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/acl/roles/1" \
--header "Authorization: Bearer Pf5caa81h6evVD6bgkE34Zd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/roles/1"
);
const headers = {
"Authorization": "Bearer Pf5caa81h6evVD6bgkE34Zd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "5c9f0788-b6c5-35ae-aebc-cadf1eca30ca",
"name": "non-6aeddb57f02e0",
"display_name": "Ipsum eaque hic earum quidem dolorem saepe numquam.",
"permissions_count": null
}
}
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.
Role Permissions
requires authentication role show
List permissions associated with a role.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/acl/roles/1/permissions" \
--header "Authorization: Bearer kf48dDv135Zb6g6hEePVaac" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/roles/1/permissions"
);
const headers = {
"Authorization": "Bearer kf48dDv135Zb6g6hEePVaac",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "nobis",
"display_name": "Assumenda ratione voluptas porro voluptate rerum et."
},
{
"id": null,
"name": "sapiente",
"display_name": "Dolorem consequatur aut fugit accusantium incidunt est."
}
]
}
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.
Delete
requires authentication role delete
Delete a role.
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/acl/roles/1" \
--header "Authorization: Bearer V8a6fdvhPbDea6135ZkcEg4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/roles/1"
);
const headers = {
"Authorization": "Bearer V8a6fdvhPbDea6135ZkcEg4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Permissions
Endpoints for managing permissions.
List
requires authentication permission index
List permissions.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/acl/permissions?q=Permission+name" \
--header "Authorization: Bearer dhbPkfE5D6Zc8v16egaVa34" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/permissions"
);
const params = {
"q": "Permission name",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer dhbPkfE5D6Zc8v16egaVa34",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "illo",
"display_name": "Totam dolor eius doloremque magnam odio."
},
{
"id": null,
"name": "fugiat",
"display_name": "Accusamus consectetur fuga qui dolorum sed ducimus maxime architecto."
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Create
requires authentication permission store
Create a new permission.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/acl/permissions" \
--header "Authorization: Bearer 1faDZ8e56d3VEcgb4vkhPa6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"display_name\": \"Example Name\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/permissions"
);
const headers = {
"Authorization": "Bearer 1faDZ8e56d3VEcgb4vkhPa6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"display_name": "Example Name"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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
requires authentication permission update
Update a permission.
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/acl/permissions/1" \
--header "Authorization: Bearer E8V6bafhD4Zckav5ePd6g13" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"display_name\": \"Example Name\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/permissions/1"
);
const headers = {
"Authorization": "Bearer E8V6bafhD4Zckav5ePd6g13",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"display_name": "Example Name"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Show
requires authentication permission show
Show a permission.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/acl/permissions/1" \
--header "Authorization: Bearer 3h5eDVc1P668dfkZ4gavbEa" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/permissions/1"
);
const headers = {
"Authorization": "Bearer 3h5eDVc1P668dfkZ4gavbEa",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": null,
"name": "sit",
"display_name": "Enim sunt quae unde quibusdam illo et doloribus."
}
}
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.
Delete
requires authentication permission delete
Delete a permission.
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/acl/permissions/1" \
--header "Authorization: Bearer DaE1Pbe45vg6d6hcVa3kfZ8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/permissions/1"
);
const headers = {
"Authorization": "Bearer DaE1Pbe45vg6d6hcVa3kfZ8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Accounts Payable Receivable
Endpoints for accounts payable receivable
List reminders for accounts payable receivable
requires authentication accounts-payable-receivable reminder
List reminders for accounts payable receivable that are about to expire soon
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/reminders" \
--header "Authorization: Bearer 5ve38PbhDaEa4k6fcd6VgZ1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/reminders"
);
const headers = {
"Authorization": "Bearer 5ve38PbhDaEa4k6fcd6VgZ1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "284915a2-2cf3-3539-b42f-104ddcaff458",
"code": null,
"type": "saída",
"payment_method": "boleto",
"amount": 8146.55,
"due_date": "2026-11-20T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Id assumenda magnam aspernatur et ut fugit sed.",
"is_recurring": null,
"recurrence_config": null,
"parent_id": null,
"recurrence_order": 1,
"total_recurrences": null,
"children_count": 0,
"remaining_recurrences": null,
"has_children": false,
"field1": "quia",
"field2": 95,
"field3": true,
"notes": "Ut rem porro odio sunt saepe dolor recusandae.",
"created_at": null,
"updated_at": null
},
{
"id": "01a9c2d4-5247-31d5-b81b-f5f04290f0d7",
"code": null,
"type": "entrada",
"payment_method": "boleto",
"amount": 4672.84,
"due_date": "2026-12-02T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Amet neque odio voluptas qui expedita quas.",
"is_recurring": null,
"recurrence_config": null,
"parent_id": null,
"recurrence_order": 1,
"total_recurrences": null,
"children_count": 0,
"remaining_recurrences": null,
"has_children": false,
"field1": "consequatur",
"field2": 4,
"field3": true,
"notes": "Ut cum nihil sit est.",
"created_at": null,
"updated_at": null
}
]
}
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.
Mark reminders as read
requires authentication accounts-payable-receivable reminder
Mark reminders for accounts payable receivable as read
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/reminders/mark-as-read?items[]=qui" \
--header "Authorization: Bearer bEe3kagDZda6hv85f4c6V1P" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/reminders/mark-as-read"
);
const params = {
"items[0]": "qui",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer bEe3kagDZda6hv85f4c6V1P",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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 protest summary
requires authentication accounts-payable-receivable index
Get summary of accounts with protest status
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/protests/summary" \
--header "Authorization: Bearer 341va5P6fEDeVbcgka8Z6hd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/protests/summary"
);
const headers = {
"Authorization": "Bearer 341va5P6fEDeVbcgka8Z6hd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"to_protest_count": "integer",
"protested_count": "integer",
"protesting_today_count": "integer",
"total_protest_amount": "float"
}
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.
List protested accounts
requires authentication accounts-payable-receivable index
List accounts with protest date that are not paid/canceled
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/protests?sort_by=created_at&sort_desc=1&page=1&per_page=10&q=Salary&code=CPR-000123&type=entrada&customers[]=numquam&suppliers[]=voluptatum&works[]=in&cost_centers[]=inventore&statuses[]=a+vencer&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-11-06T10%3A51%3A20&protest_date_end=2026-11-06T10%3A51%3A20&has_protest=1&has_children=1&is_recurring=1" \
--header "Authorization: Bearer hVb8ga315fkvP46EdeaZcD6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/protests"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "10",
"q": "Salary",
"code": "CPR-000123",
"type": "entrada",
"customers[0]": "numquam",
"suppliers[0]": "voluptatum",
"works[0]": "in",
"cost_centers[0]": "inventore",
"statuses[0]": "a vencer",
"payment_method": "cheque",
"date_start": "2023-01-01",
"date_end": "2023-12-31",
"protest_date_start": "2026-11-06T10:51:20",
"protest_date_end": "2026-11-06T10:51:20",
"has_protest": "1",
"has_children": "1",
"is_recurring": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer hVb8ga315fkvP46EdeaZcD6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "d597e3e5-cc71-32ed-9b56-5461d37c2e3a",
"code": null,
"type": "saída",
"payment_method": "cheque",
"amount": 4110.52,
"due_date": "2026-12-04T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Nisi consectetur aliquam et temporibus vel facilis iure.",
"is_recurring": null,
"recurrence_config": null,
"parent_id": null,
"recurrence_order": 1,
"total_recurrences": null,
"children_count": 0,
"remaining_recurrences": null,
"has_children": false,
"field1": "reiciendis",
"field2": 41,
"field3": false,
"notes": "Inventore consequatur sequi qui.",
"created_at": null,
"updated_at": null
},
{
"id": "e085d740-62d8-393f-a855-ea815ca616eb",
"code": null,
"type": "entrada",
"payment_method": "boleto",
"amount": 4562.11,
"due_date": "2026-11-16T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Laborum cumque eos tempora excepturi minus est et quisquam quos.",
"is_recurring": null,
"recurrence_config": null,
"parent_id": null,
"recurrence_order": 1,
"total_recurrences": null,
"children_count": 0,
"remaining_recurrences": null,
"has_children": false,
"field1": "ab",
"field2": 13,
"field3": true,
"notes": "Aut ut sit sed ipsa at quis.",
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
List accounts payable receivable
requires authentication accounts-payable-receivable index
List all accounts payable receivable
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable?sort_by=created_at&sort_desc=1&page=1&per_page=10&q=Salary&code=CPR-000123&type=entrada&customers[]=esse&suppliers[]=reiciendis&works[]=debitis&cost_centers[]=consequatur&statuses[]=protestado&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-11-06T10%3A51%3A20&protest_date_end=2026-11-06T10%3A51%3A20&has_protest=&has_children=1&is_recurring=1" \
--header "Authorization: Bearer akDfbZd5cVghea13866PEv4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "10",
"q": "Salary",
"code": "CPR-000123",
"type": "entrada",
"customers[0]": "esse",
"suppliers[0]": "reiciendis",
"works[0]": "debitis",
"cost_centers[0]": "consequatur",
"statuses[0]": "protestado",
"payment_method": "cheque",
"date_start": "2023-01-01",
"date_end": "2023-12-31",
"protest_date_start": "2026-11-06T10:51:20",
"protest_date_end": "2026-11-06T10:51:20",
"has_protest": "0",
"has_children": "1",
"is_recurring": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer akDfbZd5cVghea13866PEv4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "aabb6170-726b-33f0-a77e-cde105989f62",
"code": null,
"type": "saída",
"payment_method": "boleto",
"amount": 7745.78,
"due_date": "2026-12-06T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "In voluptatem doloremque et voluptas aut est tenetur modi animi voluptas laboriosam modi et.",
"is_recurring": null,
"recurrence_config": null,
"parent_id": null,
"recurrence_order": 1,
"total_recurrences": null,
"children_count": 0,
"remaining_recurrences": null,
"has_children": false,
"field1": "perspiciatis",
"field2": 11,
"field3": true,
"notes": "Vel omnis eum ex corrupti et.",
"created_at": null,
"updated_at": null
},
{
"id": "7b166a49-4708-357f-b397-333282ee2436",
"code": null,
"type": "saída",
"payment_method": "boleto",
"amount": 7503.91,
"due_date": "2026-11-15T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Dolor consequatur et et consequuntur facilis ut.",
"is_recurring": null,
"recurrence_config": null,
"parent_id": null,
"recurrence_order": 1,
"total_recurrences": null,
"children_count": 0,
"remaining_recurrences": null,
"has_children": false,
"field1": "harum",
"field2": 28,
"field3": false,
"notes": "Placeat eos dolores ab rerum vel.",
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Create accounts payable receivable
requires authentication accounts-payable-receivable store
Create a new accounts payable receivable
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable" \
--header "Authorization: Bearer EckbvgV365e14dPf8ZDaah6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"Example Type\",
\"payment_method\": \"Example Payment method\",
\"due_date\": \"2024-01-01\",
\"amount\": 1,
\"description\": \"Example Description\",
\"supplier_id\": \"afd6c5a5-322c-36c3-9c39-23403534d6ab\",
\"customer_id\": \"157396e0-8d39-3966-915b-6df88a9e16e9\",
\"work_id\": \"5cb18f70-e176-3cb7-bc90-1653eee9a26c\",
\"cost_center_id\": \"85b14638-82dc-3ea0-8a02-4d75ad8c8249\",
\"status\": \"Example Status\",
\"protest_date\": \"2024-01-01\",
\"bank_account_id\": \"44eb385c-5a29-3b26-ab46-daaf2d010475\",
\"custom_fields\": [
\"example1\",
\"example2\"
],
\"is_recurring\": true,
\"recurrence_config\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"frequency_type\": \"Example Recurrence config frequency type\",
\"frequency_value\": 1,
\"end_date\": \"2024-01-01\",
\"max_occurrences\": 1,
\"generation_days_ahead\": 1
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable"
);
const headers = {
"Authorization": "Bearer EckbvgV365e14dPf8ZDaah6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "Example Type",
"payment_method": "Example Payment method",
"due_date": "2024-01-01",
"amount": 1,
"description": "Example Description",
"supplier_id": "afd6c5a5-322c-36c3-9c39-23403534d6ab",
"customer_id": "157396e0-8d39-3966-915b-6df88a9e16e9",
"work_id": "5cb18f70-e176-3cb7-bc90-1653eee9a26c",
"cost_center_id": "85b14638-82dc-3ea0-8a02-4d75ad8c8249",
"status": "Example Status",
"protest_date": "2024-01-01",
"bank_account_id": "44eb385c-5a29-3b26-ab46-daaf2d010475",
"custom_fields": [
"example1",
"example2"
],
"is_recurring": true,
"recurrence_config": {
"0": "example1",
"1": "example2",
"frequency_type": "Example Recurrence config frequency type",
"frequency_value": 1,
"end_date": "2024-01-01",
"max_occurrences": 1,
"generation_days_ahead": 1
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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.
Import NFe installments
requires authentication accounts-payable-receivable import-nfe
Gera contas a pagar para as parcelas selecionadas de uma nota fiscal. A obra é opcional: quando omitida, só é herdada se a NF tiver exatamente uma obra vinculada.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/import-nfe" \
--header "Authorization: Bearer akDaZgefEh63VP16vdc8b54" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"fiscal_document_id\": \"vel\",
\"installment_ids\": [
\"sed\"
],
\"payment_method\": \"cartao\",
\"work_id\": \"tempore\",
\"cost_center_id\": \"quia\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/import-nfe"
);
const headers = {
"Authorization": "Bearer akDaZgefEh63VP16vdc8b54",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"fiscal_document_id": "vel",
"installment_ids": [
"sed"
],
"payment_method": "cartao",
"work_id": "tempore",
"cost_center_id": "quia"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string",
"total": "integer"
}
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 account history
requires authentication accounts-payable-receivable show
Get the activity log history for an account payable receivable
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/voluptas/history" \
--header "Authorization: Bearer PfgZD3eEhv5ak661Vcad8b4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/voluptas/history"
);
const headers = {
"Authorization": "Bearer PfgZD3eEhv5ak661Vcad8b4",
"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
vary: Origin
{
"message": "Unauthenticated."
}
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 accounts payable receivable
requires authentication accounts-payable-receivable show
Get an accounts payable receivable
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/minus" \
--header "Authorization: Bearer 66eh8ZEb3aadcVP54k1Dfgv" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/minus"
);
const headers = {
"Authorization": "Bearer 66eh8ZEb3aadcVP54k1Dfgv",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d72781dc-879a-3186-be83-df9fa2cf68cc",
"code": null,
"type": "saída",
"payment_method": "cheque",
"amount": 8192.21,
"due_date": "2026-11-26T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Quia incidunt velit laboriosam doloribus sed illo occaecati.",
"is_recurring": null,
"recurrence_config": null,
"parent_id": null,
"recurrence_order": 1,
"total_recurrences": null,
"children_count": 0,
"remaining_recurrences": null,
"has_children": false,
"field1": "qui",
"field2": 100,
"field3": true,
"notes": "Nisi at qui quis soluta laudantium.",
"created_at": null,
"updated_at": null
}
}
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 accounts payable receivable
requires authentication accounts-payable-receivable update
Update an accounts payable receivable
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/consequatur" \
--header "Authorization: Bearer akvP3VE6g6cedZ8hfba415D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"Example Type\",
\"payment_method\": \"Example Payment method\",
\"due_date\": \"2024-01-01\",
\"amount\": 1,
\"description\": \"Example Description\",
\"supplier_id\": \"1c9a561e-9702-3dbd-83d3-2bf826980375\",
\"customer_id\": \"fb755c7d-615d-352e-aca2-53d5d1256cd7\",
\"work_id\": \"90f15a1b-3308-3aa3-b508-48d29d057ca2\",
\"cost_center_id\": \"a4b8dfd6-f59f-3aa0-b67f-78983c31fb81\",
\"status\": \"Example Status\",
\"payment_date\": \"2024-01-01\",
\"protest_date\": \"2024-01-01\",
\"paid_amount\": 1,
\"interest_amount\": 1,
\"penalty_amount\": 1,
\"notary_fee_amount\": 1,
\"bank_account_id\": \"111c1346-1b36-3957-941f-dd86a68183b4\",
\"custom_fields\": [
\"example1\",
\"example2\"
],
\"is_recurring\": true,
\"recurrence_config\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"frequency_type\": \"Example Recurrence config frequency type\",
\"frequency_value\": 1,
\"end_date\": \"2024-01-01\",
\"max_occurrences\": 1,
\"generation_days_ahead\": 1
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/consequatur"
);
const headers = {
"Authorization": "Bearer akvP3VE6g6cedZ8hfba415D",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "Example Type",
"payment_method": "Example Payment method",
"due_date": "2024-01-01",
"amount": 1,
"description": "Example Description",
"supplier_id": "1c9a561e-9702-3dbd-83d3-2bf826980375",
"customer_id": "fb755c7d-615d-352e-aca2-53d5d1256cd7",
"work_id": "90f15a1b-3308-3aa3-b508-48d29d057ca2",
"cost_center_id": "a4b8dfd6-f59f-3aa0-b67f-78983c31fb81",
"status": "Example Status",
"payment_date": "2024-01-01",
"protest_date": "2024-01-01",
"paid_amount": 1,
"interest_amount": 1,
"penalty_amount": 1,
"notary_fee_amount": 1,
"bank_account_id": "111c1346-1b36-3957-941f-dd86a68183b4",
"custom_fields": [
"example1",
"example2"
],
"is_recurring": true,
"recurrence_config": {
"0": "example1",
"1": "example2",
"frequency_type": "Example Recurrence config frequency type",
"frequency_value": 1,
"end_date": "2024-01-01",
"max_occurrences": 1,
"generation_days_ahead": 1
}
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete accounts payable receivable
requires authentication accounts-payable-receivable delete
Delete an accounts payable receivable
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/ut" \
--header "Authorization: Bearer fZgvEPD6ae856a14cbVd3kh" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/ut"
);
const headers = {
"Authorization": "Bearer fZgvEPD6ae856a14cbVd3kh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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
Endpoints for authentication
Login
No specific permission required
Login with email and password
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/auth/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"george.donnelly@example.org\",
\"password\": \"password\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "george.donnelly@example.org",
"password": "password"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"token": "string"
}
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.
Me
requires authentication No specific permission required
Get the current user
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/auth/user" \
--header "Authorization: Bearer d6kh65caDbVf14agvZ8EP3e" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/user"
);
const headers = {
"Authorization": "Bearer d6kh65caDbVf14agvZ8EP3e",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "7774f8ad-0aaf-331f-b9bb-6f3fbe994322",
"name": "Rebecca Cartwright",
"username": "theresia53",
"email": "hilbert.hoppe@example.com",
"ability": [
{
"action": "read",
"subject": "Auth"
},
{
"action": "listar",
"subject": "padrão"
}
],
"roles": [],
"preferences": [],
"sectors": [],
"image": {
"id": null,
"url": null
}
}
}
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 Profile
requires authentication No specific permission required
Update the current user profile
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/auth/user" \
--header "Authorization: Bearer fZ1ePavhgb6d54k8ca63DVE" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"dcarter\",
\"password\": \"password123\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"778b8b1f-77df-3dc4-98c9-887790d6472e\"
],
\"roles\": [
\"d3233482-325e-3a18-8b58-f15537c46e9c\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/user"
);
const headers = {
"Authorization": "Bearer fZ1ePavhgb6d54k8ca63DVE",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "dcarter",
"password": "password123",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"778b8b1f-77df-3dc4-98c9-887790d6472e"
],
"roles": [
"d3233482-325e-3a18-8b58-f15537c46e9c"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (204):
Empty response
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 No specific permission required
Logout the current user
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/auth/logout" \
--header "Authorization: Bearer V38ZPf6baadhD54v61cekEg" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/logout"
);
const headers = {
"Authorization": "Bearer V38ZPf6baadhD54v61cekEg",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (204):
Empty response
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 user preferences
requires authentication No specific permission required
Get all user preferences
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/auth/preferences" \
--header "Authorization: Bearer vP4ak165h83dcgVEfZDea6b" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/preferences"
);
const headers = {
"Authorization": "Bearer vP4ak165h83dcgVEfZDea6b",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"theme": "dark",
"language": "pt-br",
"notifications": {
"email": true,
"sms": false
}
}
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.
Set user preference
requires authentication No specific permission required
Set or update a user preference
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/auth/preferences" \
--header "Authorization: Bearer g5ckV6Dd8avfb1ePh3Z6a4E" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"key\": \"tmdczvco\",
\"value\": []
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/preferences"
);
const headers = {
"Authorization": "Bearer g5ckV6Dd8avfb1ePh3Z6a4E",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"key": "tmdczvco",
"value": []
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Preference saved successfully"
}
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.
Delete user preference
requires authentication No specific permission required
Delete a specific user preference
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/auth/preferences/rem" \
--header "Authorization: Bearer vea4Pahf6b85ZkDV63Edgc1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/preferences/rem"
);
const headers = {
"Authorization": "Bearer vea4Pahf6b85ZkDV63Edgc1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Preference deleted successfully"
}
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.
Generate user token
requires authentication auth generate-token
Generate a token for a specific user
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/auth/550e8400-e29b-41d4-a716-446655440000/token" \
--header "Authorization: Bearer 6gEa13ZDfbhkPcvead48V56" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/550e8400-e29b-41d4-a716-446655440000/token"
);
const headers = {
"Authorization": "Bearer 6gEa13ZDfbhkPcvead48V56",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"token": "string",
"userData": {
"id": "uuid",
"name": "string",
"username": "string",
"email": "string",
"ability": [
"array"
],
"roles": [
"array"
],
"preferences": [
"array"
],
"sectors": [
"array"
],
"image": {
"id": "uuid",
"url": "string"
}
}
}
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.
Bank Account Movements
Endpoints for bank account deposits, withdraws and transfers
Transfer between bank accounts
requires authentication bank-account transfer
Transfers funds from a source account to a destination account
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/transfers" \
--header "Authorization: Bearer 3cb6deVg1D54EhvPZaak86f" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"source_id\": \"Example Source id\",
\"destination_id\": \"Example Destination id\",
\"amount\": 1,
\"description\": \"Example Description\",
\"transaction_date\": \"2024-01-01\",
\"transaction_category_id\": \"Example Transaction category id\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/transfers"
);
const headers = {
"Authorization": "Bearer 3cb6deVg1D54EhvPZaak86f",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"source_id": "Example Source id",
"destination_id": "Example Destination id",
"amount": 1,
"description": "Example Description",
"transaction_date": "2024-01-01",
"transaction_category_id": "Example Transaction category id"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string",
"data": "object"
}
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.
Delete a bank transfer
requires authentication bank-account transfer
Reverts a transfer by deleting both cash flows and the transfer record
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/transfers/fuga" \
--header "Authorization: Bearer 18f4Z36daa5bhPkEecvgV6D" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/transfers/fuga"
);
const headers = {
"Authorization": "Bearer 18f4Z36daa5bhPkEecvgV6D",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Deposit into bank account
requires authentication bank-account deposit
Adds funds to a bank account
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/12/deposit" \
--header "Authorization: Bearer a3b6V14h8EPDgkacfdZ56ve" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"amount\": 1,
\"description\": \"Example Description\",
\"transaction_date\": \"2024-01-01\",
\"transaction_category_id\": \"Example Transaction category id\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/12/deposit"
);
const headers = {
"Authorization": "Bearer a3b6V14h8EPDgkacfdZ56ve",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"amount": 1,
"description": "Example Description",
"transaction_date": "2024-01-01",
"transaction_category_id": "Example Transaction category id"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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.
Withdraw from bank account
requires authentication bank-account withdraw
Removes funds from a bank account
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/4/withdraw" \
--header "Authorization: Bearer febd4a3Vc8h6vkPD1Z6gEa5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"amount\": 1,
\"description\": \"Example Description\",
\"transaction_date\": \"2024-01-01\",
\"transaction_category_id\": \"Example Transaction category id\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/4/withdraw"
);
const headers = {
"Authorization": "Bearer febd4a3Vc8h6vkPD1Z6gEa5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"amount": 1,
"description": "Example Description",
"transaction_date": "2024-01-01",
"transaction_category_id": "Example Transaction category id"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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.
Bank Accounts
Endpoints for bank accounts
Get bank account balance summary
requires authentication bank-account summary
Get the balance summary of all bank accounts
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/bank-accounts/balance-summary" \
--header "Authorization: Bearer h6daD416b35aE8ePckvVgZf" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/balance-summary"
);
const headers = {
"Authorization": "Bearer h6daD416b35aE8ePckvVgZf",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"totalBalance": "number",
"totalBalancePositive": "number",
"totalBalanceNegative": "number",
"totalLimit": "number",
"totalAvailableBalance": "number",
"totalUsedLimit": "number",
"totalAvailableLimit": "number",
"accounts": {
"*": {
"id": "string",
"bank": "string",
"balance": "number",
"limit": "number",
"available_balance": "number",
"used_limit": "number",
"available_limit": "number"
}
}
}
}
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 default bank account by payment method
requires authentication bank-account show
Returns the bank account configured as default for the given payment method. Responds 404 when no default is configured.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/bank-accounts/default-by-payment-method?method=cash" \
--header "Authorization: Bearer 8bh41g6PV6f3DvcZaa5ekEd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/default-by-payment-method"
);
const params = {
"method": "cash",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 8bh41g6PV6f3DvcZaa5ekEd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "7157d491-691b-3e99-88c8-588794670d6c",
"agency": "1549",
"account": "0463673-1",
"type": "poupança",
"balance": 3852.91,
"holder_type": "pj",
"alias": "consectetur",
"limit": 3131.53,
"available_balance": 6984.4400000000005,
"used_limit": 0,
"available_limit": 3131.53,
"is_default": null,
"default_payment_method": null,
"bank": {
"id": null,
"name": null,
"code": null
},
"created_at": null,
"updated_at": null
}
}
Example response (404):
{
"message": "string"
}
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.
List bank accounts
requires authentication bank-account index
List all bank accounts
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/bank-accounts?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=name&is_default=1" \
--header "Authorization: Bearer 61EPhVa46v8bZDgdk5efac3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "name",
"is_default": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 61EPhVa46v8bZDgdk5efac3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "5262a63e-8177-3148-8471-0c44a0577072",
"agency": "1535",
"account": "1813936-8",
"type": "corrente",
"balance": 3281.29,
"holder_type": "pj",
"alias": "exercitationem",
"limit": 656.97,
"available_balance": 3938.26,
"used_limit": 0,
"available_limit": 656.97,
"is_default": null,
"default_payment_method": null,
"bank": {
"id": null,
"name": null,
"code": null
},
"created_at": null,
"updated_at": null
},
{
"id": "e47bb0ba-ba0b-31ba-acb8-cfd32179d306",
"agency": "6387",
"account": "0898551-4",
"type": "corrente",
"balance": 2549.3,
"holder_type": "pj",
"alias": "ut",
"limit": 5270.14,
"available_balance": 7819.4400000000005,
"used_limit": 0,
"available_limit": 5270.14,
"is_default": null,
"default_payment_method": null,
"bank": {
"id": null,
"name": null,
"code": null
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Create bank account
requires authentication bank-account store
Create a new bank account
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/bank-accounts" \
--header "Authorization: Bearer P6b46va8fhkdaEZ1ceg5DV3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"agency\": \"Example Agency\",
\"account\": \"2291643-2\",
\"bank_id\": \"c7bc6e18-49b7-390e-ae08-0edfda05521e\",
\"type\": \"Example Type\",
\"holder_type\": \"Example Holder type\",
\"alias\": \"Example Alias\",
\"balance\": 1,
\"limit\": 1,
\"is_default\": true,
\"default_payment_method\": \"Example Default payment method\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts"
);
const headers = {
"Authorization": "Bearer P6b46va8fhkdaEZ1ceg5DV3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"agency": "Example Agency",
"account": "2291643-2",
"bank_id": "c7bc6e18-49b7-390e-ae08-0edfda05521e",
"type": "Example Type",
"holder_type": "Example Holder type",
"alias": "Example Alias",
"balance": 1,
"limit": 1,
"is_default": true,
"default_payment_method": "Example Default payment method"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 bank account
requires authentication bank-account update
Update a bank account
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/5" \
--header "Authorization: Bearer 8PDeVhvbka5c1a364d6ZEfg" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"agency\": \"Example Agency\",
\"account\": \"1184960-6\",
\"bank_id\": \"e0ad463f-3fb2-38b4-b518-7652eb5ab4f1\",
\"type\": \"Example Type\",
\"holder_type\": \"Example Holder type\",
\"alias\": \"Example Alias\",
\"balance\": 1,
\"limit\": 1,
\"is_default\": true,
\"default_payment_method\": \"Example Default payment method\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/5"
);
const headers = {
"Authorization": "Bearer 8PDeVhvbka5c1a364d6ZEfg",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"agency": "Example Agency",
"account": "1184960-6",
"bank_id": "e0ad463f-3fb2-38b4-b518-7652eb5ab4f1",
"type": "Example Type",
"holder_type": "Example Holder type",
"alias": "Example Alias",
"balance": 1,
"limit": 1,
"is_default": true,
"default_payment_method": "Example Default payment method"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Show bank account
requires authentication bank-account show
Show a bank account
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/bank-accounts/13" \
--header "Authorization: Bearer vaef65ZgDdc4168hbaPk3EV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/13"
);
const headers = {
"Authorization": "Bearer vaef65ZgDdc4168hbaPk3EV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "40f17410-0897-3c78-9638-b5c8d33e4b6d",
"agency": "8473",
"account": "2367606-4",
"type": "poupança",
"balance": 5119.3,
"holder_type": "pf",
"alias": "aut",
"limit": 3432.47,
"available_balance": 8551.77,
"used_limit": 0,
"available_limit": 3432.47,
"is_default": null,
"default_payment_method": null,
"bank": {
"id": null,
"name": null,
"code": null
},
"created_at": null,
"updated_at": null
}
}
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.
Delete bank account
requires authentication bank-account delete
Delete a bank account
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/17" \
--header "Authorization: Bearer 4DE3vcedZV6kga81f56Pabh" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/17"
);
const headers = {
"Authorization": "Bearer 4DE3vcedZV6kga81f56Pabh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Bank Statements
Endpoints for bank account statements (extrato bancário)
Bank statement summary
requires authentication bank-statement summary
Get aggregated summary for the period
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/bank-accounts/14/statements/summary" \
--header "Authorization: Bearer EeaVkg6P3Z15vh68Ddb4acf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_start\": \"2024-01-01\",
\"date_end\": \"2024-01-01\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/14/statements/summary"
);
const headers = {
"Authorization": "Bearer EeaVkg6P3Z15vh68Ddb4acf",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date_start": "2024-01-01",
"date_end": "2024-01-01"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"opening_balance": "number",
"closing_balance": "number",
"total_credit": "number",
"total_debit": "number",
"count": "integer",
"date_start": "string",
"date_end": "string"
}
}
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.
List bank statements
requires authentication bank-statement index
List statements for a bank account. Default period: last 30 days.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/bank-accounts/11/statements" \
--header "Authorization: Bearer cVDad5Efb64Z8vkg6h31Pea" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"et\",
\"sort_desc\": false,
\"page\": 41,
\"per_page\": 9,
\"q\": \"twaez\",
\"type\": \"ajuste\",
\"date_start\": \"2026-11-06T10:51:20\",
\"date_end\": \"2106-03-10\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/11/statements"
);
const headers = {
"Authorization": "Bearer cVDad5Efb64Z8vkg6h31Pea",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "et",
"sort_desc": false,
"page": 41,
"per_page": 9,
"q": "twaez",
"type": "ajuste",
"date_start": "2026-11-06T10:51:20",
"date_end": "2106-03-10"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"type": null,
"amount": null,
"balance_after": null,
"description": null,
"date": null,
"statement_date": null,
"created_at": null,
"updated_at": null
},
{
"id": null,
"type": null,
"amount": null,
"balance_after": null,
"description": null,
"date": null,
"statement_date": null,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Show bank statement
requires authentication bank-statement show
Show a specific statement entry
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/bank-accounts/15/statements/voluptates" \
--header "Authorization: Bearer fDvbZ58h3Pke1gV6E4adac6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/15/statements/voluptates"
);
const headers = {
"Authorization": "Bearer fDvbZ58h3Pke1gV6E4adac6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": null,
"type": null,
"amount": null,
"balance_after": null,
"description": null,
"date": null,
"statement_date": null,
"created_at": null,
"updated_at": null
}
}
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.
Banks
Endpoints for banks
List banks
requires authentication bank index
List all banks
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/banks?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Permission+name" \
--header "Authorization: Bearer DaPZ8c6563bvEa4dfV1kgeh" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/banks"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "Permission name",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer DaPZ8c6563bvEa4dfV1kgeh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "c823e832-14ef-3258-85da-5d59bcbca68c",
"name": "Paes e Associados",
"code": "614"
},
{
"id": "9d4813a1-d9f2-3456-90a7-e7a1fa7871af",
"name": "Quintana-Valência",
"code": "705"
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Create bank
requires authentication bank store
Create a new bank
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/banks" \
--header "Authorization: Bearer DvVhaEd6Zfkb1c3e5Pga648" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"code\": \"Example Code\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/banks"
);
const headers = {
"Authorization": "Bearer DvVhaEd6Zfkb1c3e5Pga648",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"code": "Example Code"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 bank
requires authentication bank update
Update a bank
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/banks/1" \
--header "Authorization: Bearer 4e6VDg3dbP68k5fhcEZa1va" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"code\": \"Example Code\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/banks/1"
);
const headers = {
"Authorization": "Bearer 4e6VDg3dbP68k5fhcEZa1va",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"code": "Example Code"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Show bank
requires authentication bank show
Show a bank
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/banks/1" \
--header "Authorization: Bearer 1afc58dg66hZV34bEevkDaP" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/banks/1"
);
const headers = {
"Authorization": "Bearer 1afc58dg66hZV34bEevkDaP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "81e03e91-b859-36ad-b16d-99ab672d9243",
"name": "Delvalle-Paz",
"code": "332"
}
}
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.
Delete bank
requires authentication bank delete
Delete a bank
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/banks/1" \
--header "Authorization: Bearer da8PZfbe3ED66h51Vagcv4k" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/banks/1"
);
const headers = {
"Authorization": "Bearer da8PZfbe3ED66h51Vagcv4k",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
CEP
Search CEP
requires authentication No specific permission required
Search for address information by CEP (Brazilian postal code)
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/cep/01001000" \
--header "Authorization: Bearer vckED1efdPh5gZ4a368bV6a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cep/01001000"
);
const headers = {
"Authorization": "Bearer vckED1efdPh5gZ4a368bV6a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, CEP found successfully):
{
"data": {
"cep": "01001000",
"street": "Praça da Sé",
"district": "Sé",
"city": "São Paulo",
"state": "SP",
"complement": "lado ímpar",
"ibge": "3550308",
"ddd": "11",
"siafi": "7107"
}
}
Example response (200, CEP not found):
{
"data": {
"cep": "99999999",
"street": null,
"district": null,
"city": null,
"state": null,
"complement": null,
"ibge": null,
"ddd": null,
"siafi": null
}
}
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.
Cash Flow
Endpoints for cash flow
Get cash flow summary
requires authentication cash-flow summary
Get cash flow summary
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/cash-flows/summary?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Salary&cash_session=uuid&type=entrada&description=Ducimus+est+facilis+in+eos+repellendus.&categories[]=et&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=excepturi&customers[]=aut&suppliers[]=earum&works[]=maiores&cost_centers[]=necessitatibus" \
--header "Authorization: Bearer 1kf5ceaDPEZad3bhv468gV6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/summary"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "Salary",
"cash_session": "uuid",
"type": "entrada",
"description": "Ducimus est facilis in eos repellendus.",
"categories[0]": "et",
"date_start": "2021-01-01",
"date_end": "2021-01-31",
"bank_accounts[0]": "excepturi",
"customers[0]": "aut",
"suppliers[0]": "earum",
"works[0]": "maiores",
"cost_centers[0]": "necessitatibus",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 1kf5ceaDPEZad3bhv468gV6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"total_income": "number",
"total_expense": "number",
"total_fee": "number",
"total_balance": "number"
}
}
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.
List cash flow
requires authentication cash-flow index
List all cash flow
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/cash-flows?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Salary&cash_session=uuid&type=entrada&description=Et+voluptas+amet+eum+qui+fuga.&categories[]=aut&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=distinctio&customers[]=voluptas&suppliers[]=maxime&works[]=magni&cost_centers[]=dolores" \
--header "Authorization: Bearer V3abPEDk8h51646Zcaevdgf" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "Salary",
"cash_session": "uuid",
"type": "entrada",
"description": "Et voluptas amet eum qui fuga.",
"categories[0]": "aut",
"date_start": "2021-01-01",
"date_end": "2021-01-31",
"bank_accounts[0]": "distinctio",
"customers[0]": "voluptas",
"suppliers[0]": "maxime",
"works[0]": "magni",
"cost_centers[0]": "dolores",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer V3abPEDk8h51646Zcaevdgf",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "be6cbce8-f7bc-31fe-932e-bb34174a47ea",
"code": "FC-71314253",
"type": "entrada",
"amount": 4190.82,
"description": "Ipsam dolores minus ipsa iure quia in perferendis qui.",
"transaction_date": "2023-04-24T03:00:00.000000Z",
"transaction_category": {
"id": null,
"name": null,
"type": null
},
"created_at": null,
"updated_at": null
},
{
"id": "67db9027-6bbc-33a3-94b7-b7ba4c8a2dba",
"code": "FC-51236710",
"type": "saque",
"amount": -5705.89,
"description": "Possimus fugit natus provident illum.",
"transaction_date": "2005-04-17T03:00:00.000000Z",
"transaction_category": {
"id": null,
"name": null,
"type": null
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Create cash flow
requires authentication cash-flow store
Create a new cash flow
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/cash-flows" \
--header "Authorization: Bearer 4c15kPg6VDE6ahbfe3vdZa8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"Example Type\",
\"cash_session_id\": \"dc049380-d38f-3592-a5de-858b7c573e6b\",
\"transaction_category_id\": \"24b209bb-49f5-3706-a0be-8706424cac96\",
\"bank_account_id\": \"e96b7f48-5b90-3a05-aaab-4aedf7d2ec04\",
\"customer_id\": \"c4e7cba7-42c9-315d-beec-0864a026d427\",
\"supplier_id\": \"4f597c8e-6e9b-33e7-9ca3-64d08b009af3\",
\"work_id\": \"d0dbae0b-0bae-33a6-88f3-454485fb3f03\",
\"cost_center_id\": \"166f1fb0-0048-3b73-b82d-77ab3da76509\",
\"amount\": 1,
\"description\": \"Example Description\",
\"transaction_date\": \"2024-01-01\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows"
);
const headers = {
"Authorization": "Bearer 4c15kPg6VDE6ahbfe3vdZa8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "Example Type",
"cash_session_id": "dc049380-d38f-3592-a5de-858b7c573e6b",
"transaction_category_id": "24b209bb-49f5-3706-a0be-8706424cac96",
"bank_account_id": "e96b7f48-5b90-3a05-aaab-4aedf7d2ec04",
"customer_id": "c4e7cba7-42c9-315d-beec-0864a026d427",
"supplier_id": "4f597c8e-6e9b-33e7-9ca3-64d08b009af3",
"work_id": "d0dbae0b-0bae-33a6-88f3-454485fb3f03",
"cost_center_id": "166f1fb0-0048-3b73-b82d-77ab3da76509",
"amount": 1,
"description": "Example Description",
"transaction_date": "2024-01-01"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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.
Show cash flow
requires authentication cash-flow show
Show a cash flow
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/cash-flows/6" \
--header "Authorization: Bearer 8gV3adDP54Zevc1f6Eka6hb" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/6"
);
const headers = {
"Authorization": "Bearer 8gV3adDP54Zevc1f6Eka6hb",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a7e7e979-dffd-3716-983e-44d9b529c079",
"code": "FC-23908242",
"type": "entrada",
"amount": 6197.89,
"description": "Sit est magnam quod esse nesciunt saepe.",
"transaction_date": "2000-04-18T03:00:00.000000Z",
"transaction_category": {
"id": null,
"name": null,
"type": null
},
"created_at": null,
"updated_at": null
}
}
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 cash flow
requires authentication cash-flow update
Update a cash flow
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/cash-flows/11" \
--header "Authorization: Bearer ekDEVv15cda8Pb43fZg6ha6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"Example Type\",
\"cash_session_id\": \"e9f99edc-08a2-3d3a-928a-779b3d5829cf\",
\"transaction_category_id\": \"09732917-7793-33d3-a4d9-c76640e93fec\",
\"bank_account_id\": \"1553ddc6-cf5f-34ea-9544-d7c60cf95f0a\",
\"customer_id\": \"579e9859-5798-33ad-8687-ecf5cd16ca19\",
\"supplier_id\": \"7d5d799b-4255-3bd6-a27c-e9c5bfb90ca2\",
\"work_id\": \"06d595e7-bfe3-3a86-bb25-555c8e2dd0ba\",
\"cost_center_id\": \"1e5ef82a-292e-3ea3-8195-cb48d3a6decd\",
\"amount\": 1,
\"description\": \"Example Description\",
\"transaction_date\": \"2024-01-01\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/11"
);
const headers = {
"Authorization": "Bearer ekDEVv15cda8Pb43fZg6ha6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "Example Type",
"cash_session_id": "e9f99edc-08a2-3d3a-928a-779b3d5829cf",
"transaction_category_id": "09732917-7793-33d3-a4d9-c76640e93fec",
"bank_account_id": "1553ddc6-cf5f-34ea-9544-d7c60cf95f0a",
"customer_id": "579e9859-5798-33ad-8687-ecf5cd16ca19",
"supplier_id": "7d5d799b-4255-3bd6-a27c-e9c5bfb90ca2",
"work_id": "06d595e7-bfe3-3a86-bb25-555c8e2dd0ba",
"cost_center_id": "1e5ef82a-292e-3ea3-8195-cb48d3a6decd",
"amount": 1,
"description": "Example Description",
"transaction_date": "2024-01-01"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete cash flow
requires authentication cash-flow delete
Delete a cash flow
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/cash-flows/7" \
--header "Authorization: Bearer 6V8va4d16agE5Zfbcek3hDP" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/7"
);
const headers = {
"Authorization": "Bearer 6V8va4d16agE5Zfbcek3hDP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Cash Session
Endpoints for cash session
List cash session
requires authentication cash-session index
List all cash session
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/cash-sessions" \
--header "Authorization: Bearer Vc5k64Z6eaEd8Pga1Dvf3bh" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions"
);
const headers = {
"Authorization": "Bearer Vc5k64Z6eaEd8Pga1Dvf3bh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "9ea8e33d-21c4-3000-865d-32ec8ea8965e",
"code": null,
"opened_by": null,
"opened_at": "1986-11-02T20:43:28.000000Z",
"closed_by": null,
"closed_at": "1974-11-26T09:50:40.000000Z",
"opening_balance": 4790.15,
"closing_balance": 4223.29,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Fechado",
"hasSnapshot": false,
"created_at": "2016-06-15T07:24:26.000000Z",
"updated_at": "2013-08-09T12:42:19.000000Z"
},
{
"id": "94b15aee-b646-3ce7-b29d-7c96e9d24773",
"code": null,
"opened_by": null,
"opened_at": "1978-09-01T20:15:18.000000Z",
"closed_by": null,
"closed_at": "1977-10-25T06:38:50.000000Z",
"opening_balance": 9739.84,
"closing_balance": 9795.59,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Fechado",
"hasSnapshot": false,
"created_at": "2021-02-06T10:54:56.000000Z",
"updated_at": "1974-01-27T16:24:27.000000Z"
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Open cash session
requires authentication cash-session open
Open a new cash session
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/open" \
--header "Authorization: Bearer k3bP4vVfa651ZEdDe8h6gca" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/open"
);
const headers = {
"Authorization": "Bearer k3bP4vVfa651ZEdDe8h6gca",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "b3231f4c-b709-3e9b-bfa1-803ad94aec8e",
"code": null,
"opened_by": null,
"opened_at": "2024-08-31T21:33:04.000000Z",
"closed_by": null,
"closed_at": "1997-11-05T08:09:18.000000Z",
"opening_balance": 7302.96,
"closing_balance": 3453.36,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Fechado",
"hasSnapshot": false,
"created_at": "1990-01-05T03:08:01.000000Z",
"updated_at": "2007-08-15T22:46:19.000000Z"
}
}
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.
Close cash session
requires authentication cash-session close
Close a cash session
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/close/dd0c17b3-f376-3542-9737-755e40b96397" \
--header "Authorization: Bearer va1PkeaD48b63fZhE5c6gdV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/close/dd0c17b3-f376-3542-9737-755e40b96397"
);
const headers = {
"Authorization": "Bearer va1PkeaD48b63fZhE5c6gdV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Cash session account snapshot
requires authentication cash-session show
List the account balance snapshot captured when the cash session was closed
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/cash-sessions/1d91b39d-02d3-3dd5-a08f-5fa1b2e3e51c/account-snapshot" \
--header "Authorization: Bearer g6534Dda8fE6b1VvaePkZhc" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/1d91b39d-02d3-3dd5-a08f-5fa1b2e3e51c/account-snapshot"
);
const headers = {
"Authorization": "Bearer g6534Dda8fE6b1VvaePkZhc",
"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
vary: Origin
{
"message": "Unauthenticated."
}
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.
Show cash session
requires authentication cash-session show
Show a cash session
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/cash-sessions/e51ace80-a9f3-3af7-901d-1ed8490bb476" \
--header "Authorization: Bearer 3dvD14agaeckEV5f8b6hPZ6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/e51ace80-a9f3-3af7-901d-1ed8490bb476"
);
const headers = {
"Authorization": "Bearer 3dvD14agaeckEV5f8b6hPZ6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "813bf137-f34a-33c1-a254-293b2cd100a5",
"code": null,
"opened_by": null,
"opened_at": "1995-09-08T11:53:09.000000Z",
"closed_by": null,
"closed_at": "1982-07-19T03:15:22.000000Z",
"opening_balance": 6276.26,
"closing_balance": 1397.63,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Fechado",
"hasSnapshot": false,
"created_at": "1985-04-14T10:57:49.000000Z",
"updated_at": "2005-01-17T13:30:32.000000Z"
}
}
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.
Delete cash session
requires authentication cash-session delete
Delete a cash session
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/35d29928-397e-3479-96ef-011e1e098d52" \
--header "Authorization: Bearer 4bEhdg863V1vZckP56feDaa" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/35d29928-397e-3479-96ef-011e1e098d52"
);
const headers = {
"Authorization": "Bearer 4bEhdg863V1vZckP56feDaa",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Central de Tutoriais
Consulta dos tutoriais liberados para quem está autenticado
Setores da central
requires authentication No specific permission required
Setores da pessoa que tenham ao menos um tutorial visível, com a contagem
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/tutorials/sectors" \
--header "Authorization: Bearer hE6kPb6VZe5faD1v83adc4g" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/tutorials/sectors"
);
const headers = {
"Authorization": "Bearer hE6kPb6VZe5faD1v83adc4g",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "0bad5e24-177c-3048-87c9-f61c19dc32cc",
"name": "labore quos",
"slug": null,
"abbreviation": "ilk",
"tutorials_count": 0
},
{
"id": "ebb64999-9cf4-344f-a67b-a7c8e9c486a2",
"name": "laborum debitis",
"slug": null,
"abbreviation": null,
"tutorials_count": 0
}
]
}
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.
Módulos da central
requires authentication No specific permission required
Módulos ativos com tutoriais visíveis para a pessoa; aceita filtro de setor
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/tutorials/modules?sector_id=b8d333c7-a202-3c12-a55e-4ac58d3ed29f" \
--header "Authorization: Bearer 4DafVZkv83g5Ea1b6ehPcd6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/tutorials/modules"
);
const params = {
"sector_id": "b8d333c7-a202-3c12-a55e-4ac58d3ed29f",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 4DafVZkv83g5Ea1b6ehPcd6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "218b311d-c6b6-322a-8d20-89c594f0155d",
"name": "Quia minus",
"slug": "quia-minus-654032",
"description": "Voluptas et voluptas quas quasi ullam.",
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
},
{
"id": "4ab792c7-0345-3c59-ab6b-11b0697d82c5",
"name": "Voluptatum quam",
"slug": "voluptatum-quam-603361",
"description": "Accusantium dolorum eaque similique molestias numquam excepturi.",
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
}
]
}
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.
Listar tutoriais
requires authentication No specific permission required
Lista paginada dos tutoriais visíveis, com filtros de módulo, setor e busca por texto
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/tutorials?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=ordem+de+servi%C3%A7o&module_id=7801192d-1089-3fa5-a026-a60ca156382b§or_id=1cd72dd7-fc84-381d-ac32-47068b0d7400" \
--header "Authorization: Bearer 6Vagc8ZD6bf14ehEkPdva35" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/tutorials"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "ordem de serviço",
"module_id": "7801192d-1089-3fa5-a026-a60ca156382b",
"sector_id": "1cd72dd7-fc84-381d-ac32-47068b0d7400",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 6Vagc8ZD6bf14ehEkPdva35",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "6ea1e078-5630-32f3-b7dc-c6dea65ddbd1",
"title": "Quae non asperiores dolores",
"description": "Harum autem natus ut voluptates ut sequi.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a32930de-7e9d-4f49-a1ac-5d52489d1070",
"name": "In nemo",
"slug": "in-nemo-959613"
},
"created_at": null,
"updated_at": null
},
{
"id": "9019ed15-5973-3e37-822b-511f4a18ea63",
"title": "Dolore ex aut id",
"description": "Qui maxime dolores beatae consequatur.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a32930de-810e-4968-ac20-7cbc102759f8",
"name": "Est sunt",
"slug": "est-sunt-988332"
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Detalhe do tutorial
requires authentication No specific permission required
Tutorial com os itens em ordem. Fora da visibilidade, responde 404.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/tutorials/1" \
--header "Authorization: Bearer ZVakh8vEabd15f6cD64Pe3g" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/tutorials/1"
);
const headers = {
"Authorization": "Bearer ZVakh8vEabd15f6cD64Pe3g",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "8db1e0fb-9416-3fc4-a196-c853f080394a",
"title": "Natus maxime sed sit",
"description": "Voluptatem vero doloremque aspernatur est quaerat et.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a32930de-8672-4b40-9b10-36d5231e8bb3",
"name": "Sint dolores",
"slug": "sint-dolores-306017"
},
"created_at": null,
"updated_at": null
}
}
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.
URL do item
requires authentication No specific permission required
Devolve a URL assinada de curta validade para o arquivo no S3, ou o link externo do item. O caminho bruto do S3 nunca é exposto.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/tutorial-items/019556e7-2e9f-777c-a177-30bbf0646c32/url" \
--header "Authorization: Bearer aDVZkgf56Pd31vc6Ehb84ea" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/tutorial-items/019556e7-2e9f-777c-a177-30bbf0646c32/url"
);
const headers = {
"Authorization": "Bearer aDVZkgf56Pd31vc6Ehb84ea",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"type": "string",
"title": "string",
"url": "string",
"expires_in": "integer",
"mime_type": "string",
"size_bytes": "integer"
}
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.
Contracts
Endpoints for managing work contracts
List contracts
requires authentication contract index
List all work contracts
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/contracts" \
--header "Authorization: Bearer bafZgdv3D6ak481V6PhEe5c" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"Example Sort by\",
\"sort_desc\": true,
\"page\": 1,
\"per_page\": 1,
\"work_id\": \"66095eea-a5f0-39f4-a2e2-30d6231b78de\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts"
);
const headers = {
"Authorization": "Bearer bafZgdv3D6ak481V6PhEe5c",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "Example Sort by",
"sort_desc": true,
"page": 1,
"per_page": 1,
"work_id": "66095eea-a5f0-39f4-a2e2-30d6231b78de"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "93f738fc-9b44-3477-91f9-cb49992badcb",
"number": "183/2026",
"started_at": "2026-11-06",
"deadline_at": "2027-11-06",
"work": {
"id": "a32930d2-a557-44f3-a99f-8908aaf74e9b",
"name": "Sr. Gean Gustavo Verdugo Filho"
},
"created_at": null,
"updated_at": null
},
{
"id": "de9c5313-3990-3101-b964-dd4aebd996b3",
"number": "068/2026",
"started_at": "2026-11-06",
"deadline_at": "2027-11-06",
"work": {
"id": "a32930d2-ab55-4e58-881f-fd36ee3b6c45",
"name": "Dr. Lorenzo Faro Vasques"
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Create contract
requires authentication contract store
Create a new contract for a work
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/contracts" \
--header "Authorization: Bearer Z56h64bd1avkVfacDgEeP38" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"work_id\": \"890f7695-e742-330e-a6fc-e8259d5a5d8e\",
\"number\": \"Example Number\",
\"started_at\": \"Example Started at\",
\"deadline_at\": \"Example Deadline at\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts"
);
const headers = {
"Authorization": "Bearer Z56h64bd1avkVfacDgEeP38",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"work_id": "890f7695-e742-330e-a6fc-e8259d5a5d8e",
"number": "Example Number",
"started_at": "Example Started at",
"deadline_at": "Example Deadline at"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": "object"
}
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.
Show contract
requires authentication contract show
Show a work contract
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/contracts/7" \
--header "Authorization: Bearer 4avfg6bdk1eEc3ZP6Vh58Da" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts/7"
);
const headers = {
"Authorization": "Bearer 4avfg6bdk1eEc3ZP6Vh58Da",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "8668caed-edf5-3052-95dd-03b3a62b2e88",
"number": "903/2026",
"started_at": "2026-11-06",
"deadline_at": "2027-11-06",
"work": {
"id": "a32930d2-bc74-4e6a-92ba-8dc64f7b8446",
"name": "Talita Rocha Neto"
},
"created_at": null,
"updated_at": null
}
}
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 contract
requires authentication contract update
Update a work contract
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/contracts/13" \
--header "Authorization: Bearer aE5h861geP6akcD4VZf3bdv" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"number\": \"Example Number\",
\"started_at\": \"Example Started at\",
\"deadline_at\": \"Example Deadline at\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts/13"
);
const headers = {
"Authorization": "Bearer aE5h861geP6akcD4VZf3bdv",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"number": "Example Number",
"started_at": "Example Started at",
"deadline_at": "Example Deadline at"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": "object"
}
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.
Delete contract
requires authentication contract delete
Delete a work contract
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/contracts/possimus" \
--header "Authorization: Bearer aD1ZV5h43gePv8kdbaE6fc6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts/possimus"
);
const headers = {
"Authorization": "Bearer aD1ZV5h43gePv8kdbaE6fc6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Cost Centers
Endpoints for cost centers
Suggest next code
requires authentication cost-center index
Próximo código livre sob o pai informado. O código é sugestão e pode ser alterado antes de salvar.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/cost-centers/next-code?parent_id=sequi" \
--header "Authorization: Bearer 548vg3Zhka6Dae6dV1cEfbP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"parent_id\": \"ullam\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/next-code"
);
const params = {
"parent_id": "sequi",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 548vg3Zhka6Dae6dV1cEfbP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"parent_id": "ullam"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"code": "001.002"
}
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.
Cost center requirement
requires authentication cost-center requirement-config index
Data a partir da qual o centro de custo é obrigatório em lançamentos novos. A tela usa isso para marcar o campo como obrigatório sem precisar tentar salvar.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/cost-centers/requirement-config" \
--header "Authorization: Bearer eb8kg6vaZa43PEDdh5fVc61" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/requirement-config"
);
const headers = {
"Authorization": "Bearer eb8kg6vaZa43PEDdh5fVc61",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"required_from": "2026-11-03",
"required_now": true
}
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 cost center requirement
requires authentication cost-center requirement-config update
Ajusta a data de corte. Enviar nulo desliga a obrigatoriedade.
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/cost-centers/requirement-config" \
--header "Authorization: Bearer a14dvbgk68DE3e5ca6hVfZP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"required_from\": \"2026-11-03\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/requirement-config"
);
const headers = {
"Authorization": "Bearer a14dvbgk68DE3e5ca6hVfZP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"required_from": "2026-11-03"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"required_from": "2026-11-03",
"required_now": true
}
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.
Stock cost center
requires authentication cost-center stock-config index
Centro de custo que recebe a compra de material. A conta a pagar gerada por NF-e de produto nasce nele, porque o custo do material chega à obra pela movimentação de estoque.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/cost-centers/stock-config" \
--header "Authorization: Bearer e5V6aDab6hcPg3E8d4Zfvk1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/stock-config"
);
const headers = {
"Authorization": "Bearer e5V6aDab6hcPg3E8d4Zfvk1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"cost_center": {
"id": "uuid",
"code": "003.001",
"name": "Estoque central"
}
}
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 stock cost center
requires authentication cost-center stock-config update
Aponta a configuração para outro centro. Nulo desliga: a conta da nota passa a nascer sem centro, para ser classificada na conferência.
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/cost-centers/stock-config" \
--header "Authorization: Bearer aZekvaV31fh5PEd664cDg8b" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"cost_center_id\": \"nulla\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/stock-config"
);
const headers = {
"Authorization": "Bearer aZekvaV31fh5PEd664cDg8b",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"cost_center_id": "nulla"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"cost_center": {
"id": "uuid",
"code": "003.001",
"name": "Estoque central"
}
}
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.
List cost centers
requires authentication cost-center index
Lista plana ordenada por código, sem paginação. Cada item traz nível e caminho completo, para o cliente montar a árvore em memória.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/cost-centers?q=vila&active=1" \
--header "Authorization: Bearer EDafvea6cVP86bh4k51Zgd3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers"
);
const params = {
"q": "vila",
"active": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer EDafvea6cVP86bh4k51Zgd3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "1fecb133-4ed4-3059-af22-82f27ed71ed2",
"code": "393",
"name": "rerum qui",
"level": 1,
"path": null,
"is_active": true,
"selectable": false,
"created_at": null,
"updated_at": null
},
{
"id": "3be773f1-c93f-3cae-a9dd-9292c6bd7cb5",
"code": "253",
"name": "libero ipsum",
"level": 1,
"path": null,
"is_active": true,
"selectable": false,
"created_at": null,
"updated_at": null
}
]
}
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.
Show cost center
requires authentication cost-center show
Detalhe de um centro de custo
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/cost-centers/similique" \
--header "Authorization: Bearer aPk8V1aEfgc6ehv3ZD4db56" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/similique"
);
const headers = {
"Authorization": "Bearer aPk8V1aEfgc6ehv3ZD4db56",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "3042b16d-1291-3a54-b150-dc7aca849c6f",
"code": "877",
"name": "nemo velit",
"level": 1,
"path": null,
"is_active": true,
"selectable": false,
"created_at": null,
"updated_at": null
}
}
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.
Create cost center
requires authentication cost-center store
Cadastra um centro de custo
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/cost-centers" \
--header "Authorization: Bearer gc6v85de4Z6EabafVPk1hD3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"code\": \"Example Code\",
\"name\": \"Example Name\",
\"parent_id\": \"44032399-7256-36ed-94e6-12c6079270b0\",
\"work_id\": \"f03a30fc-6b80-3b04-88de-1b4630de4963\",
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers"
);
const headers = {
"Authorization": "Bearer gc6v85de4Z6EabafVPk1hD3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"code": "Example Code",
"name": "Example Name",
"parent_id": "44032399-7256-36ed-94e6-12c6079270b0",
"work_id": "f03a30fc-6b80-3b04-88de-1b4630de4963",
"is_active": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 cost center
requires authentication cost-center update
Atualiza um centro de custo, inclusive a situação (inativar e reativar)
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/cost-centers/molestiae" \
--header "Authorization: Bearer 3bZDv14Vgd68Eah6ckaf5eP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"code\": \"Example Code\",
\"name\": \"Example Name\",
\"parent_id\": \"d7f6c394-1c23-39be-ae85-cc9846ee564c\",
\"work_id\": \"b1241cbb-2b84-302d-95e2-e9a517543de1\",
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/molestiae"
);
const headers = {
"Authorization": "Bearer 3bZDv14Vgd68Eah6ckaf5eP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"code": "Example Code",
"name": "Example Name",
"parent_id": "d7f6c394-1c23-39be-ae85-cc9846ee564c",
"work_id": "b1241cbb-2b84-302d-95e2-e9a517543de1",
"is_active": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete cost center
requires authentication cost-center delete
Exclui um centro de custo. Só é permitido quando ele não tem centros abaixo nem lançamentos.
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/cost-centers/est" \
--header "Authorization: Bearer 6kPacbg86ZDd3hEVf41aev5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/est"
);
const headers = {
"Authorization": "Bearer 6kPacbg86ZDd3hEVf41aev5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Customers
Endpoints for customers
List customers
requires authentication customers index
List all customers
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/customers?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Customer+name" \
--header "Authorization: Bearer hg65bEvfkPea8ac1dD34VZ6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/customers"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "Customer name",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer hg65bEvfkPea8ac1dD34VZ6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "811e1fee-765b-3741-84d5-fe71938cf0f0",
"name": "Melina Tainara Paes",
"email": "gabi.leon@example.net",
"phone": "(53) 99793-4521",
"document": "132.010.415-05",
"type": "pf",
"responsible": "Mirella Ferraz",
"image": {
"id": null,
"url": null
},
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"documents_count": 0
},
{
"id": "e511b023-0393-3e00-8fbf-b9db76c8b367",
"name": "Artur Azevedo Cordeiro",
"email": "iserrano@example.net",
"phone": "(74) 3914-0167",
"document": "943.564.016-89",
"type": "pj",
"responsible": "Sra. Nathalia Janaina Medina",
"image": {
"id": null,
"url": null
},
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"documents_count": 0
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Create customer
requires authentication customers store
Create a new customer
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/customers" \
--header "Authorization: Bearer ahV3Ed5c6g84ZD6Pa1bvfek" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"email\": \"user@example.com\",
\"phone\": \"(11) 99999-9999\",
\"document\": \"Example Document\",
\"type\": \"Example Type\",
\"responsible\": \"Example Responsible\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"address\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"street\": \"Example Address street\",
\"number\": \"Example Address number\",
\"complement\": \"Example Address complement\",
\"neighborhood\": \"Example Address neighborhood\",
\"city\": \"Example Address city\",
\"state\": \"Example Address state\",
\"zip_code\": \"Example Address zip code\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/customers"
);
const headers = {
"Authorization": "Bearer ahV3Ed5c6g84ZD6Pa1bvfek",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"email": "user@example.com",
"phone": "(11) 99999-9999",
"document": "Example Document",
"type": "Example Type",
"responsible": "Example Responsible",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"address": {
"0": "example1",
"1": "example2",
"street": "Example Address street",
"number": "Example Address number",
"complement": "Example Address complement",
"neighborhood": "Example Address neighborhood",
"city": "Example Address city",
"state": "Example Address state",
"zip_code": "Example Address zip code"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 customer
requires authentication customers index
Get a customer
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/customers/15" \
--header "Authorization: Bearer f158cbk4gZha6edaDV6PvE3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/customers/15"
);
const headers = {
"Authorization": "Bearer f158cbk4gZha6edaDV6PvE3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "4f0b01d9-bafc-3057-9ef6-28778c1ce8f8",
"name": "Jasmin Medina Prado",
"email": "isabelly.vieira@example.net",
"phone": "(33) 3719-3275",
"document": "704.131.446-40",
"type": "pf",
"responsible": "Sr. Joaquin da Rosa",
"image": {
"id": null,
"url": null
},
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"documents_count": 0
}
}
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 customer
requires authentication customers update
Update a customer
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/customers/13" \
--header "Authorization: Bearer ZDgbh4kvdae51PfV8c63E6a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"email\": \"user@example.com\",
\"phone\": \"(11) 99999-9999\",
\"document\": \"Example Document\",
\"type\": \"Example Type\",
\"responsible\": \"Example Responsible\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"address\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"street\": \"Example Address street\",
\"number\": \"Example Address number\",
\"complement\": \"Example Address complement\",
\"neighborhood\": \"Example Address neighborhood\",
\"city\": \"Example Address city\",
\"state\": \"Example Address state\",
\"zip_code\": \"Example Address zip code\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/customers/13"
);
const headers = {
"Authorization": "Bearer ZDgbh4kvdae51PfV8c63E6a",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"email": "user@example.com",
"phone": "(11) 99999-9999",
"document": "Example Document",
"type": "Example Type",
"responsible": "Example Responsible",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"address": {
"0": "example1",
"1": "example2",
"street": "Example Address street",
"number": "Example Address number",
"complement": "Example Address complement",
"neighborhood": "Example Address neighborhood",
"city": "Example Address city",
"state": "Example Address state",
"zip_code": "Example Address zip code"
}
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete customer
requires authentication customers delete
Delete a customer
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/customers/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer cV36kh8PaZg5d4eab61fvDE" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/customers/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer cV36kh8PaZg5d4eab61fvDE",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Daily Logs (RDO)
Endpoints for managing daily work reports (RDO)
List daily logs
requires authentication daily-log index
List all daily work reports (RDO)
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/daily-logs" \
--header "Authorization: Bearer dV4b35PcgE1a6Zv68fakDeh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"Example Sort by\",
\"sort_desc\": true,
\"page\": 1,
\"per_page\": 1,
\"q\": \"Example Q\",
\"work_id\": \"42a8e40b-4084-3d99-9ee1-38c0215c4943\",
\"contract_id\": \"7a1afc68-e4b1-3d9d-b49c-9fdc813b8442\",
\"status_id\": \"b6b3413a-33e5-3777-b125-bddb339d7133\",
\"filled_by\": \"9d33be52-6299-3bec-a242-5a8b3f93607b\",
\"responsible_id\": \"a6536e25-0724-3313-a927-2cc7b710b772\",
\"date_from\": \"2024-01-01\",
\"date_to\": \"2024-01-01\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs"
);
const headers = {
"Authorization": "Bearer dV4b35PcgE1a6Zv68fakDeh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "Example Sort by",
"sort_desc": true,
"page": 1,
"per_page": 1,
"q": "Example Q",
"work_id": "42a8e40b-4084-3d99-9ee1-38c0215c4943",
"contract_id": "7a1afc68-e4b1-3d9d-b49c-9fdc813b8442",
"status_id": "b6b3413a-33e5-3777-b125-bddb339d7133",
"filled_by": "9d33be52-6299-3bec-a242-5a8b3f93607b",
"responsible_id": "a6536e25-0724-3313-a927-2cc7b710b772",
"date_from": "2024-01-01",
"date_to": "2024-01-01"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "a883db44-cb97-33b3-91fb-a4c9a9b75dba",
"code": "RDO-06-11-26",
"report_number": 1,
"date": "2026-11-06",
"status": {
"id": "a32930d3-1f6c-40b0-918c-deee11810e86",
"slug": null,
"name": null,
"abbreviation": "suscipit",
"color": "#39f20d",
"text_color": "#30ee4b"
},
"work": {
"id": "a32930d3-1879-4340-a323-da8a43af2ac2",
"name": "Sr. Giovane Correia Madeira",
"started_at": "2013-08-23 12:37:55"
},
"filled_by": {
"id": "a32930d3-1cde-438a-8afb-6c2da2b9a53e",
"name": "Prof. Sofia Sipes I"
},
"contract_number": "619/2026",
"deadline_at": "2027-11-06",
"technical_responsible": {
"name": null,
"certification": null,
"crea": null
},
"activities": [],
"occurrences": null,
"next_day_forecast": null,
"finalized_at": null,
"has_signed_document": false,
"content_hash": null,
"gov_br_validation_url": null,
"created_at": null,
"updated_at": null
},
{
"id": "9d103509-90a5-3167-8f06-0c110470dea1",
"code": "RDO-06-11-26",
"report_number": 1,
"date": "2026-11-06",
"status": {
"id": "a32930d3-282c-47b5-8e44-1409ed1d3f94",
"slug": null,
"name": null,
"abbreviation": "esse",
"color": "#5a982f",
"text_color": "#8f0f02"
},
"work": {
"id": "a32930d3-22e0-4c36-a0ca-d2fc2b926211",
"name": "Dr. Saulo Maldonado Alcantara Jr.",
"started_at": "1975-09-04 11:56:55"
},
"filled_by": {
"id": "a32930d3-26be-4893-ade1-5673e90458cc",
"name": "Janie Kris PhD"
},
"contract_number": "449/2026",
"deadline_at": "2027-11-06",
"technical_responsible": {
"name": null,
"certification": null,
"crea": null
},
"activities": [],
"occurrences": null,
"next_day_forecast": null,
"finalized_at": null,
"has_signed_document": false,
"content_hash": null,
"gov_br_validation_url": null,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Pending RDO days
requires authentication daily-log index
List the days in a period that have no RDO for a given work
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/daily-logs/pending-days" \
--header "Authorization: Bearer akVcEhv5a18eZDP6d346fgb" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"contract_id\": \"Example Contract id\",
\"date_from\": \"2024-01-01\",
\"date_to\": \"2024-01-01\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/pending-days"
);
const headers = {
"Authorization": "Bearer akVcEhv5a18eZDP6d346fgb",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"contract_id": "Example Contract id",
"date_from": "2024-01-01",
"date_to": "2024-01-01"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
"2026-07-01",
"2026-07-02"
]
}
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.
Show daily log
requires authentication daily-log show
Show a daily work report (RDO)
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/daily-logs/dignissimos" \
--header "Authorization: Bearer c1Vavhk4EfDbgZae6d6835P" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/dignissimos"
);
const headers = {
"Authorization": "Bearer c1Vavhk4EfDbgZae6d6835P",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "10f99192-db4b-355a-affa-2aafd2351392",
"code": "RDO-06-11-26",
"report_number": 1,
"date": "2026-11-06",
"status": {
"id": "a32930d3-3e6b-4d9f-9128-3e7e4d65f274",
"slug": null,
"name": null,
"abbreviation": "voluptatum",
"color": "#54be68",
"text_color": "#5195e4"
},
"work": {
"id": "a32930d3-33be-467b-bc66-ea311f6fff40",
"name": "Samanta Marisa Neves",
"started_at": "2005-08-31 21:12:00"
},
"filled_by": {
"id": "a32930d3-3c9a-4d84-b6bf-30c9a10991af",
"name": "Prof. Emmalee Keebler"
},
"contract_number": "852/2026",
"deadline_at": "2027-11-06",
"technical_responsible": {
"name": null,
"certification": null,
"crea": null
},
"activities": [],
"occurrences": null,
"next_day_forecast": null,
"finalized_at": null,
"has_signed_document": false,
"content_hash": null,
"gov_br_validation_url": null,
"created_at": null,
"updated_at": null
}
}
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.
Create daily log
requires authentication daily-log store
Open a new daily work report (RDO) for a work
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/daily-logs" \
--header "Authorization: Bearer gZPc1bEv83Dahade6Vf645k" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"contract_id\": \"Example Contract id\",
\"date\": \"2024-01-01\",
\"status_id\": \"7b4b8ea3-21d5-3f11-b3fd-00d9106221b4\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs"
);
const headers = {
"Authorization": "Bearer gZPc1bEv83Dahade6Vf645k",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"contract_id": "Example Contract id",
"date": "2024-01-01",
"status_id": "7b4b8ea3-21d5-3f11-b3fd-00d9106221b4"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": "object"
}
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 daily log
requires authentication daily-log update
Update a draft RDO: weather, team, activities, occurrences and next-day forecast
Example request:
curl --request PATCH \
"https://api.bs-homolog.pensou.app.br/api/daily-logs/ipsa" \
--header "Authorization: Bearer 5bDvVdfk1gPE8eZca34ah66" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"activities\": \"Example Activities\",
\"occurrences\": \"Example Occurrences\",
\"next_day_forecast\": \"Example Next day forecast\",
\"weather\": [
{
\"shift\": \"Example Weather * shift\",
\"weather\": \"Example Weather * weather\"
},
null
],
\"teams\": [
{
\"employee_role_id\": \"01a32f83-7ea6-4c43-a83c-07b082ee64ba\",
\"quantity\": 1
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/ipsa"
);
const headers = {
"Authorization": "Bearer 5bDvVdfk1gPE8eZca34ah66",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"activities": "Example Activities",
"occurrences": "Example Occurrences",
"next_day_forecast": "Example Next day forecast",
"weather": [
{
"shift": "Example Weather * shift",
"weather": "Example Weather * weather"
},
null
],
"teams": [
{
"employee_role_id": "01a32f83-7ea6-4c43-a83c-07b082ee64ba",
"quantity": 1
},
null
]
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": "object"
}
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.
Finalize daily log
requires authentication daily-log finalize
Validate, stamp and lock a draft RDO (Rascunho → Finalizado)
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/daily-logs/quas/finalize" \
--header "Authorization: Bearer 1fPZav3edD6achkg65bEV84" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/quas/finalize"
);
const headers = {
"Authorization": "Bearer 1fPZav3edD6achkg65bEV84",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": "object"
}
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.
Attach gov.br signed document
requires authentication daily-log finalize
Attach the gov.br-signed PDF and validation link to a finalized RDO
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/daily-logs/omnis/signed-document" \
--header "Authorization: Bearer b1hgfePvca6635DZd4Ea8kV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"path\": \"Example Path\",
\"name\": \"Example Name\",
\"size\": \"Example Size\",
\"extension\": \"Example Extension\",
\"gov_br_validation_url\": \"https:\\/\\/example.com\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/omnis/signed-document"
);
const headers = {
"Authorization": "Bearer b1hgfePvca6635DZd4Ea8kV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"path": "Example Path",
"name": "Example Name",
"size": "Example Size",
"extension": "Example Extension",
"gov_br_validation_url": "https:\/\/example.com"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": "object"
}
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.
Reopen daily log
requires authentication daily-log reopen
Send a finalized RDO back to draft (Finalizado → Rascunho). Refused when a gov.br-signed document is attached
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/daily-logs/praesentium/reopen" \
--header "Authorization: Bearer vhc61feag4dka3ZDP85E6bV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/praesentium/reopen"
);
const headers = {
"Authorization": "Bearer vhc61feag4dka3ZDP85E6bV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": "object"
}
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.
Attach photos
requires authentication daily-log update
Attach photographs (already uploaded to storage) to a draft RDO
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/daily-logs/vel/photos" \
--header "Authorization: Bearer kag648favch5Z6bED1dPVe3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"photos\": [
{
\"path\": \"Example Photos * path\",
\"name\": \"Example Name\",
\"size\": \"Example Photos * size\",
\"extension\": \"Example Photos * extension\",
\"caption\": \"Example Photos * caption\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/vel/photos"
);
const headers = {
"Authorization": "Bearer kag648favch5Z6bED1dPVe3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"photos": [
{
"path": "Example Photos * path",
"name": "Example Name",
"size": "Example Photos * size",
"extension": "Example Photos * extension",
"caption": "Example Photos * caption"
},
null
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": "object"
}
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 photo caption
requires authentication daily-log update
Update the caption of a photo in a draft RDO
Example request:
curl --request PATCH \
"https://api.bs-homolog.pensou.app.br/api/daily-logs/quia/photos/iusto" \
--header "Authorization: Bearer e6D16k5bfa4E8aZVvcdg3hP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"caption\": \"Example Caption\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/quia/photos/iusto"
);
const headers = {
"Authorization": "Bearer e6D16k5bfa4E8aZVvcdg3hP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"caption": "Example Caption"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": "object"
}
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.
Delete photo
requires authentication daily-log update
Remove a photo from a draft RDO
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/daily-logs/ex/photos/assumenda" \
--header "Authorization: Bearer avd345eP8fc6hVaEZ1gD6bk" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/ex/photos/assumenda"
);
const headers = {
"Authorization": "Bearer avd345eP8fc6hVaEZ1gD6bk",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Delete daily log
requires authentication daily-log delete
Delete a draft daily work report (RDO)
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/daily-logs/quis" \
--header "Authorization: Bearer Vf53kdb64DZgc16hEePvaa8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/quis"
);
const headers = {
"Authorization": "Bearer Vf53kdb64DZgc16hEePvaa8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Disciplines
Endpoints for engineering disciplines
List disciplines
requires authentication discipline index
List all disciplines
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/disciplines?q=El%C3%A9trico&active=1" \
--header "Authorization: Bearer k6av86begcEP54aDfdZ31hV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/disciplines"
);
const params = {
"q": "Elétrico",
"active": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer k6av86begcEP54aDfdZ31hV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "57eb260a-c907-399c-a3b0-fd81396472f6",
"name": "Earum",
"code": "XUR",
"description": "Accusamus sunt inventore provident neque rerum laborum.",
"active": true
},
{
"id": "d3a51374-0865-31fc-b932-a86317408b58",
"name": "Qui",
"code": "EJD",
"description": "Quidem aut voluptas aliquam neque eaque.",
"active": true
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Show discipline
requires authentication discipline show
Show a discipline
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/disciplines/1" \
--header "Authorization: Bearer cgaV5f83dvEbaeZkhPD6146" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/disciplines/1"
);
const headers = {
"Authorization": "Bearer cgaV5f83dvEbaeZkhPD6146",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "66e4e855-7e81-3b8f-969f-dab872963e6e",
"name": "Aliquid",
"code": "PSA",
"description": "Id et quod quia assumenda.",
"active": true
}
}
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.
Create discipline
requires authentication discipline store
Create a new discipline
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/disciplines" \
--header "Authorization: Bearer eV436ghvfPk8Zd5EDbc16aa" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"code\": \"Example Code\",
\"description\": \"Example Description\",
\"active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/disciplines"
);
const headers = {
"Authorization": "Bearer eV436ghvfPk8Zd5EDbc16aa",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"code": "Example Code",
"description": "Example Description",
"active": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 discipline
requires authentication discipline update
Update a discipline
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/disciplines/1" \
--header "Authorization: Bearer 4h6561fZPkEDad3aeVvb8gc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"code\": \"Example Code\",
\"description\": \"Example Description\",
\"active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/disciplines/1"
);
const headers = {
"Authorization": "Bearer 4h6561fZPkEDad3aeVvb8gc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"code": "Example Code",
"description": "Example Description",
"active": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete discipline
requires authentication discipline delete
Delete a discipline
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/disciplines/doloribus" \
--header "Authorization: Bearer 516fkbaD64Zeg3cadVEh8Pv" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/disciplines/doloribus"
);
const headers = {
"Authorization": "Bearer 516fkbaD64Zeg3cadVEh8Pv",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Document Categories
Endpoints for document categories
List document categories
requires authentication document-category index
List all document categories
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/document-categories?q=Contracts&module=employee" \
--header "Authorization: Bearer Z346a5vV1gebkhdEaf6c8DP" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/document-categories"
);
const params = {
"q": "Contracts",
"module": "employee",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Z346a5vV1gebkhdEaf6c8DP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "3c3df169-acbf-3661-b77d-1458535aefd2",
"name": "Srta. Daniela Nicole Feliciano",
"description": "Sunt voluptas voluptas ad et quo. Assumenda odit animi eos quo eaque velit. Eaque dicta fugiat est nobis provident magni. Impedit nostrum autem numquam blanditiis.",
"module": "document"
},
{
"id": "5b399b6a-34fc-36d7-a3f8-ab93d3c9e4d4",
"name": "Dr. Jácomo Sanches Fonseca Jr.",
"description": "Et nesciunt facere vitae explicabo. Aliquid atque qui voluptatum laborum. Esse laudantium quis pariatur nobis. Sit eos dolor assumenda est.",
"module": "document"
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Show document category
requires authentication document-category show
Show a document category
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/document-categories/neque" \
--header "Authorization: Bearer ZDe45cgaPdvfV1E683kb6ah" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/document-categories/neque"
);
const headers = {
"Authorization": "Bearer ZDe45cgaPdvfV1E683kb6ah",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "c0ed6c3f-1ab6-3f8a-9721-1726de23d601",
"name": "Emiliano James Jimenes",
"description": "Nam laboriosam sint qui quasi velit voluptatem. Asperiores cum rerum architecto. Iusto deleniti non consequuntur nisi. Et fugit et amet. Dignissimos placeat inventore est vel.",
"module": "document"
}
}
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.
Create document category
requires authentication document-category store
Create a new document category
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/document-categories" \
--header "Authorization: Bearer DkEPf5Vh6a16v8dbg3cea4Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"module\": \"Example Module\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/document-categories"
);
const headers = {
"Authorization": "Bearer DkEPf5Vh6a16v8dbg3cea4Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"module": "Example Module"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 document category
requires authentication document-category update
Update a document category
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/document-categories/explicabo" \
--header "Authorization: Bearer 4dkcf163eEVPZhbD856vaag" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"module\": \"Example Module\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/document-categories/explicabo"
);
const headers = {
"Authorization": "Bearer 4dkcf163eEVPZhbD856vaag",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"module": "Example Module"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete document category
requires authentication document-category delete
Delete a document category
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/document-categories/iste" \
--header "Authorization: Bearer b1Phvd6ZVD4kgae58caf63E" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/document-categories/iste"
);
const headers = {
"Authorization": "Bearer b1Phvd6ZVD4kgae58caf63E",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Documents
Endpoints for documents
List documents
requires authentication documents index
List all documents
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/documents?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Document+name&categories[]=esse&documentable_type=ipsam&customers[]=recusandae&suppliers[]=qui" \
--header "Authorization: Bearer 581k4ZgfDbEha3eaVP6c6vd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/documents"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "Document name",
"categories[0]": "esse",
"documentable_type": "ipsam",
"customers[0]": "recusandae",
"suppliers[0]": "qui",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 581k4ZgfDbEha3eaVP6c6vd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "a6ca2073-0012-32ca-a458-188dd25b1452",
"name": "Sandro Santana Pena Jr.",
"file": {
"id": null,
"url": null,
"extension": null
},
"created_at": null,
"updated_at": null
},
{
"id": "8e77517d-4e4b-3216-8a0f-03276fc947b7",
"name": "Sr. Wellington Marinho Tamoio",
"file": {
"id": null,
"url": null,
"extension": null
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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 document
requires authentication documents show
Get a document
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/documents/2" \
--header "Authorization: Bearer 584kZPvd6f36ceV1DgEhbaa" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/documents/2"
);
const headers = {
"Authorization": "Bearer 584kZPvd6f36ceV1DgEhbaa",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "bb2b348f-27e8-34e6-86e7-5c2dfe56c500",
"name": "Sr. Christian das Neves",
"file": {
"id": null,
"url": null,
"extension": null
},
"created_at": null,
"updated_at": null
}
}
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.
Create document
requires authentication documents store
Create a new document
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/documents" \
--header "Authorization: Bearer 5fZ8P66kb4VahEcea3g1Ddv" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"category_id\": \"03b426aa-3efd-326e-bf9f-031c5729f1e7\",
\"file\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example File path\",
\"name\": \"Example Name\",
\"extension\": \"Example File extension\",
\"size\": \"Example File size\"
},
\"documentable_type\": \"Example Documentable type\",
\"documentable_id\": \"Example Documentable id\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/documents"
);
const headers = {
"Authorization": "Bearer 5fZ8P66kb4VahEcea3g1Ddv",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"category_id": "03b426aa-3efd-326e-bf9f-031c5729f1e7",
"file": {
"0": "example1",
"1": "example2",
"path": "Example File path",
"name": "Example Name",
"extension": "Example File extension",
"size": "Example File size"
},
"documentable_type": "Example Documentable type",
"documentable_id": "Example Documentable id"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 document
requires authentication documents update
Update a document
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/documents/18" \
--header "Authorization: Bearer Dbhvfk6g3aVae1c564dPEZ8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"category_id\": \"dc97c3e4-4cb0-31b6-8516-42612b189a76\",
\"file\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example File path\",
\"name\": \"Example Name\",
\"extension\": \"Example File extension\",
\"size\": \"Example File size\"
},
\"documentable_type\": \"Example Documentable type\",
\"documentable_id\": \"Example Documentable id\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/documents/18"
);
const headers = {
"Authorization": "Bearer Dbhvfk6g3aVae1c564dPEZ8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"category_id": "dc97c3e4-4cb0-31b6-8516-42612b189a76",
"file": {
"0": "example1",
"1": "example2",
"path": "Example File path",
"name": "Example Name",
"extension": "Example File extension",
"size": "Example File size"
},
"documentable_type": "Example Documentable type",
"documentable_id": "Example Documentable id"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete document
requires authentication documents delete
Delete a document
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/documents/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer P3kcE8ev4dh6a1baD6gZfV5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/documents/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer P3kcE8ev4dh6a1baD6gZfV5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
EPI Renewals
Endpoints for EPI pending renewals
List EPI renewals
requires authentication employee-epi index
List pending/ignored (default) or completed EPI renewals. Ignored items remain in the default listing with renewal_status=ignored
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/epi-renewals" \
--header "Authorization: Bearer E6khedv6VgZa48P31bDaf5c" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"qui\",
\"renewal_status\": \"completed\",
\"urgency\": \"expires_7_days\",
\"employee_id\": \"similique\",
\"epi_type_id\": \"voluptatem\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals"
);
const headers = {
"Authorization": "Bearer E6khedv6VgZa48P31bDaf5c",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "qui",
"renewal_status": "completed",
"urgency": "expires_7_days",
"employee_id": "similique",
"epi_type_id": "voluptatem"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
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.
EPI renewals summary
requires authentication employee-epi index
Counts of renewals by urgency (pending and ignored; ignore only silences notifications)
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/epi-renewals/summary" \
--header "Authorization: Bearer Z65daDekhf1b6Ecv3agPV84" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/summary"
);
const headers = {
"Authorization": "Bearer Z65daDekhf1b6Ecv3agPV84",
"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
vary: Origin
{
"message": "Unauthenticated."
}
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.
Renew EPI delivery
requires authentication employee-epi update
Renew an EPI delivery with a new delivery date
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/nobis/renew" \
--header "Authorization: Bearer fkdePv5ab163ah64ZVD8Egc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"quantity\": 1,
\"condition\": \"new\",
\"confirm_insufficient_stock\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/nobis/renew"
);
const headers = {
"Authorization": "Bearer fkdePv5ab163ah64ZVD8Egc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quantity": 1,
"condition": "new",
"confirm_insufficient_stock": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
Ignore EPI renewal
requires authentication employee-epi update
Ignore expiry alerts for an EPI delivery
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/et/ignore" \
--header "Authorization: Bearer bvd31VZDPaE8feh64g56kca" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"ignore_reason\": \"Colaborador afastado temporariamente\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/et/ignore"
);
const headers = {
"Authorization": "Bearer bvd31VZDPaE8feh64g56kca",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"ignore_reason": "Colaborador afastado temporariamente"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
Unignore EPI renewal
requires authentication employee-epi update
Resume expiry alerts for an EPI delivery
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/quo/ignore" \
--header "Authorization: Bearer e6146haabVk8Zfgdc3EP5Dv" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/quo/ignore"
);
const headers = {
"Authorization": "Bearer e6146haabVk8Zfgdc3EP5Dv",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
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.
EPI Types
Endpoints for EPI types catalog
List EPI types
requires authentication epi index
List all EPI types
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/epi-types" \
--header "Authorization: Bearer 5kcDEhve1Vb64d8fg3aZ6aP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"impedit\",
\"stock_id\": \"molestias\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types"
);
const headers = {
"Authorization": "Bearer 5kcDEhve1Vb64d8fg3aZ6aP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "impedit",
"stock_id": "molestias"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "d9fdefcd-730f-3ce1-b206-7bc358879da6",
"name": "tenetur corporis",
"default_validity_days": 132,
"requires_signature": false,
"numero_ca": "33970",
"product": null,
"available_quantity": null,
"created_at": null,
"updated_at": null
},
{
"id": "aae51571-e144-325d-a3f6-9fb438fd8971",
"name": "blanditiis numquam",
"default_validity_days": 600,
"requires_signature": true,
"numero_ca": "14471",
"product": null,
"available_quantity": null,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
List catalog products that could become EPI
requires authentication epi index
Products sitting in a family flagged as EPI that do not have EPI attributes yet. Being here does not make a product an EPI: it becomes one when someone gives it a validity, through the create endpoint with action link_existing.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/epi-types/candidates" \
--header "Authorization: Bearer vk6aeD5VE6g184fhbcZdPa3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"voluptatem\",
\"stock_id\": \"qui\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/candidates"
);
const headers = {
"Authorization": "Bearer vk6aeD5VE6g184fhbcZdPa3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "voluptatem",
"stock_id": "qui"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
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.
Show EPI type
requires authentication epi show
Show an EPI type
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/epi-types/in" \
--header "Authorization: Bearer 16af4dEcZPb8Vkvh3ga56De" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/in"
);
const headers = {
"Authorization": "Bearer 16af4dEcZPb8Vkvh3ga56De",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "45f1f2e8-d09a-332b-97a5-61b05be65e12",
"name": "quasi nobis",
"default_validity_days": 718,
"requires_signature": false,
"numero_ca": "29193",
"product": null,
"available_quantity": null,
"created_at": null,
"updated_at": null
}
}
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.
Create EPI type
requires authentication epi store
Create a new EPI type
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/epi-types" \
--header "Authorization: Bearer 1aca6bD5e4P3E8gVZf6hvdk" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"default_validity_days\": 1,
\"requires_signature\": true,
\"numero_ca\": \"Example Numero ca\",
\"action\": \"Example Action\",
\"product_id\": \"2802fd96-0375-363b-9424-9c0074749743\",
\"product_family_id\": \"ae3b6cc0-82cb-31a2-bf69-4bc6a108e8d5\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types"
);
const headers = {
"Authorization": "Bearer 1aca6bD5e4P3E8gVZf6hvdk",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"default_validity_days": 1,
"requires_signature": true,
"numero_ca": "Example Numero ca",
"action": "Example Action",
"product_id": "2802fd96-0375-363b-9424-9c0074749743",
"product_family_id": "ae3b6cc0-82cb-31a2-bf69-4bc6a108e8d5"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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.
Link EPI types to catalog products in bulk
requires authentication epi update
Link several EPI types to catalog products at once, creating the product where it does not exist yet. All or nothing: one refusal rolls back the whole batch.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/epi-types/link-products" \
--header "Authorization: Bearer Zah1kEfd468be6cVa5gPD3v" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"epi_type_id\": \"ac97cac5-93ac-38a6-b367-18ddcf4c12f0\",
\"action\": \"Example Items * action\",
\"product_id\": \"20a1aea7-32f0-3a61-9574-f584c96c120b\",
\"product_family_id\": \"4b96d1ce-6c9b-3e49-8726-164eddd6863f\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/link-products"
);
const headers = {
"Authorization": "Bearer Zah1kEfd468be6cVa5gPD3v",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"epi_type_id": "ac97cac5-93ac-38a6-b367-18ddcf4c12f0",
"action": "Example Items * action",
"product_id": "20a1aea7-32f0-3a61-9574-f584c96c120b",
"product_family_id": "4b96d1ce-6c9b-3e49-8726-164eddd6863f"
},
null
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
Link an EPI type to a catalog product
requires authentication epi update
Link one EPI type to an existing product, or create the product from the EPI type name.
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/epi-types/quibusdam/product" \
--header "Authorization: Bearer hab3Eav1k4de56DZgcP6Vf8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"action\": \"Example Action\",
\"product_id\": \"cfea8774-231b-3b33-a59d-a5965608090e\",
\"product_family_id\": \"cb769bdf-707f-34fc-a6f0-9738ea171af9\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/quibusdam/product"
);
const headers = {
"Authorization": "Bearer hab3Eav1k4de56DZgcP6Vf8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"action": "Example Action",
"product_id": "cfea8774-231b-3b33-a59d-a5965608090e",
"product_family_id": "cb769bdf-707f-34fc-a6f0-9738ea171af9"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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 EPI type
requires authentication epi update
Update an EPI type
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/epi-types/sed" \
--header "Authorization: Bearer 3ba516Z6dPake4cvhE8DfVg" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"default_validity_days\": 1,
\"requires_signature\": true,
\"numero_ca\": \"Example Numero ca\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/sed"
);
const headers = {
"Authorization": "Bearer 3ba516Z6dPake4cvhE8DfVg",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"default_validity_days": 1,
"requires_signature": true,
"numero_ca": "Example Numero ca"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete EPI type
requires authentication epi delete
Delete an EPI type
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/epi-types/qui" \
--header "Authorization: Bearer 53c1akh46fgeZv8PDbadE6V" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/qui"
);
const headers = {
"Authorization": "Bearer 53c1akh46fgeZv8PDbadE6V",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Employee Roles
Endpoints for employee roles
List employee roles
requires authentication employee-role index
List all employee roles
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employee-roles?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Manager" \
--header "Authorization: Bearer bheDv84dkcEaa3V5PZg6f61" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employee-roles"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "Manager",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer bheDv84dkcEaa3V5PZg6f61",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "eb699d11-843d-4c50-ab91-3f4e5976ac36",
"name": "minus",
"description": "Occaecati sequi asperiores natus perferendis assumenda.",
"created_at": null,
"updated_at": null
},
{
"id": "8871aa91-4714-4548-ac4f-d14b092051e1",
"name": "ea",
"description": null,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Show employee role
requires authentication employee-role show
Show an employee role
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employee-roles/quo" \
--header "Authorization: Bearer Dc8kbg5dvh6E31ZePaf6a4V" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employee-roles/quo"
);
const headers = {
"Authorization": "Bearer Dc8kbg5dvh6E31ZePaf6a4V",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "62db63c9-5795-48bb-8965-8e1299b61c4d",
"name": "et",
"description": "Fuga molestiae sequi dolore incidunt aliquam doloribus et.",
"created_at": null,
"updated_at": null
}
}
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.
Create employee role
requires authentication employee-role store
Create a new employee role
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/employee-roles" \
--header "Authorization: Bearer baE6g3a8hP5kdZfe1VvcD46" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employee-roles"
);
const headers = {
"Authorization": "Bearer baE6g3a8hP5kdZfe1VvcD46",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 role
requires authentication employee-role update
Update an employee role
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/employee-roles/a" \
--header "Authorization: Bearer Vev56DhP6d3f8baa4kEZgc1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employee-roles/a"
);
const headers = {
"Authorization": "Bearer Vev56DhP6d3f8baa4kEZgc1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete employee role
requires authentication employee-role delete
Delete an employee role
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/employee-roles/quaerat" \
--header "Authorization: Bearer 6fdDg6avbZ51kPE34ae8chV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employee-roles/quaerat"
);
const headers = {
"Authorization": "Bearer 6fdDg6avbZ51kPE34ae8chV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Employees
Endpoints for employees
List EPI terms
requires authentication employee-epi index
List initial EPI kit terms globally
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/epi-terms" \
--header "Authorization: Bearer 36db4v6feaaVkcEPh5D18Zg" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"created_at\",
\"sort_desc\": false,
\"page\": 83,
\"per_page\": 7,
\"q\": \"ducimus\",
\"employee_id\": \"explicabo\",
\"has_term\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-terms"
);
const headers = {
"Authorization": "Bearer 36db4v6feaaVkcEPh5D18Zg",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "created_at",
"sort_desc": false,
"page": 83,
"per_page": 7,
"q": "ducimus",
"employee_id": "explicabo",
"has_term": false
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
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.
List employees
requires authentication employee index
List all employees
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employees?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Jo%C3%A3o+Silva&status=active&employee_roles[]=aut&admission_date_from=2026-01-01&admission_date_to=2026-12-31" \
--header "Authorization: Bearer k1aDhfecbE6v4Z5VaP8g36d" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "João Silva",
"status": "active",
"employee_roles[0]": "aut",
"admission_date_from": "2026-01-01",
"admission_date_to": "2026-12-31",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer k1aDhfecbE6v4Z5VaP8g36d",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "d0e4caf8-defc-45aa-8851-fd1ec1d3310d",
"name": "Dr. Andres Esteves Rocha",
"cpf": "867.897.553-26",
"rg": "784239244",
"ctps": "099741685",
"phone": null,
"birthdate": null,
"email": null,
"pis_pasep": null,
"admission_date": "1996-06-16",
"daily_salary": null,
"monthly_salary": "3580.27",
"nationality": "Reino Unido",
"place_of_birth": "Salgado do Norte",
"status": "active",
"status_label": "Ativo",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"employee_role": {
"id": "a32930d3-c4bf-41a3-80c0-93b3c68f3ed7",
"name": "a"
},
"created_at": null,
"updated_at": null
},
{
"id": "91ee0370-4ebf-4ec2-8b37-ea517757e22e",
"name": "Paulina Delvalle Aragão Neto",
"cpf": "963.783.762-76",
"rg": "587816859",
"ctps": null,
"phone": "(34) 92267-6535",
"birthdate": null,
"email": "nfaria@example.org",
"pis_pasep": null,
"admission_date": "1972-02-17",
"daily_salary": "337.81",
"monthly_salary": "5509.60",
"nationality": "Granada",
"place_of_birth": "Lorena do Norte",
"status": "active",
"status_label": "Ativo",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"employee_role": {
"id": "a32930d3-c78b-4c99-8146-22b88e228452",
"name": "excepturi"
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": "/?page=82",
"next": null
},
"meta": {
"current_page": 83,
"from": 821,
"last_page": 1,
"links": [
{
"url": "/?page=82",
"label": "« Anterior",
"page": 82,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": false
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 822,
"total": 2
}
}
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.
Export employees to Excel
requires authentication employee export
Dispatches async Excel generation using the same filters as the listing. Frontend is notified via Pusher when ready.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employees/excel?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Jo%C3%A3o+Silva&status=active&employee_roles[]=adipisci&admission_date_from=2026-01-01&admission_date_to=2026-12-31" \
--header "Authorization: Bearer 6dP3fZheaVv5gE4Dk6c1b8a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/excel"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "João Silva",
"status": "active",
"employee_roles[0]": "adipisci",
"admission_date_from": "2026-01-01",
"admission_date_to": "2026-12-31",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 6dP3fZheaVv5gE4Dk6c1b8a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (202):
{
"message": "string",
"channel": "string",
"event": "string"
}
Example response (422):
{
"message": "string"
}
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.
Show employee
requires authentication employee show
Show an employee
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employees/14" \
--header "Authorization: Bearer 5EZ4cbavVad6e8h6PD3gf1k" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/14"
);
const headers = {
"Authorization": "Bearer 5EZ4cbavVad6e8h6PD3gf1k",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "5562c256-0a47-47f6-b532-3fca001131e0",
"name": "Pedro Quintana Saito Jr.",
"cpf": "779.215.532-11",
"rg": null,
"ctps": "104218161",
"phone": "(91) 98093-8287",
"birthdate": null,
"email": "mari93@example.org",
"pis_pasep": null,
"admission_date": "2025-08-28",
"daily_salary": null,
"monthly_salary": null,
"nationality": "Botsuana",
"place_of_birth": null,
"status": "active",
"status_label": "Ativo",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"employee_role": {
"id": "a32930d3-d26a-4aa4-84d2-e31bb7f77b4b",
"name": "dolorem"
},
"created_at": null,
"updated_at": null
}
}
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.
Create employee
requires authentication employee store
Create a new employee
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/employees" \
--header "Authorization: Bearer a6fePV8dD5EZv4361gabhck" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"cpf\": \"Example Cpf\",
\"rg\": \"Example Rg\",
\"ctps\": \"Example Ctps\",
\"phone\": \"(11) 99999-9999\",
\"birthdate\": \"2024-01-01\",
\"email\": \"user@example.com\",
\"employee_role_id\": \"76a98e89-a78e-44ad-a79e-f3c883325589\",
\"pis_pasep\": \"Example Pis pasep\",
\"admission_date\": \"2024-01-01\",
\"daily_salary\": 1,
\"monthly_salary\": 1,
\"nationality\": \"Example Nationality\",
\"place_of_birth\": \"Example Place of birth\",
\"address\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"street\": \"Example Address street\",
\"number\": \"Example Address number\",
\"complement\": \"Example Address complement\",
\"neighborhood\": \"Example Address neighborhood\",
\"city\": \"Example Address city\",
\"state\": \"Example Address state\",
\"zip_code\": \"Example Address zip code\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees"
);
const headers = {
"Authorization": "Bearer a6fePV8dD5EZv4361gabhck",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"cpf": "Example Cpf",
"rg": "Example Rg",
"ctps": "Example Ctps",
"phone": "(11) 99999-9999",
"birthdate": "2024-01-01",
"email": "user@example.com",
"employee_role_id": "76a98e89-a78e-44ad-a79e-f3c883325589",
"pis_pasep": "Example Pis pasep",
"admission_date": "2024-01-01",
"daily_salary": 1,
"monthly_salary": 1,
"nationality": "Example Nationality",
"place_of_birth": "Example Place of birth",
"address": {
"0": "example1",
"1": "example2",
"street": "Example Address street",
"number": "Example Address number",
"complement": "Example Address complement",
"neighborhood": "Example Address neighborhood",
"city": "Example Address city",
"state": "Example Address state",
"zip_code": "Example Address zip code"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "d4242a28-54cf-4c3b-a238-9038e02fc161",
"name": "Yuri Sales Jr.",
"cpf": "101.433.457-09",
"rg": null,
"ctps": "384887878",
"phone": null,
"birthdate": "1980-08-08",
"email": "sepulveda.joao@example.com",
"pis_pasep": null,
"admission_date": "1973-09-14",
"daily_salary": "471.13",
"monthly_salary": "6613.67",
"nationality": null,
"place_of_birth": null,
"status": "active",
"status_label": "Ativo",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"employee_role": {
"id": "a32930d3-dad0-4255-8cea-214680db3df6",
"name": "fugiat"
},
"created_at": null,
"updated_at": null
}
}
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
requires authentication employee update
Update an employee
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/employees/16" \
--header "Authorization: Bearer 8Vecg46fakh3a1d5P6EbvDZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"cpf\": \"Example Cpf\",
\"rg\": \"Example Rg\",
\"ctps\": \"Example Ctps\",
\"phone\": \"(11) 99999-9999\",
\"birthdate\": \"2024-01-01\",
\"email\": \"user@example.com\",
\"employee_role_id\": \"f7b0f3eb-2c6a-4c6f-926c-702755fcc06c\",
\"pis_pasep\": \"Example Pis pasep\",
\"admission_date\": \"2024-01-01\",
\"daily_salary\": 1,
\"monthly_salary\": 1,
\"nationality\": \"Example Nationality\",
\"place_of_birth\": \"Example Place of birth\",
\"address\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"street\": \"Example Address street\",
\"number\": \"Example Address number\",
\"complement\": \"Example Address complement\",
\"neighborhood\": \"Example Address neighborhood\",
\"city\": \"Example Address city\",
\"state\": \"Example Address state\",
\"zip_code\": \"Example Address zip code\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/16"
);
const headers = {
"Authorization": "Bearer 8Vecg46fakh3a1d5P6EbvDZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"cpf": "Example Cpf",
"rg": "Example Rg",
"ctps": "Example Ctps",
"phone": "(11) 99999-9999",
"birthdate": "2024-01-01",
"email": "user@example.com",
"employee_role_id": "f7b0f3eb-2c6a-4c6f-926c-702755fcc06c",
"pis_pasep": "Example Pis pasep",
"admission_date": "2024-01-01",
"daily_salary": 1,
"monthly_salary": 1,
"nationality": "Example Nationality",
"place_of_birth": "Example Place of birth",
"address": {
"0": "example1",
"1": "example2",
"street": "Example Address street",
"number": "Example Address number",
"complement": "Example Address complement",
"neighborhood": "Example Address neighborhood",
"city": "Example Address city",
"state": "Example Address state",
"zip_code": "Example Address zip code"
}
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Dismiss employee
requires authentication employee employment
Register the dismissal of an active employee
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32/dismiss" \
--header "Authorization: Bearer k6v8aEDe5f1db3Z6VPacg4h" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"dismissal_date\": \"2026-11-06\",
\"dismissal_reason\": \"resignation\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32/dismiss"
);
const headers = {
"Authorization": "Bearer k6v8aEDe5f1db3Z6VPacg4h",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"dismissal_date": "2026-11-06",
"dismissal_reason": "resignation"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "96eff785-6423-460c-ba2f-d07486480343",
"name": "Suelen Branco Valentin",
"cpf": "939.808.916-94",
"rg": "531465651",
"ctps": null,
"phone": null,
"birthdate": null,
"email": "edilson.delatorre@example.org",
"pis_pasep": "33055624041",
"admission_date": "1999-03-01",
"daily_salary": "362.62",
"monthly_salary": null,
"nationality": "Israel",
"place_of_birth": "Cervantes do Sul",
"status": "active",
"status_label": "Ativo",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"employee_role": {
"id": "a32930d3-e83f-4281-8640-436017acd75a",
"name": "aut"
},
"created_at": null,
"updated_at": null
}
}
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.
Rehire employee
requires authentication employee employment
Rehire an inactive employee with a new admission date
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32/rehire" \
--header "Authorization: Bearer 61gkaZV8cbePvh634DfaEd5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"admission_date\": \"2026-11-06\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32/rehire"
);
const headers = {
"Authorization": "Bearer 61gkaZV8cbePvh634DfaEd5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"admission_date": "2026-11-06"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "dcdebc9d-1f11-4a2a-bbba-6f3e6eb4a8bc",
"name": "Esther Torres",
"cpf": "634.245.989-80",
"rg": "159052284",
"ctps": null,
"phone": null,
"birthdate": null,
"email": null,
"pis_pasep": null,
"admission_date": "2001-10-19",
"daily_salary": null,
"monthly_salary": "3266.28",
"nationality": "Maldivas",
"place_of_birth": "Vila Clara d'Oeste",
"status": "active",
"status_label": "Ativo",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"employee_role": {
"id": "a32930d3-ed67-439a-969b-d593f552a11a",
"name": "corrupti"
},
"created_at": null,
"updated_at": null
}
}
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.
Delete employee
requires authentication employee delete
Delete an employee
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer aVfD16PZeda6Ekbg8345chv" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer aVfD16PZeda6Ekbg8345chv",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
List employee bank accounts
requires authentication employee-bank-account index
List all bank accounts for an employee
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employees/16/bank-account" \
--header "Authorization: Bearer 4c81aghav6dE65fVkbe3ZDP" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/16/bank-account"
);
const headers = {
"Authorization": "Bearer 4c81aghav6dE65fVkbe3ZDP",
"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
vary: Origin
{
"message": "Unauthenticated."
}
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.
Create employee bank account
requires authentication employee-bank-account store
Add a bank account to an employee
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/employees/10/bank-account" \
--header "Authorization: Bearer a81kev6h36PZ5bEDdfa4cVg" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_id\": \"eum\",
\"agency\": \"pt\",
\"account\": \"yjpagtukalszmpux\",
\"account_type\": \"corrente\",
\"pix_key\": \"ckwxvfpjyezkjfmbtjgvp\",
\"favorite\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/10/bank-account"
);
const headers = {
"Authorization": "Bearer a81kev6h36PZ5bEDdfa4cVg",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_id": "eum",
"agency": "pt",
"account": "yjpagtukalszmpux",
"account_type": "corrente",
"pix_key": "ckwxvfpjyezkjfmbtjgvp",
"favorite": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
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 bank account
requires authentication employee-bank-account update
Update a bank account for an employee
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/employees/13/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33" \
--header "Authorization: Bearer kePZc6gfaE1hV5abDv346d8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_id\": \"labore\",
\"agency\": \"kfooyxe\",
\"account\": \"hbzmhfphajldkyjg\",
\"account_type\": \"corrente\",
\"pix_key\": \"fyg\",
\"favorite\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/13/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33"
);
const headers = {
"Authorization": "Bearer kePZc6gfaE1hV5abDv346d8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_id": "labore",
"agency": "kfooyxe",
"account": "hbzmhfphajldkyjg",
"account_type": "corrente",
"pix_key": "fyg",
"favorite": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
Delete employee bank account
requires authentication employee-bank-account delete
Delete a bank account from an employee
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33" \
--header "Authorization: Bearer 3Vf41Zbaa6gEvdDk8e6hcP5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33"
);
const headers = {
"Authorization": "Bearer 3Vf41Zbaa6gEvdDk8e6hcP5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
List employee EPI deliveries
requires authentication employee-epi index
List EPI deliveries for an employee
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employees/6/epi-deliveries" \
--header "Authorization: Bearer 6D1adea5fE468V3cbhZkPvg" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"et\",
\"status\": \"expiring\",
\"epi_type_id\": \"tempora\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/6/epi-deliveries"
);
const headers = {
"Authorization": "Bearer 6D1adea5fE468V3cbhZkPvg",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "et",
"status": "expiring",
"epi_type_id": "tempora"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
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.
Pending EPI renewals count
requires authentication employee-epi index
Count of pending EPI renewals for an employee
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employees/voluptate/epi-deliveries/pending-renewals-count" \
--header "Authorization: Bearer Vhc5P1Zakde468fD6agEb3v" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/voluptate/epi-deliveries/pending-renewals-count"
);
const headers = {
"Authorization": "Bearer Vhc5P1Zakde468fD6agEb3v",
"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
vary: Origin
{
"message": "Unauthenticated."
}
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.
Show employee EPI delivery
requires authentication employee-epi show
Show an EPI delivery for an employee
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employees/19/epi-deliveries/sit" \
--header "Authorization: Bearer bDaZPe81h5kVd6vac34gfE6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/19/epi-deliveries/sit"
);
const headers = {
"Authorization": "Bearer bDaZPe81h5kVd6vac34gfE6",
"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
vary: Origin
{
"message": "Unauthenticated."
}
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.
Create employee EPI delivery
requires authentication employee-epi store
Register an EPI delivery for an employee
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/employees/17/epi-deliveries" \
--header "Authorization: Bearer c1ZfDPag83k5a6dvEe4b6hV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"epi_type_id\": \"e08096cf-6a76-362f-b279-1d45b11fb796\",
\"delivery_date\": \"2024-01-01\",
\"quantity\": 1,
\"condition\": \"Example Condition\",
\"delivered_by_employee_id\": \"39f0a5e8-66e6-49cd-b603-6c12aca18f4f\",
\"stock_id\": \"0c26143e-b7b0-3a1e-99a3-e316e093f288\",
\"confirm_insufficient_stock\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/17/epi-deliveries"
);
const headers = {
"Authorization": "Bearer c1ZfDPag83k5a6dvEe4b6hV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"epi_type_id": "e08096cf-6a76-362f-b279-1d45b11fb796",
"delivery_date": "2024-01-01",
"quantity": 1,
"condition": "Example Condition",
"delivered_by_employee_id": "39f0a5e8-66e6-49cd-b603-6c12aca18f4f",
"stock_id": "0c26143e-b7b0-3a1e-99a3-e316e093f288",
"confirm_insufficient_stock": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
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.
Create employee initial EPI kit
requires authentication employee-epi kit
Register multiple EPI deliveries as initial kit
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/employees/dolor/epi-deliveries/kit" \
--header "Authorization: Bearer hd46vakc85E36feDbPgaZV1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"delivery_date\": \"2024-01-01\",
\"is_kit_initial\": true,
\"show_epi_receipt_text\": true,
\"delivered_by_employee_id\": \"ced8afdd-f457-4849-b822-8edc3e73a311\",
\"stock_id\": \"6b4c1a36-72b8-3eb7-a091-72094e15fcb1\",
\"confirm_insufficient_stock\": true,
\"items\": [
{
\"epi_type_id\": \"605ca0ca-0f5a-3515-aaab-cdabb21aefa1\",
\"quantity\": 1,
\"condition\": \"Example Items * condition\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/dolor/epi-deliveries/kit"
);
const headers = {
"Authorization": "Bearer hd46vakc85E36feDbPgaZV1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"delivery_date": "2024-01-01",
"is_kit_initial": true,
"show_epi_receipt_text": true,
"delivered_by_employee_id": "ced8afdd-f457-4849-b822-8edc3e73a311",
"stock_id": "6b4c1a36-72b8-3eb7-a091-72094e15fcb1",
"confirm_insufficient_stock": true,
"items": [
{
"epi_type_id": "605ca0ca-0f5a-3515-aaab-cdabb21aefa1",
"quantity": 1,
"condition": "Example Items * condition"
},
null
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
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.
Promote EPI delivery to kit
requires authentication employee-epi kit
Turn a standalone EPI delivery into a single-item kit so it can generate the acknowledgement term. Idempotent: a delivery already belonging to a kit is returned unchanged.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/employees/accusamus/epi-deliveries/mollitia/promote-to-kit" \
--header "Authorization: Bearer eEcg8ad4hkf1bD3P66aVv5Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/accusamus/epi-deliveries/mollitia/promote-to-kit"
);
const headers = {
"Authorization": "Bearer eEcg8ad4hkf1bD3P66aVv5Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());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 EPI delivery
requires authentication employee-epi update
Update an EPI delivery for an employee
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/employees/15/epi-deliveries/aperiam" \
--header "Authorization: Bearer Zcv65aka14PEh3dfV8g6bDe" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"epi_type_id\": \"9af91db5-4d86-35d9-813a-6e2714dab687\",
\"delivery_date\": \"2024-01-01\",
\"quantity\": 1,
\"condition\": \"Example Condition\",
\"delivered_by_employee_id\": \"03ba4a0c-d7cf-4eb8-a32c-7cb4b3a58d5a\",
\"stock_id\": \"069a1d42-2345-3196-b642-6393d769c2b8\",
\"confirm_insufficient_stock\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/15/epi-deliveries/aperiam"
);
const headers = {
"Authorization": "Bearer Zcv65aka14PEh3dfV8g6bDe",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"epi_type_id": "9af91db5-4d86-35d9-813a-6e2714dab687",
"delivery_date": "2024-01-01",
"quantity": 1,
"condition": "Example Condition",
"delivered_by_employee_id": "03ba4a0c-d7cf-4eb8-a32c-7cb4b3a58d5a",
"stock_id": "069a1d42-2345-3196-b642-6393d769c2b8",
"confirm_insufficient_stock": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
Delete employee EPI delivery
requires authentication employee-epi delete
Delete an EPI delivery from an employee
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/employees/cupiditate/epi-deliveries/accusantium" \
--header "Authorization: Bearer 1v6f4cg85a3ebDPhZkdVaE6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/cupiditate/epi-deliveries/accusantium"
);
const headers = {
"Authorization": "Bearer 1v6f4cg85a3ebDPhZkdVaE6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
List employee EPI terms
requires authentication employee-epi index
List initial EPI kit terms for an employee
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employees/8/epi-terms" \
--header "Authorization: Bearer 5gZcfkVa3a6e8vb4E6d1DhP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"delivery_date\",
\"sort_desc\": false,
\"page\": 58,
\"per_page\": 23,
\"q\": \"accusamus\",
\"employee_id\": \"doloribus\",
\"has_term\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/8/epi-terms"
);
const headers = {
"Authorization": "Bearer 5gZcfkVa3a6e8vb4E6d1DhP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "delivery_date",
"sort_desc": false,
"page": 58,
"per_page": 23,
"q": "accusamus",
"employee_id": "doloribus",
"has_term": true
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
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.
Upload signed EPI term
requires authentication employee-epi update
Upload signed Termo de Ciência for an initial kit
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/employees/natus/epi-terms/0f94cbf9-e509-3e37-836a-eddfd860a4d0/upload" \
--header "Authorization: Bearer 6dZ15h4ED3ak8gPevbcaV6f" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"file\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example File path\",
\"name\": \"Example Name\",
\"extension\": \"Example File extension\",
\"size\": \"Example File size\",
\"mime_type\": \"Example File mime type\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/natus/epi-terms/0f94cbf9-e509-3e37-836a-eddfd860a4d0/upload"
);
const headers = {
"Authorization": "Bearer 6dZ15h4ED3ak8gPevbcaV6f",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"file": {
"0": "example1",
"1": "example2",
"path": "Example File path",
"name": "Example Name",
"extension": "Example File extension",
"size": "Example File size",
"mime_type": "Example File mime type"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
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.
Download signed EPI term
requires authentication employee-epi show
Get temporary download URL for signed term
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employees/magnam/epi-terms/c9c510dd-a25e-3ae0-afd6-e7e3fe32927c/document" \
--header "Authorization: Bearer Pv5V18hf4Ze6k6dbaaDcg3E" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/magnam/epi-terms/c9c510dd-a25e-3ae0-afd6-e7e3fe32927c/document"
);
const headers = {
"Authorization": "Bearer Pv5V18hf4Ze6k6dbaaDcg3E",
"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
vary: Origin
{
"message": "Unauthenticated."
}
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/up
No specific permission required
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/up" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/up"
);
const headers = {
"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
vary: Origin
{
"message": "API is running"
}
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.
Files
Endpoints for files
Delete file
requires authentication No specific permission required
Delete a file
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/files/61068509-6c69-31ce-be29-a34e4e47b3ec" \
--header "Authorization: Bearer gaVb6fcZ3D8kPh6d5Evea41" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/61068509-6c69-31ce-be29-a34e4e47b3ec"
);
const headers = {
"Authorization": "Bearer gaVb6fcZ3D8kPh6d5Evea41",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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 file info
requires authentication No specific permission required
Get file information
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/files/54fd0540-eb2e-3688-be45-b11189e97c00/info" \
--header "Authorization: Bearer h16ab4f3DevadPE8k6ZgcV5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/54fd0540-eb2e-3688-be45-b11189e97c00/info"
);
const headers = {
"Authorization": "Bearer h16ab4f3DevadPE8k6ZgcV5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"uuid": "string",
"name": "string",
"size": "integer",
"type": "string",
"extension": "string",
"path": "string"
}
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.
Generate download URL
requires authentication No specific permission required
Generate a signed URL for downloading a file
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/files/34cd6af3-8aa4-3004-b704-61dec859e57f/download" \
--header "Authorization: Bearer af4ZbgEca51Dv8dkh6e6V3P" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/34cd6af3-8aa4-3004-b704-61dec859e57f/download"
);
const headers = {
"Authorization": "Bearer af4ZbgEca51Dv8dkh6e6V3P",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"url": "string",
"filename": "string",
"size": "integer",
"type": "string"
}
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.
Generate upload URL
requires authentication No specific permission required
Generate a signed URL for uploading a file
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/files/generate-upload-url" \
--header "Authorization: Bearer 5EPa483g16VfcbkDZ6ehvad" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"path\": \"Example Path\",
\"mimetype\": \"Example Mimetype\",
\"public\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/generate-upload-url"
);
const headers = {
"Authorization": "Bearer 5EPa483g16VfcbkDZ6ehvad",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"path": "Example Path",
"mimetype": "Example Mimetype",
"public": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"url": "string",
"path": "string",
"headers": "array"
}
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.
Generate bulk upload URL
requires authentication No specific permission required
Generate signed URLs for uploading multiple files
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/files/generate-bulk-upload-url" \
--header "Authorization: Bearer f3vbdh6c8Zka1a4Ve5gPDE6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"files\": [
{
\"path\": \"Example Files * path\",
\"mimetype\": \"Example Files * mimetype\",
\"public\": true
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/generate-bulk-upload-url"
);
const headers = {
"Authorization": "Bearer f3vbdh6c8Zka1a4Ve5gPDE6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"files": [
{
"path": "Example Files * path",
"mimetype": "Example Files * mimetype",
"public": true
},
null
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
[
{
"url": "string",
"path": "string",
"headers": "array"
}
]
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.
Fiscal Documents
Endpoints para gerenciar notas fiscais (arquivos XML/PDF e vínculo com obras).
List fiscal documents
requires authentication fiscal-documents index
Lista notas fiscais com filtros por busca, fornecedor, obra e período.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/fiscal-documents" \
--header "Authorization: Bearer g4k866vP5fbhaaEZDV1ced3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"sint\",
\"document_type\": \"nfse\",
\"supplier_id\": \"quasi\",
\"work_id\": \"expedita\",
\"products_status\": \"imported\",
\"financial_status\": \"partial\",
\"start_date\": \"2026-11-06T10:51:22\",
\"end_date\": \"2102-08-26\",
\"per_page\": 1
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);
const headers = {
"Authorization": "Bearer g4k866vP5fbhaaEZDV1ced3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "sint",
"document_type": "nfse",
"supplier_id": "quasi",
"work_id": "expedita",
"products_status": "imported",
"financial_status": "partial",
"start_date": "2026-11-06T10:51:22",
"end_date": "2102-08-26",
"per_page": 1
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "0a7fe729-b05d-3b09-a5b6-83c016b49df0",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "66369658210920626616850626191375936510374070",
"nfe_number": "623099",
"nfe_series": "81",
"issue_date": "1996-08-18T03:00:00.000000Z",
"total_value": "4846.04",
"emit": {
"cnpj": "69938393460533",
"name": "Marks and Sons"
},
"dest": {
"document": "81611966953166",
"name": "Mueller, O'Reilly and Sipes"
},
"supplier": {
"id": "a32930d5-61f3-4f13-803d-eb36a8458833",
"name": "Gabriela Vale Brito Jr.",
"document": "58.577.372/0001-65"
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
},
{
"id": "b4b8ad2f-ac9a-3acc-8bdb-e3763ac8f826",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "87959845812047182068845550458780681930572066",
"nfe_number": "889916",
"nfe_series": "25",
"issue_date": "2005-11-07T02:00:00.000000Z",
"total_value": "4960.76",
"emit": {
"cnpj": "56702056330527",
"name": "Mayert, Flatley and Bradtke"
},
"dest": {
"document": "16788732409377",
"name": "Maggio-Bogisich"
},
"supplier": {
"id": "a32930d5-666c-4226-a5b2-eae02c04aa62",
"name": "Nicolas Teles Serra Sobrinho",
"document": "83.364.484/0001-85"
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 15,
"to": 2,
"total": 2
}
}
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.
Create fiscal document
requires authentication fiscal-documents store
Registra uma NFe a partir do XML já enviado ao S3 e o vincula às obras informadas.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents" \
--header "Authorization: Bearer gve145Da36PVbhZ6dkEca8f" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"s3_file_path\": \"quaerat\",
\"original_filename\": \".xml$\\/i\",
\"work_ids\": [
\"molestiae\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);
const headers = {
"Authorization": "Bearer gve145Da36PVbhZ6dkEca8f",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"s3_file_path": "quaerat",
"original_filename": ".xml$\/i",
"work_ids": [
"molestiae"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "2f31f252-9c25-3fdf-9327-da43f106fac2",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "56196392581327136375108925994469601698668213",
"nfe_number": "857760",
"nfe_series": "22",
"issue_date": "2016-04-24T03:00:00.000000Z",
"total_value": "3945.57",
"emit": {
"cnpj": "35444233611718",
"name": "Bechtelar LLC"
},
"dest": {
"document": "36892364412303",
"name": "Wilkinson Inc"
},
"supplier": {
"id": "a32930d5-6fec-4f06-90f7-84ced41edb58",
"name": "Sérgio Mendonça Filho",
"document": "32.937.856/0001-84"
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
}
}
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 fiscal document
requires authentication fiscal-documents show
Detalha uma nota fiscal com arquivos e obras vinculadas.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/fiscal-documents/facilis" \
--header "Authorization: Bearer Pv384cbhda1fak5gE6DV6eZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/facilis"
);
const headers = {
"Authorization": "Bearer Pv384cbhda1fak5gE6DV6eZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "463d50f4-dda9-378f-b411-f4a4bd94791c",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "31461314734652748779860953153220900808263052",
"nfe_number": "803683",
"nfe_series": "81",
"issue_date": "1990-11-17T02:00:00.000000Z",
"total_value": "7585.00",
"emit": {
"cnpj": "51433126506040",
"name": "Berge-Stehr"
},
"dest": {
"document": "82890690965082",
"name": "Kiehn, Lemke and Moore"
},
"supplier": {
"id": "a32930d5-7877-406b-b4f8-18b014bb497c",
"name": "Srta. Bella Cervantes Padrão Neto",
"document": "11.741.078/0001-83"
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
}
}
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.
Fiscal document by cost center
requires authentication fiscal-documents show
Distribui a nota por centro de custo. NF-e de produto sai do estoque: o que a vinculação dos itens lançou em cada estoque de obra (quantidade × preço do lote, o mesmo cálculo do custo apropriado do painel), o que foi para o estoque principal e o que ainda não foi integrado. NFS-e sai das parcelas, pelo centro da conta gerada. As linhas somam o total da nota; a diferença vai para other_values, que pode ser negativo quando há desconto. Linhas zeradas são omitidas.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/fiscal-documents/corrupti/cost-centers" \
--header "Authorization: Bearer akcE68gf3D1ev5dPV6haZ4b" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/corrupti/cost-centers"
);
const headers = {
"Authorization": "Bearer akcE68gf3D1ev5dPV6haZ4b",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"total": "5074.19",
"source": "stock",
"rows": [
{
"kind": "cost_center",
"cost_center": {
"id": "uuid",
"code": "002.001",
"name": "Residencial Vila Nova"
},
"amount": "2100.00",
"share": 41.39
},
{
"kind": "work_without_cost_center",
"work": {
"id": "uuid",
"name": "Reforma Centro"
},
"amount": "474.19",
"share": 9.35
},
{
"kind": "main_stock",
"cost_center": {
"id": "uuid",
"code": "003.001",
"name": "Estoque central"
},
"amount": "1500.00",
"share": 29.56
},
{
"kind": "not_integrated",
"amount": "900.00",
"share": 17.74
},
{
"kind": "other_values",
"amount": "100.00",
"share": 1.97
}
]
}
}
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.
Delete fiscal document
requires authentication fiscal-documents delete
Exclui definitivamente uma nota fiscal. Não permitido quando a nota já gerou parcelas no financeiro ou já teve produtos importados.
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/autem" \
--header "Authorization: Bearer 3gZdEcve1fb64DVa6Pah58k" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/autem"
);
const headers = {
"Authorization": "Bearer 3gZdEcve1fb64DVa6Pah58k",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204, Nota fiscal excluída.):
Empty response
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.
Attach file
requires authentication fiscal-documents update
Anexa um arquivo (ex.: PDF da NF) já enviado ao S3 à nota fiscal.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/repudiandae/files" \
--header "Authorization: Bearer Ehak5dZv341c6bgD6af8ePV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"file\": {
\"path\": \"qui\",
\"name\": \"expedita\",
\"extension\": \"dignissimos\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/repudiandae/files"
);
const headers = {
"Authorization": "Bearer Ehak5dZv341c6bgD6af8ePV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"file": {
"path": "qui",
"name": "expedita",
"extension": "dignissimos"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "623620be-a4f6-3137-8933-854f3b122216",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "97696546987138462423591707667918829690135692",
"nfe_number": "943086",
"nfe_series": "94",
"issue_date": "2013-03-24T03:00:00.000000Z",
"total_value": "5692.15",
"emit": {
"cnpj": "95055498854719",
"name": "Grant Group"
},
"dest": {
"document": "59493326281157",
"name": "Treutel Group"
},
"supplier": {
"id": "a32930d5-85d7-4c70-a3c8-fc47bf395e0a",
"name": "Sr. Inácio Salazar Filho",
"document": "28.119.898/0001-30"
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
}
}
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.
Detach file
requires authentication fiscal-documents update
Remove definitivamente um anexo da nota fiscal, inclusive o objeto no S3. O XML original da NFe não pode ser removido.
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/eligendi/files/quis" \
--header "Authorization: Bearer vD1VP5hf836eZcEkda6gab4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/eligendi/files/quis"
);
const headers = {
"Authorization": "Bearer vD1VP5hf836eZcEkda6gab4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "ac5af093-13d5-3941-afe4-6ecd84657aba",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "85675436946779118260567895548871307345002396",
"nfe_number": "757254",
"nfe_series": "39",
"issue_date": "1980-07-02T03:00:00.000000Z",
"total_value": "8764.10",
"emit": {
"cnpj": "24050375123649",
"name": "Sawayn-Streich"
},
"dest": {
"document": "81346209051531",
"name": "Crist, Legros and Runte"
},
"supplier": {
"id": "a32930d5-8e0a-444e-b90f-6c098aaa3d5e",
"name": "Wellington Mascarenhas",
"document": "87.380.030/0001-59"
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
}
}
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.
Sync works
requires authentication fiscal-documents update
Sincroniza o vínculo documental da nota fiscal com N obras.
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/qui/works" \
--header "Authorization: Bearer 6E13khZV4vgdcf658aaeDbP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"work_ids\": [
\"iure\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/qui/works"
);
const headers = {
"Authorization": "Bearer 6E13khZV4vgdcf658aaeDbP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"work_ids": [
"iure"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "8979c8e2-71b5-3cb3-92a1-b3353e56e138",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "89348518528009457370640205435321529402941978",
"nfe_number": "990487",
"nfe_series": "86",
"issue_date": "1981-05-18T03:00:00.000000Z",
"total_value": "701.52",
"emit": {
"cnpj": "72167924908563",
"name": "Jacobson-Nader"
},
"dest": {
"document": "97492669966756",
"name": "Tillman-Luettgen"
},
"supplier": {
"id": "a32930d5-9948-47ab-8853-f3fa4ab1889b",
"name": "Josefina Fernanda Urias Neto",
"document": "84.719.212/0001-13"
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
}
}
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.
Create installment
requires authentication fiscal-documents update
Lança uma cobrança avulsa na nota fiscal, para o boleto que o fornecedor cobra além das duplicatas do XML. Nasce pendente e sem conta no financeiro; a geração continua sendo pelo import-nfe.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/excepturi/installments" \
--header "Authorization: Bearer dhg6fav1E6ZPbe3D548ackV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"due_date\": \"2024-01-01\",
\"amount\": 1,
\"number\": \"Example Number\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/excepturi/installments"
);
const headers = {
"Authorization": "Bearer dhg6fav1E6ZPbe3D548ackV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"due_date": "2024-01-01",
"amount": 1,
"number": "Example Number"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "3b354a9e-1559-36cb-9c7d-955846ce061c",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "79528764466865541285650736950061621310050634",
"nfe_number": "472511",
"nfe_series": "39",
"issue_date": "2012-04-06T03:00:00.000000Z",
"total_value": "1460.36",
"emit": {
"cnpj": "88013519602282",
"name": "Kuhic Group"
},
"dest": {
"document": "82965509907868",
"name": "Turcotte, Beier and Schumm"
},
"supplier": {
"id": "a32930d5-a158-4f8b-972d-581386bcd6c8",
"name": "Enzo Ferraz Sandoval Neto",
"document": "55.576.461/0001-07"
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
}
}
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.
Import
Endpoints for managing NFe imports and product processing.
NFe Imports
Import and process Brazilian electronic invoice (NFe) files.
Create NFe Import
requires authentication imports store
Upload and process a Brazilian NFe (Nota Fiscal Eletrônica) XML file. The file should be uploaded to S3 first, then this endpoint processes it asynchronously.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/imports/nfe/products" \
--header "Authorization: Bearer 3Ze41gkb65vfacD6PEah8Vd" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"s3_file_path\": \"imports\\/nfe_12345.xml\",
\"original_filename\": \"nota_fiscal_001.xml\",
\"import_type\": \"nfe\",
\"fiscal_document_id\": \"9b60ff33-173f-3902-b49b-227db1d59ff2\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/nfe/products"
);
const headers = {
"Authorization": "Bearer 3Ze41gkb65vfacD6PEah8Vd",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"s3_file_path": "imports\/nfe_12345.xml",
"original_filename": "nota_fiscal_001.xml",
"import_type": "nfe",
"fiscal_document_id": "9b60ff33-173f-3902-b49b-227db1d59ff2"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201, Import created successfully):
{
"import_id": "9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a",
"status": "pending",
"channel": "import-progress.9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a"
}
Example response (404, File not found in S3):
{
"error": "Arquivo não encontrado no S3"
}
Example response (422, Invalid XML or not a valid NFe):
{
"error": "Arquivo XML inválido ou não é uma NFe"
}
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.
List Imports
requires authentication imports index
List all NFe imports with filtering and pagination options.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/imports?sort_by=created_at&sort_desc=1&page=1&per_page=15&status=completed&import_type=nfe" \
--header "Authorization: Bearer gcbahdvZ8aVkP164e3Df6E5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"status": "completed",
"import_type": "nfe",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer gcbahdvZ8aVkP164e3Df6E5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Imports retrieved successfully):
{
"data": [
{
"id": "9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a",
"status": "completed",
"import_type": "nfe",
"original_filename": "nota_fiscal_001.xml",
"nfe_number": "123456",
"nfe_date": "2023-12-01",
"total_products": 15,
"processed_products": 15,
"progress_percentage": 100,
"imported_at": "2023-12-01T10:30:00.000Z",
"supplier": {
"name": "Fornecedor Ltda",
"document": "12345678000199"
}
}
]
}
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 Import Details
requires authentication imports show
Retrieve detailed information about a specific NFe import, including progress and supplier data.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/imports/soluta" \
--header "Authorization: Bearer kPv46aDd6a8Zge3c5fb1hEV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/soluta"
);
const headers = {
"Authorization": "Bearer kPv46aDd6a8Zge3c5fb1hEV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Import details retrieved successfully):
{
"import_id": "9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a",
"status": "completed",
"import_type": "nfe",
"original_filename": "nota_fiscal_001.xml",
"nfe_number": "123456",
"nfe_date": "2023-12-01",
"total_products": 15,
"processed_products": 10,
"progress_percentage": 66.67,
"auto_linked_count": 4,
"stock_launched_count": 7,
"pending_stock_launch_count": 3,
"imported_by": "João Silva",
"imported_at": "2023-12-01T10:30:00.000Z",
"supplier": {
"id": "supplier-uuid",
"name": "Fornecedor Ltda",
"document": "12345678000199"
},
"fiscal_document": {
"id": "fiscal-document-uuid",
"nfe_number": "123456",
"works": [
{
"id": "work-uuid",
"name": "Hospital Bom Jesus",
"cost_center": {
"id": "cost-center-uuid",
"code": "002.001",
"name": "Hospital Bom Jesus"
}
},
{
"id": "work-uuid-2",
"name": "Reforma Centro",
"cost_center": null
}
]
},
"channel": "import-progress.9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a"
}
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.
Delete Import
requires authentication imports delete
Delete an NFe import along with its supplier products and pending link mappings. Only allowed when no imported product has been linked to a system product and the import is not being processed.
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/imports/cupiditate" \
--header "Authorization: Bearer Pakv5Z16eb3f6a8g4VcdEhD" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/cupiditate"
);
const headers = {
"Authorization": "Bearer Pakv5Z16eb3f6a8g4VcdEhD",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204, Import deleted successfully):
Empty response
Example response (422, Import has linked products or is still processing):
{
"error": "Não é possível excluir uma importação com produtos já vinculados."
}
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 Import Products
requires authentication import-products index
List all products from a specific NFe import with filtering and pagination options.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/imports/et/products?sort_by=created_at&sort_desc=1&page=1&per_page=15&status=pending&q=Produto+ABC" \
--header "Authorization: Bearer Pfe5k4661Dgadvah83EVcZb" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/et/products"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"status": "pending",
"q": "Produto ABC",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Pfe5k4661Dgadvah83EVcZb",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Products retrieved successfully):
{
"import": {
"id": "9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a",
"total_products": 15,
"processed_products": 10,
"progress_percentage": 66.67
},
"products": {
"data": [
{
"id": "product-uuid",
"supplier_product_code": "ABC123",
"ean_code": "7891234567890",
"name": "Nome do Produto",
"unit": "UN",
"quantity": 10,
"unit_price": 15.5,
"total_price": 155,
"is_processed": false,
"system_product": null,
"linked_at": null,
"linked_by": null,
"has_stock_movement": false
}
]
},
"pagination": {
"current_page": 1,
"per_page": 15,
"total": 15,
"last_page": 1
}
}
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.
List Import Stock Distributions
requires authentication import-products index
Return, per imported product, how the purchased quantity was distributed across stocks (works and main). Aggregated from stock movements generated by the import.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/imports/ut/distributions" \
--header "Authorization: Bearer 8a61PDcZkbv4f35gaE6dhVe" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/ut/distributions"
);
const headers = {
"Authorization": "Bearer 8a61PDcZkbv4f35gaE6dhVe",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Distribution breakdown per product):
{
"data": [
{
"product": {
"id": "product-uuid",
"name": "Cano PVC XPTO"
},
"total": 50,
"by_stock": [
{
"stock": {
"id": "stock-uuid-a",
"name": "Obra A",
"is_main": false
},
"quantity": 10
},
{
"stock": {
"id": "stock-uuid-b",
"name": "Obra B",
"is_main": false
},
"quantity": 30
},
{
"stock": {
"id": "main-uuid",
"name": "Principal",
"is_main": true
},
"quantity": 10
}
]
}
]
}
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.
Link Products
requires authentication import-products link
Inicia, de forma assíncrona, a vinculação de produtos do fornecedor a produtos do sistema ou criação de novos itens no estoque. Retorna 202 com o canal para acompanhar o progresso.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/imports/doloribus/products/link" \
--header "Authorization: Bearer 5d41Pahbvc8Vf36EZk6aegD" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"mappings\": [
{
\"distributions\": [
{
\"stock_id\": \"Example Mappings * distributions * stock id\",
\"quantity\": 1
}
]
}
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/doloribus/products/link"
);
const headers = {
"Authorization": "Bearer 5d41Pahbvc8Vf36EZk6aegD",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"mappings": [
{
"distributions": [
{
"stock_id": "Example Mappings * distributions * stock id",
"quantity": 1
}
]
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (202, Linking accepted and started asynchronously):
{
"message": "Vinculação de produtos iniciada com sucesso",
"total_mappings": 2,
"channel": "imports.{import-uuid}"
}
Example response (422, Error linking products):
{
"error": "Erro ao vincular produtos: Product not found"
}
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.
Locations
Endpoints for states and cities
List states
requires authentication No specific permission required
List all states paginated
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/locations/states" \
--header "Authorization: Bearer ed56ZkhDc168fPbgaa3V4Ev" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"sint\",
\"sort_desc\": false,
\"page\": 43,
\"per_page\": 21
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/locations/states"
);
const headers = {
"Authorization": "Bearer ed56ZkhDc168fPbgaa3V4Ev",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "sint",
"sort_desc": false,
"page": 43,
"per_page": 21
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "quia in",
"abbreviation": "PD"
},
{
"id": null,
"name": "autem alias",
"abbreviation": "MQ"
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 30,
"to": 2,
"total": 2
}
}
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.
List cities by state
requires authentication No specific permission required
List all cities for a given state
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/locations/states/019556e7-2e9f-777c-a177-30bbf0646c32/cities" \
--header "Authorization: Bearer hfbdPDVa1c6368egv4EkZ5a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/locations/states/019556e7-2e9f-777c-a177-30bbf0646c32/cities"
);
const headers = {
"Authorization": "Bearer hfbdPDVa1c6368egv4EkZ5a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "Quigleyton"
},
{
"id": null,
"name": "Katlynnport"
}
]
}
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.
Notifications
Endpoints for user notifications
List notifications
requires authentication No specific permission required
List user notifications
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/notifications?sort_by=created_at&sort_desc=1&page=1&per_page=15&module=CashFlow&type=success&priority=10&unread_only=1&read_status=unread&date_start=2024-01-01&date_end=2024-12-31&q=erro+faturamento" \
--header "Authorization: Bearer d3VE4PaDevkahb1Zf68gc65" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/notifications"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"module": "CashFlow",
"type": "success",
"priority": "10",
"unread_only": "1",
"read_status": "unread",
"date_start": "2024-01-01",
"date_end": "2024-12-31",
"q": "erro faturamento",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer d3VE4PaDevkahb1Zf68gc65",
"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
vary: Origin
{
"message": "Unauthenticated."
}
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.
Mark notifications as read
requires authentication No specific permission required
Mark one or many notifications as read
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/notifications/mark-as-read" \
--header "Authorization: Bearer fk5av64d1Z38eDac6EPgVbh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"notifications\": [
\"Example Notifications *\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/notifications/mark-as-read"
);
const headers = {
"Authorization": "Bearer fk5av64d1Z38eDac6EPgVbh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"notifications": [
"Example Notifications *"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
Mark notifications as unread
requires authentication No specific permission required
Mark one or many notifications as unread
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/notifications/mark-as-unread" \
--header "Authorization: Bearer Dedb66aV4EgfZh35akc1Pv8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"notifications\": [
\"Example Notifications *\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/notifications/mark-as-unread"
);
const headers = {
"Authorization": "Bearer Dedb66aV4EgfZh35akc1Pv8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"notifications": [
"Example Notifications *"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
Mark all notifications as read
requires authentication No specific permission required
Mark all user notifications as read
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/notifications/mark-all-as-read" \
--header "Authorization: Bearer gfEc6ka6V15ev84ZabPhD3d" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/notifications/mark-all-as-read"
);
const headers = {
"Authorization": "Bearer gfEc6ka6V15ev84ZabPhD3d",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());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.
Unread notifications count
requires authentication No specific permission required
Count of unread notifications for the user
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/notifications/unread-count" \
--header "Authorization: Bearer h64ca8fb5gk1v6dPD3VEeaZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/notifications/unread-count"
);
const headers = {
"Authorization": "Bearer h64ca8fb5gk1v6dPD3VEeaZ",
"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
vary: Origin
{
"message": "Unauthenticated."
}
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.
Payment Receipts
Endpoints for payment receipts
List payment receipts
requires authentication payment-receipt index
List all payment receipts with filters
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/payment-receipts?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Jo%C3%A3o+Silva&employee_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&receiver_type=employee&start_date=2025-01-01&end_date=2025-12-31&min_amount=100&max_amount=1000&payment_method=PIX&city=S%C3%A3o+Paulo&search=aut&document=accusamus&work_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&cost_center_id=96871952-cd8b-375e-bb76-e3b368e6c87d&bank_account_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3" \
--header "Authorization: Bearer 86a1da3Eecv54kPfbZhg6VD" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "João Silva",
"employee_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
"receiver_type": "employee",
"start_date": "2025-01-01",
"end_date": "2025-12-31",
"min_amount": "100",
"max_amount": "1000",
"payment_method": "PIX",
"city": "São Paulo",
"search": "aut",
"document": "accusamus",
"work_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
"cost_center_id": "96871952-cd8b-375e-bb76-e3b368e6c87d",
"bank_account_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 86a1da3Eecv54kPfbZhg6VD",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "fd666c4c-d26c-3690-b57a-d808386cc1ce",
"receipt_number": "REC-3434",
"receiver_type": "custom",
"receiver": {
"id": null,
"name": "Mrs. Pearlie Powlowski",
"document": "947.781.282-84"
},
"payment": {
"amount": 6168.71,
"amount_in_words": "Valor por extenso de teste",
"method": "check",
"description": "Corporis quo autem aut hic qui omnis animi."
},
"issuer": {
"name": "Schaefer, Nienow and Kunde",
"document": "47.849.433/0220-73"
},
"issue": {
"date": "2026-10-29",
"city": "New Serena",
"state": "BA"
},
"created_by": {
"id": "a32930d5-cf0d-47bf-b921-0013c1d874cd",
"name": "Miss Roma Hammes"
},
"created_at": null,
"updated_at": null
},
{
"id": "f767191b-0e7a-3865-9ba8-d0666bae460d",
"receipt_number": "REC-4159",
"receiver_type": "employee",
"receiver": {
"id": null,
"name": "Obie Gerlach",
"document": "569.655.852-66"
},
"payment": {
"amount": 9963.14,
"amount_in_words": "Valor por extenso de teste",
"method": "check",
"description": "Vitae molestias quia dolorem."
},
"issuer": {
"name": "Ferry and Sons",
"document": "13.579.701/0208-87"
},
"issue": {
"date": "2026-10-09",
"city": "Nienowfort",
"state": "BA"
},
"created_by": {
"id": "a32930d5-d1fe-40b4-90aa-863ceed41d4c",
"name": "Lavada Emard"
},
"created_at": null,
"updated_at": null
}
],
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"has_more_pages": false
},
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Export payment receipts to Excel
requires authentication payment-receipt export
Dispatches async Excel generation using the same filters as the listing. Frontend is notified via Pusher when ready.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/payment-receipts/excel?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Jo%C3%A3o+Silva&employee_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&receiver_type=employee&start_date=2025-01-01&end_date=2025-12-31&min_amount=100&max_amount=1000&payment_method=PIX&city=S%C3%A3o+Paulo&search=distinctio&document=iusto&work_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&cost_center_id=11f03fd2-5b9a-33b8-a20b-5e36c7b9fbca&bank_account_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3" \
--header "Authorization: Bearer V3ZaEdDb45agcPf6h6kev81" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/excel"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "João Silva",
"employee_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
"receiver_type": "employee",
"start_date": "2025-01-01",
"end_date": "2025-12-31",
"min_amount": "100",
"max_amount": "1000",
"payment_method": "PIX",
"city": "São Paulo",
"search": "distinctio",
"document": "iusto",
"work_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
"cost_center_id": "11f03fd2-5b9a-33b8-a20b-5e36c7b9fbca",
"bank_account_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer V3ZaEdDb45agcPf6h6kev81",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (202):
{
"message": "string",
"channel": "string",
"event": "string"
}
Example response (422):
{
"message": "string"
}
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.
Show receipt cash flow config
requires authentication payment-receipt cash-flow-config index
Lista cada forma de pagamento e se ela gera lancamento automatico no fluxo de caixa
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/payment-receipts/cash-flow-config" \
--header "Authorization: Bearer c1f86vZgb4deakDhP5E63aV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/cash-flow-config"
);
const headers = {
"Authorization": "Bearer c1f86vZgb4deakDhP5E63aV",
"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
vary: Origin
{
"message": "Unauthenticated."
}
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 receipt cash flow config
requires authentication payment-receipt cash-flow-config update
Define, por forma de pagamento, se o recibo gera lancamento automatico no fluxo de caixa
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/cash-flow-config" \
--header "Authorization: Bearer 38Vev66PhgE5abZkD1a4fdc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"methods\": [
{
\"method\": \"pix\",
\"eligible\": false
}
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/cash-flow-config"
);
const headers = {
"Authorization": "Bearer 38Vev66PhgE5abZkD1a4fdc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"methods": [
{
"method": "pix",
"eligible": false
}
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
Show payment receipt
requires authentication payment-receipt show
Show a payment receipt
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer 1c46ZDVab3dPE6ae5kvgh8f" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer 1c46ZDVab3dPE6ae5kvgh8f",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "41a8ede6-ba6b-3256-9235-3da651f79759",
"receipt_number": "REC-7872",
"receiver_type": "employee",
"receiver": {
"id": null,
"name": "Rae Lowe",
"document": "554.087.240-70"
},
"payment": {
"amount": 7857.44,
"amount_in_words": "Valor por extenso de teste",
"method": "bank_transfer",
"description": "Nostrum vel ut placeat autem modi."
},
"issuer": {
"name": "Turner, Deckow and Pollich",
"document": "17.334.312/4217-52"
},
"issue": {
"date": "2026-10-25",
"city": "South Dannyborough",
"state": "CE"
},
"created_by": {
"id": "a32930d5-e447-4c4c-8de9-7f01017316f6",
"name": "Prof. Brayan Beier"
},
"created_at": null,
"updated_at": null
}
}
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.
Create payment receipt
requires authentication payment-receipt store
Create a new payment receipt
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/payment-receipts" \
--header "Authorization: Bearer b31k4gvh6dZEDV6e5a8Pcaf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"receiver_type\": \"Example Receiver type\",
\"employee_id\": \"3f5aced7-0c3b-4c75-96c0-153bd322272f\",
\"receiver_name\": \"Example Name\",
\"receiver_document\": \"Example Receiver document\",
\"amount\": 1,
\"amount_in_words\": \"Example Amount in words\",
\"payment_method\": \"Example Payment method\",
\"description\": \"Example Description\",
\"issuer_name\": \"Example Name\",
\"issuer_document\": \"Example Issuer document\",
\"issue_date\": \"2024-01-01\",
\"city\": \"Example City\",
\"state\": \"Example State\",
\"work_id\": \"c01419da-390c-38bd-a6a7-bf30dad039bd\",
\"cost_center_id\": \"bd8fdba7-8cee-319d-88eb-f239b24a9738\",
\"bank_account_id\": \"63ed4e74-3723-3f21-bb22-e964a3979d13\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts"
);
const headers = {
"Authorization": "Bearer b31k4gvh6dZEDV6e5a8Pcaf",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"receiver_type": "Example Receiver type",
"employee_id": "3f5aced7-0c3b-4c75-96c0-153bd322272f",
"receiver_name": "Example Name",
"receiver_document": "Example Receiver document",
"amount": 1,
"amount_in_words": "Example Amount in words",
"payment_method": "Example Payment method",
"description": "Example Description",
"issuer_name": "Example Name",
"issuer_document": "Example Issuer document",
"issue_date": "2024-01-01",
"city": "Example City",
"state": "Example State",
"work_id": "c01419da-390c-38bd-a6a7-bf30dad039bd",
"cost_center_id": "bd8fdba7-8cee-319d-88eb-f239b24a9738",
"bank_account_id": "63ed4e74-3723-3f21-bb22-e964a3979d13"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 payment receipt
requires authentication payment-receipt update
Update a payment receipt
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer 4cVeZbf85Dkvghad61a6E3P" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"receiver_type\": \"Example Receiver type\",
\"employee_id\": \"3c6fbc5c-4880-4b0d-8bfc-681c2e78fc65\",
\"receiver_name\": \"Example Name\",
\"receiver_document\": \"Example Receiver document\",
\"amount\": 1,
\"amount_in_words\": \"Example Amount in words\",
\"payment_method\": \"Example Payment method\",
\"description\": \"Example Description\",
\"issuer_name\": \"Example Name\",
\"issuer_document\": \"Example Issuer document\",
\"issue_date\": \"2024-01-01\",
\"city\": \"Example City\",
\"state\": \"Example State\",
\"work_id\": \"b2ec1136-5e97-3c6c-8fea-a7de5fa6ffe4\",
\"cost_center_id\": \"def69573-ae6f-3307-b16b-8b537a117532\",
\"bank_account_id\": \"d9bcacb4-1e6b-35f5-aefa-cc3bf0c069e7\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer 4cVeZbf85Dkvghad61a6E3P",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"receiver_type": "Example Receiver type",
"employee_id": "3c6fbc5c-4880-4b0d-8bfc-681c2e78fc65",
"receiver_name": "Example Name",
"receiver_document": "Example Receiver document",
"amount": 1,
"amount_in_words": "Example Amount in words",
"payment_method": "Example Payment method",
"description": "Example Description",
"issuer_name": "Example Name",
"issuer_document": "Example Issuer document",
"issue_date": "2024-01-01",
"city": "Example City",
"state": "Example State",
"work_id": "b2ec1136-5e97-3c6c-8fea-a7de5fa6ffe4",
"cost_center_id": "def69573-ae6f-3307-b16b-8b537a117532",
"bank_account_id": "d9bcacb4-1e6b-35f5-aefa-cc3bf0c069e7"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete payment receipt
requires authentication payment-receipt delete
Delete a payment receipt
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer c8fb3PD65hVa146dZevEgak" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer c8fb3PD65hVa146dZevEgak",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
List employee receipts
requires authentication payment-receipt index
List all payment receipts for a specific employee
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employees/17/receipts" \
--header "Authorization: Bearer 56ecgPDkE6V4abvd8af1Z3h" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/17/receipts"
);
const headers = {
"Authorization": "Bearer 56ecgPDkE6V4abvd8af1Z3h",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "eb123875-737e-3cae-8baf-86e1ca1442a9",
"receipt_number": "REC-9986",
"receiver_type": "employee",
"receiver": {
"id": null,
"name": "Aurelie Hammes",
"document": "365.453.538-54"
},
"payment": {
"amount": 4705.43,
"amount_in_words": "Valor por extenso de teste",
"method": "cash",
"description": "Facere et incidunt iure aliquid ea."
},
"issuer": {
"name": "Greenholt, Barrows and Borer",
"document": "15.901.722/0513-42"
},
"issue": {
"date": "2026-10-14",
"city": "South Jorgeberg",
"state": "CE"
},
"created_by": {
"id": "a32930d6-0f4f-40a2-bb6d-7347be1c85e8",
"name": "Hettie Mitchell III"
},
"created_at": null,
"updated_at": null
},
{
"id": "c6f12bc0-450c-3b81-b22f-01e76bf4fa1b",
"receipt_number": "REC-6338",
"receiver_type": "custom",
"receiver": {
"id": null,
"name": "Effie Cummings",
"document": "225.424.688-06"
},
"payment": {
"amount": 7955.02,
"amount_in_words": "Valor por extenso de teste",
"method": "bank_transfer",
"description": "Asperiores ea molestiae adipisci in voluptatem."
},
"issuer": {
"name": "Herzog, Crist and Gusikowski",
"document": "03.774.958/1077-61"
},
"issue": {
"date": "2026-11-04",
"city": "Harveytown",
"state": "PE"
},
"created_by": {
"id": "a32930d6-11a6-4e31-9a14-52ca66ceb409",
"name": "Ms. Katelin Greenholt"
},
"created_at": null,
"updated_at": null
}
],
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"has_more_pages": false
},
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Permission Groups
Endpoints for permission groups
List ungrouped permissions
requires authentication permission-group index
List all permissions that do not belong to any permission group.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/permission-groups/ungrouped-permissions?q=Permission+name&page=1&per_page=10" \
--header "Authorization: Bearer hfZ6P6v1a4kVcE3deDb85ag" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/permission-groups/ungrouped-permissions"
);
const params = {
"q": "Permission name",
"page": "1",
"per_page": "10",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer hfZ6P6v1a4kVcE3deDb85ag",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "70563aa5-b237-3d5c-8050-b0e55c51a4c6",
"name": "voluptates",
"display_name": "Laboriosam perferendis aut ipsam debitis."
},
{
"id": "3efa7dc8-6e54-3079-a9c3-d23b9b788194",
"name": "eos",
"display_name": "Aliquam iste et soluta ea ipsam asperiores odio."
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
List permission groups
requires authentication permission-group index
List all permission groups
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/permission-groups" \
--header "Authorization: Bearer vbefEk5h8V6cP4gD6dZa31a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/permission-groups"
);
const headers = {
"Authorization": "Bearer vbefEk5h8V6cP4gD6dZa31a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "da1403f2-b769-362e-bf48-e2dbd94a8980",
"name": "distinctio-aut",
"display_name": "eum animi maiores",
"created_at": null,
"updated_at": null
},
{
"id": "a80508ca-9c03-360b-a2d2-3891ee6e62ce",
"name": "officiis-ex",
"display_name": "et dolore voluptatem",
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Create permission group
requires authentication permission-group store
Create a new permission group
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/permission-groups" \
--header "Authorization: Bearer vfekEZa1Dgc8ha6364dPV5b" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"display_name\": \"Example Name\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/permission-groups"
);
const headers = {
"Authorization": "Bearer vfekEZa1Dgc8ha6364dPV5b",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"display_name": "Example Name"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 permission group
requires authentication permission-group update
Update a permission group
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1" \
--header "Authorization: Bearer b646a1a8vP5cdehDEkZg3Vf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"display_name\": \"Example Name\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1"
);
const headers = {
"Authorization": "Bearer b646a1a8vP5cdehDEkZg3Vf",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"display_name": "Example Name"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Show permission group
requires authentication permission-group show
Show a permission group
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/permission-groups/1" \
--header "Authorization: Bearer hb3cfe6ka1VZv68d5Eg4aPD" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1"
);
const headers = {
"Authorization": "Bearer hb3cfe6ka1VZv68d5Eg4aPD",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "df9584dc-1b9e-3234-be3c-6cb2ce35caa1",
"name": "dolor-aut-quam",
"display_name": "deleniti mollitia eum",
"created_at": null,
"updated_at": null
}
}
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.
Delete permission group
requires authentication permission-group delete
Delete a permission group
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1" \
--header "Authorization: Bearer 64cvkZha6V1fEba3eD58gPd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1"
);
const headers = {
"Authorization": "Bearer 64cvkZha6V1fEba3eD58gPd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Attach permissions to group
requires authentication permission-group permissions-attach
Attach one or more permissions to a permission group. Permissions already in another group are moved to this group.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions" \
--header "Authorization: Bearer P1648hafb6vdgecE5ZVk3Da" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"f34bb6b1-fbd3-391b-ba48-0d0c57528498\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);
const headers = {
"Authorization": "Bearer P1648hafb6vdgecE5ZVk3Da",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"f34bb6b1-fbd3-391b-ba48-0d0c57528498"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "deb9d5ab-33df-39c7-aaaa-ab333d43e343",
"name": "officia-eum-ratione",
"display_name": "velit laboriosam delectus",
"created_at": null,
"updated_at": null
}
}
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.
Detach permissions from group
requires authentication permission-group permissions-detach
Detach one or more permissions from a permission group. Fails if any permission does not belong to the group.
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions" \
--header "Authorization: Bearer fV8Dcahkv53e1baP6Eg6d4Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"c6c2d454-7023-3476-bac0-52d0cbfc4818\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);
const headers = {
"Authorization": "Bearer fV8Dcahkv53e1baP6Eg6d4Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"c6c2d454-7023-3476-bac0-52d0cbfc4818"
]
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "685803fd-8bfc-309c-b5db-c372728ea040",
"name": "nesciunt-eos",
"display_name": "quidem velit temporibus",
"created_at": null,
"updated_at": null
}
}
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.
Product Brands
Endpoints for product brands
List product brands
requires authentication product-brand index
List all product brands
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-brands?q=Structure" \
--header "Authorization: Bearer a16Ddg3EPZfc5vb86hVae4k" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-brands"
);
const params = {
"q": "Structure",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer a16Ddg3EPZfc5vb86hVae4k",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "c1847275-a89d-3b06-8cac-d00998ac7e23",
"name": "Dr. Heitor Bernardo Arruda",
"created_at": null,
"updated_at": null
},
{
"id": "319ae9a1-53e5-35ab-9e7c-21e8af07c590",
"name": "Dr. Cléber Matos Bittencourt",
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Show product brand
requires authentication product-brand show
Show a product brand
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-brands/explicabo" \
--header "Authorization: Bearer b86D4EhZ6gPckafVe51vd3a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-brands/explicabo"
);
const headers = {
"Authorization": "Bearer b86D4EhZ6gPckafVe51vd3a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "84bc48dc-c9f5-3d30-86c1-6849a6c5de52",
"name": "Isabel Delgado Solano Jr.",
"created_at": null,
"updated_at": null
}
}
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.
Create product brand
requires authentication product-brand store
Create a new product brand
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/product-brands" \
--header "Authorization: Bearer ka4cDbZv3hfdea66PVE8g15" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-brands"
);
const headers = {
"Authorization": "Bearer ka4cDbZv3hfdea66PVE8g15",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 product brand
requires authentication product-brand update
Update a product brand
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/product-brands/voluptas" \
--header "Authorization: Bearer 3cvP1kDh5aa8egfbZ6d46EV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-brands/voluptas"
);
const headers = {
"Authorization": "Bearer 3cvP1kDh5aa8egfbZ6d46EV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete product brand
requires authentication product-brand delete
Delete a product brand
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/product-brands/facere" \
--header "Authorization: Bearer 3VP5fbdah6evc4k6a1ZEg8D" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-brands/facere"
);
const headers = {
"Authorization": "Bearer 3VP5fbdah6evc4k6a1ZEg8D",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Product Families
Endpoints for product families
List product families
requires authentication product-family index
List all product families
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-families?is_epi=1&q=Structure" \
--header "Authorization: Bearer cPZkVa56e3bagdvfD681hE4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families"
);
const params = {
"is_epi": "1",
"q": "Structure",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer cPZkVa56e3bagdvfD681hE4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "d2c11f79-3181-34d1-af56-e19ee121e0d7",
"name": "Dayana Marinho Branco",
"is_epi": false,
"created_at": null,
"updated_at": null
},
{
"id": "0374b2b6-6f27-36e1-8ab4-50502f2a3fa9",
"name": "Sr. Emanuel Aguiar Neto",
"is_epi": false,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Show product family
requires authentication product-family show
Show a product family
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-families/labore" \
--header "Authorization: Bearer Pb4gae8k3V5cdEh61v6fZDa" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families/labore"
);
const headers = {
"Authorization": "Bearer Pb4gae8k3V5cdEh61v6fZDa",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "ad82dc0a-e65e-36e4-85d7-eae4e507d48e",
"name": "Elaine Lia Bonilha",
"is_epi": false,
"created_at": null,
"updated_at": null
}
}
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.
Create product family
requires authentication product-family store
Create a new product family
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/product-families" \
--header "Authorization: Bearer d654h1faVage3PEbkcZ6v8D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"is_epi\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families"
);
const headers = {
"Authorization": "Bearer d654h1faVage3PEbkcZ6v8D",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"is_epi": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 product family
requires authentication product-family update
Update a product family
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/product-families/eum" \
--header "Authorization: Bearer gc6ea8b63PadfZkvEDh41V5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"is_epi\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families/eum"
);
const headers = {
"Authorization": "Bearer gc6ea8b63PadfZkvEDh41V5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"is_epi": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete product family
requires authentication product-family delete
Delete a product family
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/product-families/quod" \
--header "Authorization: Bearer Za6fvD5d4VPEek6g1a83hbc" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families/quod"
);
const headers = {
"Authorization": "Bearer Za6fvD5d4VPEek6g1a83hbc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Product Quantity Lists
Endpoints for managing product quantity lists
List product quantity lists
requires authentication product-quantity-list index
List all product quantity lists
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists" \
--header "Authorization: Bearer Zf6e5agkbhPdv184EaD63Vc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"Example Q\",
\"work_id\": \"f389198c-4823-32fb-afa1-bdde3d579b18\",
\"user_id\": \"afcb78ed-f6e4-3391-b8e6-ff5c3c0b9f5a\",
\"responsible_id\": \"7161704d-18bf-3f5d-9eef-d1c0ed53524f\",
\"per_page\": 1,
\"sort\": \"Example Sort\",
\"sort_desc\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists"
);
const headers = {
"Authorization": "Bearer Zf6e5agkbhPdv184EaD63Vc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "Example Q",
"work_id": "f389198c-4823-32fb-afa1-bdde3d579b18",
"user_id": "afcb78ed-f6e4-3391-b8e6-ff5c3c0b9f5a",
"responsible_id": "7161704d-18bf-3f5d-9eef-d1c0ed53524f",
"per_page": 1,
"sort": "Example Sort",
"sort_desc": true
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "5c68a7e6-b147-3be9-a153-b95723040222",
"name": "Vel tempore sint.",
"description": null,
"work": {
"id": "a32930d6-aa9c-4649-b69d-4f438a5589bb",
"name": "Henrique Matias Valentin"
},
"user": {
"id": "a32930d6-adb0-45f6-8d52-383ce67efb8b",
"name": "Westley Leannon Jr."
},
"created_at": null,
"updated_at": null
},
{
"id": "61fc2ad3-bae8-395e-8808-2a0f74d87a84",
"name": "Ut tenetur eos quo ipsa.",
"description": null,
"work": {
"id": "a32930d6-b6bb-4727-893e-952513b2edb5",
"name": "Srta. Alexa Alcantara Filho"
},
"user": {
"id": "a32930d6-ba68-4b4c-b663-14e89be5fec3",
"name": "Mathias Walsh"
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Show product quantity list
requires authentication product-quantity-list show
Show a product quantity list
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/molestias" \
--header "Authorization: Bearer P5gZda8DkVfEc6ab43he1v6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/molestias"
);
const headers = {
"Authorization": "Bearer P5gZda8DkVfEc6ab43he1v6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "eba1c469-2826-3297-bb8a-c862a4b46d09",
"name": "Nihil id id qui ea.",
"description": null,
"work": {
"id": "a32930d6-c1be-48df-bcba-0e91ed29c78e",
"name": "Sra. Alexa Vega Domingues"
},
"user": {
"id": "a32930d6-c526-4cd9-b491-64f9b444ab08",
"name": "Letha Wehner"
},
"created_at": null,
"updated_at": null
}
}
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.
List items
requires authentication product-quantity-list show
List all items from a product quantity list with pagination
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/laborum/items" \
--header "Authorization: Bearer g864ZPbcD31ad6fvaEh5eVk" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"per_page\": 1,
\"q\": \"Example Q\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/laborum/items"
);
const headers = {
"Authorization": "Bearer g864ZPbcD31ad6fvaEh5eVk",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"per_page": 1,
"q": "Example Q"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "f703079d-42a3-336a-915b-cbd6a7a143eb",
"product": {
"id": "a32930d6-dd4c-4acc-8e49-b254967495d9",
"name": "Dr. Regina Bonilha Alves",
"code": "PRD-952999",
"unit": {
"id": "a32930d6-dab1-4242-8fa2-f5873c28845c",
"name": "Victor Delvalle Jr.",
"abbreviation": "Giovanna Queirós Neves Neto"
}
},
"quantity": 251.8724,
"observation": "Rem distinctio adipisci omnis ad iste quasi.",
"created_at": null,
"updated_at": null
},
{
"id": "20f6811b-3a0f-3981-ac50-ba6c4fe00958",
"product": {
"id": "a32930d6-ed33-4ad5-8b8b-310db1e6fa43",
"name": "Srta. Alessandra Juliana Montenegro Filho",
"code": "PRD-031505",
"unit": {
"id": "a32930d6-ebe2-4ff0-819b-37866e7ff4c7",
"name": "Anderson Feliciano",
"abbreviation": "Srta. Mia Lutero Gil Sobrinho"
}
},
"quantity": 391.8951,
"observation": "Repellendus qui nesciunt accusantium facilis rerum est.",
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Create product quantity list
requires authentication product-quantity-list store
Create a new product quantity list
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists" \
--header "Authorization: Bearer 6EDaP4Z13ghvfba85cV6kde" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"f3cc263b-082a-3564-8c0a-4f843e47b701\",
\"items\": [
{
\"product_id\": \"4a3d4981-257f-3225-8f49-545d95fb2b0f\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists"
);
const headers = {
"Authorization": "Bearer 6EDaP4Z13ghvfba85cV6kde",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "f3cc263b-082a-3564-8c0a-4f843e47b701",
"items": [
{
"product_id": "4a3d4981-257f-3225-8f49-545d95fb2b0f",
"quantity": 1,
"observation": "Example Items * observation"
},
null
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": "object"
}
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 product quantity list
requires authentication product-quantity-list update
Update a product quantity list. Can include items to replace all items in the list.
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/et" \
--header "Authorization: Bearer Dvf5ha634ed6Z8gPkbcE1Va" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"items\": [
{
\"id\": \"09d740ec-42f9-30bc-aae8-c13d625ff90d\",
\"product_id\": \"f9e523e2-3e6c-3152-b128-7d3aeb36e7e5\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/et"
);
const headers = {
"Authorization": "Bearer Dvf5ha634ed6Z8gPkbcE1Va",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"items": [
{
"id": "09d740ec-42f9-30bc-aae8-c13d625ff90d",
"product_id": "f9e523e2-3e6c-3152-b128-7d3aeb36e7e5",
"quantity": 1,
"observation": "Example Items * observation"
},
null
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": "object"
}
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.
Delete product quantity list
requires authentication product-quantity-list delete
Delete a product quantity list
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/suscipit" \
--header "Authorization: Bearer 66agZdEafb8veP1h3c5VkD4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/suscipit"
);
const headers = {
"Authorization": "Bearer 66agZdEafb8veP1h3c5VkD4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Add items to list
requires authentication product-quantity-list update
Add one or more product items to the list
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/autem/items" \
--header "Authorization: Bearer vfb56VaEkPh83e6adgZcD41" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"product_id\": \"fa313f3e-7736-3edf-b09f-3e5ea49ce3d4\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/autem/items"
);
const headers = {
"Authorization": "Bearer vfb56VaEkPh83e6adgZcD41",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"product_id": "fa313f3e-7736-3edf-b09f-3e5ea49ce3d4",
"quantity": 1,
"observation": "Example Items * observation"
},
null
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": "array"
}
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 item
requires authentication product-quantity-list update
Update a product item in the list
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/items/dolorem" \
--header "Authorization: Bearer f18d6vE5bVDg4aZk3Pca6eh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"quantity\": 1,
\"observation\": \"Example Observation\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/items/dolorem"
);
const headers = {
"Authorization": "Bearer f18d6vE5bVDg4aZk3Pca6eh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quantity": 1,
"observation": "Example Observation"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": "object"
}
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.
Remove items
requires authentication product-quantity-list update
Remove one or more product items from the list
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/fugit/items" \
--header "Authorization: Bearer vcd6Dha4f8ak6b51EVePgZ3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"cae47a4e-0acc-3fec-862e-a403efc505fc\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/fugit/items"
);
const headers = {
"Authorization": "Bearer vcd6Dha4f8ak6b51EVePgZ3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"cae47a4e-0acc-3fec-862e-a403efc505fc"
]
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"deleted": "integer"
}
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.
Sync items
requires authentication product-quantity-list update
Replace all items in the list
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/omnis/sync-items" \
--header "Authorization: Bearer vah1kfP8bZ5c3VE6g4aD6de" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"id\": \"0115e044-f6c5-3516-a5ca-c118f9d23c5d\",
\"product_id\": \"3de6db34-7111-3551-8870-64f9364b7183\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/omnis/sync-items"
);
const headers = {
"Authorization": "Bearer vah1kfP8bZ5c3VE6g4aD6de",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"id": "0115e044-f6c5-3516-a5ca-c118f9d23c5d",
"product_id": "3de6db34-7111-3551-8870-64f9364b7183",
"quantity": 1,
"observation": "Example Items * observation"
},
null
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": "object"
}
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.
Product Request Fulfillment
Endpoints for fulfilling product request items
Fulfill item
requires authentication product-request fulfill
Fulfill a product request item via transfer or allocation
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/dignissimos/fulfill" \
--header "Authorization: Bearer 3DbePhg5Zd1cfEkvVa866a4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"fulfillment_type\": \"Example Fulfillment type\",
\"stock_id\": \"9ad982b4-0508-3af3-9834-90d4816d8ceb\",
\"quantity\": 1,
\"source_stock_id\": \"f026ff74-c47a-353a-92ee-b1cd703197ff\",
\"reason\": \"Example Reason\",
\"origins\": [
{
\"supplier_product_id\": \"e1c26e1e-908b-372d-bb68-15f8e2710f83\",
\"quantity\": 1
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/dignissimos/fulfill"
);
const headers = {
"Authorization": "Bearer 3DbePhg5Zd1cfEkvVa866a4",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"fulfillment_type": "Example Fulfillment type",
"stock_id": "9ad982b4-0508-3af3-9834-90d4816d8ceb",
"quantity": 1,
"source_stock_id": "f026ff74-c47a-353a-92ee-b1cd703197ff",
"reason": "Example Reason",
"origins": [
{
"supplier_product_id": "e1c26e1e-908b-372d-bb68-15f8e2710f83",
"quantity": 1
},
null
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": "object"
}
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.
List item fulfillments
requires authentication product-request show
List all fulfillments for a product request item
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-requests/items/in/fulfillments" \
--header "Authorization: Bearer ZPDEfv584abgek6cd631aVh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"per_page\": 1,
\"page\": 1
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/in/fulfillments"
);
const headers = {
"Authorization": "Bearer ZPDEfv584abgek6cd631aVh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"per_page": 1,
"page": 1
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "3699d88a-5ed0-342b-ae2d-0682bb8c0f32",
"quantity": 21.916,
"fulfilled_at": "2026-10-19T00:37:52.000000Z",
"created_at": null
},
{
"id": "d903ec1e-2b21-3f5b-bf75-569ad8a97ecb",
"quantity": 29.5341,
"fulfilled_at": "2026-10-12T18:13:29.000000Z",
"created_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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 item with fulfillment details
requires authentication product-request show
Get a single product request item with its fulfillment details
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-requests/items/dolor" \
--header "Authorization: Bearer 6fhVd3g6aDkEZ14c5eaP8vb" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/dolor"
);
const headers = {
"Authorization": "Bearer 6fhVd3g6aDkEZ14c5eaP8vb",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "618ef9fe-af2a-3433-859e-b8077862b6ad",
"product": {
"id": "a32930db-1ace-4a8f-911b-8cee13faf4a4",
"name": "Sergio Gael Toledo Sobrinho",
"code": "PRD-233738",
"unit": {
"id": "a32930db-198f-4f29-9939-36415ba438d5",
"name": "Dener Emiliano Domingues",
"abbreviation": "Flávio Verdugo Neto"
}
},
"quantity": 640.3615,
"quantity_fulfilled": 0,
"quantity_pending": 640.3615,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Ducimus ut non minima.",
"created_at": null,
"updated_at": null
}
}
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.
List pending items
requires authentication product-request show
List all pending items from a product request
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-requests/et/pending-items" \
--header "Authorization: Bearer 6eavcbZ8ag634h1PkEDdf5V" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"per_page\": 1,
\"page\": 1
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/et/pending-items"
);
const headers = {
"Authorization": "Bearer 6eavcbZ8ag634h1PkEDdf5V",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"per_page": 1,
"page": 1
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "b2929189-9687-33ec-b803-dcc61f6a73f4",
"product": {
"id": "a32930db-314e-4b1e-8fd0-5a1a07aaabbb",
"name": "Dr. Manuela Medina",
"code": "PRD-842103",
"unit": {
"id": "a32930db-3014-47b1-968e-23157df7a1d4",
"name": "Gisela Maia Filho",
"abbreviation": "Fátima Brito Sobrinho"
}
},
"quantity": 896.7175,
"quantity_fulfilled": 0,
"quantity_pending": 896.7175,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": null,
"created_at": null,
"updated_at": null
},
{
"id": "ba74d2b9-3d32-3e91-a13c-c89c88728607",
"product": {
"id": "a32930db-4a45-4f09-9251-5f4a61864833",
"name": "Joaquin Perez Galindo",
"code": "PRD-637231",
"unit": {
"id": "a32930db-4913-4a77-9048-28a91b76e68e",
"name": "Dr. Enzo Adriano Oliveira",
"abbreviation": "Luna Leon Azevedo Filho"
}
},
"quantity": 177.2428,
"quantity_fulfilled": 0,
"quantity_pending": 177.2428,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": null,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
List pending items by product
requires authentication product-request show
List all pending product request items for a specific product
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-requests/pending-by-product/non" \
--header "Authorization: Bearer 683gh1adkEcePVb6fZD4av5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/pending-by-product/non"
);
const headers = {
"Authorization": "Bearer 683gh1adkEcePVb6fZD4av5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "ebf3ede5-8a4d-3981-9732-31548c16a65e",
"product": {
"id": "a32930db-6162-4453-8955-866e5e8ec934",
"name": "Noelí Toledo Maldonado",
"code": "PRD-833278",
"unit": {
"id": "a32930db-601a-48d1-a416-925a22bff670",
"name": "Victor Beltrão",
"abbreviation": "Dr. Cláudio Salazar Quintana Sobrinho"
}
},
"quantity": 92.3586,
"quantity_fulfilled": 0,
"quantity_pending": 92.3586,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Quo consequuntur harum et vel voluptatibus ea.",
"created_at": null,
"updated_at": null
},
{
"id": "4355534b-1dae-3a5d-8a54-8aa2cee2fac1",
"product": {
"id": "a32930db-7416-4c63-8019-0c3be959d14c",
"name": "Juliano D'ávila Neto",
"code": "PRD-582389",
"unit": {
"id": "a32930db-72ce-4dd9-b63b-bfe2cfe721b0",
"name": "Srta. Letícia Rico Godói Filho",
"abbreviation": "Rafael Ronaldo Duarte"
}
},
"quantity": 674.3775,
"quantity_fulfilled": 0,
"quantity_pending": 674.3775,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Quas autem ut quidem explicabo id asperiores numquam.",
"created_at": null,
"updated_at": null
}
]
}
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.
Product Requests
Endpoints for managing product requests for works
List product requests
requires authentication product-request index
List all product requests
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-requests" \
--header "Authorization: Bearer a48EPfv1cd5VhgeDZ66bka3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"Example Sort by\",
\"sort_desc\": true,
\"page\": 1,
\"per_page\": 1,
\"q\": \"Example Q\",
\"work_id\": \"bbd44470-af9e-3c91-ac1e-20c39b133626\",
\"work_location_id\": \"7379a19e-aa27-30a1-9cc4-5e6f508953f8\",
\"user_id\": \"4a28b2a6-ae1a-3b4e-affb-efa5c10710d7\",
\"status_id\": \"b1b1f6a6-7332-3a43-a742-ce0f5729b455\",
\"priority\": \"Example Priority\",
\"needed_at_from\": \"Example Needed at from\",
\"needed_at_to\": \"Example Needed at to\",
\"responsible_id\": \"8891214e-ddd6-3833-872f-27af16612703\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests"
);
const headers = {
"Authorization": "Bearer a48EPfv1cd5VhgeDZ66bka3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "Example Sort by",
"sort_desc": true,
"page": 1,
"per_page": 1,
"q": "Example Q",
"work_id": "bbd44470-af9e-3c91-ac1e-20c39b133626",
"work_location_id": "7379a19e-aa27-30a1-9cc4-5e6f508953f8",
"user_id": "4a28b2a6-ae1a-3b4e-affb-efa5c10710d7",
"status_id": "b1b1f6a6-7332-3a43-a742-ce0f5729b455",
"priority": "Example Priority",
"needed_at_from": "Example Needed at from",
"needed_at_to": "Example Needed at to",
"responsible_id": "8891214e-ddd6-3833-872f-27af16612703"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "867bc2a8-e64c-3956-b400-ee9586925153",
"code": null,
"name": "Ratione omnis a enim blanditiis.",
"description": null,
"work": {
"id": "a32930d8-6a30-4ffb-91d6-9ad57f8164a2",
"name": "Srta. Violeta Vila Espinoza"
},
"user": {
"id": "a32930d8-6d2a-4438-87b8-a36fd3990b46",
"name": "Prof. Brenden Lynch IV"
},
"status": {
"id": "a32930d8-6f2e-45b3-a8cc-5cd89df5cae6",
"slug": null,
"name": null,
"description": "Cléber Mascarenhas Aragão",
"abbreviation": "ullam",
"color": "#736ae3",
"text_color": "#a50536"
},
"priority": "high",
"priority_label": "Alta",
"needed_at": "2026-11-29",
"approved_at": null,
"rejection_reason": null,
"created_at": null,
"updated_at": null
},
{
"id": "528a6fc4-fc7b-3952-9e35-3089803caefa",
"code": null,
"name": "Architecto adipisci mollitia.",
"description": null,
"work": {
"id": "a32930d8-7371-4767-a66a-0a985ea41e3f",
"name": "Raphael Pereira Tamoio"
},
"user": {
"id": "a32930d8-7665-4456-a80b-24f5c77d23f4",
"name": "Cayla Armstrong V"
},
"status": {
"id": "a32930d8-7864-48cd-a646-dc9d2dd46c0d",
"slug": null,
"name": null,
"description": "Dr. Afonso Cervantes Jr.",
"abbreviation": "nesciunt",
"color": "#279375",
"text_color": "#8959cf"
},
"priority": "high",
"priority_label": "Alta",
"needed_at": null,
"approved_at": null,
"rejection_reason": null,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Show product request
requires authentication product-request show
Show a product request
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-requests/illum" \
--header "Authorization: Bearer v6fk1dP5D8haa43ZVecb6Eg" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/illum"
);
const headers = {
"Authorization": "Bearer v6fk1dP5D8haa43ZVecb6Eg",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "7741b539-2ffb-31eb-b229-3df1c636b28c",
"code": null,
"name": "Non atque eos neque.",
"description": "Ea beatae esse id harum molestias aliquam. Explicabo omnis quis et minima ipsa iste consequatur. Earum delectus qui est culpa soluta et.",
"work": {
"id": "a32930d8-8146-4b6a-91d3-d531c81ec565",
"name": "Guilherme Bruno Marinho Filho"
},
"user": {
"id": "a32930d8-8440-47d6-80bb-0d31efb08c9f",
"name": "Miss Elda Cruickshank DVM"
},
"status": {
"id": "a32930d8-8639-43ac-85d3-803c242c3c5d",
"slug": null,
"name": null,
"description": "Dr. Mateus Rivera Leal",
"abbreviation": "unde",
"color": "#cc523f",
"text_color": "#35cd9b"
},
"priority": "medium",
"priority_label": "Média",
"needed_at": "2026-11-10",
"approved_at": null,
"rejection_reason": null,
"created_at": null,
"updated_at": null
}
}
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.
List items
requires authentication product-request show
List all items from a product request with pagination
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-requests/optio/items" \
--header "Authorization: Bearer kf45a6EePbgVc861av3ZdDh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"Example Q\",
\"per_page\": 1
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/optio/items"
);
const headers = {
"Authorization": "Bearer kf45a6EePbgVc861av3ZdDh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "Example Q",
"per_page": 1
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "b065f6a2-ce14-3236-bd16-2b38bb237a8a",
"product": {
"id": "a32930d8-a26e-404e-b561-ab6f43b65a1b",
"name": "Dr. Diego Máximo Chaves Jr.",
"code": "PRD-623034",
"unit": {
"id": "a32930d8-a113-4374-a17a-5b95d34c7d2f",
"name": "Sérgio Fidalgo",
"abbreviation": "Poliana Fontes Vega Filho"
}
},
"quantity": 966.6102,
"quantity_fulfilled": 0,
"quantity_pending": 966.6102,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": null,
"created_at": null,
"updated_at": null
},
{
"id": "5a879070-a963-3143-9ee7-70f3bcb8c2ba",
"product": {
"id": "a32930d8-bc12-47a9-aa4b-dadb366c5cfb",
"name": "Demian da Rosa Chaves",
"code": "PRD-649129",
"unit": {
"id": "a32930d8-bab7-45d6-9db8-784521a99500",
"name": "Sra. Laiane Elaine Grego",
"abbreviation": "Sr. Simão Wagner Delgado"
}
},
"quantity": 574.8602,
"quantity_fulfilled": 0,
"quantity_pending": 574.8602,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Facere consequatur ad perferendis aut ab iure expedita.",
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Create product request
requires authentication product-request store
Create a new product request
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/product-requests" \
--header "Authorization: Bearer 3acZ6P8gkdEbD1vf46a5Veh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"461d178a-134f-301d-9756-d10658eb522b\",
\"work_location_id\": \"94042501-29b8-31cf-97ce-412b0cd8dde9\",
\"status_id\": \"193bc180-99c3-37f3-ad0d-071c8b59e29e\",
\"priority\": \"Example Priority\",
\"needed_at\": \"Example Needed at\",
\"items\": [
{
\"product_id\": \"1c285738-4421-3ae7-8146-efa2f931a851\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests"
);
const headers = {
"Authorization": "Bearer 3acZ6P8gkdEbD1vf46a5Veh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "461d178a-134f-301d-9756-d10658eb522b",
"work_location_id": "94042501-29b8-31cf-97ce-412b0cd8dde9",
"status_id": "193bc180-99c3-37f3-ad0d-071c8b59e29e",
"priority": "Example Priority",
"needed_at": "Example Needed at",
"items": [
{
"product_id": "1c285738-4421-3ae7-8146-efa2f931a851",
"quantity": 1,
"observation": "Example Items * observation"
},
null
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": "object"
}
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 product request
requires authentication product-request update
Update a product request. Can include items to replace all items in the request.
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/product-requests/autem" \
--header "Authorization: Bearer kEbg1Z3DdfceVh68a64P5av" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"74f7423a-7023-377a-b699-9d5191ba1adf\",
\"work_location_id\": \"92e15853-5099-37c3-a4f5-023ceb39c14c\",
\"status_id\": \"45581f69-7871-3194-b30c-ef047373041e\",
\"priority\": \"Example Priority\",
\"needed_at\": \"Example Needed at\",
\"items\": [
{
\"id\": \"4c10a422-126c-35fb-8df4-c2e00a27ac7d\",
\"product_id\": \"4380c8af-64da-3c66-a394-7e712dc48a20\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/autem"
);
const headers = {
"Authorization": "Bearer kEbg1Z3DdfceVh68a64P5av",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "74f7423a-7023-377a-b699-9d5191ba1adf",
"work_location_id": "92e15853-5099-37c3-a4f5-023ceb39c14c",
"status_id": "45581f69-7871-3194-b30c-ef047373041e",
"priority": "Example Priority",
"needed_at": "Example Needed at",
"items": [
{
"id": "4c10a422-126c-35fb-8df4-c2e00a27ac7d",
"product_id": "4380c8af-64da-3c66-a394-7e712dc48a20",
"quantity": 1,
"observation": "Example Items * observation"
},
null
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": "object"
}
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.
Delete product request
requires authentication product-request delete
Delete a product request
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/product-requests/accusamus" \
--header "Authorization: Bearer Ega1ef3vd6baDc64Z5Ph8kV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/accusamus"
);
const headers = {
"Authorization": "Bearer Ega1ef3vd6baDc64Z5Ph8kV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Approve product request
requires authentication product-request approve
Approve a product request
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/product-requests/et/approve" \
--header "Authorization: Bearer 6d8fhEVk54eg6Dva1acZb3P" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/et/approve"
);
const headers = {
"Authorization": "Bearer 6d8fhEVk54eg6Dva1acZb3P",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": "object"
}
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.
Reject product request
requires authentication product-request reject
Reject a product request with a reason
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/product-requests/autem/reject" \
--header "Authorization: Bearer 6vVfZE1aPa5g4386heDkcbd" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reason\": \"Example Reason\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/autem/reject"
);
const headers = {
"Authorization": "Bearer 6vVfZE1aPa5g4386heDkcbd",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reason": "Example Reason"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": "object"
}
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.
Add items to request
requires authentication product-request update
Add one or more product items to the request
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/product-requests/velit/items" \
--header "Authorization: Bearer 64V3fhdDe1ka6agcPZbv8E5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"product_id\": \"4a36a320-74e5-3680-a960-4095c5a1b1c2\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/velit/items"
);
const headers = {
"Authorization": "Bearer 64V3fhdDe1ka6agcPZbv8E5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"product_id": "4a36a320-74e5-3680-a960-4095c5a1b1c2",
"quantity": 1,
"observation": "Example Items * observation"
},
null
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": "array"
}
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 item
requires authentication product-request update
Update a product item in the request
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/aut" \
--header "Authorization: Bearer DhZb661aEV3gac8k4fPdv5e" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"quantity\": 1,
\"observation\": \"Example Observation\",
\"status_id\": \"0f85de03-ac5e-3c1c-819c-5d08a2ceb725\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/aut"
);
const headers = {
"Authorization": "Bearer DhZb661aEV3gac8k4fPdv5e",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quantity": 1,
"observation": "Example Observation",
"status_id": "0f85de03-ac5e-3c1c-819c-5d08a2ceb725"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": "object"
}
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.
Remove items
requires authentication product-request update
Remove one or more product items from the request
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/product-requests/minus/items" \
--header "Authorization: Bearer 8c6Ea1gPVa3df6e45hbDkvZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"26145839-adaa-3ba9-a6b5-be50e03bce54\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/minus/items"
);
const headers = {
"Authorization": "Bearer 8c6Ea1gPVa3df6e45hbDkvZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"26145839-adaa-3ba9-a6b5-be50e03bce54"
]
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"deleted": "integer"
}
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.
Sync items
requires authentication product-request update
Replace all items in the request
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/product-requests/pariatur/sync-items" \
--header "Authorization: Bearer 36D6cVdE5aaheg8PfkZv4b1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"id\": \"78ca62b0-a7b4-368c-b2df-bf43845d4e75\",
\"product_id\": \"8cdab42d-2969-31aa-9de2-292576690a17\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/pariatur/sync-items"
);
const headers = {
"Authorization": "Bearer 36D6cVdE5aaheg8PfkZv4b1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"id": "78ca62b0-a7b4-368c-b2df-bf43845d4e75",
"product_id": "8cdab42d-2969-31aa-9de2-292576690a17",
"quantity": 1,
"observation": "Example Items * observation"
},
null
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": "object"
}
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.
Products
Endpoints for products
List products
requires authentication product index
List all products
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/products?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Brick&code=PROD-00003&is_epi=1&has_epi_type=" \
--header "Authorization: Bearer ecZfh65aabd1gP43kDv8EV6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "Brick",
"code": "PROD-00003",
"is_epi": "1",
"has_epi_type": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ecZfh65aabd1gP43kDv8EV6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "1b4ea1f4-da9a-3974-9341-3047f8c573ff",
"name": "Srta. Ayla Verdugo",
"code": "PRD-291900",
"stock": 618,
"product_family": {
"id": "a32930d6-43a3-4908-b2cc-61b3b4ca54ab",
"name": "Sra. Débora Luara Barreto Sobrinho"
},
"product_brand": {
"id": "a32930d6-4558-4d45-86dd-d4873f092a2c",
"name": "Dr. Allison Tamoio Mendonça Jr."
},
"unit": {
"id": "a32930d6-46f8-47f5-b717-badb0c30075e",
"name": "Sérgio Nelson Fernandes Sobrinho",
"abbreviation": "Dr. Hortência Vieira"
},
"image": {
"id": null,
"url": null
},
"epi_type": null,
"description": "Ab rerum odit labore voluptas placeat magni.",
"created_at": null,
"updated_at": null
},
{
"id": "8d9d1085-f777-3c54-ad56-07266b591973",
"name": "Gabi Valdez Lutero",
"code": "PRD-323561",
"stock": 12,
"product_family": {
"id": "a32930d6-4986-4817-b04c-858e32f4a85a",
"name": "Luis Barreto Jr."
},
"product_brand": {
"id": "a32930d6-4b1c-46f0-830c-c626e641b968",
"name": "Sebastião Willian Benez"
},
"unit": {
"id": "a32930d6-4c9c-4d67-83d1-320a643ad054",
"name": "Jaqueline Medina Batista",
"abbreviation": "James Ferreira Neto"
},
"image": {
"id": null,
"url": null
},
"epi_type": null,
"description": "Molestiae ex corrupti omnis ratione nulla quo.",
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Show product
requires authentication product show
Show a product
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/products/1" \
--header "Authorization: Bearer Zkfb4P866agD13V5dcEhvae" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/1"
);
const headers = {
"Authorization": "Bearer Zkfb4P866agD13V5dcEhvae",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "1693a0b5-4a51-3d0e-a3af-ae9788028ce7",
"name": "Laiane Danielle Amaral",
"code": "PRD-733570",
"stock": 1451,
"product_family": {
"id": "a32930d6-55d5-4047-8df9-09116942248a",
"name": "Dr. Jasmin Roque Sanches"
},
"product_brand": {
"id": "a32930d6-5796-4690-9ac6-9514ac5374ab",
"name": "Dr. Ariane Suellen Bezerra Jr."
},
"unit": {
"id": "a32930d6-5951-4187-b288-92c59adc532b",
"name": "Luzia Lozano Filho",
"abbreviation": "Letícia Velasques Filho"
},
"image": {
"id": null,
"url": null
},
"epi_type": null,
"description": "Praesentium qui voluptatum et necessitatibus optio.",
"created_at": null,
"updated_at": null
}
}
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.
List available origins
requires authentication product show
List supplier_products (NF items) with available quantity for the given product, ordered FIFO by NF date.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/products/commodi/available-origins" \
--header "Authorization: Bearer gEVafZv3P84ac5hb61ed6Dk" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/commodi/available-origins"
);
const headers = {
"Authorization": "Bearer gEVafZv3P84ac5hb61ed6Dk",
"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
vary: Origin
{
"message": "Unauthenticated."
}
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.
Create product
requires authentication product store
Create a new product
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/products" \
--header "Authorization: Bearer a61VvDZbPcEgak3856hf4ed" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"product_family_id\": \"4fa7d2b2-48ba-3844-808b-1659ac2d443a\",
\"product_brand_id\": \"5b25671e-98e5-3a6f-8e4a-e78cb36a6475\",
\"unit_id\": \"be0bedb3-0c36-322c-9045-fdcc83e91006\",
\"description\": \"Example Description\",
\"stock\": 1
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products"
);
const headers = {
"Authorization": "Bearer a61VvDZbPcEgak3856hf4ed",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"product_family_id": "4fa7d2b2-48ba-3844-808b-1659ac2d443a",
"product_brand_id": "5b25671e-98e5-3a6f-8e4a-e78cb36a6475",
"unit_id": "be0bedb3-0c36-322c-9045-fdcc83e91006",
"description": "Example Description",
"stock": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 product
requires authentication product update
Update a product
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/products/1" \
--header "Authorization: Bearer gaVeZhEb3v1a5686df4DcPk" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"product_family_id\": \"6bb68210-5907-3632-be44-a35f21c239ff\",
\"product_brand_id\": \"3086c489-b95c-31be-bf5e-be08cc1ef700\",
\"unit_id\": \"e0e41129-b871-3c9d-a8d1-39e5f7be1915\",
\"stock\": 1,
\"description\": \"Example Description\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/1"
);
const headers = {
"Authorization": "Bearer gaVeZhEb3v1a5686df4DcPk",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"product_family_id": "6bb68210-5907-3632-be44-a35f21c239ff",
"product_brand_id": "3086c489-b95c-31be-bf5e-be08cc1ef700",
"unit_id": "e0e41129-b871-3c9d-a8d1-39e5f7be1915",
"stock": 1,
"description": "Example Description"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete product
requires authentication product delete
Delete a product
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/products/et" \
--header "Authorization: Bearer 8a4kg6PEea6cf51bZVvD3hd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/et"
);
const headers = {
"Authorization": "Bearer 8a4kg6PEea6cf51bZVvD3hd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Project Versions
Endpoints for project revisions
Create revision
requires authentication project version
Create a new revision and update the project current file
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/projects/e95972e4-131e-3bd8-9bd9-825808e8333c/versions" \
--header "Authorization: Bearer a84EDP63v1ghfeZVdabc6k5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"notes\": \"Example Notes\",
\"responsible_user_id\": \"131ad279-6f0e-36d7-9e98-96363607b0a2\",
\"file\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example File path\",
\"name\": \"Example Name\",
\"size\": \"Example File size\",
\"extension\": \"Example File extension\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/e95972e4-131e-3bd8-9bd9-825808e8333c/versions"
);
const headers = {
"Authorization": "Bearer a84EDP63v1ghfeZVdabc6k5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"notes": "Example Notes",
"responsible_user_id": "131ad279-6f0e-36d7-9e98-96363607b0a2",
"file": {
"0": "example1",
"1": "example2",
"path": "Example File path",
"name": "Example Name",
"size": "Example File size",
"extension": "Example File extension"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
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.
List revisions
requires authentication project show
List all revisions of a project
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/projects/6650e9de-7a1a-3158-a5c2-043abb9f698d/versions" \
--header "Authorization: Bearer 4DPV6avd8Zb16ec53ahgfEk" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/6650e9de-7a1a-3158-a5c2-043abb9f698d/versions"
);
const headers = {
"Authorization": "Bearer 4DPV6avd8Zb16ec53ahgfEk",
"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
vary: Origin
{
"message": "Unauthenticated."
}
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.
Show revision
requires authentication project show
Show a specific revision
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/project-versions/536f295e-789c-3754-9c42-14cbf8cd8649" \
--header "Authorization: Bearer vPDd81fg6aVcEk5Zh64a3eb" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/536f295e-789c-3754-9c42-14cbf8cd8649"
);
const headers = {
"Authorization": "Bearer vPDd81fg6aVcEk5Zh64a3eb",
"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
vary: Origin
{
"message": "Unauthenticated."
}
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.
Download revision
requires authentication project show
Generate a signed URL to download a revision
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/project-versions/2723bda2-9c3a-3de7-8697-454576429ab3/download" \
--header "Authorization: Bearer 86hZ34eD61afg5bdkVcaEvP" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/2723bda2-9c3a-3de7-8697-454576429ab3/download"
);
const headers = {
"Authorization": "Bearer 86hZ34eD61afg5bdkVcaEvP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"url": "string",
"filename": "string",
"size": "string",
"version_number": "integer"
}
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.
Restore revision
requires authentication project version
Restore a revision as the current file
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/project-versions/156b352c-0248-3ce9-8654-b796524e50d9/restore" \
--header "Authorization: Bearer E5b4Vadgvc36eDkh1aZf8P6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/156b352c-0248-3ce9-8654-b796524e50d9/restore"
);
const headers = {
"Authorization": "Bearer E5b4Vadgvc36eDkh1aZf8P6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete revision
requires authentication project version
Soft delete a revision
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/project-versions/a225b33c-0034-3694-befa-a1d88475da2d" \
--header "Authorization: Bearer 6ZgEdf8h4VPbv6kD13ac5ea" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/a225b33c-0034-3694-befa-a1d88475da2d"
);
const headers = {
"Authorization": "Bearer 6ZgEdf8h4VPbv6kD13ac5ea",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Projects
Endpoints for engineering projects
List projects
requires authentication project index
List all projects
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/projects?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=El%C3%A9trico&discipline_id=5b9dae3e-8689-36cd-b5fa-7e8324d33ba0&work_id=92448b5a-e439-370d-9cf9-acf18fdc7652&status_id=41c88b04-0a45-3f5f-9f11-ac600295e020&responsible_id=a30bc0d1-d0a9-3600-8b5f-31641fb67db5" \
--header "Authorization: Bearer PbhZvEe8a416f5gVa3D6ckd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "Elétrico",
"discipline_id": "5b9dae3e-8689-36cd-b5fa-7e8324d33ba0",
"work_id": "92448b5a-e439-370d-9cf9-acf18fdc7652",
"status_id": "41c88b04-0a45-3f5f-9f11-ac600295e020",
"responsible_id": "a30bc0d1-d0a9-3600-8b5f-31641fb67db5",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer PbhZvEe8a416f5gVa3D6ckd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "108675b8-5d85-3fb4-9e83-b5343d06a082",
"name": "Velit cupiditate sit",
"description": "Voluptas non est cumque saepe autem qui.",
"current_version": 1,
"file": {
"path": "projects/e8fa15a9-b004-37c5-a626-ad3a9f333301.pdf",
"size": "2398968",
"extension": "pdf"
},
"discipline": {
"id": "a32930db-7d68-4155-90ec-f69bd9fd60ea",
"name": "Ipsum",
"code": "NBD"
},
"created_at": null,
"updated_at": null
},
{
"id": "3acda458-b5b4-356e-8d9f-7f24879a3176",
"name": "Ut sapiente tempore",
"description": "Qui ab sed recusandae aut aut.",
"current_version": 1,
"file": {
"path": "projects/fea45120-38c2-307d-a06f-aa82e3650f8f.pdf",
"size": "4710140",
"extension": "pdf"
},
"discipline": {
"id": "a32930db-8091-439b-82dc-37597bdca3b8",
"name": "Ipsa",
"code": "MQT"
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Show project
requires authentication project show
Show a project
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/projects/13" \
--header "Authorization: Bearer Z18dVc3a5fkDvg66E4haPeb" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/13"
);
const headers = {
"Authorization": "Bearer Z18dVc3a5fkDvg66E4haPeb",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "01f46d85-02ea-3f76-a9d7-63f0522f5c3a",
"name": "Neque voluptas soluta",
"description": "Commodi beatae aut officiis eligendi.",
"current_version": 1,
"file": {
"path": "projects/84ccda29-cc45-38b7-8573-b1f140e31aed.pdf",
"size": "85459",
"extension": "pdf"
},
"discipline": {
"id": "a32930db-881f-453d-85d0-e962b3e3d8da",
"name": "Deleniti",
"code": "DCU"
},
"created_at": null,
"updated_at": null
}
}
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.
Create project
requires authentication project store
Create a new project and its first revision (R00)
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/projects" \
--header "Authorization: Bearer V4d183E6vDP6bahafkegZ5c" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"discipline_id\": \"3b6a878e-2fa4-3296-aab2-99413e8b12c0\",
\"work_id\": \"d8d4ebcb-c775-3443-813b-11a0fc3d53a5\",
\"responsible_user_id\": \"ee4d01b4-a1fe-3002-b3e2-a36ada45e481\",
\"notes\": \"Example Notes\",
\"file\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example File path\",
\"name\": \"Example Name\",
\"size\": \"Example File size\",
\"extension\": \"Example File extension\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects"
);
const headers = {
"Authorization": "Bearer V4d183E6vDP6bahafkegZ5c",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"discipline_id": "3b6a878e-2fa4-3296-aab2-99413e8b12c0",
"work_id": "d8d4ebcb-c775-3443-813b-11a0fc3d53a5",
"responsible_user_id": "ee4d01b4-a1fe-3002-b3e2-a36ada45e481",
"notes": "Example Notes",
"file": {
"0": "example1",
"1": "example2",
"path": "Example File path",
"name": "Example Name",
"size": "Example File size",
"extension": "Example File extension"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 project
requires authentication project update
Update a project (metadata only)
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/projects/17" \
--header "Authorization: Bearer 3hdbDgPkaV14Eefa86Zc65v" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"discipline_id\": \"ace4d950-645f-31ec-9d33-ae0675d23ad4\",
\"work_id\": \"d43745e9-34d4-3a00-9d6d-d22b47847333\",
\"responsible_user_id\": \"4345d769-a504-387b-9763-26f2dcb49006\",
\"status_id\": \"cda8a249-cbfe-3adc-80ea-0e0efcb94e40\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/17"
);
const headers = {
"Authorization": "Bearer 3hdbDgPkaV14Eefa86Zc65v",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"discipline_id": "ace4d950-645f-31ec-9d33-ae0675d23ad4",
"work_id": "d43745e9-34d4-3a00-9d6d-d22b47847333",
"responsible_user_id": "4345d769-a504-387b-9763-26f2dcb49006",
"status_id": "cda8a249-cbfe-3adc-80ea-0e0efcb94e40"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete project
requires authentication project delete
Delete a project and its revisions
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/projects/aut" \
--header "Authorization: Bearer Z8E41h3gVbcv5akeD6Pd6af" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/aut"
);
const headers = {
"Authorization": "Bearer Z8E41h3gVbcv5akeD6Pd6af",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Reports
Endpoints for reports
Generate RDO PDF
requires authentication daily-log show
Dispatches async PDF generation. Frontend receives notification via Pusher when ready.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/daily-log" \
--header "Authorization: Bearer h3e6EvgDZ641fabcP5Vkda8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"daily_log\": \"ipsum\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/daily-log"
);
const headers = {
"Authorization": "Bearer h3e6EvgDZ641fabcP5Vkda8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"daily_log": "ipsum"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
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.
Generate EPI term PDF
requires authentication employee-epi show
Dispatches async PDF generation. Frontend receives notification via Pusher when ready.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/epi-term" \
--header "Authorization: Bearer 6dVP3DEb4e1gv6cZ5faahk8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"employee\": \"cupiditate\",
\"kit_uuid\": \"9dd33e37-0dd4-3320-820e-916cf0804b0a\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/epi-term"
);
const headers = {
"Authorization": "Bearer 6dVP3DEb4e1gv6cZ5faahk8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"employee": "cupiditate",
"kit_uuid": "9dd33e37-0dd4-3320-820e-916cf0804b0a"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
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.
Generate employee sheet PDF
requires authentication No specific permission required
Dispatches async PDF generation of the employee record. Frontend receives notification via Pusher when ready.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/employee-sheet" \
--header "Authorization: Bearer 6EP64gh85ea1cbvZ3kVDadf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"employee\": \"ducimus\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/employee-sheet"
);
const headers = {
"Authorization": "Bearer 6EP64gh85ea1cbvZ3kVDadf",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"employee": "ducimus"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
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.
Cost center panel
requires authentication cost-center report
Totais por centro de custo no período, somados pela árvore. Devolve dois blocos declarados e separados: desembolso (fecha com o caixa e o banco) e custo apropriado por obra. Os dois não se somam — material comprado num mês e entregue em outro aparece em cada bloco no seu momento.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/cost-center?date_start=2026-11-01&date_end=2026-11-30&works[]=36ef0889-7ff3-385d-850a-54b9776af45f&cost_centers[]=f43a1657-c2a6-39e6-ad6e-08d075bfdd97&format=xlsx" \
--header "Authorization: Bearer bcD3eafdVEh61P5k4v6agZ8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/cost-center"
);
const params = {
"date_start": "2026-11-01",
"date_end": "2026-11-30",
"works[0]": "36ef0889-7ff3-385d-850a-54b9776af45f",
"cost_centers[0]": "f43a1657-c2a6-39e6-ad6e-08d075bfdd97",
"format": "xlsx",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer bcD3eafdVEh61P5k4v6agZ8",
"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
vary: Origin
{
"message": "Unauthenticated."
}
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.
Cost center entries
requires authentication cost-center report
Lançamentos que formam um total do painel, paginados e em ordem de data. O centro informado inclui a subárvore, então clicar no total de um grupo lista o que veio dos filhos também.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/cost-center/entries?search=officiis&sort_by=amount&sort_desc=1&per_page=10" \
--header "Authorization: Bearer Db8P5av3VkhEa4fgZe66dc1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_start\": \"2026-11-06\",
\"date_end\": \"2048-12-15\",
\"block\": \"disbursement\",
\"cost_center_id\": \"562acfd8-ee17-3a95-8a7e-79598da73986\",
\"without_cost_center\": false,
\"type\": \"labor\",
\"per_page\": 8,
\"search\": \"jjdjghupevgaqdqezi\",
\"sort_by\": \"amount\",
\"sort_desc\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/cost-center/entries"
);
const params = {
"search": "officiis",
"sort_by": "amount",
"sort_desc": "1",
"per_page": "10",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Db8P5av3VkhEa4fgZe66dc1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date_start": "2026-11-06",
"date_end": "2048-12-15",
"block": "disbursement",
"cost_center_id": "562acfd8-ee17-3a95-8a7e-79598da73986",
"without_cost_center": false,
"type": "labor",
"per_page": 8,
"search": "jjdjghupevgaqdqezi",
"sort_by": "amount",
"sort_desc": true
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
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.
Export cost center panel
requires authentication cost-center report
Gera a planilha do painel com os filtros atuais. XLSX sai com três abas (um total por bloco, mais os lançamentos); CSV sai com as mesmas três coisas em seções. O arquivo é gerado em fila e chega por notificação.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/cost-center/excel?date_start=2026-11-01&date_end=2026-11-30&works[]=b857e2e0-0cee-323d-9292-b0123cbc7476&cost_centers[]=8c78c33c-74e3-3a5a-b6ca-e1b66034ff3f&format=xlsx" \
--header "Authorization: Bearer ZhP4fDa8k61vcbgV356adeE" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/cost-center/excel"
);
const params = {
"date_start": "2026-11-01",
"date_end": "2026-11-30",
"works[0]": "b857e2e0-0cee-323d-9292-b0123cbc7476",
"cost_centers[0]": "8c78c33c-74e3-3a5a-b6ca-e1b66034ff3f",
"format": "xlsx",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ZhP4fDa8k61vcbgV356adeE",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (202):
{
"message": "Relatório sendo gerado. Você será notificado quando estiver pronto.",
"channel": "reports.{uuid}",
"event": "excel-report.completed"
}
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.
Export Cash Flow to Excel
requires authentication No specific permission required
Dispatches async Excel generation. Frontend receives notification via Pusher when ready.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/cash-flow/excel?q=saepe&type=entrada&description=Et+accusamus+consequatur+officiis+doloremque+quas+fugit+veniam+sapiente.&categories[]=f1b4770b-d7d4-32a5-8498-f003e1bb32f3&exclude_categories[]=1e000a51-3396-3038-b3d9-ce920db2d8a9&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=0e60399a-73b8-3a73-b545-b6ebb144e664&customers[]=d7f2f560-210c-31d8-9f0d-38206e93d980&suppliers[]=e8fe7ff9-05b0-3350-89c0-3c71bf404f29&cash_session=444c7259-8815-3149-92ba-32fc207ad861&works[]=84617cec-b823-379e-b072-62f80395746e" \
--header "Authorization: Bearer bV6Pdkg4DaE3ae518chvZf6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/cash-flow/excel"
);
const params = {
"q": "saepe",
"type": "entrada",
"description": "Et accusamus consequatur officiis doloremque quas fugit veniam sapiente.",
"categories[0]": "f1b4770b-d7d4-32a5-8498-f003e1bb32f3",
"exclude_categories[0]": "1e000a51-3396-3038-b3d9-ce920db2d8a9",
"date_start": "2026-01-01",
"date_end": "2026-12-31",
"bank_accounts[0]": "0e60399a-73b8-3a73-b545-b6ebb144e664",
"customers[0]": "d7f2f560-210c-31d8-9f0d-38206e93d980",
"suppliers[0]": "e8fe7ff9-05b0-3350-89c0-3c71bf404f29",
"cash_session": "444c7259-8815-3149-92ba-32fc207ad861",
"works[0]": "84617cec-b823-379e-b072-62f80395746e",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer bV6Pdkg4DaE3ae518chvZf6",
"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
vary: Origin
{
"message": "Unauthenticated."
}
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/reports/cash-flow
No specific permission required
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/cash-flow?q=magni&type=entrada&description=Eum+hic+voluptas+voluptas+itaque+corrupti.&categories[]=c63189d1-c500-3ad1-8bbe-f842004c49b4&exclude_categories[]=3e1e3cf5-0969-39c4-a3fe-ef0864b8c1b6&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=85fea1c9-da8f-3d24-afa9-d3d32bf7236a&customers[]=490f9b44-4dc0-3088-8e37-859e4148581a&suppliers[]=f8bfda99-2022-35bb-96b3-3d7fbeac80c7&cash_session=678926bd-d5b9-3591-8f71-a233a51be286&works[]=8786a595-83bf-315e-b4ae-38615d313357" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/cash-flow"
);
const params = {
"q": "magni",
"type": "entrada",
"description": "Eum hic voluptas voluptas itaque corrupti.",
"categories[0]": "c63189d1-c500-3ad1-8bbe-f842004c49b4",
"exclude_categories[0]": "3e1e3cf5-0969-39c4-a3fe-ef0864b8c1b6",
"date_start": "2026-01-01",
"date_end": "2026-12-31",
"bank_accounts[0]": "85fea1c9-da8f-3d24-afa9-d3d32bf7236a",
"customers[0]": "490f9b44-4dc0-3088-8e37-859e4148581a",
"suppliers[0]": "f8bfda99-2022-35bb-96b3-3d7fbeac80c7",
"cash_session": "678926bd-d5b9-3591-8f71-a233a51be286",
"works[0]": "8786a595-83bf-315e-b4ae-38615d313357",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"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
vary: Origin
{
"message": "Unauthenticated."
}
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.
Export Accounts Payable/Receivable to Excel
requires authentication No specific permission required
Dispatches async Excel generation. Frontend receives notification via Pusher when ready.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/accounts-payable-receivable/excel" \
--header "Authorization: Bearer k3d61bZ8DcvgPEVhaa54f6e" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/accounts-payable-receivable/excel"
);
const headers = {
"Authorization": "Bearer k3d61bZ8DcvgPEVhaa54f6e",
"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
vary: Origin
{
"message": "Unauthenticated."
}
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/reports/accounts-payable-receivable
No specific permission required
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/accounts-payable-receivable" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/accounts-payable-receivable"
);
const headers = {
"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
vary: Origin
{
"message": "Unauthenticated."
}
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.
Sectors
Endpoints for sectors
List sectors
requires authentication sector index
List all sectors
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/sectors?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Tecnologia" \
--header "Authorization: Bearer bv3hgDeEcPa584Zfa61dVk6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "Tecnologia",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer bv3hgDeEcPa584Zfa61dVk6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "a680de73-d489-3949-9d5d-701270bf9933",
"name": "occaecati eveniet",
"slug": null,
"description": "Non doloribus corporis quasi eum vitae rerum. Aut occaecati consequatur aliquid dolores consequatur ut numquam tempora. Qui eos labore sed excepturi fugiat officia.",
"abbreviation": null,
"created_at": null,
"updated_at": null
},
{
"id": "892f646e-be72-3eac-8a58-f0000157aa73",
"name": "ut qui",
"slug": null,
"description": null,
"abbreviation": null,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Create sector
requires authentication sector store
Create a new sector
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/sectors" \
--header "Authorization: Bearer fDa3Ved4v15h8E6ZkPag6bc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"slug\": \"Example Slug\",
\"description\": \"Example Description\",
\"abbreviation\": \"Example Abbreviation\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"url\": \"https:\\/\\/example.com\",
\"name\": \"Example Name\",
\"size\": \"Example Image size\",
\"extension\": \"Example Image extension\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors"
);
const headers = {
"Authorization": "Bearer fDa3Ved4v15h8E6ZkPag6bc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"slug": "Example Slug",
"description": "Example Description",
"abbreviation": "Example Abbreviation",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"url": "https:\/\/example.com",
"name": "Example Name",
"size": "Example Image size",
"extension": "Example Image extension"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 sector
requires authentication sector show
Get a sector
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/sectors/11" \
--header "Authorization: Bearer D3h81acP56vZEV6dgekf4ba" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/11"
);
const headers = {
"Authorization": "Bearer D3h81acP56vZEV6dgekf4ba",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "c7749898-2c0e-3c07-b4a2-4a28ba542f27",
"name": "consequatur a",
"slug": null,
"description": "Ut sit omnis nesciunt voluptatem occaecati autem. Est dolor occaecati optio. Laudantium velit quod et ut dolorem. Veniam id et voluptatum totam.",
"abbreviation": "nnr",
"created_at": null,
"updated_at": null
}
}
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 sector
requires authentication sector update
Update a sector
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/sectors/1" \
--header "Authorization: Bearer eh4vDZa3g1Ef8aPVb5k6d6c" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"slug\": \"Example Slug\",
\"description\": \"Example Description\",
\"abbreviation\": \"Example Abbreviation\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"url\": \"https:\\/\\/example.com\",
\"name\": \"Example Name\",
\"size\": \"Example Image size\",
\"extension\": \"Example Image extension\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/1"
);
const headers = {
"Authorization": "Bearer eh4vDZa3g1Ef8aPVb5k6d6c",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"slug": "Example Slug",
"description": "Example Description",
"abbreviation": "Example Abbreviation",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"url": "https:\/\/example.com",
"name": "Example Name",
"size": "Example Image size",
"extension": "Example Image extension"
}
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete sector
requires authentication sector delete
Delete a sector
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/sectors/3" \
--header "Authorization: Bearer P3Va8Evk1a46gcdb6h5DefZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/3"
);
const headers = {
"Authorization": "Bearer P3Va8Evk1a46gcdb6h5DefZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
List sector users
requires authentication sector show
List all users assigned to a sector
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users" \
--header "Authorization: Bearer k6Vaa13Z8fhbDedg6cv4PE5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users"
);
const headers = {
"Authorization": "Bearer k6Vaa13Z8fhbDedg6cv4PE5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "9f6283fc-b198-360e-bfe3-04faef3d1ee6",
"name": "Terry Boyle",
"username": "merle35",
"email": "queen03@example.net",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "fd976a0e-5015-3805-b688-0bf12e85efa9",
"name": "Mrs. Daniela Lubowitz",
"username": "austyn54",
"email": "feil.brooks@example.com",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Attach users to sector
requires authentication sector users attach
Attach users to a sector without removing existing ones. Expects an array of user UUIDs in the "users" field.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/attach" \
--header "Authorization: Bearer 5Zb66afahc1P4kDdveE8gV3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"af3acd4d-8633-38fa-a271-572b0e1a6359\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/attach"
);
const headers = {
"Authorization": "Bearer 5Zb66afahc1P4kDdveE8gV3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"af3acd4d-8633-38fa-a271-572b0e1a6359"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Users attached successfully"
}
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.
Detach users from sector
requires authentication sector users detach
Remove specific users from a sector. Expects an array of user UUIDs in the "users" field.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/detach" \
--header "Authorization: Bearer 3dh81Pe66g5ckEfaavZbDV4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"7d8145c2-46b6-324a-ae3d-91af2f3f3b6b\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/detach"
);
const headers = {
"Authorization": "Bearer 3dh81Pe66g5ckEfaavZbDV4",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"7d8145c2-46b6-324a-ae3d-91af2f3f3b6b"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Users detached successfully"
}
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.
Sync sector users
requires authentication sector users sync
Replace all sector users with the provided list. Expects an array of user UUIDs in the "users" field.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/sync" \
--header "Authorization: Bearer E3h5vV68adZag6Pf4e1bDkc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"186513ce-c403-3cdb-b7a0-870a8e4b43b9\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/sync"
);
const headers = {
"Authorization": "Bearer E3h5vV68adZag6Pf4e1bDkc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"186513ce-c403-3cdb-b7a0-870a8e4b43b9"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Users synchronized successfully"
}
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.
Status Modules
Endpoints for modules that have status
List status modules
requires authentication status index
List all modules that have status functionality
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/status-modules" \
--header "Authorization: Bearer Db8v1eVg45a6Phd6EaZ3cfk" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/status-modules"
);
const headers = {
"Authorization": "Bearer Db8v1eVg45a6Phd6EaZ3cfk",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"name": "non excepturi",
"slug": "quos-hic-quis-nihil-at-aliquid"
},
{
"name": "alias et",
"slug": "ut-hic-aut-delectus-odio"
}
]
}
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.
Statuses
Endpoints for statuses
List statuses
requires authentication status index
List all statuses
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/statuses?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Em+andamento&module=work§or_id=019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer bZagc6V4v16akhfdD58Pe3E" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/statuses"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "Em andamento",
"module": "work",
"sector_id": "019556e7-2e9f-777c-a177-30bbf0646c32",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer bZagc6V4v16akhfdD58Pe3E",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "e269f88d-86af-3834-9e94-05421e0c2bce",
"slug": null,
"name": null,
"description": "Denise Caldeira Corona Sobrinho",
"abbreviation": "sed",
"color": "#d1f09f",
"text_color": "#cd4bb3",
"module": {
"name": "Solicitação de Produtos",
"slug": "product_request"
},
"created_at": null,
"updated_at": null
},
{
"id": "3ac444bd-16c5-3baa-8df3-56dd6caa6fc4",
"slug": null,
"name": null,
"description": "Sra. Noa Flor Ramos Jr.",
"abbreviation": "doloremque",
"color": "#626167",
"text_color": "#1bd4d8",
"module": {
"name": "Obras",
"slug": "work"
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Create status
requires authentication status store
Create a new status
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/statuses" \
--header "Authorization: Bearer Zvg16bakEhV5a8Dc34edP6f" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"slug\": \"Example Slug\",
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"abbreviation\": \"Example Abbreviation\",
\"module\": \"Example Module\",
\"sector_id\": \"3c24ef9f-47c3-3721-8d2c-41ccede074b6\",
\"color\": \"Example Color\",
\"text_color\": \"Example Text color\",
\"order\": 1,
\"is_initial\": true,
\"is_final\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/statuses"
);
const headers = {
"Authorization": "Bearer Zvg16bakEhV5a8Dc34edP6f",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"slug": "Example Slug",
"name": "Example Name",
"description": "Example Description",
"abbreviation": "Example Abbreviation",
"module": "Example Module",
"sector_id": "3c24ef9f-47c3-3721-8d2c-41ccede074b6",
"color": "Example Color",
"text_color": "Example Text color",
"order": 1,
"is_initial": true,
"is_final": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 status
requires authentication status show
Get a status
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/statuses/1" \
--header "Authorization: Bearer hZPdaaEk1634fcV6bgeD85v" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/statuses/1"
);
const headers = {
"Authorization": "Bearer hZPdaaEk1634fcV6bgeD85v",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "6ed4898a-255b-33f9-995b-154127d1ce88",
"slug": null,
"name": null,
"description": "Anderson Rogério Carvalho Sobrinho",
"abbreviation": "fugiat",
"color": "#5748cd",
"text_color": "#e460b0",
"created_at": null,
"updated_at": null
}
}
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 status
requires authentication status update
Update a status
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/statuses/1" \
--header "Authorization: Bearer ab1ZadPve43fk6cVgDE856h" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"slug\": \"Example Slug\",
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"abbreviation\": \"Example Abbreviation\",
\"module\": \"Example Module\",
\"sector_id\": \"8d42a0f9-45d0-37c7-aad7-1ab12d27855e\",
\"color\": \"Example Color\",
\"text_color\": \"Example Text color\",
\"order\": 1,
\"is_initial\": true,
\"is_final\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/statuses/1"
);
const headers = {
"Authorization": "Bearer ab1ZadPve43fk6cVgDE856h",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"slug": "Example Slug",
"name": "Example Name",
"description": "Example Description",
"abbreviation": "Example Abbreviation",
"module": "Example Module",
"sector_id": "8d42a0f9-45d0-37c7-aad7-1ab12d27855e",
"color": "Example Color",
"text_color": "Example Text color",
"order": 1,
"is_initial": true,
"is_final": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete status
requires authentication status delete
Delete a status
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/statuses/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer e3Ddavb46E5g1c6a8khfVPZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/statuses/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer e3Ddavb46E5g1c6a8khfVPZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Stock
Endpoints for stock management
List stocks available for transfer
requires authentication stock index
Returns a list of stock items from other works that have the specified product available for transfer
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/stocks/available-for-transfer?product_id=019556e7-2e9f-777c-a177-30bbf0646c32&exclude_work_id=019556e7-2e9f-777c-a177-30bbf0646c33&min_quantity=1" \
--header "Authorization: Bearer Ze638a6Dgbdv1V5fPkEa4ch" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/stocks/available-for-transfer"
);
const params = {
"product_id": "019556e7-2e9f-777c-a177-30bbf0646c32",
"exclude_work_id": "019556e7-2e9f-777c-a177-30bbf0646c33",
"min_quantity": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Ze638a6Dgbdv1V5fPkEa4ch",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "3384d11b-285c-3801-8660-85909f0f71d7",
"quantity": 398.1225,
"min_quantity": null,
"max_quantity": null,
"below_minimum": false,
"above_maximum": false,
"created_at": null,
"updated_at": null
},
{
"id": "d44c3dd5-e2ab-316c-98a4-40926959db21",
"quantity": 838.2157,
"min_quantity": null,
"max_quantity": null,
"below_minimum": false,
"above_maximum": false,
"created_at": null,
"updated_at": null
}
]
}
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.
List stocks
requires authentication stock index
Returns a paginated list of stocks
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/stocks?sort_by=created_at&sort_desc=1&page=1&per_page=10&q=Main+Stock&module=work&is_active=1" \
--header "Authorization: Bearer 35E6adcfgeab8hkv41VZDP6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/stocks"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "10",
"q": "Main Stock",
"module": "work",
"is_active": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 35E6adcfgeab8hkv41VZDP6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "d4590cfe-7458-34b5-bff9-cb97cff2a072",
"name": "Estoque Burgos S.A.",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
},
{
"id": "afc05711-96c7-3419-90b0-94a19914b55d",
"name": "Estoque Teles e Marés",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Create stock
requires authentication stock store
Creates a new stock linked to a module
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/stocks" \
--header "Authorization: Bearer 6hPa8DdgZ3cV5vkf6e1Eba4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"module\": \"Example Module\",
\"id\": \"Example Id\",
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/stocks"
);
const headers = {
"Authorization": "Bearer 6hPa8DdgZ3cV5vkf6e1Eba4",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"module": "Example Module",
"id": "Example Id",
"is_active": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "cb8533c1-fe5e-3f03-b113-8a7c5b0c9c98",
"name": "Estoque Uchoa S.A.",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
}
}
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 main stock
requires authentication stock.main show
Returns the main stock
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/stocks/main" \
--header "Authorization: Bearer e8DEabPacvgVhZ361f54k6d" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/stocks/main"
);
const headers = {
"Authorization": "Bearer e8DEabPacvgVhZ361f54k6d",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "f1fb18a1-9e86-3adb-b28e-d3002797eb03",
"name": "Estoque Mendonça e Estrada S.A.",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
}
}
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.
Show stock
requires authentication stock show
Returns details of a specific stock
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/stocks/1" \
--header "Authorization: Bearer Zhef4dP6D8gvcE61a5Vbka3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/stocks/1"
);
const headers = {
"Authorization": "Bearer Zhef4dP6D8gvcE61a5Vbka3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "c48d380e-94cf-38f6-ab24-d75cb77d73e1",
"name": "Estoque Espinoza Comercial Ltda.",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
}
}
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 stock
requires authentication stock update
Updates an existing stock
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/stocks/1" \
--header "Authorization: Bearer ZkdVvaDP3hfc861eb654aEg" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/stocks/1"
);
const headers = {
"Authorization": "Bearer ZkdVvaDP3hfc861eb654aEg",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"is_active": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "af484b8d-8665-3ced-9bb1-d1838110624c",
"name": "Estoque da Silva e Associados",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
}
}
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.
Delete stock
requires authentication stock delete
Removes a stock (soft delete)
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/stocks/1" \
--header "Authorization: Bearer afav6ebhVk5c1d6DE8Z3gP4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/stocks/1"
);
const headers = {
"Authorization": "Bearer afav6ebhVk5c1d6DE8Z3gP4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());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.
List stock items
requires authentication stock show
Returns a paginated list of items/products in a stock
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/stocks/019556e7-2e9f-777c-a177-30bbf0646c32/items?sort_by=created_at&sort_desc=1&page=1&per_page=10&q=Cement&below_minimum=1&above_maximum=" \
--header "Authorization: Bearer dhaVkcae86gP4E3b1ZD5vf6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/stocks/019556e7-2e9f-777c-a177-30bbf0646c32/items"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "10",
"q": "Cement",
"below_minimum": "1",
"above_maximum": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer dhaVkcae86gP4E3b1ZD5vf6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "a6096f32-114e-3f4a-a463-12b0c63ebe2f",
"quantity": 276.8248,
"min_quantity": null,
"max_quantity": null,
"below_minimum": false,
"above_maximum": false,
"created_at": null,
"updated_at": null
},
{
"id": "3a85165c-3834-35ff-a6e1-1354caac8d29",
"quantity": 250.9521,
"min_quantity": null,
"max_quantity": null,
"below_minimum": false,
"above_maximum": false,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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 stock item
requires authentication stock update
Updates min/max quantity thresholds for a stock item
Example request:
curl --request PATCH \
"https://api.bs-homolog.pensou.app.br/api/stocks/1/items/esse" \
--header "Authorization: Bearer ZcafVe8PhDb1v36E56dga4k" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"min_quantity\": 10,
\"max_quantity\": 100
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/stocks/1/items/esse"
);
const headers = {
"Authorization": "Bearer ZcafVe8PhDb1v36E56dga4k",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"min_quantity": 10,
"max_quantity": 100
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "eb33621f-ca16-3411-9250-aba3fbddea4a",
"quantity": 832.0551,
"min_quantity": null,
"max_quantity": null,
"below_minimum": false,
"above_maximum": false,
"created_at": null,
"updated_at": null
}
}
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.
Stock summary
requires authentication stock show
Returns a summary with totals and alerts for the stock
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/stocks/019556e7-2e9f-777c-a177-30bbf0646c32/summary" \
--header "Authorization: Bearer 1evd8k5bfDa3ZEach4gV66P" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/stocks/019556e7-2e9f-777c-a177-30bbf0646c32/summary"
);
const headers = {
"Authorization": "Bearer 1evd8k5bfDa3ZEach4gV66P",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"total_products": 15,
"total_quantity": 1250.5,
"total_value": 18750.4,
"current_value": 9000,
"consumed_value": 9750.4,
"unvalued_quantity": 5,
"items_below_minimum": 3,
"items_above_maximum": 1
}
}
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.
Stock Movements
Endpoints for stock movement management
List movements
requires authentication stock.movement index
Returns a paginated list of movements for a stock
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/stocks/1/movements?sort_by=created_at&sort_desc=1&page=1&per_page=10&type=entry&product_id=019556e7-2e9f-777c-a177-30bbf0646c32&date_start=2024-01-01&date_end=2024-12-31" \
--header "Authorization: Bearer aZ8bcgVDef16hdv6Pk3a54E" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/stocks/1/movements"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "10",
"type": "entry",
"product_id": "019556e7-2e9f-777c-a177-30bbf0646c32",
"date_start": "2024-01-01",
"date_end": "2024-12-31",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer aZ8bcgVDef16hdv6Pk3a54E",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "59458364-23c2-33ec-809f-b7a1dbb17563",
"code": "MOV-338593",
"type": "devolução",
"type_name": "RETURN",
"is_entry": true,
"is_exit": false,
"quantity": 60.8191,
"previous_quantity": 97.3462,
"new_quantity": 158.1653,
"reason": "Sapiente magni ipsam accusantium cupiditate aut quisquam deserunt.",
"movement_date": "2026-10-31T17:08:25.000000Z",
"created_at": null
},
{
"id": "8b772ede-fd0c-31ff-a6fc-783a1c1da077",
"code": "MOV-656637",
"type": "compra",
"type_name": "PURCHASE",
"is_entry": true,
"is_exit": false,
"quantity": 66.799,
"previous_quantity": 47.5874,
"new_quantity": 114.3864,
"reason": null,
"movement_date": "2026-10-09T06:18:13.000000Z",
"created_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Create movement
requires authentication stock.movement store
Creates a new entry or exit movement in the stock
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/stocks/1/movements" \
--header "Authorization: Bearer 4vdP5h6E6a31Dkb8gcaZeVf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"9afbeaf1-3f64-3b4c-96c7-d7fa6e294134\",
\"type\": \"Example Type\",
\"quantity\": 1,
\"reason\": \"Example Reason\",
\"reference_type\": \"Example Reference type\",
\"reference_id\": 1,
\"movement_date\": \"2024-01-01\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/stocks/1/movements"
);
const headers = {
"Authorization": "Bearer 4vdP5h6E6a31Dkb8gcaZeVf",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "9afbeaf1-3f64-3b4c-96c7-d7fa6e294134",
"type": "Example Type",
"quantity": 1,
"reason": "Example Reason",
"reference_type": "Example Reference type",
"reference_id": 1,
"movement_date": "2024-01-01"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "de75af43-9361-3c9b-a810-6da8b136e979",
"code": "MOV-283712",
"type": "venda",
"type_name": "SALE",
"is_entry": false,
"is_exit": true,
"quantity": 35.68,
"previous_quantity": 835.4658,
"new_quantity": 799.7858,
"reason": "Eaque corporis doloremque voluptas enim.",
"movement_date": "2026-10-30T17:25:38.000000Z",
"created_at": null
}
}
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.
Transfer between stocks
requires authentication stock.movement transfer
Transfers products from one stock to another
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/stocks/019556e7-2e9f-777c-a177-30bbf0646c32/movements/transfer" \
--header "Authorization: Bearer 4vbfV1gh5EPa6ec8Dk36dZa" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"80eb359d-a9bf-35e3-bf35-2ddf08f74991\",
\"destination_stock_id\": \"3009a95c-3f1c-3628-8d87-11d1abf5f1f3\",
\"quantity\": 1,
\"reason\": \"Example Reason\",
\"movement_date\": \"2024-01-01\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/stocks/019556e7-2e9f-777c-a177-30bbf0646c32/movements/transfer"
);
const headers = {
"Authorization": "Bearer 4vbfV1gh5EPa6ec8Dk36dZa",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "80eb359d-a9bf-35e3-bf35-2ddf08f74991",
"destination_stock_id": "3009a95c-3f1c-3628-8d87-11d1abf5f1f3",
"quantity": 1,
"reason": "Example Reason",
"movement_date": "2024-01-01"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "c476b295-c944-39f9-9af8-6c6036038c8a",
"code": "MOV-892507",
"type": "compra",
"type_name": "PURCHASE",
"is_entry": true,
"is_exit": false,
"quantity": 3.4188,
"previous_quantity": 75.3183,
"new_quantity": 78.7371,
"reason": null,
"movement_date": "2026-10-24T10:14:40.000000Z",
"created_at": null
}
}
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.
Inventory adjustment
requires authentication stock.movement inventory
Performs inventory adjustment to correct stock quantity
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/stocks/019556e7-2e9f-777c-a177-30bbf0646c32/movements/inventory" \
--header "Authorization: Bearer dhgv8Zeafb5PEVDk614ca63" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"70a2d963-1379-3d73-abe2-c44a9df9b68c\",
\"new_quantity\": 1,
\"reason\": \"Example Reason\",
\"movement_date\": \"2024-01-01\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/stocks/019556e7-2e9f-777c-a177-30bbf0646c32/movements/inventory"
);
const headers = {
"Authorization": "Bearer dhgv8Zeafb5PEVDk614ca63",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "70a2d963-1379-3d73-abe2-c44a9df9b68c",
"new_quantity": 1,
"reason": "Example Reason",
"movement_date": "2024-01-01"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "fad82413-38cb-3d79-9ed5-686ef851ac1b",
"code": "MOV-922802",
"type": "vencido",
"type_name": "EXPIRED",
"is_entry": false,
"is_exit": true,
"quantity": 28.1509,
"previous_quantity": 248.1109,
"new_quantity": 219.96,
"reason": "Nobis necessitatibus nesciunt iure recusandae qui quos occaecati.",
"movement_date": "2026-10-21T22:36:44.000000Z",
"created_at": null
}
}
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.
Purchase entry
requires authentication stock.movement store
Registers a purchase entry directly into the main stock
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/stock-movements/purchase" \
--header "Authorization: Bearer Z8Ec451Df6k3gVabdP6evah" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"154eef0a-533c-31bc-a68f-b0cfc7e9904a\",
\"quantity\": 1,
\"reason\": \"Example Reason\",
\"movement_date\": \"2024-01-01\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/stock-movements/purchase"
);
const headers = {
"Authorization": "Bearer Z8Ec451Df6k3gVabdP6evah",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "154eef0a-533c-31bc-a68f-b0cfc7e9904a",
"quantity": 1,
"reason": "Example Reason",
"movement_date": "2024-01-01"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "6c130af2-2ba0-37bb-9b78-e25a3d2c5d00",
"code": "MOV-085216",
"type": "devolução",
"type_name": "RETURN",
"is_entry": true,
"is_exit": false,
"quantity": 48.9241,
"previous_quantity": 146.3909,
"new_quantity": 195.315,
"reason": "Atque ut ut minima quaerat et id.",
"movement_date": "2026-10-13T16:47:12.000000Z",
"created_at": null
}
}
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.
Show movement
requires authentication stock.movement index
Returns details of a specific movement
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/stock-movements/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer hD84k1g36EbP5vZfedaca6V" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/stock-movements/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer hD84k1g36EbP5vZfedaca6V",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "003a8fef-5a2e-3e7b-9855-8896a1b57d43",
"code": "MOV-238355",
"type": "produção",
"type_name": "PRODUCTION",
"is_entry": true,
"is_exit": false,
"quantity": 13.0239,
"previous_quantity": 331.8006,
"new_quantity": 344.8245,
"reason": null,
"movement_date": "2026-10-26T00:17:39.000000Z",
"created_at": null
}
}
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.
Suppliers
Endpoints for suppliers
List suppliers
requires authentication suppliers index
List all suppliers
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/suppliers?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Supplier+name" \
--header "Authorization: Bearer 6VE61h4kZPbadf3evDag8c5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/suppliers"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "Supplier name",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 6VE61h4kZPbadf3evDag8c5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "10da5c46-e383-383f-a15c-4502fddfd45e",
"name": "Srta. Bárbara da Cruz Benez Filho",
"email": "roque.michelle@example.com",
"phone": "(79) 2149-8713",
"document": "34.951.936/0001-10",
"type": "pf",
"responsible": "Sr. Juan Ferreira",
"image": {
"id": null,
"url": null
},
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
}
},
{
"id": "68bcf3a9-798e-3649-b06d-e97179fbfce0",
"name": "Dr. Madalena Espinoza Rodrigues",
"email": "eurias@example.org",
"phone": "(18) 2662-4703",
"document": "25.378.156/0001-31",
"type": "pf",
"responsible": "Ayla Velasques Neto",
"image": {
"id": null,
"url": null
},
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
}
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Create supplier
requires authentication suppliers store
Create a new supplier
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/suppliers" \
--header "Authorization: Bearer kdZ1v6gfVcEP3haD68eb4a5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"email\": \"user@example.com\",
\"phone\": \"(11) 99999-9999\",
\"document\": \"Example Document\",
\"type\": \"Example Type\",
\"responsible\": \"Example Responsible\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"address\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"street\": \"Example Address street\",
\"number\": \"Example Address number\",
\"complement\": \"Example Address complement\",
\"neighborhood\": \"Example Address neighborhood\",
\"city\": \"Example Address city\",
\"state\": \"Example Address state\",
\"zip_code\": \"Example Address zip code\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/suppliers"
);
const headers = {
"Authorization": "Bearer kdZ1v6gfVcEP3haD68eb4a5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"email": "user@example.com",
"phone": "(11) 99999-9999",
"document": "Example Document",
"type": "Example Type",
"responsible": "Example Responsible",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"address": {
"0": "example1",
"1": "example2",
"street": "Example Address street",
"number": "Example Address number",
"complement": "Example Address complement",
"neighborhood": "Example Address neighborhood",
"city": "Example Address city",
"state": "Example Address state",
"zip_code": "Example Address zip code"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 supplier
requires authentication suppliers show
Get a supplier
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/suppliers/1" \
--header "Authorization: Bearer da6P4h8Vfc53gk6bvaEZ1eD" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/suppliers/1"
);
const headers = {
"Authorization": "Bearer da6P4h8Vfc53gk6bvaEZ1eD",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d3361636-fcce-3f64-8d22-71d72759625d",
"name": "Srta. Jasmin Barros Alves",
"email": "janaina90@example.org",
"phone": "(43) 90734-0268",
"document": "24.420.752/0001-70",
"type": "pj",
"responsible": "Gilberto Sergio Brito",
"image": {
"id": null,
"url": null
},
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
}
}
}
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 supplier
requires authentication suppliers update
Update a supplier
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/suppliers/1" \
--header "Authorization: Bearer DkEP3e4Z6d618Vcaf5bghav" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"email\": \"user@example.com\",
\"phone\": \"(11) 99999-9999\",
\"document\": \"Example Document\",
\"type\": \"Example Type\",
\"responsible\": \"Example Responsible\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"address\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"street\": \"Example Address street\",
\"number\": \"Example Address number\",
\"complement\": \"Example Address complement\",
\"neighborhood\": \"Example Address neighborhood\",
\"city\": \"Example Address city\",
\"state\": \"Example Address state\",
\"zip_code\": \"Example Address zip code\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/suppliers/1"
);
const headers = {
"Authorization": "Bearer DkEP3e4Z6d618Vcaf5bghav",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"email": "user@example.com",
"phone": "(11) 99999-9999",
"document": "Example Document",
"type": "Example Type",
"responsible": "Example Responsible",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"address": {
"0": "example1",
"1": "example2",
"street": "Example Address street",
"number": "Example Address number",
"complement": "Example Address complement",
"neighborhood": "Example Address neighborhood",
"city": "Example Address city",
"state": "Example Address state",
"zip_code": "Example Address zip code"
}
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete supplier
requires authentication suppliers delete
Delete a supplier
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/suppliers/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer Zavh34EgDk68f1bea5cP6dV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/suppliers/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer Zavh34EgDk68f1bea5cP6dV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
System Types
Endpoints for system types
System Types
requires authentication No specific permission required
Get the system types
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/system-types" \
--header "Authorization: Bearer Pa65kg1chdE4eDVv386Zabf" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/system-types"
);
const headers = {
"Authorization": "Bearer Pa65kg1chdE4eDVv386Zabf",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"bankAccountTypes": {
"key": "value"
},
"fileTypes": {
"key": "value"
},
"legalEntityTypes": {
"key": "value"
},
"transactionTypes": {
"key": "value"
}
}
}
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.
Transaction Categories
Endpoints for transaction categories
List transaction categories
requires authentication transaction-category index
List all transaction categories
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/transaction-categories?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Salary&type=entrada" \
--header "Authorization: Bearer VdP68fabg4ekZvE15ah63Dc" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/transaction-categories"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "Salary",
"type": "entrada",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer VdP68fabg4ekZvE15ah63Dc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "76bab2f4-359b-3ff0-b3e3-438d3f5c60bb",
"name": "Dr. Luna Reis Filho",
"description": "Quibusdam illo qui dicta sit. Unde ut voluptates dolorum ut. Nihil et necessitatibus nihil error dolor deserunt ex. Labore incidunt qui porro quo ut.",
"type": "ajuste saída"
},
{
"id": "fe3429b3-dff1-32ed-90d6-d2c67fa130a9",
"name": "Afonso Neves Pacheco",
"description": "Omnis aliquam corrupti incidunt cum quia similique rerum. Doloribus laborum aut placeat asperiores dignissimos suscipit. Consequuntur ipsum animi dolore ipsa.",
"type": "juros"
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Show transaction category
requires authentication transaction-category show
Show a transaction category
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/transaction-categories/odit" \
--header "Authorization: Bearer hafZ8DbvVkEe64g36ad5cP1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/transaction-categories/odit"
);
const headers = {
"Authorization": "Bearer hafZ8DbvVkEe64g36ad5cP1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "98ac831d-42ee-382e-81d7-be317d57f1ab",
"name": "Srta. Michele Balestero Sobrinho",
"description": "Est est amet in quia sed. Alias quia iste nam enim dolorum odit molestiae. Eius assumenda officia accusantium reprehenderit doloremque beatae. Iure quo ut et consequatur magni.",
"type": "ajuste saída"
}
}
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.
Create transaction category
requires authentication transaction-category store
Create a new transaction category
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/transaction-categories" \
--header "Authorization: Bearer hZ6kDb4d5V8E1aefPagc3v6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"type\": \"Example Type\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/transaction-categories"
);
const headers = {
"Authorization": "Bearer hZ6kDb4d5V8E1aefPagc3v6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"type": "Example Type"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 transaction category
requires authentication transaction-category update
Update a transaction category
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/transaction-categories/vero" \
--header "Authorization: Bearer aE5h6bkP3Z6vdV8De1afcg4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"type\": \"Example Type\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/transaction-categories/vero"
);
const headers = {
"Authorization": "Bearer aE5h6bkP3Z6vdV8De1afcg4",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"type": "Example Type"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete transaction category
requires authentication transaction-category delete
Delete a transaction category
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/transaction-categories/ipsam" \
--header "Authorization: Bearer Dk6E5ePaZgvdh3cb4681fVa" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/transaction-categories/ipsam"
);
const headers = {
"Authorization": "Bearer Dk6E5ePaZgvdh3cb4681fVa",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Tutoriais (administração)
Cadastro do catálogo de módulos da Central de Tutoriais
Listar módulos
requires authentication tutorials index
Lista o catálogo de módulos de tutorial
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Financeiro&is_active=1" \
--header "Authorization: Bearer vfabeDaEVk1d6g64ch853PZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "Financeiro",
"is_active": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer vfabeDaEVk1d6g64ch853PZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "42529351-a360-34ec-b230-9fde3833764c",
"name": "Magni aut",
"slug": "magni-aut-581852",
"description": "Culpa cumque quas expedita architecto.",
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
},
{
"id": "02158591-f2ed-3b61-aec3-18a1afe1ce6e",
"name": "Dignissimos qui",
"slug": "dignissimos-qui-115218",
"description": "Sint recusandae et ut animi autem.",
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Cadastrar módulo
requires authentication tutorials store
Cria um módulo no catálogo. O slug é derivado do nome quando não informado.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules" \
--header "Authorization: Bearer 6ag8Pk6EcvDh51a43dVfebZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"slug\": \"Example Slug\",
\"description\": \"Example Description\",
\"sort_order\": 1,
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules"
);
const headers = {
"Authorization": "Bearer 6ag8Pk6EcvDh51a43dVfebZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"slug": "Example Slug",
"description": "Example Description",
"sort_order": 1,
"is_active": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "3ee9f484-c91e-353c-ad6c-cfa442f37e57",
"name": "Aspernatur voluptatem",
"slug": "aspernatur-voluptatem-697242",
"description": "Deleniti voluptas qui magnam fuga.",
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
}
}
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.
Visualizar módulo
requires authentication tutorials index
Detalhe de um módulo do catálogo
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer 586Evc6Ze1bkaagDVf4dP3h" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer 586Evc6Ze1bkaagDVf4dP3h",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "1e5daa17-811f-3551-86ad-e0cae39772cc",
"name": "Est sequi",
"slug": "est-sequi-835378",
"description": "Esse mollitia fugiat culpa consequatur.",
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
}
}
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.
Atualizar módulo
requires authentication tutorials update
Atualiza um módulo do catálogo
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer E5a6VkPb6aZh1cvdeg84D3f" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"slug\": \"Example Slug\",
\"description\": \"Example Description\",
\"sort_order\": 1,
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer E5a6VkPb6aZh1cvdeg84D3f",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"slug": "Example Slug",
"description": "Example Description",
"sort_order": 1,
"is_active": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "83321d83-bbf7-3191-8ecd-ba7faf7f20f8",
"name": "Dolorem nobis",
"slug": "dolorem-nobis-604949",
"description": "Molestias maiores et nemo.",
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
}
}
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.
Remover módulo
requires authentication tutorials destroy
Remove o módulo e, junto, os tutoriais que pertenciam a ele
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer 8vdhV5a4EfcPa3gDb61Zke6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer 8vdhV5a4EfcPa3gDb61Zke6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Listar tutoriais
requires authentication tutorials index
Lista os tutoriais em qualquer status, para quem administra
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/admin/tutorials?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=ordem+de+servi%C3%A7o&module_id=f9f6fc72-e576-3221-abbf-e8bfea168f50§or_id=878269ea-afb5-3991-861a-9d3d24dab523&status=published" \
--header "Authorization: Bearer Zd6evaVPg6D1bcf3Ekh4a58" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "ordem de serviço",
"module_id": "f9f6fc72-e576-3221-abbf-e8bfea168f50",
"sector_id": "878269ea-afb5-3991-861a-9d3d24dab523",
"status": "published",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Zd6evaVPg6D1bcf3Ekh4a58",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "2908c1a0-054f-3bfb-9a9d-ccaffa242423",
"title": "Qui earum voluptas dolorem",
"description": "Sint quo id corporis aut dolor a.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a32930de-14dd-4c15-8ff7-7582a6128d89",
"name": "Autem accusamus",
"slug": "autem-accusamus-768268"
},
"created_at": null,
"updated_at": null
},
{
"id": "01108e24-620a-3157-b4d5-6d3e292faff3",
"title": "Sapiente facere dolor et",
"description": "Aperiam rerum rem sed dolor numquam velit.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a32930de-17fc-4de4-8447-a4416eb999e2",
"name": "Temporibus voluptas",
"slug": "temporibus-voluptas-679416"
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Cadastrar tutorial
requires authentication tutorials store
Cria um tutorial. Nasce como rascunho e só aparece na central depois de publicado.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials" \
--header "Authorization: Bearer gPbca4aD1d3Z8Eh6vk65efV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"module_id\": \"182e87c1-6202-30f6-8d92-c977b5161496\",
\"title\": \"Example Title\",
\"description\": \"Example Description\",
\"cover_path\": \"Example Cover path\",
\"sort_order\": 1,
\"sectors\": [
\"38008cbb-bf77-3797-ac86-591f1a372da7\"
],
\"permissions\": [
\"7c40c333-3fc6-3ddf-b02f-6e84345e4cda\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials"
);
const headers = {
"Authorization": "Bearer gPbca4aD1d3Z8Eh6vk65efV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"module_id": "182e87c1-6202-30f6-8d92-c977b5161496",
"title": "Example Title",
"description": "Example Description",
"cover_path": "Example Cover path",
"sort_order": 1,
"sectors": [
"38008cbb-bf77-3797-ac86-591f1a372da7"
],
"permissions": [
"7c40c333-3fc6-3ddf-b02f-6e84345e4cda"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "dbb6a89e-ba60-32b3-8696-20b378c03fb4",
"title": "Necessitatibus voluptatem nesciunt ut",
"description": "Itaque facere soluta ut aliquid aliquid neque nesciunt.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a32930de-2149-475c-9c6a-a4a772f896b4",
"name": "Sed eos",
"slug": "sed-eos-535499"
},
"created_at": null,
"updated_at": null
}
}
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.
Gerar URL de upload
requires authentication tutorials store
Devolve uma URL assinada de curta validade para o cliente enviar o arquivo direto ao S3. O arquivo só é conferido depois, ao criar o item ou salvar a capa.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/upload-url" \
--header "Authorization: Bearer E4Vdb685e1ZacfPva36ghkD" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"kind\": \"Example Kind\",
\"filename\": \"Example Name\",
\"extension\": \"Example Extension\",
\"size_bytes\": 1
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/upload-url"
);
const headers = {
"Authorization": "Bearer E4Vdb685e1ZacfPva36ghkD",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"kind": "Example Kind",
"filename": "Example Name",
"extension": "Example Extension",
"size_bytes": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"url": "string",
"headers": "array",
"path": "string",
"expires_in": "integer"
}
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.
Visualizar tutorial
requires authentication tutorials index
Detalhe do tutorial com vínculos e itens
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1" \
--header "Authorization: Bearer bhvgDdPkV3cfZa564Ee16a8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1"
);
const headers = {
"Authorization": "Bearer bhvgDdPkV3cfZa564Ee16a8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "edb45954-2015-3646-a549-15fb35cfc246",
"title": "Atque consequatur omnis perspiciatis",
"description": "Et beatae eligendi aut ea debitis aspernatur repellat iste.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a32930de-2b3c-4376-b5e3-d5556434179a",
"name": "Distinctio sint",
"slug": "distinctio-sint-85327"
},
"created_at": null,
"updated_at": null
}
}
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.
Atualizar tutorial
requires authentication tutorials update
Atualiza o tutorial e os vínculos de setor e permissão
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1" \
--header "Authorization: Bearer e81vcPZkfdgDh56E64a3Vab" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"module_id\": \"19910eaf-8e39-3c10-9bab-bd6b019b0791\",
\"title\": \"Example Title\",
\"description\": \"Example Description\",
\"cover_path\": \"Example Cover path\",
\"sort_order\": 1,
\"sectors\": [
\"7ffb96f3-02ff-3f2d-a5e0-072414a3cb88\"
],
\"permissions\": [
\"f45f8127-6a9c-3398-b1b6-be4cf597e7f2\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1"
);
const headers = {
"Authorization": "Bearer e81vcPZkfdgDh56E64a3Vab",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"module_id": "19910eaf-8e39-3c10-9bab-bd6b019b0791",
"title": "Example Title",
"description": "Example Description",
"cover_path": "Example Cover path",
"sort_order": 1,
"sectors": [
"7ffb96f3-02ff-3f2d-a5e0-072414a3cb88"
],
"permissions": [
"f45f8127-6a9c-3398-b1b6-be4cf597e7f2"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "3141b8a9-3d43-3d8b-a836-004ab3cc6d53",
"title": "Sint voluptatibus ipsum quasi",
"description": "Voluptatem iusto et dolor dolorem voluptas accusantium nulla.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a32930de-342c-4d99-8c82-0c6042b46625",
"name": "Consectetur et",
"slug": "consectetur-et-612707"
},
"created_at": null,
"updated_at": null
}
}
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.
Remover tutorial
requires authentication tutorials destroy
Remove o tutorial, os itens e os arquivos correspondentes no S3
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1" \
--header "Authorization: Bearer 5bv66D1P4kgaeEcadh8fV3Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1"
);
const headers = {
"Authorization": "Bearer 5bv66D1P4kgaeEcadh8fV3Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Publicar tutorial
requires authentication tutorials update
Publica o tutorial e carimba a data de publicação
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/019556e7-2e9f-777c-a177-30bbf0646c32/publish" \
--header "Authorization: Bearer e4agkD83bh1dc6P65afvZVE" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/019556e7-2e9f-777c-a177-30bbf0646c32/publish"
);
const headers = {
"Authorization": "Bearer e4agkD83bh1dc6P65afvZVE",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a7a6d1b8-98db-37d0-8a97-9703d6acfb2d",
"title": "Perferendis quia repudiandae atque",
"description": "Quas natus iure dolorum.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a32930de-3cef-4eec-9a68-5c60f306de51",
"name": "Ullam perferendis",
"slug": "ullam-perferendis-883514"
},
"created_at": null,
"updated_at": null
}
}
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.
Despublicar tutorial
requires authentication tutorials update
Devolve o tutorial ao rascunho e limpa a data de publicação
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/019556e7-2e9f-777c-a177-30bbf0646c32/unpublish" \
--header "Authorization: Bearer c6vaDgfkVbZh4P56Eae38d1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/019556e7-2e9f-777c-a177-30bbf0646c32/unpublish"
);
const headers = {
"Authorization": "Bearer c6vaDgfkVbZh4P56Eae38d1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "3a1398e6-bbd0-37ba-b294-474e25ecb8d8",
"title": "Qui aut perspiciatis at",
"description": "Autem sunt vero maxime nam amet.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a32930de-4338-4910-9e87-e45a616eab55",
"name": "Beatae repudiandae",
"slug": "beatae-repudiandae-578180"
},
"created_at": null,
"updated_at": null
}
}
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.
Adicionar item ao tutorial
requires authentication tutorials store
Cria o item a partir de um arquivo já enviado ao S3 (pdf ou video) ou de um link do YouTube/Vimeo. O arquivo é conferido aqui: existência, tamanho real e assinatura do conteúdo.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1/items" \
--header "Authorization: Bearer 6e5gEfkvZ41dchba8DV6Pa3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"Example Type\",
\"title\": \"Example Title\",
\"file_path\": \"Example File path\",
\"external_url\": \"https:\\/\\/example.com\",
\"duration_seconds\": 1,
\"sort_order\": 1
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1/items"
);
const headers = {
"Authorization": "Bearer 6e5gEfkvZ41dchba8DV6Pa3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "Example Type",
"title": "Example Title",
"file_path": "Example File path",
"external_url": "https:\/\/example.com",
"duration_seconds": 1,
"sort_order": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "8a926e48-b824-35fb-be8e-759758823f95",
"type": "pdf",
"title": "Possimus reiciendis dolores",
"mime_type": "application/pdf",
"size_bytes": 3310142,
"duration_seconds": null,
"sort_order": 0,
"created_at": null,
"updated_at": null
}
}
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.
Reordenar itens
requires authentication tutorials update
Grava a ordem dos itens conforme a sequência de UUIDs enviada
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/019556e7-2e9f-777c-a177-30bbf0646c32/items/reorder" \
--header "Authorization: Bearer 5VD68kEhabZ4Pdcegf1a36v" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"d448a98e-3958-3451-97f1-9c8662460805\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/019556e7-2e9f-777c-a177-30bbf0646c32/items/reorder"
);
const headers = {
"Authorization": "Bearer 5VD68kEhabZ4Pdcegf1a36v",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"d448a98e-3958-3451-97f1-9c8662460805"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Itens reordenados com sucesso"
}
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.
Atualizar item
requires authentication tutorials update
Atualiza o item. O tipo não muda depois de criado.
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-items/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer 5gcDbP4v86h3k6Z1EaVfdea" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"Example Title\",
\"file_path\": \"Example File path\",
\"external_url\": \"https:\\/\\/example.com\",
\"duration_seconds\": 1,
\"sort_order\": 1
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-items/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer 5gcDbP4v86h3k6Z1EaVfdea",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "Example Title",
"file_path": "Example File path",
"external_url": "https:\/\/example.com",
"duration_seconds": 1,
"sort_order": 1
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "8571f4c9-50ec-3434-833d-626542cadfe5",
"type": "pdf",
"title": "Et rerum consequatur",
"mime_type": "application/pdf",
"size_bytes": 4919339,
"duration_seconds": null,
"sort_order": 0,
"created_at": null,
"updated_at": null
}
}
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.
Remover item
requires authentication tutorials destroy
Remove o item e apaga o arquivo correspondente no S3
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-items/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer b85VcD63deEgfaP1v4ak6hZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-items/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer b85VcD63deEgfaP1v4ak6hZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Units
Endpoints for units
List units
requires authentication unit index
List all units
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/units?q=Structure" \
--header "Authorization: Bearer e1E3ZbDaav8h6gdk5VPc6f4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/units"
);
const params = {
"q": "Structure",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer e1E3ZbDaav8h6gdk5VPc6f4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "8e99b3a3-e949-3deb-9178-2e6394891999",
"name": "Sr. Artur Erik Campos",
"abbreviation": "George Adriano Pontes",
"description": "Veritatis et cum alias.",
"created_at": null,
"updated_at": null
},
{
"id": "3e5fc350-e599-3427-b341-00fe3f8abe7d",
"name": "Dr. Mário Burgos Sobrinho",
"abbreviation": "Srta. Vanessa Manoela Paes Sobrinho",
"description": "Animi ut impedit ut id error.",
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Show unit
requires authentication unit show
Show a unit
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/units/1" \
--header "Authorization: Bearer ghedvfka6ac8P13E65Z4bVD" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/units/1"
);
const headers = {
"Authorization": "Bearer ghedvfka6ac8P13E65Z4bVD",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "ccebb9f0-6ac2-30b9-a470-095d6bd53267",
"name": "Eduarda Cruz",
"abbreviation": "Juan Delgado",
"description": "Dicta qui ipsa quaerat.",
"created_at": null,
"updated_at": null
}
}
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.
Create unit
requires authentication unit store
Create a new unit
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/units" \
--header "Authorization: Bearer g6E6v34afbdch8k1aD5ZPVe" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"abbreviation\": \"Example Abbreviation\",
\"description\": \"Example Description\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/units"
);
const headers = {
"Authorization": "Bearer g6E6v34afbdch8k1aD5ZPVe",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"abbreviation": "Example Abbreviation",
"description": "Example Description"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 unit
requires authentication unit update
Update a unit
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/units/1" \
--header "Authorization: Bearer Zka1hva6V5EgeDd3b4c8f6P" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"abbreviation\": \"Example Abbreviation\",
\"description\": \"Example Description\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/units/1"
);
const headers = {
"Authorization": "Bearer Zka1hva6V5EgeDd3b4c8f6P",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"abbreviation": "Example Abbreviation",
"description": "Example Description"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete unit
requires authentication unit delete
Delete a unit
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/units/odit" \
--header "Authorization: Bearer EkDVc8aZbgPf1654a63edhv" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/units/odit"
);
const headers = {
"Authorization": "Bearer EkDVc8aZbgPf1654a63edhv",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Users
Endpoints for users
List users
requires authentication user index
List all users
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/users?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=John+Doe§or_id=123e4567-e89b-12d3-a456-426614174000&role=ADMIN" \
--header "Authorization: Bearer 5hZP63k6ab4fdecgaEv18DV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "John Doe",
"sector_id": "123e4567-e89b-12d3-a456-426614174000",
"role": "ADMIN",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 5hZP63k6ab4fdecgaEv18DV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "fa1686a2-60ba-30f4-9355-01505bf9b91f",
"name": "Fermin Sporer",
"username": "christian.schumm",
"email": "greta.quigley@example.net",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "b681e89d-fc7f-3cc5-8ad6-f29696b2bbf5",
"name": "Prof. Juliana Wunsch",
"username": "pward",
"email": "everett36@example.net",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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 user
requires authentication user show
Get a user
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/users/1" \
--header "Authorization: Bearer P6VkZED15bd83v6gacfh4ea" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users/1"
);
const headers = {
"Authorization": "Bearer P6VkZED15bd83v6gacfh4ea",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "54f47d70-1919-3b72-a8eb-91287d2bbb13",
"name": "Bennett Kemmer",
"username": "schultz.hipolito",
"email": "qmcglynn@example.org",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
}
}
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.
Create user
requires authentication user store
Create a new user
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/users" \
--header "Authorization: Bearer a8k16gaf3Eec6P4Ddvb5hVZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"mann.halle\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"cb971c3d-55a9-38e1-acc5-a81a54d18ad5\"
],
\"roles\": [
\"489ce3a8-cfa4-35b9-9fe1-e9a362aa1b81\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users"
);
const headers = {
"Authorization": "Bearer a8k16gaf3Eec6P4Ddvb5hVZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "mann.halle",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"cb971c3d-55a9-38e1-acc5-a81a54d18ad5"
],
"roles": [
"489ce3a8-cfa4-35b9-9fe1-e9a362aa1b81"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 user
requires authentication user update
Update a user
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/users/1" \
--header "Authorization: Bearer 8hf4dP5VE1eakZvac366Dgb" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"dock.feest\",
\"password\": \"password123\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"374894f7-53d1-3af6-9d8d-754b3603c562\"
],
\"roles\": [
\"669e79fd-4fa4-3add-b1be-109259023109\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users/1"
);
const headers = {
"Authorization": "Bearer 8hf4dP5VE1eakZvac366Dgb",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "dock.feest",
"password": "password123",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"374894f7-53d1-3af6-9d8d-754b3603c562"
],
"roles": [
"669e79fd-4fa4-3add-b1be-109259023109"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete user
requires authentication user delete
Delete a user
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/users/1" \
--header "Authorization: Bearer Z8aPEfd413a6c6De5bvVgkh" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users/1"
);
const headers = {
"Authorization": "Bearer Z8aPEfd413a6c6De5bvVgkh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Reset user password
requires authentication user password-reset
Reset a user password
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/users/019556e7-2e9f-777c-a177-30bbf0646c32/password-reset" \
--header "Authorization: Bearer v6PgdefZkV514Ehb3cDaa68" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users/019556e7-2e9f-777c-a177-30bbf0646c32/password-reset"
);
const headers = {
"Authorization": "Bearer v6PgdefZkV514Ehb3cDaa68",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Password reset successfully to foobaar"
}
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.
Attach permissions to user
requires authentication user update
Attach direct permissions to a user
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/users/1/permissions" \
--header "Authorization: Bearer adVE318ak6vc6eZgDf5hPb4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"05104e86-adeb-3a8d-a722-de6c4324efd4\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users/1/permissions"
);
const headers = {
"Authorization": "Bearer adVE318ak6vc6eZgDf5hPb4",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"05104e86-adeb-3a8d-a722-de6c4324efd4"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Permissions attached successfully"
}
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.
List user direct permissions
requires authentication user show
List direct permissions associated with a user
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/users/1/permissions" \
--header "Authorization: Bearer 8d6h3ega5PkE1cvfbaVZ46D" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users/1/permissions"
);
const headers = {
"Authorization": "Bearer 8d6h3ega5PkE1cvfbaVZ46D",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "nesciunt",
"display_name": "Minima accusantium cum quia possimus distinctio repellendus."
},
{
"id": null,
"name": "aut",
"display_name": "Autem esse ut facere inventore."
}
]
}
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.
Work Locations
Endpoints for work locations
List work locations
requires authentication work-location index
List all work locations
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/work-locations?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Tecnologia&work=uuid" \
--header "Authorization: Bearer h41DvEdf6gcaVk6Z3b5ePa8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/work-locations"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "Tecnologia",
"work": "uuid",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer h41DvEdf6gcaVk6Z3b5ePa8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "eefec3e7-9a3e-3aa2-b0f4-83d8b5720a25",
"description": "Sr. Davi Verdara Neto",
"work": {
"id": null,
"name": null
},
"documents": [],
"created_at": null,
"updated_at": null
},
{
"id": "cb43ded7-3fa0-3cd4-92f9-c26a8c1d4540",
"description": "Ketlin Franciele Esteves",
"work": {
"id": null,
"name": null
},
"documents": [],
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Create work location
requires authentication work-location store
Create a new work location
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/work-locations" \
--header "Authorization: Bearer 63fP8EVDab5ved4ak6chg1Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"description\": \"Example Description\",
\"work_id\": \"baaea323-4c99-3a16-bd63-27c5beced419\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/work-locations"
);
const headers = {
"Authorization": "Bearer 63fP8EVDab5ved4ak6chg1Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"description": "Example Description",
"work_id": "baaea323-4c99-3a16-bd63-27c5beced419"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 work location
requires authentication work-location show
Get a work location
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/work-locations/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer dkVg684evbZ3aP5hD16aEcf" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/work-locations/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer dkVg684evbZ3aP5hD16aEcf",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "6b44c38d-c597-322a-ac9a-874b8fd573f1",
"description": "Teobaldo Faro Jr.",
"work": {
"id": null,
"name": null
},
"documents": [],
"created_at": null,
"updated_at": null
}
}
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 work location
requires authentication work-location update
Update a work location
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/work-locations/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer V4cZa3g8Ee6b65haPkd1fDv" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"description\": \"Example Description\",
\"work_id\": \"477e7fe6-8cf6-3a1d-9ecd-3d41e31eefe2\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/work-locations/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer V4cZa3g8Ee6b65haPkd1fDv",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"description": "Example Description",
"work_id": "477e7fe6-8cf6-3a1d-9ecd-3d41e31eefe2"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete work location
requires authentication work-location delete
Delete a work location
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/work-locations/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer Pfc865vEeD6134haZkgabdV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/work-locations/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer Pfc865vEeD6134haZkgabdV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Works
Endpoints for works
List works
requires authentication work index
List all works
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/works?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Tecnologia&customer_id=019556e7-2e9f-777c-a177-30bbf0646c32&status_id=019556e7-2e9f-777c-a177-30bbf0646c32&responsible_id=019556e7-2e9f-777c-a177-30bbf0646c32&no_responsible=1" \
--header "Authorization: Bearer 4ae3kD8ag51PVfcEZdh6vb6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "Tecnologia",
"customer_id": "019556e7-2e9f-777c-a177-30bbf0646c32",
"status_id": "019556e7-2e9f-777c-a177-30bbf0646c32",
"responsible_id": "019556e7-2e9f-777c-a177-30bbf0646c32",
"no_responsible": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 4ae3kD8ag51PVfcEZdh6vb6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "f9559ebb-a2f7-3cd7-a703-c944a338a88c",
"name": "Thales Galvão",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"documents": [],
"locations": [],
"product_quantity_lists_count": 0,
"product_quantity_list_items_count": 0,
"product_requests_count": 0,
"product_request_items_count": 0,
"documents_count": 0,
"locations_documents_count": 0,
"total_documents_count": 0,
"daily_logs_count": 0,
"projects_count": 0,
"started_at": {
"date": "2008-01-31 21:30:08.000000",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"created_at": null,
"updated_at": null
},
{
"id": "3e08f721-f8c5-30f4-9ae8-147a7591bd39",
"name": "Carla Fonseca Rocha Jr.",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"documents": [],
"locations": [],
"product_quantity_lists_count": 0,
"product_quantity_list_items_count": 0,
"product_requests_count": 0,
"product_request_items_count": 0,
"documents_count": 0,
"locations_documents_count": 0,
"total_documents_count": 0,
"daily_logs_count": 0,
"projects_count": 0,
"started_at": {
"date": "2019-11-03 00:56:07.000000",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Create work
requires authentication work store
Create a new work
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/works" \
--header "Authorization: Bearer 5dP613E4vage8aZVhkfbc6D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"customer_id\": \"fc5a5fcc-2fd3-397c-bf3d-b3bd6aad0dff\",
\"status_id\": \"b51ee514-021d-31b3-a526-0f257ec469f3\",
\"started_at\": \"Example Started at\",
\"address\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"street\": \"Example Address street\",
\"number\": \"Example Address number\",
\"complement\": \"Example Address complement\",
\"neighborhood\": \"Example Address neighborhood\",
\"city\": \"Example Address city\",
\"state\": \"Example Address state\",
\"zip_code\": \"Example Address zip code\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works"
);
const headers = {
"Authorization": "Bearer 5dP613E4vage8aZVhkfbc6D",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"customer_id": "fc5a5fcc-2fd3-397c-bf3d-b3bd6aad0dff",
"status_id": "b51ee514-021d-31b3-a526-0f257ec469f3",
"started_at": "Example Started at",
"address": {
"0": "example1",
"1": "example2",
"street": "Example Address street",
"number": "Example Address number",
"complement": "Example Address complement",
"neighborhood": "Example Address neighborhood",
"city": "Example Address city",
"state": "Example Address state",
"zip_code": "Example Address zip code"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
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 work
requires authentication work show
Get a work
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/works/1" \
--header "Authorization: Bearer D8c3a4edhagfE5k1b66VvPZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/1"
);
const headers = {
"Authorization": "Bearer D8c3a4edhagfE5k1b66VvPZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "80e4c9fb-1a11-359a-9588-50ee1642ecad",
"name": "Santiago Pablo Torres Sobrinho",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"documents": [],
"locations": [],
"product_quantity_lists_count": 0,
"product_quantity_list_items_count": 0,
"product_requests_count": 0,
"product_request_items_count": 0,
"documents_count": 0,
"locations_documents_count": 0,
"total_documents_count": 0,
"daily_logs_count": 0,
"projects_count": 0,
"started_at": {
"date": "2020-11-07 08:23:13.000000",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"created_at": null,
"updated_at": null
}
}
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 work
requires authentication work update
Update a work
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/works/1" \
--header "Authorization: Bearer ED53chda41Pbf68eVkg6aZv" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"customer_id\": \"4788a77c-141a-3e89-bc0b-38d10d4bc3b1\",
\"status_id\": \"eb410b71-91e8-350e-bcd8-72968827090a\",
\"started_at\": \"Example Started at\",
\"address\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"street\": \"Example Address street\",
\"number\": \"Example Address number\",
\"complement\": \"Example Address complement\",
\"neighborhood\": \"Example Address neighborhood\",
\"city\": \"Example Address city\",
\"state\": \"Example Address state\",
\"zip_code\": \"Example Address zip code\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/1"
);
const headers = {
"Authorization": "Bearer ED53chda41Pbf68eVkg6aZv",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"customer_id": "4788a77c-141a-3e89-bc0b-38d10d4bc3b1",
"status_id": "eb410b71-91e8-350e-bcd8-72968827090a",
"started_at": "Example Started at",
"address": {
"0": "example1",
"1": "example2",
"street": "Example Address street",
"number": "Example Address number",
"complement": "Example Address complement",
"neighborhood": "Example Address neighborhood",
"city": "Example Address city",
"state": "Example Address state",
"zip_code": "Example Address zip code"
}
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
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.
Delete work
requires authentication work delete
Delete a work
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/works/1" \
--header "Authorization: Bearer a6DEb5v4ac13gPdheV6k8Zf" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/1"
);
const headers = {
"Authorization": "Bearer a6DEb5v4ac13gPdheV6k8Zf",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
List work responsibles
requires authentication work-responsibles index
List all users responsible for a work
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=John" \
--header "Authorization: Bearer 68fcEk1Da3645dabvgeZPVh" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "John",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 68fcEk1Da3645dabvgeZPVh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "cbd3702b-e882-35db-9c19-61a21cdd27d2",
"name": "Itzel DuBuque",
"username": "ullrich.bennett",
"email": "jaycee.kilback@example.net",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "0f5979a3-b257-3a94-a9f4-8aacc1024816",
"name": "Carey Jacobs",
"username": "seamus13",
"email": "wmueller@example.org",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
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.
Attach responsibles to work
requires authentication work-responsibles attach
Attach users as responsibles to a work without removing existing ones
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach" \
--header "Authorization: Bearer Zf43dbaPVca15evD86g6hkE" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"97759a13-d0ac-3608-8432-a9076e15f317\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach"
);
const headers = {
"Authorization": "Bearer Zf43dbaPVca15evD86g6hkE",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"97759a13-d0ac-3608-8432-a9076e15f317"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Responsibles attached successfully"
}
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.
Detach responsibles from work
requires authentication work-responsibles detach
Remove specific users as responsibles from a work
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/detach" \
--header "Authorization: Bearer a64D68P51VgbhkvafEeZd3c" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"b7f52caf-aaa9-3a58-81df-f5b28196639d\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/detach"
);
const headers = {
"Authorization": "Bearer a64D68P51VgbhkvafEeZd3c",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"b7f52caf-aaa9-3a58-81df-f5b28196639d"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Responsibles detached successfully"
}
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.
Sync work responsibles
requires authentication work-responsibles sync
Replace all responsibles of a work with the provided list
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/sync" \
--header "Authorization: Bearer c3eP6gbaEDVv8hfaZk514d6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"d448d19a-8aa3-32ba-8c8e-8d999164aa0e\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/sync"
);
const headers = {
"Authorization": "Bearer c3eP6gbaEDVv8hfaZk514d6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"d448d19a-8aa3-32ba-8c8e-8d999164aa0e"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Responsibles synchronized successfully"
}
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.