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 kg4eD3a6Vb8615dfPaZvEhc" \
--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 kg4eD3a6Vb8615dfPaZvEhc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "db783f5b-f563-3916-bcaa-96b68b03a62f",
"name": "et-6b0093a10ac15",
"display_name": "Dolorum ut ut dolorum necessitatibus tempore est porro.",
"permissions_count": null
},
{
"id": "4115f3e3-dfa2-3c94-ab87-d3f7f107c153",
"name": "cupiditate-6b0093a10de26",
"display_name": "Corporis illum quod rerum et qui voluptatibus assumenda quia.",
"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 1E5Pvag64ZVhebDkac8fd63" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"display_name\": \"Example Name\",
\"permissions\": [
\"c0d6fb2d-6d46-341f-93e9-0370dd1a1f34\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/roles"
);
const headers = {
"Authorization": "Bearer 1E5Pvag64ZVhebDkac8fd63",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"display_name": "Example Name",
"permissions": [
"c0d6fb2d-6d46-341f-93e9-0370dd1a1f34"
]
};
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 ge6Eva5Dkdfcb63P184aZhV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"display_name\": \"Example Name\",
\"permissions\": [
\"3de99ca0-c566-3ed7-824e-48daa2080233\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/roles/1"
);
const headers = {
"Authorization": "Bearer ge6Eva5Dkdfcb63P184aZhV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"display_name": "Example Name",
"permissions": [
"3de99ca0-c566-3ed7-824e-48daa2080233"
]
};
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 b36Vf5P6a8eavD1dhkZ4cgE" \
--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 b36Vf5P6a8eavD1dhkZ4cgE",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "0648f3c5-b12d-3dd6-bcc6-cd1d29649c7e",
"name": "ducimus-6b0093a118c8f",
"display_name": "Cum modi dolor voluptatem qui.",
"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 ade3Z616aDEP48fbkh5gvVc" \
--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 ade3Z616aDEP48fbkh5gvVc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "amet",
"display_name": "Ratione at quas eveniet consequatur quam."
},
{
"id": null,
"name": "occaecati",
"display_name": "At nobis accusamus quisquam temporibus accusantium voluptas."
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 vP4ak36ce8b1dfhEaVg5D6Z" \
--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 vP4ak36ce8b1dfhEaVg5D6Z",
"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 cP1eDakgV5Ea6Zv364bdhf8" \
--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 cP1eDakgV5Ea6Zv364bdhf8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "aperiam",
"display_name": "Sit optio ratione eius in."
},
{
"id": null,
"name": "repudiandae",
"display_name": "Quis fugit sit qui possimus laudantium possimus ut."
}
],
"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 d5bkhaEevD1a36gcV8PfZ46" \
--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 d5bkhaEevD1a36gcV8PfZ46",
"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 5ac6bdZega4V6138EPvhkDf" \
--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 5ac6bdZega4V6138EPvhkDf",
"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 Pe4k3dbva5VgDZcEfh61a68" \
--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 Pe4k3dbva5VgDZcEfh61a68",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": null,
"name": "cumque",
"display_name": "Totam sed cum sunt voluptate."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Ebf1Zeg3vcdkV6aPD4h5a86" \
--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 Ebf1Zeg3vcdkV6aPD4h5a86",
"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 faP8gcdDh154bk3VZ6E6eva" \
--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 faP8gcdDh154bk3VZ6E6eva",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "041e289a-bf97-328e-9569-b4f82245f9bc",
"code": null,
"type": "entrada",
"payment_method": "cheque",
"amount": 7506.82,
"due_date": "2026-12-12T03: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 aut doloremque modi ut vitae libero provident.",
"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": "saepe",
"field2": 51,
"field3": false,
"notes": "Occaecati odio quas placeat explicabo.",
"created_at": null,
"updated_at": null
},
{
"id": "63fd577a-f80c-3d07-97b2-1f30f5aab32e",
"code": null,
"type": "saída",
"payment_method": "cheque",
"amount": 1976.47,
"due_date": "2026-12-05T03: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": "Eius omnis rerum quia nemo fugiat eum quos consequatur reiciendis.",
"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": "voluptatibus",
"field2": 93,
"field3": false,
"notes": "Sint ipsam et harum dolorum quia quasi 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.
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[]=nostrum" \
--header "Authorization: Bearer PVe866ZEg4dav1abfc3hkD5" \
--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]": "nostrum",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer PVe866ZEg4dav1abfc3hkD5",
"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 d8vPca6DZ6fhVke5bg31a4E" \
--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 d8vPca6DZ6fhVke5bg31a4E",
"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[]=explicabo&suppliers[]=vel&works[]=in&cost_centers[]=suscipit&statuses[]=a+vencer&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-11-20T15%3A38%3A25&protest_date_end=2026-11-20T15%3A38%3A25&has_protest=1&has_children=1&is_recurring=1" \
--header "Authorization: Bearer 3g5EZaP81aVhcbDdevk4f66" \
--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]": "explicabo",
"suppliers[0]": "vel",
"works[0]": "in",
"cost_centers[0]": "suscipit",
"statuses[0]": "a vencer",
"payment_method": "cheque",
"date_start": "2023-01-01",
"date_end": "2023-12-31",
"protest_date_start": "2026-11-20T15:38:25",
"protest_date_end": "2026-11-20T15:38:25",
"has_protest": "1",
"has_children": "1",
"is_recurring": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 3g5EZaP81aVhcbDdevk4f66",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "13829179-7584-3a35-87b9-f01565374281",
"code": null,
"type": "saída",
"payment_method": "boleto",
"amount": 9674.03,
"due_date": "2026-12-09T03: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": "Et saepe doloribus vel earum facere qui necessitatibus.",
"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": "non",
"field2": 16,
"field3": false,
"notes": "Non nulla quis dolorem commodi.",
"created_at": null,
"updated_at": null
},
{
"id": "d5c51883-147e-3c22-ad33-09c7bf96e833",
"code": null,
"type": "entrada",
"payment_method": "boleto",
"amount": 5529.79,
"due_date": "2026-12-05T03: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": "Consequatur quasi ut quia velit harum doloribus natus et cumque numquam dolor occaecati 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": "debitis",
"field2": 10,
"field3": true,
"notes": "Ut fugit officia soluta illum.",
"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[]=est&suppliers[]=adipisci&works[]=cumque&cost_centers[]=ut&statuses[]=cancelado&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-11-20T15%3A38%3A25&protest_date_end=2026-11-20T15%3A38%3A25&has_protest=&has_children=1&is_recurring=1" \
--header "Authorization: Bearer ha6bdgPv1a3eEkV4DZf685c" \
--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]": "est",
"suppliers[0]": "adipisci",
"works[0]": "cumque",
"cost_centers[0]": "ut",
"statuses[0]": "cancelado",
"payment_method": "cheque",
"date_start": "2023-01-01",
"date_end": "2023-12-31",
"protest_date_start": "2026-11-20T15:38:25",
"protest_date_end": "2026-11-20T15:38:25",
"has_protest": "0",
"has_children": "1",
"is_recurring": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ha6bdgPv1a3eEkV4DZf685c",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "79ee47b3-d462-3130-a88b-0ca27b4a3a4d",
"code": null,
"type": "saída",
"payment_method": "cheque",
"amount": 6952.79,
"due_date": "2026-12-13T03: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": "Aut fugit nemo ducimus possimus et quo inventore.",
"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": "molestiae",
"field2": 27,
"field3": true,
"notes": "Impedit autem sed dolor.",
"created_at": null,
"updated_at": null
},
{
"id": "eef9e414-8585-3f59-834b-99c1a44471b2",
"code": null,
"type": "entrada",
"payment_method": "cheque",
"amount": 6142.49,
"due_date": "2026-11-28T03: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": "Sequi et repudiandae repudiandae vel laborum velit dolores culpa vel aperiam nihil voluptatem.",
"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": "iste",
"field2": 93,
"field3": false,
"notes": "Unde tempore a sequi tempore nobis.",
"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 e3ah1EbDfvkca68d4PZ6V5g" \
--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\": \"4624ad63-9e5e-3a2b-b372-6c62e424e68e\",
\"customer_id\": \"7939047f-3d88-30e7-9ad4-b64e91b2d416\",
\"work_id\": \"0c7a0220-4502-33a9-9499-a3030e27727b\",
\"cost_center_id\": \"dbc871e5-399e-3813-b803-099cbeadccbe\",
\"status\": \"Example Status\",
\"protest_date\": \"2024-01-01\",
\"bank_account_id\": \"5e85ed56-d867-38c1-b121-7401312f3f82\",
\"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 e3ah1EbDfvkca68d4PZ6V5g",
"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": "4624ad63-9e5e-3a2b-b372-6c62e424e68e",
"customer_id": "7939047f-3d88-30e7-9ad4-b64e91b2d416",
"work_id": "0c7a0220-4502-33a9-9499-a3030e27727b",
"cost_center_id": "dbc871e5-399e-3813-b803-099cbeadccbe",
"status": "Example Status",
"protest_date": "2024-01-01",
"bank_account_id": "5e85ed56-d867-38c1-b121-7401312f3f82",
"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 6Za4kfV63E1P8egav5hbDcd" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"fiscal_document_id\": \"numquam\",
\"installment_ids\": [
\"cupiditate\"
],
\"payment_method\": \"boleto\",
\"work_id\": \"voluptatem\",
\"cost_center_id\": \"reprehenderit\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/import-nfe"
);
const headers = {
"Authorization": "Bearer 6Za4kfV63E1P8egav5hbDcd",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"fiscal_document_id": "numquam",
"installment_ids": [
"cupiditate"
],
"payment_method": "boleto",
"work_id": "voluptatem",
"cost_center_id": "reprehenderit"
};
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/ex/history" \
--header "Authorization: Bearer fcD5gaaheP6vEVb3146dk8Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/ex/history"
);
const headers = {
"Authorization": "Bearer fcD5gaaheP6vEVb3146dk8Z",
"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/incidunt" \
--header "Authorization: Bearer dev51PV4ha6k6Z3aE8gfcDb" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/incidunt"
);
const headers = {
"Authorization": "Bearer dev51PV4ha6k6Z3aE8gfcDb",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "b61b0ced-3181-3c23-9e8b-4be9d0584725",
"code": null,
"type": "entrada",
"payment_method": "boleto",
"amount": 5154.13,
"due_date": "2026-12-03T03: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": "Ullam assumenda fuga praesentium aut perspiciatis velit non ut qui nam et sit saepe.",
"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": "impedit",
"field2": 14,
"field3": true,
"notes": "Saepe cumque eos corrupti qui vero et ipsam.",
"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/ducimus" \
--header "Authorization: Bearer V56v36dEghakPa84ec1DbfZ" \
--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\": \"656262d1-9a94-3eed-be9a-85095a5c6862\",
\"customer_id\": \"182a4505-79b0-3e37-92d6-b5f49f1513eb\",
\"work_id\": \"b8e6165f-64fb-3a2a-977b-79aa0d2d3883\",
\"cost_center_id\": \"a9a00b15-a0d9-3daf-8815-0d00af6bca42\",
\"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\": \"4e982dc5-13af-39fb-922c-8f8ec9a67c09\",
\"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/ducimus"
);
const headers = {
"Authorization": "Bearer V56v36dEghakPa84ec1DbfZ",
"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": "656262d1-9a94-3eed-be9a-85095a5c6862",
"customer_id": "182a4505-79b0-3e37-92d6-b5f49f1513eb",
"work_id": "b8e6165f-64fb-3a2a-977b-79aa0d2d3883",
"cost_center_id": "a9a00b15-a0d9-3daf-8815-0d00af6bca42",
"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": "4e982dc5-13af-39fb-922c-8f8ec9a67c09",
"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/rem" \
--header "Authorization: Bearer gekadfh6V36DEZbv458Pac1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/rem"
);
const headers = {
"Authorization": "Bearer gekadfh6V36DEZbv458Pac1",
"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\": \"crona.lenna@example.net\",
\"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": "crona.lenna@example.net",
"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 d3EbDva84P1cgfa6V6Zek5h" \
--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 d3EbDva84P1cgfa6V6Zek5h",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "7a6ed904-b45f-373b-8471-5d1ddbed014d",
"name": "Rosemary Hodkiewicz",
"username": "americo57",
"email": "lorna75@example.net",
"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 aZEdPacgVe4f36hD6kvb851" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"elenor.donnelly\",
\"password\": \"password123\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"f26480d5-b637-36ae-a4ba-ea700d282cbe\"
],
\"roles\": [
\"61b4f901-d9f8-3862-9089-16ff62106005\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/user"
);
const headers = {
"Authorization": "Bearer aZEdPacgVe4f36hD6kvb851",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "elenor.donnelly",
"password": "password123",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"f26480d5-b637-36ae-a4ba-ea700d282cbe"
],
"roles": [
"61b4f901-d9f8-3862-9089-16ff62106005"
]
};
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 63P4Vka58bZdEgDv1fe6ach" \
--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 63P4Vka58bZdEgDv1fe6ach",
"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 P4gZav1c3Efaed658Dhk6Vb" \
--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 P4gZav1c3Efaed658Dhk6Vb",
"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 vg54PkhVZa6Ea1fd8bD63ce" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"key\": \"nmuuzktazgv\",
\"value\": []
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/preferences"
);
const headers = {
"Authorization": "Bearer vg54PkhVZa6Ea1fd8bD63ce",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"key": "nmuuzktazgv",
"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/corporis" \
--header "Authorization: Bearer cP8aZ46Vg63edhvD1f5bkaE" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/preferences/corporis"
);
const headers = {
"Authorization": "Bearer cP8aZ46Vg63edhvD1f5bkaE",
"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 ahV1bc4ek6EPdaZ53Dv6gf8" \
--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 ahV1bc4ek6EPdaZ53Dv6gf8",
"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 8Ev41kP635dgfaa6VZebDch" \
--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 8Ev41kP635dgfaa6VZebDch",
"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/dolor" \
--header "Authorization: Bearer 3g65PfekEdv1acahV48bZ6D" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/transfers/dolor"
);
const headers = {
"Authorization": "Bearer 3g65PfekEdv1acahV48bZ6D",
"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/18/deposit" \
--header "Authorization: Bearer 6daDehfZ5g86kvbVa4cP1E3" \
--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/18/deposit"
);
const headers = {
"Authorization": "Bearer 6daDehfZ5g86kvbVa4cP1E3",
"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/6/withdraw" \
--header "Authorization: Bearer ebcZkE1Vhda5f8gD43P6va6" \
--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/6/withdraw"
);
const headers = {
"Authorization": "Bearer ebcZkE1Vhda5f8gD43P6va6",
"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 aP1ceZD48V3fgahbEv5k6d6" \
--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 aP1ceZD48V3fgahbEv5k6d6",
"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 3DVP6vafdb85Ee64hkgZ1ca" \
--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 3DVP6vafdb85Ee64hkgZ1ca",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "19adddee-7b18-3c10-869b-5e386ad0fe7a",
"agency": "0207",
"account": "6220583-6",
"type": "caixa",
"balance": 6222.28,
"holder_type": "pf",
"alias": "et",
"limit": 3831.29,
"available_balance": 10053.57,
"used_limit": 0,
"available_limit": 3831.29,
"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 8De6kh6Pca5VvEb134Zgfda" \
--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 8De6kh6Pca5VvEb134Zgfda",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "6cee952b-7a82-3d63-ae8c-1a5d0d351c87",
"agency": "5195",
"account": "1597094-8",
"type": "corrente",
"balance": 3404.43,
"holder_type": "pj",
"alias": "ea",
"limit": 3218.88,
"available_balance": 6623.3099999999995,
"used_limit": 0,
"available_limit": 3218.88,
"is_default": null,
"default_payment_method": null,
"bank": {
"id": null,
"name": null,
"code": null
},
"created_at": null,
"updated_at": null
},
{
"id": "fb776fa0-eb14-39d4-82f6-50604eeb6ac7",
"agency": "6719",
"account": "4971546-8",
"type": "caixa",
"balance": 5093.84,
"holder_type": "pf",
"alias": "eaque",
"limit": 1115.68,
"available_balance": 6209.52,
"used_limit": 0,
"available_limit": 1115.68,
"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 k5D6caeh6PV84vbaEZ3fdg1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"agency\": \"Example Agency\",
\"account\": \"8017316-9\",
\"bank_id\": \"b54ed4ed-3ba3-3374-aecf-54dc76c701d3\",
\"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 k5D6caeh6PV84vbaEZ3fdg1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"agency": "Example Agency",
"account": "8017316-9",
"bank_id": "b54ed4ed-3ba3-3374-aecf-54dc76c701d3",
"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/14" \
--header "Authorization: Bearer 6P5g6adV183vEhb4eZcfakD" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"agency\": \"Example Agency\",
\"account\": \"1698718-9\",
\"bank_id\": \"cdf9cd4b-db2c-3759-ac6e-c0661105ba08\",
\"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/14"
);
const headers = {
"Authorization": "Bearer 6P5g6adV183vEhb4eZcfakD",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"agency": "Example Agency",
"account": "1698718-9",
"bank_id": "cdf9cd4b-db2c-3759-ac6e-c0661105ba08",
"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/10" \
--header "Authorization: Bearer dg6fD6kea31bh4cv58aVPZE" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/10"
);
const headers = {
"Authorization": "Bearer dg6fD6kea31bh4cv58aVPZE",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "4b62aa65-36ac-328b-a299-1c94f16aee58",
"agency": "0446",
"account": "2109213-3",
"type": "caixa",
"balance": 3933.5,
"holder_type": "pj",
"alias": "et",
"limit": 7728.6,
"available_balance": 11662.1,
"used_limit": 0,
"available_limit": 7728.6,
"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/10" \
--header "Authorization: Bearer hZV6efkD1g38EP5b6advac4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/10"
);
const headers = {
"Authorization": "Bearer hZV6efkD1g38EP5b6advac4",
"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/9/statements/summary" \
--header "Authorization: Bearer ed4gkEVa85cbDv16aPhf3Z6" \
--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/9/statements/summary"
);
const headers = {
"Authorization": "Bearer ed4gkEVa85cbDv16aPhf3Z6",
"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/4/statements" \
--header "Authorization: Bearer 14gcZa8ae3hDd5P6Vkfb6Ev" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"aut\",
\"sort_desc\": false,
\"page\": 64,
\"per_page\": 4,
\"q\": \"zqfblibojlaojabq\",
\"type\": \"depósito\",
\"date_start\": \"2026-11-20T15:38:25\",
\"date_end\": \"2064-06-20\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/4/statements"
);
const headers = {
"Authorization": "Bearer 14gcZa8ae3hDd5P6Vkfb6Ev",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "aut",
"sort_desc": false,
"page": 64,
"per_page": 4,
"q": "zqfblibojlaojabq",
"type": "depósito",
"date_start": "2026-11-20T15:38:25",
"date_end": "2064-06-20"
};
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/20/statements/rerum" \
--header "Authorization: Bearer a1kD8a6cd3V56fhebvZ4gPE" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/20/statements/rerum"
);
const headers = {
"Authorization": "Bearer a1kD8a6cd3V56fhebvZ4gPE",
"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 akaVgPZbv5Dh4e31c6Ef6d8" \
--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 akaVgPZbv5Dh4e31c6Ef6d8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "88383727-bff9-3ea0-9818-79d4a2e25f2b",
"name": "Campos e Reis",
"code": "894"
},
{
"id": "928b323a-ca09-32b4-8a4b-5d7a8cd59b44",
"name": "Azevedo e Ferreira Ltda.",
"code": "309"
}
],
"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 f6kea86b3Vhcv4Pg1Z5dDEa" \
--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 f6kea86b3Vhcv4Pg1Z5dDEa",
"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 deEZ6kfcPa3864DbhVv5ga1" \
--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 deEZ6kfcPa3864DbhVv5ga1",
"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 h46af35ekEVPgD61bdcZ8va" \
--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 h46af35ekEVPgD61bdcZ8va",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "daa0f086-5c8b-3b7a-a07c-e5337b65e401",
"name": "Gusmão Comercial Ltda.",
"code": "35"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 VkZ6e8cvdE5D6aah3g1b4fP" \
--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 VkZ6e8cvdE5D6aah3g1b4fP",
"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 cadf6v56D3gb1ehZ48VPkaE" \
--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 cadf6v56D3gb1ehZ48VPkaE",
"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=Quibusdam+et+minus+rem+voluptates+velit.&categories[]=rem&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=accusamus&customers[]=ut&suppliers[]=ipsum&works[]=ab&cost_centers[]=aliquam" \
--header "Authorization: Bearer fabhVd5ePk68D6Ea431gZvc" \
--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": "Quibusdam et minus rem voluptates velit.",
"categories[0]": "rem",
"date_start": "2021-01-01",
"date_end": "2021-01-31",
"bank_accounts[0]": "accusamus",
"customers[0]": "ut",
"suppliers[0]": "ipsum",
"works[0]": "ab",
"cost_centers[0]": "aliquam",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer fabhVd5ePk68D6Ea431gZvc",
"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=Libero+nesciunt+amet+eaque+quis.&categories[]=ea&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=qui&customers[]=autem&suppliers[]=praesentium&works[]=ab&cost_centers[]=autem" \
--header "Authorization: Bearer Paac4DE85vZ6hbg6ke1f3dV" \
--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": "Libero nesciunt amet eaque quis.",
"categories[0]": "ea",
"date_start": "2021-01-01",
"date_end": "2021-01-31",
"bank_accounts[0]": "qui",
"customers[0]": "autem",
"suppliers[0]": "praesentium",
"works[0]": "ab",
"cost_centers[0]": "autem",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Paac4DE85vZ6hbg6ke1f3dV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "0223af3a-8828-3201-9da2-b0e016a1d38c",
"code": "FC-41154410",
"type": "saída",
"amount": -6794.72,
"description": "Optio in incidunt ipsa harum ut quia.",
"transaction_date": "1980-12-05T03:00:00.000000Z",
"transaction_category": {
"id": null,
"name": null,
"type": null
},
"created_at": null,
"updated_at": null
},
{
"id": "5b4e4fa5-fd43-3d5d-874f-ac4039dbbbf4",
"code": "FC-05236183",
"type": "transferência",
"amount": -1365.15,
"description": "Atque temporibus sed consequuntur est ullam molestias.",
"transaction_date": "1972-06-27T03: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 gPcZDEVkvh6ab36d5f81a4e" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"Example Type\",
\"cash_session_id\": \"676c64d5-cabd-306f-9276-22710a90366a\",
\"transaction_category_id\": \"f7684310-342f-34d4-97ac-e38440e5c6ea\",
\"bank_account_id\": \"9eeb0fce-a16f-38c8-a976-1a798e56b7c2\",
\"customer_id\": \"71e032f5-aa86-3dcd-a659-576b1adc12e9\",
\"supplier_id\": \"fb7e3342-7da2-3dab-bd45-51bbdd10af83\",
\"work_id\": \"9f843ac0-d39a-3e80-84ea-e9a03f70d95c\",
\"cost_center_id\": \"dc1eb99a-79fe-310e-b968-e408f7a2adb2\",
\"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 gPcZDEVkvh6ab36d5f81a4e",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "Example Type",
"cash_session_id": "676c64d5-cabd-306f-9276-22710a90366a",
"transaction_category_id": "f7684310-342f-34d4-97ac-e38440e5c6ea",
"bank_account_id": "9eeb0fce-a16f-38c8-a976-1a798e56b7c2",
"customer_id": "71e032f5-aa86-3dcd-a659-576b1adc12e9",
"supplier_id": "fb7e3342-7da2-3dab-bd45-51bbdd10af83",
"work_id": "9f843ac0-d39a-3e80-84ea-e9a03f70d95c",
"cost_center_id": "dc1eb99a-79fe-310e-b968-e408f7a2adb2",
"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/14" \
--header "Authorization: Bearer hgZa6d4k1E3va6bfVc8DPe5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/14"
);
const headers = {
"Authorization": "Bearer hgZa6d4k1E3va6bfVc8DPe5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "4aaf26fd-fe25-3430-8614-9b318ac2c9d1",
"code": "FC-85156633",
"type": "ajuste saída",
"amount": -4733.22,
"description": "Laudantium at nemo placeat nam et omnis.",
"transaction_date": "1994-06-23T03: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/1" \
--header "Authorization: Bearer g1acPDZ3h658k6EdVavbf4e" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"Example Type\",
\"cash_session_id\": \"3d99ee7d-3c46-3b21-a261-41147cd1cf3a\",
\"transaction_category_id\": \"33f01bcb-f468-3578-8f8f-7a12599d8260\",
\"bank_account_id\": \"3b23adb0-54d5-3cb0-a0dc-f2f01572fdf9\",
\"customer_id\": \"daef1f8c-8902-314f-b435-c12939482759\",
\"supplier_id\": \"ce211000-5831-3062-9883-4f7eb93cdaed\",
\"work_id\": \"83e3e4ab-38cd-3722-bee7-aa7dc18640bf\",
\"cost_center_id\": \"28a439b2-669b-3956-87ef-7cc67ffa8921\",
\"amount\": 1,
\"description\": \"Example Description\",
\"transaction_date\": \"2024-01-01\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/1"
);
const headers = {
"Authorization": "Bearer g1acPDZ3h658k6EdVavbf4e",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "Example Type",
"cash_session_id": "3d99ee7d-3c46-3b21-a261-41147cd1cf3a",
"transaction_category_id": "33f01bcb-f468-3578-8f8f-7a12599d8260",
"bank_account_id": "3b23adb0-54d5-3cb0-a0dc-f2f01572fdf9",
"customer_id": "daef1f8c-8902-314f-b435-c12939482759",
"supplier_id": "ce211000-5831-3062-9883-4f7eb93cdaed",
"work_id": "83e3e4ab-38cd-3722-bee7-aa7dc18640bf",
"cost_center_id": "28a439b2-669b-3956-87ef-7cc67ffa8921",
"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/17" \
--header "Authorization: Bearer 368e4D1dPV56hvakfbZcEga" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/17"
);
const headers = {
"Authorization": "Bearer 368e4D1dPV56hvakfbZcEga",
"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 1e4ag366DvfdZkPVh85Ebac" \
--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 1e4ag366DvfdZkPVh85Ebac",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "93492b00-34ae-3f9c-ab66-fc10e1010c27",
"code": null,
"opened_by": null,
"opened_at": "2021-12-28T03:48:31.000000Z",
"closed_by": null,
"closed_at": "1979-05-24T01:21:29.000000Z",
"opening_balance": 4064.72,
"closing_balance": 6115.5,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Fechado",
"hasSnapshot": false,
"created_at": "2013-06-05T04:25:53.000000Z",
"updated_at": "2009-03-10T07:32:48.000000Z"
},
{
"id": "f1bb278b-e1bd-3aee-9f91-d423c146a34c",
"code": null,
"opened_by": null,
"opened_at": "1982-06-12T04:22:51.000000Z",
"closed_by": null,
"closed_at": "1986-03-13T18:13:30.000000Z",
"opening_balance": 1745.01,
"closing_balance": 4775.03,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Aberto",
"hasSnapshot": false,
"created_at": "1973-01-20T07:05:13.000000Z",
"updated_at": "2005-12-21T08:50:35.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 k13v6P4aDcd5ebZf6gha8EV" \
--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 k13v6P4aDcd5ebZf6gha8EV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "ae44270f-6260-30e0-8e72-9d0ef2a01cb1",
"code": null,
"opened_by": null,
"opened_at": "2020-08-15T01:54:06.000000Z",
"closed_by": null,
"closed_at": "1983-09-04T12:29:00.000000Z",
"opening_balance": 7379.34,
"closing_balance": 1537.87,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Aberto",
"hasSnapshot": false,
"created_at": "1998-01-08T05:46:38.000000Z",
"updated_at": "2023-04-17T10:39:37.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/4fe91523-b58c-3b3c-abc1-090c42aded67" \
--header "Authorization: Bearer DeVabPgahfE663541kcdZ8v" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/close/4fe91523-b58c-3b3c-abc1-090c42aded67"
);
const headers = {
"Authorization": "Bearer DeVabPgahfE663541kcdZ8v",
"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/0b61c070-3c1f-31ae-a4d2-e554cc45af87/account-snapshot" \
--header "Authorization: Bearer 5e6Efav438VZDPbg16kcahd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/0b61c070-3c1f-31ae-a4d2-e554cc45af87/account-snapshot"
);
const headers = {
"Authorization": "Bearer 5e6Efav438VZDPbg16kcahd",
"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/2ef2dc23-2291-30a4-9d46-46925e9d4614" \
--header "Authorization: Bearer caEhk6VavdgbZf46P381D5e" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/2ef2dc23-2291-30a4-9d46-46925e9d4614"
);
const headers = {
"Authorization": "Bearer caEhk6VavdgbZf46P381D5e",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "e83a3861-f87a-3f0e-b2a5-f7ff298b0799",
"code": null,
"opened_by": null,
"opened_at": "1979-05-10T16:19:34.000000Z",
"closed_by": null,
"closed_at": "2012-02-28T09:34:12.000000Z",
"opening_balance": 5833.17,
"closing_balance": 4968.96,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Aberto",
"hasSnapshot": false,
"created_at": "2007-06-13T14:47:26.000000Z",
"updated_at": "2008-02-18T17:34:03.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/9b281be5-a09d-3feb-95f0-a48c9ad06466" \
--header "Authorization: Bearer v6VZa8436P5kgfE1Dahdbec" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/9b281be5-a09d-3feb-95f0-a48c9ad06466"
);
const headers = {
"Authorization": "Bearer v6VZa8436P5kgfE1Dahdbec",
"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 P641eafgkZEc8Da3bhv56dV" \
--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 P641eafgkZEc8Da3bhv56dV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "058dd2ae-e822-304e-abf3-a08c40d88788",
"name": "suscipit eaque",
"slug": null,
"abbreviation": "bou",
"tutorials_count": 0
},
{
"id": "728d98e6-28d0-30a5-9d30-214f36668c71",
"name": "autem nemo",
"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" \
--header "Authorization: Bearer dc66V3PeDvhga8k4Zf1E5ab" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/tutorials/modules"
);
const headers = {
"Authorization": "Bearer dc66V3PeDvhga8k4Zf1E5ab",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "df0f1d2f-8078-3b8f-8ce7-bc905abd7104",
"name": "Mollitia ullam",
"slug": "mollitia-ullam-434893",
"description": "Necessitatibus mollitia omnis est eos porro dolores deleniti consequatur.",
"icon": null,
"color": null,
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
},
{
"id": "681f3564-7f42-38fe-b3ad-841e67073fb6",
"name": "Quasi voluptatem",
"slug": "quasi-voluptatem-414990",
"description": "Qui veritatis minus eos vero.",
"icon": null,
"color": null,
"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[]=4ddc3a1d-4ac9-3955-8f87-ab575c4d67d1" \
--header "Authorization: Bearer kagVPbhv4c165a836ZDefdE" \
--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[0]": "4ddc3a1d-4ac9-3955-8f87-ab575c4d67d1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer kagVPbhv4c165a836ZDefdE",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "3a18277c-1268-3bcb-bea0-5347cfd668ea",
"title": "Rerum rerum eligendi qui",
"description": "Explicabo consectetur rerum soluta quas quas.",
"cover_url": null,
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a345c150-9977-4d5a-aec1-a38b47a811f0",
"name": "Debitis quasi",
"slug": "debitis-quasi-943726",
"icon": null,
"color": null
},
"created_at": null,
"updated_at": null
},
{
"id": "43032ba0-e7fb-3fa9-b22d-cdd9947dfcca",
"title": "Ut voluptate debitis tenetur",
"description": "Impedit ut officiis quod unde.",
"cover_url": null,
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a345c150-a201-49c8-9adc-b2438348980a",
"name": "Maiores et",
"slug": "maiores-et-827540",
"icon": null,
"color": 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.
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 53DP6caeZg16hvEf4akd8Vb" \
--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 53DP6caeZg16hvEf4akd8Vb",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "2af4f577-d48b-3f96-812b-b0d35c4fc27d",
"title": "Itaque ullam velit fugiat",
"description": "Nulla sit eveniet reprehenderit laudantium nesciunt distinctio tenetur.",
"cover_url": null,
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a345c150-a847-4164-b6e2-5a955f4ffebd",
"name": "Doloremque esse",
"slug": "doloremque-esse-454445",
"icon": null,
"color": 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.
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 583ae66ghkDfPE4acvZV1bd" \
--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 583ae66ghkDfPE4acvZV1bd",
"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 Z4aafe6bg3kDh18cdP65vEV" \
--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\": \"1f0841da-6f62-337a-9dd6-9bef753e3f3c\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts"
);
const headers = {
"Authorization": "Bearer Z4aafe6bg3kDh18cdP65vEV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "Example Sort by",
"sort_desc": true,
"page": 1,
"per_page": 1,
"work_id": "1f0841da-6f62-337a-9dd6-9bef753e3f3c"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "6dfceec5-31e2-3653-bcd9-695fd8fdce30",
"number": "756/2026",
"started_at": "2026-11-20",
"deadline_at": "2027-11-20",
"work": {
"id": "a345c145-2f86-4e4d-a5c0-77e26471d17f",
"name": "Benjamin das Dores Quintana Sobrinho"
},
"created_at": null,
"updated_at": null
},
{
"id": "379e43fb-0e39-33a6-a056-155d3791b3eb",
"number": "596/2026",
"started_at": "2026-11-20",
"deadline_at": "2027-11-20",
"work": {
"id": "a345c145-3789-49ea-a879-81e842ac32b7",
"name": "Emiliano Benez Mascarenhas"
},
"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 Z5vgaE83ca1fh6DVPkd6e4b" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"work_id\": \"4356bc69-fb06-34fa-9835-28ffc5040cbc\",
\"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 Z5vgaE83ca1fh6DVPkd6e4b",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"work_id": "4356bc69-fb06-34fa-9835-28ffc5040cbc",
"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/17" \
--header "Authorization: Bearer vegEbZd8P3cfDa514ak66Vh" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts/17"
);
const headers = {
"Authorization": "Bearer vegEbZd8P3cfDa514ak66Vh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "89cca673-0376-3f4c-af33-92cf6869847b",
"number": "468/2026",
"started_at": "2026-11-20",
"deadline_at": "2027-11-20",
"work": {
"id": "a345c145-439b-4471-8666-bc122001a77d",
"name": "Sra. Daiana Meireles Matos 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.
Update contract
requires authentication contract update
Update a work contract
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/contracts/12" \
--header "Authorization: Bearer dZebg5fhP66V8aEavkc4D31" \
--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/12"
);
const headers = {
"Authorization": "Bearer dZebg5fhP66V8aEavkc4D31",
"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/omnis" \
--header "Authorization: Bearer ebPdVfcvg5E6Dk8Za3h16a4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts/omnis"
);
const headers = {
"Authorization": "Bearer ebPdVfcvg5E6Dk8Za3h16a4",
"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=et" \
--header "Authorization: Bearer Ec3P1gZa6d58DafVke4b6vh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"parent_id\": \"facilis\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/next-code"
);
const params = {
"parent_id": "et",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Ec3P1gZa6d58DafVke4b6vh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"parent_id": "facilis"
};
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 PbDhcaV5vgZe136da46fk8E" \
--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 PbDhcaV5vgZe136da46fk8E",
"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 8a366PfvaDhgEV4bc1dek5Z" \
--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 8a366PfvaDhgEV4bc1dek5Z",
"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 481e66hZa5PkfDcgv3aVdbE" \
--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 481e66hZa5PkfDcgv3aVdbE",
"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 V4ahZ8gE3av61k5bPD6fdce" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"cost_center_id\": \"error\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/stock-config"
);
const headers = {
"Authorization": "Bearer V4ahZ8gE3av61k5bPD6fdce",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"cost_center_id": "error"
};
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 3khagEceb5fvP641adV86DZ" \
--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 3khagEceb5fvP641adV86DZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "a6297499-50e7-3c44-b71b-26e236279320",
"code": "576",
"name": "rerum reiciendis",
"level": 1,
"path": null,
"is_active": true,
"selectable": false,
"created_at": null,
"updated_at": null
},
{
"id": "6bb6cfb7-7c99-3bcd-85e4-117894517c38",
"code": "132",
"name": "expedita qui",
"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/ut" \
--header "Authorization: Bearer 5dPgka1bc6fDE48e6Zvha3V" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/ut"
);
const headers = {
"Authorization": "Bearer 5dPgka1bc6fDE48e6Zvha3V",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d8a0be3e-86f3-3f81-a6eb-75ebb3410381",
"code": "769",
"name": "quibusdam aut",
"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 k6deEbgca31v64DaVP5Zf8h" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"code\": \"Example Code\",
\"name\": \"Example Name\",
\"parent_id\": \"12192e3a-5238-30d5-bc00-78853bd5ac1b\",
\"work_id\": \"8062e25f-4ab3-39c6-881e-d792141b93f3\",
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers"
);
const headers = {
"Authorization": "Bearer k6deEbgca31v64DaVP5Zf8h",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"code": "Example Code",
"name": "Example Name",
"parent_id": "12192e3a-5238-30d5-bc00-78853bd5ac1b",
"work_id": "8062e25f-4ab3-39c6-881e-d792141b93f3",
"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/voluptatum" \
--header "Authorization: Bearer 68E5fbPc3va61VagkD4dZhe" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"code\": \"Example Code\",
\"name\": \"Example Name\",
\"parent_id\": \"dff3e3a0-f1b9-3243-b125-cdde304eab27\",
\"work_id\": \"9828cb0e-f057-34d6-92b6-e80862982338\",
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/voluptatum"
);
const headers = {
"Authorization": "Bearer 68E5fbPc3va61VagkD4dZhe",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"code": "Example Code",
"name": "Example Name",
"parent_id": "dff3e3a0-f1b9-3243-b125-cdde304eab27",
"work_id": "9828cb0e-f057-34d6-92b6-e80862982338",
"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/cupiditate" \
--header "Authorization: Bearer Pva3ab186EkhV4ZD5ecfd6g" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/cupiditate"
);
const headers = {
"Authorization": "Bearer Pva3ab186EkhV4ZD5ecfd6g",
"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 eP4a3c65dh8abE1DgVfv6kZ" \
--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 eP4a3c65dh8abE1DgVfv6kZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "2799b654-8225-30ea-b354-136afb1d9826",
"name": "Dr. Elias Soares Pacheco",
"email": "jverdugo@example.net",
"phone": "(84) 97916-4051",
"document": "350.234.082-05",
"type": "pf",
"responsible": "Dr. Olívia Gusmão Beltrão",
"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": "b697a378-20d8-3396-bcf5-1c16dc1e1ca7",
"name": "Sr. Gustavo Assunção",
"email": "george.brito@example.net",
"phone": "(92) 3329-3797",
"document": "365.702.172-83",
"type": "pf",
"responsible": "Allison Espinoza Dominato Sobrinho",
"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 cEZdabgVk663P15vaehD8f4" \
--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 cEZdabgVk663P15vaehD8f4",
"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/1" \
--header "Authorization: Bearer Pbgefa48avc36D5EkZ6V1dh" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/customers/1"
);
const headers = {
"Authorization": "Bearer Pbgefa48avc36D5EkZ6V1dh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "c974e892-8268-3063-af07-1f83bb5c1ce1",
"name": "Srta. Fabiana Cordeiro Filho",
"email": "uferreira@example.com",
"phone": "(62) 97413-7396",
"document": "245.254.131-15",
"type": "pf",
"responsible": "Victor Rangel Sobrinho",
"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/8" \
--header "Authorization: Bearer kaZ56cb4ge8a3V6hdvEDfP1" \
--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/8"
);
const headers = {
"Authorization": "Bearer kaZ56cb4ge8a3V6hdvEDfP1",
"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 caf5hkZba16egdVP4D3E6v8" \
--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 caf5hkZba16egdVP4D3E6v8",
"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 8bZfkh3Ea5Vg6dD1a4cPv6e" \
--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\": \"a8986081-ba7e-3bc6-b571-99a61735abcf\",
\"contract_id\": \"0f1b3398-b33d-3a07-929a-3514af1b37f8\",
\"status_id\": \"affef2a7-0209-3199-9007-0618d5d28abb\",
\"filled_by\": \"249ae3b2-3f26-384c-8578-ab5a6b4c6631\",
\"responsible_id\": \"1e354100-db35-3515-a2bc-148fff564129\",
\"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 8bZfkh3Ea5Vg6dD1a4cPv6e",
"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": "a8986081-ba7e-3bc6-b571-99a61735abcf",
"contract_id": "0f1b3398-b33d-3a07-929a-3514af1b37f8",
"status_id": "affef2a7-0209-3199-9007-0618d5d28abb",
"filled_by": "249ae3b2-3f26-384c-8578-ab5a6b4c6631",
"responsible_id": "1e354100-db35-3515-a2bc-148fff564129",
"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": "76e54f11-a512-365d-983f-ff908b58c341",
"code": "RDO-20-11-26",
"report_number": 1,
"date": "2026-11-20",
"status": {
"id": "a345c145-a7fc-4933-81e0-3d7478917e57",
"slug": null,
"name": null,
"abbreviation": "debitis",
"color": "#3bf462",
"text_color": "#c403ac"
},
"work": {
"id": "a345c145-a023-44c4-8d64-c72e3f1766b1",
"name": "Sr. Juan Madeira",
"started_at": "1987-07-30 02:13:15"
},
"filled_by": {
"id": "a345c145-a528-4af6-81e2-909f2a828699",
"name": "Tate Jaskolski"
},
"contract_number": "726/2026",
"deadline_at": "2027-11-20",
"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": "8f68c10d-30c9-36d3-a8f2-c2ba14ae9fd8",
"code": "RDO-20-11-26",
"report_number": 1,
"date": "2026-11-20",
"status": {
"id": "a345c145-b0fc-4c26-8c36-604a743966b4",
"slug": null,
"name": null,
"abbreviation": "enim",
"color": "#daf20f",
"text_color": "#bcd259"
},
"work": {
"id": "a345c145-ab6f-42fd-bb90-1fd4b0a4bd63",
"name": "Dr. Michelle Melissa Lutero Jr.",
"started_at": "2008-05-13 15:11:44"
},
"filled_by": {
"id": "a345c145-af42-4a74-98f0-3d5dd46913b9",
"name": "Miss Leilani Rutherford"
},
"contract_number": "521/2026",
"deadline_at": "2027-11-20",
"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 bg6843k6EDdP1he5cfZVaav" \
--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 bg6843k6EDdP1he5cfZVaav",
"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/maxime" \
--header "Authorization: Bearer Vb6ek8a6d3cZfgD1aP45hvE" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/maxime"
);
const headers = {
"Authorization": "Bearer Vb6ek8a6d3cZfgD1aP45hvE",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "e462a1a0-c3a8-3b56-b4d7-21110e1d51af",
"code": "RDO-20-11-26",
"report_number": 1,
"date": "2026-11-20",
"status": {
"id": "a345c145-cb15-412f-b756-b1ff88a7e4c3",
"slug": null,
"name": null,
"abbreviation": "quia",
"color": "#5e834c",
"text_color": "#f757eb"
},
"work": {
"id": "a345c145-c3f7-4296-9f81-958092731b09",
"name": "Dr. Maria Marin Cordeiro Neto",
"started_at": "1994-09-19 17:29:58"
},
"filled_by": {
"id": "a345c145-c8fa-4ac0-aaaa-b412a310d67b",
"name": "Stephanie Runolfsdottir"
},
"contract_number": "479/2026",
"deadline_at": "2027-11-20",
"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 Ekv6ac3feDZh5a1b4g6dPV8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"contract_id\": \"Example Contract id\",
\"date\": \"2024-01-01\",
\"status_id\": \"d9c1c388-ba68-33db-81c0-2c8b61e96af1\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs"
);
const headers = {
"Authorization": "Bearer Ekv6ac3feDZh5a1b4g6dPV8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"contract_id": "Example Contract id",
"date": "2024-01-01",
"status_id": "d9c1c388-ba68-33db-81c0-2c8b61e96af1"
};
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/ut" \
--header "Authorization: Bearer c4bEheVk63DZvP1f8g5ada6" \
--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\": \"92ddbb15-57da-4964-9fcd-07bfa451d90e\",
\"quantity\": 1
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/ut"
);
const headers = {
"Authorization": "Bearer c4bEheVk63DZvP1f8g5ada6",
"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": "92ddbb15-57da-4964-9fcd-07bfa451d90e",
"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/error/finalize" \
--header "Authorization: Bearer eE1b63kDd8af56cvg4PZVah" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/error/finalize"
);
const headers = {
"Authorization": "Bearer eE1b63kDd8af56cvg4PZVah",
"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/aut/signed-document" \
--header "Authorization: Bearer Zg54ac1V6d8DPakb6h3vEfe" \
--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/aut/signed-document"
);
const headers = {
"Authorization": "Bearer Zg54ac1V6d8DPakb6h3vEfe",
"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/et/reopen" \
--header "Authorization: Bearer VkaD568bhZeg4Ed6vfc3Pa1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/et/reopen"
);
const headers = {
"Authorization": "Bearer VkaD568bhZeg4Ed6vfc3Pa1",
"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/perspiciatis/photos" \
--header "Authorization: Bearer egE8ba46fa5h6vcZk1dPDV3" \
--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/perspiciatis/photos"
);
const headers = {
"Authorization": "Bearer egE8ba46fa5h6vcZk1dPDV3",
"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/et/photos/omnis" \
--header "Authorization: Bearer h1e5a34b8Vkca6fgvdEP6DZ" \
--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/et/photos/omnis"
);
const headers = {
"Authorization": "Bearer h1e5a34b8Vkca6fgvdEP6DZ",
"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/sit/photos/vero" \
--header "Authorization: Bearer 86VgE1hkPv5Z46fDba3acde" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/sit/photos/vero"
);
const headers = {
"Authorization": "Bearer 86VgE1hkPv5Z46fDba3acde",
"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/eum" \
--header "Authorization: Bearer 3gED6hVfb1dZcePa4v65ak8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/eum"
);
const headers = {
"Authorization": "Bearer 3gED6hVfb1dZcePa4v65ak8",
"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 8PD1abd56g46ZEhvac3kfeV" \
--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 8PD1abd56g46ZEhvac3kfeV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "7b628763-5528-3309-b8a5-5f4a7ff849c0",
"name": "Odit",
"code": "YMX",
"description": "Quaerat excepturi consequatur omnis ut sit laborum.",
"active": true
},
{
"id": "3f97468b-f2e8-3ff1-89ed-ac3100382ee6",
"name": "Facere",
"code": "OWY",
"description": "Impedit molestiae dignissimos repellendus autem.",
"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 hadDk66854cZPf3VbvaE1ge" \
--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 hadDk66854cZPf3VbvaE1ge",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "05b34e6f-6073-3895-8e2e-f9b4a3b62377",
"name": "Iure",
"code": "WEO",
"description": "Dicta sed ut amet quia quae ea neque.",
"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 51Dc8eavk3dgZahV46bEf6P" \
--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 51Dc8eavk3dgZahV46bEf6P",
"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 3k5ae41DvV8c6ZfhbdEPga6" \
--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 3k5ae41DvV8c6ZfhbdEPga6",
"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/asperiores" \
--header "Authorization: Bearer acPdEbh6513vkaDeV86Zg4f" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/disciplines/asperiores"
);
const headers = {
"Authorization": "Bearer acPdEbh6513vkaDeV86Zg4f",
"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 1v4a6eVEcDP36Zak5fg8hbd" \
--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 1v4a6eVEcDP36Zak5fg8hbd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "f14b22f8-caa7-3249-92f8-4057f1921f46",
"name": "Aparecida da Rosa Ortega Filho",
"description": "Quo corporis consequatur ullam et sed. Qui qui eius ad ab nihil et quas dolores. Et quidem consectetur cupiditate consequatur. Sint natus sed iste blanditiis est odio illo dolore.",
"module": "document"
},
{
"id": "03391b8b-5bbb-33f7-b172-ad15fade0c21",
"name": "Rogério Noel Sanches",
"description": "Voluptas pariatur qui quia et error. Quis numquam quidem non dicta. Rem nobis ducimus impedit saepe atque dicta. Molestiae qui voluptatem dolore.",
"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/quae" \
--header "Authorization: Bearer k6vPa4ge68fba3hcVED1d5Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/document-categories/quae"
);
const headers = {
"Authorization": "Bearer k6vPa4ge68fba3hcVED1d5Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a4a5a4d9-03a3-3942-982a-dc9857f07f9a",
"name": "Srta. Manoela Tâmara Rezende",
"description": "Voluptatem soluta rerum amet sequi est. Dicta sed magnam facere modi. Ut repellendus minus repellat tempore quia.",
"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 54g6kch13DfZvbEV68dePaa" \
--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 54g6kch13DfZvbEV68dePaa",
"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/voluptatem" \
--header "Authorization: Bearer ZEcavf6g58ePD6b3k41hdaV" \
--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/voluptatem"
);
const headers = {
"Authorization": "Bearer ZEcavf6g58ePD6b3k41hdaV",
"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/dolorem" \
--header "Authorization: Bearer 83ec6ZVaPdkE5fD1ha64gvb" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/document-categories/dolorem"
);
const headers = {
"Authorization": "Bearer 83ec6ZVaPdkE5fD1ha64gvb",
"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[]=est&documentable_type=tempore&customers[]=consectetur&suppliers[]=assumenda" \
--header "Authorization: Bearer hedb5agV1Eck46vf8PDZ36a" \
--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]": "est",
"documentable_type": "tempore",
"customers[0]": "consectetur",
"suppliers[0]": "assumenda",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer hedb5agV1Eck46vf8PDZ36a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "e6976f09-89ee-32b3-b92a-0bbbfc0bcef6",
"name": "Sr. George Henrique Camacho Filho",
"file": {
"id": null,
"url": null,
"extension": null
},
"created_at": null,
"updated_at": null
},
{
"id": "a8f4c485-cce7-325d-af7a-4f9a8460b044",
"name": "Patrícia Rebeca Marés",
"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/19" \
--header "Authorization: Bearer eEb3Zc64fvdgaVh1856DaPk" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/documents/19"
);
const headers = {
"Authorization": "Bearer eEb3Zc64fvdgaVh1856DaPk",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "29b10726-064d-3d60-8f8c-b83b5871e443",
"name": "Dr. Pablo Benedito Quintana",
"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 d16b3a68fhakc54VgEZPeDv" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"category_id\": \"8cd85fd9-54c6-354e-97de-d36435f6ccf5\",
\"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 d16b3a68fhakc54VgEZPeDv",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"category_id": "8cd85fd9-54c6-354e-97de-d36435f6ccf5",
"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/15" \
--header "Authorization: Bearer g6cPa3vE5k4edDZfh16Vab8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"category_id\": \"84daaa51-7b16-3de8-af5b-efe7bf72f1eb\",
\"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/15"
);
const headers = {
"Authorization": "Bearer g6cPa3vE5k4edDZfh16Vab8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"category_id": "84daaa51-7b16-3de8-af5b-efe7bf72f1eb",
"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 c6ZbVPehdavkEa531gD84f6" \
--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 c6ZbVPehdavkEa531gD84f6",
"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 P1va8d4keDZa5b6EfV3hg6c" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"voluptas\",
\"renewal_status\": \"completed\",
\"urgency\": \"expired\",
\"employee_id\": \"rem\",
\"epi_type_id\": \"ut\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals"
);
const headers = {
"Authorization": "Bearer P1va8d4keDZa5b6EfV3hg6c",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "voluptas",
"renewal_status": "completed",
"urgency": "expired",
"employee_id": "rem",
"epi_type_id": "ut"
};
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 gdZeb8E36hkD1a6vf5VPa4c" \
--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 gdZeb8E36hkD1a6vf5VPa4c",
"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/quia/renew" \
--header "Authorization: Bearer egb5Pka1av8cD4VEdZ63fh6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"quantity\": 1,
\"condition\": \"new\",
\"confirm_insufficient_stock\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/quia/renew"
);
const headers = {
"Authorization": "Bearer egb5Pka1av8cD4VEdZ63fh6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quantity": 1,
"condition": "new",
"confirm_insufficient_stock": false
};
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/natus/ignore" \
--header "Authorization: Bearer Z1EdPbah568gVk4e36cfaDv" \
--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/natus/ignore"
);
const headers = {
"Authorization": "Bearer Z1EdPbah568gVk4e36cfaDv",
"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/quia/ignore" \
--header "Authorization: Bearer ak6V1bDPh5cgE86dZv43efa" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/quia/ignore"
);
const headers = {
"Authorization": "Bearer ak6V1bDPh5cgE86dZv43efa",
"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 D8v5ebZhdgcE6ak1af463VP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"velit\",
\"stock_id\": \"natus\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types"
);
const headers = {
"Authorization": "Bearer D8v5ebZhdgcE6ak1af463VP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "velit",
"stock_id": "natus"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "652f1a37-0433-3eeb-a5ce-db9923622fac",
"name": "laborum reprehenderit",
"default_validity_days": 550,
"requires_signature": false,
"numero_ca": "44037",
"product": null,
"available_quantity": null,
"created_at": null,
"updated_at": null
},
{
"id": "7c803c88-acec-3a4d-9760-ad514ae599cf",
"name": "facilis voluptates",
"default_validity_days": 265,
"requires_signature": false,
"numero_ca": "26203",
"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 afv6be5k8V36hZacDgdP4E1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"non\",
\"stock_id\": \"culpa\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/candidates"
);
const headers = {
"Authorization": "Bearer afv6be5k8V36hZacDgdP4E1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "non",
"stock_id": "culpa"
};
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/quis" \
--header "Authorization: Bearer bc66aZ51dag4EP8fveV3hkD" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/quis"
);
const headers = {
"Authorization": "Bearer bc66aZ51dag4EP8fveV3hkD",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "c769ddaa-c953-33cc-a692-764d2326b1aa",
"name": "dignissimos aliquam",
"default_validity_days": 315,
"requires_signature": false,
"numero_ca": "35020",
"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 6Dev4aEdf65kV3ab1ch8ZgP" \
--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\": \"15c2991b-1cc2-3c35-940b-be10412856b4\",
\"product_family_id\": \"ae65ff5d-8a75-392f-bf72-250e86e3728e\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types"
);
const headers = {
"Authorization": "Bearer 6Dev4aEdf65kV3ab1ch8ZgP",
"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": "15c2991b-1cc2-3c35-940b-be10412856b4",
"product_family_id": "ae65ff5d-8a75-392f-bf72-250e86e3728e"
};
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 6ZEbcd1av4eDka3P58h6Vgf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"epi_type_id\": \"1b06eb24-7d5a-35dd-a224-894f0345881e\",
\"action\": \"Example Items * action\",
\"product_id\": \"38228572-c2f3-37aa-a262-c660aa8ead9f\",
\"product_family_id\": \"04defd1a-7d92-3345-8d0a-87a54d1c76bc\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/link-products"
);
const headers = {
"Authorization": "Bearer 6ZEbcd1av4eDka3P58h6Vgf",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"epi_type_id": "1b06eb24-7d5a-35dd-a224-894f0345881e",
"action": "Example Items * action",
"product_id": "38228572-c2f3-37aa-a262-c660aa8ead9f",
"product_family_id": "04defd1a-7d92-3345-8d0a-87a54d1c76bc"
},
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/illum/product" \
--header "Authorization: Bearer 6EP615kgv4hebacdDf8aZV3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"action\": \"Example Action\",
\"product_id\": \"5571e028-dd7f-3653-b516-60f661ac0949\",
\"product_family_id\": \"82a74edb-2896-3253-aa3a-daf3b60294c2\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/illum/product"
);
const headers = {
"Authorization": "Bearer 6EP615kgv4hebacdDf8aZV3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"action": "Example Action",
"product_id": "5571e028-dd7f-3653-b516-60f661ac0949",
"product_family_id": "82a74edb-2896-3253-aa3a-daf3b60294c2"
};
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/atque" \
--header "Authorization: Bearer 6fPgEa8V3kavebc46h1dD5Z" \
--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/atque"
);
const headers = {
"Authorization": "Bearer 6fPgEa8V3kavebc46h1dD5Z",
"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/sit" \
--header "Authorization: Bearer Ea6D61VkaZfbPc4e5vgd3h8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/sit"
);
const headers = {
"Authorization": "Bearer Ea6D61VkaZfbPc4e5vgd3h8",
"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 db4haZE3a18vD6cf56kVePg" \
--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 db4haZE3a18vD6cf56kVePg",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "f41d6817-7e3f-4502-b1f7-f56e6dfa198f",
"name": "vel",
"description": null,
"created_at": null,
"updated_at": null
},
{
"id": "d09eb30a-9f22-4276-bfa0-096913e9d5d2",
"name": "accusamus",
"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/est" \
--header "Authorization: Bearer b6Zck46a1Ev3V8h5fDegdaP" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employee-roles/est"
);
const headers = {
"Authorization": "Bearer b6Zck46a1Ev3V8h5fDegdaP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "6e2d1bc4-bb90-445e-913a-36f9d6f86bfd",
"name": "cumque",
"description": 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 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 Dagef5hZk166c8PVda4Eb3v" \
--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 Dagef5hZk166c8PVda4Eb3v",
"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/magnam" \
--header "Authorization: Bearer P4bacveD18356E6gahVZfkd" \
--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/magnam"
);
const headers = {
"Authorization": "Bearer P4bacveD18356E6gahVZfkd",
"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/rerum" \
--header "Authorization: Bearer bedvP61ZkhEDf68Va5c3ga4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employee-roles/rerum"
);
const headers = {
"Authorization": "Bearer bedvP61ZkhEDf68Va5c3ga4",
"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 bf3e4gV6EaZaDPc8k1dv5h6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"created_at\",
\"sort_desc\": true,
\"page\": 76,
\"per_page\": 7,
\"q\": \"est\",
\"employee_id\": \"recusandae\",
\"has_term\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-terms"
);
const headers = {
"Authorization": "Bearer bf3e4gV6EaZaDPc8k1dv5h6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "created_at",
"sort_desc": true,
"page": 76,
"per_page": 7,
"q": "est",
"employee_id": "recusandae",
"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[]=sapiente&admission_date_from=2026-01-01&admission_date_to=2026-12-31" \
--header "Authorization: Bearer gfPDce361kd56bEvhZaaV84" \
--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]": "sapiente",
"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 gfPDce361kd56bEvhZaaV84",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "b2f82bfa-ca36-434e-afdb-036bf55bd403",
"name": "Dr. Maraisa Amaral",
"cpf": "556.853.519-63",
"rg": "919592902",
"ctps": null,
"phone": null,
"birthdate": null,
"email": null,
"pis_pasep": null,
"admission_date": "2009-12-29",
"daily_salary": null,
"monthly_salary": "4801.41",
"nationality": null,
"place_of_birth": "Paz 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": "a345c146-472c-496b-8030-d6f84a8b26e5",
"name": "ad"
},
"created_at": null,
"updated_at": null
},
{
"id": "c02fa0ef-1853-40fe-b300-fc1c35590537",
"name": "Luis Burgos Sobrinho",
"cpf": "743.634.378-86",
"rg": null,
"ctps": null,
"phone": null,
"birthdate": "1991-04-15",
"email": "denise54@example.org",
"pis_pasep": "78625339831",
"admission_date": "2003-07-02",
"daily_salary": null,
"monthly_salary": null,
"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": "a345c146-49e7-4809-a96c-d4f981cb5135",
"name": "est"
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": "/?page=75",
"next": null
},
"meta": {
"current_page": 76,
"from": 751,
"last_page": 1,
"links": [
{
"url": "/?page=75",
"label": "« Anterior",
"page": 75,
"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": 752,
"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[]=ab&admission_date_from=2026-01-01&admission_date_to=2026-12-31" \
--header "Authorization: Bearer 1vEVbkgPhfa4Dea5d6Z863c" \
--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]": "ab",
"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 1vEVbkgPhfa4Dea5d6Z863c",
"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/6" \
--header "Authorization: Bearer dZ6385caDgkb1hE46PvfeVa" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/6"
);
const headers = {
"Authorization": "Bearer dZ6385caDgkb1hE46PvfeVa",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "1ef45c3e-d7c7-4386-af01-69d87031a4c6",
"name": "César Verdugo Bittencourt Sobrinho",
"cpf": "267.053.197-71",
"rg": null,
"ctps": null,
"phone": "(17) 4457-3373",
"birthdate": null,
"email": null,
"pis_pasep": "49151520491",
"admission_date": "1983-01-19",
"daily_salary": "134.47",
"monthly_salary": null,
"nationality": null,
"place_of_birth": "de Souza 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": "a345c146-5390-47ce-8c20-a832c60ef3c8",
"name": "quia"
},
"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 fcdk6ZP51eg8a4V3h6bvEDa" \
--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\": \"2061b029-acb6-4700-a3a6-960b128c8fac\",
\"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 fcdk6ZP51eg8a4V3h6bvEDa",
"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": "2061b029-acb6-4700-a3a6-960b128c8fac",
"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": "82d7a881-1811-46c7-a1f3-2d08f6940c69",
"name": "Dr. Roberto Azevedo",
"cpf": "103.068.959-18",
"rg": "750581253",
"ctps": "094856975",
"phone": null,
"birthdate": "2009-09-19",
"email": "xalcantara@example.org",
"pis_pasep": null,
"admission_date": "1992-04-14",
"daily_salary": null,
"monthly_salary": "1673.53",
"nationality": null,
"place_of_birth": "Padrão 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": "a345c146-5ade-4811-a847-87e9dcc47fac",
"name": "in"
},
"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/9" \
--header "Authorization: Bearer 5v6a4eV31PDfZkE8cg6dahb" \
--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\": \"f2affd48-3799-4bf7-a60d-a86c4a38a442\",
\"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/9"
);
const headers = {
"Authorization": "Bearer 5v6a4eV31PDfZkE8cg6dahb",
"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": "f2affd48-3799-4bf7-a60d-a86c4a38a442",
"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 5a8e1h3g6afEZVDk6vc4Pdb" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"dismissal_date\": \"2026-11-20\",
\"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 5a8e1h3g6afEZVDk6vc4Pdb",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"dismissal_date": "2026-11-20",
"dismissal_reason": "resignation"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "3ef0e9bf-22d1-4620-b20f-3580405d8cef",
"name": "Dr. Roberta Mirela Queirós",
"cpf": "886.305.881-41",
"rg": null,
"ctps": "490184028",
"phone": null,
"birthdate": "2006-03-06",
"email": "gustavo72@example.com",
"pis_pasep": "80650719217",
"admission_date": "2021-09-12",
"daily_salary": null,
"monthly_salary": "1955.21",
"nationality": null,
"place_of_birth": "Serrano 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": "a345c146-6862-41d2-8fd1-9e18cff68aa9",
"name": "omnis"
},
"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 536akg86P1cbvZdf4EDeVha" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"admission_date\": \"2026-11-20\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32/rehire"
);
const headers = {
"Authorization": "Bearer 536akg86P1cbvZdf4EDeVha",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"admission_date": "2026-11-20"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "1cd4e2b5-f1b0-4c29-ab91-02d7099f4515",
"name": "Srta. Karina Flores Cervantes",
"cpf": "118.204.544-53",
"rg": null,
"ctps": "048627488",
"phone": "(35) 97744-7438",
"birthdate": null,
"email": null,
"pis_pasep": null,
"admission_date": "1991-10-17",
"daily_salary": "80.81",
"monthly_salary": null,
"nationality": "Finlândia",
"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": "a345c146-6e26-4655-b70a-0c3d2bb2d339",
"name": "in"
},
"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 VDce86a6f14bv3EPhakZgd5" \
--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 VDce86a6f14bv3EPhakZgd5",
"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/7/bank-account" \
--header "Authorization: Bearer 6a634PgVhDkZ5veEc8d1bfa" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/7/bank-account"
);
const headers = {
"Authorization": "Bearer 6a634PgVhDkZ5veEc8d1bfa",
"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/8/bank-account" \
--header "Authorization: Bearer v4f5c8PVE136gadebak6ZhD" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_id\": \"reprehenderit\",
\"agency\": \"cknot\",
\"account\": \"hudzi\",
\"account_type\": \"corrente\",
\"pix_key\": \"vmlwsuapytx\",
\"favorite\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/8/bank-account"
);
const headers = {
"Authorization": "Bearer v4f5c8PVE136gadebak6ZhD",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_id": "reprehenderit",
"agency": "cknot",
"account": "hudzi",
"account_type": "corrente",
"pix_key": "vmlwsuapytx",
"favorite": false
};
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/10/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33" \
--header "Authorization: Bearer Pvf6d3gD4E1Z5haVk8aebc6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_id\": \"et\",
\"agency\": \"kwen\",
\"account\": \"oaeshvmamflgpwwsjczllpf\",
\"account_type\": \"poupança\",
\"pix_key\": \"wmvxyxjtvqmvbfmqxsqtj\",
\"favorite\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/10/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33"
);
const headers = {
"Authorization": "Bearer Pvf6d3gD4E1Z5haVk8aebc6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_id": "et",
"agency": "kwen",
"account": "oaeshvmamflgpwwsjczllpf",
"account_type": "poupança",
"pix_key": "wmvxyxjtvqmvbfmqxsqtj",
"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 3P5aD4V6kEce8f6gda1Zhbv" \
--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 3P5aD4V6kEce8f6gda1Zhbv",
"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/1/epi-deliveries" \
--header "Authorization: Bearer DVvca615kZEa46Pefdbhg38" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"molestiae\",
\"status\": \"expired\",
\"epi_type_id\": \"quas\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/1/epi-deliveries"
);
const headers = {
"Authorization": "Bearer DVvca615kZEa46Pefdbhg38",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "molestiae",
"status": "expired",
"epi_type_id": "quas"
};
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/occaecati/epi-deliveries/pending-renewals-count" \
--header "Authorization: Bearer 3PDfkZvV5ab6a68Eh4cd1eg" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/occaecati/epi-deliveries/pending-renewals-count"
);
const headers = {
"Authorization": "Bearer 3PDfkZvV5ab6a68Eh4cd1eg",
"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/5/epi-deliveries/aut" \
--header "Authorization: Bearer keacg8aD6fPZ6d34bEvV1h5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/5/epi-deliveries/aut"
);
const headers = {
"Authorization": "Bearer keacg8aD6fPZ6d34bEvV1h5",
"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/16/epi-deliveries" \
--header "Authorization: Bearer 66345fPcDaagk8Ehdbve1VZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"epi_type_id\": \"6d150a3a-56eb-349b-8deb-3fd443750f49\",
\"delivery_date\": \"2024-01-01\",
\"quantity\": 1,
\"condition\": \"Example Condition\",
\"delivered_by_employee_id\": \"515f1f59-4131-4e54-b976-90a5560dbbcd\",
\"stock_id\": \"66d5c429-bdce-3c7d-b39e-ffb50b3a8e2f\",
\"confirm_insufficient_stock\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/16/epi-deliveries"
);
const headers = {
"Authorization": "Bearer 66345fPcDaagk8Ehdbve1VZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"epi_type_id": "6d150a3a-56eb-349b-8deb-3fd443750f49",
"delivery_date": "2024-01-01",
"quantity": 1,
"condition": "Example Condition",
"delivered_by_employee_id": "515f1f59-4131-4e54-b976-90a5560dbbcd",
"stock_id": "66d5c429-bdce-3c7d-b39e-ffb50b3a8e2f",
"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/laborum/epi-deliveries/kit" \
--header "Authorization: Bearer DdZeVPghavcE4b65fa8k316" \
--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\": \"64d31b0b-bdc5-49a4-829a-2b2b02738720\",
\"stock_id\": \"40cd6077-f240-3190-a768-40e1d9f687cf\",
\"confirm_insufficient_stock\": true,
\"items\": [
{
\"epi_type_id\": \"1752b7ec-23bc-393c-8a19-32cb04fde3e8\",
\"quantity\": 1,
\"condition\": \"Example Items * condition\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/laborum/epi-deliveries/kit"
);
const headers = {
"Authorization": "Bearer DdZeVPghavcE4b65fa8k316",
"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": "64d31b0b-bdc5-49a4-829a-2b2b02738720",
"stock_id": "40cd6077-f240-3190-a768-40e1d9f687cf",
"confirm_insufficient_stock": true,
"items": [
{
"epi_type_id": "1752b7ec-23bc-393c-8a19-32cb04fde3e8",
"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/aut/epi-deliveries/harum/promote-to-kit" \
--header "Authorization: Bearer hkgd8baVeE635aPZ64D1vfc" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/aut/epi-deliveries/harum/promote-to-kit"
);
const headers = {
"Authorization": "Bearer hkgd8baVeE635aPZ64D1vfc",
"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/11/epi-deliveries/molestiae" \
--header "Authorization: Bearer 4PgkDa6bV8d53eha61vfZEc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"epi_type_id\": \"cc3d4e94-abe0-3384-ab1d-fe5c03701e63\",
\"delivery_date\": \"2024-01-01\",
\"quantity\": 1,
\"condition\": \"Example Condition\",
\"delivered_by_employee_id\": \"f188d7a6-8d82-45cd-abc1-e3e0aa656369\",
\"stock_id\": \"8c4f84bd-bfd5-315c-92da-7d6a056d44ef\",
\"confirm_insufficient_stock\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/11/epi-deliveries/molestiae"
);
const headers = {
"Authorization": "Bearer 4PgkDa6bV8d53eha61vfZEc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"epi_type_id": "cc3d4e94-abe0-3384-ab1d-fe5c03701e63",
"delivery_date": "2024-01-01",
"quantity": 1,
"condition": "Example Condition",
"delivered_by_employee_id": "f188d7a6-8d82-45cd-abc1-e3e0aa656369",
"stock_id": "8c4f84bd-bfd5-315c-92da-7d6a056d44ef",
"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/doloremque/epi-deliveries/saepe" \
--header "Authorization: Bearer bZVEDv46P3ea85gfdc16hak" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/doloremque/epi-deliveries/saepe"
);
const headers = {
"Authorization": "Bearer bZVEDv46P3ea85gfdc16hak",
"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/20/epi-terms" \
--header "Authorization: Bearer 3Pdag4ah6eE18vc5bZVfk6D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"created_at\",
\"sort_desc\": false,
\"page\": 70,
\"per_page\": 25,
\"q\": \"ea\",
\"employee_id\": \"ut\",
\"has_term\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/20/epi-terms"
);
const headers = {
"Authorization": "Bearer 3Pdag4ah6eE18vc5bZVfk6D",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "created_at",
"sort_desc": false,
"page": 70,
"per_page": 25,
"q": "ea",
"employee_id": "ut",
"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/cupiditate/epi-terms/ec6af059-0667-3f9b-99c5-48601af7768d/upload" \
--header "Authorization: Bearer vZ51begEfa36cVDk86d4haP" \
--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/cupiditate/epi-terms/ec6af059-0667-3f9b-99c5-48601af7768d/upload"
);
const headers = {
"Authorization": "Bearer vZ51begEfa36cVDk86d4haP",
"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/sequi/epi-terms/e867bcfe-6cb5-302e-be65-436e2ab172aa/document" \
--header "Authorization: Bearer 5bdvc6Da1fhega43V8Pk6ZE" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/sequi/epi-terms/e867bcfe-6cb5-302e-be65-436e2ab172aa/document"
);
const headers = {
"Authorization": "Bearer 5bdvc6Da1fhega43V8Pk6ZE",
"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/bc314d30-892c-369e-9475-b64ee29078d0" \
--header "Authorization: Bearer 4dk5aefh3gPD6ZEc81avVb6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/bc314d30-892c-369e-9475-b64ee29078d0"
);
const headers = {
"Authorization": "Bearer 4dk5aefh3gPD6ZEc81avVb6",
"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/d3651871-3ce1-3e42-90a7-34a1ce953200/info" \
--header "Authorization: Bearer h6ZVP68cfae3kg5Dda41vEb" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/d3651871-3ce1-3e42-90a7-34a1ce953200/info"
);
const headers = {
"Authorization": "Bearer h6ZVP68cfae3kg5Dda41vEb",
"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/e4ec815f-a98f-35b1-9aaf-d82d49e4dc2c/download" \
--header "Authorization: Bearer efb66DP3E8kc1a4vg5aZVhd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/e4ec815f-a98f-35b1-9aaf-d82d49e4dc2c/download"
);
const headers = {
"Authorization": "Bearer efb66DP3E8kc1a4vg5aZVhd",
"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 3kPDea8f64ZVhabvdg51c6E" \
--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 3kPDea8f64ZVhabvdg51c6E",
"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 58VvPEDgZf4ak36dehabc61" \
--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 58VvPEDgZf4ak36dehabc61",
"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 D1a4ePchkvbfZE865aVg36d" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"sunt\",
\"document_type\": \"nfe\",
\"supplier_id\": \"natus\",
\"work_id\": \"nam\",
\"products_status\": \"imported\",
\"financial_status\": \"pending\",
\"start_date\": \"2026-11-20T15:38:27\",
\"end_date\": \"2077-01-06\",
\"per_page\": 17,
\"cost_centers\": [
\"ratione\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);
const headers = {
"Authorization": "Bearer D1a4ePchkvbfZE865aVg36d",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "sunt",
"document_type": "nfe",
"supplier_id": "natus",
"work_id": "nam",
"products_status": "imported",
"financial_status": "pending",
"start_date": "2026-11-20T15:38:27",
"end_date": "2077-01-06",
"per_page": 17,
"cost_centers": [
"ratione"
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "26bb508c-ad54-389c-a545-c812d5d24173",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "24880225462034718411593932915697232236853202",
"nfe_number": "527603",
"nfe_series": "11",
"issue_date": "2016-05-26T03:00:00.000000Z",
"total_value": "9366.91",
"emit": {
"cnpj": "12146645644496",
"name": "Osinski, Schroeder and Bednar"
},
"dest": {
"document": "39900673150687",
"name": "Klocko-Wyman"
},
"supplier": {
"id": "a345c147-b730-43bb-9073-38398fd694dd",
"name": "Dr. Sueli da Cruz",
"document": "97.900.820/0001-71"
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
},
{
"id": "85ae3716-0bd8-3bfa-b023-1fdeb4f82f93",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "75720027593144783317860953391499106600628382",
"nfe_number": "664604",
"nfe_series": "96",
"issue_date": "1977-09-17T03:00:00.000000Z",
"total_value": "5205.30",
"emit": {
"cnpj": "38220730859279",
"name": "Quitzon, O'Kon and Hamill"
},
"dest": {
"document": "07528014297587",
"name": "Daniel-Rath"
},
"supplier": {
"id": "a345c147-bca4-40a0-a73b-05e875b1a44d",
"name": "Mila Jimenes",
"document": "31.736.312/0001-91"
},
"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 4Z813fke6EVaDbhvgdc6a5P" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"s3_file_path\": \"voluptate\",
\"original_filename\": \".xml$\\/i\",
\"work_ids\": [
\"est\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);
const headers = {
"Authorization": "Bearer 4Z813fke6EVaDbhvgdc6a5P",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"s3_file_path": "voluptate",
"original_filename": ".xml$\/i",
"work_ids": [
"est"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "dd2069cc-a8c7-3ce0-ab0f-b03bbbd683b3",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "83486042086502477902741012312884691693227659",
"nfe_number": "696029",
"nfe_series": "62",
"issue_date": "1989-07-06T03:00:00.000000Z",
"total_value": "6024.81",
"emit": {
"cnpj": "15639682667599",
"name": "Williamson-Purdy"
},
"dest": {
"document": "54846595288101",
"name": "Weimann, Toy and Schuppe"
},
"supplier": {
"id": "a345c147-c6b6-4fee-9517-b7fdc13d79b1",
"name": "Srta. Alexa Betina Teles Filho",
"document": "13.439.946/0001-09"
},
"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/omnis" \
--header "Authorization: Bearer 6cdZaakvD5bE681feV3hgP4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/omnis"
);
const headers = {
"Authorization": "Bearer 6cdZaakvD5bE681feV3hgP4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d9ceb1bd-206b-3bf6-b341-6c1b189ebb32",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "79758161579652527070699117735514922566879094",
"nfe_number": "260239",
"nfe_series": "37",
"issue_date": "1982-06-13T03:00:00.000000Z",
"total_value": "9431.59",
"emit": {
"cnpj": "88164782498706",
"name": "Mills-Bruen"
},
"dest": {
"document": "83309505921193",
"name": "Sporer-Treutel"
},
"supplier": {
"id": "a345c147-ce57-417f-9033-9382bab2f797",
"name": "Thalita Raysa Balestero",
"document": "07.015.772/0001-46"
},
"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/eum/cost-centers" \
--header "Authorization: Bearer baa38Dfe4h665PkdgV1vZEc" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/eum/cost-centers"
);
const headers = {
"Authorization": "Bearer baa38Dfe4h665PkdgV1vZEc",
"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/sequi" \
--header "Authorization: Bearer k83ceDZ6fh5vabad46g1PEV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/sequi"
);
const headers = {
"Authorization": "Bearer k83ceDZ6fh5vabad46g1PEV",
"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/ipsa/files" \
--header "Authorization: Bearer Vhkf8P163aDe4c6bgdaZv5E" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"file\": {
\"path\": \"possimus\",
\"name\": \"aut\",
\"extension\": \"quas\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/ipsa/files"
);
const headers = {
"Authorization": "Bearer Vhkf8P163aDe4c6bgdaZv5E",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"file": {
"path": "possimus",
"name": "aut",
"extension": "quas"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a02b6dcf-1704-3f64-a71c-d4d1b0d46131",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "89592557158932088343633772222828936055382016",
"nfe_number": "316967",
"nfe_series": "67",
"issue_date": "1989-11-29T02:00:00.000000Z",
"total_value": "7964.50",
"emit": {
"cnpj": "62380442983955",
"name": "Purdy, Rosenbaum and Langworth"
},
"dest": {
"document": "22894945568568",
"name": "Klein, Price and Bailey"
},
"supplier": {
"id": "a345c147-dad8-40b8-a1c8-bb6d202dfe9c",
"name": "Isaac Torres Filho",
"document": "51.333.202/0001-96"
},
"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/consequatur/files/et" \
--header "Authorization: Bearer 4b16a3DZ6egdc5fEaPkh8Vv" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/consequatur/files/et"
);
const headers = {
"Authorization": "Bearer 4b16a3DZ6egdc5fEaPkh8Vv",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "3cba8c84-1e2a-31bf-a2af-a37b73efc042",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "85389724108319154875324634443427722866096517",
"nfe_number": "389233",
"nfe_series": "76",
"issue_date": "2003-11-02T02:00:00.000000Z",
"total_value": "9574.44",
"emit": {
"cnpj": "24504618919605",
"name": "Schumm, Daugherty and Mills"
},
"dest": {
"document": "47292115246014",
"name": "Kautzer Inc"
},
"supplier": {
"id": "a345c147-e357-478e-8095-a915e5cde410",
"name": "Sra. Thaís Ellen Valentin",
"document": "49.729.882/0001-10"
},
"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/nam/works" \
--header "Authorization: Bearer 54veaVZagdfk3Eh66P1c8bD" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"work_ids\": [
\"ipsam\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/nam/works"
);
const headers = {
"Authorization": "Bearer 54veaVZagdfk3Eh66P1c8bD",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"work_ids": [
"ipsam"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "6dd01628-aaf3-313a-a481-9cf244c441eb",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "38675701448271050485407953729583724756435987",
"nfe_number": "184389",
"nfe_series": "57",
"issue_date": "1984-03-16T03:00:00.000000Z",
"total_value": "431.09",
"emit": {
"cnpj": "01037487384861",
"name": "Rau-Corwin"
},
"dest": {
"document": "08788927736116",
"name": "Weimann Inc"
},
"supplier": {
"id": "a345c147-ea00-47c5-a5b6-ce1e436bb4ed",
"name": "Téo Anderson Campos Filho",
"document": "36.844.067/0001-50"
},
"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/nisi/installments" \
--header "Authorization: Bearer kehPDE4c6gaZvb8f1a6V5d3" \
--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/nisi/installments"
);
const headers = {
"Authorization": "Bearer kehPDE4c6gaZvb8f1a6V5d3",
"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": "cd42697a-b952-3b5b-a3ae-1a4de1bc3176",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "90462202027089335103874336789980515996676194",
"nfe_number": "298496",
"nfe_series": "82",
"issue_date": "2011-01-09T02:00:00.000000Z",
"total_value": "6466.38",
"emit": {
"cnpj": "71050699202372",
"name": "Macejkovic LLC"
},
"dest": {
"document": "31542737035514",
"name": "Lubowitz-Roob"
},
"supplier": {
"id": "a345c147-f208-4728-bfbc-c90d040eaa8e",
"name": "Máximo da Rosa Sobrinho",
"document": "23.806.592/0001-39"
},
"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 Vf6EcP3h61ed8kgab5aD4Zv" \
--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\": \"c886503b-2223-37ff-818b-bdf1e5ea8be5\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/nfe/products"
);
const headers = {
"Authorization": "Bearer Vf6EcP3h61ed8kgab5aD4Zv",
"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": "c886503b-2223-37ff-818b-bdf1e5ea8be5"
};
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 81ka63geZP4Da5EvfcVdbh6" \
--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 81ka63geZP4Da5EvfcVdbh6",
"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/ab" \
--header "Authorization: Bearer Dk6EP1d36ha48gecbf5ZaVv" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/ab"
);
const headers = {
"Authorization": "Bearer Dk6EP1d36ha48gecbf5ZaVv",
"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/occaecati" \
--header "Authorization: Bearer ba4EeV5P6cgka63vdD18Zhf" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/occaecati"
);
const headers = {
"Authorization": "Bearer ba4EeV5P6cgka63vdD18Zhf",
"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/minus/products?sort_by=created_at&sort_desc=1&page=1&per_page=15&status=pending&q=Produto+ABC" \
--header "Authorization: Bearer 4c1k685EDg6haZbvPfVeda3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/minus/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 4c1k685EDg6haZbvPfVeda3",
"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/voluptas/distributions" \
--header "Authorization: Bearer 38c4kD1E5fa6VPgh6aZvdbe" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/voluptas/distributions"
);
const headers = {
"Authorization": "Bearer 38c4kD1E5fa6VPgh6aZvdbe",
"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/tempora/products/link" \
--header "Authorization: Bearer fcVaDvbk4Z3g86d6E1Phae5" \
--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/tempora/products/link"
);
const headers = {
"Authorization": "Bearer fcVaDvbk4Z3g86d6E1Phae5",
"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 fP6Zaae4V6E81dDgkh35vcb" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"eius\",
\"sort_desc\": false,
\"page\": 74,
\"per_page\": 9
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/locations/states"
);
const headers = {
"Authorization": "Bearer fP6Zaae4V6E81dDgkh35vcb",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "eius",
"sort_desc": false,
"page": 74,
"per_page": 9
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "repellat suscipit",
"abbreviation": "RA"
},
{
"id": null,
"name": "voluptatem asperiores",
"abbreviation": "FB"
}
],
"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 f6Pac5ab3vE48ehk1VDdgZ6" \
--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 f6Pac5ab3vE48ehk1VDdgZ6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "Ashaberg"
},
{
"id": null,
"name": "Quitzonton"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 fVka6v6Z3gEbdPa41ce8hD5" \
--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 fVka6v6Z3gEbdPa41ce8hD5",
"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 VPakEgd61a63hb5ZfD48cve" \
--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 VPakEgd61a63hb5ZfD48cve",
"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 k6ZD3PbaedEcvgh4aV851f6" \
--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 k6ZD3PbaedEcvgh4aV851f6",
"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 3vDaZ1b8cdE6Vk4aPgfeh65" \
--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 3vDaZ1b8cdE6Vk4aPgfeh65",
"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 4h3EgZ5cakdbPfa6186vVDe" \
--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 4h3EgZ5cakdbPfa6186vVDe",
"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=non&document=et&work_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&cost_center_id=5d392221-f449-3b93-b6ae-fd6efd33412c&bank_account_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3" \
--header "Authorization: Bearer 563fbaVEvk1dPZDchg68e4a" \
--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": "non",
"document": "et",
"work_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
"cost_center_id": "5d392221-f449-3b93-b6ae-fd6efd33412c",
"bank_account_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 563fbaVEvk1dPZDchg68e4a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "65872569-3986-3ba6-bd38-02efbada4181",
"receipt_number": "REC-8091",
"receiver_type": "custom",
"receiver": {
"id": null,
"type": null,
"label": null,
"name": "Annabell Treutel",
"document": "889.707.677-59"
},
"payment": {
"amount": 4169.85,
"amount_in_words": "Valor por extenso de teste",
"method": "check",
"description": "Molestiae corrupti velit aspernatur sequi tempore inventore."
},
"issuer": {
"name": "Grimes Ltd",
"document": "67.319.868/4754-81"
},
"issue": {
"date": "2026-10-26",
"city": "Port Quincymouth",
"state": "BA"
},
"created_by": {
"id": "a345c148-23cb-41f0-8885-cb3fda79e409",
"name": "Elmore Streich"
},
"created_at": null,
"updated_at": null
},
{
"id": "6981645c-a00e-39ea-b6c0-c768ad02e781",
"receipt_number": "REC-5699",
"receiver_type": "custom",
"receiver": {
"id": null,
"type": null,
"label": null,
"name": "Kaycee Kihn",
"document": "243.957.219-78"
},
"payment": {
"amount": 8767.86,
"amount_in_words": "Valor por extenso de teste",
"method": "bank_transfer",
"description": "Voluptatem maxime alias ullam cupiditate ad odio."
},
"issuer": {
"name": "Kiehn, Bauch and Denesik",
"document": "46.401.363/2065-92"
},
"issue": {
"date": "2026-10-27",
"city": "East Malcolmtown",
"state": "BA"
},
"created_by": {
"id": "a345c148-26e8-4ef1-8958-682e85d1a5d6",
"name": "Sheldon Kilback"
},
"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=eum&document=quia&work_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&cost_center_id=0116e870-8c1b-3aa5-a705-aacf03c0ca23&bank_account_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3" \
--header "Authorization: Bearer P3fg66Va4kdEaevZcb8hD15" \
--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": "eum",
"document": "quia",
"work_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
"cost_center_id": "0116e870-8c1b-3aa5-a705-aacf03c0ca23",
"bank_account_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer P3fg66Va4kdEaevZcb8hD15",
"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 PcbZ6dk6v3fea1gDhaVE458" \
--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 PcbZ6dk6v3fea1gDhaVE458",
"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 kDhc85bafea314vZP6dEg6V" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"methods\": [
{
\"method\": \"bank_transfer\",
\"eligible\": false
}
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/cash-flow-config"
);
const headers = {
"Authorization": "Bearer kDhc85bafea314vZP6dEg6V",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"methods": [
{
"method": "bank_transfer",
"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 bdD58gka6ZV4P3c6vfEe1ah" \
--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 bdD58gka6ZV4P3c6vfEe1ah",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "c4183b72-5338-32fa-94b4-6edf5437c2be",
"receipt_number": "REC-0686",
"receiver_type": "custom",
"receiver": {
"id": null,
"type": null,
"label": null,
"name": "Raul Abshire",
"document": "098.328.057-31"
},
"payment": {
"amount": 6876.92,
"amount_in_words": "Valor por extenso de teste",
"method": "cash",
"description": "Aliquam sequi officiis maiores asperiores."
},
"issuer": {
"name": "Doyle-Ortiz",
"document": "62.620.780/2793-00"
},
"issue": {
"date": "2026-11-02",
"city": "Lake Ernachester",
"state": "BA"
},
"created_by": {
"id": "a345c148-3971-45b7-b8a5-a7e6966b3b61",
"name": "Abbey Wolf"
},
"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 kec5a8hgEZbPaf4D6v6Vd13" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"receiver_type\": \"Example Receiver type\",
\"receiver_id\": \"Example Receiver id\",
\"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\": \"64f82639-0294-3e9c-b646-16d7ee426754\",
\"cost_center_id\": \"f3daa3b6-5810-3756-a46f-e5e3972a810f\",
\"bank_account_id\": \"ddf1cb28-bdf2-3a02-b6df-7dfbba658133\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts"
);
const headers = {
"Authorization": "Bearer kec5a8hgEZbPaf4D6v6Vd13",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"receiver_type": "Example Receiver type",
"receiver_id": "Example Receiver id",
"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": "64f82639-0294-3e9c-b646-16d7ee426754",
"cost_center_id": "f3daa3b6-5810-3756-a46f-e5e3972a810f",
"bank_account_id": "ddf1cb28-bdf2-3a02-b6df-7dfbba658133"
};
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 Z1Pkf68bE36cevhdDVaga54" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"receiver_type\": \"Example Receiver type\",
\"receiver_id\": \"Example Receiver id\",
\"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\": \"599d2427-8380-3947-b3bf-e5583e92bf45\",
\"cost_center_id\": \"58b75c50-36c9-3c31-9090-b2b460219231\",
\"bank_account_id\": \"429e1ceb-5d44-33ec-80c6-4261fe7e3f97\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer Z1Pkf68bE36cevhdDVaga54",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"receiver_type": "Example Receiver type",
"receiver_id": "Example Receiver id",
"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": "599d2427-8380-3947-b3bf-e5583e92bf45",
"cost_center_id": "58b75c50-36c9-3c31-9090-b2b460219231",
"bank_account_id": "429e1ceb-5d44-33ec-80c6-4261fe7e3f97"
};
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 f3E18gD4ec6Zb65VPvadhka" \
--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 f3E18gD4ec6Zb65VPvadhka",
"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/16/receipts" \
--header "Authorization: Bearer a6dZkD8V4h5af3v1bEcg6eP" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/16/receipts"
);
const headers = {
"Authorization": "Bearer a6dZkD8V4h5af3v1bEcg6eP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "f478e8bf-5578-3bba-a942-fe23ef855ebf",
"receipt_number": "REC-2897",
"receiver_type": "custom",
"receiver": {
"id": null,
"type": null,
"label": null,
"name": "Prof. Adolfo Leannon MD",
"document": "202.128.826-52"
},
"payment": {
"amount": 7126.96,
"amount_in_words": "Valor por extenso de teste",
"method": "pix",
"description": "Minus voluptates debitis ea aut ullam et est asperiores."
},
"issuer": {
"name": "Quigley Group",
"document": "65.545.780/6531-26"
},
"issue": {
"date": "2026-10-30",
"city": "Jaquelinberg",
"state": "GO"
},
"created_by": {
"id": "a345c148-5136-40c6-88e0-4cf3bdd4f348",
"name": "Stephon Stoltenberg DDS"
},
"created_at": null,
"updated_at": null
},
{
"id": "d7f84a8e-dc72-330c-af02-bcbbf09700f9",
"receipt_number": "REC-6816",
"receiver_type": "custom",
"receiver": {
"id": null,
"type": null,
"label": null,
"name": "Mia Bode DDS",
"document": "116.296.411-88"
},
"payment": {
"amount": 862.05,
"amount_in_words": "Valor por extenso de teste",
"method": "pix",
"description": "Rerum porro vitae repellat corporis."
},
"issuer": {
"name": "Frami, Altenwerth and Hilpert",
"document": "32.354.578/2049-33"
},
"issue": {
"date": "2026-11-16",
"city": "Emmerichberg",
"state": "PR"
},
"created_by": {
"id": "a345c148-5316-4d8a-b334-b79e0e61e134",
"name": "Claudie Anderson"
},
"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.
Payroll Addition Types
Cadastro dos tipos de acréscimo da folha de sexta
List addition types
requires authentication payroll build
Lista ordenada por nome, sem paginação: o cadastro é pequeno e a mesma chamada serve à tela de lista e à lista de escolha do lançamento.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/payroll-addition-types?q=voluptatem&active=1" \
--header "Authorization: Bearer 1EkP5gDZc6f8e3abdV64vha" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"ex\",
\"active\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-addition-types"
);
const params = {
"q": "voluptatem",
"active": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 1EkP5gDZc6f8e3abdV64vha",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "ex",
"active": false
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "a345c148-5f6e-4f6d-a125-6abdb28a2633",
"name": "et earum",
"default_amount": "17.73",
"includes_in_work_cost": true,
"is_active": true,
"in_use": false
},
{
"id": "a345c148-6040-4088-ae68-e8bc35cfd28e",
"name": "temporibus expedita",
"default_amount": "41.14",
"includes_in_work_cost": true,
"is_active": true,
"in_use": 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.
Create addition type
requires authentication payroll build
O nome é único. O valor padrão fica vazio quando o valor varia a cada lançamento.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/payroll-addition-types" \
--header "Authorization: Bearer kfE8d1a365DZbgaV4hvePc6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"mavs\",
\"default_amount\": 51,
\"includes_in_work_cost\": true,
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-addition-types"
);
const headers = {
"Authorization": "Bearer kfE8d1a365DZbgaV4hvePc6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "mavs",
"default_amount": 51,
"includes_in_work_cost": true,
"is_active": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "a345c148-6493-41eb-a29d-f09519218821",
"name": "omnis ut",
"default_amount": "12.35",
"includes_in_work_cost": true,
"is_active": true,
"in_use": 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.
Show addition type
requires authentication payroll build
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/payroll-addition-types/animi" \
--header "Authorization: Bearer eadc5Pkh68avgf34V1D6bZE" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-addition-types/animi"
);
const headers = {
"Authorization": "Bearer eadc5Pkh68avgf34V1D6bZE",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a345c148-67c2-48cf-877a-2be4c19128e8",
"name": "impedit ut",
"default_amount": "34.01",
"includes_in_work_cost": true,
"is_active": true,
"in_use": 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.
Update addition type
requires authentication payroll build
Alterar o cadastro não muda acréscimo já lançado: ele guarda a cópia do nome, do valor e da marcação de custo do momento do lançamento.
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/payroll-addition-types/accusamus" \
--header "Authorization: Bearer fhd36eZ8DaE1vcVak5b6g4P" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"zubqco\",
\"default_amount\": 46,
\"includes_in_work_cost\": true,
\"is_active\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-addition-types/accusamus"
);
const headers = {
"Authorization": "Bearer fhd36eZ8DaE1vcVak5b6g4P",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "zubqco",
"default_amount": 46,
"includes_in_work_cost": true,
"is_active": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Tipo de acréscimo atualizado 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.
Delete addition type
requires authentication payroll build
Só para tipo sem uso. Tipo já lançado em alguma folha é recusado com orientação para inativar.
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/payroll-addition-types/accusamus" \
--header "Authorization: Bearer VebED663a5PakhZdfc48g1v" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-addition-types/accusamus"
);
const headers = {
"Authorization": "Bearer VebED663a5PakhZdfc48g1v",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Tipo de acréscimo excluído com sucesso."
}
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"name": [
"Este tipo de acréscimo já foi lançado em alguma folha e não pode ser excluído. Inative-o para parar de usá-lo."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Payroll Payments
Baixa da folha: caixa, recibo e dinheiro entregue na obra
Payments of the day
requires authentication payroll pay
Os pagamentos agendados para uma data, agrupados por favorecido, com a chave PIX ao
lado e o total por pessoa. Sem date, traz o dia de hoje.
Os itens já pagos vêm na lista, marcados: quem paga precisa ver o que já saiu para não pagar duas vezes. Folha em rascunho não aparece — pagamento só depois de conferida.
A chave PIX é a gravada no item; não havendo, cai na favorita do cadastro do funcionário ou do fornecedor.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/payroll-payments/day?date=2026-11-20" \
--header "Authorization: Bearer ZaEe63hkvaPg1fcb6dD45V8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date\": \"2026-11-20\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-payments/day"
);
const params = {
"date": "2026-11-20",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ZaEe63hkvaPg1fcb6dD45V8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date": "2026-11-20"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"date": "2026-11-20",
"totals": {
"grand_total": "530.00",
"pending_total": "350.00",
"items_count": 3,
"pending_count": 2,
"payees_count": 2
},
"payees": [
{
"payee": {
"type": "employee",
"label": "Funcionário",
"id": "uuid",
"name": "José da Silva",
"document": "390.533.447-05"
},
"pix_key": "jose.silva@email.com",
"total": "180.00",
"pending_total": "180.00",
"items_count": 1,
"pending_count": 1,
"items": []
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Settle several payroll items
requires authentication payroll pay
Baixa vários itens de uma vez. Cada item é liquidado na sua própria transação: um item sem saldo na conta não desfaz os que já foram pagos, e a resposta diz quais passaram e quais não.
Com receipt_mode: per_person sai um recibo por favorecido cobrindo todos os itens
dele; com per_payment, um recibo por item.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/payroll-payments/batch" \
--header "Authorization: Bearer f3ePa6hkgVZc4a6E8d1Db5v" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_account_id\": \"80519167-6f8c-3390-ba86-5b4c5eb04de7\",
\"delivered\": true,
\"delivered_by_name\": \"oknjieobc\",
\"generate_receipt\": true,
\"receipt_mode\": \"per_person\",
\"receipt_description\": \"voluptas\",
\"issuer_name\": \"bssgrktspegmnbjqfiqmxl\",
\"issuer_document\": \"kjmvlxflpymezajwhdtuwgc\",
\"city\": \"wuykgtkmf\",
\"state\": \"is\",
\"items\": [
\"c3870624-ddbe-33d8-be17-17fff58e2cd3\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-payments/batch"
);
const headers = {
"Authorization": "Bearer f3ePa6hkgVZc4a6E8d1Db5v",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_account_id": "80519167-6f8c-3390-ba86-5b4c5eb04de7",
"delivered": true,
"delivered_by_name": "oknjieobc",
"generate_receipt": true,
"receipt_mode": "per_person",
"receipt_description": "voluptas",
"issuer_name": "bssgrktspegmnbjqfiqmxl",
"issuer_document": "kjmvlxflpymezajwhdtuwgc",
"city": "wuykgtkmf",
"state": "is",
"items": [
"c3870624-ddbe-33d8-be17-17fff58e2cd3"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"settled": [
"uuid-1",
"uuid-2"
],
"failed": [
{
"item": "uuid-3",
"reason": "Saldo insuficiente."
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Settle a payroll item
requires authentication payroll pay
Marca o item como pago e lança no caixa, com a obra e o centro de custo do item, debitando a conta de saída escolhida.
Com delivered, o item fica como entregue em vez de pago — é o dinheiro entregue
na obra, que exige uma conta do tipo caixa e aceita o nome de quem entregou.
O recibo é opcional. Quando pedido, o caixa e o recibo nascem na mesma transação: se um falhar, nenhum dos dois fica gravado.
Sem sessão de caixa aberta, uma é aberta automaticamente — inclusive quando a do dia já foi fechada.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/payroll-payments/et" \
--header "Authorization: Bearer PdaVDg461afc53EeZkb6h8v" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_account_id\": \"d1c9155c-12c0-33d3-881b-8f9c1751d168\",
\"delivered\": true,
\"delivered_by_name\": \"cbsl\",
\"generate_receipt\": true,
\"receipt_mode\": \"per_person\",
\"receipt_description\": \"omnis\",
\"issuer_name\": \"bhyvsxkkaqvwbulohyuzhekmy\",
\"issuer_document\": \"ncgqamlnrbeu\",
\"city\": \"znwlazhirptabo\",
\"state\": \"pg\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-payments/et"
);
const headers = {
"Authorization": "Bearer PdaVDg461afc53EeZkb6h8v",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_account_id": "d1c9155c-12c0-33d3-881b-8f9c1751d168",
"delivered": true,
"delivered_by_name": "cbsl",
"generate_receipt": true,
"receipt_mode": "per_person",
"receipt_description": "omnis",
"issuer_name": "bhyvsxkkaqvwbulohyuzhekmy",
"issuer_document": "ncgqamlnrbeu",
"city": "znwlazhirptabo",
"state": "pg"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a345c148-c48f-4dd9-8d27-5f6f4e2fc27f",
"payee": {
"type": null,
"label": null,
"id": null,
"name": "Brody Donnelly III",
"document": "694.308.036-38"
},
"work": null,
"cost_center": null,
"amount": "320.65",
"additions": [],
"total": "320.65",
"work_cost_total": "320.65",
"payment_method": {
"value": "pix",
"label": "PIX"
},
"pix_key": null,
"notes": null,
"scheduled_date": "2026-11-20",
"status": {
"value": "pending",
"label": "Pendente"
},
"is_settled": false,
"paid_at": null,
"paid_by": null,
"delivered_by_name": 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.
Payroll Sheets
Folha de sexta: montar, conferir e reabrir
List payroll sheets
requires authentication payroll index
Folhas por semana, da mais recente para a mais antiga, com os totais por forma de pagamento. A mesma semana pode ter mais de uma folha.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/payroll-sheets" \
--header "Authorization: Bearer Dgdv8cakVaP3fb6e156EZ4h" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"sed\",
\"sort_desc\": false,
\"page\": 67,
\"per_page\": 4,
\"q\": \"itaque\",
\"status\": \"scheduled\",
\"period_from\": \"2026-11-20T15:38:28\",
\"period_to\": \"2032-11-14\",
\"payment_date_from\": \"2026-11-20T15:38:28\",
\"payment_date_to\": \"2033-03-26\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets"
);
const headers = {
"Authorization": "Bearer Dgdv8cakVaP3fb6e156EZ4h",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "sed",
"sort_desc": false,
"page": 67,
"per_page": 4,
"q": "itaque",
"status": "scheduled",
"period_from": "2026-11-20T15:38:28",
"period_to": "2032-11-14",
"payment_date_from": "2026-11-20T15:38:28",
"payment_date_to": "2033-03-26"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "a345c148-74e1-49a1-9c11-a04c4b415a11",
"code": null,
"name": "Obras",
"period_start": "2026-11-16",
"period_end": "2026-11-22",
"payment_date": "2026-11-20",
"status": {
"value": "draft",
"label": "Rascunho"
},
"items_count": 0,
"grand_total": "0.00",
"by_payment_method": []
},
{
"id": "a345c148-7739-4740-aa2d-66ce56b9c7c5",
"code": null,
"name": "Escritório",
"period_start": "2026-11-16",
"period_end": "2026-11-22",
"payment_date": "2026-11-20",
"status": {
"value": "draft",
"label": "Rascunho"
},
"items_count": 0,
"grand_total": "0.00",
"by_payment_method": []
}
],
"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 payroll sheet
requires authentication payroll build
Nasce em rascunho. O nome distingue folhas da mesma semana, como "Obras" e "Escritório".
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets" \
--header "Authorization: Bearer b3hgdaE614fe8ZkPVD5v6ca" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"paannxmelk\",
\"period_start\": \"2026-11-20T15:38:28\",
\"period_end\": \"2110-01-27\",
\"payment_date\": \"2026-11-20T15:38:28\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets"
);
const headers = {
"Authorization": "Bearer b3hgdaE614fe8ZkPVD5v6ca",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "paannxmelk",
"period_start": "2026-11-20T15:38:28",
"period_end": "2110-01-27",
"payment_date": "2026-11-20T15:38:28"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "a345c148-7e0d-46b2-b73f-dd061c3eefad",
"code": null,
"name": "Escritório",
"period_start": "2026-11-16",
"period_end": "2026-11-22",
"payment_date": "2026-11-20",
"status": {
"value": "draft",
"label": "Rascunho"
},
"accepts_item_changes": true,
"can_reopen": false,
"created_by": {
"id": "a345c148-7e79-4a44-9168-5f43d2fd14a1",
"name": "Deshaun Schiller"
},
"checked_by": null,
"checked_at": null,
"reopened_by": null,
"reopened_at": null,
"items": [],
"totals": {
"grand_total": "0.00",
"work_cost_total": "0.00",
"items_count": 0,
"by_work": [],
"by_payment_method": []
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 payroll sheet
requires authentication payroll show
Folha com os itens, os acréscimos e os totais por obra e por forma de pagamento, calculados no servidor.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/payroll-sheets/ut" \
--header "Authorization: Bearer ev6EPa1g6h83b4DZfcdkV5a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/ut"
);
const headers = {
"Authorization": "Bearer ev6EPa1g6h83b4DZfcdkV5a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a345c148-8429-4640-a893-30a32a1cda9f",
"code": null,
"name": "Escritório",
"period_start": "2026-11-16",
"period_end": "2026-11-22",
"payment_date": "2026-11-20",
"status": {
"value": "draft",
"label": "Rascunho"
},
"accepts_item_changes": true,
"can_reopen": false,
"created_by": {
"id": "a345c148-8493-459e-811d-a8512bdd2bf3",
"name": "Karli Gleichner II"
},
"checked_by": null,
"checked_at": null,
"reopened_by": null,
"reopened_at": null,
"items": [],
"totals": {
"grand_total": "0.00",
"work_cost_total": "0.00",
"items_count": 0,
"by_work": [],
"by_payment_method": []
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 payroll sheet
requires authentication payroll build
Semana, nome e data de pagamento só mudam em rascunho.
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/aperiam" \
--header "Authorization: Bearer EcVavdP341Zkbef5a68g6hD" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"sazbx\",
\"period_start\": \"2026-11-20T15:38:28\",
\"period_end\": \"2095-06-30\",
\"payment_date\": \"2026-11-20T15:38:28\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/aperiam"
);
const headers = {
"Authorization": "Bearer EcVavdP341Zkbef5a68g6hD",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "sazbx",
"period_start": "2026-11-20T15:38:28",
"period_end": "2095-06-30",
"payment_date": "2026-11-20T15:38:28"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Folha atualizada 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.
Delete payroll sheet
requires authentication payroll build
Só em rascunho. Apagar a folha apaga os itens e os acréscimos dela.
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/sit" \
--header "Authorization: Bearer 8P6d5h1vbkce6VEfDag4a3Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/sit"
);
const headers = {
"Authorization": "Bearer 8P6d5h1vbkce6VEfDag4a3Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Folha excluída 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.
Add item to payroll sheet
requires authentication payroll build
Lança um pagamento na folha. O favorecido vem do cadastro (payee_type mais payee_id)
ou digitado à mão (receiver_name, sem payee_type) — este último é o dinheiro
entregue na obra para quem não está em cadastro nenhum.
O nome e o documento do favorecido de cadastro são copiados no servidor, para a folha
não mudar quando o cadastro mudar. Sem amount, cai na diária do funcionário. Sem
scheduled_date, herda a data de pagamento da folha.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/veritatis/items" \
--header "Authorization: Bearer bevf65kd8VaaE6ghPc41ZD3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"payee_type\": \"employee\",
\"payee_id\": \"30aa46e6-9de2-3fcf-b26e-aca4b5d84c38\",
\"receiver_name\": \"pkkfcubpyumothelylmff\",
\"receiver_document\": \"hamsavunigqgqdvqcrych\",
\"work_id\": \"424c6ce4-1610-398a-a52f-d63dc1ac9eab\",
\"cost_center_id\": \"aut\",
\"amount\": 56,
\"payment_method\": \"bank_transfer\",
\"pix_key\": \"i\",
\"notes\": \"h\",
\"scheduled_date\": \"2026-11-20T15:38:28\",
\"additions\": [
{
\"type_id\": \"32cbcddd-e6e5-3063-824e-09c8bbdb5807\",
\"amount\": 59
}
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/veritatis/items"
);
const headers = {
"Authorization": "Bearer bevf65kd8VaaE6ghPc41ZD3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"payee_type": "employee",
"payee_id": "30aa46e6-9de2-3fcf-b26e-aca4b5d84c38",
"receiver_name": "pkkfcubpyumothelylmff",
"receiver_document": "hamsavunigqgqdvqcrych",
"work_id": "424c6ce4-1610-398a-a52f-d63dc1ac9eab",
"cost_center_id": "aut",
"amount": 56,
"payment_method": "bank_transfer",
"pix_key": "i",
"notes": "h",
"scheduled_date": "2026-11-20T15:38:28",
"additions": [
{
"type_id": "32cbcddd-e6e5-3063-824e-09c8bbdb5807",
"amount": 59
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "a345c148-9538-4db7-9fcd-7575bfb813f9",
"payee": {
"type": null,
"label": null,
"id": null,
"name": "Prof. Naomi Nikolaus",
"document": "425.896.730-72"
},
"work": null,
"cost_center": null,
"amount": "350.23",
"additions": [],
"total": "350.23",
"work_cost_total": "350.23",
"payment_method": {
"value": "pix",
"label": "PIX"
},
"pix_key": null,
"notes": null,
"scheduled_date": "2026-11-20",
"status": {
"value": "pending",
"label": "Pendente"
},
"is_settled": false,
"paid_at": null,
"paid_by": null,
"delivered_by_name": 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 payroll sheet item
requires authentication payroll build
Só em folha em rascunho e item ainda não pago. Mandar additions substitui a lista inteira de acréscimos do item.
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/et/items/iure" \
--header "Authorization: Bearer PDVgk63a56bdhf1e4Ev8aZc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"payee_type\": \"supplier\",
\"payee_id\": \"0ca42295-f658-39b1-a2eb-224ba4a6cb8e\",
\"receiver_name\": \"uhkrqdlvnp\",
\"receiver_document\": \"rffhdlmtdehuvgux\",
\"work_id\": \"4910ca8c-8955-381b-927f-5884f8e73474\",
\"cost_center_id\": \"quia\",
\"amount\": 88,
\"payment_method\": \"cash\",
\"pix_key\": \"kwxgavkvswfl\",
\"notes\": \"qfhhsx\",
\"scheduled_date\": \"2026-11-20T15:38:28\",
\"additions\": [
{
\"type_id\": \"b77cf59c-6901-3859-a162-94a624165a84\",
\"amount\": 63
}
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/et/items/iure"
);
const headers = {
"Authorization": "Bearer PDVgk63a56bdhf1e4Ev8aZc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"payee_type": "supplier",
"payee_id": "0ca42295-f658-39b1-a2eb-224ba4a6cb8e",
"receiver_name": "uhkrqdlvnp",
"receiver_document": "rffhdlmtdehuvgux",
"work_id": "4910ca8c-8955-381b-927f-5884f8e73474",
"cost_center_id": "quia",
"amount": 88,
"payment_method": "cash",
"pix_key": "kwxgavkvswfl",
"notes": "qfhhsx",
"scheduled_date": "2026-11-20T15:38:28",
"additions": [
{
"type_id": "b77cf59c-6901-3859-a162-94a624165a84",
"amount": 63
}
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a345c148-a037-4602-aa2b-2010de7d163b",
"payee": {
"type": null,
"label": null,
"id": null,
"name": "Vena Sawayn",
"document": "900.505.543-58"
},
"work": null,
"cost_center": null,
"amount": "345.79",
"additions": [],
"total": "345.79",
"work_cost_total": "345.79",
"payment_method": {
"value": "pix",
"label": "PIX"
},
"pix_key": null,
"notes": null,
"scheduled_date": "2026-11-20",
"status": {
"value": "pending",
"label": "Pendente"
},
"is_settled": false,
"paid_at": null,
"paid_by": null,
"delivered_by_name": 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 payroll sheet item
requires authentication payroll build
Só em folha em rascunho e item ainda não pago.
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/optio/items/id" \
--header "Authorization: Bearer vfg4D5kZc6a18bh6Ee3aVPd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/optio/items/id"
);
const headers = {
"Authorization": "Bearer vfg4D5kZc6a18bh6Ee3aVPd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Pagamento removido da folha."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Check payroll sheet
requires authentication payroll check
Confere e trava a folha: a partir daí ela não aceita mais alteração de item. Registra quem conferiu e quando. Folha sem item não é conferível.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/est/check" \
--header "Authorization: Bearer 3kc4gbdfvDE6h1ZV6aPe5a8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/est/check"
);
const headers = {
"Authorization": "Bearer 3kc4gbdfvDE6h1ZV6aPe5a8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a345c148-a9b0-40f4-b279-d2a360cdb345",
"code": null,
"name": "Escritório",
"period_start": "2026-11-16",
"period_end": "2026-11-22",
"payment_date": "2026-11-20",
"status": {
"value": "draft",
"label": "Rascunho"
},
"accepts_item_changes": true,
"can_reopen": false,
"created_by": {
"id": "a345c148-aa15-4150-bbd2-8128eacce59d",
"name": "Leda Rogahn"
},
"checked_by": null,
"checked_at": null,
"reopened_by": null,
"reopened_at": null,
"items": [],
"totals": {
"grand_total": "0.00",
"work_cost_total": "0.00",
"items_count": 0,
"by_work": [],
"by_payment_method": []
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 payroll sheet
requires authentication payroll check
Volta a folha para rascunho e registra quem reabriu e quando. Recusada quando algum item já foi pago ou entregue.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/debitis/reopen" \
--header "Authorization: Bearer f5vkZVa1da63cehP8b64DEg" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/debitis/reopen"
);
const headers = {
"Authorization": "Bearer f5vkZVa1da63cehP8b64DEg",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a345c148-ae33-48c1-8943-6e8c283f8969",
"code": null,
"name": "Obras",
"period_start": "2026-11-16",
"period_end": "2026-11-22",
"payment_date": "2026-11-20",
"status": {
"value": "draft",
"label": "Rascunho"
},
"accepts_item_changes": true,
"can_reopen": false,
"created_by": {
"id": "a345c148-aea1-45f6-904d-76a4fcfbf3af",
"name": "Prof. Lionel Hartmann DVM"
},
"checked_by": null,
"checked_at": null,
"reopened_by": null,
"reopened_at": null,
"items": [],
"totals": {
"grand_total": "0.00",
"work_cost_total": "0.00",
"items_count": 0,
"by_work": [],
"by_payment_method": []
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 ahD8vkaEb4d3c5fg16PeV6Z" \
--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 ahD8vkaEb4d3c5fg16PeV6Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "b66980fe-90f1-350c-8fc6-dd1ea2b24410",
"name": "veniam",
"display_name": "Tenetur fugit modi iusto officia."
},
{
"id": "ad680220-8a13-3670-b1bf-a58456516be6",
"name": "magni",
"display_name": "Voluptas iste neque voluptates sed."
}
],
"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 c1b48VeP3kgZ5haED6dfav6" \
--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 c1b48VeP3kgZ5haED6dfav6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "d0f2b6b0-46d0-387b-983f-33e0a3a72f6a",
"name": "qui-et",
"display_name": "non qui expedita",
"created_at": null,
"updated_at": null
},
{
"id": "3f0ba497-83db-3c4d-96be-25305704452d",
"name": "natus-ducimus",
"display_name": "rerum dolor optio",
"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 Pfhk3g5VDZd61b8cEav4a6e" \
--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 Pfhk3g5VDZd61b8cEav4a6e",
"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 61E6b8P3DgkZ4Vvfe5haacd" \
--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 61E6b8P3DgkZ4Vvfe5haacd",
"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 hDva4kV61ba35dgf8Ze6cPE" \
--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 hDva4kV61ba35dgf8Ze6cPE",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "6df8cd9b-19fc-3f28-b0e6-231f0b83df63",
"name": "qui-eveniet",
"display_name": "at eos consequatur",
"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 hckgf1DZ366P4be8daavVE5" \
--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 hckgf1DZ366P4be8daavVE5",
"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 6EakZd8aDh1bfP354gVce6v" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"048b1979-a666-3a30-bee1-846a0d50416c\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);
const headers = {
"Authorization": "Bearer 6EakZd8aDh1bfP354gVce6v",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"048b1979-a666-3a30-bee1-846a0d50416c"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "9f327a05-4017-30bf-bc96-d90f309f5eb9",
"name": "enim-recusandae",
"display_name": "laborum libero eius",
"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 3VeEgP6hbd5D6caa84k1Zfv" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"88a96716-e233-35ce-b75a-18791215cb05\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);
const headers = {
"Authorization": "Bearer 3VeEgP6hbd5D6caa84k1Zfv",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"88a96716-e233-35ce-b75a-18791215cb05"
]
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "31eaa7d8-955f-3f3d-bf4d-7d32a38d340d",
"name": "inventore-ab",
"display_name": "culpa est sint",
"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 DE86P6Vcdfa4vg31hkeba5Z" \
--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 DE86P6Vcdfa4vg31hkeba5Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "7305ff89-40c4-36d6-bf08-7121c65e58db",
"name": "Dr. Noa Lira D'ávila Filho",
"created_at": null,
"updated_at": null
},
{
"id": "d0fb3cdd-5f4b-3f86-9000-958f3c3c6f50",
"name": "Miriam Dirce Maia Sobrinho",
"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/placeat" \
--header "Authorization: Bearer 61hEdecPZkf3vaa6b5V48Dg" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-brands/placeat"
);
const headers = {
"Authorization": "Bearer 61hEdecPZkf3vaa6b5V48Dg",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "b9d60094-189b-35d0-8eac-daf4bca299d5",
"name": "Dr. Matias Guerra Arruda",
"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 1E6468fc5vhagDVePkZbad3" \
--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 1E6468fc5vhagDVePkZbad3",
"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/vel" \
--header "Authorization: Bearer 1kPcEVb5ag6D3va6f8Zdh4e" \
--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/vel"
);
const headers = {
"Authorization": "Bearer 1kPcEVb5ag6D3va6f8Zdh4e",
"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/iusto" \
--header "Authorization: Bearer b183akgh6PD5dvae46VZfcE" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-brands/iusto"
);
const headers = {
"Authorization": "Bearer b183akgh6PD5dvae46VZfcE",
"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=&q=Structure" \
--header "Authorization: Bearer 6Dagd81k3hf4bcvZVEe5Pa6" \
--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": "0",
"q": "Structure",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 6Dagd81k3hf4bcvZVEe5Pa6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "2e28f233-c9ac-3062-9281-0b3befb5f04e",
"name": "Aurora Rios Ortega",
"is_epi": false,
"created_at": null,
"updated_at": null
},
{
"id": "57eef4ae-d836-344a-a043-f0badea001ed",
"name": "Dr. Thales Sepúlveda Padilha",
"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/illum" \
--header "Authorization: Bearer a5chZE61Vb3gfd84vkDaP6e" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families/illum"
);
const headers = {
"Authorization": "Bearer a5chZE61Vb3gfd84vkDaP6e",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "3e383d97-f817-37b2-b75e-6e36e99e34ac",
"name": "Michelle Patrícia Cortês Neto",
"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 ZVP3adbefEg481kca65vDh6" \
--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 ZVP3adbefEg481kca65vDh6",
"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/non" \
--header "Authorization: Bearer 8a3aP1g5EVh6ec6bDkfdZ4v" \
--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/non"
);
const headers = {
"Authorization": "Bearer 8a3aP1g5EVh6ec6bDkfdZ4v",
"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/sunt" \
--header "Authorization: Bearer kdg3DfbVhaP6ac1e5E64Z8v" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families/sunt"
);
const headers = {
"Authorization": "Bearer kdg3DfbVhaP6ac1e5E64Z8v",
"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 4vdfEP51386bahgD6eVckZa" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"Example Q\",
\"work_id\": \"04690c4c-68a9-3165-a302-12a26350e940\",
\"user_id\": \"f1ff9e6b-0234-35f6-ab8f-cd419dc903e6\",
\"responsible_id\": \"67f5daf0-8184-3318-8909-906f2a261a0c\",
\"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 4vdfEP51386bahgD6eVckZa",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "Example Q",
"work_id": "04690c4c-68a9-3165-a302-12a26350e940",
"user_id": "f1ff9e6b-0234-35f6-ab8f-cd419dc903e6",
"responsible_id": "67f5daf0-8184-3318-8909-906f2a261a0c",
"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": "489cab7f-ebee-3582-ae58-40032d0237ac",
"name": "Pariatur ratione vero dolores qui.",
"description": "Modi quasi sunt eos ea autem cumque nobis nostrum. Eaque animi animi doloremque distinctio omnis eum expedita. Iste facere sunt quis ut.",
"work": {
"id": "a345c149-4183-4c4d-b544-974980b5e742",
"name": "Dr. Irene Toledo"
},
"user": {
"id": "a345c149-444b-4518-82c2-0032cb099e4f",
"name": "Bridgette Kshlerin"
},
"created_at": null,
"updated_at": null
},
{
"id": "bf7c92f6-f3b6-3c0d-9b04-d6696cb21628",
"name": "Quasi corporis qui.",
"description": null,
"work": {
"id": "a345c149-4757-4973-8994-67765df98b3b",
"name": "Malu Molina Arruda Filho"
},
"user": {
"id": "a345c149-49ba-4a63-9a93-bfa30de45b2c",
"name": "Abelardo Grimes"
},
"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/culpa" \
--header "Authorization: Bearer gkDf1vZad6e653E4VbchaP8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/culpa"
);
const headers = {
"Authorization": "Bearer gkDf1vZad6e653E4VbchaP8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d8c570bd-e3ac-3560-bede-b6a5d2cacc92",
"name": "Consectetur ex quasi.",
"description": "Odio dolorum et corporis occaecati quidem. Ratione itaque explicabo ut nobis nobis sit fugit impedit. Odit porro totam eius voluptatem maxime. Suscipit sit iure et rem at fugiat. Voluptas autem sunt quia quibusdam corporis.",
"work": {
"id": "a345c149-50a3-4f41-8e00-bffdbf6ab99d",
"name": "Saulo Teles Neto"
},
"user": {
"id": "a345c149-5333-49a5-b709-52d9b4001db3",
"name": "Lucienne Mohr"
},
"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/omnis/items" \
--header "Authorization: Bearer a8aE1k66P45dhg3vecbZDfV" \
--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/omnis/items"
);
const headers = {
"Authorization": "Bearer a8aE1k66P45dhg3vecbZDfV",
"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": "1908f19f-e596-3b05-9c21-41feb6f01586",
"product": {
"id": "a345c149-6618-4ead-b9c4-33b36aca40ff",
"name": "Rafael Teobaldo Jimenes",
"code": "PRD-011381",
"unit": {
"id": "a345c149-642d-4d44-8e5e-8ded7e5d30e7",
"name": "Srta. Jasmin Sepúlveda Faro Filho",
"abbreviation": "Gian Adriel Santana Jr."
}
},
"quantity": 936.5423,
"observation": null,
"created_at": null,
"updated_at": null
},
{
"id": "ba87a561-4b3e-39b4-97fd-c2a1df2fb7fe",
"product": {
"id": "a345c149-7373-4d3e-a973-022c4283a4ce",
"name": "Thalissa Tatiana Escobar Jr.",
"code": "PRD-696371",
"unit": {
"id": "a345c149-725b-4679-ab45-a81ab48874f6",
"name": "Gabriel Paes Galvão",
"abbreviation": "Mônica Leal"
}
},
"quantity": 762.5298,
"observation": "Adipisci et ea aut praesentium consectetur et fugiat iure.",
"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 c5134gDPa66kbZd8fhavEeV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"d5a192c1-2cc3-3361-8d4f-cd426c5ecb93\",
\"items\": [
{
\"product_id\": \"b463e22d-9770-38f3-b355-06367ef3f5df\",
\"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 c5134gDPa66kbZd8fhavEeV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "d5a192c1-2cc3-3361-8d4f-cd426c5ecb93",
"items": [
{
"product_id": "b463e22d-9770-38f3-b355-06367ef3f5df",
"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/commodi" \
--header "Authorization: Bearer 6aed41EfaDkv6P53Zcbgh8V" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"items\": [
{
\"id\": \"c077b1b3-689d-30d1-b40f-56d52e0ad84c\",
\"product_id\": \"42b647de-6035-3e6c-a62c-c58554cd6126\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/commodi"
);
const headers = {
"Authorization": "Bearer 6aed41EfaDkv6P53Zcbgh8V",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"items": [
{
"id": "c077b1b3-689d-30d1-b40f-56d52e0ad84c",
"product_id": "42b647de-6035-3e6c-a62c-c58554cd6126",
"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/praesentium" \
--header "Authorization: Bearer vVDg1dEc5ahZbePkf8636a4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/praesentium"
);
const headers = {
"Authorization": "Bearer vVDg1dEc5ahZbePkf8636a4",
"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/et/items" \
--header "Authorization: Bearer 486EgVDbca3kd6evhZfaP15" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"product_id\": \"ed3265f7-000c-383c-ad40-f2bf91e024e3\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/et/items"
);
const headers = {
"Authorization": "Bearer 486EgVDbca3kd6evhZfaP15",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"product_id": "ed3265f7-000c-383c-ad40-f2bf91e024e3",
"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/nemo" \
--header "Authorization: Bearer 5vaebZd8c3E1Vhg6aPfD46k" \
--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/nemo"
);
const headers = {
"Authorization": "Bearer 5vaebZd8c3E1Vhg6aPfD46k",
"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/quis/items" \
--header "Authorization: Bearer kE46f31vab68hcdDZ5PeagV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"57906793-e7cd-391a-9ddc-63dfdbc00ec9\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/quis/items"
);
const headers = {
"Authorization": "Bearer kE46f31vab68hcdDZ5PeagV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"57906793-e7cd-391a-9ddc-63dfdbc00ec9"
]
};
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/et/sync-items" \
--header "Authorization: Bearer kbh45PadEea3c1g8fV6v6ZD" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"id\": \"489dbd98-d933-3149-b11e-ce9c77d9d83a\",
\"product_id\": \"06dcada0-bb6b-368a-82fc-fb76548219ae\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/et/sync-items"
);
const headers = {
"Authorization": "Bearer kbh45PadEea3c1g8fV6v6ZD",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"id": "489dbd98-d933-3149-b11e-ce9c77d9d83a",
"product_id": "06dcada0-bb6b-368a-82fc-fb76548219ae",
"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/ut/fulfill" \
--header "Authorization: Bearer g8PEa663c5VZ4hdkbvDfa1e" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"fulfillment_type\": \"Example Fulfillment type\",
\"stock_id\": \"d25373a1-0d51-3e68-99e1-46301c51c928\",
\"quantity\": 1,
\"source_stock_id\": \"7f293939-c3b6-3012-89f6-9d9be56c7d16\",
\"reason\": \"Example Reason\",
\"origins\": [
{
\"supplier_product_id\": \"ec5004a2-8dfe-3c4c-9da8-d026a00a6d27\",
\"quantity\": 1
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/ut/fulfill"
);
const headers = {
"Authorization": "Bearer g8PEa663c5VZ4hdkbvDfa1e",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"fulfillment_type": "Example Fulfillment type",
"stock_id": "d25373a1-0d51-3e68-99e1-46301c51c928",
"quantity": 1,
"source_stock_id": "7f293939-c3b6-3012-89f6-9d9be56c7d16",
"reason": "Example Reason",
"origins": [
{
"supplier_product_id": "ec5004a2-8dfe-3c4c-9da8-d026a00a6d27",
"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/eveniet/fulfillments" \
--header "Authorization: Bearer 1364kEegdZD8Vfcha65Pavb" \
--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/eveniet/fulfillments"
);
const headers = {
"Authorization": "Bearer 1364kEegdZD8Vfcha65Pavb",
"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": "199fc952-a745-36d9-870e-787dadccd3a6",
"quantity": 55.4461,
"fulfilled_at": "2026-11-14T23:22:51.000000Z",
"created_at": null
},
{
"id": "f6b73295-6398-3539-92e9-1eb441086cca",
"quantity": 38.1678,
"fulfilled_at": "2026-10-28T00:06:52.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/eius" \
--header "Authorization: Bearer 1Ev6Dac8k3e6gaP4fZ5Vdbh" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/eius"
);
const headers = {
"Authorization": "Bearer 1Ev6Dac8k3e6gaP4fZ5Vdbh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "83bb70cb-0a78-3d3a-bc18-0ffb16f604cd",
"product": {
"id": "a345c14c-b108-4a72-b7cc-eeed4a05bb66",
"name": "Demian Godói Esteves Filho",
"code": "PRD-833622",
"unit": {
"id": "a345c14c-aff6-4d5c-8854-6beae5b7ad25",
"name": "Dr. Cauan Montenegro",
"abbreviation": "Srta. Noelí Isis Maia"
}
},
"quantity": 425.475,
"quantity_fulfilled": 0,
"quantity_pending": 425.475,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Possimus maiores ratione sed doloremque sunt ab eius.",
"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/iure/pending-items" \
--header "Authorization: Bearer DfcVgP4eahEZd15a6b36v8k" \
--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/iure/pending-items"
);
const headers = {
"Authorization": "Bearer DfcVgP4eahEZd15a6b36v8k",
"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": "7fc0dd67-f565-323a-bd17-955157542b32",
"product": {
"id": "a345c14c-e486-42db-8bb8-e87a8d94129c",
"name": "Srta. Malena Ivana Beltrão Jr.",
"code": "PRD-558714",
"unit": {
"id": "a345c14c-e33e-46e7-935c-8f52747dd212",
"name": "Sra. Vanessa Ariane Oliveira",
"abbreviation": "Sr. Máximo Walter Barros Neto"
}
},
"quantity": 713.3417,
"quantity_fulfilled": 0,
"quantity_pending": 713.3417,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": null,
"created_at": null,
"updated_at": null
},
{
"id": "2a65a170-1a6c-3275-a074-07b5daf89cef",
"product": {
"id": "a345c14c-f41c-4067-b948-29b487d52a90",
"name": "Mauro Alexandre Fonseca",
"code": "PRD-471042",
"unit": {
"id": "a345c14c-f30e-4655-a832-b073a69abe6c",
"name": "Sr. Heitor Esteves",
"abbreviation": "Augusto Gean Guerra Filho"
}
},
"quantity": 753.3987,
"quantity_fulfilled": 0,
"quantity_pending": 753.3987,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Ullam error sequi ex.",
"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/omnis" \
--header "Authorization: Bearer 56hc6vPfa8VbaeE3ZgD41dk" \
--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/omnis"
);
const headers = {
"Authorization": "Bearer 56hc6vPfa8VbaeE3ZgD41dk",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "b1499fe3-0784-3a97-bf79-739914b316cf",
"product": {
"id": "a345c14d-0788-461f-8892-395b0c3668b9",
"name": "Sr. Máximo Sergio Mendes Sobrinho",
"code": "PRD-928539",
"unit": {
"id": "a345c14d-0654-4ff4-9d65-7cbd3727789d",
"name": "Sara Prado Camacho",
"abbreviation": "Ziraldo Michael Alves"
}
},
"quantity": 341.7937,
"quantity_fulfilled": 0,
"quantity_pending": 341.7937,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Voluptatem animi sunt est et doloremque.",
"created_at": null,
"updated_at": null
},
{
"id": "2a4c7862-2c36-349d-8cdd-413767fb1d05",
"product": {
"id": "a345c14d-2359-45fd-b3ed-9c9e204b42a3",
"name": "Bárbara Faria Azevedo Jr.",
"code": "PRD-802058",
"unit": {
"id": "a345c14d-206e-4654-8e19-c8f34b911e1f",
"name": "Dr. Ziraldo Wellington Rocha",
"abbreviation": "Sr. Aaron Chaves"
}
},
"quantity": 453.5654,
"quantity_fulfilled": 0,
"quantity_pending": 453.5654,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Sit aspernatur optio tempora dignissimos non.",
"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 4vDad1VfP6b8cg3e5E6Zakh" \
--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\": \"1fef9dd3-542c-3964-b95f-46ae28edf73e\",
\"work_location_id\": \"a958e2c1-82ec-3ce5-81d4-1896deabb4da\",
\"user_id\": \"409e14ec-1982-3776-8b4b-41228416f3a6\",
\"status_id\": \"62a76496-91c6-38cd-87da-4490f1dd9ed7\",
\"priority\": \"Example Priority\",
\"needed_at_from\": \"Example Needed at from\",
\"needed_at_to\": \"Example Needed at to\",
\"responsible_id\": \"bb03d52d-3145-3bb2-bc60-4f120e6d887d\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests"
);
const headers = {
"Authorization": "Bearer 4vDad1VfP6b8cg3e5E6Zakh",
"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": "1fef9dd3-542c-3964-b95f-46ae28edf73e",
"work_location_id": "a958e2c1-82ec-3ce5-81d4-1896deabb4da",
"user_id": "409e14ec-1982-3776-8b4b-41228416f3a6",
"status_id": "62a76496-91c6-38cd-87da-4490f1dd9ed7",
"priority": "Example Priority",
"needed_at_from": "Example Needed at from",
"needed_at_to": "Example Needed at to",
"responsible_id": "bb03d52d-3145-3bb2-bc60-4f120e6d887d"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "516c3107-4e8b-32f8-a931-081c039c7b6b",
"code": null,
"name": "Nostrum id et.",
"description": "Est reprehenderit doloribus laborum autem ex. Totam delectus mollitia odit ipsum voluptatem velit. Debitis non in assumenda quaerat.",
"work": {
"id": "a345c14a-6476-42e1-b91c-e2abccec93d3",
"name": "Matias Gil Jr."
},
"user": {
"id": "a345c14a-6701-4d42-bf00-e77b3be89ea2",
"name": "Dr. Mckenzie Jerde"
},
"status": {
"id": "a345c14a-6892-4558-aca6-062c0bd3471b",
"slug": null,
"name": null,
"description": "Cláudia Letícia Pedrosa",
"abbreviation": "corrupti",
"color": "#b821c3",
"text_color": "#1ed819"
},
"priority": "high",
"priority_label": "Alta",
"needed_at": null,
"approved_at": null,
"rejection_reason": null,
"created_at": null,
"updated_at": null
},
{
"id": "ba355d69-d262-3231-b749-3686624ccd1d",
"code": null,
"name": "Nesciunt eos occaecati illum.",
"description": null,
"work": {
"id": "a345c14a-6bae-45cf-8562-9881c4384865",
"name": "Dr. Isis Helena Faria Filho"
},
"user": {
"id": "a345c14a-6df8-4ba3-9136-2be688cfacaf",
"name": "Candice Heidenreich"
},
"status": {
"id": "a345c14a-6f77-4da2-81db-4814e7336282",
"slug": null,
"name": null,
"description": "Giovane Leal Faria",
"abbreviation": "hic",
"color": "#f0ee48",
"text_color": "#495523"
},
"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/dolorum" \
--header "Authorization: Bearer 6vEcDek635faaVb1PZ8dh4g" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/dolorum"
);
const headers = {
"Authorization": "Bearer 6vEcDek635faaVb1PZ8dh4g",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "86c49cb8-9663-329d-978f-280935be507e",
"code": null,
"name": "Voluptatum reiciendis aspernatur.",
"description": "Consequatur qui error distinctio et numquam. Enim nihil in quaerat nisi aut consectetur. Occaecati ut quidem aliquam qui.",
"work": {
"id": "a345c14a-77a0-4d77-a732-e1e7a582926b",
"name": "Vitor Ricardo Domingues"
},
"user": {
"id": "a345c14a-7a39-4bd6-978d-ae9179da1831",
"name": "Dr. Amparo Marks I"
},
"status": {
"id": "a345c14a-7be7-4458-ad2d-08a90744c26a",
"slug": null,
"name": null,
"description": "Srta. Luna Fidalgo Deverso",
"abbreviation": "maiores",
"color": "#3a39bf",
"text_color": "#235f1f"
},
"priority": "high",
"priority_label": "Alta",
"needed_at": null,
"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/sunt/items" \
--header "Authorization: Bearer v1gDe8c5P46fdZVEbaa3kh6" \
--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/sunt/items"
);
const headers = {
"Authorization": "Bearer v1gDe8c5P46fdZVEbaa3kh6",
"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": "a6780f93-8028-3a77-b71e-2385ed1c09c6",
"product": {
"id": "a345c14a-9933-4660-a214-541a44853375",
"name": "Jerônimo Pedro Benites Neto",
"code": "PRD-999897",
"unit": {
"id": "a345c14a-97f6-4e54-add1-dd56c5ca5f89",
"name": "Michelle Maldonado Flores Neto",
"abbreviation": "Marília Flávia da Cruz Filho"
}
},
"quantity": 721.9271,
"quantity_fulfilled": 0,
"quantity_pending": 721.9271,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": null,
"created_at": null,
"updated_at": null
},
{
"id": "f073cc6d-a36e-326e-a838-3d1ac92b0e9c",
"product": {
"id": "a345c14a-a978-435e-9746-be69acd6c259",
"name": "Sra. Nicole Azevedo Mendes",
"code": "PRD-354701",
"unit": {
"id": "a345c14a-a834-432a-a637-a1089174948e",
"name": "Sra. Mia Marisa Feliciano",
"abbreviation": "Sr. Fábio Christian Pacheco"
}
},
"quantity": 247.0379,
"quantity_fulfilled": 0,
"quantity_pending": 247.0379,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Perspiciatis pariatur facilis impedit repellendus.",
"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 Z6VaeaPdf43E51hkDg8vb6c" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"b556770a-dabd-353c-ab4b-1d0352ab88c5\",
\"work_location_id\": \"79b9348c-c47f-3b5c-8c1e-ad9c7cd996ad\",
\"status_id\": \"b257dc86-69fa-3068-a75b-6bdb28da54f5\",
\"priority\": \"Example Priority\",
\"needed_at\": \"Example Needed at\",
\"items\": [
{
\"product_id\": \"c02cdffb-8433-308e-bc42-bf0e60a45b85\",
\"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 Z6VaeaPdf43E51hkDg8vb6c",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "b556770a-dabd-353c-ab4b-1d0352ab88c5",
"work_location_id": "79b9348c-c47f-3b5c-8c1e-ad9c7cd996ad",
"status_id": "b257dc86-69fa-3068-a75b-6bdb28da54f5",
"priority": "Example Priority",
"needed_at": "Example Needed at",
"items": [
{
"product_id": "c02cdffb-8433-308e-bc42-bf0e60a45b85",
"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/non" \
--header "Authorization: Bearer 5d6cD1eEbhZk3Pfa4Vav6g8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"1dfb5d93-7b26-3672-bea2-68d253b0dfb9\",
\"work_location_id\": \"af55cf57-923c-3546-9079-00ee6236b4b2\",
\"status_id\": \"83c090fb-3012-3690-9980-3447742b25f1\",
\"priority\": \"Example Priority\",
\"needed_at\": \"Example Needed at\",
\"items\": [
{
\"id\": \"3ffd8cde-1dbf-32c7-bd7c-d13f07a46420\",
\"product_id\": \"6f79a6c2-22a2-3a41-8c60-5885f2fbbeaf\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/non"
);
const headers = {
"Authorization": "Bearer 5d6cD1eEbhZk3Pfa4Vav6g8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "1dfb5d93-7b26-3672-bea2-68d253b0dfb9",
"work_location_id": "af55cf57-923c-3546-9079-00ee6236b4b2",
"status_id": "83c090fb-3012-3690-9980-3447742b25f1",
"priority": "Example Priority",
"needed_at": "Example Needed at",
"items": [
{
"id": "3ffd8cde-1dbf-32c7-bd7c-d13f07a46420",
"product_id": "6f79a6c2-22a2-3a41-8c60-5885f2fbbeaf",
"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/nobis" \
--header "Authorization: Bearer cv5fZVD6bhgEdk1a386P4ae" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/nobis"
);
const headers = {
"Authorization": "Bearer cv5fZVD6bhgEdk1a386P4ae",
"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/quibusdam/approve" \
--header "Authorization: Bearer DgEh43vPd8Za61bf6aceVk5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/quibusdam/approve"
);
const headers = {
"Authorization": "Bearer DgEh43vPd8Za61bf6aceVk5",
"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/exercitationem/reject" \
--header "Authorization: Bearer Vc645v1fa86ahZDdkPbg3eE" \
--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/exercitationem/reject"
);
const headers = {
"Authorization": "Bearer Vc645v1fa86ahZDdkPbg3eE",
"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/commodi/items" \
--header "Authorization: Bearer EP6gkh8ea3va1fVb54D6dZc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"product_id\": \"3c255be7-1288-37d1-ac0b-3208cb6714cc\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/commodi/items"
);
const headers = {
"Authorization": "Bearer EP6gkh8ea3va1fVb54D6dZc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"product_id": "3c255be7-1288-37d1-ac0b-3208cb6714cc",
"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/iure" \
--header "Authorization: Bearer dVha6fZD5k1va468Ec3Pbeg" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"quantity\": 1,
\"observation\": \"Example Observation\",
\"status_id\": \"a1846df6-573c-3696-9300-ce63ce0930e1\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/iure"
);
const headers = {
"Authorization": "Bearer dVha6fZD5k1va468Ec3Pbeg",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quantity": 1,
"observation": "Example Observation",
"status_id": "a1846df6-573c-3696-9300-ce63ce0930e1"
};
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/aut/items" \
--header "Authorization: Bearer fDbPd836Z5Eaa1hgc46evkV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"98be1787-bb60-3c61-9289-4b76da8e494a\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/aut/items"
);
const headers = {
"Authorization": "Bearer fDbPd836Z5Eaa1hgc46evkV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"98be1787-bb60-3c61-9289-4b76da8e494a"
]
};
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/sint/sync-items" \
--header "Authorization: Bearer Paa6ghE4V315b8cevZDdf6k" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"id\": \"ad7d602b-db6d-37ca-95fb-4523dbcf8048\",
\"product_id\": \"28c463ba-324a-3b6b-a31b-f00c7ad037c2\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/sint/sync-items"
);
const headers = {
"Authorization": "Bearer Paa6ghE4V315b8cevZDdf6k",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"id": "ad7d602b-db6d-37ca-95fb-4523dbcf8048",
"product_id": "28c463ba-324a-3b6b-a31b-f00c7ad037c2",
"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 adfEaDZ6V54vgPek3c6bh81" \
--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 adfEaDZ6V54vgPek3c6bh81",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "fd7c20b2-44c3-3f0e-abc9-be721781c156",
"name": "Sr. Gabriel Leon",
"code": "PRD-685127",
"stock": 3236,
"product_family": {
"id": "a345c148-e992-4ac1-8f1f-ddab34f0fca7",
"name": "Sr. Cristóvão Tamoio"
},
"product_brand": {
"id": "a345c148-eaf2-40cb-a3dc-6d9814c5c25a",
"name": "Sra. Maya Verdugo Paz"
},
"unit": {
"id": "a345c148-ec34-48c3-9261-d92c8e6fbbae",
"name": "Sr. Nelson Vieira Neto",
"abbreviation": "Sr. Máximo Rios Franco Jr."
},
"image": {
"id": null,
"url": null
},
"epi_type": null,
"description": "Voluptas dolorem ipsam aut.",
"created_at": null,
"updated_at": null
},
{
"id": "d258f989-a25d-3ecd-8dd2-c06f8c9c2505",
"name": "Fátima Campos Lira Filho",
"code": "PRD-466917",
"stock": 2,
"product_family": {
"id": "a345c148-ee9c-4e9f-8ce0-5d7bb85c60ba",
"name": "Horácio Lozano Filho"
},
"product_brand": {
"id": "a345c148-eff4-49be-9730-82f19e40c89f",
"name": "Dr. Gilberto Carvalho Neto"
},
"unit": {
"id": "a345c148-f166-4cb7-a212-f69b95fe024a",
"name": "Kamila Jimenes Carvalho Jr.",
"abbreviation": "Rayane Sheila Santiago"
},
"image": {
"id": null,
"url": null
},
"epi_type": null,
"description": "Repellendus sed natus iusto et delectus asperiores harum.",
"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 fDZ81a3c65g4Edbka6ePvhV" \
--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 fDZ81a3c65g4Edbka6ePvhV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "8d1c21b6-a0b2-3f48-b7f0-5ea7e8ed9d60",
"name": "Sr. Gustavo Carvalho",
"code": "PRD-021905",
"stock": 66,
"product_family": {
"id": "a345c148-f8d8-4940-ab72-1103266916e2",
"name": "Maximiano Godói Burgos"
},
"product_brand": {
"id": "a345c148-fa39-4c67-9ec2-74ce745efa23",
"name": "Adriano Salgado"
},
"unit": {
"id": "a345c148-fba6-4e51-92f1-b66f4ea96b92",
"name": "Sr. Sandro Ramos da Cruz",
"abbreviation": "Malena Thaís Esteves"
},
"image": {
"id": null,
"url": null
},
"epi_type": null,
"description": "Sit error et sit dolorem consequatur placeat.",
"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/tenetur/available-origins" \
--header "Authorization: Bearer dEke5Vc863P1vhf6gaZaDb4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/tenetur/available-origins"
);
const headers = {
"Authorization": "Bearer dEke5Vc863P1vhf6gaZaDb4",
"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 4V6h5eD6bkf8ZEagPavcd31" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"product_family_id\": \"d25ed4a5-1639-3ad7-8d31-4ee77df221fe\",
\"product_brand_id\": \"76a16429-7dd0-397a-ba29-513efbbc857b\",
\"unit_id\": \"58f9e596-06a6-3670-a975-99913289d2a8\",
\"description\": \"Example Description\",
\"stock\": 1
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products"
);
const headers = {
"Authorization": "Bearer 4V6h5eD6bkf8ZEagPavcd31",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"product_family_id": "d25ed4a5-1639-3ad7-8d31-4ee77df221fe",
"product_brand_id": "76a16429-7dd0-397a-ba29-513efbbc857b",
"unit_id": "58f9e596-06a6-3670-a975-99913289d2a8",
"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 k6gEVcfe4haDab6P53v8Z1d" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"product_family_id\": \"14ac7a61-c5aa-3c45-a779-d937c2685d01\",
\"product_brand_id\": \"db29be2e-b829-32d1-a373-66d3222d3fca\",
\"unit_id\": \"e09d1ebe-1340-3ef9-9563-21fd32026e3a\",
\"stock\": 1,
\"description\": \"Example Description\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/1"
);
const headers = {
"Authorization": "Bearer k6gEVcfe4haDab6P53v8Z1d",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"product_family_id": "14ac7a61-c5aa-3c45-a779-d937c2685d01",
"product_brand_id": "db29be2e-b829-32d1-a373-66d3222d3fca",
"unit_id": "e09d1ebe-1340-3ef9-9563-21fd32026e3a",
"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/rerum" \
--header "Authorization: Bearer cadP6Z8hEke53fbaDVvg416" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/rerum"
);
const headers = {
"Authorization": "Bearer cadP6Z8hEke53fbaDVvg416",
"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/0f34aa13-e88e-34e9-b1bc-48604e9f1625/versions" \
--header "Authorization: Bearer ZgPhEc8Vaavek64d3615fDb" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"notes\": \"Example Notes\",
\"responsible_user_id\": \"5a2d4c01-ed3f-34ae-ae80-953a697a9d9d\",
\"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/0f34aa13-e88e-34e9-b1bc-48604e9f1625/versions"
);
const headers = {
"Authorization": "Bearer ZgPhEc8Vaavek64d3615fDb",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"notes": "Example Notes",
"responsible_user_id": "5a2d4c01-ed3f-34ae-ae80-953a697a9d9d",
"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/e0340dcc-59c1-3cee-8ce1-566145aeb581/versions" \
--header "Authorization: Bearer cE46aZhkDPafed83g6Vv1b5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/e0340dcc-59c1-3cee-8ce1-566145aeb581/versions"
);
const headers = {
"Authorization": "Bearer cE46aZhkDPafed83g6Vv1b5",
"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/b2c13920-5552-335f-ac0c-7768fe890823" \
--header "Authorization: Bearer f6V8ag1acEehD3k56bPdZv4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/b2c13920-5552-335f-ac0c-7768fe890823"
);
const headers = {
"Authorization": "Bearer f6V8ag1acEehD3k56bPdZv4",
"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/fef403ee-f3ee-3349-9e37-15bae8691b90/download" \
--header "Authorization: Bearer 3baZ68dfvP4h1cV5aDegkE6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/fef403ee-f3ee-3349-9e37-15bae8691b90/download"
);
const headers = {
"Authorization": "Bearer 3baZ68dfvP4h1cV5aDegkE6",
"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/a87e1d24-80cf-3409-ad45-ecf3c0f2c7a4/restore" \
--header "Authorization: Bearer ga5kvcV86hdeD4E16fZ3aPb" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/a87e1d24-80cf-3409-ad45-ecf3c0f2c7a4/restore"
);
const headers = {
"Authorization": "Bearer ga5kvcV86hdeD4E16fZ3aPb",
"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/b801d9af-98d1-3876-8358-faf22548f103" \
--header "Authorization: Bearer gEfh65ea4vcZ1kDV6P83bda" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/b801d9af-98d1-3876-8358-faf22548f103"
);
const headers = {
"Authorization": "Bearer gEfh65ea4vcZ1kDV6P83bda",
"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=71ae4aeb-286e-3f08-aeaf-e2103d5c49d4&work_id=beb0b5f4-9253-3761-8e19-92660d0904ed&status_id=e210af80-3563-38c5-bfc7-6d8da589bdf1&responsible_id=ecd38b4b-6aa3-3e61-a1e4-fef0e0ee2e45" \
--header "Authorization: Bearer chbZ6dEDa5186g4vfk3VPae" \
--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": "71ae4aeb-286e-3f08-aeaf-e2103d5c49d4",
"work_id": "beb0b5f4-9253-3761-8e19-92660d0904ed",
"status_id": "e210af80-3563-38c5-bfc7-6d8da589bdf1",
"responsible_id": "ecd38b4b-6aa3-3e61-a1e4-fef0e0ee2e45",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer chbZ6dEDa5186g4vfk3VPae",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "8a497e2f-85ef-390f-b319-9e182131ab1f",
"name": "Dolorem veritatis dolorem",
"description": "Molestias voluptas illum et ipsa dolores quasi reprehenderit.",
"current_version": 1,
"file": {
"path": "projects/65c91832-acc8-338b-aaa9-595ba28da972.pdf",
"size": "4755072",
"extension": "pdf"
},
"discipline": {
"id": "a345c14d-35e0-40bf-bddc-2ce3bc73882e",
"name": "Et",
"code": "TIM"
},
"created_at": null,
"updated_at": null
},
{
"id": "b0a1ac3f-4fa9-361f-94f4-13ea0952e3cc",
"name": "Omnis at quasi",
"description": "In sed vitae saepe et eum illum exercitationem.",
"current_version": 1,
"file": {
"path": "projects/23c30932-c27a-3da3-ad1b-ad33baf5e0a8.pdf",
"size": "1255305",
"extension": "pdf"
},
"discipline": {
"id": "a345c14d-3b2f-4ab1-a1e0-f70d98ab9b4a",
"name": "Blanditiis",
"code": "MDU"
},
"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/14" \
--header "Authorization: Bearer g6D3akacbf8hd1vZ65V4eEP" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/14"
);
const headers = {
"Authorization": "Bearer g6D3akacbf8hd1vZ65V4eEP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a7537b30-e989-3b9d-9cf8-ef2729a42614",
"name": "Cum fuga ab",
"description": "Quam tempore in sit rerum.",
"current_version": 1,
"file": {
"path": "projects/b61673b8-4895-3038-b8b3-33a2ce5562c8.pdf",
"size": "2800543",
"extension": "pdf"
},
"discipline": {
"id": "a345c14d-4a03-43cf-82d4-9a132903d288",
"name": "Aut",
"code": "DXL"
},
"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 51Z8aEg3b6haVPveDd6k4fc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"discipline_id\": \"0a735cce-6a58-3a33-9b0a-4b56f74eb1d1\",
\"work_id\": \"8dc92ead-eb41-3804-bc5c-9908da93bca7\",
\"responsible_user_id\": \"8d009795-f59f-38a5-a65a-2330a14388f0\",
\"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 51Z8aEg3b6haVPveDd6k4fc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"discipline_id": "0a735cce-6a58-3a33-9b0a-4b56f74eb1d1",
"work_id": "8dc92ead-eb41-3804-bc5c-9908da93bca7",
"responsible_user_id": "8d009795-f59f-38a5-a65a-2330a14388f0",
"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/2" \
--header "Authorization: Bearer cZ513VgPf4k6hb86eEDvaad" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"discipline_id\": \"1615c458-c5ca-37b5-8e67-3ad5219e9a3f\",
\"work_id\": \"8e7e9b5e-c79e-335a-946a-5f5ee45c5984\",
\"responsible_user_id\": \"4c3e89a2-56d9-39c5-af1f-c26ef0497689\",
\"status_id\": \"a53f1b99-0446-3181-9f73-1d2dc79fbc41\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/2"
);
const headers = {
"Authorization": "Bearer cZ513VgPf4k6hb86eEDvaad",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"discipline_id": "1615c458-c5ca-37b5-8e67-3ad5219e9a3f",
"work_id": "8e7e9b5e-c79e-335a-946a-5f5ee45c5984",
"responsible_user_id": "4c3e89a2-56d9-39c5-af1f-c26ef0497689",
"status_id": "a53f1b99-0446-3181-9f73-1d2dc79fbc41"
};
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/et" \
--header "Authorization: Bearer h4681fdk63bgaaePZDvEcV5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/et"
);
const headers = {
"Authorization": "Bearer h4681fdk63bgaaePZDvEcV5",
"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 65ge8kaEZa1vD3P6cbd4hfV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"daily_log\": \"modi\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/daily-log"
);
const headers = {
"Authorization": "Bearer 65ge8kaEZa1vD3P6cbd4hfV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"daily_log": "modi"
};
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 EakVbhcagd4ZP68De13vf65" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"employee\": \"dolorum\",
\"kit_uuid\": \"227b29df-9390-3c16-abd5-7042c01d0663\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/epi-term"
);
const headers = {
"Authorization": "Bearer EakVbhcagd4ZP68De13vf65",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"employee": "dolorum",
"kit_uuid": "227b29df-9390-3c16-abd5-7042c01d0663"
};
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 payroll sheets PDF
requires authentication No specific permission required
Gera o PDF das folhas cuja data de pagamento cai no período, com os itens por pessoa e obra e os subtotais por obra e por forma de pagamento. Folha ainda em rascunho sai marcada como não conferida. A geração é assíncrona: o front é avisado por Pusher quando fica pronto.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/payroll-sheet" \
--header "Authorization: Bearer 53Z8hEa6cPVafde4D6kg1bv" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"start\": \"2026-11-20\",
\"end\": \"2034-04-08\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/payroll-sheet"
);
const headers = {
"Authorization": "Bearer 53Z8hEa6cPVafde4D6kg1bv",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"start": "2026-11-20",
"end": "2034-04-08"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (202):
{
"message": "PDF da folha sendo gerado. Você será notificado quando estiver pronto.",
"channel": "reports.uuid",
"event": "pdf-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.
Generate day payments Excel
requires authentication payroll pay
Gera a planilha de "Pagamentos do dia": uma linha por item, com favorecido, documento, chave PIX, obra, centro de custo, folha, forma, valor (diária mais acréscimos) e situação. Sem date, usa o dia de hoje. A geração é assíncrona: o front é avisado por Pusher quando fica pronta.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/payroll-day/excel" \
--header "Authorization: Bearer VegEbadkh6Za5cPfD381v46" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date\": \"2026-11-20\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/payroll-day/excel"
);
const headers = {
"Authorization": "Bearer VegEbadkh6Za5cPfD381v46",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date": "2026-11-20"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (202):
{
"message": "Planilha sendo gerada. Você será notificado quando estiver pronta.",
"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.
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 e6Edka1P46vg5hbaDfZcV83" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"employee\": \"eos\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/employee-sheet"
);
const headers = {
"Authorization": "Bearer e6Edka1P46vg5hbaDfZcV83",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"employee": "eos"
};
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[]=0606e7ee-657f-3bdd-b3d9-737e537c1f12&cost_centers[]=5b1bdcbf-c67e-37a5-806b-1102b94c635c&format=xlsx" \
--header "Authorization: Bearer gd1e6a4VZ68bEDva3c5fkhP" \
--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]": "0606e7ee-657f-3bdd-b3d9-737e537c1f12",
"cost_centers[0]": "5b1bdcbf-c67e-37a5-806b-1102b94c635c",
"format": "xlsx",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer gd1e6a4VZ68bEDva3c5fkhP",
"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=non&sort_by=date&sort_desc=1&per_page=14" \
--header "Authorization: Bearer 6D8efv6Vgka1ZbdPEach435" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_start\": \"2026-11-20\",
\"date_end\": \"2094-01-12\",
\"block\": \"disbursement\",
\"cost_center_id\": \"d70c66a3-e1b6-3835-a6b8-3763ccea8236\",
\"without_cost_center\": true,
\"type\": \"other\",
\"per_page\": 6,
\"search\": \"dbomyjoyqikntplchq\",
\"sort_by\": \"date\",
\"sort_desc\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/cost-center/entries"
);
const params = {
"search": "non",
"sort_by": "date",
"sort_desc": "1",
"per_page": "14",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 6D8efv6Vgka1ZbdPEach435",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date_start": "2026-11-20",
"date_end": "2094-01-12",
"block": "disbursement",
"cost_center_id": "d70c66a3-e1b6-3835-a6b8-3763ccea8236",
"without_cost_center": true,
"type": "other",
"per_page": 6,
"search": "dbomyjoyqikntplchq",
"sort_by": "date",
"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[]=cc87eb37-701a-3990-96e7-82e0dbba48d5&cost_centers[]=b8e0390e-1326-31cc-b446-9bb387e34b3b&format=xlsx" \
--header "Authorization: Bearer c4hevPV5aZk361gE6bdfD8a" \
--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]": "cc87eb37-701a-3990-96e7-82e0dbba48d5",
"cost_centers[0]": "b8e0390e-1326-31cc-b446-9bb387e34b3b",
"format": "xlsx",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer c4hevPV5aZk361gE6bdfD8a",
"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=dolores&type=entrada&description=Debitis+repellendus+facere+rerum+libero.&categories[]=566ca360-05d0-3aa0-896d-f09b74b9c1f9&exclude_categories[]=c2aeb91c-f147-3e70-89ad-2df0941f7ed6&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=24951bb2-9454-31a4-b8fa-5f56f6860b87&customers[]=76138917-9742-3fd9-83bb-1ae17ff805d4&suppliers[]=abbb4bad-4c83-3941-8c5c-be0e2d7bfa2c&cash_session=e0f176cf-ed1c-3363-a111-86728cc6e789&works[]=64119067-d211-3c68-9332-f3b67ec8d94b" \
--header "Authorization: Bearer Zc6kV3g5DahE86dbePva41f" \
--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": "dolores",
"type": "entrada",
"description": "Debitis repellendus facere rerum libero.",
"categories[0]": "566ca360-05d0-3aa0-896d-f09b74b9c1f9",
"exclude_categories[0]": "c2aeb91c-f147-3e70-89ad-2df0941f7ed6",
"date_start": "2026-01-01",
"date_end": "2026-12-31",
"bank_accounts[0]": "24951bb2-9454-31a4-b8fa-5f56f6860b87",
"customers[0]": "76138917-9742-3fd9-83bb-1ae17ff805d4",
"suppliers[0]": "abbb4bad-4c83-3941-8c5c-be0e2d7bfa2c",
"cash_session": "e0f176cf-ed1c-3363-a111-86728cc6e789",
"works[0]": "64119067-d211-3c68-9332-f3b67ec8d94b",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Zc6kV3g5DahE86dbePva41f",
"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=et&type=entrada&description=Libero+quo+qui+enim+non+sint+dolores+eius.&categories[]=39f08311-4139-3f48-8c65-1bf0df56f9f1&exclude_categories[]=522a109a-fcaf-3ae8-92b7-7ca79df131aa&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=e066d422-f891-3294-b882-cd7a74a3867c&customers[]=d04ead29-a92b-3b67-8814-bdad65f87048&suppliers[]=7e563616-3f90-3da2-b6a1-5ad6e93d1a63&cash_session=c81103b5-f05d-3a6a-9786-3664260c6492&works[]=064f690b-2b0f-3e9a-997c-371ca56039ae" \
--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": "et",
"type": "entrada",
"description": "Libero quo qui enim non sint dolores eius.",
"categories[0]": "39f08311-4139-3f48-8c65-1bf0df56f9f1",
"exclude_categories[0]": "522a109a-fcaf-3ae8-92b7-7ca79df131aa",
"date_start": "2026-01-01",
"date_end": "2026-12-31",
"bank_accounts[0]": "e066d422-f891-3294-b882-cd7a74a3867c",
"customers[0]": "d04ead29-a92b-3b67-8814-bdad65f87048",
"suppliers[0]": "7e563616-3f90-3da2-b6a1-5ad6e93d1a63",
"cash_session": "c81103b5-f05d-3a6a-9786-3664260c6492",
"works[0]": "064f690b-2b0f-3e9a-997c-371ca56039ae",
};
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 ZVafh1dva46EbP5Dcek63g8" \
--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 ZVafh1dva46EbP5Dcek63g8",
"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 4fceVhDEavak6gPb6Z815d3" \
--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 4fceVhDEavak6gPb6Z815d3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "03e5b11a-bd35-3959-9b83-dd116b28f5b5",
"name": "autem voluptatem",
"slug": null,
"description": "Beatae magni quia iure quos porro omnis. Quisquam iusto quam consequatur deserunt. Aut est excepturi sed dolores placeat temporibus rerum.",
"abbreviation": null,
"created_at": null,
"updated_at": null
},
{
"id": "a9e3e7ab-ff6e-3b6e-af05-3d4903722ae2",
"name": "ut et",
"slug": null,
"description": "Enim illum numquam ex velit ut maxime. Voluptatem est occaecati quas sed corporis. Maxime commodi ut laudantium eius blanditiis aut.",
"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 e6a3hVZg5d1bPacfD68vE4k" \
--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 e6a3hVZg5d1bPacfD68vE4k",
"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/7" \
--header "Authorization: Bearer hb64kfPEDv3daeV86g5ac1Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/7"
);
const headers = {
"Authorization": "Bearer hb64kfPEDv3daeV86g5ac1Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "b654b406-e7b8-3ef8-8d1a-faf39c094cee",
"name": "occaecati vitae",
"slug": null,
"description": "Alias ea rem culpa accusamus vel voluptas accusantium ipsum. Veniam doloremque corrupti aut neque ipsa voluptas cupiditate. Qui ipsum voluptatum non ut vel esse. Sit ea accusantium nisi quaerat.",
"abbreviation": 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 sector
requires authentication sector update
Update a sector
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/sectors/12" \
--header "Authorization: Bearer vV136kf68ag4hZcEDPd5abe" \
--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/12"
);
const headers = {
"Authorization": "Bearer vV136kf68ag4hZcEDPd5abe",
"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/4" \
--header "Authorization: Bearer 6hE6aPZve4cg8bdD1aV35fk" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/4"
);
const headers = {
"Authorization": "Bearer 6hE6aPZve4cg8bdD1aV35fk",
"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 Z5fhcba16vgVDdEka843e6P" \
--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 Z5fhcba16vgVDdEka843e6P",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "96c1b16b-2297-3d28-b52f-bdecf17946c7",
"name": "Michaela Daugherty",
"username": "hill.kennedy",
"email": "kovacek.deon@example.net",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "85573ba0-1345-33dd-a811-dd777391a429",
"name": "Mrs. Rachael Dietrich",
"username": "ritchie.verlie",
"email": "cole.fannie@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 ka6bZEd8gP4a6Vhv5cDf3e1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"4154fb0d-e753-3afe-9e00-7156c34e751f\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/attach"
);
const headers = {
"Authorization": "Bearer ka6bZEd8gP4a6Vhv5cDf3e1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"4154fb0d-e753-3afe-9e00-7156c34e751f"
]
};
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 a4vbc1ea835fV6gd6kPEZDh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"73f667eb-d1a5-31ec-b243-637247f8ae7f\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/detach"
);
const headers = {
"Authorization": "Bearer a4vbc1ea835fV6gd6kPEZDh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"73f667eb-d1a5-31ec-b243-637247f8ae7f"
]
};
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 65g4da1Pa6EkfchbvV8DZ3e" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"57fbe1f2-bcef-337b-8078-b622c7301326\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/sync"
);
const headers = {
"Authorization": "Bearer 65g4da1Pa6EkfchbvV8DZ3e",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"57fbe1f2-bcef-337b-8078-b622c7301326"
]
};
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 vcg381a5f4ehkP6ZDV6bdEa" \
--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 vcg381a5f4ehkP6ZDV6bdEa",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"name": "aspernatur eos",
"slug": "dolorem-et-nam-quos-dolores-a-vitae"
},
{
"name": "quia laudantium",
"slug": "vel-itaque-distinctio-nemo-ut-et-nisi-deserunt-maxime"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 68kgcE3PdabZ56VvafhDe14" \
--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 68kgcE3PdabZ56VvafhDe14",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "14b5e79c-9baf-3d45-b227-c368018a91ab",
"slug": null,
"name": null,
"description": "Natan Cervantes Maia",
"abbreviation": "possimus",
"color": "#2177ec",
"text_color": "#dabc47",
"module": {
"name": "Solicitação de Produtos",
"slug": "product_request"
},
"created_at": null,
"updated_at": null
},
{
"id": "9610207d-c078-3b74-97ac-17c5b2d35fa4",
"slug": null,
"name": null,
"description": "Ana Cynthia Padrão",
"abbreviation": "ut",
"color": "#8e457f",
"text_color": "#8a45eb",
"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 345cVgvPb1keZdaEaDf668h" \
--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\": \"3c2d343e-d09a-3c5e-b10e-988e78d537d6\",
\"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 345cVgvPb1keZdaEaDf668h",
"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": "3c2d343e-d09a-3c5e-b10e-988e78d537d6",
"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 aP8dcDZf66hg5eE4kb3V1va" \
--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 aP8dcDZf66hg5eE4kb3V1va",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d5200c19-fffc-3580-8c4c-4fb1aa190c09",
"slug": null,
"name": null,
"description": "Cristiano Leo Tamoio Sobrinho",
"abbreviation": "earum",
"color": "#937759",
"text_color": "#185957",
"module": {
"name": "Obras",
"slug": "work"
},
"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 Ef8Zv31gbaa6e5VcDP6kd4h" \
--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\": \"3491d6a5-8a03-359e-bfe8-737e661bcac9\",
\"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 Ef8Zv31gbaa6e5VcDP6kd4h",
"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": "3491d6a5-8a03-359e-bfe8-737e661bcac9",
"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 PDa6d5h1f4kcE63avb8ZVeg" \
--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 PDa6d5h1f4kcE63avb8ZVeg",
"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 6hbVgf1da8E5P46aZDv3ekc" \
--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 6hbVgf1da8E5P46aZDv3ekc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "40c11f4b-7031-3e5a-a1c7-26ef9d591afa",
"quantity": 496.1538,
"min_quantity": null,
"max_quantity": null,
"below_minimum": false,
"above_maximum": false,
"created_at": null,
"updated_at": null
},
{
"id": "65622c35-7db8-3d97-8a5e-b77fa159ae44",
"quantity": 173.9023,
"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 PeVc86hEgab135a6fDk4vZd" \
--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 PeVc86hEgab135a6fDk4vZd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "dfaadc4c-ebc3-3656-84f4-dac664541c4e",
"name": "Estoque Maldonado e Mendonça e Associados",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
},
{
"id": "f4a973a4-6b8c-3443-a32b-32f795b24f41",
"name": "Estoque Delvalle-Meireles",
"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 hdafPb5veEZ6g3V84c1Dak6" \
--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 hdafPb5veEZ6g3V84c1Dak6",
"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": "0abd18fe-ca74-35ef-9bc6-2a70ef20ff61",
"name": "Estoque Meireles-Rangel",
"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 h6e8a3k5EDZdc6g4aVv1bPf" \
--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 h6e8a3k5EDZdc6g4aVv1bPf",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "f0491f30-e537-3833-9e3c-3d330e43249b",
"name": "Estoque Medina 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.
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 d345kgaD6eVf8vPEZa61bhc" \
--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 d345kgaD6eVf8vPEZa61bhc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "904d3e59-f50a-353a-baed-e6cd5dd303c1",
"name": "Estoque Soto 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 v6gdcZ8e36aa4PDkhf1bE5V" \
--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 v6gdcZ8e36aa4PDkhf1bE5V",
"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": "09ee1080-aa0a-3378-bc9f-4098760b64d0",
"name": "Estoque Carrara e Colaço",
"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 4abf3kec6vDdVa8EgZP561h" \
--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 4abf3kec6vDdVa8EgZP561h",
"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 8Z36c1ebDv5afdhV46gaPkE" \
--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 8Z36c1ebDv5afdhV46gaPkE",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "f003322f-f5d7-3cb6-afee-aaee0814cb1f",
"quantity": 302.4355,
"min_quantity": null,
"max_quantity": null,
"below_minimum": false,
"above_maximum": false,
"created_at": null,
"updated_at": null
},
{
"id": "6a404291-ae90-3f88-a2a1-a1b14279e522",
"quantity": 126.3623,
"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/excepturi" \
--header "Authorization: Bearer hVd8cbe6vg5a61kZPD3aE4f" \
--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/excepturi"
);
const headers = {
"Authorization": "Bearer hVd8cbe6vg5a61kZPD3aE4f",
"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": "10847027-443a-3aa6-b7a6-1983ac5f6fb4",
"quantity": 261.512,
"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 f5V3vgDP6hkaaZ1b4de8cE6" \
--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 f5V3vgDP6hkaaZ1b4de8cE6",
"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 P1eha6vkc6Df3bEV548Zadg" \
--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 P1eha6vkc6Df3bEV548Zadg",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "9dda0753-9981-394d-8363-77a6c17edd6e",
"code": "MOV-509853",
"type": "saída transferência",
"type_name": "TRANSFER_OUT",
"is_entry": false,
"is_exit": true,
"quantity": 4.9254,
"previous_quantity": 7.4816,
"new_quantity": 2.5562,
"reason": "Voluptatem iure modi eveniet quibusdam magnam vel officiis unde.",
"movement_date": "2026-11-10T22:54:35.000000Z",
"created_at": null
},
{
"id": "9b334afc-3f7e-3a97-be73-e88593ae0478",
"code": "MOV-376054",
"type": "vencido",
"type_name": "EXPIRED",
"is_entry": false,
"is_exit": true,
"quantity": 79.9761,
"previous_quantity": 346.2277,
"new_quantity": 266.2516,
"reason": null,
"movement_date": "2026-11-11T07:20:22.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 Pbg5h36Zced6D1aV4Evk8fa" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"21cbc07c-0074-3d53-bece-3dcffa4efefd\",
\"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 Pbg5h36Zced6D1aV4Evk8fa",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "21cbc07c-0074-3d53-bece-3dcffa4efefd",
"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": "6a3b008d-f7e0-32cf-8d4e-6a8267240bc8",
"code": "MOV-125190",
"type": "vencido",
"type_name": "EXPIRED",
"is_entry": false,
"is_exit": true,
"quantity": 17.6861,
"previous_quantity": 416.0152,
"new_quantity": 398.3291,
"reason": null,
"movement_date": "2026-11-02T17:04:19.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 a4cehfD85v63ZbEPgV16adk" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"dd666593-1bf3-3314-9850-552e09a0733f\",
\"destination_stock_id\": \"891ad494-11ee-3571-85c0-a5aa542f9aaa\",
\"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 a4cehfD85v63ZbEPgV16adk",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "dd666593-1bf3-3314-9850-552e09a0733f",
"destination_stock_id": "891ad494-11ee-3571-85c0-a5aa542f9aaa",
"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": "c62402e0-5f4c-3637-a6b1-c45d86df5b7d",
"code": "MOV-166299",
"type": "perda",
"type_name": "LOSS",
"is_entry": false,
"is_exit": true,
"quantity": 38.5916,
"previous_quantity": 241.3567,
"new_quantity": 202.7651,
"reason": "Laudantium placeat explicabo facere non.",
"movement_date": "2026-10-24T20:37:22.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 ZDfvPa168edbkch4Vg6a53E" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"7f2beb16-1364-3802-9909-94d480dfde0d\",
\"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 ZDfvPa168edbkch4Vg6a53E",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "7f2beb16-1364-3802-9909-94d480dfde0d",
"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": "f035b972-87a2-38b7-b78d-9dd748189464",
"code": "MOV-729938",
"type": "perda",
"type_name": "LOSS",
"is_entry": false,
"is_exit": true,
"quantity": 77.6015,
"previous_quantity": 492.715,
"new_quantity": 415.1135,
"reason": null,
"movement_date": "2026-11-09T07:56:22.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 beZDdv5gaVakPfc16643E8h" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"d47de58b-3eef-39a9-8843-1f50bb0ba235\",
\"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 beZDdv5gaVakPfc16643E8h",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "d47de58b-3eef-39a9-8843-1f50bb0ba235",
"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": "8bc4e612-49a6-30a8-945b-ceae522e58ee",
"code": "MOV-082175",
"type": "venda",
"type_name": "SALE",
"is_entry": false,
"is_exit": true,
"quantity": 84.9341,
"previous_quantity": 330.8441,
"new_quantity": 245.91,
"reason": "Qui aliquid laudantium voluptatum recusandae praesentium.",
"movement_date": "2026-11-14T22:55:42.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 ved5E8fahZ1Dcka6P34bgV6" \
--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 ved5E8fahZ1Dcka6P34bgV6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "6ecd9551-28c8-3f3c-9647-2e80a014bd0f",
"code": "MOV-665144",
"type": "entrada transferência",
"type_name": "TRANSFER_IN",
"is_entry": true,
"is_exit": false,
"quantity": 85.3573,
"previous_quantity": 24.7996,
"new_quantity": 110.1569,
"reason": "Sint ut quod autem est cumque velit consectetur.",
"movement_date": "2026-10-28T10:58:16.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 Vghe4Paf6da6kcD35Z1b8vE" \
--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 Vghe4Paf6da6kcD35Z1b8vE",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "1798bee2-e4b5-3af1-aba9-4aacd4fd9e4d",
"name": "Dr. Sarah Pacheco Galhardo",
"email": "simon70@example.org",
"phone": "(74) 90642-6293",
"document": "50.051.430/0001-00",
"type": "pf",
"responsible": "Cristóvão Faria Carvalho",
"image": {
"id": null,
"url": null
},
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
}
},
{
"id": "d7386e73-9470-3200-85b7-3fc06d57802b",
"name": "Sra. Patrícia Noa Rocha Jr.",
"email": "campos.rebeca@example.net",
"phone": "(67) 95582-6954",
"document": "89.125.746/0001-35",
"type": "pj",
"responsible": "Suellen Verdara",
"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 bVD166cEZPdh43e5vkaf8ga" \
--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 bVD166cEZPdh43e5vkaf8ga",
"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 vhdae8f66g1VaEZP45Dkc3b" \
--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 vhdae8f66g1VaEZP45Dkc3b",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "fa4978a0-35e4-3fc1-aa40-5897ca74accf",
"name": "Dr. Maurício Ramires Matias",
"email": "branco.daniele@example.com",
"phone": "(13) 2094-6237",
"document": "58.584.421/0001-97",
"type": "pf",
"responsible": "Sr. Tomás Toledo",
"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 aPd6DhaVfbe14k68gE3vcZ5" \
--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 aPd6DhaVfbe14k68gE3vcZ5",
"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 PheE8kaV46vgbZ5fDd1a36c" \
--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 PheE8kaV46vgbZ5fDd1a36c",
"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 supplier bank accounts
requires authentication suppliers show
Contas e chaves PIX do fornecedor, com a favorita primeiro.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/suppliers/1/bank-account" \
--header "Authorization: Bearer 8a5E6PZf436h1edDgkvcabV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/suppliers/1/bank-account"
);
const headers = {
"Authorization": "Bearer 8a5E6PZf436h1edDgkvcabV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "a345c14f-f77a-4573-8776-94f164b3d722",
"bank": null,
"agency": null,
"account": null,
"account_type": null,
"pix_key": "mary78@zboncak.com",
"favorite": false
},
{
"id": "a345c14f-fa3f-4474-bf0c-5d7b96def401",
"bank": null,
"agency": null,
"account": null,
"account_type": null,
"pix_key": "brianne.rice@hotmail.com",
"favorite": 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.
Add supplier bank account
requires authentication suppliers update
Agência e conta são opcionais: o prestador costuma ter só a chave PIX. Marcar como favorita desmarca as outras.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/suppliers/1/bank-account" \
--header "Authorization: Bearer 8cZ1beVE5ka66vf3PahdD4g" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_id\": \"732ef946-57db-323a-b02f-fb994250ac49\",
\"agency\": \"xaalgafyyqtgo\",
\"account\": \"htmq\",
\"account_type\": \"wevkcaijsra\",
\"pix_key\": \"thywbykgvayztrfporibg\",
\"favorite\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/suppliers/1/bank-account"
);
const headers = {
"Authorization": "Bearer 8cZ1beVE5ka66vf3PahdD4g",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_id": "732ef946-57db-323a-b02f-fb994250ac49",
"agency": "xaalgafyyqtgo",
"account": "htmq",
"account_type": "wevkcaijsra",
"pix_key": "thywbykgvayztrfporibg",
"favorite": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "a345c150-0144-4975-9388-fc6e909b6c7f",
"bank": null,
"agency": null,
"account": null,
"account_type": null,
"pix_key": "branson55@yahoo.com",
"favorite": 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.
Update supplier bank account
requires authentication suppliers update
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/suppliers/1/bank-account/magnam" \
--header "Authorization: Bearer 143gdDPEa66ah8fcekV5vbZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_id\": \"d95cc89f-1e7b-3637-808b-eaae93f6d29b\",
\"agency\": \"jgdxpcortxdujuknitjf\",
\"account\": \"few\",
\"account_type\": \"tqxvtasylextndbaz\",
\"pix_key\": \"xwa\",
\"favorite\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/suppliers/1/bank-account/magnam"
);
const headers = {
"Authorization": "Bearer 143gdDPEa66ah8fcekV5vbZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_id": "d95cc89f-1e7b-3637-808b-eaae93f6d29b",
"agency": "jgdxpcortxdujuknitjf",
"account": "few",
"account_type": "tqxvtasylextndbaz",
"pix_key": "xwa",
"favorite": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a345c150-08e4-4071-b45d-60714fb8e2bd",
"bank": null,
"agency": null,
"account": null,
"account_type": null,
"pix_key": "clowe@hotmail.com",
"favorite": 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.
Delete supplier bank account
requires authentication suppliers update
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/suppliers/beatae/bank-account/aut" \
--header "Authorization: Bearer 4aabfc3e16gZPDVdhEv658k" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/suppliers/beatae/bank-account/aut"
);
const headers = {
"Authorization": "Bearer 4aabfc3e16gZPDVdhEv658k",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Conta removida 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.
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 hv8gEbPDak6c45f6ea13dZV" \
--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 hv8gEbPDak6c45f6ea13dZV",
"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 dV3kv61Pface6Z5D8abEhg4" \
--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 dV3kv61Pface6Z5D8abEhg4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "2d7b2266-40df-3fa8-9214-92fc01a0a1a6",
"name": "Maitê Rezende Jr.",
"description": "Fuga dolorem et et tenetur facilis quam quisquam. Eveniet et asperiores dolor dicta ea sint. Aut velit tempore assumenda quas eum.",
"type": "saída"
},
{
"id": "e64bb10a-b284-384e-8b93-30f0ef24ac85",
"name": "Sr. Gilberto Queirós",
"description": "Quo et qui occaecati rerum et. Tempore enim et deleniti ullam. Vel impedit ducimus odio et et sit.",
"type": "depósito"
}
],
"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/omnis" \
--header "Authorization: Bearer 84a6bZk1PeDvcEdV36ah5fg" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/transaction-categories/omnis"
);
const headers = {
"Authorization": "Bearer 84a6bZk1PeDvcEdV36ah5fg",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "c9f3e4d3-9263-316d-9500-74b78b212cf3",
"name": "Andressa Delvalle Filho",
"description": "Quia id sit porro quia distinctio. Fugit quia dicta qui eligendi. Doloribus aspernatur aut unde ab sint in nesciunt. Cupiditate quas aut dicta eveniet excepturi et.",
"type": "tarifa"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 aDh15Pbvcfg834VkaE6e6dZ" \
--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 aDh15Pbvcfg834VkaE6e6dZ",
"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/quidem" \
--header "Authorization: Bearer 8VaE5Dg63ecdh1fb4kv6PaZ" \
--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/quidem"
);
const headers = {
"Authorization": "Bearer 8VaE5Dg63ecdh1fb4kv6PaZ",
"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/quia" \
--header "Authorization: Bearer 5ckv3gha6eDfdVEP6ba8Z14" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/transaction-categories/quia"
);
const headers = {
"Authorization": "Bearer 5ckv3gha6eDfdVEP6ba8Z14",
"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 g5cehEP16Zf63daak4DVbv8" \
--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 g5cehEP16Zf63daak4DVbv8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "767f0f66-734d-3390-917a-5c123cebf7b2",
"name": "Voluptatem explicabo",
"slug": "voluptatem-explicabo-172830",
"description": "Nihil quo numquam aspernatur impedit.",
"icon": null,
"color": null,
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
},
{
"id": "2e2a2d9d-fe28-3455-8df7-cd6ace3c5cf7",
"name": "Velit suscipit",
"slug": "velit-suscipit-520117",
"description": "Ut rerum magnam molestiae et.",
"icon": null,
"color": null,
"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 6641fkDheE83Zabgvac5PVd" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"slug\": \"Example Slug\",
\"description\": \"Example Description\",
\"icon\": \"Example Icon\",
\"color\": \"Example Color\",
\"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 6641fkDheE83Zabgvac5PVd",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"slug": "Example Slug",
"description": "Example Description",
"icon": "Example Icon",
"color": "Example Color",
"sort_order": 1,
"is_active": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "6220a9ad-6bc1-3ac7-93a9-67c4da2b99ec",
"name": "Rerum id",
"slug": "rerum-id-799968",
"description": "Dolor dolorem dolores eveniet iusto natus ut enim.",
"icon": null,
"color": null,
"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 P8vDZVcbd645a36f1Ehkgea" \
--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 P8vDZVcbd645a36f1Ehkgea",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "12b5026a-e2f9-30dc-a573-bdb39c2d85e5",
"name": "Accusantium qui",
"slug": "accusantium-qui-208613",
"description": "Sed sunt sapiente laborum delectus ipsa animi.",
"icon": null,
"color": null,
"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 P5fZDV6e83gkcbd1aavh64E" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"slug\": \"Example Slug\",
\"description\": \"Example Description\",
\"icon\": \"Example Icon\",
\"color\": \"Example Color\",
\"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 P5fZDV6e83gkcbd1aavh64E",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"slug": "Example Slug",
"description": "Example Description",
"icon": "Example Icon",
"color": "Example Color",
"sort_order": 1,
"is_active": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "4766f774-9be1-38bb-8c85-67ae96f15002",
"name": "Quas corporis",
"slug": "quas-corporis-110514",
"description": "Aut sed possimus id temporibus sequi similique.",
"icon": null,
"color": null,
"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 318aPeg46ZVfEDhdbac6k5v" \
--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 318aPeg46ZVfEDhdbac6k5v",
"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[]=51ae01d8-2457-3e52-96a2-05f5676e22a7&status=published" \
--header "Authorization: Bearer 5aaP16k4ZgfEDvh68V3ebdc" \
--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[0]": "51ae01d8-2457-3e52-96a2-05f5676e22a7",
"status": "published",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 5aaP16k4ZgfEDvh68V3ebdc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "e0d3dad4-42df-3132-8cc9-b65a79c0ce7f",
"title": "Quas dolorum aut modi",
"description": "Facilis ea consequatur natus ex non.",
"cover_url": null,
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a345c150-42f7-4d28-b52e-9a492bb1a1cd",
"name": "Soluta placeat",
"slug": "soluta-placeat-52441",
"icon": null,
"color": null
},
"created_at": null,
"updated_at": null
},
{
"id": "8dcfa49f-af96-33b9-8ca9-7e89dad0cee2",
"title": "Labore sed ullam porro",
"description": "Incidunt voluptatem pariatur incidunt.",
"cover_url": null,
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a345c150-45e6-4c7f-8099-a1a5fa648c2d",
"name": "Nam vitae",
"slug": "nam-vitae-95660",
"icon": null,
"color": 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.
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 kaDZgb468Pe1Vhd3a6cfvE5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"module_id\": \"9b19a019-dde6-3433-a0ac-08790c4ccaa7\",
\"title\": \"Example Title\",
\"description\": \"Example Description\",
\"cover_path\": \"Example Cover path\",
\"sort_order\": 1,
\"sectors\": [
\"43a1b594-8a01-3369-a1f7-7faec4fdff83\"
],
\"permissions\": [
\"d681959c-e488-3811-8b37-f3199c4db72a\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials"
);
const headers = {
"Authorization": "Bearer kaDZgb468Pe1Vhd3a6cfvE5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"module_id": "9b19a019-dde6-3433-a0ac-08790c4ccaa7",
"title": "Example Title",
"description": "Example Description",
"cover_path": "Example Cover path",
"sort_order": 1,
"sectors": [
"43a1b594-8a01-3369-a1f7-7faec4fdff83"
],
"permissions": [
"d681959c-e488-3811-8b37-f3199c4db72a"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "37817c4e-09f7-3e9b-b3c9-1eede404ff44",
"title": "Perspiciatis dicta fugiat blanditiis",
"description": "Laboriosam esse dicta tenetur minus qui veritatis omnis possimus.",
"cover_url": null,
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a345c150-4dc4-4698-92fd-82bccc6cd291",
"name": "Sit magni",
"slug": "sit-magni-935783",
"icon": null,
"color": 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.
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 d6vh5acb4fPk6aZDg1V8E3e" \
--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 d6vh5acb4fPk6aZDg1V8E3e",
"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 Va1EcP5akeZ34h86dfDg6vb" \
--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 Va1EcP5akeZ34h86dfDg6vb",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "538364f9-d2f9-365f-9d76-0c1bcb082465",
"title": "Aut non numquam adipisci",
"description": "Earum excepturi impedit laborum iste.",
"cover_url": null,
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a345c150-5521-44ea-b72a-1c4a8763c9f3",
"name": "Accusamus esse",
"slug": "accusamus-esse-318854",
"icon": null,
"color": 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.
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 3vZdVf66bkgch4DP8eE5a1a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"module_id\": \"73e524df-b8ed-3525-97e7-36d475f9a109\",
\"title\": \"Example Title\",
\"description\": \"Example Description\",
\"cover_path\": \"Example Cover path\",
\"sort_order\": 1,
\"sectors\": [
\"20eba93a-03ca-3437-b366-43455087cca5\"
],
\"permissions\": [
\"965ea159-b66d-3dc8-93ca-b06ee410f6dd\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1"
);
const headers = {
"Authorization": "Bearer 3vZdVf66bkgch4DP8eE5a1a",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"module_id": "73e524df-b8ed-3525-97e7-36d475f9a109",
"title": "Example Title",
"description": "Example Description",
"cover_path": "Example Cover path",
"sort_order": 1,
"sectors": [
"20eba93a-03ca-3437-b366-43455087cca5"
],
"permissions": [
"965ea159-b66d-3dc8-93ca-b06ee410f6dd"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "baa1ddbe-fd95-3e30-933f-c7f2effc3dfb",
"title": "Ea et illo nam",
"description": "Consectetur nostrum nihil aliquam fugiat ea.",
"cover_url": null,
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a345c150-5d56-4914-9592-5724842d7c49",
"name": "Dignissimos voluptatem",
"slug": "dignissimos-voluptatem-233192",
"icon": null,
"color": 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.
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 1bVa35aDEhZgd8Pek6f6v4c" \
--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 1bVa35aDEhZgd8Pek6f6v4c",
"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 Dcfh1ae3v48d56a6ZbkVgPE" \
--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 Dcfh1ae3v48d56a6ZbkVgPE",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "ebc18348-0535-3e95-913a-fb4308758fb4",
"title": "Ut maiores atque fuga",
"description": "Est ut numquam sunt.",
"cover_url": null,
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a345c150-654e-40a4-9288-4475a5a998f7",
"name": "Modi tempore",
"slug": "modi-tempore-224862",
"icon": null,
"color": 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.
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 d6Vv3geb1acfEhP58D6aZk4" \
--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 d6Vv3geb1acfEhP58D6aZk4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d1333bef-3571-36fe-b1bd-d788a683a7cc",
"title": "Fugiat non quasi atque",
"description": "Fugiat dolores qui rerum qui.",
"cover_url": null,
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a345c150-6a85-417a-91e6-e1df327c74ce",
"name": "Quaerat ipsam",
"slug": "quaerat-ipsam-214242",
"icon": null,
"color": 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.
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 haE6bD5e13Zk8fcd4gVPv6a" \
--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 haE6bD5e13Zk8fcd4gVPv6a",
"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": "252286c3-41f5-3e07-b9ad-77d334b4871d",
"type": "pdf",
"title": "Et enim vero",
"mime_type": "application/pdf",
"size_bytes": 3493399,
"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 Phkada6f6ED5cveV341g8bZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"f05045aa-5408-337a-b1de-54b9dd4508b2\"
]
}"
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 Phkada6f6ED5cveV341g8bZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"f05045aa-5408-337a-b1de-54b9dd4508b2"
]
};
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 b3a4gZv1Dk86chEda65eVPf" \
--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 b3a4gZv1Dk86chEda65eVPf",
"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": "c5da5650-54ef-3725-b810-a42973005e0a",
"type": "pdf",
"title": "Aperiam eaque libero",
"mime_type": "application/pdf",
"size_bytes": 1289685,
"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 Dvg86514PEaVabfckd6h3Ze" \
--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 Dvg86514PEaVabfckd6h3Ze",
"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 hv8ba4c6E6VZae15P3Dkgdf" \
--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 hv8ba4c6E6VZae15P3Dkgdf",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "09f6ddad-637b-315f-b989-2c64ade03f5b",
"name": "Elias Serrano",
"abbreviation": "Dr. Ricardo Roque Brito",
"description": "Ut voluptatem rem cum eos et.",
"created_at": null,
"updated_at": null
},
{
"id": "87c14527-8e08-3086-b9cc-27e26d3489e9",
"name": "Sr. Martinho Delatorre Valdez",
"abbreviation": "Dr. Jorge Cristóvão Cruz",
"description": "Numquam qui reiciendis 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.
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 1daZ6e38cgvfkh5PE64aVDb" \
--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 1daZ6e38cgvfkh5PE64aVDb",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "8d07d02e-5404-353f-84e2-39ce9e2a14e9",
"name": "Gabrielly Uchoa Verdara",
"abbreviation": "Sra. Patrícia Grego Filho",
"description": "Ab sunt officia alias.",
"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 1d6gfVPa4bcDh8E5kae63Zv" \
--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 1d6gfVPa4bcDh8E5kae63Zv",
"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 gd136aeZvchV4Efa6kDbP58" \
--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 gd136aeZvchV4Efa6kDbP58",
"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/sint" \
--header "Authorization: Bearer 1g8e6a6bZc5fVa43DhvPEdk" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/units/sint"
);
const headers = {
"Authorization": "Bearer 1g8e6a6bZc5fVa43DhvPEdk",
"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 d3a8EPhb5gf64cvaZkVD61e" \
--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 d3a8EPhb5gf64cvaZkVD61e",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "9d674118-e05e-3f7c-9988-3718a5cb5085",
"name": "Mrs. Marjory Ernser DVM",
"username": "clifton.streich",
"email": "erenner@example.net",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "519a7c8b-217a-38c3-ac0e-bbb1e876049a",
"name": "Dayna Glover Jr.",
"username": "jerry39",
"email": "fortiz@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 cV6av51ahbPe3EZkdgD4f68" \
--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 cV6av51ahbPe3EZkdgD4f68",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "090745d1-9371-3c12-828b-4d77e33628cd",
"name": "Stefanie Schneider",
"username": "tess.cassin",
"email": "nels13@example.net",
"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 6Z6EVava8D13gfedbPc45hk" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"chilpert\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"3877364d-9337-39b0-89da-075c9dcf74c6\"
],
\"roles\": [
\"36a0e672-22c1-3ed4-b9d8-38cbf7153290\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users"
);
const headers = {
"Authorization": "Bearer 6Z6EVava8D13gfedbPc45hk",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "chilpert",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"3877364d-9337-39b0-89da-075c9dcf74c6"
],
"roles": [
"36a0e672-22c1-3ed4-b9d8-38cbf7153290"
]
};
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 vE6g5ebZ3P61adckVf4a8hD" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"kuhic.coleman\",
\"password\": \"password123\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"11fcd391-91e7-338e-b107-076f72c09225\"
],
\"roles\": [
\"c6b3ad30-828c-3fc9-983b-7683167a75e1\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users/1"
);
const headers = {
"Authorization": "Bearer vE6g5ebZ3P61adckVf4a8hD",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "kuhic.coleman",
"password": "password123",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"11fcd391-91e7-338e-b107-076f72c09225"
],
"roles": [
"c6b3ad30-828c-3fc9-983b-7683167a75e1"
]
};
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 8EahDkgbd5fVeZ66P43vca1" \
--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 8EahDkgbd5fVeZ66P43vca1",
"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 fbcdgavk3aV1D5PeEh68Z64" \
--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 fbcdgavk3aV1D5PeEh68Z64",
"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 5Z368PeD6havfgbdka14EVc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"0c87fcf6-7d42-3f0d-8c5e-9bfaf52c2523\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users/1/permissions"
);
const headers = {
"Authorization": "Bearer 5Z368PeD6havfgbdka14EVc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"0c87fcf6-7d42-3f0d-8c5e-9bfaf52c2523"
]
};
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 Eb4c8aZ6kfeV5P1ahgDd36v" \
--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 Eb4c8aZ6kfeV5P1ahgDd36v",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "perferendis",
"display_name": "Alias labore exercitationem quis molestias sed."
},
{
"id": null,
"name": "placeat",
"display_name": "Laborum perferendis eum aperiam aut."
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 vePg1685fV3kdaZaE6cDh4b" \
--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 vePg1685fV3kdaZaE6cDh4b",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "e4177e5c-af83-3d2c-881f-158ee009ec6a",
"description": "Reinaldo Pontes",
"work": {
"id": null,
"name": null
},
"documents": [],
"created_at": null,
"updated_at": null
},
{
"id": "2a26d158-9f3c-3a79-a85e-cc8416e00933",
"description": "Sr. Natal Cruz Aguiar",
"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 VEfeg4D6kvhcba63Z1a5Pd8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"description\": \"Example Description\",
\"work_id\": \"717981ae-fc3f-3fce-85e1-6e570780a4f7\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/work-locations"
);
const headers = {
"Authorization": "Bearer VEfeg4D6kvhcba63Z1a5Pd8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"description": "Example Description",
"work_id": "717981ae-fc3f-3fce-85e1-6e570780a4f7"
};
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 vhZkbg54eaaED6f6c3VPd81" \
--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 vhZkbg54eaaED6f6c3VPd81",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "56415b89-0692-3c7c-8259-e0473c195729",
"description": "Sr. Anderson Dominato Madeira",
"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 cea865hfV43kgdPE1bZaD6v" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"description\": \"Example Description\",
\"work_id\": \"b887d747-83b1-3a34-8e97-ee598a127704\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/work-locations/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer cea865hfV43kgdPE1bZaD6v",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"description": "Example Description",
"work_id": "b887d747-83b1-3a34-8e97-ee598a127704"
};
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 k8d65eh1VavgcbDP4ZEaf63" \
--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 k8d65eh1VavgcbDP4ZEaf63",
"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 k6ghEV1P345c6vebadDa8fZ" \
--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 k6ghEV1P345c6vebadDa8fZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "c65251c5-ea0c-33fb-94aa-30b31a59e00d",
"name": "Betina Ketlin Ortega",
"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": "2024-03-19 09:26:49.000000",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"created_at": null,
"updated_at": null
},
{
"id": "6923ae09-4c05-3cc6-bce8-da1652bf6e2e",
"name": "Marco Carmona",
"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": "2025-10-24 03:19:58.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 1d3ZE65V6fgahkvPD8bae4c" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"customer_id\": \"011e2035-5336-36cc-a9eb-46aa2562128f\",
\"status_id\": \"97b36b63-56a1-31a1-ad27-0e20c20bc9e5\",
\"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 1d3ZE65V6fgahkvPD8bae4c",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"customer_id": "011e2035-5336-36cc-a9eb-46aa2562128f",
"status_id": "97b36b63-56a1-31a1-ad27-0e20c20bc9e5",
"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 ZDh65fdc8vaV1aPe6b34Egk" \
--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 ZDh65fdc8vaV1aPe6b34Egk",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "e674a87d-740d-34dc-af45-d7309e6c752b",
"name": "Sra. Maya Marés",
"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": "1985-06-03 16:44:03.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 P614b5dcZae3afkEVgv6Dh8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"customer_id\": \"c2c26fd5-cfb7-34c0-88fe-21a3ba9c4883\",
\"status_id\": \"a93f3ee7-b6b7-38ba-83f4-0937abd74d55\",
\"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 P614b5dcZae3afkEVgv6Dh8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"customer_id": "c2c26fd5-cfb7-34c0-88fe-21a3ba9c4883",
"status_id": "a93f3ee7-b6b7-38ba-83f4-0937abd74d55",
"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 Z66gE3cVb14hedaPf5kv8Da" \
--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 Z66gE3cVb14hedaPf5kv8Da",
"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 6f6baEvc8ahk3eZgd4DPV15" \
--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 6f6baEvc8ahk3eZgd4DPV15",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "ffdeaaad-20ad-363c-b042-6d853923733f",
"name": "Prof. Jamison Lueilwitz DVM",
"username": "burnice.skiles",
"email": "jasen35@example.org",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "cd70960c-5379-3ab7-b26c-47f97713ea9b",
"name": "Margarette Greenholt",
"username": "owolf",
"email": "noemie41@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.
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 ck56ehgva4bP68dZEf31VDa" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"308cbbb5-7b56-3e27-9ef3-d817853e6967\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach"
);
const headers = {
"Authorization": "Bearer ck56ehgva4bP68dZEf31VDa",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"308cbbb5-7b56-3e27-9ef3-d817853e6967"
]
};
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 a4kD8gd3hvc651EeVa6ZPbf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"b283fd11-0984-3d2c-8ab3-c6147ef551e7\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/detach"
);
const headers = {
"Authorization": "Bearer a4kD8gd3hvc651EeVa6ZPbf",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"b283fd11-0984-3d2c-8ab3-c6147ef551e7"
]
};
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 cgv6dZa6fheE13bPk4aV58D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"ac3b4657-7f2c-3768-8cf5-dd7b00921d00\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/sync"
);
const headers = {
"Authorization": "Bearer cgv6dZa6fheE13bPk4aV58D",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"ac3b4657-7f2c-3768-8cf5-dd7b00921d00"
]
};
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.