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 DhEd865c3V6ekg14vaPbafZ" \
--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 DhEd865c3V6ekg14vaPbafZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "b348aa7a-7768-37e7-95ea-a16e1757f04e",
"name": "culpa-6aea7229b641c",
"display_name": "Sed quia aut nisi dolorum quo est beatae tempora.",
"permissions_count": null
},
{
"id": "437fb7e3-7df9-344f-afef-ae06cd48ba85",
"name": "cum-6aea7229ba3fd",
"display_name": "Ipsum fuga id dolores delectus voluptatem quo et.",
"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 fa5a1b4cVdh86gE6e3ZvkDP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"display_name\": \"Example Name\",
\"permissions\": [
\"91d9f4c9-6fca-3950-a83b-0a166ebfb75b\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/roles"
);
const headers = {
"Authorization": "Bearer fa5a1b4cVdh86gE6e3ZvkDP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"display_name": "Example Name",
"permissions": [
"91d9f4c9-6fca-3950-a83b-0a166ebfb75b"
]
};
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 Dv3h4PdE1gkae8b6VfaZc65" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"display_name\": \"Example Name\",
\"permissions\": [
\"147e063a-8e7a-309f-aaf1-ae924c3da284\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/roles/1"
);
const headers = {
"Authorization": "Bearer Dv3h4PdE1gkae8b6VfaZc65",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"display_name": "Example Name",
"permissions": [
"147e063a-8e7a-309f-aaf1-ae924c3da284"
]
};
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 1agdVDh56kb8Ze634vPcEaf" \
--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 1agdVDh56kb8Ze634vPcEaf",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d5e70720-e188-325f-bfae-9d83e5a87ea4",
"name": "qui-6aea7229c9759",
"display_name": "Quia qui sequi natus unde.",
"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 615ck6EgahdfDvV4abZP3e8" \
--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 615ck6EgahdfDvV4abZP3e8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "praesentium",
"display_name": "Inventore temporibus consequatur aut et sequi sunt dolore."
},
{
"id": null,
"name": "eum",
"display_name": "Rerum et et quo odio."
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 aakD16V8hZvf54E3ePgc6bd" \
--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 aakD16V8hZvf54E3ePgc6bd",
"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 D631h5Pka6eabZcV84vEfdg" \
--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 D631h5Pka6eabZcV84vEfdg",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "ut",
"display_name": "Non qui laudantium quod rerum quisquam expedita harum nesciunt."
},
{
"id": null,
"name": "minus",
"display_name": "Rerum et praesentium explicabo recusandae et."
}
],
"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 6Ddcakh4658Zf3v1ageEPVb" \
--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 6Ddcakh4658Zf3v1ageEPVb",
"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 15PDa6ah3kEcVbZ4dev6fg8" \
--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 15PDa6ah3kEcVbZ4dev6fg8",
"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 vabV5fdeDhZc1PE3kg6846a" \
--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 vabV5fdeDhZc1PE3kg6846a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": null,
"name": "voluptatibus",
"display_name": "Repellendus ex quasi dolore molestiae corporis esse."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 kcZ3hdgVP5E8ab6e4v16faD" \
--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 kcZ3hdgVP5E8ab6e4v16faD",
"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 aP6EeZch5kbgvfd146VD8a3" \
--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 aP6EeZch5kbgvfd146VD8a3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "9d1b2fda-7fee-3377-96b0-d9250e5366eb",
"code": null,
"type": "saída",
"payment_method": "cheque",
"amount": 2099.7,
"due_date": "2026-11-26T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Magnam veritatis excepturi fugiat eum aut explicabo dolorem facilis velit asperiores inventore quo natus.",
"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": "eius",
"field2": 72,
"field3": true,
"notes": "Illo impedit animi autem aperiam id.",
"created_at": null,
"updated_at": null
},
{
"id": "7157364a-6588-3b89-a7f8-b24b48e4c078",
"code": null,
"type": "entrada",
"payment_method": "cheque",
"amount": 9593.79,
"due_date": "2026-11-14T03: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": "Fuga et enim quisquam dolorum aut aut quam dolorem neque eum repudiandae eius.",
"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": "sint",
"field2": 79,
"field3": true,
"notes": "Ut harum suscipit voluptas 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.
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[]=nobis" \
--header "Authorization: Bearer a38cZv6V514Pegf6hkDdabE" \
--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]": "nobis",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer a38cZv6V514Pegf6hkDdabE",
"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 Vg5Edh83a6DaZb4veP1fkc6" \
--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 Vg5Edh83a6DaZb4veP1fkc6",
"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[]=nihil&suppliers[]=eum&works[]=magni&cost_centers[]=debitis&statuses[]=vencido&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-11-03T20%3A45%3A45&protest_date_end=2026-11-03T20%3A45%3A45&has_protest=1&has_children=1&is_recurring=1" \
--header "Authorization: Bearer Dv5VchP36kabEZa46dge81f" \
--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]": "nihil",
"suppliers[0]": "eum",
"works[0]": "magni",
"cost_centers[0]": "debitis",
"statuses[0]": "vencido",
"payment_method": "cheque",
"date_start": "2023-01-01",
"date_end": "2023-12-31",
"protest_date_start": "2026-11-03T20:45:45",
"protest_date_end": "2026-11-03T20:45:45",
"has_protest": "1",
"has_children": "1",
"is_recurring": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Dv5VchP36kabEZa46dge81f",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "554d3658-2c4b-37a4-899c-8dcd48c5a2a3",
"code": null,
"type": "entrada",
"payment_method": "cheque",
"amount": 8376.34,
"due_date": "2026-11-27T03: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 maiores et illo mollitia dolores iure et nesciunt.",
"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": "enim",
"field2": 35,
"field3": true,
"notes": "Sed deleniti fuga dolorem odio a.",
"created_at": null,
"updated_at": null
},
{
"id": "9d1d51ec-6961-38f9-b09d-ec9c7593b61e",
"code": null,
"type": "saída",
"payment_method": "boleto",
"amount": 1889.78,
"due_date": "2026-11-24T03: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": "Laudantium id possimus reprehenderit occaecati voluptatem minima est.",
"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": "eos",
"field2": 33,
"field3": true,
"notes": "Accusantium blanditiis magni ut enim.",
"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[]=id&suppliers[]=perspiciatis&works[]=molestiae&cost_centers[]=architecto&statuses[]=a+protestar&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-11-03T20%3A45%3A46&protest_date_end=2026-11-03T20%3A45%3A46&has_protest=&has_children=1&is_recurring=1" \
--header "Authorization: Bearer g685bEd361kDV4vfacaZPeh" \
--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]": "id",
"suppliers[0]": "perspiciatis",
"works[0]": "molestiae",
"cost_centers[0]": "architecto",
"statuses[0]": "a protestar",
"payment_method": "cheque",
"date_start": "2023-01-01",
"date_end": "2023-12-31",
"protest_date_start": "2026-11-03T20:45:46",
"protest_date_end": "2026-11-03T20:45:46",
"has_protest": "0",
"has_children": "1",
"is_recurring": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer g685bEd361kDV4vfacaZPeh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "e71826e7-cd37-32a8-8f9a-767ee3955f19",
"code": null,
"type": "saída",
"payment_method": "cheque",
"amount": 1607.4,
"due_date": "2026-11-11T03: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": "Doloribus neque quasi nemo dolore mollitia reprehenderit quaerat quis excepturi tempora iure sed accusantium.",
"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": "et",
"field2": 25,
"field3": true,
"notes": "Delectus omnis error rem voluptatem rerum.",
"created_at": null,
"updated_at": null
},
{
"id": "2331f4d0-1ea9-3863-b829-942c68f816b5",
"code": null,
"type": "saída",
"payment_method": "cheque",
"amount": 5805.16,
"due_date": "2026-11-11T03: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": "Numquam nostrum quas in ipsum quo id.",
"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": "accusantium",
"field2": 99,
"field3": true,
"notes": "Quis impedit perspiciatis quo dolorem sed.",
"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 ekE85bghZvd41f3ac6D6PaV" \
--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\": \"59404861-99ef-3ab5-9561-40df28f39c46\",
\"customer_id\": \"9e641ad1-16df-3137-8546-285cb1f90ca2\",
\"work_id\": \"c174bdec-5a59-307b-8aa3-929ed177a3fd\",
\"cost_center_id\": \"b80071e0-6e71-37dd-bbc4-6ab5b80d804f\",
\"status\": \"Example Status\",
\"protest_date\": \"2024-01-01\",
\"bank_account_id\": \"72e7ac4f-886f-3a0b-9cd5-0d371aabb493\",
\"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 ekE85bghZvd41f3ac6D6PaV",
"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": "59404861-99ef-3ab5-9561-40df28f39c46",
"customer_id": "9e641ad1-16df-3137-8546-285cb1f90ca2",
"work_id": "c174bdec-5a59-307b-8aa3-929ed177a3fd",
"cost_center_id": "b80071e0-6e71-37dd-bbc4-6ab5b80d804f",
"status": "Example Status",
"protest_date": "2024-01-01",
"bank_account_id": "72e7ac4f-886f-3a0b-9cd5-0d371aabb493",
"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 bcafEh4ePD6g813k56vZVad" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"fiscal_document_id\": \"qui\",
\"installment_ids\": [
\"libero\"
],
\"payment_method\": \"cartao\",
\"work_id\": \"dolores\",
\"cost_center_id\": \"cumque\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/import-nfe"
);
const headers = {
"Authorization": "Bearer bcafEh4ePD6g813k56vZVad",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"fiscal_document_id": "qui",
"installment_ids": [
"libero"
],
"payment_method": "cartao",
"work_id": "dolores",
"cost_center_id": "cumque"
};
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/aut/history" \
--header "Authorization: Bearer b61a4gEcaDekh38d5v6fVZP" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/aut/history"
);
const headers = {
"Authorization": "Bearer b61a4gEcaDekh38d5v6fVZP",
"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/quis" \
--header "Authorization: Bearer 1hkaEbgvadZP856f4Vec3D6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/quis"
);
const headers = {
"Authorization": "Bearer 1hkaEbgvadZP856f4Vec3D6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "9c6296a0-579f-38c4-a9d8-48554fedaabf",
"code": null,
"type": "saída",
"payment_method": "boleto",
"amount": 4641.58,
"due_date": "2026-11-24T03: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": "Quidem asperiores culpa voluptatem at est voluptatem molestiae error et sequi aspernatur delectus.",
"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": "sint",
"field2": 51,
"field3": true,
"notes": "Accusamus totam soluta esse 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.
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/eaque" \
--header "Authorization: Bearer 63146dcafheZPvka5EbVD8g" \
--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\": \"473f2cda-de70-3971-af3d-82a7e243cc3c\",
\"customer_id\": \"7398cd51-c315-3faa-be2b-4912c7168c89\",
\"work_id\": \"af499f70-a918-3458-be13-0bb4ec7049a4\",
\"cost_center_id\": \"ecb4ce09-577c-3950-9e29-132571e2bab3\",
\"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\": \"84905e63-058a-3e8e-a720-1375ba6ed315\",
\"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/eaque"
);
const headers = {
"Authorization": "Bearer 63146dcafheZPvka5EbVD8g",
"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": "473f2cda-de70-3971-af3d-82a7e243cc3c",
"customer_id": "7398cd51-c315-3faa-be2b-4912c7168c89",
"work_id": "af499f70-a918-3458-be13-0bb4ec7049a4",
"cost_center_id": "ecb4ce09-577c-3950-9e29-132571e2bab3",
"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": "84905e63-058a-3e8e-a720-1375ba6ed315",
"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/est" \
--header "Authorization: Bearer 5c3Vg1eDbhd46vaEak6fP8Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/est"
);
const headers = {
"Authorization": "Bearer 5c3Vg1eDbhd46vaEak6fP8Z",
"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\": \"kuphal.margot@example.com\",
\"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": "kuphal.margot@example.com",
"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 hebEfP8Vc6d14vak6Z5gD3a" \
--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 hebEfP8Vc6d14vak6Z5gD3a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "2900c97d-4991-3444-b4e2-54d02d4d2a50",
"name": "Orville Jakubowski I",
"username": "mhartmann",
"email": "christiansen.alfreda@example.org",
"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 aav1dEhk63DbV5Zce4Pfg86" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"eleanora.borer\",
\"password\": \"password123\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"ff4574f9-e863-3a1d-addf-1b4b13f918ce\"
],
\"roles\": [
\"a77845a8-04b6-3018-bc34-7d0707afb691\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/user"
);
const headers = {
"Authorization": "Bearer aav1dEhk63DbV5Zce4Pfg86",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "eleanora.borer",
"password": "password123",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"ff4574f9-e863-3a1d-addf-1b4b13f918ce"
],
"roles": [
"a77845a8-04b6-3018-bc34-7d0707afb691"
]
};
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 6b381vZ6cafgV4edkPDhaE5" \
--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 6b381vZ6cafgV4edkPDhaE5",
"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 akfeP6ZbE1DcVd3g86a54hv" \
--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 akfeP6ZbE1DcVd3g86a54hv",
"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 e6D83b4aZVdkhvg6EP1fc5a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"key\": \"lxbdnpfluahhznoabzbrk\",
\"value\": []
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/preferences"
);
const headers = {
"Authorization": "Bearer e6D83b4aZVdkhvg6EP1fc5a",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"key": "lxbdnpfluahhznoabzbrk",
"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/nemo" \
--header "Authorization: Bearer Za6V6bfDE85341dhPkegcav" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/preferences/nemo"
);
const headers = {
"Authorization": "Bearer Za6V6bfDE85341dhPkegcav",
"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 DaP3bkdg86av1Ve5f6ZcEh4" \
--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 DaP3bkdg86av1Ve5f6ZcEh4",
"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 egd8DP6k3h4Vabv5f6ZacE1" \
--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 egd8DP6k3h4Vabv5f6ZacE1",
"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/odio" \
--header "Authorization: Bearer cV3fPD8he1k56ZEvgaad46b" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/transfers/odio"
);
const headers = {
"Authorization": "Bearer cV3fPD8he1k56ZEvgaad46b",
"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/4/deposit" \
--header "Authorization: Bearer bZEVa86fD4kd6vh1gacP53e" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"amount\": 1,
\"description\": \"Example Description\",
\"transaction_date\": \"2024-01-01\",
\"transaction_category_id\": \"Example Transaction category id\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/4/deposit"
);
const headers = {
"Authorization": "Bearer bZEVa86fD4kd6vh1gacP53e",
"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/16/withdraw" \
--header "Authorization: Bearer VP1v83eka6dfD6cgb5ha4ZE" \
--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/16/withdraw"
);
const headers = {
"Authorization": "Bearer VP1v83eka6dfD6cgb5ha4ZE",
"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 Vv64adD3h8gPcEZ6ka15bfe" \
--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 Vv64adD3h8gPcEZ6ka15bfe",
"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 31fakgZc6D5h6E4PVedbv8a" \
--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 31fakgZc6D5h6E4PVedbv8a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "b0b20c8b-31cf-3089-aef1-827b78224522",
"agency": "0113",
"account": "9823387-7",
"type": "corrente",
"balance": 9502.17,
"holder_type": "pf",
"alias": "non",
"limit": 1760.26,
"available_balance": 11262.43,
"used_limit": 0,
"available_limit": 1760.26,
"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 31hcZgb6fdE6DaaPkvV84e5" \
--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 31hcZgb6fdE6DaaPkvV84e5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "342be1ee-58fb-3cf7-8bc2-daf36da8df27",
"agency": "9189",
"account": "7979971-1",
"type": "corrente",
"balance": 3836.66,
"holder_type": "pj",
"alias": "atque",
"limit": 2698.14,
"available_balance": 6534.799999999999,
"used_limit": 0,
"available_limit": 2698.14,
"is_default": null,
"default_payment_method": null,
"bank": {
"id": null,
"name": null,
"code": null
},
"created_at": null,
"updated_at": null
},
{
"id": "4ee6545b-56a0-3069-bfac-26d0c3e99edd",
"agency": "0876",
"account": "3697113-0",
"type": "caixa",
"balance": 7665.33,
"holder_type": "pj",
"alias": "soluta",
"limit": 6632.46,
"available_balance": 14297.79,
"used_limit": 0,
"available_limit": 6632.46,
"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 gad6fPkhabvc61354DVZ8Ee" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"agency\": \"Example Agency\",
\"account\": \"3768659-6\",
\"bank_id\": \"876f5f50-daec-339d-94e1-dc9578f69e22\",
\"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 gad6fPkhabvc61354DVZ8Ee",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"agency": "Example Agency",
"account": "3768659-6",
"bank_id": "876f5f50-daec-339d-94e1-dc9578f69e22",
"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/8" \
--header "Authorization: Bearer 8fV653e6d1ZPhEkDgvaab4c" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"agency\": \"Example Agency\",
\"account\": \"0002049-3\",
\"bank_id\": \"43601b2c-0151-3d67-883f-014ba07ad552\",
\"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/8"
);
const headers = {
"Authorization": "Bearer 8fV653e6d1ZPhEkDgvaab4c",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"agency": "Example Agency",
"account": "0002049-3",
"bank_id": "43601b2c-0151-3d67-883f-014ba07ad552",
"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/18" \
--header "Authorization: Bearer 1vakZaEbP8gh6546V3Dfdce" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/18"
);
const headers = {
"Authorization": "Bearer 1vakZaEbP8gh6546V3Dfdce",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a250ba19-6620-39bb-92cb-550bf07ba5c9",
"agency": "9775",
"account": "3224720-4",
"type": "poupança",
"balance": 1478.26,
"holder_type": "pf",
"alias": "aliquid",
"limit": 3424.05,
"available_balance": 4902.31,
"used_limit": 0,
"available_limit": 3424.05,
"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/11" \
--header "Authorization: Bearer V6ke54836fcagbhE1aZDvPd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/11"
);
const headers = {
"Authorization": "Bearer V6ke54836fcagbhE1aZDvPd",
"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/3/statements/summary" \
--header "Authorization: Bearer Z1d35kEbfP6eh6a8Dg4acvV" \
--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/3/statements/summary"
);
const headers = {
"Authorization": "Bearer Z1d35kEbfP6eh6a8Dg4acvV",
"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/8/statements" \
--header "Authorization: Bearer P1k4DaEcf3hab658eV6Zvdg" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"possimus\",
\"sort_desc\": true,
\"page\": 22,
\"per_page\": 11,
\"q\": \"ndajvgsrxsjbexlbkurf\",
\"type\": \"transferência\",
\"date_start\": \"2026-11-03T20:45:47\",
\"date_end\": \"2076-06-14\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/8/statements"
);
const headers = {
"Authorization": "Bearer P1k4DaEcf3hab658eV6Zvdg",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "possimus",
"sort_desc": true,
"page": 22,
"per_page": 11,
"q": "ndajvgsrxsjbexlbkurf",
"type": "transferência",
"date_start": "2026-11-03T20:45:47",
"date_end": "2076-06-14"
};
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/8/statements/id" \
--header "Authorization: Bearer e8d6PZDaf46cV5gbv3kE1ah" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/8/statements/id"
);
const headers = {
"Authorization": "Bearer e8d6PZDaf46cV5gbv3kE1ah",
"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 45k16ZDEPfgcV63aavh8bde" \
--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 45k16ZDEPfgcV63aavh8bde",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "8dc1a8ad-5267-3ff5-94f3-a9eef4e3349c",
"name": "Cervantes e Gomes",
"code": "924"
},
{
"id": "8d9f7081-37a4-30bb-bfcd-6ea60eff7635",
"name": "Molina e Filhos",
"code": "867"
}
],
"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 EaD35Vva18bPfcd6ge64Zkh" \
--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 EaD35Vva18bPfcd6ge64Zkh",
"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 fDEZba614hV5vakP6de83gc" \
--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 fDEZba614hV5vakP6de83gc",
"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 3DVeaZ6v6hadbg845kPc1Ef" \
--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 3DVeaZ6v6hadbg845kPc1Ef",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "fbb85704-a3fe-3ac0-8953-ed57092dac93",
"name": "Toledo Ltda.",
"code": "279"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 fhZcg584eadb1vkPEVa636D" \
--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 fhZcg584eadb1vkPEVa636D",
"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 6V3vcP61g4ZhbfkaeEa5d8D" \
--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 6V3vcP61g4ZhbfkaeEa5d8D",
"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=Earum+soluta+qui+voluptatem+sunt+provident+labore+molestias.&categories[]=beatae&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=ex&customers[]=facilis&suppliers[]=cum&works[]=minus&cost_centers[]=quibusdam" \
--header "Authorization: Bearer 6ba6kcfDh8ZEve1Pga3dV45" \
--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": "Earum soluta qui voluptatem sunt provident labore molestias.",
"categories[0]": "beatae",
"date_start": "2021-01-01",
"date_end": "2021-01-31",
"bank_accounts[0]": "ex",
"customers[0]": "facilis",
"suppliers[0]": "cum",
"works[0]": "minus",
"cost_centers[0]": "quibusdam",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 6ba6kcfDh8ZEve1Pga3dV45",
"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=Aperiam+voluptatem+est+perspiciatis+architecto+officia+aut+et+ut.&categories[]=illum&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=ipsam&customers[]=et&suppliers[]=non&works[]=eveniet&cost_centers[]=et" \
--header "Authorization: Bearer haZvade6Eb1cVf3P48kg6D5" \
--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": "Aperiam voluptatem est perspiciatis architecto officia aut et ut.",
"categories[0]": "illum",
"date_start": "2021-01-01",
"date_end": "2021-01-31",
"bank_accounts[0]": "ipsam",
"customers[0]": "et",
"suppliers[0]": "non",
"works[0]": "eveniet",
"cost_centers[0]": "et",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer haZvade6Eb1cVf3P48kg6D5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "2a4c2548-58ee-376c-b5a7-9571a37dce26",
"code": "FC-22040909",
"type": "saída",
"amount": -7701.09,
"description": "Id possimus quia eaque sed necessitatibus minima in natus.",
"transaction_date": "1991-03-12T03:00:00.000000Z",
"transaction_category": {
"id": null,
"name": null,
"type": null
},
"created_at": null,
"updated_at": null
},
{
"id": "3dd33a3b-69bf-346e-95fa-84921db7718b",
"code": "FC-80789192",
"type": "depósito",
"amount": 4992.85,
"description": "Aliquam eveniet quis voluptatibus cum minus.",
"transaction_date": "1975-03-09T03: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 aga6VeEbv6c5hZ84fk31DPd" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"Example Type\",
\"cash_session_id\": \"cb8de4ef-7827-314c-b821-3d6a7679a225\",
\"transaction_category_id\": \"2c9b4f2d-4d17-34ca-9cbb-0cbb40569f1b\",
\"bank_account_id\": \"813b8212-7987-3ace-a797-f3113483d2f4\",
\"customer_id\": \"e678ec6a-7f16-3b22-ac3e-580cd787e8ad\",
\"supplier_id\": \"889153d2-7180-304d-b642-3d4d94ae8e4c\",
\"work_id\": \"8ceed6c9-7972-3461-9fab-b76f25f15db5\",
\"cost_center_id\": \"1effc08a-79d0-3122-99a8-39ccff9b62b2\",
\"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 aga6VeEbv6c5hZ84fk31DPd",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "Example Type",
"cash_session_id": "cb8de4ef-7827-314c-b821-3d6a7679a225",
"transaction_category_id": "2c9b4f2d-4d17-34ca-9cbb-0cbb40569f1b",
"bank_account_id": "813b8212-7987-3ace-a797-f3113483d2f4",
"customer_id": "e678ec6a-7f16-3b22-ac3e-580cd787e8ad",
"supplier_id": "889153d2-7180-304d-b642-3d4d94ae8e4c",
"work_id": "8ceed6c9-7972-3461-9fab-b76f25f15db5",
"cost_center_id": "1effc08a-79d0-3122-99a8-39ccff9b62b2",
"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/1" \
--header "Authorization: Bearer gcdfD3bPZV458v6ahk1eE6a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/1"
);
const headers = {
"Authorization": "Bearer gcdfD3bPZV458v6ahk1eE6a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "e819c2c4-1689-3893-8a30-ce0b5a09e6cb",
"code": "FC-24610555",
"type": "saída",
"amount": -8169.3,
"description": "Dicta occaecati ut quibusdam voluptatibus.",
"transaction_date": "2008-05-10T03: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/20" \
--header "Authorization: Bearer ef5g4Pc36k68daVabZh1vED" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"Example Type\",
\"cash_session_id\": \"0facbae7-eac1-3fda-9bcc-55e12c0644fe\",
\"transaction_category_id\": \"76ed4091-b0af-3fe5-b853-b7876f581af8\",
\"bank_account_id\": \"d8926787-d071-3587-8036-5d354771d9b4\",
\"customer_id\": \"d682c342-5d8f-304f-ab3e-3376a27ce0be\",
\"supplier_id\": \"cdae20c4-6c1a-3c38-a065-66d53d9d76b8\",
\"work_id\": \"a8cf0ca4-e9db-3d59-bf05-769a5129e94c\",
\"cost_center_id\": \"8aedaf09-466d-3052-92fd-a867dd9f7ace\",
\"amount\": 1,
\"description\": \"Example Description\",
\"transaction_date\": \"2024-01-01\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/20"
);
const headers = {
"Authorization": "Bearer ef5g4Pc36k68daVabZh1vED",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "Example Type",
"cash_session_id": "0facbae7-eac1-3fda-9bcc-55e12c0644fe",
"transaction_category_id": "76ed4091-b0af-3fe5-b853-b7876f581af8",
"bank_account_id": "d8926787-d071-3587-8036-5d354771d9b4",
"customer_id": "d682c342-5d8f-304f-ab3e-3376a27ce0be",
"supplier_id": "cdae20c4-6c1a-3c38-a065-66d53d9d76b8",
"work_id": "a8cf0ca4-e9db-3d59-bf05-769a5129e94c",
"cost_center_id": "8aedaf09-466d-3052-92fd-a867dd9f7ace",
"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/3" \
--header "Authorization: Bearer h1vEcaVPZkg6D6f45d3a8eb" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/3"
);
const headers = {
"Authorization": "Bearer h1vEcaVPZkg6D6f45d3a8eb",
"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 dvfP8ZcaV5Dbaeh1466kgE3" \
--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 dvfP8ZcaV5Dbaeh1466kgE3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "cac73aad-9dd1-36c0-8ae7-5990dd10edf1",
"code": null,
"opened_by": null,
"opened_at": "2026-08-12T13:50:47.000000Z",
"closed_by": null,
"closed_at": "1978-07-03T00:07:04.000000Z",
"opening_balance": 3166.86,
"closing_balance": 6037.69,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Fechado",
"hasSnapshot": false,
"created_at": "1974-08-12T21:06:53.000000Z",
"updated_at": "2012-02-16T20:14:13.000000Z"
},
{
"id": "eb00209c-f049-3cdd-b2d6-e044609060ff",
"code": null,
"opened_by": null,
"opened_at": "1984-01-06T23:11:03.000000Z",
"closed_by": null,
"closed_at": "2013-01-02T08:51:18.000000Z",
"opening_balance": 3231.81,
"closing_balance": 3705.93,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Aberto",
"hasSnapshot": false,
"created_at": "2017-06-12T08:33:18.000000Z",
"updated_at": "2014-02-23T16:04:38.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 aehZ68EgD16fad45VPv3kcb" \
--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 aehZ68EgD16fad45VPv3kcb",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "1be4bff2-1071-3265-82d1-091410b1ee4a",
"code": null,
"opened_by": null,
"opened_at": "1974-08-19T16:16:28.000000Z",
"closed_by": null,
"closed_at": "1970-08-10T12:12:13.000000Z",
"opening_balance": 9344.51,
"closing_balance": 9816.06,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Fechado",
"hasSnapshot": false,
"created_at": "1972-08-08T07:59:50.000000Z",
"updated_at": "2022-11-27T23:52:15.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/dcc9b400-7942-3d0e-a2fc-221b3e74a568" \
--header "Authorization: Bearer 4kh1gc36ZePVEaa86dDf5vb" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/close/dcc9b400-7942-3d0e-a2fc-221b3e74a568"
);
const headers = {
"Authorization": "Bearer 4kh1gc36ZePVEaa86dDf5vb",
"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/75272519-161c-3b1c-beac-e56519e2d086/account-snapshot" \
--header "Authorization: Bearer a1dvkhaZDb6VPc6e58f3gE4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/75272519-161c-3b1c-beac-e56519e2d086/account-snapshot"
);
const headers = {
"Authorization": "Bearer a1dvkhaZDb6VPc6e58f3gE4",
"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/c17dddd0-3901-37f9-b39f-8a4b051fbefd" \
--header "Authorization: Bearer ba6deg3D6VhZv54Pf8E1akc" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/c17dddd0-3901-37f9-b39f-8a4b051fbefd"
);
const headers = {
"Authorization": "Bearer ba6deg3D6VhZv54Pf8E1akc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "2a5362d4-23bc-32b9-b481-a8f1accf89c6",
"code": null,
"opened_by": null,
"opened_at": "2012-07-08T18:50:57.000000Z",
"closed_by": null,
"closed_at": "1970-04-07T07:21:02.000000Z",
"opening_balance": 2183.69,
"closing_balance": 9925.19,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Aberto",
"hasSnapshot": false,
"created_at": "1985-05-24T06:00:01.000000Z",
"updated_at": "1995-04-19T23:52:18.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/3d96dd4e-93b1-36b6-80c9-f81a7b1b06a8" \
--header "Authorization: Bearer 54f3bPghV1cZkaaDe6dv8E6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/3d96dd4e-93b1-36b6-80c9-f81a7b1b06a8"
);
const headers = {
"Authorization": "Bearer 54f3bPghV1cZkaaDe6dv8E6",
"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 6bPv8fkgdZae5Dh641Eca3V" \
--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 6bPv8fkgdZae5Dh641Eca3V",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "a90ebbb2-f6f1-3094-b412-ec5a77d64d90",
"name": "et omnis",
"slug": null,
"abbreviation": "jij",
"tutorials_count": 0
},
{
"id": "1b237f3c-856b-3ca3-8475-a5ea25101a02",
"name": "consequatur ut",
"slug": null,
"abbreviation": null,
"tutorials_count": 0
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Módulos da central
requires authentication No specific permission required
Módulos ativos com tutoriais visíveis para a pessoa; aceita filtro de setor
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/tutorials/modules?sector_id=4529e8ec-a96e-3164-beea-332255fba212" \
--header "Authorization: Bearer ahdV1P863gfvcD4eEka5bZ6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/tutorials/modules"
);
const params = {
"sector_id": "4529e8ec-a96e-3164-beea-332255fba212",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ahdV1P863gfvcD4eEka5bZ6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "58c31432-cf39-3510-99d0-d8873e99fbd3",
"name": "Quo est",
"slug": "quo-est-225810",
"description": "Labore dolorem magni quia magnam.",
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
},
{
"id": "20aab2bf-81d8-31a7-9045-e0607977979b",
"name": "Aut nostrum",
"slug": "aut-nostrum-352956",
"description": "Rem repellat facere sit aut repellendus.",
"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=a74ba352-9263-3adb-930c-a005e3c88263§or_id=46ab39c0-fff8-3da3-b313-703b9023e44b" \
--header "Authorization: Bearer 4e5EcdvPg366DZb8fakh1aV" \
--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": "a74ba352-9263-3adb-930c-a005e3c88263",
"sector_id": "46ab39c0-fff8-3da3-b313-703b9023e44b",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 4e5EcdvPg366DZb8fakh1aV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "c8b69535-e2c6-3472-878f-4ac7686ab0ca",
"title": "Et unde aut amet",
"description": "Fuga voluptatem inventore tempora iste.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a323fc82-d2ba-411d-af57-f6ca32ff8986",
"name": "Provident accusantium",
"slug": "provident-accusantium-611967"
},
"created_at": null,
"updated_at": null
},
{
"id": "166608b0-1b3d-3da1-a36e-6d9adf4a9087",
"title": "Molestiae necessitatibus nulla harum",
"description": "In quod quisquam aut ut ducimus.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a323fc82-d531-492a-980a-09a47e7fee2b",
"name": "Dolorem doloremque",
"slug": "dolorem-doloremque-542663"
},
"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 fk4cdb8ea5PvVE6Z6hDa1g3" \
--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 fk4cdb8ea5PvVE6Z6hDa1g3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "16ae25f6-19f5-3251-af58-e3acb395975c",
"title": "Eum dolor repudiandae dolorum",
"description": "Fuga in dignissimos veniam voluptate vero perspiciatis.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a323fc82-dc6a-4331-a044-edbcc45e821e",
"name": "Ad suscipit",
"slug": "ad-suscipit-224123"
},
"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 vPa16Zc4VbeEagd5D3hk8f6" \
--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 vPa16Zc4VbeEagd5D3hk8f6",
"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 h186g5aD6Z3vdba4ckEPVfe" \
--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\": \"1e1d49fd-1461-3d5a-9114-caf9ded8cf19\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts"
);
const headers = {
"Authorization": "Bearer h186g5aD6Z3vdba4ckEPVfe",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "Example Sort by",
"sort_desc": true,
"page": 1,
"per_page": 1,
"work_id": "1e1d49fd-1461-3d5a-9114-caf9ded8cf19"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "a8a3ee66-3aed-3070-b194-91f809424309",
"number": "473/2026",
"started_at": "2026-11-03",
"deadline_at": "2027-11-03",
"work": {
"id": "a323fc76-4383-4756-8cca-576f719551e9",
"name": "Sra. Andressa Mayara Gusmão"
},
"created_at": null,
"updated_at": null
},
{
"id": "bde1e47e-6943-3a9b-a677-fe7e12d540e7",
"number": "392/2026",
"started_at": "2026-11-03",
"deadline_at": "2027-11-03",
"work": {
"id": "a323fc76-4e35-4339-8a34-66215d1a838f",
"name": "Thomas Abreu Ferraz"
},
"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 aVv3ZEcbP8g46hkdaf516De" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"work_id\": \"061b0199-2d4c-3292-841f-519d48e64db1\",
\"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 aVv3ZEcbP8g46hkdaf516De",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"work_id": "061b0199-2d4c-3292-841f-519d48e64db1",
"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/16" \
--header "Authorization: Bearer 6k1aEcfbPg8hve65DZ3aV4d" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts/16"
);
const headers = {
"Authorization": "Bearer 6k1aEcfbPg8hve65DZ3aV4d",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "dc85b3e2-0cc8-3e42-a8d5-e0598df8fd58",
"number": "756/2026",
"started_at": "2026-11-03",
"deadline_at": "2027-11-03",
"work": {
"id": "a323fc76-5aca-4a73-94ba-ed51a23a415a",
"name": "Sra. Késia Santiago Rangel"
},
"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/15" \
--header "Authorization: Bearer bZ5Eg1v6Pk3a6Vd4Daec8fh" \
--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/15"
);
const headers = {
"Authorization": "Bearer bZ5Eg1v6Pk3a6Vd4Daec8fh",
"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/sunt" \
--header "Authorization: Bearer kvZaVP5c8eb1da6DhgE4f63" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts/sunt"
);
const headers = {
"Authorization": "Bearer kvZaVP5c8eb1da6DhgE4f63",
"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=recusandae" \
--header "Authorization: Bearer cDg8bv5Pad6ake4E1h3VZf6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"parent_id\": \"eum\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/next-code"
);
const params = {
"parent_id": "recusandae",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer cDg8bv5Pad6ake4E1h3VZf6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"parent_id": "eum"
};
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 kPd8eEf6g3a6DvV154achbZ" \
--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 kPd8eEf6g3a6DvV154achbZ",
"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 fgaE6aZ13dkPDvh68Vb4c5e" \
--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 fgaE6aZ13dkPDvh68Vb4c5e",
"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 EcV8efadk5Zb3P1Dvga646h" \
--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 EcV8efadk5Zb3P1Dvga646h",
"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 3Zve4D1a6da85fkV6bEPhgc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"cost_center_id\": \"exercitationem\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/stock-config"
);
const headers = {
"Authorization": "Bearer 3Zve4D1a6da85fkV6bEPhgc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"cost_center_id": "exercitationem"
};
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 v1hab6V6cEZ8fk4P53eDgad" \
--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 v1hab6V6cEZ8fk4P53eDgad",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "71cf2c63-712e-3b15-b94e-5158d737d298",
"code": "037",
"name": "quam consequatur",
"level": 1,
"path": null,
"is_active": true,
"selectable": false,
"created_at": null,
"updated_at": null
},
{
"id": "4a782b2c-c2f7-3be0-9b8e-7478cde7344a",
"code": "942",
"name": "totam aliquam",
"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/mollitia" \
--header "Authorization: Bearer P38vk6a5fVc61beZE4hDdga" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/mollitia"
);
const headers = {
"Authorization": "Bearer P38vk6a5fVc61beZE4hDdga",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "582c0f1a-4c5d-3500-b45e-6a1a2938c847",
"code": "141",
"name": "quia fugiat",
"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 d5ekvP1fga63hZDb48c6aVE" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"code\": \"Example Code\",
\"name\": \"Example Name\",
\"parent_id\": \"3fdabf35-a4fc-35d7-ba6d-5f027f68b22f\",
\"work_id\": \"c785f8c0-c523-3b96-bf3c-ba6dbb41b1e7\",
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers"
);
const headers = {
"Authorization": "Bearer d5ekvP1fga63hZDb48c6aVE",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"code": "Example Code",
"name": "Example Name",
"parent_id": "3fdabf35-a4fc-35d7-ba6d-5f027f68b22f",
"work_id": "c785f8c0-c523-3b96-bf3c-ba6dbb41b1e7",
"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/quis" \
--header "Authorization: Bearer 1EchDb5Zaag6k364Pfd8Vev" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"code\": \"Example Code\",
\"name\": \"Example Name\",
\"parent_id\": \"1861a4d2-b29e-301b-9dbd-95e603879b1e\",
\"work_id\": \"dc6d6096-4fa7-3073-8eb0-ae2ff425c4e2\",
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/quis"
);
const headers = {
"Authorization": "Bearer 1EchDb5Zaag6k364Pfd8Vev",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"code": "Example Code",
"name": "Example Name",
"parent_id": "1861a4d2-b29e-301b-9dbd-95e603879b1e",
"work_id": "dc6d6096-4fa7-3073-8eb0-ae2ff425c4e2",
"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/veritatis" \
--header "Authorization: Bearer v8keaE1DVPd5Zch6f63ba4g" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/veritatis"
);
const headers = {
"Authorization": "Bearer v8keaE1DVPd5Zch6f63ba4g",
"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 45Vhc18e66DZkbvfEPdgaa3" \
--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 45Vhc18e66DZkbvfEPdgaa3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "296be47f-ed58-3b99-8094-8071d54f0c67",
"name": "Joaquin Serra Santiago Filho",
"email": "lais.pena@example.net",
"phone": "(22) 99301-4447",
"document": "884.006.075-89",
"type": "pf",
"responsible": "Dr. Cristina Salgado Neto",
"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": "740917cf-4328-329f-b2cc-847bf7fd4800",
"name": "Victor das Neves Amaral",
"email": "benicio52@example.com",
"phone": "(38) 4275-8333",
"document": "699.088.800-80",
"type": "pf",
"responsible": "Samanta Vitória Aranda",
"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 Dad683v61kVZEcbhgPfae54" \
--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 Dad683v61kVZEcbhgPfae54",
"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/18" \
--header "Authorization: Bearer hEbv1dDc6kg3V84a6PfeaZ5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/customers/18"
);
const headers = {
"Authorization": "Bearer hEbv1dDc6kg3V84a6PfeaZ5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "13cce098-7dc4-3893-952e-4ff4d53f1a54",
"name": "Leo Maia Filho",
"email": "mirela96@example.net",
"phone": "(11) 91969-0947",
"document": "768.774.211-75",
"type": "pj",
"responsible": "Isabelly Paes Deverso",
"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/15" \
--header "Authorization: Bearer cZa5bDagfP14kehE3Vd866v" \
--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/15"
);
const headers = {
"Authorization": "Bearer cZa5bDagfP14kehE3Vd866v",
"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 v14eDP3kb6a86fZVag5hEcd" \
--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 v14eDP3kb6a86fZVag5hEcd",
"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 VebadEPac3hZ18v664gfDk5" \
--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\": \"cd7aecaf-a802-3f5f-9470-71148c624235\",
\"contract_id\": \"1f5cfb3e-8106-3074-a015-7208112bd091\",
\"status_id\": \"9e7c4fc4-26f8-3d24-8e17-88e9696683e5\",
\"filled_by\": \"40066453-1ce4-34fd-a447-bc804cfa5b18\",
\"responsible_id\": \"ccaaff5d-ae5b-3e9d-a44f-13b1f700ee4b\",
\"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 VebadEPac3hZ18v664gfDk5",
"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": "cd7aecaf-a802-3f5f-9470-71148c624235",
"contract_id": "1f5cfb3e-8106-3074-a015-7208112bd091",
"status_id": "9e7c4fc4-26f8-3d24-8e17-88e9696683e5",
"filled_by": "40066453-1ce4-34fd-a447-bc804cfa5b18",
"responsible_id": "ccaaff5d-ae5b-3e9d-a44f-13b1f700ee4b",
"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": "7c2ed777-2781-3746-a76e-bc92b7338d33",
"code": "RDO-03-11-26",
"report_number": 1,
"date": "2026-11-03",
"status": {
"id": "a323fc76-dba0-4572-98da-fd2cd7c8a8c3",
"slug": null,
"name": null,
"abbreviation": "quo",
"color": "#f9e2e3",
"text_color": "#7a2ecc"
},
"work": {
"id": "a323fc76-d2ba-4064-abe5-339b8a964a32",
"name": "Fátima Ramos Neto",
"started_at": "2002-05-04 20:38:02"
},
"filled_by": {
"id": "a323fc76-d840-4fdb-bb9b-99ffa7357bfe",
"name": "Orin Schuster"
},
"contract_number": "882/2026",
"deadline_at": "2027-11-03",
"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": "5f653f02-800d-3ff9-86b1-b386388d2145",
"code": "RDO-03-11-26",
"report_number": 1,
"date": "2026-11-03",
"status": {
"id": "a323fc76-e64a-442c-a1e6-f634f7f5ca48",
"slug": null,
"name": null,
"abbreviation": "expedita",
"color": "#5d3807",
"text_color": "#ce06e2"
},
"work": {
"id": "a323fc76-e026-4bce-9b58-35da5178c826",
"name": "Srta. Constância da Silva Sobrinho",
"started_at": "2003-07-14 16:25:40"
},
"filled_by": {
"id": "a323fc76-e493-4d98-a9e0-92773c078ca6",
"name": "Abbigail Christiansen"
},
"contract_number": "908/2026",
"deadline_at": "2027-11-03",
"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 8gahaP3E5fkdb61e4ZDVvc6" \
--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 8gahaP3E5fkdb61e4ZDVvc6",
"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/sed" \
--header "Authorization: Bearer a4dh3e86bkfZE6cPDg1vaV5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/sed"
);
const headers = {
"Authorization": "Bearer a4dh3e86bkfZE6cPDg1vaV5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "b57d15c0-c61f-360b-8cd4-6d52c3f88b82",
"code": "RDO-03-11-26",
"report_number": 1,
"date": "2026-11-03",
"status": {
"id": "a323fc76-f9e3-4451-984e-4bfd6d3ab6ad",
"slug": null,
"name": null,
"abbreviation": "qui",
"color": "#c04dd7",
"text_color": "#171f6b"
},
"work": {
"id": "a323fc76-f3cc-4ca7-b8ff-f190611ec22f",
"name": "Josué Pacheco Escobar Sobrinho",
"started_at": "1992-05-18 15:34:27"
},
"filled_by": {
"id": "a323fc76-f813-4e54-9c8d-6b72b55caf56",
"name": "Jaida Kreiger III"
},
"contract_number": "737/2026",
"deadline_at": "2027-11-03",
"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 31fhEbVZPaD58aedc64g6vk" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"contract_id\": \"Example Contract id\",
\"date\": \"2024-01-01\",
\"status_id\": \"e1441937-59b1-3fff-b913-3dbc1c9c0ef5\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs"
);
const headers = {
"Authorization": "Bearer 31fhEbVZPaD58aedc64g6vk",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"contract_id": "Example Contract id",
"date": "2024-01-01",
"status_id": "e1441937-59b1-3fff-b913-3dbc1c9c0ef5"
};
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/architecto" \
--header "Authorization: Bearer aP6kEh8Dad5e34Z16vgbVfc" \
--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\": \"17762ba8-aef6-4958-9a9c-aca43a21ed98\",
\"quantity\": 1
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/architecto"
);
const headers = {
"Authorization": "Bearer aP6kEh8Dad5e34Z16vgbVfc",
"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": "17762ba8-aef6-4958-9a9c-aca43a21ed98",
"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/quidem/finalize" \
--header "Authorization: Bearer 4h8V3gv6ekac16ZabdDEf5P" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/quidem/finalize"
);
const headers = {
"Authorization": "Bearer 4h8V3gv6ekac16ZabdDEf5P",
"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 kZ5Dc4a8fV36b1Pev6Edgha" \
--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 kZ5Dc4a8fV36b1Pev6Edgha",
"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/adipisci/reopen" \
--header "Authorization: Bearer P8Vcafd46vaEhgZ536bDk1e" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/adipisci/reopen"
);
const headers = {
"Authorization": "Bearer P8Vcafd46vaEhgZ536bDk1e",
"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/nisi/photos" \
--header "Authorization: Bearer 66VEbk843cvfP1gadDhaZ5e" \
--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/nisi/photos"
);
const headers = {
"Authorization": "Bearer 66VEbk843cvfP1gadDhaZ5e",
"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/amet/photos/doloremque" \
--header "Authorization: Bearer 8vag36P4dhZaVecbkf51D6E" \
--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/amet/photos/doloremque"
);
const headers = {
"Authorization": "Bearer 8vag36P4dhZaVecbkf51D6E",
"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/et/photos/vero" \
--header "Authorization: Bearer V5ghDkv61Z346e8aPdfEbca" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/et/photos/vero"
);
const headers = {
"Authorization": "Bearer V5ghDkv61Z346e8aPdfEbca",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete daily log
requires authentication daily-log delete
Delete a draft daily work report (RDO)
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/daily-logs/quis" \
--header "Authorization: Bearer ceav8fakg6VhD4615d3PZbE" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/quis"
);
const headers = {
"Authorization": "Bearer ceav8fakg6VhD4615d3PZbE",
"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 ZV66cbg1dDE5v3hk4ef8aPa" \
--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 ZV66cbg1dDE5v3hk4ef8aPa",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "3be48ddb-b1a2-33e3-b8cb-b28710a5d41b",
"name": "Dignissimos",
"code": "HWI",
"description": "Ipsa at voluptatem placeat omnis repellendus sed.",
"active": true
},
{
"id": "9ac31871-db07-3668-9088-7663c535ee00",
"name": "Eum",
"code": "JJR",
"description": "Ipsum autem ut magni ratione qui molestiae.",
"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 Z8fh31kbgP5v6Ea4aV6dDce" \
--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 Z8fh31kbgP5v6Ea4aV6dDce",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "77ebcc5e-553f-3300-81ac-66dda0a78267",
"name": "Molestiae",
"code": "TNK",
"description": "Quia facilis architecto quia.",
"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 fP53aad8v4EZVhcD6b61gke" \
--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 fP53aad8v4EZVhcD6b61gke",
"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 vVa3Z5bk8ge6E6cPd41fhaD" \
--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 vVa3Z5bk8ge6E6cPd41fhaD",
"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/quia" \
--header "Authorization: Bearer cZPe4a8bd6DE53g16Vvhafk" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/disciplines/quia"
);
const headers = {
"Authorization": "Bearer cZPe4a8bd6DE53g16Vvhafk",
"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 46PahE5Zv8cg1V3a6kDdbef" \
--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 46PahE5Zv8cg1V3a6kDdbef",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "3e8755ec-5a5b-329b-88da-f374412a3b11",
"name": "Raissa Rocha",
"description": "Nam voluptatem laboriosam quos vel aspernatur. Perferendis nemo temporibus quae. Nesciunt reprehenderit modi sit quia odit provident odio.",
"module": "document"
},
{
"id": "83f5c2f9-4982-31f5-8d69-a7a60f95e9c0",
"name": "Tomás Carmona",
"description": "Non ipsa quia aut doloremque. Fugit dolores corrupti sit deserunt minima. Consequatur deleniti quia tempora in dolor. Deserunt corrupti minima consequatur commodi nisi veritatis beatae.",
"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/et" \
--header "Authorization: Bearer 6v3Z6EhcP8Dak1bgVfe4ad5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/document-categories/et"
);
const headers = {
"Authorization": "Bearer 6v3Z6EhcP8Dak1bgVfe4ad5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d6ecc9db-57aa-309c-b1f6-0669a855cc52",
"name": "Dr. Suzana Sara Salas",
"description": "Est rerum beatae rerum illum voluptatem qui. Ullam laboriosam aut eaque autem laboriosam magni. Quaerat incidunt sed incidunt.",
"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 3EgDV6feZabc8v4hP6kd1a5" \
--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 3EgDV6feZabc8v4hP6kd1a5",
"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/consequatur" \
--header "Authorization: Bearer 4baf65h38PV6eaEk1ZvDdgc" \
--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/consequatur"
);
const headers = {
"Authorization": "Bearer 4baf65h38PV6eaEk1ZvDdgc",
"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/eos" \
--header "Authorization: Bearer 4V6abf8hEZkvg315e6PdcDa" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/document-categories/eos"
);
const headers = {
"Authorization": "Bearer 4V6abf8hEZkvg315e6PdcDa",
"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[]=numquam&documentable_type=fugiat&customers[]=corporis&suppliers[]=deleniti" \
--header "Authorization: Bearer 6e5va316dkg48aVfcZhbPDE" \
--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]": "numquam",
"documentable_type": "fugiat",
"customers[0]": "corporis",
"suppliers[0]": "deleniti",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 6e5va316dkg48aVfcZhbPDE",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "3f11d71b-13d6-3584-b53f-17a2ee8eb988",
"name": "Noel Simão Ramos Sobrinho",
"file": {
"id": null,
"url": null,
"extension": null
},
"created_at": null,
"updated_at": null
},
{
"id": "4a01f40e-a60c-33dd-bd62-792a1fa4b748",
"name": "Davi Cortês Jimenes",
"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 c3d1hgvV5Pae4aEZb6D8k6f" \
--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 c3d1hgvV5Pae4aEZb6D8k6f",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "64f7292a-b162-35f3-9cef-75253fdb096c",
"name": "Sr. Santiago Cruz",
"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 3aP481Ed6ZDvb56ahfcegkV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"category_id\": \"1adc8e7d-7bbf-39b2-9a36-ac9664ae633c\",
\"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 3aP481Ed6ZDvb56ahfcegkV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"category_id": "1adc8e7d-7bbf-39b2-9a36-ac9664ae633c",
"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/9" \
--header "Authorization: Bearer bVc1E48e5PDf6Zvh3aakg6d" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"category_id\": \"6bfc5b98-1f95-3d04-b27a-b73b50cb7057\",
\"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/9"
);
const headers = {
"Authorization": "Bearer bVc1E48e5PDf6Zvh3aakg6d",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"category_id": "6bfc5b98-1f95-3d04-b27a-b73b50cb7057",
"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 f8bg1dVaDcPaEhe3k466v5Z" \
--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 f8bg1dVaDcPaEhe3k466v5Z",
"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 6k8v6faP14aDgb3ZehEcVd5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"ut\",
\"renewal_status\": \"ignored\",
\"urgency\": \"expires_7_days\",
\"employee_id\": \"delectus\",
\"epi_type_id\": \"officiis\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals"
);
const headers = {
"Authorization": "Bearer 6k8v6faP14aDgb3ZehEcVd5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "ut",
"renewal_status": "ignored",
"urgency": "expires_7_days",
"employee_id": "delectus",
"epi_type_id": "officiis"
};
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 kfcaVZP14g8366dDh5avbeE" \
--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 kfcaVZP14g8366dDh5avbeE",
"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/et/renew" \
--header "Authorization: Bearer V8eP6dZ6Eakvfga4cD5b3h1" \
--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/et/renew"
);
const headers = {
"Authorization": "Bearer V8eP6dZ6Eakvfga4cD5b3h1",
"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/doloribus/ignore" \
--header "Authorization: Bearer 5D4dva8aE16ZP6fgbc3keVh" \
--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/doloribus/ignore"
);
const headers = {
"Authorization": "Bearer 5D4dva8aE16ZP6fgbc3keVh",
"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/voluptatem/ignore" \
--header "Authorization: Bearer eaa6c63fP5DVhgv4b1kZ8Ed" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/voluptatem/ignore"
);
const headers = {
"Authorization": "Bearer eaa6c63fP5DVhgv4b1kZ8Ed",
"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 4eb3DEf1gdavaPckZhV6865" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"voluptatem\",
\"stock_id\": \"soluta\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types"
);
const headers = {
"Authorization": "Bearer 4eb3DEf1gdavaPckZhV6865",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "voluptatem",
"stock_id": "soluta"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "53d1197b-0555-3829-8bc0-b82e5e5bc565",
"name": "consequatur quibusdam",
"default_validity_days": 263,
"requires_signature": true,
"numero_ca": "44694",
"product": null,
"available_quantity": null,
"created_at": null,
"updated_at": null
},
{
"id": "23ed9988-110c-3ad9-9ad4-b47609df83e3",
"name": "ad qui",
"default_validity_days": 479,
"requires_signature": true,
"numero_ca": "29708",
"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 avdV84k53DfeZh6cb1Ea6gP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"et\",
\"stock_id\": \"qui\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/candidates"
);
const headers = {
"Authorization": "Bearer avdV84k53DfeZh6cb1Ea6gP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "et",
"stock_id": "qui"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show EPI type
requires authentication epi show
Show an EPI type
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/epi-types/omnis" \
--header "Authorization: Bearer gk1PhvVe6b4d6cZaD385afE" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/omnis"
);
const headers = {
"Authorization": "Bearer gk1PhvVe6b4d6cZaD385afE",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "48cbc0fd-ba07-3d88-9726-288d08d1a4b1",
"name": "facere aliquid",
"default_validity_days": 129,
"requires_signature": false,
"numero_ca": "33992",
"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 ah5f8aZD63Pkcd6V4vbE1ge" \
--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\": \"14cea200-002d-3bfe-93d7-9a711d9a360b\",
\"product_family_id\": \"11f18ccf-2730-38f5-a8d2-eb508f1aefb5\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types"
);
const headers = {
"Authorization": "Bearer ah5f8aZD63Pkcd6V4vbE1ge",
"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": "14cea200-002d-3bfe-93d7-9a711d9a360b",
"product_family_id": "11f18ccf-2730-38f5-a8d2-eb508f1aefb5"
};
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 1gd3Ech4vfa6865DbaeZkPV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"epi_type_id\": \"1c83fe0b-2226-39f7-8db2-3c96feaa5000\",
\"action\": \"Example Items * action\",
\"product_id\": \"45d6be99-2d41-3c52-9ecf-380b069ddca0\",
\"product_family_id\": \"8010e308-986e-3897-bee2-12f96756e248\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/link-products"
);
const headers = {
"Authorization": "Bearer 1gd3Ech4vfa6865DbaeZkPV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"epi_type_id": "1c83fe0b-2226-39f7-8db2-3c96feaa5000",
"action": "Example Items * action",
"product_id": "45d6be99-2d41-3c52-9ecf-380b069ddca0",
"product_family_id": "8010e308-986e-3897-bee2-12f96756e248"
},
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/quidem/product" \
--header "Authorization: Bearer ac6h46E1a5g8PDfevVZk3bd" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"action\": \"Example Action\",
\"product_id\": \"b86e733c-8e52-3282-9a87-4ed95e024f5b\",
\"product_family_id\": \"24525ea5-8278-348e-8601-3a3b04a6865e\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/quidem/product"
);
const headers = {
"Authorization": "Bearer ac6h46E1a5g8PDfevVZk3bd",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"action": "Example Action",
"product_id": "b86e733c-8e52-3282-9a87-4ed95e024f5b",
"product_family_id": "24525ea5-8278-348e-8601-3a3b04a6865e"
};
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/eos" \
--header "Authorization: Bearer be83aDZad5fhvEk6V6P4gc1" \
--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/eos"
);
const headers = {
"Authorization": "Bearer be83aDZad5fhvEk6V6P4gc1",
"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/dolor" \
--header "Authorization: Bearer V8ev14dPZ6D3fEbkag5hca6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/dolor"
);
const headers = {
"Authorization": "Bearer V8ev14dPZ6D3fEbkag5hca6",
"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 cdbahkgEea6183v546DVfZP" \
--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 cdbahkgEea6183v546DVfZP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "95469e94-c9d8-4777-95dc-e6c5c67b02a5",
"name": "nesciunt",
"description": "Et beatae temporibus est impedit.",
"created_at": null,
"updated_at": null
},
{
"id": "6f53d7c8-8fd5-42a2-8394-98980139d626",
"name": "assumenda",
"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/sit" \
--header "Authorization: Bearer dVPcg5aa1EDhk683bZ4fv6e" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employee-roles/sit"
);
const headers = {
"Authorization": "Bearer dVPcg5aa1EDhk683bZ4fv6e",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "9c3af32b-e339-4d05-8a65-2ece4374e1d0",
"name": "voluptates",
"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 hfv8g6kD341V5PaceEZad6b" \
--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 hfv8g6kD341V5PaceEZad6b",
"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/magni" \
--header "Authorization: Bearer 6a1h45cDkv6beEdVf8Pa3gZ" \
--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/magni"
);
const headers = {
"Authorization": "Bearer 6a1h45cDkv6beEdVf8Pa3gZ",
"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/illum" \
--header "Authorization: Bearer EhVb5g3P6a6Zdek8cfva14D" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employee-roles/illum"
);
const headers = {
"Authorization": "Bearer EhVb5g3P6a6Zdek8cfva14D",
"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 Pka66Vvah4e1g385fbdDEcZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"created_at\",
\"sort_desc\": true,
\"page\": 59,
\"per_page\": 2,
\"q\": \"laudantium\",
\"employee_id\": \"atque\",
\"has_term\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-terms"
);
const headers = {
"Authorization": "Bearer Pka66Vvah4e1g385fbdDEcZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "created_at",
"sort_desc": true,
"page": 59,
"per_page": 2,
"q": "laudantium",
"employee_id": "atque",
"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[]=iure&admission_date_from=2026-01-01&admission_date_to=2026-12-31" \
--header "Authorization: Bearer Z1kDed84aEVg3h656Pbacvf" \
--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]": "iure",
"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 Z1kDed84aEVg3h656Pbacvf",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "a48943ef-3d65-44c3-a13e-7ee0f188ce0c",
"name": "Sr. Denis Aguiar Sobrinho",
"cpf": "282.889.001-29",
"rg": null,
"ctps": "808568228",
"phone": null,
"birthdate": "1984-03-17",
"email": null,
"pis_pasep": null,
"admission_date": "1970-09-30",
"daily_salary": null,
"monthly_salary": "1499.86",
"nationality": "Chad",
"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": "a323fc77-8cea-4952-89ab-9dd1a6d3a4b6",
"name": "praesentium"
},
"created_at": null,
"updated_at": null
},
{
"id": "0933ab81-7149-4330-b2f5-2558b24b9136",
"name": "Sra. Amélia Rosa Filho",
"cpf": "178.962.197-94",
"rg": null,
"ctps": null,
"phone": "(86) 93487-2264",
"birthdate": "2021-07-01",
"email": null,
"pis_pasep": "39709567541",
"admission_date": "1993-12-11",
"daily_salary": null,
"monthly_salary": "7908.43",
"nationality": "Nepal",
"place_of_birth": "Lourenç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": "a323fc77-9083-45ec-95cb-156aa0cd1ca4",
"name": "in"
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": "/?page=58",
"next": null
},
"meta": {
"current_page": 59,
"from": 581,
"last_page": 1,
"links": [
{
"url": "/?page=58",
"label": "« Anterior",
"page": 58,
"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": 582,
"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[]=quo&admission_date_from=2026-01-01&admission_date_to=2026-12-31" \
--header "Authorization: Bearer gaPf4bvcV6DkZe6ha53E8d1" \
--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]": "quo",
"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 gaPf4bvcV6DkZe6ha53E8d1",
"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/5" \
--header "Authorization: Bearer ab6gk45dvEfhV1ec3DaZ86P" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/5"
);
const headers = {
"Authorization": "Bearer ab6gk45dvEfhV1ec3DaZ86P",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "978e8953-2ff8-4133-a8b6-86e6498814d6",
"name": "João Martines",
"cpf": "336.504.261-79",
"rg": "931001394",
"ctps": null,
"phone": null,
"birthdate": null,
"email": null,
"pis_pasep": null,
"admission_date": "1980-09-21",
"daily_salary": null,
"monthly_salary": null,
"nationality": null,
"place_of_birth": "Prado d'Oeste",
"status": "active",
"status_label": "Ativo",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"employee_role": {
"id": "a323fc77-9c6f-4f44-afb9-e6e96c34ca1a",
"name": "libero"
},
"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 eaPfVEv6Z4kb1ad6Dc38hg5" \
--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\": \"9f5ba092-4705-4f1f-b72d-039cac338e13\",
\"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 eaPfVEv6Z4kb1ad6Dc38hg5",
"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": "9f5ba092-4705-4f1f-b72d-039cac338e13",
"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": "2a83a6c1-3173-49d4-86a6-d0415d2c956c",
"name": "Rodrigo Montenegro",
"cpf": "108.872.988-71",
"rg": null,
"ctps": "033440211",
"phone": "(85) 4952-4335",
"birthdate": "2024-05-29",
"email": "pgalhardo@example.com",
"pis_pasep": "54404842960",
"admission_date": "1981-08-26",
"daily_salary": null,
"monthly_salary": "5168.65",
"nationality": "Nova Zelâ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": "a323fc77-a5c5-4148-81c6-491381307842",
"name": "minima"
},
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update employee
requires authentication employee update
Update an employee
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/employees/16" \
--header "Authorization: Bearer 6b3kah4egcPf5VD186dZEva" \
--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\": \"7244a393-c1e6-46af-a1eb-a26cb42f8398\",
\"pis_pasep\": \"Example Pis pasep\",
\"admission_date\": \"2024-01-01\",
\"daily_salary\": 1,
\"monthly_salary\": 1,
\"nationality\": \"Example Nationality\",
\"place_of_birth\": \"Example Place of birth\",
\"address\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"street\": \"Example Address street\",
\"number\": \"Example Address number\",
\"complement\": \"Example Address complement\",
\"neighborhood\": \"Example Address neighborhood\",
\"city\": \"Example Address city\",
\"state\": \"Example Address state\",
\"zip_code\": \"Example Address zip code\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/16"
);
const headers = {
"Authorization": "Bearer 6b3kah4egcPf5VD186dZEva",
"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": "7244a393-c1e6-46af-a1eb-a26cb42f8398",
"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 1Zd6c5fV48D3ekb6vgPaEha" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"dismissal_date\": \"2026-11-03\",
\"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 1Zd6c5fV48D3ekb6vgPaEha",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"dismissal_date": "2026-11-03",
"dismissal_reason": "resignation"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "15e24174-e7be-4675-9a53-3edf161250b3",
"name": "Angélica Luzia Vega Neto",
"cpf": "255.899.683-17",
"rg": null,
"ctps": "067198148",
"phone": "(89) 90857-8733",
"birthdate": null,
"email": null,
"pis_pasep": null,
"admission_date": "1997-12-23",
"daily_salary": null,
"monthly_salary": "9419.66",
"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": "a323fc77-b45e-4cb9-af64-e3133d8f77af",
"name": "eveniet"
},
"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 Dghbvc6Zd46aaP8e5fk1VE3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"admission_date\": \"2026-11-03\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32/rehire"
);
const headers = {
"Authorization": "Bearer Dghbvc6Zd46aaP8e5fk1VE3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"admission_date": "2026-11-03"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "1b8df826-6c4f-43f0-86f9-e27b9b0d4102",
"name": "Cláudio de Freitas",
"cpf": "854.726.164-81",
"rg": null,
"ctps": null,
"phone": null,
"birthdate": "1979-12-05",
"email": "fortiz@example.org",
"pis_pasep": "35423691320",
"admission_date": "1992-08-16",
"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": "a323fc77-ba2d-4e53-bca8-199775ea81a2",
"name": "rem"
},
"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 c66bVDvhdE4k1a8feZga3P5" \
--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 c66bVDvhdE4k1a8feZga3P5",
"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/9/bank-account" \
--header "Authorization: Bearer Da5g8veabP13ckd6VEf6h4Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/9/bank-account"
);
const headers = {
"Authorization": "Bearer Da5g8veabP13ckd6VEf6h4Z",
"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/19/bank-account" \
--header "Authorization: Bearer eV3da1P8vg6Z5Ec4bkfDha6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_id\": \"occaecati\",
\"agency\": \"ddfwxn\",
\"account\": \"acnsrvgjhzu\",
\"account_type\": \"poupança\",
\"pix_key\": \"oqeodaxadxbm\",
\"favorite\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/19/bank-account"
);
const headers = {
"Authorization": "Bearer eV3da1P8vg6Z5Ec4bkfDha6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_id": "occaecati",
"agency": "ddfwxn",
"account": "acnsrvgjhzu",
"account_type": "poupança",
"pix_key": "oqeodaxadxbm",
"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/13/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33" \
--header "Authorization: Bearer c56hd48gDaf3v1kZVPbE6ae" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_id\": \"non\",
\"agency\": \"kjnnddjfnf\",
\"account\": \"fwlzvbgxfamtcapi\",
\"account_type\": \"poupança\",
\"pix_key\": \"zsxbpilqagwgxvuddwxm\",
\"favorite\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/13/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33"
);
const headers = {
"Authorization": "Bearer c56hd48gDaf3v1kZVPbE6ae",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_id": "non",
"agency": "kjnnddjfnf",
"account": "fwlzvbgxfamtcapi",
"account_type": "poupança",
"pix_key": "zsxbpilqagwgxvuddwxm",
"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 hfgPvZV6baaDe31k5d864cE" \
--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 hfgPvZV6baaDe31k5d864cE",
"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/11/epi-deliveries" \
--header "Authorization: Bearer Eb636e1kagh5Pa8cVDdvfZ4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"est\",
\"status\": \"expired\",
\"epi_type_id\": \"praesentium\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/11/epi-deliveries"
);
const headers = {
"Authorization": "Bearer Eb636e1kagh5Pa8cVDdvfZ4",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "est",
"status": "expired",
"epi_type_id": "praesentium"
};
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/quo/epi-deliveries/pending-renewals-count" \
--header "Authorization: Bearer E3bfD4V8gcPd1a6evah5Z6k" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/quo/epi-deliveries/pending-renewals-count"
);
const headers = {
"Authorization": "Bearer E3bfD4V8gcPd1a6evah5Z6k",
"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/17/epi-deliveries/nisi" \
--header "Authorization: Bearer V8baZP153cfE6evgDakd6h4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/17/epi-deliveries/nisi"
);
const headers = {
"Authorization": "Bearer V8baZP153cfE6evgDakd6h4",
"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/8/epi-deliveries" \
--header "Authorization: Bearer D64f6vV83gehabdc5P1EZak" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"epi_type_id\": \"67fd2d01-ee23-30b9-ba97-1dccd9aec808\",
\"delivery_date\": \"2024-01-01\",
\"quantity\": 1,
\"condition\": \"Example Condition\",
\"delivered_by_employee_id\": \"6e6022fb-2caa-4ce7-94cc-54689b9b23ad\",
\"stock_id\": \"8e401290-295d-321c-8efa-d1fba3c3e4a2\",
\"confirm_insufficient_stock\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/8/epi-deliveries"
);
const headers = {
"Authorization": "Bearer D64f6vV83gehabdc5P1EZak",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"epi_type_id": "67fd2d01-ee23-30b9-ba97-1dccd9aec808",
"delivery_date": "2024-01-01",
"quantity": 1,
"condition": "Example Condition",
"delivered_by_employee_id": "6e6022fb-2caa-4ce7-94cc-54689b9b23ad",
"stock_id": "8e401290-295d-321c-8efa-d1fba3c3e4a2",
"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/possimus/epi-deliveries/kit" \
--header "Authorization: Bearer Phg16a8Zdek35cfvD6b4EaV" \
--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\": \"847206ab-e144-463c-8750-6e31ddedbee1\",
\"stock_id\": \"4d27e96b-e860-36a4-96ea-6e51e24a7d7f\",
\"confirm_insufficient_stock\": true,
\"items\": [
{
\"epi_type_id\": \"1e495c8d-366f-33b4-abe9-3ed8fc003763\",
\"quantity\": 1,
\"condition\": \"Example Items * condition\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/possimus/epi-deliveries/kit"
);
const headers = {
"Authorization": "Bearer Phg16a8Zdek35cfvD6b4EaV",
"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": "847206ab-e144-463c-8750-6e31ddedbee1",
"stock_id": "4d27e96b-e860-36a4-96ea-6e51e24a7d7f",
"confirm_insufficient_stock": true,
"items": [
{
"epi_type_id": "1e495c8d-366f-33b4-abe9-3ed8fc003763",
"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/quibusdam/epi-deliveries/dolores/promote-to-kit" \
--header "Authorization: Bearer EhDaV566P1Zvcba8d4fekg3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/quibusdam/epi-deliveries/dolores/promote-to-kit"
);
const headers = {
"Authorization": "Bearer EhDaV566P1Zvcba8d4fekg3",
"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/1/epi-deliveries/molestias" \
--header "Authorization: Bearer 5PfvZ1g8eEah4c6D3bV6akd" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"epi_type_id\": \"e980472c-badc-3947-b22e-9b1808476a12\",
\"delivery_date\": \"2024-01-01\",
\"quantity\": 1,
\"condition\": \"Example Condition\",
\"delivered_by_employee_id\": \"b6ef78ea-e59f-42c8-89b5-957cd89685fc\",
\"stock_id\": \"42a68751-2f71-3904-96b9-417c585b8891\",
\"confirm_insufficient_stock\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/1/epi-deliveries/molestias"
);
const headers = {
"Authorization": "Bearer 5PfvZ1g8eEah4c6D3bV6akd",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"epi_type_id": "e980472c-badc-3947-b22e-9b1808476a12",
"delivery_date": "2024-01-01",
"quantity": 1,
"condition": "Example Condition",
"delivered_by_employee_id": "b6ef78ea-e59f-42c8-89b5-957cd89685fc",
"stock_id": "42a68751-2f71-3904-96b9-417c585b8891",
"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/ut/epi-deliveries/aut" \
--header "Authorization: Bearer V3kdef6haZg4cE56D8Pv1ba" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/ut/epi-deliveries/aut"
);
const headers = {
"Authorization": "Bearer V3kdef6haZg4cE56D8Pv1ba",
"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 h64V61g8dcaeE3b5kZaDvfP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"created_at\",
\"sort_desc\": false,
\"page\": 40,
\"per_page\": 6,
\"q\": \"aperiam\",
\"employee_id\": \"quasi\",
\"has_term\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/20/epi-terms"
);
const headers = {
"Authorization": "Bearer h64V61g8dcaeE3b5kZaDvfP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "created_at",
"sort_desc": false,
"page": 40,
"per_page": 6,
"q": "aperiam",
"employee_id": "quasi",
"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/qui/epi-terms/95a352a7-3dcb-3d87-9b34-cf42d26c4cb5/upload" \
--header "Authorization: Bearer eZg1V63fdaP654hEDv8bakc" \
--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/qui/epi-terms/95a352a7-3dcb-3d87-9b34-cf42d26c4cb5/upload"
);
const headers = {
"Authorization": "Bearer eZg1V63fdaP654hEDv8bakc",
"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/sunt/epi-terms/8a12d405-6164-3973-a55b-8efe9705eb2e/document" \
--header "Authorization: Bearer 4D5Ecagbk1af83v6e6PdZVh" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/sunt/epi-terms/8a12d405-6164-3973-a55b-8efe9705eb2e/document"
);
const headers = {
"Authorization": "Bearer 4D5Ecagbk1af83v6e6PdZVh",
"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/ab0c1874-6729-3ba2-a1b1-dc7fcf1b2a14" \
--header "Authorization: Bearer bcag1Pevfad65Z64VEh8D3k" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/ab0c1874-6729-3ba2-a1b1-dc7fcf1b2a14"
);
const headers = {
"Authorization": "Bearer bcag1Pevfad65Z64VEh8D3k",
"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/46fa3630-6c47-38f3-92ad-c086e51ab489/info" \
--header "Authorization: Bearer Ed6kP1eh8baVDfg46acv3Z5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/46fa3630-6c47-38f3-92ad-c086e51ab489/info"
);
const headers = {
"Authorization": "Bearer Ed6kP1eh8baVDfg46acv3Z5",
"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/e605a6b6-6da0-3af1-85b9-6564c5baa592/download" \
--header "Authorization: Bearer 54ac1DaeEdb8gZvk6VPf6h3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/e605a6b6-6da0-3af1-85b9-6564c5baa592/download"
);
const headers = {
"Authorization": "Bearer 54ac1DaeEdb8gZvk6VPf6h3",
"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 VD36gebaPE8aZ4d1vh6c5fk" \
--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 VD36gebaPE8aZ4d1vh6c5fk",
"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 1g46d5ZPvcDaVab8Efhk3e6" \
--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 1g46d5ZPvcDaVab8Efhk3e6",
"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 hfDPveEc3b14Z8k6Va65gad" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"veritatis\",
\"document_type\": \"nfse\",
\"supplier_id\": \"doloremque\",
\"work_id\": \"dolores\",
\"products_status\": \"pending\",
\"financial_status\": \"pending\",
\"start_date\": \"2026-11-03T20:45:49\",
\"end_date\": \"2106-03-07\",
\"per_page\": 8
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);
const headers = {
"Authorization": "Bearer hfDPveEc3b14Z8k6Va65gad",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "veritatis",
"document_type": "nfse",
"supplier_id": "doloremque",
"work_id": "dolores",
"products_status": "pending",
"financial_status": "pending",
"start_date": "2026-11-03T20:45:49",
"end_date": "2106-03-07",
"per_page": 8
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "93554159-4990-3f47-bbfc-145bfd1758d5",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "09116781936801540066451790361771874417833528",
"nfe_number": "117364",
"nfe_series": "83",
"issue_date": "1970-06-09T03:00:00.000000Z",
"total_value": "2741.44",
"emit": {
"cnpj": "78646678023690",
"name": "Watsica, Schumm and Corwin"
},
"dest": {
"document": "62478622649070",
"name": "O'Kon Inc"
},
"supplier": {
"id": "a323fc79-2696-4188-a2fd-142b87d47cec",
"name": "Jaqueline Flores Santacruz",
"document": "33.528.709/0001-13"
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
},
{
"id": "9d5a4209-b057-3c40-bbac-b345e458fd49",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "07515647560175558910916797054657837866895534",
"nfe_number": "504061",
"nfe_series": "15",
"issue_date": "1974-11-01T03:00:00.000000Z",
"total_value": "4731.04",
"emit": {
"cnpj": "21495812916381",
"name": "Koch, Stiedemann and Stracke"
},
"dest": {
"document": "79760702584856",
"name": "Connelly Group"
},
"supplier": {
"id": "a323fc79-2b2c-41d8-98fa-bc3da451c016",
"name": "Dr. Fátima Beltrão",
"document": "55.247.509/0001-25"
},
"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 DachdaZ1vV8g3fe56b4E6Pk" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"s3_file_path\": \"placeat\",
\"original_filename\": \".xml$\\/i\",
\"work_ids\": [
\"et\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);
const headers = {
"Authorization": "Bearer DachdaZ1vV8g3fe56b4E6Pk",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"s3_file_path": "placeat",
"original_filename": ".xml$\/i",
"work_ids": [
"et"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "c7af4c55-a16b-3122-b2ac-c3d4d34cd8c6",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "74592180201282467706850811335140044663270241",
"nfe_number": "897165",
"nfe_series": "03",
"issue_date": "2004-05-17T03:00:00.000000Z",
"total_value": "9325.81",
"emit": {
"cnpj": "29277610318772",
"name": "Adams Ltd"
},
"dest": {
"document": "88656079961781",
"name": "Rath-Nicolas"
},
"supplier": {
"id": "a323fc79-3749-4f11-9bd2-3afc7104dfb3",
"name": "Daiana Uchoa",
"document": "70.369.357/0001-27"
},
"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/ex" \
--header "Authorization: Bearer Vak16dcb45E3ZDhPg68evfa" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/ex"
);
const headers = {
"Authorization": "Bearer Vak16dcb45E3ZDhPg68evfa",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "0d6e96a1-6097-3b1b-ba5b-104d0d5dcfa7",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "07281007272533153347872031421418071152195407",
"nfe_number": "728675",
"nfe_series": "57",
"issue_date": "1992-03-15T03:00:00.000000Z",
"total_value": "7929.99",
"emit": {
"cnpj": "00134796377171",
"name": "Cronin-Flatley"
},
"dest": {
"document": "25985057193748",
"name": "Koelpin and Sons"
},
"supplier": {
"id": "a323fc79-3f62-4e99-af85-6639d8fd1f49",
"name": "Sr. Victor João Toledo Filho",
"document": "44.512.780/0001-24"
},
"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.
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/error" \
--header "Authorization: Bearer 3Pghdf6cDZ5kv61V4a8Eaeb" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/error"
);
const headers = {
"Authorization": "Bearer 3Pghdf6cDZ5kv61V4a8Eaeb",
"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/harum/files" \
--header "Authorization: Bearer 3h1vc4agE85dV6akZP6befD" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"file\": {
\"path\": \"nobis\",
\"name\": \"et\",
\"extension\": \"modi\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/harum/files"
);
const headers = {
"Authorization": "Bearer 3h1vc4agE85dV6akZP6befD",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"file": {
"path": "nobis",
"name": "et",
"extension": "modi"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d5cf1fb5-1288-3464-af06-ba806ec337d1",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "84036680183810407614502756108585557907026786",
"nfe_number": "331418",
"nfe_series": "37",
"issue_date": "1992-07-26T03:00:00.000000Z",
"total_value": "5968.14",
"emit": {
"cnpj": "00759998181521",
"name": "Bosco Group"
},
"dest": {
"document": "14817392894868",
"name": "Zboncak-Baumbach"
},
"supplier": {
"id": "a323fc79-4a87-42ec-8f47-6a06e0687921",
"name": "Caio André Chaves",
"document": "46.525.962/0001-65"
},
"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/commodi/files/non" \
--header "Authorization: Bearer gdPav1ah6DeZ64kb8VfEc35" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/commodi/files/non"
);
const headers = {
"Authorization": "Bearer gdPav1ah6DeZ64kb8VfEc35",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "8dedae17-d9f1-34a6-ae7d-85d10a6ff038",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "46743285138846704694723470921117272524279456",
"nfe_number": "776613",
"nfe_series": "42",
"issue_date": "2002-09-10T03:00:00.000000Z",
"total_value": "9091.41",
"emit": {
"cnpj": "90463504454855",
"name": "Connelly, Auer and Maggio"
},
"dest": {
"document": "31304976104593",
"name": "Beahan-Leannon"
},
"supplier": {
"id": "a323fc79-5538-4b66-8bc9-9af95db45cf9",
"name": "Dr. Milena Michele Ferreira Neto",
"document": "43.768.092/0001-67"
},
"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/enim/works" \
--header "Authorization: Bearer 5g1Dkf8bZVveP36aEd46ahc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"work_ids\": [
\"accusantium\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/enim/works"
);
const headers = {
"Authorization": "Bearer 5g1Dkf8bZVveP36aEd46ahc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"work_ids": [
"accusantium"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a3a17298-9c41-3a6f-aa20-85eacd85959d",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "19017639754752656035624474535964101769065564",
"nfe_number": "707710",
"nfe_series": "27",
"issue_date": "2004-03-24T03:00:00.000000Z",
"total_value": "1109.68",
"emit": {
"cnpj": "65369306259240",
"name": "Oberbrunner Inc"
},
"dest": {
"document": "61408301153016",
"name": "Senger Ltd"
},
"supplier": {
"id": "a323fc79-5dcf-4cfd-9a99-8f424f97cf8d",
"name": "Christopher Santos Sobrinho",
"document": "61.943.738/0001-87"
},
"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/libero/installments" \
--header "Authorization: Bearer 3Vh6DvZbcEaf6g4ePkd815a" \
--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/libero/installments"
);
const headers = {
"Authorization": "Bearer 3Vh6DvZbcEaf6g4ePkd815a",
"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": "140366bf-af1f-3814-8868-7fc32d425568",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "20060470181545608740699608684466266927593247",
"nfe_number": "310800",
"nfe_series": "12",
"issue_date": "1973-11-06T03:00:00.000000Z",
"total_value": "4321.08",
"emit": {
"cnpj": "77326205155339",
"name": "Roberts-Hirthe"
},
"dest": {
"document": "95101132540284",
"name": "Gerhold Inc"
},
"supplier": {
"id": "a323fc79-66b9-4dc9-8d05-56ce8721b44c",
"name": "Fábio Dener Quintana Filho",
"document": "14.754.086/0001-52"
},
"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 4cb6dZVk6EPfveg1D3ah58a" \
--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\": \"61873965-e90d-3cb6-8b55-c209bd66cd58\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/nfe/products"
);
const headers = {
"Authorization": "Bearer 4cb6dZVk6EPfveg1D3ah58a",
"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": "61873965-e90d-3cb6-8b55-c209bd66cd58"
};
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 5P18vEfDa3adeg66hcZbV4k" \
--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 5P18vEfDa3adeg66hcZbV4k",
"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/iusto" \
--header "Authorization: Bearer 4a8hbfVP6vcDE5a3gkZd6e1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/iusto"
);
const headers = {
"Authorization": "Bearer 4a8hbfVP6vcDE5a3gkZd6e1",
"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"
},
"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/praesentium" \
--header "Authorization: Bearer b6EDhea843VgvZd1fa5P6kc" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/praesentium"
);
const headers = {
"Authorization": "Bearer b6EDhea843VgvZd1fa5P6kc",
"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/reiciendis/products?sort_by=created_at&sort_desc=1&page=1&per_page=15&status=pending&q=Produto+ABC" \
--header "Authorization: Bearer fa6Vvhc16k3PZ8age54dbDE" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/reiciendis/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 fa6Vvhc16k3PZ8age54dbDE",
"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/sapiente/distributions" \
--header "Authorization: Bearer e66EbhcZfk3gV5da84v1DaP" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/sapiente/distributions"
);
const headers = {
"Authorization": "Bearer e66EbhcZfk3gV5da84v1DaP",
"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/rerum/products/link" \
--header "Authorization: Bearer 1hEgkfe43vPZb8V5d6aD6ac" \
--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/rerum/products/link"
);
const headers = {
"Authorization": "Bearer 1hEgkfe43vPZb8V5d6aD6ac",
"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 V5P84bk1Z66cegvDh3afaEd" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"vel\",
\"sort_desc\": true,
\"page\": 14,
\"per_page\": 22
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/locations/states"
);
const headers = {
"Authorization": "Bearer V5P84bk1Z66cegvDh3afaEd",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "vel",
"sort_desc": true,
"page": 14,
"per_page": 22
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "voluptatem rerum",
"abbreviation": "ID"
},
{
"id": null,
"name": "sed enim",
"abbreviation": "FP"
}
],
"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 Z3Eb6e1hav846DgV5kfacdP" \
--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 Z3Eb6e1hav846DgV5kfacdP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "New Carissa"
},
{
"id": null,
"name": "Sengermouth"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 fba16kZv3Pach4Eg5V6dDe8" \
--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 fba16kZv3Pach4Eg5V6dDe8",
"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 D5Pfe83VaghaZc4kd6v1Eb6" \
--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 D5Pfe83VaghaZc4kd6v1Eb6",
"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 V6hDdcb1EPvfeg58kZ46aa3" \
--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 V6hDdcb1EPvfeg58kZ46aa3",
"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 PgEfbce66davhZ4D8k315aV" \
--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 PgEfbce66davhZ4D8k315aV",
"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 g8c6e3Dha5bdE4kf6ZVv1aP" \
--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 g8c6e3Dha5bdE4kf6ZVv1aP",
"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=delectus&document=ullam&work_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&cost_center_id=37f6e2c2-2cc7-3aa7-9965-2c103eca6d57&bank_account_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3" \
--header "Authorization: Bearer 8c6kEa31eDVafh64P5dvZgb" \
--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": "delectus",
"document": "ullam",
"work_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
"cost_center_id": "37f6e2c2-2cc7-3aa7-9965-2c103eca6d57",
"bank_account_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 8c6kEa31eDVafh64P5dvZgb",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "f4351651-34d8-358a-979d-1138f570a25f",
"receipt_number": "REC-9412",
"receiver_type": "custom",
"receiver": {
"id": null,
"name": "Jacinto Beer I",
"document": "283.922.478-55"
},
"payment": {
"amount": 7407.95,
"amount_in_words": "Valor por extenso de teste",
"method": "bank_transfer",
"description": "Autem provident saepe deleniti quisquam accusamus consequatur qui et."
},
"issuer": {
"name": "VonRueden and Sons",
"document": "49.359.954/0762-55"
},
"issue": {
"date": "2026-10-09",
"city": "Jasonhaven",
"state": "SP"
},
"created_by": {
"id": "a323fc79-9991-40fc-a0a6-34e36f682b82",
"name": "Zackery Ward PhD"
},
"created_at": null,
"updated_at": null
},
{
"id": "431a5d68-b509-3df9-aaff-d9b0d83ba992",
"receipt_number": "REC-3338",
"receiver_type": "custom",
"receiver": {
"id": null,
"name": "Uriah Ruecker",
"document": "893.536.237-18"
},
"payment": {
"amount": 7853.71,
"amount_in_words": "Valor por extenso de teste",
"method": "pix",
"description": "Et fugit magni id harum veniam quod rem."
},
"issuer": {
"name": "Torphy-Auer",
"document": "88.910.281/2612-01"
},
"issue": {
"date": "2026-10-28",
"city": "Nicolaburgh",
"state": "MG"
},
"created_by": {
"id": "a323fc79-9cbc-4d36-a91b-9cf5e37d84bd",
"name": "Wendy Waelchi"
},
"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=tempore&document=officia&work_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&cost_center_id=0f5b89b1-7b49-30b5-8b89-c322a5e66bc0&bank_account_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3" \
--header "Authorization: Bearer 6bZVa5hv3gEDkPc486dea1f" \
--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": "tempore",
"document": "officia",
"work_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
"cost_center_id": "0f5b89b1-7b49-30b5-8b89-c322a5e66bc0",
"bank_account_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 6bZVa5hv3gEDkPc486dea1f",
"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 fZhk5e1cg8PDEVd4a663avb" \
--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 fZhk5e1cg8PDEVd4a663avb",
"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 gPbfa66431VvkDecdE58aZh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"methods\": [
{
\"method\": \"cash\",
\"eligible\": false
}
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/cash-flow-config"
);
const headers = {
"Authorization": "Bearer gPbfa66431VvkDecdE58aZh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"methods": [
{
"method": "cash",
"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 d64VfvcDbag8EP1635ehkZa" \
--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 d64VfvcDbag8EP1635ehkZa",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "4adcbce6-9d1a-3128-a046-f5fa42c24bb4",
"receipt_number": "REC-3575",
"receiver_type": "employee",
"receiver": {
"id": null,
"name": "Gregoria Ondricka",
"document": "496.230.369-52"
},
"payment": {
"amount": 2789.5,
"amount_in_words": "Valor por extenso de teste",
"method": "bank_transfer",
"description": "Animi consequatur aut nisi sunt inventore in velit."
},
"issuer": {
"name": "Luettgen-McGlynn",
"document": "09.048.786/2693-88"
},
"issue": {
"date": "2026-10-10",
"city": "Wilbertborough",
"state": "SC"
},
"created_by": {
"id": "a323fc79-b073-46de-8609-8d033d748344",
"name": "Mrs. Kira Kuhlman"
},
"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 h34v5Vc6DaPgdE8k6fa1beZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"receiver_type\": \"Example Receiver type\",
\"employee_id\": \"c28eea58-cea0-42f2-9697-09274f75f118\",
\"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\": \"4084d72c-0f2e-3a0e-bc9e-9b7c8a87467f\",
\"cost_center_id\": \"527f0609-a240-39f4-8ab0-504ffb61a3eb\",
\"bank_account_id\": \"ecc8aaea-6e49-3a73-b834-10ce7b5ce90d\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts"
);
const headers = {
"Authorization": "Bearer h34v5Vc6DaPgdE8k6fa1beZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"receiver_type": "Example Receiver type",
"employee_id": "c28eea58-cea0-42f2-9697-09274f75f118",
"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": "4084d72c-0f2e-3a0e-bc9e-9b7c8a87467f",
"cost_center_id": "527f0609-a240-39f4-8ab0-504ffb61a3eb",
"bank_account_id": "ecc8aaea-6e49-3a73-b834-10ce7b5ce90d"
};
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 VEed6c51ab8PZh4kfgDa3v6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"receiver_type\": \"Example Receiver type\",
\"employee_id\": \"18c44f18-8834-4343-be36-787fb12a36da\",
\"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\": \"2eba0cf6-f2f8-3d63-b9a9-2c9083b276d0\",
\"cost_center_id\": \"e2f36cc4-b767-3bda-9140-dada4764f36e\",
\"bank_account_id\": \"ab127d6a-55c1-33c0-9e27-d4e3d9d4048e\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer VEed6c51ab8PZh4kfgDa3v6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"receiver_type": "Example Receiver type",
"employee_id": "18c44f18-8834-4343-be36-787fb12a36da",
"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": "2eba0cf6-f2f8-3d63-b9a9-2c9083b276d0",
"cost_center_id": "e2f36cc4-b767-3bda-9140-dada4764f36e",
"bank_account_id": "ab127d6a-55c1-33c0-9e27-d4e3d9d4048e"
};
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 c41EPgVZf3a865ve6dhDakb" \
--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 c41EPgVZf3a865ve6dhDakb",
"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/14/receipts" \
--header "Authorization: Bearer afd5c4PV8Dvga6Z3Eh6keb1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/14/receipts"
);
const headers = {
"Authorization": "Bearer afd5c4PV8Dvga6Z3Eh6keb1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "a217d314-4617-3fe5-aa84-45449b44c1c5",
"receipt_number": "REC-6570",
"receiver_type": "custom",
"receiver": {
"id": null,
"name": "Craig Nitzsche",
"document": "324.100.871-22"
},
"payment": {
"amount": 6796.69,
"amount_in_words": "Valor por extenso de teste",
"method": "cash",
"description": "Et magnam fuga sunt officiis nostrum vel."
},
"issuer": {
"name": "Anderson, Wiegand and Hamill",
"document": "95.527.710/8063-72"
},
"issue": {
"date": "2026-10-19",
"city": "Lennaburgh",
"state": "SC"
},
"created_by": {
"id": "a323fc79-daa9-4005-82fe-fc8001ab8898",
"name": "Nelda Metz"
},
"created_at": null,
"updated_at": null
},
{
"id": "91f2bf7d-1230-3c16-bcb5-627cdc7577a3",
"receipt_number": "REC-2969",
"receiver_type": "employee",
"receiver": {
"id": null,
"name": "Adonis Wunsch",
"document": "619.844.041-32"
},
"payment": {
"amount": 3047,
"amount_in_words": "Valor por extenso de teste",
"method": "bank_transfer",
"description": "Est quia sint aut soluta nihil."
},
"issuer": {
"name": "Klein-Lowe",
"document": "39.382.185/6373-93"
},
"issue": {
"date": "2026-10-09",
"city": "Schimmelstad",
"state": "PE"
},
"created_by": {
"id": "a323fc79-dd06-4d51-81db-3b07517cac1d",
"name": "Bernard McClure"
},
"created_at": null,
"updated_at": null
}
],
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"has_more_pages": false
},
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Permission Groups
Endpoints for permission groups
List ungrouped permissions
requires authentication permission-group index
List all permissions that do not belong to any permission group.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/permission-groups/ungrouped-permissions?q=Permission+name&page=1&per_page=10" \
--header "Authorization: Bearer avVEPb6fg36Dad4k518cheZ" \
--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 avVEPb6fg36Dad4k518cheZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "c068e6a7-62e4-3f75-998a-e8245bcb494e",
"name": "quae",
"display_name": "Qui et sed doloremque laboriosam."
},
{
"id": "e3cc6201-813f-33b6-9bda-8dda1ffddfac",
"name": "voluptatem",
"display_name": "Nobis ipsam dolores porro porro 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.
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 Db1g8c6kZ6Ee5ha4vPaVdf3" \
--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 Db1g8c6kZ6Ee5ha4vPaVdf3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "06e711fe-6698-3641-b809-368ed4af9e76",
"name": "deleniti-ratione-dolorem",
"display_name": "et quia est",
"created_at": null,
"updated_at": null
},
{
"id": "9a4476ce-306a-3ee4-b02c-53de5ec57260",
"name": "accusantium-doloribus",
"display_name": "ratione sit error",
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 5d834vPEDhfc1Zbgea6Vka6" \
--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 5d834vPEDhfc1Zbgea6Vka6",
"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 Ec56a8DfV4Z3vbkh6dPea1g" \
--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 Ec56a8DfV4Z3vbkh6dPea1g",
"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 6d43cV8ga15EPDa6khevfbZ" \
--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 6d43cV8ga15EPDa6khevfbZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "1e0ee3ec-a6c0-3034-af22-7bc19c19daa6",
"name": "quia-cum",
"display_name": "ad harum quod",
"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 VDhg6451P8ckE6dfaZ3ebav" \
--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 VDhg6451P8ckE6dfaZ3ebav",
"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 vdefEa1g4chP8kV6Z5a6b3D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"68340fb1-d62d-3bc7-babb-ac197c7a696d\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);
const headers = {
"Authorization": "Bearer vdefEa1g4chP8kV6Z5a6b3D",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"68340fb1-d62d-3bc7-babb-ac197c7a696d"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "f9d02a49-9156-368e-9265-b155a18c48ba",
"name": "neque-quae-consequatur",
"display_name": "et omnis ea",
"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 E1cghafeV8vZ35d4P6kDab6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"2b4c7b52-7f6f-3a1e-bdf3-5be44a420964\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);
const headers = {
"Authorization": "Bearer E1cghafeV8vZ35d4P6kDab6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"2b4c7b52-7f6f-3a1e-bdf3-5be44a420964"
]
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "e90c4aad-cf75-30b8-905f-bb122b88a3a5",
"name": "est-excepturi-quod",
"display_name": "cumque fuga 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.
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 3Pe6v1da5k8g4bDVhEf6cZa" \
--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 3Pe6v1da5k8g4bDVhEf6cZa",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "261fe2db-cb7a-3956-8b37-156f1247a782",
"name": "Sônia Abreu Galvão",
"created_at": null,
"updated_at": null
},
{
"id": "41cc4b85-5a93-3ddc-aa94-054ad788d497",
"name": "Mel Lia Uchoa Jr.",
"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/rerum" \
--header "Authorization: Bearer D56cZh6v3dEaP4a1feV8kbg" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-brands/rerum"
);
const headers = {
"Authorization": "Bearer D56cZh6v3dEaP4a1feV8kbg",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "fc71597e-1401-330e-a3e3-96a999e1dbdc",
"name": "Katherine Garcia",
"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 P65e6ha8ZcgV3Da1v4fEkdb" \
--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 P65e6ha8ZcgV3Da1v4fEkdb",
"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/culpa" \
--header "Authorization: Bearer Df3h5Pa6kgb41dZvVEc8ea6" \
--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/culpa"
);
const headers = {
"Authorization": "Bearer Df3h5Pa6kgb41dZvVEc8ea6",
"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/laboriosam" \
--header "Authorization: Bearer Dc8d34k6Zbhg51PveaVa6fE" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-brands/laboriosam"
);
const headers = {
"Authorization": "Bearer Dc8d34k6Zbhg51PveaVa6fE",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Families
Endpoints for product families
List product families
requires authentication product-family index
List all product families
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-families?is_epi=1&q=Structure" \
--header "Authorization: Bearer b3kcZ8fD1665dE4hPegVava" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families"
);
const params = {
"is_epi": "1",
"q": "Structure",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer b3kcZ8fD1665dE4hPegVava",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "f00b590f-56c4-355b-bfab-7624f3bf0b7d",
"name": "Gisela Milena Benites Jr.",
"is_epi": false,
"created_at": null,
"updated_at": null
},
{
"id": "1014e405-b539-3c99-8d14-ee3a620d86ce",
"name": "Ivan Batista",
"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/qui" \
--header "Authorization: Bearer g3k85f1hbv6E6ZVca4DeaPd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families/qui"
);
const headers = {
"Authorization": "Bearer g3k85f1hbv6E6ZVca4DeaPd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "972bca87-8391-37c7-bb5c-bb0866351f39",
"name": "Emanuel Noel Azevedo",
"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 1864dagPcEVDfZv36kaebh5" \
--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 1864dagPcEVDfZv36kaebh5",
"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/vel" \
--header "Authorization: Bearer dg81aEh5bk36c4VaPeZfD6v" \
--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/vel"
);
const headers = {
"Authorization": "Bearer dg81aEh5bk36c4VaPeZfD6v",
"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/voluptas" \
--header "Authorization: Bearer cZPahVf3ak16evEdb58D46g" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families/voluptas"
);
const headers = {
"Authorization": "Bearer cZPahVf3ak16evEdb58D46g",
"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 vV6h8gkac43af6bEDe5ZdP1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"Example Q\",
\"work_id\": \"389b6b99-2038-3ca9-8184-491ca4b07f49\",
\"user_id\": \"a455f900-3e37-384a-acc4-cdfe17777646\",
\"responsible_id\": \"79f95cc4-d58e-3802-9b0f-8d6abb0af171\",
\"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 vV6h8gkac43af6bEDe5ZdP1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "Example Q",
"work_id": "389b6b99-2038-3ca9-8184-491ca4b07f49",
"user_id": "a455f900-3e37-384a-acc4-cdfe17777646",
"responsible_id": "79f95cc4-d58e-3802-9b0f-8d6abb0af171",
"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": "97fc9278-25dc-38cf-b186-bed6c27d2e6d",
"name": "Qui quisquam magnam autem.",
"description": null,
"work": {
"id": "a323fc7a-705b-4f45-9586-7853453d6883",
"name": "Otávio Cauan Campos"
},
"user": {
"id": "a323fc7a-73a1-4a21-9a01-504af16615c5",
"name": "Julian Green"
},
"created_at": null,
"updated_at": null
},
{
"id": "26e47bb9-36d4-37b0-8744-15f1d69f6351",
"name": "Corporis facilis doloremque qui.",
"description": null,
"work": {
"id": "a323fc7a-772e-46a8-a3fb-c23f0c745f1c",
"name": "Regina Pacheco"
},
"user": {
"id": "a323fc7a-79e1-4d03-a302-017d8e116434",
"name": "Lauren Buckridge"
},
"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/quo" \
--header "Authorization: Bearer ka6fb68DhEgdVvcZP4e51a3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/quo"
);
const headers = {
"Authorization": "Bearer ka6fb68DhEgdVvcZP4e51a3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "1828d7f3-c1f4-3851-b2bc-edd64f4cb095",
"name": "Veritatis ea aut numquam.",
"description": null,
"work": {
"id": "a323fc7a-810d-4361-b037-ffe5f33e78e0",
"name": "Ingrid Pacheco Sobrinho"
},
"user": {
"id": "a323fc7a-83f2-47c5-a91e-8528afe3de0f",
"name": "Matteo Leannon"
},
"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/nulla/items" \
--header "Authorization: Bearer Z61V5fabE4dk3D6cevag8Ph" \
--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/nulla/items"
);
const headers = {
"Authorization": "Bearer Z61V5fabE4dk3D6cevag8Ph",
"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": "e05db2f9-d23f-3db7-93c4-2611700759ca",
"product": {
"id": "a323fc7a-98ec-41b0-8bc7-7b43d8747b22",
"name": "Dr. Artur Quintana",
"code": "PRD-115709",
"unit": {
"id": "a323fc7a-9703-4402-8936-a8f80382feb6",
"name": "Sr. Leonardo Beltrão Gil Sobrinho",
"abbreviation": "Adriano Elias Ferreira"
}
},
"quantity": 210.3528,
"observation": "Nostrum ea sit qui quo provident odio.",
"created_at": null,
"updated_at": null
},
{
"id": "f8671db1-7cdd-39ed-b0e8-f8bafac96565",
"product": {
"id": "a323fc7a-a693-4cd6-8c47-484ccd4705fd",
"name": "Sra. Stella Vieira Assunção Neto",
"code": "PRD-451166",
"unit": {
"id": "a323fc7a-a571-4a03-b6dd-7306dc9e11dd",
"name": "Dr. João Dominato",
"abbreviation": "Juliano Saito Soto Filho"
}
},
"quantity": 722.2302,
"observation": "Aut eum mollitia aut laborum maiores.",
"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 aev4VZd3f651c6kPEbga8Dh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"9dd3b8cd-af42-3b7e-838e-903d04a24e45\",
\"items\": [
{
\"product_id\": \"c8acf86d-0168-3c56-ba87-bad69f015329\",
\"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 aev4VZd3f651c6kPEbga8Dh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "9dd3b8cd-af42-3b7e-838e-903d04a24e45",
"items": [
{
"product_id": "c8acf86d-0168-3c56-ba87-bad69f015329",
"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/accusamus" \
--header "Authorization: Bearer f6d8kahDVvZ4P5Eba6e3c1g" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"items\": [
{
\"id\": \"047ec8bf-ce57-3db0-a38d-3d1044dc4cdf\",
\"product_id\": \"0a1f80cc-fbc8-37a0-9d4b-f7d224ea1e50\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/accusamus"
);
const headers = {
"Authorization": "Bearer f6d8kahDVvZ4P5Eba6e3c1g",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"items": [
{
"id": "047ec8bf-ce57-3db0-a38d-3d1044dc4cdf",
"product_id": "0a1f80cc-fbc8-37a0-9d4b-f7d224ea1e50",
"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/consequuntur" \
--header "Authorization: Bearer kaa4d1gPebVZ56cf86hE3vD" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/consequuntur"
);
const headers = {
"Authorization": "Bearer kaa4d1gPebVZ56cf86hE3vD",
"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/suscipit/items" \
--header "Authorization: Bearer baVa86kPED6gh4fc5Z1dv3e" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"product_id\": \"29a2cce6-a504-3990-9b36-0d41690f904e\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/suscipit/items"
);
const headers = {
"Authorization": "Bearer baVa86kPED6gh4fc5Z1dv3e",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"product_id": "29a2cce6-a504-3990-9b36-0d41690f904e",
"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/natus" \
--header "Authorization: Bearer 6P56abEvahDV4fekd183gZc" \
--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/natus"
);
const headers = {
"Authorization": "Bearer 6P56abEvahDV4fekd183gZc",
"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/ut/items" \
--header "Authorization: Bearer aPgakd354f66eh1c8ZbEvDV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"9bf5fe64-917c-3183-bf0e-7ba77b2fd09c\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/ut/items"
);
const headers = {
"Authorization": "Bearer aPgakd354f66eh1c8ZbEvDV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"9bf5fe64-917c-3183-bf0e-7ba77b2fd09c"
]
};
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/sit/sync-items" \
--header "Authorization: Bearer a566bE1dhZc4Ve3vkfga8PD" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"id\": \"1ba24dec-d390-384e-92d9-8378b89a3e18\",
\"product_id\": \"be5296b0-efc5-3b91-ad8f-dad3709a53da\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/sit/sync-items"
);
const headers = {
"Authorization": "Bearer a566bE1dhZc4Ve3vkfga8PD",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"id": "1ba24dec-d390-384e-92d9-8378b89a3e18",
"product_id": "be5296b0-efc5-3b91-ad8f-dad3709a53da",
"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/labore/fulfill" \
--header "Authorization: Bearer da6kaevcfVP5h3D8Z41b6gE" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"fulfillment_type\": \"Example Fulfillment type\",
\"stock_id\": \"aaab8994-51d6-37ba-b3c3-b674835d7587\",
\"quantity\": 1,
\"source_stock_id\": \"17717c0c-ffcf-3e30-b3e3-00ac6f71f533\",
\"reason\": \"Example Reason\",
\"origins\": [
{
\"supplier_product_id\": \"d785f286-ecf3-3376-8d76-b5c6541bfbab\",
\"quantity\": 1
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/labore/fulfill"
);
const headers = {
"Authorization": "Bearer da6kaevcfVP5h3D8Z41b6gE",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"fulfillment_type": "Example Fulfillment type",
"stock_id": "aaab8994-51d6-37ba-b3c3-b674835d7587",
"quantity": 1,
"source_stock_id": "17717c0c-ffcf-3e30-b3e3-00ac6f71f533",
"reason": "Example Reason",
"origins": [
{
"supplier_product_id": "d785f286-ecf3-3376-8d76-b5c6541bfbab",
"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/perspiciatis/fulfillments" \
--header "Authorization: Bearer 83Z6PkVgvDb1Ed5feaa46ch" \
--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/perspiciatis/fulfillments"
);
const headers = {
"Authorization": "Bearer 83Z6PkVgvDb1Ed5feaa46ch",
"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": "5a339682-673c-38b5-b3ac-d5fc108cf5cb",
"quantity": 7.0005,
"fulfilled_at": "2026-11-03T22:05:51.000000Z",
"created_at": null
},
{
"id": "321e75f9-33ef-3c14-8964-86e1ff3b8b57",
"quantity": 24.7775,
"fulfilled_at": "2026-10-24T13:59:00.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/cumque" \
--header "Authorization: Bearer 1f3baDca6Vvke8E645PZdgh" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/cumque"
);
const headers = {
"Authorization": "Bearer 1f3baDca6Vvke8E645PZdgh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d0d66c5d-4b8c-3a5f-9bce-86c7817036f8",
"product": {
"id": "a323fc7e-bd84-4a44-b0f1-f488492cc66a",
"name": "Jefferson Domingues Urias",
"code": "PRD-187218",
"unit": {
"id": "a323fc7e-ba4e-4207-91a8-20747c95c1e8",
"name": "Rodolfo Lozano Balestero",
"abbreviation": "Dr. Caio José Branco"
}
},
"quantity": 344.8964,
"quantity_fulfilled": 0,
"quantity_pending": 344.8964,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": 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 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/ab/pending-items" \
--header "Authorization: Bearer Vk8bvcgP6d45ehE1aZfD3a6" \
--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/ab/pending-items"
);
const headers = {
"Authorization": "Bearer Vk8bvcgP6d45ehE1aZfD3a6",
"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": "dff98ee0-71ad-3d7c-8ba7-4062220a9efb",
"product": {
"id": "a323fc7e-f189-47cd-965f-8bf094e88185",
"name": "Cristiano Wesley Neves Neto",
"code": "PRD-281066",
"unit": {
"id": "a323fc7e-ee6c-4ad0-a9fd-91f023f0cb59",
"name": "Fabrício Alcantara Neto",
"abbreviation": "Juliano Quintana"
}
},
"quantity": 260.1796,
"quantity_fulfilled": 0,
"quantity_pending": 260.1796,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": null,
"created_at": null,
"updated_at": null
},
{
"id": "f7e67c7a-d695-30fd-9bf1-0d769bae330e",
"product": {
"id": "a323fc7f-3aea-43f7-971e-269abce934c4",
"name": "Bruno Jerônimo Madeira Jr.",
"code": "PRD-254666",
"unit": {
"id": "a323fc7f-379a-4637-981b-8fe24b9d0e4f",
"name": "Luana Sanches Lozano",
"abbreviation": "Eduardo Valente"
}
},
"quantity": 242.9591,
"quantity_fulfilled": 0,
"quantity_pending": 242.9591,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Itaque error magnam nostrum quis consequatur nulla sequi.",
"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/excepturi" \
--header "Authorization: Bearer hg1E58bP6643DcadZaevfkV" \
--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/excepturi"
);
const headers = {
"Authorization": "Bearer hg1E58bP6643DcadZaevfkV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "f51b3bfd-10c3-3da4-a6d1-bef28342b936",
"product": {
"id": "a323fc7f-712c-4884-8d10-ba823c3ac702",
"name": "Dr. Cláudio Santiago Correia Sobrinho",
"code": "PRD-148556",
"unit": {
"id": "a323fc7f-6e27-492d-844c-d370f422ef1c",
"name": "Dr. Laura Ferreira Filho",
"abbreviation": "Sr. Wilson Sanches de Aguiar Jr."
}
},
"quantity": 332.5882,
"quantity_fulfilled": 0,
"quantity_pending": 332.5882,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Quam ut quia aut et odit rerum sapiente.",
"created_at": null,
"updated_at": null
},
{
"id": "f53cf500-3f42-36e9-a2d7-e6819c43ffc3",
"product": {
"id": "a323fc7f-8367-45bd-af32-d5a8f6c8c5fc",
"name": "Deivid Maldonado Dominato Jr.",
"code": "PRD-603804",
"unit": {
"id": "a323fc7f-81d2-4996-9943-264c1b17cbb1",
"name": "Sr. Mário Horácio Fonseca",
"abbreviation": "Eduardo Montenegro Lutero Neto"
}
},
"quantity": 686.3574,
"quantity_fulfilled": 0,
"quantity_pending": 686.3574,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": 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.
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 DaVdegv63h1E6kf84ZcPab5" \
--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\": \"0d8074c6-4cea-334d-b458-6d9890b2b174\",
\"work_location_id\": \"ac17d931-28c7-39b4-a509-1971d7a8272e\",
\"user_id\": \"69c119c4-8e73-3cb5-a403-07cf6b620588\",
\"status_id\": \"4f1ae23e-9428-32af-ac63-2287ca231210\",
\"priority\": \"Example Priority\",
\"needed_at_from\": \"Example Needed at from\",
\"needed_at_to\": \"Example Needed at to\",
\"responsible_id\": \"cc69d5f2-9890-3f81-99d4-0adddc7ad48b\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests"
);
const headers = {
"Authorization": "Bearer DaVdegv63h1E6kf84ZcPab5",
"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": "0d8074c6-4cea-334d-b458-6d9890b2b174",
"work_location_id": "ac17d931-28c7-39b4-a509-1971d7a8272e",
"user_id": "69c119c4-8e73-3cb5-a403-07cf6b620588",
"status_id": "4f1ae23e-9428-32af-ac63-2287ca231210",
"priority": "Example Priority",
"needed_at_from": "Example Needed at from",
"needed_at_to": "Example Needed at to",
"responsible_id": "cc69d5f2-9890-3f81-99d4-0adddc7ad48b"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "c6920ffb-6338-3597-ab61-a23710e97977",
"code": null,
"name": "Ut ratione autem.",
"description": null,
"work": {
"id": "a323fc7b-c099-4dfe-bc4f-f6f7faeb530e",
"name": "Dr. Teobaldo Faro Sobrinho"
},
"user": {
"id": "a323fc7b-c364-4dff-bbb0-799a760a655a",
"name": "Maryjane Koss"
},
"status": {
"id": "a323fc7b-c548-4e2f-b1de-48c4411c9a9b",
"slug": null,
"name": null,
"description": "Dr. Naiara Espinoza Lira Filho",
"abbreviation": "laudantium",
"color": "#9ce6ae",
"text_color": "#8fa49b"
},
"priority": "low",
"priority_label": "Baixa",
"needed_at": null,
"approved_at": null,
"rejection_reason": null,
"created_at": null,
"updated_at": null
},
{
"id": "44117e21-f721-385d-b964-6410d327e5cd",
"code": null,
"name": "Velit delectus impedit provident.",
"description": null,
"work": {
"id": "a323fc7b-c986-4d16-af94-e0919543e2f5",
"name": "Daniele Alma Ramos"
},
"user": {
"id": "a323fc7b-cccc-4df5-bd54-9b93746c996b",
"name": "Mrs. Wilma Berge"
},
"status": {
"id": "a323fc7b-cecc-41fb-bdf9-83387e70cbc4",
"slug": null,
"name": null,
"description": "Elaine Amaral Assunção Sobrinho",
"abbreviation": "eum",
"color": "#5b1cea",
"text_color": "#04f674"
},
"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/eveniet" \
--header "Authorization: Bearer dv58h6b63fVZ1akPcEeDag4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/eveniet"
);
const headers = {
"Authorization": "Bearer dv58h6b63fVZ1akPcEeDag4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "6489235c-dd69-3361-8b1e-d5b6cd5a45dc",
"code": null,
"name": "Adipisci at praesentium.",
"description": null,
"work": {
"id": "a323fc7b-d7f2-40a9-a3bc-0a23827bebe7",
"name": "Sr. Martinho Henrique Feliciano Filho"
},
"user": {
"id": "a323fc7b-db2f-4e16-8b7a-24b515ad3191",
"name": "Raina Schmeler Sr."
},
"status": {
"id": "a323fc7b-dd36-4b28-be69-b8395d509f19",
"slug": null,
"name": null,
"description": "Joaquin Verdara",
"abbreviation": "eum",
"color": "#11081b",
"text_color": "#5821b1"
},
"priority": "urgent",
"priority_label": "Urgente",
"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/est/items" \
--header "Authorization: Bearer dceVPZ1v6Dga3bkEh8456af" \
--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/est/items"
);
const headers = {
"Authorization": "Bearer dceVPZ1v6Dga3bkEh8456af",
"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": null,
"product": {
"id": null,
"name": null,
"code": null,
"unit": {
"id": null,
"name": null,
"abbreviation": null
}
},
"quantity": 0,
"quantity_fulfilled": 0,
"quantity_pending": 0,
"is_fulfilled": true,
"is_partially_fulfilled": false,
"observation": null,
"created_at": null,
"updated_at": null
},
{
"id": "9f6e3dd6-651a-3516-bf2b-4d89f1764bdc",
"product": {
"id": "a323fc7c-1d7f-460f-8dd8-d09b079b9bf6",
"name": "Srta. Cláudia Santana",
"code": "PRD-978686",
"unit": {
"id": "a323fc7c-1c44-4c14-bf34-3607334fb32e",
"name": "Adriel Wagner Uchoa Filho",
"abbreviation": "Julieta Ferreira Sobrinho"
}
},
"quantity": 969.459,
"quantity_fulfilled": 0,
"quantity_pending": 969.459,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Est esse minus officia minima.",
"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 kP6D3v8b4VZgc6afad51ehE" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"a3d910f3-279d-3219-a813-b89ed45de102\",
\"work_location_id\": \"a8462e49-a9f8-3ea6-90bc-9c6c34d6704e\",
\"status_id\": \"d3c52053-ae02-3476-9a1c-fdb7fd0c24e2\",
\"priority\": \"Example Priority\",
\"needed_at\": \"Example Needed at\",
\"items\": [
{
\"product_id\": \"13e243de-5f6b-3aec-ad44-29dc6abf9c0f\",
\"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 kP6D3v8b4VZgc6afad51ehE",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "a3d910f3-279d-3219-a813-b89ed45de102",
"work_location_id": "a8462e49-a9f8-3ea6-90bc-9c6c34d6704e",
"status_id": "d3c52053-ae02-3476-9a1c-fdb7fd0c24e2",
"priority": "Example Priority",
"needed_at": "Example Needed at",
"items": [
{
"product_id": "13e243de-5f6b-3aec-ad44-29dc6abf9c0f",
"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/beatae" \
--header "Authorization: Bearer 3kdDeahP61a54bvZ6Ef8gVc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"e65a0365-90bc-3a53-a1da-7fbd9d0c6ae1\",
\"work_location_id\": \"80553fcf-313e-3936-8ee0-3ffd740b7243\",
\"status_id\": \"1f9577eb-c2af-3ce6-94f2-96a9e8dd9232\",
\"priority\": \"Example Priority\",
\"needed_at\": \"Example Needed at\",
\"items\": [
{
\"id\": \"e9ac201a-1dd3-3fe6-b440-c3d11c38aa31\",
\"product_id\": \"4e0ede0f-744b-3c97-ac30-4b4d3c4fc3c1\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/beatae"
);
const headers = {
"Authorization": "Bearer 3kdDeahP61a54bvZ6Ef8gVc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "e65a0365-90bc-3a53-a1da-7fbd9d0c6ae1",
"work_location_id": "80553fcf-313e-3936-8ee0-3ffd740b7243",
"status_id": "1f9577eb-c2af-3ce6-94f2-96a9e8dd9232",
"priority": "Example Priority",
"needed_at": "Example Needed at",
"items": [
{
"id": "e9ac201a-1dd3-3fe6-b440-c3d11c38aa31",
"product_id": "4e0ede0f-744b-3c97-ac30-4b4d3c4fc3c1",
"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/harum" \
--header "Authorization: Bearer bdDvZfa38gEVk16ec45a6Ph" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/harum"
);
const headers = {
"Authorization": "Bearer bdDvZfa38gEVk16ec45a6Ph",
"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/quasi/approve" \
--header "Authorization: Bearer 61k6PD8vabgaEceVfdZ435h" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/quasi/approve"
);
const headers = {
"Authorization": "Bearer 61k6PD8vabgaEceVfdZ435h",
"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/beatae/reject" \
--header "Authorization: Bearer aVc6b5e43E6fD1vgadh8kPZ" \
--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/beatae/reject"
);
const headers = {
"Authorization": "Bearer aVc6b5e43E6fD1vgadh8kPZ",
"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/tempore/items" \
--header "Authorization: Bearer b1ekZDvh564E3adaP6g8fVc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"product_id\": \"23218c1e-8d83-334c-970c-e9c2e256bf36\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/tempore/items"
);
const headers = {
"Authorization": "Bearer b1ekZDvh564E3adaP6g8fVc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"product_id": "23218c1e-8d83-334c-970c-e9c2e256bf36",
"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/totam" \
--header "Authorization: Bearer f1g4D5avb6e6EVPZd83hakc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"quantity\": 1,
\"observation\": \"Example Observation\",
\"status_id\": \"af05d027-2f04-3580-8c60-9425b69100ec\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/totam"
);
const headers = {
"Authorization": "Bearer f1g4D5avb6e6EVPZd83hakc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quantity": 1,
"observation": "Example Observation",
"status_id": "af05d027-2f04-3580-8c60-9425b69100ec"
};
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/odio/items" \
--header "Authorization: Bearer eg35d64ZVfvbEaP861cahDk" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"703bac15-700b-3eaa-899b-7ab374727765\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/odio/items"
);
const headers = {
"Authorization": "Bearer eg35d64ZVfvbEaP861cahDk",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"703bac15-700b-3eaa-899b-7ab374727765"
]
};
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/minus/sync-items" \
--header "Authorization: Bearer dZk6V4fbve5h3Pg6a8aEc1D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"id\": \"8df7127e-c7d9-355c-9ad1-ab6636221738\",
\"product_id\": \"2f3890db-50bb-319f-a160-7e07a7a54633\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/minus/sync-items"
);
const headers = {
"Authorization": "Bearer dZk6V4fbve5h3Pg6a8aEc1D",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"id": "8df7127e-c7d9-355c-9ad1-ab6636221738",
"product_id": "2f3890db-50bb-319f-a160-7e07a7a54633",
"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 ZVa5D1f6b8hc43Pagde6vEk" \
--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 ZVa5D1f6b8hc43Pagde6vEk",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "e77bfd6c-3de1-3b72-b365-c3c9125e5c5a",
"name": "Dr. Graziela Melinda Branco Neto",
"code": "PRD-348620",
"stock": 31,
"product_family": {
"id": "a323fc7a-0efc-4110-80ce-90b64868df0a",
"name": "Sr. Heitor Everton D'ávila"
},
"product_brand": {
"id": "a323fc7a-1099-430d-ad4a-9b399314196e",
"name": "Diego Elias Neves Jr."
},
"unit": {
"id": "a323fc7a-1224-4299-bd1a-6cbc7cd49e93",
"name": "Madalena Rezende Guerra Jr.",
"abbreviation": "Diogo Serra Amaral Sobrinho"
},
"image": {
"id": null,
"url": null
},
"epi_type": null,
"description": "Cum quo voluptas aut.",
"created_at": null,
"updated_at": null
},
{
"id": "cb658228-bb95-3f7b-b6b9-f1c40c4aaf23",
"name": "Sr. Máximo de Aguiar Vieira",
"code": "PRD-553550",
"stock": 599491,
"product_family": {
"id": "a323fc7a-1554-4fff-854d-e07ce5b930e1",
"name": "Sra. Thalita Joana Lourenço"
},
"product_brand": {
"id": "a323fc7a-16e1-47ec-a5df-f0588c783949",
"name": "Sra. Diana Correia Vila"
},
"unit": {
"id": "a323fc7a-186b-4590-a8db-4a6ca0682142",
"name": "Srta. Marina Eduarda Aragão Sobrinho",
"abbreviation": "Sr. Victor Davi Zamana Filho"
},
"image": {
"id": null,
"url": null
},
"epi_type": null,
"description": "Harum aut repudiandae ut error quaerat doloremque ut.",
"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 cea6D3vVbZ6k4fE1ahd8Pg5" \
--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 cea6D3vVbZ6k4fE1ahd8Pg5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "4c5c1d43-e8aa-34f5-919d-7aaf42ac386f",
"name": "Madalena Pedrosa Maia Filho",
"code": "PRD-280012",
"stock": 91,
"product_family": {
"id": "a323fc7a-2169-42e9-8ad6-58c1bb2fa49e",
"name": "Sr. Júlio de Aguiar Jr."
},
"product_brand": {
"id": "a323fc7a-234a-4868-a3d5-147bea9dc7e8",
"name": "Kevin Domingues Ferreira"
},
"unit": {
"id": "a323fc7a-2500-4d90-9212-b3ea2626c4c3",
"name": "Arthur Walter Delatorre Neto",
"abbreviation": "Paola Raquel Queirós"
},
"image": {
"id": null,
"url": null
},
"epi_type": null,
"description": "At et rerum accusamus.",
"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/hic/available-origins" \
--header "Authorization: Bearer 8vEDZ6caa64gd3VkefPb15h" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/hic/available-origins"
);
const headers = {
"Authorization": "Bearer 8vEDZ6caa64gd3VkefPb15h",
"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 Vhf4PEkDcZ65bv6eag813ad" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"product_family_id\": \"b861f0d3-db5a-3e70-b123-d33748e922e1\",
\"product_brand_id\": \"56153e0e-6b15-3101-8453-077ea6bbbb99\",
\"unit_id\": \"a0a1008c-f5ae-3091-8308-1d68f6a7e80c\",
\"description\": \"Example Description\",
\"stock\": 1
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products"
);
const headers = {
"Authorization": "Bearer Vhf4PEkDcZ65bv6eag813ad",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"product_family_id": "b861f0d3-db5a-3e70-b123-d33748e922e1",
"product_brand_id": "56153e0e-6b15-3101-8453-077ea6bbbb99",
"unit_id": "a0a1008c-f5ae-3091-8308-1d68f6a7e80c",
"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 38EPeb1fdakh5Z4aV66gDvc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"product_family_id\": \"c183e0fd-1588-3b81-9ca0-174bee55d6c6\",
\"product_brand_id\": \"3adae119-2b88-3278-a028-076bd253240a\",
\"unit_id\": \"485efe5f-a1bb-3d52-a6ab-d3e56873b249\",
\"stock\": 1,
\"description\": \"Example Description\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/1"
);
const headers = {
"Authorization": "Bearer 38EPeb1fdakh5Z4aV66gDvc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"product_family_id": "c183e0fd-1588-3b81-9ca0-174bee55d6c6",
"product_brand_id": "3adae119-2b88-3278-a028-076bd253240a",
"unit_id": "485efe5f-a1bb-3d52-a6ab-d3e56873b249",
"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/magnam" \
--header "Authorization: Bearer P66hc3fgdeVD4baa1vk58ZE" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/magnam"
);
const headers = {
"Authorization": "Bearer P66hc3fgdeVD4baa1vk58ZE",
"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/493ea09d-72de-33b3-8289-3dc47f71ad75/versions" \
--header "Authorization: Bearer 6gaeZDcaPv814b365EVhfdk" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"notes\": \"Example Notes\",
\"responsible_user_id\": \"304e5d45-f025-32b0-ba0d-a531e8108d47\",
\"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/493ea09d-72de-33b3-8289-3dc47f71ad75/versions"
);
const headers = {
"Authorization": "Bearer 6gaeZDcaPv814b365EVhfdk",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"notes": "Example Notes",
"responsible_user_id": "304e5d45-f025-32b0-ba0d-a531e8108d47",
"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/28d2b423-b9be-3c2b-828c-51694c7e7ea4/versions" \
--header "Authorization: Bearer 3eg5av66Dbf8ahkEZ1VdcP4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/28d2b423-b9be-3c2b-828c-51694c7e7ea4/versions"
);
const headers = {
"Authorization": "Bearer 3eg5av66Dbf8ahkEZ1VdcP4",
"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/7b0fcc64-ff23-30eb-ac02-90b7f71b0bea" \
--header "Authorization: Bearer gvP3ba56DZa4f18h6VedEck" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/7b0fcc64-ff23-30eb-ac02-90b7f71b0bea"
);
const headers = {
"Authorization": "Bearer gvP3ba56DZa4f18h6VedEck",
"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/5544cd61-daa9-348e-b740-f84598ec7320/download" \
--header "Authorization: Bearer hafeDagvEZbPd65k6148cV3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/5544cd61-daa9-348e-b740-f84598ec7320/download"
);
const headers = {
"Authorization": "Bearer hafeDagvEZbPd65k6148cV3",
"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/c01f6111-6a7e-33ce-a629-60b8d0998f70/restore" \
--header "Authorization: Bearer hv43Efbaackd1e865gVZP6D" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/c01f6111-6a7e-33ce-a629-60b8d0998f70/restore"
);
const headers = {
"Authorization": "Bearer hv43Efbaackd1e865gVZP6D",
"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/c14bb817-0a12-30be-ba3b-cc7be6b5cfa5" \
--header "Authorization: Bearer VfbDgd65ZvPae138Ek64cah" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/c14bb817-0a12-30be-ba3b-cc7be6b5cfa5"
);
const headers = {
"Authorization": "Bearer VfbDgd65ZvPae138Ek64cah",
"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=646900b7-599d-390e-96cf-fbbbdd13485c&work_id=bbb22558-04cf-3b14-ad25-0034cbffb1cf&status_id=4c3090fe-18cf-381e-9ddd-143d80deeaa0&responsible_id=cf9f3ebe-f991-37c3-b655-67a409fa25d7" \
--header "Authorization: Bearer 5fhD3gdc1eaa6V6vZPbk84E" \
--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": "646900b7-599d-390e-96cf-fbbbdd13485c",
"work_id": "bbb22558-04cf-3b14-ad25-0034cbffb1cf",
"status_id": "4c3090fe-18cf-381e-9ddd-143d80deeaa0",
"responsible_id": "cf9f3ebe-f991-37c3-b655-67a409fa25d7",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 5fhD3gdc1eaa6V6vZPbk84E",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "874a4697-0a34-3d21-ae1e-90fff0ea9bd5",
"name": "Odit culpa error",
"description": "Doloribus in magni nostrum ipsam delectus officia rerum quo.",
"current_version": 1,
"file": {
"path": "projects/4df8b187-5885-3d20-a12d-3a32b3c07700.pdf",
"size": "3775696",
"extension": "pdf"
},
"discipline": {
"id": "a323fc7f-8d1c-44ec-8d0d-d0a0632469c4",
"name": "Quo",
"code": "BEE"
},
"created_at": null,
"updated_at": null
},
{
"id": "85d87621-afce-37ba-ac3b-51a4acb9c232",
"name": "Magnam sint veniam",
"description": "Vitae molestiae dolorem quidem placeat.",
"current_version": 1,
"file": {
"path": "projects/a05cecef-d207-3142-86f2-beac4214e39b.pdf",
"size": "2598064",
"extension": "pdf"
},
"discipline": {
"id": "a323fc7f-92e6-400f-a4cb-a2a776d4a28b",
"name": "Suscipit",
"code": "QAY"
},
"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/17" \
--header "Authorization: Bearer h3bD5dZ6ea1vPV48kca6gEf" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/17"
);
const headers = {
"Authorization": "Bearer h3bD5dZ6ea1vPV48kca6gEf",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a45a1178-d73f-3389-8202-4ba16a347c79",
"name": "Eos velit et",
"description": "Sunt quas placeat est.",
"current_version": 1,
"file": {
"path": "projects/35a7f18a-0a5e-3eab-82b8-05e7dbfaa2f9.pdf",
"size": "3117306",
"extension": "pdf"
},
"discipline": {
"id": "a323fc7f-9cca-44dd-845f-6769e2ffac3f",
"name": "Numquam",
"code": "KWN"
},
"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 8fea6av3d4hVgZk6Pbc1DE5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"discipline_id\": \"d36b9319-2dcb-31a4-8a6b-9b4db06a3cce\",
\"work_id\": \"4ea40ad0-5c58-3b9f-a5c7-e1b0d2651c06\",
\"responsible_user_id\": \"996f77ff-902e-3c93-8702-24200cded57f\",
\"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 8fea6av3d4hVgZk6Pbc1DE5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"discipline_id": "d36b9319-2dcb-31a4-8a6b-9b4db06a3cce",
"work_id": "4ea40ad0-5c58-3b9f-a5c7-e1b0d2651c06",
"responsible_user_id": "996f77ff-902e-3c93-8702-24200cded57f",
"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/15" \
--header "Authorization: Bearer akcavVbh58eEd14PfZ66g3D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"discipline_id\": \"9450cec2-d438-31cc-bc03-8a049354c9c2\",
\"work_id\": \"24c33ff8-b64e-3f15-8de2-80a56939ef30\",
\"responsible_user_id\": \"d3060b49-5f31-3a01-9df3-bac93c4877c4\",
\"status_id\": \"aead6191-ad6f-36fa-a10e-9153a1aa852b\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/15"
);
const headers = {
"Authorization": "Bearer akcavVbh58eEd14PfZ66g3D",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"discipline_id": "9450cec2-d438-31cc-bc03-8a049354c9c2",
"work_id": "24c33ff8-b64e-3f15-8de2-80a56939ef30",
"responsible_user_id": "d3060b49-5f31-3a01-9df3-bac93c4877c4",
"status_id": "aead6191-ad6f-36fa-a10e-9153a1aa852b"
};
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/ipsum" \
--header "Authorization: Bearer 1DvPgVeckd63b84hEa56Zfa" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/ipsum"
);
const headers = {
"Authorization": "Bearer 1DvPgVeckd63b84hEa56Zfa",
"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 dE8ec5134fPVk6ZDabv6hga" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"daily_log\": \"doloremque\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/daily-log"
);
const headers = {
"Authorization": "Bearer dE8ec5134fPVk6ZDabv6hga",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"daily_log": "doloremque"
};
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 4g8Dk1E5hvbZPaa3cd66efV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"employee\": \"doloribus\",
\"kit_uuid\": \"d71ab5f5-7473-36ab-8bc9-f3463f6eb7be\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/epi-term"
);
const headers = {
"Authorization": "Bearer 4g8Dk1E5hvbZPaa3cd66efV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"employee": "doloribus",
"kit_uuid": "d71ab5f5-7473-36ab-8bc9-f3463f6eb7be"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Generate employee sheet PDF
requires authentication No specific permission required
Dispatches async PDF generation of the employee record. Frontend receives notification via Pusher when ready.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/employee-sheet" \
--header "Authorization: Bearer VacDgv6eb3d4P86afk1hE5Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"employee\": \"cupiditate\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/employee-sheet"
);
const headers = {
"Authorization": "Bearer VacDgv6eb3d4P86afk1hE5Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"employee": "cupiditate"
};
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[]=29baaa88-578e-3133-afde-d88b2cbd777b&cost_centers[]=6f6e7921-a9a7-31d6-ae73-7c9892e37c7c&format=xlsx" \
--header "Authorization: Bearer Zh5a6Pk4Dv1c3adV6fbgE8e" \
--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]": "29baaa88-578e-3133-afde-d88b2cbd777b",
"cost_centers[0]": "6f6e7921-a9a7-31d6-ae73-7c9892e37c7c",
"format": "xlsx",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Zh5a6Pk4Dv1c3adV6fbgE8e",
"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" \
--header "Authorization: Bearer D5a6vdEe8Z61haPfgk4bV3c" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_start\": \"2026-11-03\",
\"date_end\": \"2069-04-05\",
\"block\": \"work_cost\",
\"cost_center_id\": \"42280b67-cdb0-331a-bedb-45933b3625d4\",
\"without_cost_center\": true,
\"type\": \"other\",
\"per_page\": 16
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/cost-center/entries"
);
const headers = {
"Authorization": "Bearer D5a6vdEe8Z61haPfgk4bV3c",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date_start": "2026-11-03",
"date_end": "2069-04-05",
"block": "work_cost",
"cost_center_id": "42280b67-cdb0-331a-bedb-45933b3625d4",
"without_cost_center": true,
"type": "other",
"per_page": 16
};
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[]=88631a08-6129-3134-b1ca-3f3558e74a89&cost_centers[]=ba6634a1-1925-3f10-8916-466e9e2e2777&format=xlsx" \
--header "Authorization: Bearer V16Z4abevkE5da8fDhPg3c6" \
--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]": "88631a08-6129-3134-b1ca-3f3558e74a89",
"cost_centers[0]": "ba6634a1-1925-3f10-8916-466e9e2e2777",
"format": "xlsx",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer V16Z4abevkE5da8fDhPg3c6",
"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=est&type=entrada&description=Sunt+omnis+laboriosam+totam+nulla+et+ut+voluptatem.&categories[]=be8fe749-7f95-380c-abdb-c52aa706483a&exclude_categories[]=6d4613f1-759f-3868-bd91-af7afc61c9c1&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=10016abb-76a3-31d6-ac72-638cb451864e&customers[]=ea792113-a32e-3065-a450-97fe95ea0248&suppliers[]=b2b481df-f374-3858-bba4-d582186b81f8&cash_session=2303e352-f0e9-3759-a0a8-5df0433cd9f3&works[]=609fbc67-afca-3970-9f11-151afba1d3e9" \
--header "Authorization: Bearer 5b36a6af4dEvPgD1he8ZVkc" \
--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": "est",
"type": "entrada",
"description": "Sunt omnis laboriosam totam nulla et ut voluptatem.",
"categories[0]": "be8fe749-7f95-380c-abdb-c52aa706483a",
"exclude_categories[0]": "6d4613f1-759f-3868-bd91-af7afc61c9c1",
"date_start": "2026-01-01",
"date_end": "2026-12-31",
"bank_accounts[0]": "10016abb-76a3-31d6-ac72-638cb451864e",
"customers[0]": "ea792113-a32e-3065-a450-97fe95ea0248",
"suppliers[0]": "b2b481df-f374-3858-bba4-d582186b81f8",
"cash_session": "2303e352-f0e9-3759-a0a8-5df0433cd9f3",
"works[0]": "609fbc67-afca-3970-9f11-151afba1d3e9",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 5b36a6af4dEvPgD1he8ZVkc",
"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=dolorum&type=entrada&description=Blanditiis+sapiente+dolores+modi+suscipit+est.&categories[]=4b5caf88-1fc7-347c-ad88-c7d03780f87d&exclude_categories[]=3a86f066-973e-34cd-b9f3-3df92320691e&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=a99518a9-cf66-3975-a431-32be6fcf26bc&customers[]=9f23877b-b61d-3909-86a3-606e5c9dd81a&suppliers[]=20d12220-adce-3f4b-83a8-3f26f3e63b87&cash_session=a8c37e47-5e48-3a9c-a27a-161096923961&works[]=2e6d83d0-f99c-3798-80e4-7fabc29dcd48" \
--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": "dolorum",
"type": "entrada",
"description": "Blanditiis sapiente dolores modi suscipit est.",
"categories[0]": "4b5caf88-1fc7-347c-ad88-c7d03780f87d",
"exclude_categories[0]": "3a86f066-973e-34cd-b9f3-3df92320691e",
"date_start": "2026-01-01",
"date_end": "2026-12-31",
"bank_accounts[0]": "a99518a9-cf66-3975-a431-32be6fcf26bc",
"customers[0]": "9f23877b-b61d-3909-86a3-606e5c9dd81a",
"suppliers[0]": "20d12220-adce-3f4b-83a8-3f26f3e63b87",
"cash_session": "a8c37e47-5e48-3a9c-a27a-161096923961",
"works[0]": "2e6d83d0-f99c-3798-80e4-7fabc29dcd48",
};
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 P64adah8gVc16D35ZevkEbf" \
--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 P64adah8gVc16D35ZevkEbf",
"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 aaecDh48Ev56dZg63Pf1bVk" \
--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 aaecDh48Ev56dZg63Pf1bVk",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "8c00bdd6-517e-357d-84ee-b9a9bfd4dfe4",
"name": "quos reiciendis",
"slug": null,
"description": null,
"abbreviation": null,
"created_at": null,
"updated_at": null
},
{
"id": "5c17b4d7-f053-31be-be0e-14b26e6cd875",
"name": "voluptas molestias",
"slug": null,
"description": "Molestias vitae unde facilis. Ea odio deserunt odit. Voluptatem voluptas sapiente eius placeat facilis.",
"abbreviation": "djy",
"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 6aVPb48hev5acgEkfd63ZD1" \
--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 6aVPb48hev5acgEkfd63ZD1",
"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/4" \
--header "Authorization: Bearer ebVvgPE65831cZ6ahd4kfaD" \
--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 ebVvgPE65831cZ6ahd4kfaD",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "5ad0659b-b551-3ba8-b6eb-b93f611b15b6",
"name": "eos amet",
"slug": null,
"description": null,
"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/3" \
--header "Authorization: Bearer hbD8146ZvkEa6a5V3dgecPf" \
--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/3"
);
const headers = {
"Authorization": "Bearer hbD8146ZvkEa6a5V3dgecPf",
"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/20" \
--header "Authorization: Bearer 5h4f1adZV6kgEcePa6vb8D3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/20"
);
const headers = {
"Authorization": "Bearer 5h4f1adZV6kgEcePa6vb8D3",
"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 6aVc8bh3dkgeZDvEP5164af" \
--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 6aVc8bh3dkgeZDvEP5164af",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "12a27fe5-9f81-3eec-9498-2dff31d9d48a",
"name": "Werner Wuckert",
"username": "nullrich",
"email": "hvonrueden@example.org",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "dcfe6526-5552-3bd2-84e4-81087ecb30c8",
"name": "Dr. Christophe Kshlerin PhD",
"username": "nnolan",
"email": "ugreenholt@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 P1kv6a8VcZ3e4h5dbga6EDf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"102b3691-a0f9-3ae5-9e3b-66193ff941d3\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/attach"
);
const headers = {
"Authorization": "Bearer P1kv6a8VcZ3e4h5dbga6EDf",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"102b3691-a0f9-3ae5-9e3b-66193ff941d3"
]
};
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 4hPEvfZVe183adcga5Db66k" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"7d731fd4-6ab4-344c-9c05-cdf2fd45f695\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/detach"
);
const headers = {
"Authorization": "Bearer 4hPEvfZVe183adcga5Db66k",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"7d731fd4-6ab4-344c-9c05-cdf2fd45f695"
]
};
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 Vahd85kZvD346fg1caePE6b" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"a60681b3-9a3f-3f5d-bf95-5f1878a90cd9\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/sync"
);
const headers = {
"Authorization": "Bearer Vahd85kZvD346fg1caePE6b",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"a60681b3-9a3f-3f5d-bf95-5f1878a90cd9"
]
};
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 4egfEZ8vaV53cP6aDbhk6d1" \
--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 4egfEZ8vaV53cP6aDbhk6d1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"name": "tempore a",
"slug": "et-sunt-et-distinctio-officiis-pariatur-suscipit"
},
{
"name": "earum rerum",
"slug": "ut-adipisci-quis-sunt-nulla-error-facere-reprehenderit"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 VEhDk6avcaZbg46e13d85fP" \
--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 VEhDk6avcaZbg46e13d85fP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "e5ec93b0-ca2d-3710-ac4b-6ad21f86f813",
"slug": null,
"name": null,
"description": "Sr. Téo Nero Soares",
"abbreviation": "voluptates",
"color": "#5c58f9",
"text_color": "#777ea9",
"created_at": null,
"updated_at": null
},
{
"id": "cd09e1f9-1db0-3a08-8de4-588f34f67394",
"slug": null,
"name": null,
"description": "Dayana Vieira Jr.",
"abbreviation": "recusandae",
"color": "#9ca461",
"text_color": "#d2a0df",
"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 d48Eh5v6Vfka1ZaDbcP6eg3" \
--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\": \"2f181d6a-e759-3083-b254-0b47c14b68bc\",
\"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 d48Eh5v6Vfka1ZaDbcP6eg3",
"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": "2f181d6a-e759-3083-b254-0b47c14b68bc",
"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 PbfvcD63ea54hZdVkEg8a16" \
--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 PbfvcD63ea54hZdVkEg8a16",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "2f28873a-c78b-3e42-a3b0-f6e29dc544f8",
"slug": null,
"name": null,
"description": "Antonieta Fonseca Jr.",
"abbreviation": "labore",
"color": "#d4aaea",
"text_color": "#1e85e5",
"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 6bh14cEPevaVdZ5g6Df3k8a" \
--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\": \"e603e628-46f7-3cbb-aac9-98faf8c6ab9d\",
\"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 6bh14cEPevaVdZ5g6Df3k8a",
"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": "e603e628-46f7-3cbb-aac9-98faf8c6ab9d",
"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 k4gVbaZc856a13PdEDhfv6e" \
--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 k4gVbaZc856a13PdEDhfv6e",
"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 5fg6P1kDvEh68aVbc3aZ4ed" \
--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 5fg6P1kDvEh68aVbc3aZ4ed",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "50cfe24c-7508-308d-b17f-f06252610f41",
"quantity": 576.3595,
"min_quantity": null,
"max_quantity": null,
"below_minimum": false,
"above_maximum": false,
"created_at": null,
"updated_at": null
},
{
"id": "b5af65d0-4717-3214-8a46-640428aac17e",
"quantity": 782.1433,
"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 k4PaZ1fV85ved6cb63hDaEg" \
--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 k4PaZ1fV85ved6cb63hDaEg",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "5941fa03-b069-3b4a-8bdb-e6f4ae304f13",
"name": "Estoque Queirós e Zamana Ltda.",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
},
{
"id": "e4b2469d-4337-3d87-bf5c-f23c71411e29",
"name": "Estoque Sandoval e Rezende",
"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 68havb5fZcV4ga6DkeE3dP1" \
--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 68havb5fZcV4ga6DkeE3dP1",
"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": "444c1767-e8dd-3ab8-b2c6-68f3e2561fa4",
"name": "Estoque Prado S.A.",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get main stock
requires authentication stock.main show
Returns the main stock
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/stocks/main" \
--header "Authorization: Bearer gVe3PafaE15d4cZhv8Dk66b" \
--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 gVe3PafaE15d4cZhv8Dk66b",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "7349cec9-b2a1-33b7-ad91-0db22af135dd",
"name": "Estoque Rangel 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.
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 1ae3cdZbPh6546vEDka8gVf" \
--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 1ae3cdZbPh6546vEDka8gVf",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "9f864534-112b-3046-a942-8b7dbd2b385c",
"name": "Estoque Souza e Lutero S.A.",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 gkZVbf8a63Dcv651ePaEh4d" \
--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 gkZVbf8a63Dcv651ePaEh4d",
"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": "489b6bea-329b-3a58-b558-d91c5c7ae55f",
"name": "Estoque Ferreira e Godói e Associados",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete stock
requires authentication stock delete
Removes a stock (soft delete)
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/stocks/1" \
--header "Authorization: Bearer 34kbZ8f16E5ehDaVd6gcavP" \
--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 34kbZ8f16E5ehDaVd6gcavP",
"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 bVhZE8fak3P5e61v64gdDac" \
--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 bVhZE8fak3P5e61v64gdDac",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "8125eec1-c88b-3bd4-95e8-2e9b45749ad9",
"quantity": 22.6413,
"min_quantity": null,
"max_quantity": null,
"below_minimum": false,
"above_maximum": false,
"created_at": null,
"updated_at": null
},
{
"id": "d74cef99-e432-37ea-bb3c-bb59d3de4c14",
"quantity": 404.806,
"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/repellendus" \
--header "Authorization: Bearer Zf5vec3Pbah61Ekg4aVdD86" \
--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/repellendus"
);
const headers = {
"Authorization": "Bearer Zf5vec3Pbah61Ekg4aVdD86",
"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": "b3fddd99-381b-3055-b370-5b25c0e70aa0",
"quantity": 274.085,
"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 hk6befDV6gZ8d5aPcE3a1v4" \
--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 hk6befDV6gZ8d5aPcE3a1v4",
"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 dg8aVha6c14E63kZvP5bfDe" \
--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 dg8aVha6c14E63kZvP5bfDe",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "8be339ba-895f-33df-8cf2-f3717936355f",
"code": "MOV-914026",
"type": "compra",
"type_name": "PURCHASE",
"is_entry": true,
"is_exit": false,
"quantity": 2.3552,
"previous_quantity": 818.5496,
"new_quantity": 820.9048,
"reason": null,
"movement_date": "2026-10-09T04:40:02.000000Z",
"created_at": null
},
{
"id": "db7205ba-5060-3caa-9ff1-9eba969377a2",
"code": "MOV-330087",
"type": "produção",
"type_name": "PRODUCTION",
"is_entry": true,
"is_exit": false,
"quantity": 17.8304,
"previous_quantity": 785.1682,
"new_quantity": 802.9986,
"reason": null,
"movement_date": "2026-10-29T22:53:16.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 D1E6acbk86hP3Zd4fvVe5ag" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"c52b1352-b330-339a-bc2e-420e42af5347\",
\"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 D1E6acbk86hP3Zd4fvVe5ag",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "c52b1352-b330-339a-bc2e-420e42af5347",
"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": "a0e5566a-f0df-374a-814f-9517fbe84a6f",
"code": "MOV-987947",
"type": "entrada transferência",
"type_name": "TRANSFER_IN",
"is_entry": true,
"is_exit": false,
"quantity": 99.4374,
"previous_quantity": 255.9022,
"new_quantity": 355.3396,
"reason": "Quod cum est beatae dolorem ipsam.",
"movement_date": "2026-10-11T11:13:40.000000Z",
"created_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 4ecD5a618Z3Evhbdkfg6PaV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"ab4ef10d-ed1f-3bde-a5a5-ea10be36b17f\",
\"destination_stock_id\": \"b7e244ca-aa80-3764-9bbf-e5303e971527\",
\"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 4ecD5a618Z3Evhbdkfg6PaV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "ab4ef10d-ed1f-3bde-a5a5-ea10be36b17f",
"destination_stock_id": "b7e244ca-aa80-3764-9bbf-e5303e971527",
"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": "2c038f70-601a-315f-9765-65098ef24c77",
"code": "MOV-941870",
"type": "compra",
"type_name": "PURCHASE",
"is_entry": true,
"is_exit": false,
"quantity": 14.9431,
"previous_quantity": 649.7287,
"new_quantity": 664.6718,
"reason": null,
"movement_date": "2026-11-01T02:45:57.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 5Zgc638bdf6V4PEkeh1avDa" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"d8428b14-9b34-33bd-9cec-429acc8fb9cb\",
\"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 5Zgc638bdf6V4PEkeh1avDa",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "d8428b14-9b34-33bd-9cec-429acc8fb9cb",
"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": "629dcc34-b11a-3db7-be13-9f8d3f3ec4e3",
"code": "MOV-126253",
"type": "produção",
"type_name": "PRODUCTION",
"is_entry": true,
"is_exit": false,
"quantity": 26.0991,
"previous_quantity": 64.0323,
"new_quantity": 90.1314,
"reason": null,
"movement_date": "2026-10-23T04:28:08.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 D45hfvVE8a1aPg6Zk6b3dec" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"00f087fa-1f12-3f29-8866-d6beda35289a\",
\"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 D45hfvVE8a1aPg6Zk6b3dec",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "00f087fa-1f12-3f29-8866-d6beda35289a",
"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": "33237883-efdd-33af-ae94-d153de46e418",
"code": "MOV-899061",
"type": "venda",
"type_name": "SALE",
"is_entry": false,
"is_exit": true,
"quantity": 59.2493,
"previous_quantity": 801.7661,
"new_quantity": 742.5168,
"reason": "Molestiae deserunt et sit iste quisquam laborum et voluptatibus.",
"movement_date": "2026-10-24T21:13:10.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 Za6Vfd4hcabE35vk8Pge1D6" \
--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 Za6Vfd4hcabE35vk8Pge1D6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "46b1ee74-5c8d-3bae-ac83-c0e08c1ed5ac",
"code": "MOV-112559",
"type": "devolução",
"type_name": "RETURN",
"is_entry": true,
"is_exit": false,
"quantity": 5.1144,
"previous_quantity": 308.875,
"new_quantity": 313.9894,
"reason": "Sed aut dolores odio aut temporibus sapiente omnis.",
"movement_date": "2026-10-10T04:49:55.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 g8VfvceD3Eka46dhb6aP1Z5" \
--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 g8VfvceD3Eka46dhb6aP1Z5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "b93e74ae-05c2-3395-896a-93a60b9a76d3",
"name": "Sr. Lucio Quintana",
"email": "betina96@example.com",
"phone": "(73) 3138-1936",
"document": "33.474.978/0001-44",
"type": "pj",
"responsible": "Srta. Ingrid Caldeira Serrano Neto",
"image": {
"id": null,
"url": null
},
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
}
},
{
"id": "2b155432-24bb-3397-9d74-77e3fc2f8812",
"name": "Dr. Ellen Rico Rangel Jr.",
"email": "nelson.deaguiar@example.com",
"phone": "(41) 96350-0446",
"document": "38.751.221/0001-74",
"type": "pf",
"responsible": "Débora Daiane Pereira",
"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 EcaDk68465abv31fgPVZehd" \
--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 EcaDk68465abv31fgPVZehd",
"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 dhDVg6aEb8Z64Pcv53feka1" \
--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 dhDVg6aEb8Z64Pcv53feka1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "86ddc3ec-1448-3b03-86b4-a428d2b13443",
"name": "Ingrid Paola Deverso",
"email": "barreto.noemi@example.net",
"phone": "(94) 4417-0541",
"document": "56.326.754/0001-90",
"type": "pj",
"responsible": "Dr. Poliana Branco Sobrinho",
"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 hV4evDg3Z5EcaaP1kdf68b6" \
--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 hV4evDg3Z5EcaaP1kdf68b6",
"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 36vP4bZcg81ae5hakEVDf6d" \
--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 36vP4bZcg81ae5hakEVDf6d",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
System Types
Endpoints for system types
System Types
requires authentication No specific permission required
Get the system types
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/system-types" \
--header "Authorization: Bearer VP18cafkZaE6e5v6bh3D4dg" \
--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 VP18cafkZaE6e5v6bh3D4dg",
"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 f5de63bVhZag1kvP4Da8c6E" \
--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 f5de63bVhZag1kvP4Da8c6E",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "2b65333e-b23a-3bc2-ae73-73710aeb76bb",
"name": "Catarina Zaragoça Filho",
"description": "Sint quia sit voluptas autem autem. Omnis maiores sequi sed impedit nihil dolores. Nam dolorem ullam laboriosam sed et ut ad. Accusantium voluptatum similique quisquam.",
"type": "saque"
},
{
"id": "1e977105-bcf8-3eda-b73e-30cfcca5f0dc",
"name": "Sr. Vicente Marques Neto",
"description": "Impedit quia quasi et. Deserunt excepturi earum dicta et blanditiis. Magni dolorem consectetur aut dolorem. Maxime atque ea neque ipsa laudantium.",
"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/quidem" \
--header "Authorization: Bearer 6chveg48DPabEVaf13dkZ56" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/transaction-categories/quidem"
);
const headers = {
"Authorization": "Bearer 6chveg48DPabEVaf13dkZ56",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "4ccdafea-d3e6-3649-b571-4379632e8990",
"name": "Sra. Luciana Dayana Zamana",
"description": "Possimus minima cumque sint est. Ea aliquid consequatur voluptatem autem. Dolorem quia minima architecto ut at. Accusamus incidunt non quibusdam hic non ut consequatur.",
"type": "ajuste saída"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create transaction category
requires authentication transaction-category store
Create a new transaction category
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/transaction-categories" \
--header "Authorization: Bearer hka6PdZVgcv36Eb54Df8a1e" \
--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 hka6PdZVgcv36Eb54Df8a1e",
"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/et" \
--header "Authorization: Bearer PfkegbEada6D83561vhVcZ4" \
--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/et"
);
const headers = {
"Authorization": "Bearer PfkegbEada6D83561vhVcZ4",
"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/voluptates" \
--header "Authorization: Bearer D1ab84EckgvVdh6ae6fZ5P3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/transaction-categories/voluptates"
);
const headers = {
"Authorization": "Bearer D1ab84EckgvVdh6ae6fZ5P3",
"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 PDh4gebdfE3Va686Zk5avc1" \
--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 PDh4gebdfE3Va686Zk5avc1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "457487e1-ffc3-3a74-ac9c-35dd6ec61b58",
"name": "Ipsa quos",
"slug": "ipsa-quos-867866",
"description": "Ipsam inventore atque soluta aut.",
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
},
{
"id": "db11b0a7-7570-3904-a1fc-4fd28250f64e",
"name": "Ipsum consequuntur",
"slug": "ipsum-consequuntur-693262",
"description": "Explicabo omnis necessitatibus molestiae ab.",
"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 edZ64vV5fahEag61bD3c8kP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"slug\": \"Example Slug\",
\"description\": \"Example Description\",
\"sort_order\": 1,
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules"
);
const headers = {
"Authorization": "Bearer edZ64vV5fahEag61bD3c8kP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"slug": "Example Slug",
"description": "Example Description",
"sort_order": 1,
"is_active": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "6a597e29-a164-34a7-a511-6a87aaa92d2d",
"name": "Quia magnam",
"slug": "quia-magnam-975175",
"description": "Similique rem voluptatum aut.",
"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 be3ckh6Z68dDVPf54agavE1" \
--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 be3ckh6Z68dDVPf54agavE1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "81a8c4d8-e113-3319-acb2-3decd6923d79",
"name": "Temporibus adipisci",
"slug": "temporibus-adipisci-178251",
"description": "Quo adipisci laboriosam rerum omnis vel voluptatem.",
"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 fDEgeV5b1Pav63dhk8ca64Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"slug\": \"Example Slug\",
\"description\": \"Example Description\",
\"sort_order\": 1,
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer fDEgeV5b1Pav63dhk8ca64Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"slug": "Example Slug",
"description": "Example Description",
"sort_order": 1,
"is_active": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "4335f702-9d3c-3fb4-8610-0d6bce3a648d",
"name": "Ea esse",
"slug": "ea-esse-338223",
"description": "Fugiat voluptas nam nesciunt eius aut ipsum deleniti repellendus.",
"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 1ED6cVaf4635h8ePbdakZgv" \
--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 1ED6cVaf4635h8ePbdakZgv",
"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=2be50940-c8b5-38f0-b49e-86e88d317946§or_id=93e76f49-1abd-3ecc-ade1-173828941c52&status=published" \
--header "Authorization: Bearer 8h66kVefEvPcbag3adD1Z45" \
--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": "2be50940-c8b5-38f0-b49e-86e88d317946",
"sector_id": "93e76f49-1abd-3ecc-ade1-173828941c52",
"status": "published",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 8h66kVefEvPcbag3adD1Z45",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "eeda8eef-3cc8-3744-8605-b9e7fced1911",
"title": "In aut similique est",
"description": "Quisquam est voluptas quidem voluptatem.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a323fc82-5dba-4312-86b8-a695c57ddd8e",
"name": "Et velit",
"slug": "et-velit-121035"
},
"created_at": null,
"updated_at": null
},
{
"id": "b0d9923e-7dee-3483-893e-eb469cbdb2d1",
"title": "Est praesentium reprehenderit iure",
"description": "Modi ipsum doloribus ad sequi cupiditate facilis quo nobis.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a323fc82-61eb-4f59-9599-f3c7138a819f",
"name": "Et doloribus",
"slug": "et-doloribus-814552"
},
"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 fdgkcV546bvha81EZ63DaeP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"module_id\": \"168b2edc-6893-3bf8-a67c-ff8cecdf2830\",
\"title\": \"Example Title\",
\"description\": \"Example Description\",
\"cover_path\": \"Example Cover path\",
\"sort_order\": 1,
\"sectors\": [
\"2f606aba-5083-32d4-a5be-f319161534c3\"
],
\"permissions\": [
\"eec0357c-3935-3d37-8cea-f199765050cf\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials"
);
const headers = {
"Authorization": "Bearer fdgkcV546bvha81EZ63DaeP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"module_id": "168b2edc-6893-3bf8-a67c-ff8cecdf2830",
"title": "Example Title",
"description": "Example Description",
"cover_path": "Example Cover path",
"sort_order": 1,
"sectors": [
"2f606aba-5083-32d4-a5be-f319161534c3"
],
"permissions": [
"eec0357c-3935-3d37-8cea-f199765050cf"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "644fd355-f612-33e0-9416-a9e4727737f5",
"title": "Et earum fuga omnis",
"description": "Explicabo ut commodi facilis dicta eligendi.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a323fc82-6e46-455a-aca7-840a4719bc0f",
"name": "Rerum quia",
"slug": "rerum-quia-918265"
},
"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 6VvZgcf3khEbd6a45ea81DP" \
--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 6VvZgcf3khEbd6a45ea81DP",
"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 ab3caf658Dh6ZveEkPVg14d" \
--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 ab3caf658Dh6ZveEkPVg14d",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "bf749361-27d5-3eca-8a12-16758726618e",
"title": "Quibusdam dolorem occaecati sit",
"description": "Quo blanditiis voluptas nesciunt qui consectetur minus.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a323fc82-7859-47cf-a578-4598f8e02389",
"name": "Perferendis fuga",
"slug": "perferendis-fuga-175565"
},
"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 V8b1DZ5aEghvP663da4efck" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"module_id\": \"19810e9e-fd68-315a-b4f8-58719d1b3422\",
\"title\": \"Example Title\",
\"description\": \"Example Description\",
\"cover_path\": \"Example Cover path\",
\"sort_order\": 1,
\"sectors\": [
\"7e08dd6f-c126-3884-a8e6-707b67ae4dfb\"
],
\"permissions\": [
\"5d3f2dfb-6504-3307-a3a8-f75b9e64bfa9\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1"
);
const headers = {
"Authorization": "Bearer V8b1DZ5aEghvP663da4efck",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"module_id": "19810e9e-fd68-315a-b4f8-58719d1b3422",
"title": "Example Title",
"description": "Example Description",
"cover_path": "Example Cover path",
"sort_order": 1,
"sectors": [
"7e08dd6f-c126-3884-a8e6-707b67ae4dfb"
],
"permissions": [
"5d3f2dfb-6504-3307-a3a8-f75b9e64bfa9"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "e5d1c885-3eea-35d6-b411-127c0c22abab",
"title": "Quam voluptatibus repellendus aliquid",
"description": "Est sed est reprehenderit nemo voluptatem.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a323fc82-8316-447c-a953-cc0d5118dfee",
"name": "Necessitatibus est",
"slug": "necessitatibus-est-332203"
},
"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 che86f1gEaaDP64vdV3kb5Z" \
--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 che86f1gEaaDP64vdV3kb5Z",
"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 a5Db4cehEZ3Pkd8f1vgV6a6" \
--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 a5Db4cehEZ3Pkd8f1vgV6a6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "11009e40-d5c1-3af7-baee-20b938adc415",
"title": "Qui sed velit provident",
"description": "Magnam odit exercitationem asperiores voluptatum sunt dicta molestias occaecati.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a323fc82-8c15-4d46-af64-e91346ec6f04",
"name": "Fuga minus",
"slug": "fuga-minus-951279"
},
"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 4bgP8hZda6ve1D3kc6VEa5f" \
--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 4bgP8hZda6ve1D3kc6VEa5f",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "b698542f-53e8-3af1-a687-ba71b7558040",
"title": "Distinctio asperiores eius accusantium",
"description": "Ea saepe consequatur aliquam ducimus distinctio aut.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a323fc82-9225-4ad7-8d84-be7d155b5c66",
"name": "Dolor dolore",
"slug": "dolor-dolore-759797"
},
"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 5Eg43fvehD6k68bVcd1aZaP" \
--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 5Eg43fvehD6k68bVcd1aZaP",
"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": "28ce16f6-e800-3677-922c-e08fc2b1d880",
"type": "pdf",
"title": "Molestiae et unde",
"mime_type": "application/pdf",
"size_bytes": 3182004,
"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 6c8D45aZfvg16hkeE3adVPb" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"605efce2-a9a7-3302-8cb0-83be75e21f88\"
]
}"
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 6c8D45aZfvg16hkeE3adVPb",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"605efce2-a9a7-3302-8cb0-83be75e21f88"
]
};
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 vE8a1ZP4a66DV3gke5dhbcf" \
--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 vE8a1ZP4a66DV3gke5dhbcf",
"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": "eb536fd2-53bd-32fe-afe5-9d7781b577f4",
"type": "pdf",
"title": "Eveniet odit laborum",
"mime_type": "application/pdf",
"size_bytes": 2989760,
"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 fPV5cD1a6ke6Z4dgh38bEva" \
--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 fPV5cD1a6ke6Z4dgh38bEva",
"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 DZh6aP354c6dfebg1Vk8Eav" \
--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 DZh6aP354c6dfebg1Vk8Eav",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "bbc8ff67-8653-3479-870a-fd89c4c721da",
"name": "Sr. Yuri Vega Neto",
"abbreviation": "Márcio Diogo Faria Neto",
"description": "Nesciunt qui est aut sit.",
"created_at": null,
"updated_at": null
},
{
"id": "72ca6fac-969b-34c2-8b21-cef8dcc0ccad",
"name": "Nádia Godói",
"abbreviation": "Josué Arruda Cortês Filho",
"description": "Aut modi id deleniti quasi.",
"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 a6gk5EZaefVd13bPv6hcD48" \
--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 a6gk5EZaefVd13bPv6hcD48",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "bec3eb1a-97ba-3a24-abf5-a1f42d2be3e1",
"name": "Dr. Raysa Gabrielly Pacheco",
"abbreviation": "Camilo Gusmão Sobrinho",
"description": "Eos non aut et odio.",
"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 fkhaPa43cZg18VDEb65ved6" \
--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 fkhaPa43cZg18VDEb65ved6",
"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 c6dgheE58a41DP6fa3VZkvb" \
--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 c6dgheE58a41DP6fa3VZkvb",
"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/impedit" \
--header "Authorization: Bearer 1a86gadk5D6hbVZcfPevE34" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/units/impedit"
);
const headers = {
"Authorization": "Bearer 1a86gadk5D6hbVZcfPevE34",
"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 Ec6a8vDbea1V46ZfdPkg35h" \
--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 Ec6a8vDbea1V46ZfdPkg35h",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "ee265918-4713-3d61-8e6b-0d10b815c1e6",
"name": "Rory Beer",
"username": "weissnat.ernest",
"email": "hartmann.dustin@example.com",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "e814bbf3-a80b-37aa-9926-918d254bccd1",
"name": "Aric Heller",
"username": "jayne.dibbert",
"email": "jany99@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 Zek4g5368cEVDbaavPhdf16" \
--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 Zek4g5368cEVDbaavPhdf16",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "0d29399a-1010-3314-bd56-3b5a6cb32956",
"name": "Brielle Stokes II",
"username": "sylvia33",
"email": "alaina.bednar@example.org",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create user
requires authentication user store
Create a new user
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/users" \
--header "Authorization: Bearer bkeP3aEZdvaVD61h45fgc86" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"purdy.randi\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"b3e787aa-55ee-331c-bc6f-fa23850a9ca8\"
],
\"roles\": [
\"3305930b-f74d-31a8-8031-d9002223f8e7\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users"
);
const headers = {
"Authorization": "Bearer bkeP3aEZdvaVD61h45fgc86",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "purdy.randi",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"b3e787aa-55ee-331c-bc6f-fa23850a9ca8"
],
"roles": [
"3305930b-f74d-31a8-8031-d9002223f8e7"
]
};
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 VEk14haa6g85eZ3dPfDv6bc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"ithiel\",
\"password\": \"password123\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"5e9f98e3-36f8-3e3e-be41-251d801f13f5\"
],
\"roles\": [
\"60d762e4-e895-304e-aa0b-2bc18b60dd55\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users/1"
);
const headers = {
"Authorization": "Bearer VEk14haa6g85eZ3dPfDv6bc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "ithiel",
"password": "password123",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"5e9f98e3-36f8-3e3e-be41-251d801f13f5"
],
"roles": [
"60d762e4-e895-304e-aa0b-2bc18b60dd55"
]
};
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 vaDPgb5aZEecV8d16h6fk43" \
--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 vaDPgb5aZEecV8d16h6fk43",
"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 daEvfg68P5kVZ6ceD341ahb" \
--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 daEvfg68P5kVZ6ceD341ahb",
"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 ad46khDcb35P8VZag6e1Efv" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"ac0c1899-07f9-3747-af54-9f1c56264c4f\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users/1/permissions"
);
const headers = {
"Authorization": "Bearer ad46khDcb35P8VZag6e1Efv",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"ac0c1899-07f9-3747-af54-9f1c56264c4f"
]
};
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 cdkha6Dv58be3gafPVE146Z" \
--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 cdkha6Dv58be3gafPVE146Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "doloremque",
"display_name": "Fugit fugit corporis provident adipisci."
},
{
"id": null,
"name": "voluptatem",
"display_name": "Quidem neque enim sed officia."
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 bvVZa56Dgdc6kfE4e3hPa18" \
--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 bvVZa56Dgdc6kfE4e3hPa18",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "2ff8f08c-ccad-3e9e-a5b9-12b91d9ae9a0",
"description": "Dr. Isaac Ferminiano Tamoio",
"work": {
"id": null,
"name": null
},
"documents": [],
"created_at": null,
"updated_at": null
},
{
"id": "747eef60-2a75-3a32-9938-5b1a6d679abd",
"description": "Gabriel Garcia Filho",
"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 V6hEcbdk4gZDaa3e61vPf58" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"description\": \"Example Description\",
\"work_id\": \"3b2214a6-55a7-3bbe-826c-1736b54afa8a\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/work-locations"
);
const headers = {
"Authorization": "Bearer V6hEcbdk4gZDaa3e61vPf58",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"description": "Example Description",
"work_id": "3b2214a6-55a7-3bbe-826c-1736b54afa8a"
};
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 fkZvDa14cEbe8P5dh6ga3V6" \
--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 fkZvDa14cEbe8P5dh6ga3V6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "2da75249-188c-32b7-9df0-d0a547c48a21",
"description": "Dr. Maurício Hugo Marin",
"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 f6aP5hevED4Vca1gbkd368Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"description\": \"Example Description\",
\"work_id\": \"be0a3e78-3d3a-3ccc-b8ca-8c44eccc3ed7\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/work-locations/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer f6aP5hevED4Vca1gbkd368Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"description": "Example Description",
"work_id": "be0a3e78-3d3a-3ccc-b8ca-8c44eccc3ed7"
};
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 PZca3kf1gDv546heEV8a6bd" \
--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 PZca3kf1gDv546heEV8a6bd",
"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 3bh6cPvZa64Vged8fE1k5Da" \
--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 3bh6cPvZa64Vged8fE1k5Da",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "04e49f41-96ef-31ac-be0a-4aefa4a1c220",
"name": "Tábata Manuela 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": "2026-04-20 04:48:18.000000",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"created_at": null,
"updated_at": null
},
{
"id": "ab450940-5406-33fe-b2a7-ca3a4cb5406e",
"name": "Flávia Vanessa Romero",
"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": "2007-09-08 23:58:22.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 4Edakh36eP1a5vfV6DgcbZ8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"customer_id\": \"77a186d6-bc2c-3f45-be53-7f179ab1973a\",
\"status_id\": \"d31b1f09-51a8-39ae-a631-4c0c0eba1987\",
\"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 4Edakh36eP1a5vfV6DgcbZ8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"customer_id": "77a186d6-bc2c-3f45-be53-7f179ab1973a",
"status_id": "d31b1f09-51a8-39ae-a631-4c0c0eba1987",
"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 6Z5a4hPgk18fDE6vbecVda3" \
--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 6Z5a4hPgk18fDE6vbecVda3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "be131e0f-090b-3bcd-a363-959f9da95ba7",
"name": "Liz das Neves Perez",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"documents": [],
"locations": [],
"product_quantity_lists_count": 0,
"product_quantity_list_items_count": 0,
"product_requests_count": 0,
"product_request_items_count": 0,
"documents_count": 0,
"locations_documents_count": 0,
"total_documents_count": 0,
"daily_logs_count": 0,
"projects_count": 0,
"started_at": {
"date": "2008-01-24 09:52:35.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 4k5haaVcfD1E63v6P8Zgebd" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"customer_id\": \"ee724e27-8764-32f0-b65b-27d9364372e4\",
\"status_id\": \"f7fbad7d-2f8f-3417-b3bc-b86aba7475f5\",
\"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 4k5haaVcfD1E63v6P8Zgebd",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"customer_id": "ee724e27-8764-32f0-b65b-27d9364372e4",
"status_id": "f7fbad7d-2f8f-3417-b3bc-b86aba7475f5",
"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 4V6eDEvaf8kgcaZ5hbd1P63" \
--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 4V6eDEvaf8kgcaZ5hbd1P63",
"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 6ZVc4hfg6dDvae5a1E3kbP8" \
--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 6ZVc4hfg6dDvae5a1E3kbP8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "0ae65324-4d54-3be9-bd0b-a9e3d23ba9e8",
"name": "Rebekah Mayer",
"username": "qhuel",
"email": "tatyana.deckow@example.com",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "a0db62ee-85f5-3ade-991b-b8498ca89b3e",
"name": "Ms. Dolores Lueilwitz DDS",
"username": "ylabadie",
"email": "rogers.gaylord@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 ha6k14bfZPg8aEVD536dcev" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"bbec5c7f-dcc8-3247-8069-3d3283486581\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach"
);
const headers = {
"Authorization": "Bearer ha6k14bfZPg8aEVD536dcev",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"bbec5c7f-dcc8-3247-8069-3d3283486581"
]
};
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 P8avD1Z6badh3kf4ecVE56g" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"fcd06fbb-d9f8-3597-8fa4-46f68e9adde1\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/detach"
);
const headers = {
"Authorization": "Bearer P8avD1Z6badh3kf4ecVE56g",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"fcd06fbb-d9f8-3597-8fa4-46f68e9adde1"
]
};
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 1gP4ke6c6aV5a8ZEf3dDvhb" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"067a03f9-b0d1-3bfe-afc9-9824069e1474\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/sync"
);
const headers = {
"Authorization": "Bearer 1gP4ke6c6aV5a8ZEf3dDvhb",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"067a03f9-b0d1-3bfe-afc9-9824069e1474"
]
};
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.