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 8cVD51Efdb4Pah636vgkZae" \
--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 8cVD51Efdb4Pah636vgkZae",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "58f59659-e908-3b73-908a-607d07fe9386",
"name": "voluptas-6b119cc7de2b5",
"display_name": "Est consectetur magnam deleniti accusamus asperiores officiis.",
"permissions_count": null
},
{
"id": "11cf72f7-21ba-3273-b392-cc55ddfd99dc",
"name": "vel-6b119cc7e24e8",
"display_name": "Quisquam tempore numquam suscipit non.",
"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 D61ZbfgcEd84aa5v3ehPk6V" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"display_name\": \"Example Name\",
\"permissions\": [
\"774966b4-1edb-3488-aee3-1aabf20e05e1\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/roles"
);
const headers = {
"Authorization": "Bearer D61ZbfgcEd84aa5v3ehPk6V",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"display_name": "Example Name",
"permissions": [
"774966b4-1edb-3488-aee3-1aabf20e05e1"
]
};
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 54PgaeZcV6vkDh31f8b6dEa" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"display_name\": \"Example Name\",
\"permissions\": [
\"19b6e196-79cd-3c9c-8434-c6c22246233a\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/roles/1"
);
const headers = {
"Authorization": "Bearer 54PgaeZcV6vkDh31f8b6dEa",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"display_name": "Example Name",
"permissions": [
"19b6e196-79cd-3c9c-8434-c6c22246233a"
]
};
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 ZgcD8aekbhfdEa5646VvP31" \
--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 ZgcD8aekbhfdEa5646VvP31",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "339b6d5b-5f5f-3d37-b4eb-c617a4ae6e7e",
"name": "eaque-6b119cc7f0666",
"display_name": "Eum cumque ab ut sit nostrum dignissimos consectetur.",
"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 ek3bZEhD1Vcav685agP6f4d" \
--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 ek3bZEhD1Vcav685agP6f4d",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "eius",
"display_name": "Sit at cumque voluptatem ipsa mollitia sunt eos voluptatem."
},
{
"id": null,
"name": "odio",
"display_name": "Inventore similique est nostrum ut enim sit."
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 6gEZ3f61evcbk8D4Vd5aPha" \
--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 6gEZ3f61evcbk8D4Vd5aPha",
"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 e4hcV6ZdgPaf1DEva365b8k" \
--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 e4hcV6ZdgPaf1DEva365b8k",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "occaecati",
"display_name": "Occaecati dolore quaerat voluptatem."
},
{
"id": null,
"name": "facilis",
"display_name": "Sed numquam ducimus error beatae illum consectetur molestiae."
}
],
"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 cg1kb3E6efPa48V5a6vhdDZ" \
--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 cg1kb3E6efPa48V5a6vhdDZ",
"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 Zv8adgh4k6fP351Dca6bVEe" \
--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 Zv8adgh4k6fP351Dca6bVEe",
"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 e86EkabZvcPhD6dgVaf1354" \
--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 e86EkabZvcPhD6dgVaf1354",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": null,
"name": "nihil",
"display_name": "In nemo totam provident neque."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 6ZV4158DvfgbEkaPce3a6dh" \
--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 6ZV4158DvfgbEkaPce3a6dh",
"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 eg1Zcd8E6abD5VaPkh6v43f" \
--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 eg1Zcd8E6abD5VaPkh6v43f",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "6544dad6-cd0f-38c8-9b5e-123815891709",
"code": null,
"type": "entrada",
"payment_method": "boleto",
"amount": 6534.96,
"due_date": "2026-12-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": "Incidunt maiores dolores eligendi sed fugit expedita occaecati quam sint.",
"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": "sed",
"field2": 52,
"field3": false,
"notes": "Eum saepe officiis ut aut inventore.",
"created_at": null,
"updated_at": null
},
{
"id": "f78f05fb-386d-3de3-82b8-60f1517c83d7",
"code": null,
"type": "entrada",
"payment_method": "cheque",
"amount": 8842.15,
"due_date": "2026-12-23T03: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": "Eos ducimus ea et aut modi itaque porro veniam.",
"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": "optio",
"field2": 30,
"field3": false,
"notes": "Commodi voluptates odit sequi in.",
"created_at": null,
"updated_at": null
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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[]=sunt" \
--header "Authorization: Bearer 586fcDvEPadhaV3kZ16e4gb" \
--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]": "sunt",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 586fcDvEPadhaV3kZ16e4gb",
"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 Z64cEa1VeDa58dhkb6Pvg3f" \
--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 Z64cEa1VeDa58dhkb6Pvg3f",
"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[]=laboriosam&suppliers[]=molestiae&works[]=quidem&cost_centers[]=laborum&statuses[]=pago&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-12-03T13%3A46%3A00&protest_date_end=2026-12-03T13%3A46%3A00&has_protest=1&has_children=1&is_recurring=1" \
--header "Authorization: Bearer 1b5PE3d6v6hkaV8aZfge4Dc" \
--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]": "laboriosam",
"suppliers[0]": "molestiae",
"works[0]": "quidem",
"cost_centers[0]": "laborum",
"statuses[0]": "pago",
"payment_method": "cheque",
"date_start": "2023-01-01",
"date_end": "2023-12-31",
"protest_date_start": "2026-12-03T13:46:00",
"protest_date_end": "2026-12-03T13:46:00",
"has_protest": "1",
"has_children": "1",
"is_recurring": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 1b5PE3d6v6hkaV8aZfge4Dc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "926c365a-77f0-3972-9cdf-99545b9e16c7",
"code": null,
"type": "saída",
"payment_method": "boleto",
"amount": 2249.01,
"due_date": "2026-12-18T03: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": "Voluptas amet molestias et iure repudiandae enim quia voluptas qui et.",
"is_recurring": null,
"recurrence_config": null,
"parent_id": null,
"recurrence_order": 1,
"total_recurrences": null,
"children_count": 0,
"remaining_recurrences": null,
"has_children": false,
"field1": "deleniti",
"field2": 94,
"field3": false,
"notes": "Ducimus quia et possimus facere dolorem cumque.",
"created_at": null,
"updated_at": null
},
{
"id": "41b603fe-c7ca-308c-a5b3-b23f8bd23c26",
"code": null,
"type": "saída",
"payment_method": "cheque",
"amount": 2584.29,
"due_date": "2026-12-15T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Nulla qui voluptatem assumenda repellendus laborum et est dolorem quia eos.",
"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": "ea",
"field2": 34,
"field3": true,
"notes": "Voluptas in sit et aliquid alias.",
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List accounts payable receivable
requires authentication accounts-payable-receivable index
List all accounts payable receivable
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable?sort_by=created_at&sort_desc=1&page=1&per_page=10&q=Salary&code=CPR-000123&type=entrada&customers[]=esse&suppliers[]=autem&works[]=reiciendis&cost_centers[]=et&statuses[]=vencido&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-12-03T13%3A46%3A00&protest_date_end=2026-12-03T13%3A46%3A00&has_protest=1&has_children=1&is_recurring=1" \
--header "Authorization: Bearer efP3cD5vVba6Ek1a8dhg46Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "10",
"q": "Salary",
"code": "CPR-000123",
"type": "entrada",
"customers[0]": "esse",
"suppliers[0]": "autem",
"works[0]": "reiciendis",
"cost_centers[0]": "et",
"statuses[0]": "vencido",
"payment_method": "cheque",
"date_start": "2023-01-01",
"date_end": "2023-12-31",
"protest_date_start": "2026-12-03T13:46:00",
"protest_date_end": "2026-12-03T13:46:00",
"has_protest": "1",
"has_children": "1",
"is_recurring": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer efP3cD5vVba6Ek1a8dhg46Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "eba8021d-ca8c-3738-b34d-4701eb1d52ca",
"code": null,
"type": "entrada",
"payment_method": "boleto",
"amount": 2419.71,
"due_date": "2026-12-25T03: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": "Libero suscipit veniam repellat et fuga omnis consequatur rerum corporis molestias.",
"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": "ad",
"field2": 3,
"field3": true,
"notes": "In enim aut ut sint impedit delectus nemo.",
"created_at": null,
"updated_at": null
},
{
"id": "dc7d01ab-fcf7-38bd-9f19-aece87b574e4",
"code": null,
"type": "entrada",
"payment_method": "boleto",
"amount": 3875.79,
"due_date": "2026-12-22T03: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": "Illo tempore enim autem autem sequi culpa modi facere corporis.",
"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": "minima",
"field2": 5,
"field3": false,
"notes": "Qui earum velit rerum quibusdam et aut.",
"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 6eZDg6E3achP45vbkV1ad8f" \
--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\": \"f981f89a-e2e0-3ff0-9d25-3b0e680e0868\",
\"customer_id\": \"6ec0dd59-332e-37f6-9b59-34b72b523132\",
\"work_id\": \"10e22ba8-836c-3d76-9197-5b0161c02297\",
\"cost_center_id\": \"65f566ac-40ce-3384-8290-8ba5fa627cd8\",
\"status\": \"Example Status\",
\"protest_date\": \"2024-01-01\",
\"bank_account_id\": \"b85deed2-7d51-3c3d-8b5a-292a5cb8b553\",
\"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 6eZDg6E3achP45vbkV1ad8f",
"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": "f981f89a-e2e0-3ff0-9d25-3b0e680e0868",
"customer_id": "6ec0dd59-332e-37f6-9b59-34b72b523132",
"work_id": "10e22ba8-836c-3d76-9197-5b0161c02297",
"cost_center_id": "65f566ac-40ce-3384-8290-8ba5fa627cd8",
"status": "Example Status",
"protest_date": "2024-01-01",
"bank_account_id": "b85deed2-7d51-3c3d-8b5a-292a5cb8b553",
"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 31V8bhkv465adDPEgfaZ6ce" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"fiscal_document_id\": \"aut\",
\"installment_ids\": [
\"aperiam\"
],
\"payment_method\": \"cartao\",
\"work_id\": \"rem\",
\"cost_center_id\": \"molestiae\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/import-nfe"
);
const headers = {
"Authorization": "Bearer 31V8bhkv465adDPEgfaZ6ce",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"fiscal_document_id": "aut",
"installment_ids": [
"aperiam"
],
"payment_method": "cartao",
"work_id": "rem",
"cost_center_id": "molestiae"
};
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/nihil/history" \
--header "Authorization: Bearer fg5vZe83bdEVkPaDc16ah46" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/nihil/history"
);
const headers = {
"Authorization": "Bearer fg5vZe83bdEVkPaDc16ah46",
"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/sit" \
--header "Authorization: Bearer DVegd5vkPZ6f6318cEb4aha" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/sit"
);
const headers = {
"Authorization": "Bearer DVegd5vkPZ6f6318cEb4aha",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "cbac453b-a7de-3295-91e1-705707d59868",
"code": null,
"type": "entrada",
"payment_method": "boleto",
"amount": 5045.14,
"due_date": "2026-12-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": "Corporis inventore harum alias vero inventore quae et velit sequi dolores laudantium nobis aperiam.",
"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": "provident",
"field2": 51,
"field3": false,
"notes": "Eius eos explicabo voluptatem hic.",
"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/sed" \
--header "Authorization: Bearer a3fcD1ve64Vg5dZEhb68kPa" \
--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\": \"da72d681-4eaa-32eb-bf6b-f9d55487e370\",
\"customer_id\": \"41b059f5-1aef-3bbd-8db6-77af8fa11051\",
\"work_id\": \"23ec3904-9e40-3962-9b54-44d057340f26\",
\"cost_center_id\": \"adc0f54c-1698-3b50-8b2e-b53120b2b051\",
\"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\": \"12804816-264c-3aa4-997c-52f475adc660\",
\"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/sed"
);
const headers = {
"Authorization": "Bearer a3fcD1ve64Vg5dZEhb68kPa",
"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": "da72d681-4eaa-32eb-bf6b-f9d55487e370",
"customer_id": "41b059f5-1aef-3bbd-8db6-77af8fa11051",
"work_id": "23ec3904-9e40-3962-9b54-44d057340f26",
"cost_center_id": "adc0f54c-1698-3b50-8b2e-b53120b2b051",
"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": "12804816-264c-3aa4-997c-52f475adc660",
"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/neque" \
--header "Authorization: Bearer c8Ve6ZEg4bD31vfahP6kda5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/neque"
);
const headers = {
"Authorization": "Bearer c8Ve6ZEg4bD31vfahP6kda5",
"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\": \"okeefe.vilma@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": "okeefe.vilma@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 hd5bvgae83aVcZf64E16DkP" \
--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 hd5bvgae83aVcZf64E16DkP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "86131069-5a9f-34f6-8ed0-be46a49c502b",
"name": "Prof. Dedric Wyman",
"username": "wwehner",
"email": "beatty.heath@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 E53VaPf4d6ebakg6h81ZDvc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"merl98\",
\"password\": \"password123\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"498723c2-ae2c-3fbf-a317-60a8de1ef97f\"
],
\"roles\": [
\"40fccac0-7abc-3e71-91ce-6ac2cd32c81b\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/user"
);
const headers = {
"Authorization": "Bearer E53VaPf4d6ebakg6h81ZDvc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "merl98",
"password": "password123",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"498723c2-ae2c-3fbf-a317-60a8de1ef97f"
],
"roles": [
"40fccac0-7abc-3e71-91ce-6ac2cd32c81b"
]
};
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 EZa4Db56h8agk3cvPdf6e1V" \
--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 EZa4Db56h8agk3cvPdf6e1V",
"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 cbE3DP6vZk1dga86f5ehVa4" \
--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 cbE3DP6vZk1dga86f5ehVa4",
"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 VEZ3d6aav8e4k5f1b6DgcPh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"key\": \"fdrpmrveh\",
\"value\": []
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/preferences"
);
const headers = {
"Authorization": "Bearer VEZ3d6aav8e4k5f1b6DgcPh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"key": "fdrpmrveh",
"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/quam" \
--header "Authorization: Bearer 1ahaPE5ZDd6k46V3ecvbgf8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/preferences/quam"
);
const headers = {
"Authorization": "Bearer 1ahaPE5ZDd6k46V3ecvbgf8",
"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 fEP4vc6Z8h5bVkeg1d6Da3a" \
--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 fEP4vc6Z8h5bVkeg1d6Da3a",
"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 4b6hf1EDkaPdgea56vcZ83V" \
--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 4b6hf1EDkaPdgea56vcZ83V",
"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 eDbc6d1Z5afkhEvgP48Va36" \
--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 eDbc6d1Z5afkhEvgP48Va36",
"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/5/deposit" \
--header "Authorization: Bearer 3fkhadceE6bDvg15V486ZaP" \
--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/5/deposit"
);
const headers = {
"Authorization": "Bearer 3fkhadceE6bDvg15V486ZaP",
"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/9/withdraw" \
--header "Authorization: Bearer ZaDd6evEP6afcVbk3485h1g" \
--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/9/withdraw"
);
const headers = {
"Authorization": "Bearer ZaDd6evEP6afcVbk3485h1g",
"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 bcaa6fh8Eg4ZV3d5vekPD61" \
--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 bcaa6fh8Eg4ZV3d5vekPD61",
"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 g6a6DP3c4kbaVv1h85dfeEZ" \
--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 g6a6DP3c4kbaVv1h85dfeEZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "5ef73739-9a4f-30c6-8f2a-54b342e374db",
"agency": "7344",
"account": "7354896-5",
"type": "poupança",
"balance": 8468.66,
"holder_type": "pf",
"alias": "possimus",
"limit": 7870.18,
"available_balance": 16338.84,
"used_limit": 0,
"available_limit": 7870.18,
"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 Zb4deEfc6a3D8kV61P5agvh" \
--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 Zb4deEfc6a3D8kV61P5agvh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "5a9c1e4b-1425-3671-8847-916555f2840f",
"agency": "7870",
"account": "4532488-1",
"type": "caixa",
"balance": 8857.3,
"holder_type": "pj",
"alias": "mollitia",
"limit": 8368.33,
"available_balance": 17225.629999999997,
"used_limit": 0,
"available_limit": 8368.33,
"is_default": null,
"default_payment_method": null,
"bank": {
"id": null,
"name": null,
"code": null
},
"created_at": null,
"updated_at": null
},
{
"id": "a3157cc8-d36c-36e3-9f60-68373f44b800",
"agency": "6172",
"account": "6195993-3",
"type": "poupança",
"balance": 689.68,
"holder_type": "pj",
"alias": "omnis",
"limit": 8906.29,
"available_balance": 9595.970000000001,
"used_limit": 0,
"available_limit": 8906.29,
"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 5dPb6Dekaf1aZ4h8VvE6cg3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"agency\": \"Example Agency\",
\"account\": \"0499037-3\",
\"bank_id\": \"0828b9d6-15be-3663-a5b2-40f82a613f60\",
\"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 5dPb6Dekaf1aZ4h8VvE6cg3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"agency": "Example Agency",
"account": "0499037-3",
"bank_id": "0828b9d6-15be-3663-a5b2-40f82a613f60",
"type": "Example Type",
"holder_type": "Example Holder type",
"alias": "Example Alias",
"balance": 1,
"limit": 1,
"is_default": true,
"default_payment_method": "Example Default payment method"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update bank account
requires authentication bank-account update
Update a bank account
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/14" \
--header "Authorization: Bearer Vbak8653vEDZPhg641fdcea" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"agency\": \"Example Agency\",
\"account\": \"7998837-3\",
\"bank_id\": \"4916dba1-8674-35a8-b9da-8e30e362cde0\",
\"type\": \"Example Type\",
\"holder_type\": \"Example Holder type\",
\"alias\": \"Example Alias\",
\"balance\": 1,
\"limit\": 1,
\"is_default\": true,
\"default_payment_method\": \"Example Default payment method\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/14"
);
const headers = {
"Authorization": "Bearer Vbak8653vEDZPhg641fdcea",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"agency": "Example Agency",
"account": "7998837-3",
"bank_id": "4916dba1-8674-35a8-b9da-8e30e362cde0",
"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/3" \
--header "Authorization: Bearer k3g658Pv6abeha1EDZcfdV4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/3"
);
const headers = {
"Authorization": "Bearer k3g658Pv6abeha1EDZcfdV4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "3b493e12-2b7c-3c72-946a-85ab86d1bddc",
"agency": "2968",
"account": "6101792-0",
"type": "poupança",
"balance": 8897.44,
"holder_type": "pj",
"alias": "consequatur",
"limit": 4108.34,
"available_balance": 13005.78,
"used_limit": 0,
"available_limit": 4108.34,
"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/2" \
--header "Authorization: Bearer 5PkfgEhV6a4cZeD38abd1v6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/2"
);
const headers = {
"Authorization": "Bearer 5PkfgEhV6a4cZeD38abd1v6",
"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/19/statements/summary" \
--header "Authorization: Bearer e1cakDEbhaZv6gP65V4fd38" \
--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/19/statements/summary"
);
const headers = {
"Authorization": "Bearer e1cakDEbhaZv6gP65V4fd38",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date_start": "2024-01-01",
"date_end": "2024-01-01"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"opening_balance": "number",
"closing_balance": "number",
"total_credit": "number",
"total_debit": "number",
"count": "integer",
"date_start": "string",
"date_end": "string"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List bank statements
requires authentication bank-statement index
List statements for a bank account. Default period: last 30 days.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/bank-accounts/11/statements" \
--header "Authorization: Bearer 8Pk6v3bVghc4ed1aaf6E5DZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"natus\",
\"sort_desc\": true,
\"page\": 7,
\"per_page\": 5,
\"q\": \"aatkziuzhunywqmfrmu\",
\"type\": \"tarifa\",
\"date_start\": \"2026-12-03T13:46:01\",
\"date_end\": \"2027-12-18\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/11/statements"
);
const headers = {
"Authorization": "Bearer 8Pk6v3bVghc4ed1aaf6E5DZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "natus",
"sort_desc": true,
"page": 7,
"per_page": 5,
"q": "aatkziuzhunywqmfrmu",
"type": "tarifa",
"date_start": "2026-12-03T13:46:01",
"date_end": "2027-12-18"
};
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/4/statements/repudiandae" \
--header "Authorization: Bearer E6Pvhca1kbZ346DeVd8g5af" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/4/statements/repudiandae"
);
const headers = {
"Authorization": "Bearer E6Pvhca1kbZ346DeVd8g5af",
"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 kgP46V865eZhba3DEcvafd1" \
--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 kgP46V865eZhba3DEcvafd1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "40ffb982-2383-32e7-ac2b-1e4a3cfa1ab0",
"name": "Sanches e Arruda e Associados",
"code": "869"
},
{
"id": "38007898-686b-36fc-af56-fabfbdd0ee31",
"name": "Valente-Deverso",
"code": "973"
}
],
"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 3ad8fg5k1ebZ46VaEcP6vhD" \
--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 3ad8fg5k1ebZ46VaEcP6vhD",
"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 c14Z5b6PEda38v6fheVkagD" \
--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 c14Z5b6PEda38v6fheVkagD",
"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 dh6vZbaE4c3Dk58gVaefP61" \
--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 dh6vZbaE4c3Dk58gVaefP61",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "dd1430da-9233-3c72-b060-b8112fe283f3",
"name": "da Silva e Filhos",
"code": "28"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 bEf63akcd416DPaZvheV85g" \
--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 bEf63akcd416DPaZvheV85g",
"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 Zba6h6EkV4cv3DdP8f1a5eg" \
--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 Zba6h6EkV4cv3DdP8f1a5eg",
"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=Vel+aut+aliquid+ducimus.&categories[]=exercitationem&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=labore&customers[]=dignissimos&suppliers[]=totam&works[]=modi&cost_centers[]=illum" \
--header "Authorization: Bearer Ze6gVabD6v1fhPk85E4dca3" \
--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": "Vel aut aliquid ducimus.",
"categories[0]": "exercitationem",
"date_start": "2021-01-01",
"date_end": "2021-01-31",
"bank_accounts[0]": "labore",
"customers[0]": "dignissimos",
"suppliers[0]": "totam",
"works[0]": "modi",
"cost_centers[0]": "illum",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Ze6gVabD6v1fhPk85E4dca3",
"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=Ratione+quas+magnam+magnam+sed+aut+mollitia+consequatur.&categories[]=fugit&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=optio&customers[]=et&suppliers[]=eum&works[]=eveniet&cost_centers[]=illum" \
--header "Authorization: Bearer g1P6Va5bE3D4dkZfeah6vc8" \
--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": "Ratione quas magnam magnam sed aut mollitia consequatur.",
"categories[0]": "fugit",
"date_start": "2021-01-01",
"date_end": "2021-01-31",
"bank_accounts[0]": "optio",
"customers[0]": "et",
"suppliers[0]": "eum",
"works[0]": "eveniet",
"cost_centers[0]": "illum",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer g1P6Va5bE3D4dkZfeah6vc8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "736ab5ea-08d1-3ec9-9019-01054aa43c16",
"code": "FC-70774480",
"type": "tarifa",
"amount": -4556.21,
"description": "Quae sequi omnis earum illum laborum dolore esse illum.",
"transaction_date": "1986-11-10T02:00:00.000000Z",
"transaction_category": {
"id": null,
"name": null,
"type": null
},
"created_at": null,
"updated_at": null
},
{
"id": "e61ac597-b650-35d8-8ffe-3f5cb9e1a02b",
"code": "FC-81442896",
"type": "entrada",
"amount": 9044.77,
"description": "A qui recusandae vitae nobis.",
"transaction_date": "1992-10-02T03: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 EV6dZv5gfPa8a63kDebc41h" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"Example Type\",
\"cash_session_id\": \"4c5b2d5f-9546-34f3-9c52-ec14a6ded7b0\",
\"transaction_category_id\": \"c5cda7e5-e025-3142-a2bf-3663053352ce\",
\"bank_account_id\": \"85a3e419-72bf-3e05-ba72-ea4c0c09b006\",
\"customer_id\": \"dd588a7e-04ff-3bfb-989a-87eceac3bd32\",
\"supplier_id\": \"87aeb955-4cad-329f-83e2-2f25070f1dfd\",
\"work_id\": \"14c7cd05-26c9-3bb8-8bae-58cb01504430\",
\"cost_center_id\": \"b022957d-990f-39d7-9b35-ff4f3ed0516b\",
\"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 EV6dZv5gfPa8a63kDebc41h",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "Example Type",
"cash_session_id": "4c5b2d5f-9546-34f3-9c52-ec14a6ded7b0",
"transaction_category_id": "c5cda7e5-e025-3142-a2bf-3663053352ce",
"bank_account_id": "85a3e419-72bf-3e05-ba72-ea4c0c09b006",
"customer_id": "dd588a7e-04ff-3bfb-989a-87eceac3bd32",
"supplier_id": "87aeb955-4cad-329f-83e2-2f25070f1dfd",
"work_id": "14c7cd05-26c9-3bb8-8bae-58cb01504430",
"cost_center_id": "b022957d-990f-39d7-9b35-ff4f3ed0516b",
"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/2" \
--header "Authorization: Bearer Vcha4bef6d8aZ3DE6Pvkg51" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/2"
);
const headers = {
"Authorization": "Bearer Vcha4bef6d8aZ3DE6Pvkg51",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "b79d7ade-407a-3dea-85da-01c0d3a54539",
"code": "FC-02696266",
"type": "tarifa",
"amount": -2598.52,
"description": "Sunt officiis sit id aut ut.",
"transaction_date": "2025-11-28T03: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/18" \
--header "Authorization: Bearer 3e1EcfbP6Vv4Z6kghD5da8a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"Example Type\",
\"cash_session_id\": \"36d6c949-9d0e-3fe9-b1c8-52db3b5c83e0\",
\"transaction_category_id\": \"b9c28d44-011f-3662-8fa0-4c6d2117fca7\",
\"bank_account_id\": \"ca438581-c09b-3784-aa39-bd59107adb73\",
\"customer_id\": \"6dabb138-5e1a-30e8-9f22-21f1a4e6fdda\",
\"supplier_id\": \"096bdf82-182e-3d3e-ae59-a28c8110b091\",
\"work_id\": \"3dec6f29-9d83-3e8a-ad60-a19913dd407c\",
\"cost_center_id\": \"b73e84ed-2cc8-3093-8605-5ea88db069b1\",
\"amount\": 1,
\"description\": \"Example Description\",
\"transaction_date\": \"2024-01-01\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/18"
);
const headers = {
"Authorization": "Bearer 3e1EcfbP6Vv4Z6kghD5da8a",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "Example Type",
"cash_session_id": "36d6c949-9d0e-3fe9-b1c8-52db3b5c83e0",
"transaction_category_id": "b9c28d44-011f-3662-8fa0-4c6d2117fca7",
"bank_account_id": "ca438581-c09b-3784-aa39-bd59107adb73",
"customer_id": "6dabb138-5e1a-30e8-9f22-21f1a4e6fdda",
"supplier_id": "096bdf82-182e-3d3e-ae59-a28c8110b091",
"work_id": "3dec6f29-9d83-3e8a-ad60-a19913dd407c",
"cost_center_id": "b73e84ed-2cc8-3093-8605-5ea88db069b1",
"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/2" \
--header "Authorization: Bearer vcVaPZkdg1bhE8De635af46" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/2"
);
const headers = {
"Authorization": "Bearer vcVaPZkdg1bhE8De635af46",
"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 fZda1eV4h6aD38P6Ebgvk5c" \
--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 fZda1eV4h6aD38P6Ebgvk5c",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "379dde52-27f5-3ffa-b0df-540b1bc20567",
"code": null,
"opened_by": null,
"opened_at": "1986-08-20T21:11:48.000000Z",
"closed_by": null,
"closed_at": "1998-09-30T09:23:10.000000Z",
"opening_balance": 4568.83,
"closing_balance": 2548.34,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Aberto",
"hasSnapshot": false,
"created_at": "1994-01-26T13:32:39.000000Z",
"updated_at": "1972-08-22T07:52:04.000000Z"
},
{
"id": "a41e5b0c-85a4-3bb9-827d-b48e6b4229aa",
"code": null,
"opened_by": null,
"opened_at": "1975-11-16T19:15:24.000000Z",
"closed_by": null,
"closed_at": "2004-10-28T23:20:06.000000Z",
"opening_balance": 1904.27,
"closing_balance": 6936.29,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Fechado",
"hasSnapshot": false,
"created_at": "2002-02-19T06:31:37.000000Z",
"updated_at": "1980-11-19T18:55:15.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 gP6Ve14856dabhvfk3ZDaEc" \
--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 gP6Ve14856dabhvfk3ZDaEc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "1850c665-1fe8-39a7-b35f-238dcbe7cd21",
"code": null,
"opened_by": null,
"opened_at": "1975-09-02T18:10:05.000000Z",
"closed_by": null,
"closed_at": "1974-05-11T17:00:41.000000Z",
"opening_balance": 3153.86,
"closing_balance": 138.31,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Aberto",
"hasSnapshot": false,
"created_at": "1971-01-31T11:39:58.000000Z",
"updated_at": "2000-09-23T17:13:14.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/a936a3aa-c0c6-3982-aef7-4bf1aea1efc4" \
--header "Authorization: Bearer kc8E6D1aea6hfZvP43g5bVd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/close/a936a3aa-c0c6-3982-aef7-4bf1aea1efc4"
);
const headers = {
"Authorization": "Bearer kc8E6D1aea6hfZvP43g5bVd",
"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/19ead890-16ff-39c2-b82a-393a8e1b5a91/account-snapshot" \
--header "Authorization: Bearer f6cked18Z6aVgDah34EbP5v" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/19ead890-16ff-39c2-b82a-393a8e1b5a91/account-snapshot"
);
const headers = {
"Authorization": "Bearer f6cked18Z6aVgDah34EbP5v",
"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/8af6fd41-4660-3f0a-85c2-d425527490d4" \
--header "Authorization: Bearer EbcgZafP1vDed65k3aV846h" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/8af6fd41-4660-3f0a-85c2-d425527490d4"
);
const headers = {
"Authorization": "Bearer EbcgZafP1vDed65k3aV846h",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "306aaf8e-9955-320a-93f1-88e52003ddc6",
"code": null,
"opened_by": null,
"opened_at": "1977-11-07T22:55:30.000000Z",
"closed_by": null,
"closed_at": "2021-04-06T11:09:11.000000Z",
"opening_balance": 127.58,
"closing_balance": 5045.78,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Aberto",
"hasSnapshot": false,
"created_at": "1970-03-29T05:59:10.000000Z",
"updated_at": "1982-01-05T23:53:32.000000Z"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete cash session
requires authentication cash-session delete
Delete a cash session
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/389aa94e-d94c-38cc-b024-5732771f55ca" \
--header "Authorization: Bearer 3h1b8ae6d4kfcgDaEvPZ5V6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/389aa94e-d94c-38cc-b024-5732771f55ca"
);
const headers = {
"Authorization": "Bearer 3h1b8ae6d4kfcgDaEvPZ5V6",
"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 ev3akgEbZ451fDcPd668ahV" \
--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 ev3akgEbZ451fDcPd668ahV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "99862fb1-55c1-3c4f-b988-13145ab87c14",
"name": "aspernatur voluptatum",
"slug": null,
"abbreviation": "fst",
"tutorials_count": 0
},
{
"id": "83233953-4042-31f5-a2a0-c713725fab54",
"name": "culpa enim",
"slug": null,
"abbreviation": null,
"tutorials_count": 0
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Módulos da central
requires authentication No specific permission required
Módulos ativos com tutoriais visíveis para a pessoa; aceita filtro de setor
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/tutorials/modules" \
--header "Authorization: Bearer 638h6aD4EPv51kfVgdeabcZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/tutorials/modules"
);
const headers = {
"Authorization": "Bearer 638h6aD4EPv51kfVgdeabcZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "667dcf46-1662-3430-b0e4-2d209f0f5b23",
"name": "Et quae",
"slug": "et-quae-901840",
"description": "Quod tempore et possimus odio.",
"icon": null,
"color": null,
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
},
{
"id": "0fe1edc7-5e72-3e16-8311-8d32a098a7f0",
"name": "Ullam enim",
"slug": "ullam-enim-51068",
"description": "Officiis quo beatae omnis aut numquam natus cumque aut.",
"icon": null,
"color": null,
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Listar tutoriais
requires authentication No specific permission required
Lista paginada dos tutoriais visíveis, com filtros de módulo, setor e busca por texto
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/tutorials?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=ordem+de+servi%C3%A7o&module_id[]=425e28d4-3dbc-3f7d-918e-b33d4df03c71" \
--header "Authorization: Bearer fa3ad6c1bPgv4kVhD5ZE6e8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/tutorials"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "ordem de serviço",
"module_id[0]": "425e28d4-3dbc-3f7d-918e-b33d4df03c71",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer fa3ad6c1bPgv4kVhD5ZE6e8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "1fe1dd7a-9fe2-3c10-9a9d-267eb3e6be1f",
"title": "Harum ipsam porro quos",
"description": "Itaque sequi neque assumenda error et.",
"cover_url": null,
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a35fbfec-c3ce-4ab6-8f8d-a41878f0667a",
"name": "Corrupti dolores",
"slug": "corrupti-dolores-594176",
"icon": null,
"color": null
},
"created_at": null,
"updated_at": null
},
{
"id": "1fe907f5-3ebe-380b-87f3-4001bcb533ec",
"title": "Molestiae blanditiis sit voluptatem",
"description": "Repudiandae voluptates neque rerum nihil.",
"cover_url": null,
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a35fbfec-cd8d-46d9-9ec6-fac5d94b45bd",
"name": "Aut quia",
"slug": "aut-quia-795768",
"icon": null,
"color": null
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Detalhe do tutorial
requires authentication No specific permission required
Tutorial com os itens em ordem. Fora da visibilidade, responde 404.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/tutorials/1" \
--header "Authorization: Bearer 3eEVbhPagD65ckd6Z4f8va1" \
--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 3eEVbhPagD65ckd6Z4f8va1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "3666519f-b0a7-3c9c-bcda-f0850fdaa74d",
"title": "Sed autem aliquam et",
"description": "Aliquid quod asperiores consequatur rem.",
"cover_url": null,
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a35fbfec-d3e9-45a8-a0a3-749824bc5e53",
"name": "Sint voluptatibus",
"slug": "sint-voluptatibus-55461",
"icon": null,
"color": null
},
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
URL do item
requires authentication No specific permission required
Devolve a URL assinada de curta validade para o arquivo no S3, ou o link externo do item. O caminho bruto do S3 nunca é exposto.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/tutorial-items/019556e7-2e9f-777c-a177-30bbf0646c32/url" \
--header "Authorization: Bearer VP3Eh186Za6bDcgad4k5evf" \
--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 VP3Eh186Za6bDcgad4k5evf",
"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 k16fhEa4ZPV3agdDc56bev8" \
--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\": \"4ae690b3-cc9b-3e53-8a93-12c2ea0f7c8f\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts"
);
const headers = {
"Authorization": "Bearer k16fhEa4ZPV3agdDc56bev8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "Example Sort by",
"sort_desc": true,
"page": 1,
"per_page": 1,
"work_id": "4ae690b3-cc9b-3e53-8a93-12c2ea0f7c8f"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "e7470279-85a1-3201-baff-30ea736125b2",
"number": "175/2026",
"started_at": "2026-12-03",
"deadline_at": "2027-12-03",
"work": {
"id": "a35fbfdc-d82e-4d78-b672-9983844a985a",
"name": "Daniella Carolina Ortega"
},
"created_at": null,
"updated_at": null
},
{
"id": "70a5dbf5-132d-33ef-8d8b-5db0c74a3f39",
"number": "011/2026",
"started_at": "2026-12-03",
"deadline_at": "2027-12-03",
"work": {
"id": "a35fbfdc-ed7c-4e86-8289-009f5b6b2011",
"name": "Dr. Benjamin Simon Reis"
},
"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 e3avPhkZD5gfacd41Eb6V68" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"work_id\": \"fc86fac0-a347-3898-b79c-b731ea79797e\",
\"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 e3avPhkZD5gfacd41Eb6V68",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"work_id": "fc86fac0-a347-3898-b79c-b731ea79797e",
"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/5" \
--header "Authorization: Bearer vPV4ha5D1k8gfa3c6EdbZe6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts/5"
);
const headers = {
"Authorization": "Bearer vPV4ha5D1k8gfa3c6EdbZe6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "ec6e95b7-8890-33be-87f7-03b902f02ef2",
"number": "487/2026",
"started_at": "2026-12-03",
"deadline_at": "2027-12-03",
"work": {
"id": "a35fbfdc-fd45-4968-9e27-e1e2a5f0cee7",
"name": "Dr. Daniele Flávia Valente Filho"
},
"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/20" \
--header "Authorization: Bearer PeaV8vk4c5ba6h3dE1gZfD6" \
--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/20"
);
const headers = {
"Authorization": "Bearer PeaV8vk4c5ba6h3dE1gZfD6",
"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/nesciunt" \
--header "Authorization: Bearer gv165DaEck8ePahdVZbf463" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts/nesciunt"
);
const headers = {
"Authorization": "Bearer gv165DaEck8ePahdVZbf463",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cost Centers
Endpoints for cost centers
Suggest next code
requires authentication cost-center index
Próximo código livre sob o pai informado. O código é sugestão e pode ser alterado antes de salvar.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/cost-centers/next-code?parent_id=sequi" \
--header "Authorization: Bearer d6VaPbE451vZ8feacg36Dkh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"parent_id\": \"culpa\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/next-code"
);
const params = {
"parent_id": "sequi",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer d6VaPbE451vZ8feacg36Dkh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"parent_id": "culpa"
};
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 h3f6agPbd1D54acekE68vVZ" \
--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 h3f6agPbd1D54acekE68vVZ",
"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 65aeDh3cdva4f1E8bgZ6kVP" \
--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 65aeDh3cdva4f1E8bgZ6kVP",
"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 k6a18eaPEc4dfVDv6hZ5gb3" \
--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 k6a18eaPEc4dfVDv6hZ5gb3",
"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 a5g6b6ace8dhZE4PVk3v1Df" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"cost_center_id\": \"repudiandae\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/stock-config"
);
const headers = {
"Authorization": "Bearer a5g6b6ace8dhZE4PVk3v1Df",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"cost_center_id": "repudiandae"
};
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 baEV3ce1gPaD6f45kvZd8h6" \
--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 baEV3ce1gPaD6f45kvZd8h6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "07764f2a-d80c-36b7-b054-17497cf48361",
"code": "177",
"name": "omnis eos",
"level": 1,
"path": null,
"is_active": true,
"selectable": false,
"created_at": null,
"updated_at": null
},
{
"id": "7a177e22-144d-3a2a-9c6b-db9c3ab97b1e",
"code": "771",
"name": "porro quis",
"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/omnis" \
--header "Authorization: Bearer kfc45Db3eZ6dEhP6Vagv81a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/omnis"
);
const headers = {
"Authorization": "Bearer kfc45Db3eZ6dEhP6Vagv81a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "16320d28-7e19-34c7-ae10-cc7cbfd74d2c",
"code": "547",
"name": "iste iusto",
"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 D1hP8kvaVgZE564b6a3defc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"code\": \"Example Code\",
\"name\": \"Example Name\",
\"parent_id\": \"03eb7abe-fc1c-3b90-ab88-5dda581118e6\",
\"work_id\": \"e31c1e4d-c66d-370e-9f14-4102ab70cfb7\",
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers"
);
const headers = {
"Authorization": "Bearer D1hP8kvaVgZE564b6a3defc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"code": "Example Code",
"name": "Example Name",
"parent_id": "03eb7abe-fc1c-3b90-ab88-5dda581118e6",
"work_id": "e31c1e4d-c66d-370e-9f14-4102ab70cfb7",
"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/nemo" \
--header "Authorization: Bearer 6354Pg6aebcvdZ8kfhaEV1D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"code\": \"Example Code\",
\"name\": \"Example Name\",
\"parent_id\": \"84dfa76b-79ff-3455-97fb-35286fa07398\",
\"work_id\": \"0909f07c-ed2e-3047-b6fd-2b5a5d352541\",
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/nemo"
);
const headers = {
"Authorization": "Bearer 6354Pg6aebcvdZ8kfhaEV1D",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"code": "Example Code",
"name": "Example Name",
"parent_id": "84dfa76b-79ff-3455-97fb-35286fa07398",
"work_id": "0909f07c-ed2e-3047-b6fd-2b5a5d352541",
"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/laboriosam" \
--header "Authorization: Bearer kegb3d6ah4VPf851aEcZDv6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/laboriosam"
);
const headers = {
"Authorization": "Bearer kegb3d6ah4VPf851aEcZDv6",
"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 8c6h4DP3ZgbvE1dakVf65ea" \
--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 8c6h4DP3ZgbvE1dakVf65ea",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "fdef616d-f057-3be2-b2d5-c4d15d60b759",
"name": "Sr. Nelson Vila Sobrinho",
"email": "eunice.ferminiano@example.com",
"phone": "(64) 95778-3938",
"document": "485.477.968-35",
"type": "pj",
"responsible": "Isadora Abgail Rocha Jr.",
"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": "a2be255e-f9f4-3c28-9738-d29f12e616e1",
"name": "Sr. Simão Dominato",
"email": "lvale@example.org",
"phone": "(96) 91593-1680",
"document": "880.471.607-02",
"type": "pj",
"responsible": "Tatiana Malena da Cruz",
"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 8EPD5v16Zh3e4Vgbckfdaa6" \
--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 8EPD5v16Zh3e4Vgbckfdaa6",
"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/12" \
--header "Authorization: Bearer aP8561a6gfkbEDh43eVdvcZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/customers/12"
);
const headers = {
"Authorization": "Bearer aP8561a6gfkbEDh43eVdvcZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "5ae9a50f-86e0-36ef-bc01-832be22a01ae",
"name": "Dr. Raysa de Oliveira Jr.",
"email": "henrique26@example.net",
"phone": "(45) 3592-6807",
"document": "581.946.327-73",
"type": "pj",
"responsible": "Karen Perez",
"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/5" \
--header "Authorization: Bearer h5gP6VD8e1ZbcvdEka3f4a6" \
--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/5"
);
const headers = {
"Authorization": "Bearer h5gP6VD8e1ZbcvdEka3f4a6",
"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 aEP64cvDgbZ68k35h1defVa" \
--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 aEP64cvDgbZ68k35h1defVa",
"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 dhvfEV35Z1kb8a6aeP6cD4g" \
--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\": \"2069190d-fa35-381d-8165-44ae38441c9f\",
\"contract_id\": \"79cc2572-6808-3565-afac-604f15e295f9\",
\"status_id\": \"b97102d9-e18a-3400-9932-aea274d5c38e\",
\"filled_by\": \"263aefd6-45d7-37a6-a5fc-896e1f9c340a\",
\"responsible_id\": \"4c2fea9a-88df-3270-a9c9-052e0dc1d3ec\",
\"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 dhvfEV35Z1kb8a6aeP6cD4g",
"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": "2069190d-fa35-381d-8165-44ae38441c9f",
"contract_id": "79cc2572-6808-3565-afac-604f15e295f9",
"status_id": "b97102d9-e18a-3400-9932-aea274d5c38e",
"filled_by": "263aefd6-45d7-37a6-a5fc-896e1f9c340a",
"responsible_id": "4c2fea9a-88df-3270-a9c9-052e0dc1d3ec",
"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": "cec3d005-c90e-36de-8825-524bf9ed053c",
"code": "RDO-03-12-26",
"report_number": 1,
"date": "2026-12-03",
"status": {
"id": "a35fbfde-6e6a-449c-b4ca-f24f2b650faa",
"slug": null,
"name": null,
"abbreviation": "non",
"color": "#6db805",
"text_color": "#90885b"
},
"work": {
"id": "a35fbfde-5820-4f38-a11d-a185bcde0227",
"name": "Natan Jorge Delgado Jr.",
"started_at": "1999-01-08 06:48:47"
},
"filled_by": {
"id": "a35fbfde-6665-46a4-aaa9-9bbc28a8e9b8",
"name": "Mrs. Ashlynn Cormier"
},
"contract_number": "328/2026",
"deadline_at": "2027-12-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": "baa5625b-e708-30d4-98cf-9c1c38b48199",
"code": "RDO-03-12-26",
"report_number": 1,
"date": "2026-12-03",
"status": {
"id": "a35fbfde-8826-46f2-b395-a7c28f7f54b2",
"slug": null,
"name": null,
"abbreviation": "non",
"color": "#7c8f65",
"text_color": "#30d34c"
},
"work": {
"id": "a35fbfde-7805-417f-8543-9ff28f0f7860",
"name": "Srta. Louise Rangel Cruz Jr.",
"started_at": "1989-04-09 14:50:23"
},
"filled_by": {
"id": "a35fbfde-82e5-4924-b517-71bbc6c75c81",
"name": "Lawson Harvey"
},
"contract_number": "576/2026",
"deadline_at": "2027-12-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 e51hcfDEvVP8kgZdb634aa6" \
--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 e51hcfDEvVP8kgZdb634aa6",
"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/dicta" \
--header "Authorization: Bearer a1D3gbVv4a66dPeck8fhZ5E" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/dicta"
);
const headers = {
"Authorization": "Bearer a1D3gbVv4a66dPeck8fhZ5E",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "9da6f095-1afc-3bad-bc08-0f46afd16089",
"code": "RDO-03-12-26",
"report_number": 1,
"date": "2026-12-03",
"status": {
"id": "a35fbfde-cb01-470e-a25c-c5edb04dc384",
"slug": null,
"name": null,
"abbreviation": "tenetur",
"color": "#cd2f64",
"text_color": "#878b34"
},
"work": {
"id": "a35fbfde-b713-4b2c-b5c7-177335bdca18",
"name": "Dr. Ricardo Leo Zambrano Filho",
"started_at": "2024-06-30 10:14:18"
},
"filled_by": {
"id": "a35fbfde-c6f0-4e44-8e3d-f8ec5d438eab",
"name": "Nedra Gottlieb"
},
"contract_number": "534/2026",
"deadline_at": "2027-12-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 hk46EabZD6gedcv18VfP5a3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"contract_id\": \"Example Contract id\",
\"date\": \"2024-01-01\",
\"status_id\": \"0a61021e-3aba-3d92-9be8-55926d15a06c\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs"
);
const headers = {
"Authorization": "Bearer hk46EabZD6gedcv18VfP5a3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"contract_id": "Example Contract id",
"date": "2024-01-01",
"status_id": "0a61021e-3aba-3d92-9be8-55926d15a06c"
};
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/eum" \
--header "Authorization: Bearer efhbEVva3654D8g16aPcdkZ" \
--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\": \"2f659d49-311a-4252-aa9b-52c7f0174712\",
\"quantity\": 1
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/eum"
);
const headers = {
"Authorization": "Bearer efhbEVva3654D8g16aPcdkZ",
"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": "2f659d49-311a-4252-aa9b-52c7f0174712",
"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/non/finalize" \
--header "Authorization: Bearer f1PEdVba6ZD84hgv5c3ea6k" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/non/finalize"
);
const headers = {
"Authorization": "Bearer f1PEdVba6ZD84hgv5c3ea6k",
"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/iure/signed-document" \
--header "Authorization: Bearer daEcfkD58aZ3Pg46eV1bvh6" \
--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/iure/signed-document"
);
const headers = {
"Authorization": "Bearer daEcfkD58aZ3Pg46eV1bvh6",
"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/maxime/reopen" \
--header "Authorization: Bearer P3Vf6cv1h485EDb6gZedaak" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/maxime/reopen"
);
const headers = {
"Authorization": "Bearer P3Vf6cv1h485EDb6gZedaak",
"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/commodi/photos" \
--header "Authorization: Bearer 5E8vcd3V1bhD6feag4kaZ6P" \
--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/commodi/photos"
);
const headers = {
"Authorization": "Bearer 5E8vcd3V1bhD6feag4kaZ6P",
"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/molestias/photos/sit" \
--header "Authorization: Bearer ebV5Pg6Ev8c1kDdafa36hZ4" \
--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/molestias/photos/sit"
);
const headers = {
"Authorization": "Bearer ebV5Pg6Ev8c1kDdafa36hZ4",
"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/ipsa/photos/aut" \
--header "Authorization: Bearer 6eg4P8av1DV3Zc6abdE5hkf" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/ipsa/photos/aut"
);
const headers = {
"Authorization": "Bearer 6eg4P8av1DV3Zc6abdE5hkf",
"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/ducimus" \
--header "Authorization: Bearer ZPDv84f3dhV61k56eEcgaab" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/ducimus"
);
const headers = {
"Authorization": "Bearer ZPDv84f3dhV61k56eEcgaab",
"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 Eckh1Zg8f5V36veaaPDd4b6" \
--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 Eckh1Zg8f5V36veaaPDd4b6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "8383c259-0541-36c1-9328-e349ef627d76",
"name": "Ad",
"code": "HDT",
"description": "Iusto repellat consectetur deleniti eos iusto.",
"active": true
},
{
"id": "21a5cf1e-b709-3659-8ec1-ee105d9ed963",
"name": "Eaque",
"code": "KNJ",
"description": "Fugiat ea quis natus in alias non accusamus et.",
"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 Evc6ge8Vhab6kaPZDf154d3" \
--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 Evc6ge8Vhab6kaPZDf154d3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "1411dc18-972e-3eca-9e3f-22478b0b5372",
"name": "Velit",
"code": "JSG",
"description": "Autem repellat eligendi voluptatum.",
"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 b3ak1465gZPaDVehE8dcv6f" \
--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 b3ak1465gZPaDVehE8dcv6f",
"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 Ecv65h6D8kPb3aadZfg41Ve" \
--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 Ecv65h6D8kPb3aadZfg41Ve",
"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/facilis" \
--header "Authorization: Bearer 66v8baDZPkEf4ch31daeVg5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/disciplines/facilis"
);
const headers = {
"Authorization": "Bearer 66v8baDZPkEf4ch31daeVg5",
"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 g8fdha6Eb56kV4Z1cPaveD3" \
--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 g8fdha6Eb56kV4Z1cPaveD3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "c2678a37-5267-30df-a4bb-c5f163d2f5f1",
"name": "Isaac de Souza Salgado",
"description": "Tempora est sit ea nisi sunt voluptate. Et numquam eligendi at autem magnam. Dignissimos dolor quisquam eligendi dolore. Magni a est dolorum non vel dolor. Deleniti rem et animi.",
"module": "document"
},
{
"id": "c028ddaf-31bc-3975-ad94-4c219df764eb",
"name": "Agustina Ferreira Cervantes Filho",
"description": "Sed eos architecto est et sunt. Iusto officia eligendi sed quia aperiam quis. Iusto repellat voluptatem itaque quos.",
"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/quod" \
--header "Authorization: Bearer g5ba4e6E1vcDPkhaZ3d68fV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/document-categories/quod"
);
const headers = {
"Authorization": "Bearer g5ba4e6E1vcDPkhaZ3d68fV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "19c6e384-1096-3e24-9b3d-ee8abcab2b05",
"name": "Dr. Poliana Léia Bonilha",
"description": "Ut sed voluptatem eos autem possimus. Rerum vero aliquid praesentium. Quidem perspiciatis quis numquam necessitatibus.",
"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 1Eb4vfPcZg6k6eVdh358aDa" \
--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 1Eb4vfPcZg6k6eVdh358aDa",
"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/quasi" \
--header "Authorization: Bearer gah3b685k46DZecdVvafE1P" \
--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/quasi"
);
const headers = {
"Authorization": "Bearer gah3b685k46DZecdVvafE1P",
"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/voluptatem" \
--header "Authorization: Bearer e13P5vdf68Va6bkDachEgZ4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/document-categories/voluptatem"
);
const headers = {
"Authorization": "Bearer e13P5vdf68Va6bkDachEgZ4",
"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[]=ut&documentable_type=magnam&customers[]=enim&suppliers[]=reiciendis" \
--header "Authorization: Bearer h3864bckDPaVfgEeZ1v6a5d" \
--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]": "ut",
"documentable_type": "magnam",
"customers[0]": "enim",
"suppliers[0]": "reiciendis",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer h3864bckDPaVfgEeZ1v6a5d",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "e33621d5-bf3f-39b2-90e8-fb6f8de3eea8",
"name": "Hernani Rodrigo Valente Sobrinho",
"file": {
"id": null,
"url": null,
"extension": null
},
"created_at": null,
"updated_at": null
},
{
"id": "a1f6a8f0-38bc-3e3b-adec-076629cc78f5",
"name": "Sr. Gean Sandro Leal",
"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/9" \
--header "Authorization: Bearer aaE1P5b63vD4k8cdfg6eVZh" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/documents/9"
);
const headers = {
"Authorization": "Bearer aaE1P5b63vD4k8cdfg6eVZh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "c5470044-f7b2-3c48-978a-ee64cc4f92f8",
"name": "Dr. Roberto Simon Pacheco Sobrinho",
"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 34adPgfcek6Da1Eh8VbZ5v6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"category_id\": \"56614985-f7e4-3ceb-97d3-93e5f210df31\",
\"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 34adPgfcek6Da1Eh8VbZ5v6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"category_id": "56614985-f7e4-3ceb-97d3-93e5f210df31",
"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/10" \
--header "Authorization: Bearer g4fk6hZe58VDa6P3bc1dEav" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"category_id\": \"db2888f4-6a92-33f5-9d04-cbfb2631d6e0\",
\"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/10"
);
const headers = {
"Authorization": "Bearer g4fk6hZe58VDa6P3bc1dEav",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"category_id": "db2888f4-6a92-33f5-9d04-cbfb2631d6e0",
"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 Z6k5ceEPd641Dbavfa8gVh3" \
--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 Z6k5ceEPd641Dbavfa8gVh3",
"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 fkEe8V153v6caPDdg4haZ6b" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"excepturi\",
\"renewal_status\": \"ignored\",
\"urgency\": \"expires_30_days\",
\"employee_id\": \"voluptatibus\",
\"epi_type_id\": \"aliquid\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals"
);
const headers = {
"Authorization": "Bearer fkEe8V153v6caPDdg4haZ6b",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "excepturi",
"renewal_status": "ignored",
"urgency": "expires_30_days",
"employee_id": "voluptatibus",
"epi_type_id": "aliquid"
};
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 dec18fE5DVPv4a3bk6hagZ6" \
--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 dec18fE5DVPv4a3bk6hagZ6",
"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/cumque/renew" \
--header "Authorization: Bearer acdhe4kb1P6Dav65f8gZ3EV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"quantity\": 1,
\"condition\": \"new\",
\"confirm_insufficient_stock\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/cumque/renew"
);
const headers = {
"Authorization": "Bearer acdhe4kb1P6Dav65f8gZ3EV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quantity": 1,
"condition": "new",
"confirm_insufficient_stock": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Ignore EPI renewal
requires authentication employee-epi update
Ignore expiry alerts for an EPI delivery
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/voluptatem/ignore" \
--header "Authorization: Bearer Vae66vfgDkPba5d8EcZh341" \
--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/voluptatem/ignore"
);
const headers = {
"Authorization": "Bearer Vae66vfgDkPba5d8EcZh341",
"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/omnis/ignore" \
--header "Authorization: Bearer 1v5gdfE6ZaPk6cVD8e3b4ah" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/omnis/ignore"
);
const headers = {
"Authorization": "Bearer 1v5gdfE6ZaPk6cVD8e3b4ah",
"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 ch8akbgveV5ZEfd646aD1P3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"natus\",
\"stock_id\": \"suscipit\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types"
);
const headers = {
"Authorization": "Bearer ch8akbgveV5ZEfd646aD1P3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "natus",
"stock_id": "suscipit"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "36127624-8ac7-3ff5-87f7-f173a08646e8",
"name": "et rerum",
"default_validity_days": 232,
"requires_signature": false,
"numero_ca": "48398",
"product": null,
"available_quantity": null,
"created_at": null,
"updated_at": null
},
{
"id": "05462c73-88e3-3b5c-bf91-9be608c7957a",
"name": "amet quia",
"default_validity_days": 217,
"requires_signature": false,
"numero_ca": "27565",
"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 1ka86Egd6hvDabeZ5fVc34P" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"dolor\",
\"stock_id\": \"cupiditate\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/candidates"
);
const headers = {
"Authorization": "Bearer 1ka86Egd6hvDabeZ5fVc34P",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "dolor",
"stock_id": "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.
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/repellendus" \
--header "Authorization: Bearer d3vV4hcD66ZkPE51ebaagf8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/repellendus"
);
const headers = {
"Authorization": "Bearer d3vV4hcD66ZkPE51ebaagf8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "8257cbcd-2ac9-38c8-97a2-6414bdc296cc",
"name": "nulla voluptates",
"default_validity_days": 204,
"requires_signature": true,
"numero_ca": "19163",
"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 ahgvca6k3b854EfZPVe6d1D" \
--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\": \"dc1ef2ef-4936-31ea-a16f-57e99d84f4a0\",
\"product_family_id\": \"50a8e479-3129-3d57-b808-f307a242e801\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types"
);
const headers = {
"Authorization": "Bearer ahgvca6k3b854EfZPVe6d1D",
"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": "dc1ef2ef-4936-31ea-a16f-57e99d84f4a0",
"product_family_id": "50a8e479-3129-3d57-b808-f307a242e801"
};
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 f8PkZE6gDb3dae6V4h51avc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"epi_type_id\": \"18ea104a-1688-387a-a11e-d6ccd58ad7c5\",
\"action\": \"Example Items * action\",
\"product_id\": \"69e67a99-0041-3288-bff6-ad922cc87542\",
\"product_family_id\": \"5bc06f7c-b0c8-3c09-92cc-21bb4cf10f4f\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/link-products"
);
const headers = {
"Authorization": "Bearer f8PkZE6gDb3dae6V4h51avc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"epi_type_id": "18ea104a-1688-387a-a11e-d6ccd58ad7c5",
"action": "Example Items * action",
"product_id": "69e67a99-0041-3288-bff6-ad922cc87542",
"product_family_id": "5bc06f7c-b0c8-3c09-92cc-21bb4cf10f4f"
},
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/reprehenderit/product" \
--header "Authorization: Bearer V4Dgfhk18ea3dEvZP66bca5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"action\": \"Example Action\",
\"product_id\": \"61bd6ff3-ad09-3433-ad9d-9f21556625ec\",
\"product_family_id\": \"84adf98c-f4cd-38da-b27d-c0dc4e7f98d8\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/reprehenderit/product"
);
const headers = {
"Authorization": "Bearer V4Dgfhk18ea3dEvZP66bca5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"action": "Example Action",
"product_id": "61bd6ff3-ad09-3433-ad9d-9f21556625ec",
"product_family_id": "84adf98c-f4cd-38da-b27d-c0dc4e7f98d8"
};
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/aliquam" \
--header "Authorization: Bearer 5aZ146gEbd3VPka6e8vcDfh" \
--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/aliquam"
);
const headers = {
"Authorization": "Bearer 5aZ146gEbd3VPka6e8vcDfh",
"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/fugit" \
--header "Authorization: Bearer Pbvgc66fE35d8DZeaVk4a1h" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/fugit"
);
const headers = {
"Authorization": "Bearer Pbvgc66fE35d8DZeaVk4a1h",
"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 aavgk646Dd58fEcPbh3eV1Z" \
--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 aavgk646Dd58fEcPbh3eV1Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "52641397-2fbd-46e9-980d-d8070fde4eea",
"name": "sit",
"description": "Earum repudiandae non dolores asperiores.",
"created_at": null,
"updated_at": null
},
{
"id": "9bb6563f-e51d-4ad3-aaef-5e0aead86b48",
"name": "qui",
"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/asperiores" \
--header "Authorization: Bearer vca8PDhkVE5f66Zdb13e4ag" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employee-roles/asperiores"
);
const headers = {
"Authorization": "Bearer vca8PDhkVE5f66Zdb13e4ag",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "9d45e9a1-9465-4c79-8815-b55916beb53f",
"name": "eum",
"description": "Molestiae animi ab asperiores quis recusandae.",
"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 fP6bD34c65g8hvZVedaEak1" \
--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 fP6bD34c65g8hvZVedaEak1",
"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/et" \
--header "Authorization: Bearer chaba16Vk3gved4EDf6Z58P" \
--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/et"
);
const headers = {
"Authorization": "Bearer chaba16Vk3gved4EDf6Z58P",
"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/tempore" \
--header "Authorization: Bearer V834aE66deDk1b5vcfhgZaP" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employee-roles/tempore"
);
const headers = {
"Authorization": "Bearer V834aE66deDk1b5vcfhgZaP",
"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 36ca4faZ8DP16vgb5edhkEV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"created_at\",
\"sort_desc\": false,
\"page\": 14,
\"per_page\": 9,
\"q\": \"sed\",
\"employee_id\": \"minima\",
\"has_term\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-terms"
);
const headers = {
"Authorization": "Bearer 36ca4faZ8DP16vgb5edhkEV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "created_at",
"sort_desc": false,
"page": 14,
"per_page": 9,
"q": "sed",
"employee_id": "minima",
"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.
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[]=quo&admission_date_from=2026-01-01&admission_date_to=2026-12-31" \
--header "Authorization: Bearer 1vdEak5b68g4cPh6D3VaZef" \
--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]": "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 1vdEak5b68g4cPh6D3VaZef",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "6a77843a-016a-4de1-b66b-680e51abfd19",
"name": "Sr. Alonso Carvalho Quintana Jr.",
"cpf": "696.601.626-07",
"rg": null,
"ctps": null,
"phone": null,
"birthdate": null,
"email": "testrada@example.com",
"pis_pasep": "16578031196",
"admission_date": "2005-04-06",
"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": "a35fbfdf-e4d4-4e27-a561-61451ccbbe93",
"name": "qui"
},
"created_at": null,
"updated_at": null
},
{
"id": "17b367a6-0845-4acc-9c94-2a2ae24055b3",
"name": "Dr. Hosana da Cruz Santiago",
"cpf": "318.478.697-99",
"rg": "407288824",
"ctps": null,
"phone": "(18) 4383-6084",
"birthdate": null,
"email": null,
"pis_pasep": null,
"admission_date": "2011-05-14",
"daily_salary": "132.55",
"monthly_salary": "7740.83",
"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": "a35fbfdf-eaa2-4580-aa60-48b1db1b20e0",
"name": "ipsa"
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": "/?page=13",
"next": null
},
"meta": {
"current_page": 14,
"from": 131,
"last_page": 1,
"links": [
{
"url": "/?page=13",
"label": "« Anterior",
"page": 13,
"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": 132,
"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[]=laudantium&admission_date_from=2026-01-01&admission_date_to=2026-12-31" \
--header "Authorization: Bearer EP6ak5fe4DZVg8vdh6c3a1b" \
--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]": "laudantium",
"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 EP6ak5fe4DZVg8vdh6c3a1b",
"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/1" \
--header "Authorization: Bearer cg5686hV3kadD1Zb4fPEvea" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/1"
);
const headers = {
"Authorization": "Bearer cg5686hV3kadD1Zb4fPEvea",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "493c24de-6ed8-4a39-8735-2a845f471549",
"name": "Fátima Tâmara Valentin",
"cpf": "285.453.516-84",
"rg": "544784786",
"ctps": "618276686",
"phone": null,
"birthdate": "2001-12-20",
"email": null,
"pis_pasep": "57209724095",
"admission_date": "2012-04-08",
"daily_salary": null,
"monthly_salary": null,
"nationality": "Nepal",
"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": "a35fbfdf-f888-49ef-9e74-f719d1f0cdbb",
"name": "fugit"
},
"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 P634adf5aZvck6V8begEh1D" \
--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\": \"9dcff0ac-978e-4faf-aa67-075ecb32af14\",
\"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 P634adf5aZvck6V8begEh1D",
"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": "9dcff0ac-978e-4faf-aa67-075ecb32af14",
"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": "cb55f17b-a88e-4812-aa19-77ab538f7af8",
"name": "Sra. Joana Vale Marinho Jr.",
"cpf": "649.886.841-53",
"rg": "996206921",
"ctps": "781430086",
"phone": null,
"birthdate": null,
"email": "casanova.david@example.org",
"pis_pasep": null,
"admission_date": "1988-08-07",
"daily_salary": null,
"monthly_salary": "5222.64",
"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": "a35fbfe0-04a6-4a50-be41-2b4b49989d81",
"name": "ut"
},
"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/20" \
--header "Authorization: Bearer ah1a6eDck8P3gvV54f6dZEb" \
--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\": \"02a25c48-f052-41f8-9533-39101d50baa9\",
\"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/20"
);
const headers = {
"Authorization": "Bearer ah1a6eDck8P3gvV54f6dZEb",
"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": "02a25c48-f052-41f8-9533-39101d50baa9",
"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 eEaZ685va1DVdPkh6c4gf3b" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"dismissal_date\": \"2026-12-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 eEaZ685va1DVdPkh6c4gf3b",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"dismissal_date": "2026-12-03",
"dismissal_reason": "resignation"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "51479370-9825-4de7-9e6f-4c1f492d9007",
"name": "Noemi Adriele Valdez Filho",
"cpf": "409.421.327-04",
"rg": "086586130",
"ctps": null,
"phone": null,
"birthdate": "2011-06-21",
"email": null,
"pis_pasep": null,
"admission_date": "1977-05-16",
"daily_salary": null,
"monthly_salary": null,
"nationality": null,
"place_of_birth": "Porto Hortência do Leste",
"status": "active",
"status_label": "Ativo",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"employee_role": {
"id": "a35fbfe0-16cf-411e-8277-5f0254df7ad4",
"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 6aaE1D86dh5gfZ3cVevPk4b" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"admission_date\": \"2026-12-03\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32/rehire"
);
const headers = {
"Authorization": "Bearer 6aaE1D86dh5gfZ3cVevPk4b",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"admission_date": "2026-12-03"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "f0488762-0b71-4b3c-ab28-e32398a6032c",
"name": "Caroline Constância Verdara Neto",
"cpf": "212.122.041-63",
"rg": "445938413",
"ctps": null,
"phone": "(34) 92449-6209",
"birthdate": null,
"email": null,
"pis_pasep": null,
"admission_date": "2016-06-12",
"daily_salary": "236.97",
"monthly_salary": "1404.25",
"nationality": "Coréia do Norte",
"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": "a35fbfe0-1f8e-44e4-a4b3-d3d870e334b7",
"name": "ipsam"
},
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 veDhbEZaP546Vg163dfcka8" \
--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 veDhbEZaP546Vg163dfcka8",
"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/3/bank-account" \
--header "Authorization: Bearer cgdvhkZVPa46ef51aD68Eb3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/3/bank-account"
);
const headers = {
"Authorization": "Bearer cgdvhkZVPa46ef51aD68Eb3",
"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/18/bank-account" \
--header "Authorization: Bearer 46fV56h8ab3DEvePa1ckZgd" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_id\": \"architecto\",
\"agency\": \"tlvgv\",
\"account\": \"iocwwknerktowgjhkda\",
\"account_type\": \"poupança\",
\"pix_key\": \"jozsjut\",
\"favorite\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/18/bank-account"
);
const headers = {
"Authorization": "Bearer 46fV56h8ab3DEvePa1ckZgd",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_id": "architecto",
"agency": "tlvgv",
"account": "iocwwknerktowgjhkda",
"account_type": "poupança",
"pix_key": "jozsjut",
"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/8/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33" \
--header "Authorization: Bearer 45a3E6faDPkv8cV6eZbghd1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_id\": \"et\",
\"agency\": \"vaixvwofhpsemopdlcsufqi\",
\"account\": \"gbdqopggocvnfb\",
\"account_type\": \"corrente\",
\"pix_key\": \"nxrkiejmyagulvplnszvg\",
\"favorite\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/8/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33"
);
const headers = {
"Authorization": "Bearer 45a3E6faDPkv8cV6eZbghd1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_id": "et",
"agency": "vaixvwofhpsemopdlcsufqi",
"account": "gbdqopggocvnfb",
"account_type": "corrente",
"pix_key": "nxrkiejmyagulvplnszvg",
"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 a34E56vDd8achVPeZ1f6gbk" \
--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 a34E56vDd8achVPeZ1f6gbk",
"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/17/epi-deliveries" \
--header "Authorization: Bearer akDa3P66Z4edVgvbf18h5Ec" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"et\",
\"status\": \"valid\",
\"epi_type_id\": \"quae\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/17/epi-deliveries"
);
const headers = {
"Authorization": "Bearer akDa3P66Z4edVgvbf18h5Ec",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "et",
"status": "valid",
"epi_type_id": "quae"
};
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/aut/epi-deliveries/pending-renewals-count" \
--header "Authorization: Bearer aP4Da66Vfeg81dcvbEZ5h3k" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/aut/epi-deliveries/pending-renewals-count"
);
const headers = {
"Authorization": "Bearer aP4Da66Vfeg81dcvbEZ5h3k",
"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/18/epi-deliveries/voluptas" \
--header "Authorization: Bearer b3dZvk8461hDaaecVg6Ef5P" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/18/epi-deliveries/voluptas"
);
const headers = {
"Authorization": "Bearer b3dZvk8461hDaaecVg6Ef5P",
"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/14/epi-deliveries" \
--header "Authorization: Bearer Ea6h1PvZbe4gVad3c8k6D5f" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"epi_type_id\": \"98c32e6b-2be7-3cbf-b81e-2ff2a301b911\",
\"delivery_date\": \"2024-01-01\",
\"quantity\": 1,
\"condition\": \"Example Condition\",
\"delivered_by_employee_id\": \"6bdb16e0-3a80-4644-9a7b-e0ab7b007ecb\",
\"stock_id\": \"174d08cf-d950-3f40-853e-998b318c86f5\",
\"confirm_insufficient_stock\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/14/epi-deliveries"
);
const headers = {
"Authorization": "Bearer Ea6h1PvZbe4gVad3c8k6D5f",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"epi_type_id": "98c32e6b-2be7-3cbf-b81e-2ff2a301b911",
"delivery_date": "2024-01-01",
"quantity": 1,
"condition": "Example Condition",
"delivered_by_employee_id": "6bdb16e0-3a80-4644-9a7b-e0ab7b007ecb",
"stock_id": "174d08cf-d950-3f40-853e-998b318c86f5",
"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/nam/epi-deliveries/kit" \
--header "Authorization: Bearer c8D6va1Egdh3P4fVZ5a6ebk" \
--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\": \"6de9c0e3-67e3-4cb6-880f-31814289f4f7\",
\"stock_id\": \"79774111-1713-350d-8f0e-7967ebf93add\",
\"confirm_insufficient_stock\": true,
\"items\": [
{
\"epi_type_id\": \"ee8e41bd-b1fa-3b21-b946-77a115be403d\",
\"quantity\": 1,
\"condition\": \"Example Items * condition\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/nam/epi-deliveries/kit"
);
const headers = {
"Authorization": "Bearer c8D6va1Egdh3P4fVZ5a6ebk",
"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": "6de9c0e3-67e3-4cb6-880f-31814289f4f7",
"stock_id": "79774111-1713-350d-8f0e-7967ebf93add",
"confirm_insufficient_stock": true,
"items": [
{
"epi_type_id": "ee8e41bd-b1fa-3b21-b946-77a115be403d",
"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/magnam/epi-deliveries/nulla/promote-to-kit" \
--header "Authorization: Bearer 65Pv1f8VDebZghcaE63akd4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/magnam/epi-deliveries/nulla/promote-to-kit"
);
const headers = {
"Authorization": "Bearer 65Pv1f8VDebZghcaE63akd4",
"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/18/epi-deliveries/aliquid" \
--header "Authorization: Bearer D6g3bf64ada8Pv1ceEVZk5h" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"epi_type_id\": \"453336e0-2ecc-3e99-b312-500c18a5e209\",
\"delivery_date\": \"2024-01-01\",
\"quantity\": 1,
\"condition\": \"Example Condition\",
\"delivered_by_employee_id\": \"028a1915-d3db-47bd-aa4d-5451724b01bd\",
\"stock_id\": \"14fb1761-6ace-3cdb-b7f0-75052643b998\",
\"confirm_insufficient_stock\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/18/epi-deliveries/aliquid"
);
const headers = {
"Authorization": "Bearer D6g3bf64ada8Pv1ceEVZk5h",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"epi_type_id": "453336e0-2ecc-3e99-b312-500c18a5e209",
"delivery_date": "2024-01-01",
"quantity": 1,
"condition": "Example Condition",
"delivered_by_employee_id": "028a1915-d3db-47bd-aa4d-5451724b01bd",
"stock_id": "14fb1761-6ace-3cdb-b7f0-75052643b998",
"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/eaque" \
--header "Authorization: Bearer 8hv66dVge4k3aa5PfbcDZE1" \
--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/eaque"
);
const headers = {
"Authorization": "Bearer 8hv66dVge4k3aa5PfbcDZE1",
"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/4/epi-terms" \
--header "Authorization: Bearer 6EVk48PZvab5Dhgadce36f1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"delivery_date\",
\"sort_desc\": true,
\"page\": 76,
\"per_page\": 11,
\"q\": \"sunt\",
\"employee_id\": \"quod\",
\"has_term\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/4/epi-terms"
);
const headers = {
"Authorization": "Bearer 6EVk48PZvab5Dhgadce36f1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "delivery_date",
"sort_desc": true,
"page": 76,
"per_page": 11,
"q": "sunt",
"employee_id": "quod",
"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.
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/nostrum/epi-terms/82ed84f9-d342-3fc0-9b8e-408a3c832cfa/upload" \
--header "Authorization: Bearer v8D6VfZ6hca1k435bgPaedE" \
--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/nostrum/epi-terms/82ed84f9-d342-3fc0-9b8e-408a3c832cfa/upload"
);
const headers = {
"Authorization": "Bearer v8D6VfZ6hca1k435bgPaedE",
"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/quo/epi-terms/7dd69904-e1d9-3d78-9f36-92b368c0d295/document" \
--header "Authorization: Bearer hveVd8E5af613aZ6bcg4DkP" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/quo/epi-terms/7dd69904-e1d9-3d78-9f36-92b368c0d295/document"
);
const headers = {
"Authorization": "Bearer hveVd8E5af613aZ6bcg4DkP",
"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/9d5171eb-5495-351a-96b0-63cac4384a36" \
--header "Authorization: Bearer gv4f1k6hdcbZaea5PVE683D" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/9d5171eb-5495-351a-96b0-63cac4384a36"
);
const headers = {
"Authorization": "Bearer gv4f1k6hdcbZaea5PVE683D",
"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/bf46a66d-0879-3a4c-a7bc-dd688596bf7c/info" \
--header "Authorization: Bearer aZ6Vf8Pvc6k5a1gd4D3Eehb" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/bf46a66d-0879-3a4c-a7bc-dd688596bf7c/info"
);
const headers = {
"Authorization": "Bearer aZ6Vf8Pvc6k5a1gd4D3Eehb",
"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/cd2bbebf-635c-3494-88d8-9561aeea3504/download" \
--header "Authorization: Bearer Z638V65kPcD14dEabhfegva" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/cd2bbebf-635c-3494-88d8-9561aeea3504/download"
);
const headers = {
"Authorization": "Bearer Z638V65kPcD14dEabhfegva",
"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 ah6Z8caegv53bfDVkd6P1E4" \
--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 ah6Z8caegv53bfDVkd6P1E4",
"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 k6cdDZ3he8bg5v1VPfE64aa" \
--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 k6cdDZ3he8bg5v1VPfE64aa",
"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 kZf8aEV6cb14vaPh6dD5g3e" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"omnis\",
\"document_type\": \"nfe\",
\"supplier_id\": \"et\",
\"work_id\": \"magnam\",
\"products_status\": \"pending\",
\"financial_status\": \"partial\",
\"start_date\": \"2026-12-03T13:46:05\",
\"end_date\": \"2084-12-02\",
\"per_page\": 1,
\"cost_centers\": [
\"assumenda\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);
const headers = {
"Authorization": "Bearer kZf8aEV6cb14vaPh6dD5g3e",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "omnis",
"document_type": "nfe",
"supplier_id": "et",
"work_id": "magnam",
"products_status": "pending",
"financial_status": "partial",
"start_date": "2026-12-03T13:46:05",
"end_date": "2084-12-02",
"per_page": 1,
"cost_centers": [
"assumenda"
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "c3a72075-6116-3cde-8678-c9f59abc7c38",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "72370938072793825826309034096654410357196957",
"nfe_number": "306330",
"nfe_series": "16",
"issue_date": "2025-05-13T03:00:00.000000Z",
"total_value": "507.52",
"emit": {
"cnpj": "00150532567196",
"name": "Flatley, Yundt and Klein"
},
"dest": {
"document": "35199802414360",
"name": "Hand Group"
},
"supplier": {
"id": "a35fbfe3-2333-4fbd-8f25-9c4afc6cb478",
"name": "Dr. Alana Rivera",
"document": "30.571.650/0001-58"
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
},
{
"id": "c1bc7604-0fda-33e6-9087-395f57ee4a10",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "77627479660837055624254979298374489550984464",
"nfe_number": "394320",
"nfe_series": "62",
"issue_date": "1977-02-10T03:00:00.000000Z",
"total_value": "753.77",
"emit": {
"cnpj": "35695662830777",
"name": "Schuster Inc"
},
"dest": {
"document": "81895162520195",
"name": "Sanford, Beahan and Zemlak"
},
"supplier": {
"id": "a35fbfe3-28eb-491c-9a74-57fd48dba2ce",
"name": "Constância Corona Sobrinho",
"document": "17.120.206/0001-58"
},
"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 3aVeDv66bZgc8fhk5P4E1da" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"s3_file_path\": \"in\",
\"original_filename\": \".xml$\\/i\",
\"work_ids\": [
\"tempora\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);
const headers = {
"Authorization": "Bearer 3aVeDv66bZgc8fhk5P4E1da",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"s3_file_path": "in",
"original_filename": ".xml$\/i",
"work_ids": [
"tempora"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "b0f14f13-2207-36cf-880d-55b68e10578a",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "02938376499629538758877746173549124425105894",
"nfe_number": "788815",
"nfe_series": "88",
"issue_date": "2000-03-20T03:00:00.000000Z",
"total_value": "273.06",
"emit": {
"cnpj": "67007083826789",
"name": "Gottlieb-Hodkiewicz"
},
"dest": {
"document": "18564629831796",
"name": "Oberbrunner PLC"
},
"supplier": {
"id": "a35fbfe3-338c-4c05-a5ce-2e938248b6fc",
"name": "Jennifer Feliciano Quintana",
"document": "05.786.828/0001-30"
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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/ut" \
--header "Authorization: Bearer 46Ze8gb5hc3akaDv1f6dPVE" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/ut"
);
const headers = {
"Authorization": "Bearer 46Ze8gb5hc3akaDv1f6dPVE",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "cf823745-5ffb-356a-a023-af31b5b4b138",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "90678937651051211722105631382165386795788055",
"nfe_number": "021309",
"nfe_series": "37",
"issue_date": "2001-02-08T02:00:00.000000Z",
"total_value": "2958.23",
"emit": {
"cnpj": "78260111927567",
"name": "Rippin-Will"
},
"dest": {
"document": "68631880974308",
"name": "Hahn Inc"
},
"supplier": {
"id": "a35fbfe3-3c0c-4921-8019-d2c072dcebd6",
"name": "Davi Mascarenhas Ferraz Neto",
"document": "09.543.227/0001-58"
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Fiscal document by cost center
requires authentication fiscal-documents show
Distribui a nota por centro de custo. NF-e de produto sai do estoque: o que a vinculação dos itens lançou em cada estoque de obra (quantidade × preço do lote, o mesmo cálculo do custo apropriado do painel), o que foi para o estoque principal e o que ainda não foi integrado. NFS-e sai das parcelas, pelo centro da conta gerada. As linhas somam o total da nota; a diferença vai para other_values, que pode ser negativo quando há desconto. Linhas zeradas são omitidas.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/fiscal-documents/autem/cost-centers" \
--header "Authorization: Bearer bV6agh3ak65evc1df4PDZ8E" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/autem/cost-centers"
);
const headers = {
"Authorization": "Bearer bV6agh3ak65evc1df4PDZ8E",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"total": "5074.19",
"source": "stock",
"rows": [
{
"kind": "cost_center",
"cost_center": {
"id": "uuid",
"code": "002.001",
"name": "Residencial Vila Nova"
},
"amount": "2100.00",
"share": 41.39
},
{
"kind": "work_without_cost_center",
"work": {
"id": "uuid",
"name": "Reforma Centro"
},
"amount": "474.19",
"share": 9.35
},
{
"kind": "main_stock",
"cost_center": {
"id": "uuid",
"code": "003.001",
"name": "Estoque central"
},
"amount": "1500.00",
"share": 29.56
},
{
"kind": "not_integrated",
"amount": "900.00",
"share": 17.74
},
{
"kind": "other_values",
"amount": "100.00",
"share": 1.97
}
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete fiscal document
requires authentication fiscal-documents delete
Exclui definitivamente uma nota fiscal. Não permitido quando a nota já gerou parcelas no financeiro ou já teve produtos importados.
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/quo" \
--header "Authorization: Bearer 6abEve31cP8fVgkaZd56hD4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/quo"
);
const headers = {
"Authorization": "Bearer 6abEve31cP8fVgkaZd56hD4",
"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/aut/files" \
--header "Authorization: Bearer db6e5vV6aa1EZD4fhck38Pg" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"file\": {
\"path\": \"id\",
\"name\": \"blanditiis\",
\"extension\": \"qui\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/aut/files"
);
const headers = {
"Authorization": "Bearer db6e5vV6aa1EZD4fhck38Pg",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"file": {
"path": "id",
"name": "blanditiis",
"extension": "qui"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "4201ac52-8c5c-3dc7-8ddb-1164540bbe32",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "58610118613707304384531009950506820791676734",
"nfe_number": "165274",
"nfe_series": "16",
"issue_date": "2003-02-18T03:00:00.000000Z",
"total_value": "4174.46",
"emit": {
"cnpj": "72562479653953",
"name": "Boyle and Sons"
},
"dest": {
"document": "24231986751059",
"name": "Hermiston Ltd"
},
"supplier": {
"id": "a35fbfe3-4b55-4c8f-860e-f0f1a1951ed5",
"name": "Dr. Dante Tiago Fidalgo Jr.",
"document": "04.273.570/0001-06"
},
"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/amet/files/veniam" \
--header "Authorization: Bearer d5fDkbvg8a66c4eP3EaV1hZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/amet/files/veniam"
);
const headers = {
"Authorization": "Bearer d5fDkbvg8a66c4eP3EaV1hZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "921e4a32-6931-3125-a9cc-5c8547860781",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "77030040686217305330436661745003316537527431",
"nfe_number": "474289",
"nfe_series": "51",
"issue_date": "1996-01-08T02:00:00.000000Z",
"total_value": "3372.00",
"emit": {
"cnpj": "66456506065871",
"name": "Runolfsdottir, Leannon and Weber"
},
"dest": {
"document": "85098520445808",
"name": "Frami-Raynor"
},
"supplier": {
"id": "a35fbfe3-5523-40b8-9535-a9e9c9284f5c",
"name": "Sr. Martinho Alonso Zambrano",
"document": "53.058.597/0001-91"
},
"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/voluptatem/works" \
--header "Authorization: Bearer g5dPbcvk386E4a6haf1ZVeD" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"work_ids\": [
\"laborum\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/voluptatem/works"
);
const headers = {
"Authorization": "Bearer g5dPbcvk386E4a6haf1ZVeD",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"work_ids": [
"laborum"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "ab6e05d9-d6b0-3d4c-a088-ce8f731abb95",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "70730493880357419169148071140133068518811665",
"nfe_number": "724065",
"nfe_series": "78",
"issue_date": "2013-05-16T03:00:00.000000Z",
"total_value": "2801.82",
"emit": {
"cnpj": "64134475427119",
"name": "Walker-Dibbert"
},
"dest": {
"document": "64971852379928",
"name": "Hoeger-Rau"
},
"supplier": {
"id": "a35fbfe3-5ebf-4f77-b083-bcbf05ad6d5c",
"name": "Dr. Lia Barreto Vale",
"document": "22.326.866/0001-20"
},
"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/eaque/installments" \
--header "Authorization: Bearer 4gDeEbV61cvPkZ5da3ahf86" \
--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/eaque/installments"
);
const headers = {
"Authorization": "Bearer 4gDeEbV61cvPkZ5da3ahf86",
"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": "8a97fe26-aede-309d-9240-7ced6ee08934",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "34424161668722873083003468841617814017499350",
"nfe_number": "905028",
"nfe_series": "32",
"issue_date": "1973-05-11T03:00:00.000000Z",
"total_value": "203.88",
"emit": {
"cnpj": "50288980176003",
"name": "Daugherty-Rau"
},
"dest": {
"document": "44057024964001",
"name": "Collins-Oberbrunner"
},
"supplier": {
"id": "a35fbfe3-6a81-4302-80d3-8a368566798e",
"name": "Dr. Clara Sales Filho",
"document": "07.276.217/0001-78"
},
"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 5bV4EZ83cg6adafvDhkeP61" \
--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\": \"4cd8a1f8-62b2-3e48-b187-45f7e678e58e\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/nfe/products"
);
const headers = {
"Authorization": "Bearer 5bV4EZ83cg6adafvDhkeP61",
"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": "4cd8a1f8-62b2-3e48-b187-45f7e678e58e"
};
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 kfEagevcZa61PdVDh5463b8" \
--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 kfEagevcZa61PdVDh5463b8",
"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/molestiae" \
--header "Authorization: Bearer g65d4D6h1Z3EafbcP8Vekva" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/molestiae"
);
const headers = {
"Authorization": "Bearer g65d4D6h1Z3EafbcP8Vekva",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Import details retrieved successfully):
{
"import_id": "9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a",
"status": "completed",
"import_type": "nfe",
"original_filename": "nota_fiscal_001.xml",
"nfe_number": "123456",
"nfe_date": "2023-12-01",
"total_products": 15,
"processed_products": 10,
"progress_percentage": 66.67,
"auto_linked_count": 4,
"stock_launched_count": 7,
"pending_stock_launch_count": 3,
"imported_by": "João Silva",
"imported_at": "2023-12-01T10:30:00.000Z",
"supplier": {
"id": "supplier-uuid",
"name": "Fornecedor Ltda",
"document": "12345678000199"
},
"fiscal_document": {
"id": "fiscal-document-uuid",
"nfe_number": "123456",
"works": [
{
"id": "work-uuid",
"name": "Hospital Bom Jesus",
"cost_center": {
"id": "cost-center-uuid",
"code": "002.001",
"name": "Hospital Bom Jesus"
}
},
{
"id": "work-uuid-2",
"name": "Reforma Centro",
"cost_center": null
}
]
},
"channel": "import-progress.9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Import
requires authentication imports delete
Delete an NFe import along with its supplier products and pending link mappings. Only allowed when no imported product has been linked to a system product and the import is not being processed.
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/imports/quo" \
--header "Authorization: Bearer DkhEvaPcdgf8aVZ641b563e" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/quo"
);
const headers = {
"Authorization": "Bearer DkhEvaPcdgf8aVZ641b563e",
"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/odit/products?sort_by=created_at&sort_desc=1&page=1&per_page=15&status=pending&q=Produto+ABC" \
--header "Authorization: Bearer 5aD4e8bvhEZf1gVcdPka636" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/odit/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 5aD4e8bvhEZf1gVcdPka636",
"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/voluptates/distributions" \
--header "Authorization: Bearer 638Pf4aEVcg5veakd1DZh6b" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/voluptates/distributions"
);
const headers = {
"Authorization": "Bearer 638Pf4aEVcg5veakd1DZh6b",
"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/fuga/products/link" \
--header "Authorization: Bearer PaakbVhvfDc163g6d45eEZ8" \
--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/fuga/products/link"
);
const headers = {
"Authorization": "Bearer PaakbVhvfDc163g6d45eEZ8",
"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 P6vca8VE5gd16hDek43Zbaf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"quo\",
\"sort_desc\": true,
\"page\": 40,
\"per_page\": 22
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/locations/states"
);
const headers = {
"Authorization": "Bearer P6vca8VE5gd16hDek43Zbaf",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "quo",
"sort_desc": true,
"page": 40,
"per_page": 22
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "alias dolore",
"abbreviation": "ZH"
},
{
"id": null,
"name": "accusantium dolorum",
"abbreviation": "DI"
}
],
"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 c8afve4Ed5hDb6gZa1kP6V3" \
--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 c8afve4Ed5hDb6gZa1kP6V3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "East Rhoda"
},
{
"id": null,
"name": "Aubreemouth"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 8d1eb4ED6vh6aZPaV35gfkc" \
--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 8d1eb4ED6vh6aZPaV35gfkc",
"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 PvDa1843aEk6e5gbhfZc6dV" \
--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 PvDa1843aEk6e5gbhfZc6dV",
"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 kf5c8EDb61eaPvZahV4g6d3" \
--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 kf5c8EDb61eaPvZahV4g6d3",
"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 bPaeg65f8ZEk4Vv6adDh31c" \
--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 bPaeg65f8ZEk4Vv6adDh31c",
"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 gbPfk6D1Vc38aZ4a6ehdv5E" \
--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 gbPfk6D1Vc38aZ4a6ehdv5E",
"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=iste&document=maiores&work_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&cost_center_id=dbc345ee-e86d-3b64-adec-724f482432eb&bank_account_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3" \
--header "Authorization: Bearer 3Peha5VZc6g1b6fv84aDEkd" \
--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": "iste",
"document": "maiores",
"work_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
"cost_center_id": "dbc345ee-e86d-3b64-adec-724f482432eb",
"bank_account_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 3Peha5VZc6g1b6fv84aDEkd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "a14400b4-98d7-3114-a9f8-a2cebb77d969",
"receipt_number": "REC-9545",
"receiver_type": "custom",
"receiver": {
"id": null,
"type": null,
"label": null,
"name": "Miss Jessika Lemke",
"document": "574.775.084-44"
},
"payment": {
"amount": 7169.16,
"amount_in_words": "Valor por extenso de teste",
"method": "pix",
"description": "Nihil asperiores enim porro id enim asperiores totam."
},
"issuer": {
"name": "Mills, Tremblay and Kerluke",
"document": "73.357.329/7329-71"
},
"issue": {
"date": "2026-11-26",
"city": "Gibsonbury",
"state": "MG"
},
"created_by": {
"id": "a35fbfe3-ab1e-4a96-ae68-53ff1b1e6ba2",
"name": "Jevon Paucek"
},
"created_at": null,
"updated_at": null
},
{
"id": "0be90ee1-9253-3251-bf19-240ac4116231",
"receipt_number": "REC-0253",
"receiver_type": "custom",
"receiver": {
"id": null,
"type": null,
"label": null,
"name": "Prof. Tod McGlynn DDS",
"document": "875.087.221-20"
},
"payment": {
"amount": 2333.55,
"amount_in_words": "Valor por extenso de teste",
"method": "bank_transfer",
"description": "Iste dolorem vero ab voluptas aut alias quos."
},
"issuer": {
"name": "Stiedemann-Upton",
"document": "09.730.538/3703-60"
},
"issue": {
"date": "2026-11-16",
"city": "Port Carmine",
"state": "BA"
},
"created_by": {
"id": "a35fbfe3-af61-4e32-9530-59d197a0a832",
"name": "Dr. Carmine Steuber"
},
"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=est&document=eos&work_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&cost_center_id=60823826-c6a2-3724-bbfd-50b90b459a8e&bank_account_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3" \
--header "Authorization: Bearer 4VEbPgcZ1vk6aDhe58daf63" \
--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": "est",
"document": "eos",
"work_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
"cost_center_id": "60823826-c6a2-3724-bbfd-50b90b459a8e",
"bank_account_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 4VEbPgcZ1vk6aDhe58daf63",
"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 bEfd3kDZ4Vv516ae8gc6hPa" \
--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 bEfd3kDZ4Vv516ae8gc6hPa",
"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 6ha1V6fDv3Pcaek8Edg5Z4b" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"methods\": [
{
\"method\": \"check\",
\"eligible\": false
}
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/cash-flow-config"
);
const headers = {
"Authorization": "Bearer 6ha1V6fDv3Pcaek8Edg5Z4b",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"methods": [
{
"method": "check",
"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 v6Z6Vak3DEcaeb4gh1Pd58f" \
--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 v6Z6Vak3DEcaeb4gh1Pd58f",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "8cfe7b12-d6e7-3797-9345-4d741572dae0",
"receipt_number": "REC-4953",
"receiver_type": "custom",
"receiver": {
"id": null,
"type": null,
"label": null,
"name": "Prof. Elfrieda McCullough",
"document": "065.356.869-19"
},
"payment": {
"amount": 4691.05,
"amount_in_words": "Valor por extenso de teste",
"method": "check",
"description": "Assumenda qui veniam asperiores ut."
},
"issuer": {
"name": "Jast, Bednar and Stehr",
"document": "86.005.717/0750-56"
},
"issue": {
"date": "2026-11-22",
"city": "New Mercedesshire",
"state": "SP"
},
"created_by": {
"id": "a35fbfe3-c822-4a2b-90b7-fae71325a443",
"name": "Jennie Labadie"
},
"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 daha1g45DPZe3b6E6kc8fvV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"receiver_type\": \"Example Receiver type\",
\"receiver_id\": \"Example Receiver id\",
\"receiver_name\": \"Example Name\",
\"receiver_document\": \"Example Receiver document\",
\"amount\": 1,
\"amount_in_words\": \"Example Amount in words\",
\"payment_method\": \"Example Payment method\",
\"description\": \"Example Description\",
\"issuer_name\": \"Example Name\",
\"issuer_document\": \"Example Issuer document\",
\"issue_date\": \"2024-01-01\",
\"city\": \"Example City\",
\"state\": \"Example State\",
\"work_id\": \"a43a3f9a-5f61-3853-ada6-fb5bbe260969\",
\"cost_center_id\": \"5ef24a86-313d-3a00-a190-85a746c58697\",
\"bank_account_id\": \"2ecf9af7-e101-365f-88d7-6603b36739fa\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts"
);
const headers = {
"Authorization": "Bearer daha1g45DPZe3b6E6kc8fvV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"receiver_type": "Example Receiver type",
"receiver_id": "Example Receiver id",
"receiver_name": "Example Name",
"receiver_document": "Example Receiver document",
"amount": 1,
"amount_in_words": "Example Amount in words",
"payment_method": "Example Payment method",
"description": "Example Description",
"issuer_name": "Example Name",
"issuer_document": "Example Issuer document",
"issue_date": "2024-01-01",
"city": "Example City",
"state": "Example State",
"work_id": "a43a3f9a-5f61-3853-ada6-fb5bbe260969",
"cost_center_id": "5ef24a86-313d-3a00-a190-85a746c58697",
"bank_account_id": "2ecf9af7-e101-365f-88d7-6603b36739fa"
};
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 5ZP8eEfk631aac64VvdhgDb" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"receiver_type\": \"Example Receiver type\",
\"receiver_id\": \"Example Receiver id\",
\"receiver_name\": \"Example Name\",
\"receiver_document\": \"Example Receiver document\",
\"amount\": 1,
\"amount_in_words\": \"Example Amount in words\",
\"payment_method\": \"Example Payment method\",
\"description\": \"Example Description\",
\"issuer_name\": \"Example Name\",
\"issuer_document\": \"Example Issuer document\",
\"issue_date\": \"2024-01-01\",
\"city\": \"Example City\",
\"state\": \"Example State\",
\"work_id\": \"c15d6ce2-46f0-3343-93bb-19ecb3bbd176\",
\"cost_center_id\": \"80c0e249-9816-3fa0-acd7-034a83e23860\",
\"bank_account_id\": \"7b84787e-5f0c-371d-b635-9696a181fc3e\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer 5ZP8eEfk631aac64VvdhgDb",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"receiver_type": "Example Receiver type",
"receiver_id": "Example Receiver id",
"receiver_name": "Example Name",
"receiver_document": "Example Receiver document",
"amount": 1,
"amount_in_words": "Example Amount in words",
"payment_method": "Example Payment method",
"description": "Example Description",
"issuer_name": "Example Name",
"issuer_document": "Example Issuer document",
"issue_date": "2024-01-01",
"city": "Example City",
"state": "Example State",
"work_id": "c15d6ce2-46f0-3343-93bb-19ecb3bbd176",
"cost_center_id": "80c0e249-9816-3fa0-acd7-034a83e23860",
"bank_account_id": "7b84787e-5f0c-371d-b635-9696a181fc3e"
};
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 fEkD6618aVhc3Zdg4Pae5vb" \
--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 fEkD6618aVhc3Zdg4Pae5vb",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List employee receipts
requires authentication payment-receipt index
List all payment receipts for a specific employee
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employees/17/receipts" \
--header "Authorization: Bearer VPeabc6316Efv5kgaDdh8Z4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/17/receipts"
);
const headers = {
"Authorization": "Bearer VPeabc6316Efv5kgaDdh8Z4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "e48adc79-1b0e-31b2-9b8e-c6219cff576d",
"receipt_number": "REC-6074",
"receiver_type": "custom",
"receiver": {
"id": null,
"type": null,
"label": null,
"name": "Karl Moen",
"document": "009.884.404-91"
},
"payment": {
"amount": 4314.15,
"amount_in_words": "Valor por extenso de teste",
"method": "bank_transfer",
"description": "In reiciendis consequatur suscipit omnis."
},
"issuer": {
"name": "Douglas-Bernhard",
"document": "00.350.762/5361-33"
},
"issue": {
"date": "2026-11-26",
"city": "Robertsfort",
"state": "BA"
},
"created_by": {
"id": "a35fbfe3-e619-4618-bbaa-eb1c01668c54",
"name": "Richmond Senger"
},
"created_at": null,
"updated_at": null
},
{
"id": "e64cda19-e51b-30dd-944e-810402048e45",
"receipt_number": "REC-0790",
"receiver_type": "custom",
"receiver": {
"id": null,
"type": null,
"label": null,
"name": "Brendon Labadie",
"document": "503.635.816-59"
},
"payment": {
"amount": 3551.79,
"amount_in_words": "Valor por extenso de teste",
"method": "bank_transfer",
"description": "Et quibusdam dicta voluptatem deserunt ut."
},
"issuer": {
"name": "Thompson PLC",
"document": "58.917.054/6565-19"
},
"issue": {
"date": "2026-11-29",
"city": "South Abbigailmouth",
"state": "SP"
},
"created_by": {
"id": "a35fbfe3-e86c-4e6a-a3f0-8d42d6c9a460",
"name": "Alexandra Miller"
},
"created_at": null,
"updated_at": null
}
],
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"has_more_pages": false
},
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Payroll Addition Types
Cadastro dos tipos de acréscimo da folha de sexta
List addition types
requires authentication payroll build
Lista ordenada por nome, sem paginação: o cadastro é pequeno e a mesma chamada serve à tela de lista e à lista de escolha do lançamento.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/payroll-addition-types?q=quo&active=1" \
--header "Authorization: Bearer aekgE6h56f8V3d4bPD1aZvc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"eaque\",
\"active\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-addition-types"
);
const params = {
"q": "quo",
"active": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer aekgE6h56f8V3d4bPD1aZvc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "eaque",
"active": false
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "a35fbfe3-f978-44a7-906e-ed2e927ed62d",
"name": "dolores reprehenderit",
"default_amount": "14.32",
"includes_in_work_cost": true,
"is_active": true,
"in_use": false
},
{
"id": "a35fbfe3-fb3b-4190-9979-387603b3281b",
"name": "error iusto",
"default_amount": "16.26",
"includes_in_work_cost": true,
"is_active": true,
"in_use": false
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create addition type
requires authentication payroll build
O nome é único. O valor padrão fica vazio quando o valor varia a cada lançamento.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/payroll-addition-types" \
--header "Authorization: Bearer Eg6DPa165kv8hVZ3dbefca4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"qzoho\",
\"default_amount\": 78,
\"includes_in_work_cost\": false,
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-addition-types"
);
const headers = {
"Authorization": "Bearer Eg6DPa165kv8hVZ3dbefca4",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "qzoho",
"default_amount": 78,
"includes_in_work_cost": false,
"is_active": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "a35fbfe4-02a6-40e3-b11c-d41713290424",
"name": "veritatis aut",
"default_amount": "33.68",
"includes_in_work_cost": true,
"is_active": true,
"in_use": false
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show addition type
requires authentication payroll build
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/payroll-addition-types/voluptates" \
--header "Authorization: Bearer a13PVcvdfE8hkebg664DaZ5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-addition-types/voluptates"
);
const headers = {
"Authorization": "Bearer a13PVcvdfE8hkebg664DaZ5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a35fbfe4-0745-4cbf-a6e8-a0a3460cbd76",
"name": "sapiente impedit",
"default_amount": "12.39",
"includes_in_work_cost": true,
"is_active": true,
"in_use": false
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update addition type
requires authentication payroll build
Alterar o cadastro não muda acréscimo já lançado: ele guarda a cópia do nome, do valor e da marcação de custo do momento do lançamento.
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/payroll-addition-types/officia" \
--header "Authorization: Bearer c8Vabgh4P1dEf663aek5ZvD" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"ejhdgpiujqvxmljx\",
\"default_amount\": 68,
\"includes_in_work_cost\": false,
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-addition-types/officia"
);
const headers = {
"Authorization": "Bearer c8Vabgh4P1dEf663aek5ZvD",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "ejhdgpiujqvxmljx",
"default_amount": 68,
"includes_in_work_cost": false,
"is_active": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Tipo de acréscimo atualizado com sucesso."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete addition type
requires authentication payroll build
Só para tipo sem uso. Tipo já lançado em alguma folha é recusado com orientação para inativar.
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/payroll-addition-types/accusamus" \
--header "Authorization: Bearer fhdgeb6Vvc65418aPDZka3E" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-addition-types/accusamus"
);
const headers = {
"Authorization": "Bearer fhdgeb6Vvc65418aPDZka3E",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Tipo de acréscimo excluído com sucesso."
}
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"name": [
"Este tipo de acréscimo já foi lançado em alguma folha e não pode ser excluído. Inative-o para parar de usá-lo."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Payroll Payments
Baixa da folha: caixa, recibo e dinheiro entregue na obra
Payments of the day
requires authentication payroll pay
Os pagamentos agendados para uma data, agrupados por favorecido, com a chave PIX ao
lado e o total por pessoa. Sem date, traz o dia de hoje.
Os itens já pagos vêm na lista, marcados: quem paga precisa ver o que já saiu para não pagar duas vezes. Folha em rascunho não aparece — pagamento só depois de conferida.
A chave PIX é a gravada no item; não havendo, cai na favorita do cadastro do funcionário ou do fornecedor.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/payroll-payments/day?date=2026-11-20" \
--header "Authorization: Bearer V1eghEDbfaZ6dk68Pca4v53" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date\": \"2026-12-03\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-payments/day"
);
const params = {
"date": "2026-11-20",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer V1eghEDbfaZ6dk68Pca4v53",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date": "2026-12-03"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"date": "2026-11-20",
"totals": {
"grand_total": "530.00",
"pending_total": "350.00",
"items_count": 3,
"pending_count": 2,
"payees_count": 2
},
"payees": [
{
"payee": {
"type": "employee",
"label": "Funcionário",
"id": "uuid",
"name": "José da Silva",
"document": "390.533.447-05"
},
"pix_key": "jose.silva@email.com",
"total": "180.00",
"pending_total": "180.00",
"items_count": 1,
"pending_count": 1,
"items": []
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Settle several payroll items
requires authentication payroll pay
Baixa vários itens de uma vez. Cada item é liquidado na sua própria transação: um item sem saldo na conta não desfaz os que já foram pagos, e a resposta diz quais passaram e quais não.
Com receipt_mode: per_work sai um recibo por favorecido e obra, com o valor só
daquela obra (itens sem obra formam um grupo próprio); com per_payment, o padrão,
um recibo por item.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/payroll-payments/batch" \
--header "Authorization: Bearer dDEZehv6cV4816af5kbga3P" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_account_id\": \"f2d84ca0-43ac-3c26-9c35-7469d30b182b\",
\"delivered\": true,
\"delivered_by_name\": \"qxoopkkauhudhxuswpkuobdw\",
\"generate_receipt\": true,
\"receipt_mode\": \"per_payment\",
\"receipt_description\": \"hic\",
\"issuer_name\": \"xl\",
\"issuer_document\": \"ifxnguwxznk\",
\"city\": \"byv\",
\"state\": \"yz\",
\"items\": [
\"81710b7e-e820-3ad9-aaf9-3e6fe4e2ea8f\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-payments/batch"
);
const headers = {
"Authorization": "Bearer dDEZehv6cV4816af5kbga3P",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_account_id": "f2d84ca0-43ac-3c26-9c35-7469d30b182b",
"delivered": true,
"delivered_by_name": "qxoopkkauhudhxuswpkuobdw",
"generate_receipt": true,
"receipt_mode": "per_payment",
"receipt_description": "hic",
"issuer_name": "xl",
"issuer_document": "ifxnguwxznk",
"city": "byv",
"state": "yz",
"items": [
"81710b7e-e820-3ad9-aaf9-3e6fe4e2ea8f"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"settled": [
"uuid-1",
"uuid-2"
],
"failed": [
{
"item": "uuid-3",
"reason": "Saldo insuficiente."
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Settle a payroll item
requires authentication payroll pay
Marca o item como pago e lança no caixa, com a obra e o centro de custo do item, debitando a conta de saída escolhida.
Com delivered, o item fica como entregue em vez de pago — é o dinheiro entregue
na obra, que exige uma conta do tipo caixa e aceita o nome de quem entregou.
O recibo é opcional. Quando pedido, o caixa e o recibo nascem na mesma transação: se um falhar, nenhum dos dois fica gravado.
Sem sessão de caixa aberta, uma é aberta automaticamente — inclusive quando a do dia já foi fechada.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/payroll-payments/aspernatur" \
--header "Authorization: Bearer h46vD8aEc15bfe3aPVg6Zkd" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_account_id\": \"f642e047-382b-3852-8b59-745000fb4931\",
\"delivered\": true,
\"delivered_by_name\": \"oaxpdehkxumniqg\",
\"generate_receipt\": true,
\"receipt_mode\": \"per_work\",
\"receipt_description\": \"vel\",
\"issuer_name\": \"nxiwbp\",
\"issuer_document\": \"bgqjxngtgccblpfclzrhjgmq\",
\"city\": \"rxcgnakrehizndvld\",
\"state\": \"st\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-payments/aspernatur"
);
const headers = {
"Authorization": "Bearer h46vD8aEc15bfe3aPVg6Zkd",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_account_id": "f642e047-382b-3852-8b59-745000fb4931",
"delivered": true,
"delivered_by_name": "oaxpdehkxumniqg",
"generate_receipt": true,
"receipt_mode": "per_work",
"receipt_description": "vel",
"issuer_name": "nxiwbp",
"issuer_document": "bgqjxngtgccblpfclzrhjgmq",
"city": "rxcgnakrehizndvld",
"state": "st"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a35fbfe4-838f-4622-b657-edcf1715469b",
"payee": {
"type": null,
"label": null,
"id": null,
"name": "Madisen Kuhlman",
"document": "975.966.073-38"
},
"work": null,
"cost_center": null,
"amount": "210.48",
"additions": [],
"total": "210.48",
"work_cost_total": "210.48",
"payment_method": {
"value": "pix",
"label": "PIX"
},
"pix_key": null,
"notes": null,
"scheduled_date": "2026-12-03",
"status": {
"value": "pending",
"label": "Pendente"
},
"is_settled": false,
"paid_at": null,
"paid_by": null,
"delivered_by_name": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Payroll Sheets
Folha de sexta: montar, conferir e reabrir
List payroll sheets
requires authentication payroll index
Folhas por semana, da mais recente para a mais antiga, com os totais por forma de pagamento. A mesma semana pode ter mais de uma folha.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/payroll-sheets" \
--header "Authorization: Bearer b5kZagPEv36VhaDe84fdc61" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"labore\",
\"sort_desc\": true,
\"page\": 19,
\"per_page\": 1,
\"q\": \"voluptas\",
\"status\": \"checked\",
\"period_from\": \"2026-12-03T13:46:06\",
\"period_to\": \"2069-01-28\",
\"payment_date_from\": \"2026-12-03T13:46:06\",
\"payment_date_to\": \"2114-01-28\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets"
);
const headers = {
"Authorization": "Bearer b5kZagPEv36VhaDe84fdc61",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "labore",
"sort_desc": true,
"page": 19,
"per_page": 1,
"q": "voluptas",
"status": "checked",
"period_from": "2026-12-03T13:46:06",
"period_to": "2069-01-28",
"payment_date_from": "2026-12-03T13:46:06",
"payment_date_to": "2114-01-28"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "a35fbfe4-166c-4c35-83df-3f32053c9cb6",
"code": null,
"name": "Obras",
"period_start": "2026-11-30",
"period_end": "2026-12-06",
"payment_date": "2026-12-04",
"status": {
"value": "draft",
"label": "Rascunho"
},
"can_delete": true,
"items_count": 0,
"grand_total": "0.00",
"by_payment_method": []
},
{
"id": "a35fbfe4-1a14-43dc-a377-cba8179c561c",
"code": null,
"name": "Obras",
"period_start": "2026-11-30",
"period_end": "2026-12-06",
"payment_date": "2026-12-04",
"status": {
"value": "draft",
"label": "Rascunho"
},
"can_delete": true,
"items_count": 0,
"grand_total": "0.00",
"by_payment_method": []
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create payroll sheet
requires authentication payroll build
Nasce em rascunho. O nome distingue folhas da mesma semana, como "Obras" e "Escritório".
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets" \
--header "Authorization: Bearer 6bg5h1kDZdceP68fEv43Vaa" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"lfvdhtixzafofjsppxpmx\",
\"period_start\": \"2026-12-03T13:46:06\",
\"period_end\": \"2087-03-24\",
\"payment_date\": \"2026-12-03T13:46:06\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets"
);
const headers = {
"Authorization": "Bearer 6bg5h1kDZdceP68fEv43Vaa",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "lfvdhtixzafofjsppxpmx",
"period_start": "2026-12-03T13:46:06",
"period_end": "2087-03-24",
"payment_date": "2026-12-03T13:46:06"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "a35fbfe4-23d3-411d-84c5-7f47f167c83d",
"code": null,
"name": "Obras",
"period_start": "2026-11-30",
"period_end": "2026-12-06",
"payment_date": "2026-12-04",
"status": {
"value": "draft",
"label": "Rascunho"
},
"accepts_item_changes": true,
"can_reopen": false,
"can_delete": true,
"created_by": {
"id": "a35fbfe4-246d-4f69-8a39-7913b4a85ed1",
"name": "Cristian Ward"
},
"checked_by": null,
"checked_at": null,
"reopened_by": null,
"reopened_at": null,
"items": [],
"totals": {
"grand_total": "0.00",
"work_cost_total": "0.00",
"items_count": 0,
"by_work": [],
"by_payment_method": []
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show payroll sheet
requires authentication payroll show
Folha com os itens, os acréscimos e os totais por obra e por forma de pagamento, calculados no servidor.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/payroll-sheets/dolorum" \
--header "Authorization: Bearer 61vagEc6Zk3ha4b85DePfVd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/dolorum"
);
const headers = {
"Authorization": "Bearer 61vagEc6Zk3ha4b85DePfVd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a35fbfe4-2c1e-4091-9f4b-f327be2406ee",
"code": null,
"name": "Obras",
"period_start": "2026-11-30",
"period_end": "2026-12-06",
"payment_date": "2026-12-04",
"status": {
"value": "draft",
"label": "Rascunho"
},
"accepts_item_changes": true,
"can_reopen": false,
"can_delete": true,
"created_by": {
"id": "a35fbfe4-2c8d-4a5d-943f-fc534f9a22f1",
"name": "Lorine Feeney"
},
"checked_by": null,
"checked_at": null,
"reopened_by": null,
"reopened_at": null,
"items": [],
"totals": {
"grand_total": "0.00",
"work_cost_total": "0.00",
"items_count": 0,
"by_work": [],
"by_payment_method": []
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update payroll sheet
requires authentication payroll build
Semana, nome e data de pagamento só mudam em rascunho.
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/laborum" \
--header "Authorization: Bearer h5Pc6e4EfkbvdaZg3D8Va16" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"veexfajhwuetpge\",
\"period_start\": \"2026-12-03T13:46:06\",
\"period_end\": \"2085-12-14\",
\"payment_date\": \"2026-12-03T13:46:06\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/laborum"
);
const headers = {
"Authorization": "Bearer h5Pc6e4EfkbvdaZg3D8Va16",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "veexfajhwuetpge",
"period_start": "2026-12-03T13:46:06",
"period_end": "2085-12-14",
"payment_date": "2026-12-03T13:46:06"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Folha atualizada com sucesso."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete payroll sheet
requires authentication payroll build
Só em rascunho. Apagar a folha apaga os itens e os acréscimos dela.
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/sapiente" \
--header "Authorization: Bearer a4cfek51PZ3bg6aE8V6vDhd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/sapiente"
);
const headers = {
"Authorization": "Bearer a4cfek51PZ3bg6aE8V6vDhd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Folha excluída com sucesso."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Add item to payroll sheet
requires authentication payroll build
Lança um pagamento na folha. O favorecido vem do cadastro (payee_type mais payee_id)
ou digitado à mão (receiver_name, sem payee_type) — este último é o dinheiro
entregue na obra para quem não está em cadastro nenhum.
O nome e o documento do favorecido de cadastro são copiados no servidor, para a folha
não mudar quando o cadastro mudar. Sem amount, cai na diária do funcionário. Sem
scheduled_date, herda a data de pagamento da folha.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/non/items" \
--header "Authorization: Bearer 5fV6D6cZ8P13gdav4eEkhab" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"payee_type\": \"employee\",
\"payee_id\": \"32f30413-3c43-3d8c-9832-2c8869c273e6\",
\"receiver_name\": \"vfimmjrvwvqzobmlrvxnxdddv\",
\"receiver_document\": \"geuzmrvgbmdiuqylvcd\",
\"work_id\": \"f46a1c87-72f8-3fc6-ba1f-0ad2ebc07048\",
\"cost_center_id\": \"ea\",
\"amount\": 60,
\"payment_method\": \"check\",
\"pix_key\": \"isbomacxanxokogsjpbceyzak\",
\"notes\": \"mtwjotrshekbeinfwzcgxllq\",
\"scheduled_date\": \"2026-12-03T13:46:06\",
\"additions\": [
{
\"type_id\": \"ec315810-3696-3196-9e9c-a4e566ce6700\",
\"amount\": 21
}
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/non/items"
);
const headers = {
"Authorization": "Bearer 5fV6D6cZ8P13gdav4eEkhab",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"payee_type": "employee",
"payee_id": "32f30413-3c43-3d8c-9832-2c8869c273e6",
"receiver_name": "vfimmjrvwvqzobmlrvxnxdddv",
"receiver_document": "geuzmrvgbmdiuqylvcd",
"work_id": "f46a1c87-72f8-3fc6-ba1f-0ad2ebc07048",
"cost_center_id": "ea",
"amount": 60,
"payment_method": "check",
"pix_key": "isbomacxanxokogsjpbceyzak",
"notes": "mtwjotrshekbeinfwzcgxllq",
"scheduled_date": "2026-12-03T13:46:06",
"additions": [
{
"type_id": "ec315810-3696-3196-9e9c-a4e566ce6700",
"amount": 21
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "a35fbfe4-4253-4cc5-9c8f-8e7d70ba2523",
"payee": {
"type": null,
"label": null,
"id": null,
"name": "Orion Quitzon III",
"document": "349.628.811-07"
},
"work": null,
"cost_center": null,
"amount": "310.42",
"additions": [],
"total": "310.42",
"work_cost_total": "310.42",
"payment_method": {
"value": "pix",
"label": "PIX"
},
"pix_key": null,
"notes": null,
"scheduled_date": "2026-12-03",
"status": {
"value": "pending",
"label": "Pendente"
},
"is_settled": false,
"paid_at": null,
"paid_by": null,
"delivered_by_name": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update payroll sheet item
requires authentication payroll build
Só em folha em rascunho e item ainda não pago. Mandar additions substitui a lista inteira de acréscimos do item.
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/inventore/items/possimus" \
--header "Authorization: Bearer 6gv65VkDPh8dfca41bEeZ3a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"payee_type\": \"employee\",
\"payee_id\": \"2ba3dc5c-a8d7-324f-a19c-4a6700edba20\",
\"receiver_name\": \"qxgoczjecr\",
\"receiver_document\": \"avyzrnpws\",
\"work_id\": \"b04dda6c-26aa-3d7a-ba24-fcdb7dac50f3\",
\"cost_center_id\": \"qui\",
\"amount\": 84,
\"payment_method\": \"pix\",
\"pix_key\": \"psatb\",
\"notes\": \"fwyavsnqzwovuguqaqksrp\",
\"scheduled_date\": \"2026-12-03T13:46:06\",
\"additions\": [
{
\"type_id\": \"1316f214-cf07-3548-b079-cb7e9ff783d7\",
\"amount\": 16
}
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/inventore/items/possimus"
);
const headers = {
"Authorization": "Bearer 6gv65VkDPh8dfca41bEeZ3a",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"payee_type": "employee",
"payee_id": "2ba3dc5c-a8d7-324f-a19c-4a6700edba20",
"receiver_name": "qxgoczjecr",
"receiver_document": "avyzrnpws",
"work_id": "b04dda6c-26aa-3d7a-ba24-fcdb7dac50f3",
"cost_center_id": "qui",
"amount": 84,
"payment_method": "pix",
"pix_key": "psatb",
"notes": "fwyavsnqzwovuguqaqksrp",
"scheduled_date": "2026-12-03T13:46:06",
"additions": [
{
"type_id": "1316f214-cf07-3548-b079-cb7e9ff783d7",
"amount": 16
}
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a35fbfe4-5439-4e4a-ba7b-7ba1c7318053",
"payee": {
"type": null,
"label": null,
"id": null,
"name": "Mr. Baron Baumbach",
"document": "419.022.616-54"
},
"work": null,
"cost_center": null,
"amount": "199.83",
"additions": [],
"total": "199.83",
"work_cost_total": "199.83",
"payment_method": {
"value": "pix",
"label": "PIX"
},
"pix_key": null,
"notes": null,
"scheduled_date": "2026-12-03",
"status": {
"value": "pending",
"label": "Pendente"
},
"is_settled": false,
"paid_at": null,
"paid_by": null,
"delivered_by_name": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete payroll sheet item
requires authentication payroll build
Só em folha em rascunho e item ainda não pago.
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/ut/items/aut" \
--header "Authorization: Bearer adPa3e5Z6VDcEhfk4v1g86b" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/ut/items/aut"
);
const headers = {
"Authorization": "Bearer adPa3e5Z6VDcEhfk4v1g86b",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Pagamento removido da folha."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Check payroll sheet
requires authentication payroll check
Confere e trava a folha: a partir daí ela não aceita mais alteração de item. Registra quem conferiu e quando. Folha sem item não é conferível.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/accusantium/check" \
--header "Authorization: Bearer 1be6VD4Pc3Z8f65akEahgvd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/accusantium/check"
);
const headers = {
"Authorization": "Bearer 1be6VD4Pc3Z8f65akEahgvd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a35fbfe4-5faf-4e87-8dee-374349d9fd10",
"code": null,
"name": "Obras",
"period_start": "2026-11-30",
"period_end": "2026-12-06",
"payment_date": "2026-12-04",
"status": {
"value": "draft",
"label": "Rascunho"
},
"accepts_item_changes": true,
"can_reopen": false,
"can_delete": true,
"created_by": {
"id": "a35fbfe4-6038-4993-a1c6-536e7a58881c",
"name": "Stephania Hermann"
},
"checked_by": null,
"checked_at": null,
"reopened_by": null,
"reopened_at": null,
"items": [],
"totals": {
"grand_total": "0.00",
"work_cost_total": "0.00",
"items_count": 0,
"by_work": [],
"by_payment_method": []
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reopen payroll sheet
requires authentication payroll check
Volta a folha para rascunho e registra quem reabriu e quando. Item já pago ou entregue continua travado. Folha paga não reabre.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/aut/reopen" \
--header "Authorization: Bearer gekbc3aa16Ph8f45DZE6dvV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payroll-sheets/aut/reopen"
);
const headers = {
"Authorization": "Bearer gekbc3aa16Ph8f45DZE6dvV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a35fbfe4-6630-4a8e-b0cd-282aaa12094f",
"code": null,
"name": "Obras",
"period_start": "2026-11-30",
"period_end": "2026-12-06",
"payment_date": "2026-12-04",
"status": {
"value": "draft",
"label": "Rascunho"
},
"accepts_item_changes": true,
"can_reopen": false,
"can_delete": true,
"created_by": {
"id": "a35fbfe4-66ab-48f7-a9bb-e8a36e49976e",
"name": "Dr. Wilford Effertz II"
},
"checked_by": null,
"checked_at": null,
"reopened_by": null,
"reopened_at": null,
"items": [],
"totals": {
"grand_total": "0.00",
"work_cost_total": "0.00",
"items_count": 0,
"by_work": [],
"by_payment_method": []
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 eha8dc16PVZD64av53fbgEk" \
--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 eha8dc16PVZD64av53fbgEk",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "8b74eb94-0f84-357d-95f2-bf682aa1fb48",
"name": "et",
"display_name": "Minus omnis in nemo reiciendis praesentium harum eos."
},
{
"id": "01d0635a-10ff-310c-90d0-21008d8f3cc0",
"name": "totam",
"display_name": "Molestiae quas est ratione natus."
}
],
"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 543aDkf81bP6EeVcag6Zhdv" \
--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 543aDkf81bP6EeVcag6Zhdv",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "e1537163-a5dc-347d-99b8-bdc9ea6c1ebe",
"name": "rem-quia-iusto",
"display_name": "libero consequatur est",
"created_at": null,
"updated_at": null
},
{
"id": "5e4f37e5-c8eb-302d-9dd1-54915c41a391",
"name": "quasi-qui-voluptatem",
"display_name": "esse error aspernatur",
"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 83dcv5k4aDZE6gePhVfb16a" \
--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 83dcv5k4aDZE6gePhVfb16a",
"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 gebkfZD466cV51aa8hP3vdE" \
--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 gebkfZD466cV51aa8hP3vdE",
"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 VdEc61fPa4Z83a65bvgeDhk" \
--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 VdEc61fPa4Z83a65bvgeDhk",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "1721c1a5-0a12-3ef2-a18d-5d24dc459e43",
"name": "reiciendis-ad-deleniti",
"display_name": "sint ea 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 53ef4g1E6Zkavc6haPd8DVb" \
--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 53ef4g1E6Zkavc6haPd8DVb",
"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 4ZPd1EbDh38v5gka66Vfaec" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"bab926d0-1d3e-3d33-b9c1-e29e6717d078\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);
const headers = {
"Authorization": "Bearer 4ZPd1EbDh38v5gka66Vfaec",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"bab926d0-1d3e-3d33-b9c1-e29e6717d078"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d9cf8c65-3ee2-31ac-b363-5a7d75eb93cf",
"name": "iusto-et",
"display_name": "et nesciunt eum",
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 6D4P5caa61Zh8fbEveVk3dg" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"cac8e82e-017f-3ff3-b19c-924bd4264099\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);
const headers = {
"Authorization": "Bearer 6D4P5caa61Zh8fbEveVk3dg",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"cac8e82e-017f-3ff3-b19c-924bd4264099"
]
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d28a0ebb-bc8f-3e8a-8f70-81aa74db93e4",
"name": "a-quidem-inventore",
"display_name": "iure quia est",
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 1edkPEg53fcavD6Zb864aVh" \
--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 1edkPEg53fcavD6Zb864aVh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "2bc87732-7a45-3be0-a381-e7387188c23f",
"name": "Luana Eliane Corona",
"created_at": null,
"updated_at": null
},
{
"id": "278ecc27-2a03-3046-9f49-ab99b95f685d",
"name": "Dr. Juliane Maísa Santana Filho",
"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/magni" \
--header "Authorization: Bearer d65hf6aVvkDZa3EPcb1e48g" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-brands/magni"
);
const headers = {
"Authorization": "Bearer d65hf6aVvkDZa3EPcb1e48g",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "3211a875-79bc-3f12-bac4-ebf5db97ae67",
"name": "Dr. Kamila Jimenes Vasques",
"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 e8agdV6f54kPv61Ech3aZbD" \
--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 e8agdV6f54kPv61Ech3aZbD",
"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/doloribus" \
--header "Authorization: Bearer 6VcDbe6adk83hgf1vEZ4P5a" \
--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/doloribus"
);
const headers = {
"Authorization": "Bearer 6VcDbe6adk83hgf1vEZ4P5a",
"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/quisquam" \
--header "Authorization: Bearer D8VceaPa5Ek466fd3bZhg1v" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-brands/quisquam"
);
const headers = {
"Authorization": "Bearer D8VceaPa5Ek466fd3bZhg1v",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Families
Endpoints for product families
List product families
requires authentication product-family index
List all product families
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-families?is_epi=&q=Structure" \
--header "Authorization: Bearer h41dEP38fegbV65ZakDca6v" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families"
);
const params = {
"is_epi": "0",
"q": "Structure",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer h41dEP38fegbV65ZakDca6v",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "66d2a2e7-9ad2-36b0-b10b-5ccf52abba80",
"name": "Dr. Eloá Rios",
"is_epi": false,
"created_at": null,
"updated_at": null
},
{
"id": "c4a757f0-c04f-3b61-8d13-1d245415eb1d",
"name": "Heloise Roberta Oliveira Jr.",
"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/molestiae" \
--header "Authorization: Bearer ehk54c8g6Vd6DavZbaP3fE1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families/molestiae"
);
const headers = {
"Authorization": "Bearer ehk54c8g6Vd6DavZbaP3fE1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "ec9fa7d5-d755-3791-bed3-8f16031d906c",
"name": "Clarice Saraiva",
"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 fac46vdkeEa1PDg8bh635VZ" \
--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 fac46vdkeEa1PDg8bh635VZ",
"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/voluptas" \
--header "Authorization: Bearer 8Zea41EVc36ghafk65DPdvb" \
--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/voluptas"
);
const headers = {
"Authorization": "Bearer 8Zea41EVc36ghafk65DPdvb",
"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/qui" \
--header "Authorization: Bearer c5Eba63gvePhV1Z8fa4kd6D" \
--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 c5Eba63gvePhV1Z8fa4kd6D",
"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 fDd4kvhgb63acEVeZPa1865" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"Example Q\",
\"work_id\": \"065761ea-d075-3df0-bdd3-54dbdf991e78\",
\"user_id\": \"a4349f4c-e1f3-3923-a6ab-e0932942190c\",
\"responsible_id\": \"57904480-9a5e-3348-a634-4d456c4c369f\",
\"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 fDd4kvhgb63acEVeZPa1865",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "Example Q",
"work_id": "065761ea-d075-3df0-bdd3-54dbdf991e78",
"user_id": "a4349f4c-e1f3-3923-a6ab-e0932942190c",
"responsible_id": "57904480-9a5e-3348-a634-4d456c4c369f",
"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": "6c873be3-ef17-37c7-aa14-80bee2f22f8f",
"name": "Sunt quo corrupti.",
"description": "Ab et magnam modi mollitia non. Sit enim reprehenderit hic ea eos consequuntur suscipit. In praesentium necessitatibus facere consectetur tempora qui ipsum.",
"work": {
"id": "a35fbfe5-232f-403a-a0f8-492cc79b33dc",
"name": "Christopher Samuel Arruda"
},
"user": {
"id": "a35fbfe5-2633-4e71-a32d-68c128760ee2",
"name": "Jace Herzog"
},
"created_at": null,
"updated_at": null
},
{
"id": "cddd667b-97bf-370b-8b9f-a4b0b2133647",
"name": "Vero enim.",
"description": "Ipsum quia aut qui saepe nesciunt adipisci recusandae. Debitis maiores nam quaerat consequatur adipisci eos sapiente. Similique ipsam quibusdam inventore ad sunt.",
"work": {
"id": "a35fbfe5-2a9e-4d37-884c-3980d0055c36",
"name": "Clarice Quintana"
},
"user": {
"id": "a35fbfe5-2df4-45c6-9ad5-3a5f64d512c8",
"name": "Ines Cormier"
},
"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/temporibus" \
--header "Authorization: Bearer fk3EaZc6dvV8gb6eD1haP45" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/temporibus"
);
const headers = {
"Authorization": "Bearer fk3EaZc6dvV8gb6eD1haP45",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "0d0869ef-d5d4-38f0-bab5-f0ca523c115f",
"name": "Nemo alias molestiae.",
"description": null,
"work": {
"id": "a35fbfe5-35eb-4d1c-993d-b1b4fadfa162",
"name": "Jonas Uchoa Verdugo Jr."
},
"user": {
"id": "a35fbfe5-38d7-45e4-bd4e-e819317c81ec",
"name": "Tania Schaefer"
},
"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/ad/items" \
--header "Authorization: Bearer 8aeP6641g5k3cbVEDZadvhf" \
--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/ad/items"
);
const headers = {
"Authorization": "Bearer 8aeP6641g5k3cbVEDZadvhf",
"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": "b49f78ab-d354-3be6-97d2-5e69f83a31b5",
"product": {
"id": "a35fbfe5-4f96-4b8b-975d-6c54fe05b765",
"name": "Otávio Deverso",
"code": "PRD-819713",
"unit": {
"id": "a35fbfe5-4d46-41c8-bd80-32b33f8567c8",
"name": "Sr. Lorenzo Murilo Marques Sobrinho",
"abbreviation": "Sra. Sônia Ávila Santiago"
}
},
"quantity": 454.7353,
"observation": null,
"created_at": null,
"updated_at": null
},
{
"id": "92c00f75-77a7-3c15-b9d1-0ea20d2330a8",
"product": {
"id": "a35fbfe5-6d25-44e7-a4f2-ba00f3bc19bd",
"name": "Luciana Márcia Cervantes",
"code": "PRD-744336",
"unit": {
"id": "a35fbfe5-6b80-496b-980b-c32050f8331e",
"name": "Igor da Rosa Pacheco",
"abbreviation": "Dr. Joana Ávila Oliveira Filho"
}
},
"quantity": 196.2659,
"observation": "Ullam voluptatibus cupiditate eum culpa.",
"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 adfhcE3e64DgvV1bkZPa685" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"d5136963-34b9-38f8-b456-d79bb56268be\",
\"items\": [
{
\"product_id\": \"1dc7ce54-26fa-3cf2-a451-d593ef611fdd\",
\"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 adfhcE3e64DgvV1bkZPa685",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "d5136963-34b9-38f8-b456-d79bb56268be",
"items": [
{
"product_id": "1dc7ce54-26fa-3cf2-a451-d593ef611fdd",
"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/exercitationem" \
--header "Authorization: Bearer Pavb84g6De1EZ6dfha3Vkc5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"items\": [
{
\"id\": \"de68bcb8-a4fb-3e3a-8ed3-c17ec2b83beb\",
\"product_id\": \"5f9d7e55-ba22-3b86-bdac-904471e21091\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/exercitationem"
);
const headers = {
"Authorization": "Bearer Pavb84g6De1EZ6dfha3Vkc5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"items": [
{
"id": "de68bcb8-a4fb-3e3a-8ed3-c17ec2b83beb",
"product_id": "5f9d7e55-ba22-3b86-bdac-904471e21091",
"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/omnis" \
--header "Authorization: Bearer vd83kafZab546cgPh61VeED" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/omnis"
);
const headers = {
"Authorization": "Bearer vd83kafZab546cgPh61VeED",
"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/nam/items" \
--header "Authorization: Bearer 1v48D5fd3e6ab6gEcZkPhVa" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"product_id\": \"c455e6e9-511c-3571-b029-c56557613234\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/nam/items"
);
const headers = {
"Authorization": "Bearer 1v48D5fd3e6ab6gEcZkPhVa",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"product_id": "c455e6e9-511c-3571-b029-c56557613234",
"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/accusamus" \
--header "Authorization: Bearer eg8ZbPv656ahc4kfV31EDda" \
--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/accusamus"
);
const headers = {
"Authorization": "Bearer eg8ZbPv656ahc4kfV31EDda",
"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/voluptatibus/items" \
--header "Authorization: Bearer E5hdk43Dv6VZ8baefgcP6a1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"73b5deee-1b36-3f7c-bad2-3eb089baad2b\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/voluptatibus/items"
);
const headers = {
"Authorization": "Bearer E5hdk43Dv6VZ8baefgcP6a1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"73b5deee-1b36-3f7c-bad2-3eb089baad2b"
]
};
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/non/sync-items" \
--header "Authorization: Bearer k6E5ZdaVg816Dh3faPevc4b" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"id\": \"468caff7-cb92-3bbc-bac2-c64846c20115\",
\"product_id\": \"b63ca749-a798-384a-b132-8c2cf690c057\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/non/sync-items"
);
const headers = {
"Authorization": "Bearer k6E5ZdaVg816Dh3faPevc4b",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"id": "468caff7-cb92-3bbc-bac2-c64846c20115",
"product_id": "b63ca749-a798-384a-b132-8c2cf690c057",
"quantity": 1,
"observation": "Example Items * observation"
},
null
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": "object"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Request Fulfillment
Endpoints for fulfilling product request items
Fulfill item
requires authentication product-request fulfill
Fulfill a product request item via transfer or allocation
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/ut/fulfill" \
--header "Authorization: Bearer cvE38PZ66habek5dD4g1aVf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"fulfillment_type\": \"Example Fulfillment type\",
\"stock_id\": \"65699bee-1c44-3648-84b5-8e8d111b5a53\",
\"quantity\": 1,
\"source_stock_id\": \"933a0123-00b6-3040-ab45-f1b1278762f2\",
\"reason\": \"Example Reason\",
\"origins\": [
{
\"supplier_product_id\": \"b7373bd6-ed5f-3ec9-b625-a1697f5266e2\",
\"quantity\": 1
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/ut/fulfill"
);
const headers = {
"Authorization": "Bearer cvE38PZ66habek5dD4g1aVf",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"fulfillment_type": "Example Fulfillment type",
"stock_id": "65699bee-1c44-3648-84b5-8e8d111b5a53",
"quantity": 1,
"source_stock_id": "933a0123-00b6-3040-ab45-f1b1278762f2",
"reason": "Example Reason",
"origins": [
{
"supplier_product_id": "b7373bd6-ed5f-3ec9-b625-a1697f5266e2",
"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/qui/fulfillments" \
--header "Authorization: Bearer 3Vvh5Ekd4g6Pc8bZDa16fae" \
--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/qui/fulfillments"
);
const headers = {
"Authorization": "Bearer 3Vvh5Ekd4g6Pc8bZDa16fae",
"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": "99abb561-d317-3239-bbae-cd2d8bc3790d",
"quantity": 59.7485,
"fulfilled_at": "2026-11-28T00:55:40.000000Z",
"created_at": null
},
{
"id": "09a0b274-dca9-3b9b-86be-5aadf22e6a72",
"quantity": 56.9824,
"fulfilled_at": "2026-11-09T06:30:06.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/aspernatur" \
--header "Authorization: Bearer bD5a6ePd8fEvZhV3k61gac4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/aspernatur"
);
const headers = {
"Authorization": "Bearer bD5a6ePd8fEvZhV3k61gac4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "8c13f077-9349-3b96-b874-25b50e6b309b",
"product": {
"id": "a35fbfe9-257f-4604-a201-71f7f4aea89c",
"name": "Dr. Sophie Letícia Chaves Jr.",
"code": "PRD-700638",
"unit": {
"id": "a35fbfe9-244c-45dc-8816-5177e85edd61",
"name": "Dr. Roberto Lozano das Neves Sobrinho",
"abbreviation": "Filipe Zamana Dominato"
}
},
"quantity": 455.9506,
"quantity_fulfilled": 0,
"quantity_pending": 455.9506,
"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/et/pending-items" \
--header "Authorization: Bearer bk5ecfP63Z1VEahd8gv4D6a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"per_page\": 1,
\"page\": 1
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/et/pending-items"
);
const headers = {
"Authorization": "Bearer bk5ecfP63Z1VEahd8gv4D6a",
"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": "2509464c-ebb7-3271-ae62-c44bf89fcec9",
"product": {
"id": "a35fbfe9-4446-408e-9f1d-1e6afbe9bd4c",
"name": "Giovanna Salgado",
"code": "PRD-858378",
"unit": {
"id": "a35fbfe9-42f0-412e-8b72-0cf7a31e3af0",
"name": "Cristian Ramos da Silva",
"abbreviation": "Daniele Ramires Burgos Filho"
}
},
"quantity": 743.7317,
"quantity_fulfilled": 0,
"quantity_pending": 743.7317,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": null,
"created_at": null,
"updated_at": null
},
{
"id": "529ea2fe-3176-3662-bfce-42c7f664a3b6",
"product": {
"id": "a35fbfe9-5781-4542-9b12-4f8e4b20a64a",
"name": "Saulo Batista Neto",
"code": "PRD-247883",
"unit": {
"id": "a35fbfe9-563a-468e-9c07-d12d6eb00a2a",
"name": "Mirela Elis Beltrão",
"abbreviation": "Sr. Jácomo de Oliveira Sobrinho"
}
},
"quantity": 993.0596,
"quantity_fulfilled": 0,
"quantity_pending": 993.0596,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Sunt asperiores quibusdam officia enim ut exercitationem et.",
"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/est" \
--header "Authorization: Bearer hcPg3VZb56a8416DEdfeavk" \
--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/est"
);
const headers = {
"Authorization": "Bearer hcPg3VZb56a8416DEdfeavk",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "7aac5b0d-d9f8-386f-8c19-4ad27a6a74c2",
"product": {
"id": "a35fbfe9-6e53-4f22-bed0-181c457aec48",
"name": "Lia Anita Ávila",
"code": "PRD-782074",
"unit": {
"id": "a35fbfe9-6cf3-4345-912f-0309d544f581",
"name": "Dr. Gilberto Maia Sobrinho",
"abbreviation": "Sra. Raysa Angélica Campos"
}
},
"quantity": 44.3404,
"quantity_fulfilled": 0,
"quantity_pending": 44.3404,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": null,
"created_at": null,
"updated_at": null
},
{
"id": "45060eb9-b021-3d50-a988-b4e4b31e9460",
"product": {
"id": "a35fbfe9-8059-4701-b3ed-2eb673e66dd1",
"name": "Sr. Joaquim Rafael Arruda",
"code": "PRD-703124",
"unit": {
"id": "a35fbfe9-7f0d-4d02-b081-d54599b2cef3",
"name": "Sra. Janaina Mayara Rezende Filho",
"abbreviation": "Miranda Caldeira"
}
},
"quantity": 40.2302,
"quantity_fulfilled": 0,
"quantity_pending": 40.2302,
"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 ba4D1dvEegZPhc8fa6kV536" \
--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\": \"3771ec77-68d2-39d4-bd7f-5c274d5c1ab9\",
\"work_location_id\": \"1ebf2b3f-8006-324e-b058-610dd72630be\",
\"user_id\": \"4240e045-768b-3179-9aaf-e9b8f15db3a9\",
\"status_id\": \"ffbc7b36-622b-3fc8-893b-086d1cb27aff\",
\"priority\": \"Example Priority\",
\"needed_at_from\": \"Example Needed at from\",
\"needed_at_to\": \"Example Needed at to\",
\"responsible_id\": \"a9897293-efc9-3d3e-a9ca-6ca717be4fa1\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests"
);
const headers = {
"Authorization": "Bearer ba4D1dvEegZPhc8fa6kV536",
"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": "3771ec77-68d2-39d4-bd7f-5c274d5c1ab9",
"work_location_id": "1ebf2b3f-8006-324e-b058-610dd72630be",
"user_id": "4240e045-768b-3179-9aaf-e9b8f15db3a9",
"status_id": "ffbc7b36-622b-3fc8-893b-086d1cb27aff",
"priority": "Example Priority",
"needed_at_from": "Example Needed at from",
"needed_at_to": "Example Needed at to",
"responsible_id": "a9897293-efc9-3d3e-a9ca-6ca717be4fa1"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "c87ae6cb-b8b1-3d8c-b620-ae5713e9a591",
"code": null,
"name": "Omnis consequatur quaerat.",
"description": "Vitae corporis quis et explicabo non sed. Quis nostrum nemo earum qui. Vero debitis molestias id optio eligendi esse tenetur. Commodi sed quos deleniti nemo doloremque dolores beatae. Voluptas quam dolor expedita rem est doloribus maiores.",
"work": {
"id": "a35fbfe6-97a5-48b8-8d38-e463efa8f28a",
"name": "Sr. Filipe Colaço"
},
"user": {
"id": "a35fbfe6-9b55-405b-9632-2eb7f2b44f38",
"name": "Jazmyne Olson"
},
"status": {
"id": "a35fbfe6-9d75-4e86-a41c-89a76ab612c5",
"slug": null,
"name": null,
"description": "Karina Abreu Jr.",
"abbreviation": "enim",
"color": "#527762",
"text_color": "#38c532"
},
"priority": "urgent",
"priority_label": "Urgente",
"needed_at": null,
"approved_at": null,
"rejection_reason": null,
"created_at": null,
"updated_at": null
},
{
"id": "28f1c9c1-ecab-3922-ac06-2e69e05ac5b8",
"code": null,
"name": "Odit commodi vero eum.",
"description": "Aut quia omnis doloremque nostrum deserunt aliquid ut ad. Voluptate sunt id aut mollitia fugit. Quo sit in non vel nobis consequatur dolores. Repellat dolores corporis quia qui id quas.",
"work": {
"id": "a35fbfe6-a1fc-4a0a-b566-f27a0d0e5fd9",
"name": "Luciana Valência Filho"
},
"user": {
"id": "a35fbfe6-a471-4a1a-8958-42c6626890cd",
"name": "D'angelo Wisoky DDS"
},
"status": {
"id": "a35fbfe6-a60c-420c-9f40-3edf6096a4c7",
"slug": null,
"name": null,
"description": "Allison Campos Mendes Sobrinho",
"abbreviation": "quod",
"color": "#1213a5",
"text_color": "#20a520"
},
"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/nulla" \
--header "Authorization: Bearer Z8hfV63gdPcb6E5Dae4va1k" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/nulla"
);
const headers = {
"Authorization": "Bearer Z8hfV63gdPcb6E5Dae4va1k",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a8d58ff8-7b02-305c-9b2c-b58875875bb5",
"code": null,
"name": "Voluptatibus officiis at.",
"description": null,
"work": {
"id": "a35fbfe6-ae3e-4bb7-945a-1b4bce6f74d9",
"name": "Luna Violeta Galvão Neto"
},
"user": {
"id": "a35fbfe6-b12b-4b93-96f8-1dafd3374746",
"name": "Reese Klein"
},
"status": {
"id": "a35fbfe6-b2e0-443b-9b9c-7036af7b28ee",
"slug": null,
"name": null,
"description": "Srta. Ingrid Maiara Medina",
"abbreviation": "quo",
"color": "#8467ba",
"text_color": "#834eb3"
},
"priority": "urgent",
"priority_label": "Urgente",
"needed_at": "2026-12-31",
"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/autem/items" \
--header "Authorization: Bearer adZe1vkD835P6Vc64Ebgafh" \
--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/autem/items"
);
const headers = {
"Authorization": "Bearer adZe1vkD835P6Vc64Ebgafh",
"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": "bccc392a-f557-355f-aba7-91095cc77099",
"product": {
"id": "a35fbfe6-d40f-491e-a7fa-11d9a25e51a3",
"name": "Kamila Galindo Filho",
"code": "PRD-042794",
"unit": {
"id": "a35fbfe6-d2f4-4596-ba03-f5036f612791",
"name": "Dr. William Moisés Casanova",
"abbreviation": "William Felipe da Rosa"
}
},
"quantity": 285.151,
"quantity_fulfilled": 0,
"quantity_pending": 285.151,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": null,
"created_at": null,
"updated_at": null
},
{
"id": "be5fcb33-b5cc-3743-ab14-5bdf6ad5aa30",
"product": {
"id": "a35fbfe6-e49d-4588-8398-a9f2cfeffe53",
"name": "William Neves",
"code": "PRD-364494",
"unit": {
"id": "a35fbfe6-e37c-4dfc-9ffc-111e33bd6557",
"name": "José Souza Filho",
"abbreviation": "Mia Verdara Delatorre"
}
},
"quantity": 200.1939,
"quantity_fulfilled": 0,
"quantity_pending": 200.1939,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Et ut ipsum est laboriosam aut.",
"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 ab5ekg6dP4V38hZc6vaEDf1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"ee10d85c-7338-3415-88e9-bdd71d93c415\",
\"work_location_id\": \"6a5ebec8-c542-3635-872a-9aa601650cbc\",
\"status_id\": \"0906771f-4078-39db-b22d-a009d64fad41\",
\"priority\": \"Example Priority\",
\"needed_at\": \"Example Needed at\",
\"items\": [
{
\"product_id\": \"943f8491-e636-3db6-b8a2-096fd73e0abc\",
\"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 ab5ekg6dP4V38hZc6vaEDf1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "ee10d85c-7338-3415-88e9-bdd71d93c415",
"work_location_id": "6a5ebec8-c542-3635-872a-9aa601650cbc",
"status_id": "0906771f-4078-39db-b22d-a009d64fad41",
"priority": "Example Priority",
"needed_at": "Example Needed at",
"items": [
{
"product_id": "943f8491-e636-3db6-b8a2-096fd73e0abc",
"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/commodi" \
--header "Authorization: Bearer vPk6DadEV4g5fec16Zh8b3a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"a0c433d1-9df8-320f-8802-4d0998597c29\",
\"work_location_id\": \"1e3ed741-3b0b-3b2d-abe0-be7b87f9b256\",
\"status_id\": \"2bf92002-4312-386b-bbbe-b5e9b54ad849\",
\"priority\": \"Example Priority\",
\"needed_at\": \"Example Needed at\",
\"items\": [
{
\"id\": \"bcce942c-b9f1-39b6-bc45-194438551788\",
\"product_id\": \"7fbfb6b8-8954-3aa1-ac13-f05883e79699\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/commodi"
);
const headers = {
"Authorization": "Bearer vPk6DadEV4g5fec16Zh8b3a",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "a0c433d1-9df8-320f-8802-4d0998597c29",
"work_location_id": "1e3ed741-3b0b-3b2d-abe0-be7b87f9b256",
"status_id": "2bf92002-4312-386b-bbbe-b5e9b54ad849",
"priority": "Example Priority",
"needed_at": "Example Needed at",
"items": [
{
"id": "bcce942c-b9f1-39b6-bc45-194438551788",
"product_id": "7fbfb6b8-8954-3aa1-ac13-f05883e79699",
"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/dolorem" \
--header "Authorization: Bearer 8e1aDk5g3EbcvPd4hZ6f6aV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/dolorem"
);
const headers = {
"Authorization": "Bearer 8e1aDk5g3EbcvPd4hZ6f6aV",
"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/tempore/approve" \
--header "Authorization: Bearer hcPk184Zf6Eaa6eDvV53gdb" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/tempore/approve"
);
const headers = {
"Authorization": "Bearer hcPk184Zf6Eaa6eDvV53gdb",
"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/quasi/reject" \
--header "Authorization: Bearer E5gv6cPdahb41eDk38ZVa6f" \
--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/quasi/reject"
);
const headers = {
"Authorization": "Bearer E5gv6cPdahb41eDk38ZVa6f",
"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/hic/items" \
--header "Authorization: Bearer 6hd3vgcaefZPa86bDE4V15k" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"product_id\": \"d9e0374e-1b99-3507-ab30-f5e28172f0b2\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/hic/items"
);
const headers = {
"Authorization": "Bearer 6hd3vgcaefZPa86bDE4V15k",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"product_id": "d9e0374e-1b99-3507-ab30-f5e28172f0b2",
"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/ratione" \
--header "Authorization: Bearer Pbagf135ah6dVk84ZvDecE6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"quantity\": 1,
\"observation\": \"Example Observation\",
\"status_id\": \"18fc9756-cbff-3463-bb07-3f50ad8d4fca\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/ratione"
);
const headers = {
"Authorization": "Bearer Pbagf135ah6dVk84ZvDecE6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quantity": 1,
"observation": "Example Observation",
"status_id": "18fc9756-cbff-3463-bb07-3f50ad8d4fca"
};
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/accusantium/items" \
--header "Authorization: Bearer Ef6kv4bPdeD5163ghca8VZa" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"fcf3cb30-d40f-33a5-a0a8-0e258a37c83a\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/accusantium/items"
);
const headers = {
"Authorization": "Bearer Ef6kv4bPdeD5163ghca8VZa",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"fcf3cb30-d40f-33a5-a0a8-0e258a37c83a"
]
};
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/ullam/sync-items" \
--header "Authorization: Bearer vcedZbaE68416gDh53faVPk" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"id\": \"8d07265b-bed3-3a08-8048-214edf436b61\",
\"product_id\": \"bdbe2307-55f1-39a8-b539-ebef82bb4e1a\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/ullam/sync-items"
);
const headers = {
"Authorization": "Bearer vcedZbaE68416gDh53faVPk",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"id": "8d07265b-bed3-3a08-8048-214edf436b61",
"product_id": "bdbe2307-55f1-39a8-b539-ebef82bb4e1a",
"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 abZf4E6kV3vc86he1dPaDg5" \
--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 abZf4E6kV3vc86he1dPaDg5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "b7e9a6d0-c3e1-3c57-9e04-f35a231e58f1",
"name": "Dr. Louise Liz de Oliveira",
"code": "PRD-655008",
"stock": 3042537,
"product_family": {
"id": "a35fbfe4-b812-4543-b163-a82811acf1f1",
"name": "Sra. Pâmela Padilha Filho"
},
"product_brand": {
"id": "a35fbfe4-b9d9-4ddf-a67b-603e30c1e998",
"name": "Inácio Teobaldo Delgado Filho"
},
"unit": {
"id": "a35fbfe4-bb8e-476e-8246-247087171b22",
"name": "Ester Saito Filho",
"abbreviation": "Dr. Joaquim Urias Jr."
},
"image": {
"id": null,
"url": null
},
"epi_type": null,
"description": "Voluptatibus asperiores numquam aliquid exercitationem ratione quia minima distinctio.",
"created_at": null,
"updated_at": null
},
{
"id": "f6d7f46d-e794-3d54-bbbd-87be8a21b469",
"name": "Srta. Taís D'ávila",
"code": "PRD-717531",
"stock": 1841974,
"product_family": {
"id": "a35fbfe4-bfa6-4a5e-85b9-45cf6cb399c3",
"name": "Breno Souza Jr."
},
"product_brand": {
"id": "a35fbfe4-c138-4726-a8f9-be330cd54a5c",
"name": "Dr. Allan Queirós Filho"
},
"unit": {
"id": "a35fbfe4-c2b5-4df1-b8a9-6beb244bc860",
"name": "Srta. Fátima Roberta Lourenço Neto",
"abbreviation": "Sra. Andréa Tamoio"
},
"image": {
"id": null,
"url": null
},
"epi_type": null,
"description": "Maxime qui distinctio et porro et.",
"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 6kb8Vd4ZvfE6aPaDeh5g13c" \
--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 6kb8Vd4ZvfE6aPaDeh5g13c",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "1640eef2-2eda-33fb-8716-762403389937",
"name": "Dr. Andressa da Rosa",
"code": "PRD-439332",
"stock": 98847,
"product_family": {
"id": "a35fbfe4-cbb9-468f-bbeb-65eb49ae9c05",
"name": "Vanessa Cynthia Pereira Neto"
},
"product_brand": {
"id": "a35fbfe4-cd6b-4aed-809e-686926b14910",
"name": "Sr. Everton Galhardo Alves Neto"
},
"unit": {
"id": "a35fbfe4-cf4f-4809-8913-9133ab3a9e34",
"name": "Sra. Luna Sales Queirós",
"abbreviation": "Emília Souza Esteves"
},
"image": {
"id": null,
"url": null
},
"epi_type": null,
"description": "Consequatur aspernatur enim quis ut recusandae.",
"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/nulla/available-origins" \
--header "Authorization: Bearer V461ZD6Eheab5cv3Pfa8dgk" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/nulla/available-origins"
);
const headers = {
"Authorization": "Bearer V461ZD6Eheab5cv3Pfa8dgk",
"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 a6acZkd6DE5feVvP4b81hg3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"product_family_id\": \"1aed485b-e76b-3e67-bd18-5d67df8a4eec\",
\"product_brand_id\": \"7bd7204d-3e6a-3e44-973c-8f5f5463e511\",
\"unit_id\": \"10a27ed3-1534-3af6-b6a0-3417360c4605\",
\"description\": \"Example Description\",
\"stock\": 1
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products"
);
const headers = {
"Authorization": "Bearer a6acZkd6DE5feVvP4b81hg3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"product_family_id": "1aed485b-e76b-3e67-bd18-5d67df8a4eec",
"product_brand_id": "7bd7204d-3e6a-3e44-973c-8f5f5463e511",
"unit_id": "10a27ed3-1534-3af6-b6a0-3417360c4605",
"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 P6v6Z3hadafb8ck1e5D4VgE" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"product_family_id\": \"b2e56d24-93b6-3eb3-a30e-f8ecdb445398\",
\"product_brand_id\": \"db39ecf8-0b88-3bb7-807f-84d68011f136\",
\"unit_id\": \"1b194380-c386-3ce8-b083-37931d85ce71\",
\"stock\": 1,
\"description\": \"Example Description\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/1"
);
const headers = {
"Authorization": "Bearer P6v6Z3hadafb8ck1e5D4VgE",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"product_family_id": "b2e56d24-93b6-3eb3-a30e-f8ecdb445398",
"product_brand_id": "db39ecf8-0b88-3bb7-807f-84d68011f136",
"unit_id": "1b194380-c386-3ce8-b083-37931d85ce71",
"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/quaerat" \
--header "Authorization: Bearer gbP16chd86avfD4k3V5EZea" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/quaerat"
);
const headers = {
"Authorization": "Bearer gbP16chd86avfD4k3V5EZea",
"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/53a34681-889b-35a4-83ef-d51af47e031f/versions" \
--header "Authorization: Bearer kc4h6vEfaeaDV8b513g6ZdP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"notes\": \"Example Notes\",
\"responsible_user_id\": \"38bca2a1-1a1f-3f5b-ab1c-a69161d08f52\",
\"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/53a34681-889b-35a4-83ef-d51af47e031f/versions"
);
const headers = {
"Authorization": "Bearer kc4h6vEfaeaDV8b513g6ZdP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"notes": "Example Notes",
"responsible_user_id": "38bca2a1-1a1f-3f5b-ab1c-a69161d08f52",
"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/be3baf49-cfb0-3d7d-b3b1-323e51b77ae9/versions" \
--header "Authorization: Bearer 6dghE46c1ak8vPe5Zfb3VaD" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/be3baf49-cfb0-3d7d-b3b1-323e51b77ae9/versions"
);
const headers = {
"Authorization": "Bearer 6dghE46c1ak8vPe5Zfb3VaD",
"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/ee273911-3c9e-3608-8c4c-83c56a891897" \
--header "Authorization: Bearer 5fEV6k8ah6ZgPeb3a4vc1Dd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/ee273911-3c9e-3608-8c4c-83c56a891897"
);
const headers = {
"Authorization": "Bearer 5fEV6k8ah6ZgPeb3a4vc1Dd",
"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/2accb4e7-8ab0-3979-a007-9d0b41495c9f/download" \
--header "Authorization: Bearer fdZ5vVaD4heEkb1a683P6gc" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/2accb4e7-8ab0-3979-a007-9d0b41495c9f/download"
);
const headers = {
"Authorization": "Bearer fdZ5vVaD4heEkb1a683P6gc",
"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/e781308c-44c3-3b4f-bd6e-d091bb58f226/restore" \
--header "Authorization: Bearer Zv3kf86Ebgc4DehdP65a1Va" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/e781308c-44c3-3b4f-bd6e-d091bb58f226/restore"
);
const headers = {
"Authorization": "Bearer Zv3kf86Ebgc4DehdP65a1Va",
"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/aaac59a9-6729-3462-9401-6ff1f0655cba" \
--header "Authorization: Bearer 1bce8a5P46ZgVdfEkh6va3D" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/aaac59a9-6729-3462-9401-6ff1f0655cba"
);
const headers = {
"Authorization": "Bearer 1bce8a5P46ZgVdfEkh6va3D",
"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=32506ead-4f70-3fc7-a23f-871525d90bf3&work_id=7b754cb2-1a92-3c4c-bee3-410b4b5556de&status_id=c159aa4c-b5eb-382f-9c14-99ad09df53be&responsible_id=a079e7e2-a620-3084-a80e-97fa6b64ccc2" \
--header "Authorization: Bearer V3b5c1kD8agZvhPdE4f6ae6" \
--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": "32506ead-4f70-3fc7-a23f-871525d90bf3",
"work_id": "7b754cb2-1a92-3c4c-bee3-410b4b5556de",
"status_id": "c159aa4c-b5eb-382f-9c14-99ad09df53be",
"responsible_id": "a079e7e2-a620-3084-a80e-97fa6b64ccc2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer V3b5c1kD8agZvhPdE4f6ae6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "bcb477c2-cecc-3e9a-8098-29335ff356d9",
"name": "Qui assumenda nihil",
"description": "Expedita aliquid voluptatem id reiciendis.",
"current_version": 1,
"file": {
"path": "projects/63a70180-ca88-3f7a-b58b-2738c501a776.pdf",
"size": "3209968",
"extension": "pdf"
},
"discipline": {
"id": "a35fbfe9-8a1f-43b9-ac0c-907d8c3c7ea7",
"name": "Magnam",
"code": "RZJ"
},
"created_at": null,
"updated_at": null
},
{
"id": "9f21309a-47ec-3b1b-b6b4-7fe1c8406249",
"name": "Dolor corporis suscipit",
"description": "Et voluptates nulla maxime.",
"current_version": 1,
"file": {
"path": "projects/d2c5159e-df79-3886-a623-e3ff8a6a1dc7.pdf",
"size": "2206257",
"extension": "pdf"
},
"discipline": {
"id": "a35fbfe9-8dc6-4e34-bd78-925f2cde9f13",
"name": "Occaecati",
"code": "DPL"
},
"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/4" \
--header "Authorization: Bearer PdEV6cgfa1Z54av86bke3Dh" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/4"
);
const headers = {
"Authorization": "Bearer PdEV6cgfa1Z54av86bke3Dh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "0e1d214c-897b-39ae-8971-7ff22e7c985f",
"name": "Fuga omnis ipsum",
"description": "Reiciendis expedita libero saepe qui ea non.",
"current_version": 1,
"file": {
"path": "projects/8817dd73-7988-350c-8763-899c13d322fa.pdf",
"size": "615579",
"extension": "pdf"
},
"discipline": {
"id": "a35fbfe9-956a-4279-a67c-bbbb4ed6d1f9",
"name": "Et",
"code": "HZG"
},
"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 E6v4g1hf3eacVb56kDPaZ8d" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"discipline_id\": \"a0b71ec8-4225-3a80-a703-af05c93fc7e9\",
\"work_id\": \"ea300445-4c00-311c-8ea5-b7015a73a9a0\",
\"responsible_user_id\": \"50da6051-9b6a-372e-bd87-d21fef2f42da\",
\"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 E6v4g1hf3eacVb56kDPaZ8d",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"discipline_id": "a0b71ec8-4225-3a80-a703-af05c93fc7e9",
"work_id": "ea300445-4c00-311c-8ea5-b7015a73a9a0",
"responsible_user_id": "50da6051-9b6a-372e-bd87-d21fef2f42da",
"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/14" \
--header "Authorization: Bearer 665acV3kgPah4E8DvbZ1dfe" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"discipline_id\": \"3f7892cf-9405-3f8d-a674-761eacda8994\",
\"work_id\": \"60e4636e-da8f-3f91-9da4-bb84b08809b5\",
\"responsible_user_id\": \"bd95fcdd-eb79-386b-8725-23c35aaa01a1\",
\"status_id\": \"4563aa83-9fdd-3239-8420-6acdac7f1188\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/14"
);
const headers = {
"Authorization": "Bearer 665acV3kgPah4E8DvbZ1dfe",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"discipline_id": "3f7892cf-9405-3f8d-a674-761eacda8994",
"work_id": "60e4636e-da8f-3f91-9da4-bb84b08809b5",
"responsible_user_id": "bd95fcdd-eb79-386b-8725-23c35aaa01a1",
"status_id": "4563aa83-9fdd-3239-8420-6acdac7f1188"
};
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/fugiat" \
--header "Authorization: Bearer 61hc4gkVaeP38fb65dZEvaD" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/fugiat"
);
const headers = {
"Authorization": "Bearer 61hc4gkVaeP38fb65dZEvaD",
"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 1vgeaD6dcV4fa68Z5EPh3bk" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"daily_log\": \"voluptatum\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/daily-log"
);
const headers = {
"Authorization": "Bearer 1vgeaD6dcV4fa68Z5EPh3bk",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"daily_log": "voluptatum"
};
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 6av65VEkfDa8PcZ3ehbg41d" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"employee\": \"doloribus\",
\"kit_uuid\": \"398c4efd-0719-3271-9c85-4baea77a2517\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/epi-term"
);
const headers = {
"Authorization": "Bearer 6av65VEkfDa8PcZ3ehbg41d",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"employee": "doloribus",
"kit_uuid": "398c4efd-0719-3271-9c85-4baea77a2517"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Generate payroll sheets PDF
requires authentication No specific permission required
Gera o PDF das folhas cuja data de pagamento cai no período, com os itens por pessoa e obra e os subtotais por obra e por forma de pagamento. Folha ainda em rascunho sai marcada como não conferida. A geração é assíncrona: o front é avisado por Pusher quando fica pronto.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/payroll-sheet" \
--header "Authorization: Bearer Dea4kav3f68PZ1cbgd6hVE5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"start\": \"2026-12-03\",
\"end\": \"2053-05-16\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/payroll-sheet"
);
const headers = {
"Authorization": "Bearer Dea4kav3f68PZ1cbgd6hVE5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"start": "2026-12-03",
"end": "2053-05-16"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (202):
{
"message": "PDF da folha sendo gerado. Você será notificado quando estiver pronto.",
"channel": "reports.uuid",
"event": "pdf-report.completed"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Generate day payments Excel
requires authentication payroll pay
Gera a planilha de "Pagamentos do dia": uma linha por item, com favorecido, documento, chave PIX, obra, centro de custo, folha, forma, valor (diária mais acréscimos) e situação. Sem date, usa o dia de hoje. A geração é assíncrona: o front é avisado por Pusher quando fica pronta.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/payroll-day/excel" \
--header "Authorization: Bearer P84c1afEkD6b5V6vhged3Za" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date\": \"2026-12-03\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/payroll-day/excel"
);
const headers = {
"Authorization": "Bearer P84c1afEkD6b5V6vhged3Za",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date": "2026-12-03"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (202):
{
"message": "Planilha sendo gerada. Você será notificado quando estiver pronta.",
"channel": "reports.uuid",
"event": "excel-report.completed"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Generate employee sheet PDF
requires authentication No specific permission required
Dispatches async PDF generation of the employee record. Frontend receives notification via Pusher when ready.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/employee-sheet" \
--header "Authorization: Bearer 4Eg5v1hfdb6cZP6kaDea3V8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"employee\": \"est\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/employee-sheet"
);
const headers = {
"Authorization": "Bearer 4Eg5v1hfdb6cZP6kaDea3V8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"employee": "est"
};
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[]=3378bb40-1f2a-3c19-b18f-b4058d813397&cost_centers[]=361c5823-a911-3baa-9782-b4d1dba0981e&format=xlsx" \
--header "Authorization: Bearer h3Pda1b68kZveE4fg6DaV5c" \
--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]": "3378bb40-1f2a-3c19-b18f-b4058d813397",
"cost_centers[0]": "361c5823-a911-3baa-9782-b4d1dba0981e",
"format": "xlsx",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer h3Pda1b68kZveE4fg6DaV5c",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cost center entries
requires authentication cost-center report
Lançamentos que formam um total do painel, paginados e em ordem de data. O centro informado inclui a subárvore, então clicar no total de um grupo lista o que veio dos filhos também.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/cost-center/entries?search=dolor&sort_by=amount&sort_desc=&per_page=17" \
--header "Authorization: Bearer 6afPb4k13DEhZ5Vg8cvead6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_start\": \"2026-12-03\",
\"date_end\": \"2045-04-03\",
\"block\": \"disbursement\",
\"cost_center_id\": \"07e36447-1925-3568-aaa8-7ec9e313a8d3\",
\"without_cost_center\": true,
\"type\": \"other\",
\"per_page\": 2,
\"search\": \"yfftqbyvpzkopohwh\",
\"sort_by\": \"date\",
\"sort_desc\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/cost-center/entries"
);
const params = {
"search": "dolor",
"sort_by": "amount",
"sort_desc": "0",
"per_page": "17",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 6afPb4k13DEhZ5Vg8cvead6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date_start": "2026-12-03",
"date_end": "2045-04-03",
"block": "disbursement",
"cost_center_id": "07e36447-1925-3568-aaa8-7ec9e313a8d3",
"without_cost_center": true,
"type": "other",
"per_page": 2,
"search": "yfftqbyvpzkopohwh",
"sort_by": "date",
"sort_desc": 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.
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[]=03a900d1-1021-3e2e-88e6-2381af9aa0ec&cost_centers[]=eb91584e-e10c-363d-83bb-3c713616aa61&format=xlsx" \
--header "Authorization: Bearer vbkZ6E65ad41DPaVh3gcfe8" \
--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]": "03a900d1-1021-3e2e-88e6-2381af9aa0ec",
"cost_centers[0]": "eb91584e-e10c-363d-83bb-3c713616aa61",
"format": "xlsx",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer vbkZ6E65ad41DPaVh3gcfe8",
"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=vero&type=entrada&description=Et+aperiam+saepe+tempore+neque+est+ipsa+adipisci.&categories[]=b9612c41-ec20-3d34-9700-5caa9a5589e0&exclude_categories[]=3ff1086c-1aa8-3dc8-85a9-ce8df8b9426f&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=8d1ff9d8-3c0f-36eb-b5a2-fb0aea53b550&customers[]=1196573f-fcc9-374a-b073-d971e9a4aa9d&suppliers[]=3e5a4cee-9fb8-3bd6-9623-1ef25c334cb1&cash_session=7bcbf8d3-55bc-3766-853e-1cf9e9b681b4&works[]=4a41cadb-071b-3233-80b1-c60b791bb91e" \
--header "Authorization: Bearer g6EeP14fbavkVah563DZc8d" \
--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": "vero",
"type": "entrada",
"description": "Et aperiam saepe tempore neque est ipsa adipisci.",
"categories[0]": "b9612c41-ec20-3d34-9700-5caa9a5589e0",
"exclude_categories[0]": "3ff1086c-1aa8-3dc8-85a9-ce8df8b9426f",
"date_start": "2026-01-01",
"date_end": "2026-12-31",
"bank_accounts[0]": "8d1ff9d8-3c0f-36eb-b5a2-fb0aea53b550",
"customers[0]": "1196573f-fcc9-374a-b073-d971e9a4aa9d",
"suppliers[0]": "3e5a4cee-9fb8-3bd6-9623-1ef25c334cb1",
"cash_session": "7bcbf8d3-55bc-3766-853e-1cf9e9b681b4",
"works[0]": "4a41cadb-071b-3233-80b1-c60b791bb91e",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer g6EeP14fbavkVah563DZc8d",
"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=incidunt&type=entrada&description=Optio+voluptas+voluptatibus+quod+eaque+et+a.&categories[]=fb1e53f1-bcf2-3168-acd6-8151aa972529&exclude_categories[]=e107e7c5-44f4-3e08-8567-0c97dc371626&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=5b9afe64-937c-3d11-809a-e6e23109c580&customers[]=7604e903-9ac5-3918-bf8b-3e6fdbdcf719&suppliers[]=5ae4bc54-2690-34b4-9a68-5407d4aa0762&cash_session=28a27b02-e1e1-3ede-b7ad-81d8efe03ce4&works[]=2402d43e-09cd-31be-a744-ee3d6c662e47" \
--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": "incidunt",
"type": "entrada",
"description": "Optio voluptas voluptatibus quod eaque et a.",
"categories[0]": "fb1e53f1-bcf2-3168-acd6-8151aa972529",
"exclude_categories[0]": "e107e7c5-44f4-3e08-8567-0c97dc371626",
"date_start": "2026-01-01",
"date_end": "2026-12-31",
"bank_accounts[0]": "5b9afe64-937c-3d11-809a-e6e23109c580",
"customers[0]": "7604e903-9ac5-3918-bf8b-3e6fdbdcf719",
"suppliers[0]": "5ae4bc54-2690-34b4-9a68-5407d4aa0762",
"cash_session": "28a27b02-e1e1-3ede-b7ad-81d8efe03ce4",
"works[0]": "2402d43e-09cd-31be-a744-ee3d6c662e47",
};
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 f861gP5Va36bvacEkeDZdh4" \
--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 f861gP5Va36bvacEkeDZdh4",
"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 D6PE15hkbe8f63VZg4acavd" \
--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 D6PE15hkbe8f63VZg4acavd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "add4d33a-43bc-322b-920a-d1fe528d243c",
"name": "earum neque",
"slug": null,
"description": null,
"abbreviation": null,
"created_at": null,
"updated_at": null
},
{
"id": "d5c8a769-80b8-3d0f-8cbf-87e8a32e76f6",
"name": "quis ratione",
"slug": null,
"description": null,
"abbreviation": null,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create sector
requires authentication sector store
Create a new sector
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/sectors" \
--header "Authorization: Bearer Efg34D1a5devkZh6V8cP6ab" \
--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 Efg34D1a5devkZh6V8cP6ab",
"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/1" \
--header "Authorization: Bearer 1ea865k6bPDh3gavE4fdcVZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/1"
);
const headers = {
"Authorization": "Bearer 1ea865k6bPDh3gavE4fdcVZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "aee98318-1aa9-3d37-97d4-8490210c5bc0",
"name": "eius maxime",
"slug": null,
"description": "Eum veritatis non debitis porro voluptatem voluptates non. Voluptatem velit doloremque debitis neque dolorem. Et alias commodi adipisci. Quibusdam earum rerum facere nam.",
"abbreviation": "eif",
"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/9" \
--header "Authorization: Bearer cvh6f54ag36dDE81PVkbZea" \
--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/9"
);
const headers = {
"Authorization": "Bearer cvh6f54ag36dDE81PVkbZea",
"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/8" \
--header "Authorization: Bearer a65cvbdhf3ae4VP1gE6DkZ8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/8"
);
const headers = {
"Authorization": "Bearer a65cvbdhf3ae4VP1gE6DkZ8",
"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 dfDvh164eP3V8ga6EaZ5bkc" \
--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 dfDvh164eP3V8ga6EaZ5bkc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "d13acef2-58e7-3217-ab26-ede3d4094384",
"name": "Dr. Nasir Becker PhD",
"username": "kamron.brakus",
"email": "titus37@example.org",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "1f421b46-f48e-3f99-b93c-0ab38924dcba",
"name": "Kristopher Weber",
"username": "howell.hudson",
"email": "ed12@example.org",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Attach 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 kEg8a3a6fc64ebZvdhVDP15" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"67da7410-0bb5-34fe-8aea-9e69887ab7cb\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/attach"
);
const headers = {
"Authorization": "Bearer kEg8a3a6fc64ebZvdhVDP15",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"67da7410-0bb5-34fe-8aea-9e69887ab7cb"
]
};
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 akf564PVDcega6dbEv8h31Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"da365a4f-c017-3406-a1f3-91d4c01cce32\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/detach"
);
const headers = {
"Authorization": "Bearer akf564PVDcega6dbEv8h31Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"da365a4f-c017-3406-a1f3-91d4c01cce32"
]
};
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 hkED8PfbZda365ve6gVca41" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"02292e72-5b2f-32be-8fd3-95bd1766b34c\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/sync"
);
const headers = {
"Authorization": "Bearer hkED8PfbZda365ve6gVca41",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"02292e72-5b2f-32be-8fd3-95bd1766b34c"
]
};
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 3V68hvdkD65aZeE4gPabfc1" \
--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 3V68hvdkD65aZeE4gPabfc1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"name": "vel iure",
"slug": "veritatis-quos-voluptas-nesciunt-eius-autem"
},
{
"name": "ut laboriosam",
"slug": "assumenda-quo-earum-quidem-et-consequuntur"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 hdvV4Pabca658E63Z1fDgke" \
--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 hdvV4Pabca658E63Z1fDgke",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "eb9eaf07-be91-3688-8bd2-7503a9326ceb",
"slug": null,
"name": null,
"description": "Mateus Mendonça Roque Neto",
"abbreviation": "asperiores",
"color": "#67191b",
"text_color": "#7dee5e",
"module": {
"name": "Obras",
"slug": "work"
},
"created_at": null,
"updated_at": null
},
{
"id": "b7b0e9b4-a7fe-33aa-8c1c-b433524a2925",
"slug": null,
"name": null,
"description": "Sr. Vicente Bonilha Delvalle",
"abbreviation": "laboriosam",
"color": "#2913e7",
"text_color": "#e20a47",
"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 fZ6aVvEgeak4P8b5dc61Dh3" \
--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\": \"4a6c9fc6-6898-360a-a356-a8829d9fb513\",
\"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 fZ6aVvEgeak4P8b5dc61Dh3",
"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": "4a6c9fc6-6898-360a-a356-a8829d9fb513",
"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 6P3v56ebaEf4aDZkdhcg1V8" \
--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 6P3v56ebaEf4aDZkdhcg1V8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "b16cb9d9-1d1a-3ccb-8eed-6f5968d29ea1",
"slug": null,
"name": null,
"description": "Dr. Bianca Benez Ferraz",
"abbreviation": "sint",
"color": "#1f740a",
"text_color": "#cdafb9",
"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 b1Eaeh86vVD5Z4acPfkd36g" \
--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\": \"72925a5a-eca4-34fb-9b23-b0edc270b1e3\",
\"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 b1Eaeh86vVD5Z4acPfkd36g",
"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": "72925a5a-eca4-34fb-9b23-b0edc270b1e3",
"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 Z4ebafd6Ek18vPhg36Da5cV" \
--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 Z4ebafd6Ek18vPhg36Da5cV",
"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 hfE1k36cave8645ZVaPgDbd" \
--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 hfE1k36cave8645ZVaPgDbd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "3c228a78-fc6b-3f19-8902-d34328223190",
"quantity": 543.5498,
"min_quantity": null,
"max_quantity": null,
"below_minimum": false,
"above_maximum": false,
"created_at": null,
"updated_at": null
},
{
"id": "2015cdb4-9fd1-3e45-b5d0-2c5204a78a67",
"quantity": 963.1636,
"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 DVaeP6fb16chZg8vE3dk45a" \
--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 DVaeP6fb16chZg8vE3dk45a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "433f0de1-63a9-3064-9684-ac1f1e1df7b1",
"name": "Estoque Jimenes e Zambrano",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
},
{
"id": "615fd880-1553-3c9f-a1b4-61995b3824da",
"name": "Estoque Paz e Galvão",
"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 hecd541a6a6vPg8ZDkVb3Ef" \
--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 hecd541a6a6vPg8ZDkVb3Ef",
"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": "f90eede2-e3a8-3940-a1f5-e629f584a95c",
"name": "Estoque Valência e Bezerra",
"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 6Edha816Vv3fZebac4k5gDP" \
--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 6Edha816Vv3fZebac4k5gDP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "b119ef1c-3e68-3dc2-9d1b-e4e0db2ff460",
"name": "Estoque Toledo e das Dores e Associados",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show stock
requires authentication stock show
Returns details of a specific stock
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/stocks/1" \
--header "Authorization: Bearer evh64aDgE3Z86kPdbVf5ac1" \
--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 evh64aDgE3Z86kPdbVf5ac1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "fb94b83f-c20b-3383-9767-1e37ce824174",
"name": "Estoque Tamoio e Verdara",
"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 16ce4ghVEfDZabPa85vk6d3" \
--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 16ce4ghVEfDZabPa85vk6d3",
"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": "51f2e853-383b-3079-b04a-f85265b164cc",
"name": "Estoque Alcantara e D'ávila",
"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 1cZ643bkaV5efP8gDhEdva6" \
--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 1cZ643bkaV5efP8gDhEdva6",
"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 vfkeg451ba6aDV8dcE3P6Zh" \
--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 vfkeg451ba6aDV8dcE3P6Zh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "e884e25c-53f5-3029-991c-f854f23e40e1",
"quantity": 417.4695,
"min_quantity": null,
"max_quantity": null,
"below_minimum": false,
"above_maximum": false,
"created_at": null,
"updated_at": null
},
{
"id": "15df6dff-a185-3e30-95e1-81e043dcf996",
"quantity": 684.5746,
"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/omnis" \
--header "Authorization: Bearer v8ba5f6hg4eDEVcZ3d6k1Pa" \
--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/omnis"
);
const headers = {
"Authorization": "Bearer v8ba5f6hg4eDEVcZ3d6k1Pa",
"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": "1ce151ab-e24c-30de-bcde-d8d5198a0447",
"quantity": 985.8654,
"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 ZbPak61DfEg3d58h64vVeca" \
--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 ZbPak61DfEg3d58h64vVeca",
"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 PZhE1c6VdD53abv4ak8ge6f" \
--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 PZhE1c6VdD53abv4ak8ge6f",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "6568b789-3a44-3060-a132-6ae681820c25",
"code": "MOV-419404",
"type": "produção",
"type_name": "PRODUCTION",
"is_entry": true,
"is_exit": false,
"quantity": 66.7193,
"previous_quantity": 82.6936,
"new_quantity": 149.4129,
"reason": null,
"movement_date": "2026-12-02T14:06:21.000000Z",
"created_at": null
},
{
"id": "e1d8099b-5a25-33e9-976d-4b3b6d3af8fc",
"code": "MOV-728635",
"type": "ajuste saída",
"type_name": "ADJUSTMENT_OUT",
"is_entry": false,
"is_exit": true,
"quantity": 18.5288,
"previous_quantity": 242.9884,
"new_quantity": 224.4596,
"reason": "Maxime ullam natus ut consequuntur culpa doloremque dicta.",
"movement_date": "2026-11-11T18:15:15.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 1Zc5fkh6b8v3daEPgV6ea4D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"91017f8c-9cce-339b-b432-d4fba04c634b\",
\"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 1Zc5fkh6b8v3daEPgV6ea4D",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "91017f8c-9cce-339b-b432-d4fba04c634b",
"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": "0e771d84-bcba-3ae4-b538-84bb18f5cca0",
"code": "MOV-496982",
"type": "venda",
"type_name": "SALE",
"is_entry": false,
"is_exit": true,
"quantity": 43.4464,
"previous_quantity": 57.1072,
"new_quantity": 13.6608,
"reason": null,
"movement_date": "2026-11-27T06:26:59.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 Dv483hEbca5dg6aVk6ZPf1e" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"dd7ac914-2f3c-39d8-960e-784614d871ef\",
\"destination_stock_id\": \"609c9764-fdb8-3370-ab8a-42a85d7ee87b\",
\"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 Dv483hEbca5dg6aVk6ZPf1e",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "dd7ac914-2f3c-39d8-960e-784614d871ef",
"destination_stock_id": "609c9764-fdb8-3370-ab8a-42a85d7ee87b",
"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": "78e61522-eb36-3a31-b562-31cf58c90df3",
"code": "MOV-307550",
"type": "devolução",
"type_name": "RETURN",
"is_entry": true,
"is_exit": false,
"quantity": 63.8459,
"previous_quantity": 438.8741,
"new_quantity": 502.72,
"reason": null,
"movement_date": "2026-11-28T09:40:18.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 h1ak4VZ3de6P6afvDg58cbE" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"f4cab64c-1d7c-3e40-8ad5-fd3012ea7ffb\",
\"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 h1ak4VZ3de6P6afvDg58cbE",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "f4cab64c-1d7c-3e40-8ad5-fd3012ea7ffb",
"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": "38bf7c03-cbb6-37da-a520-d663a0eb7578",
"code": "MOV-011843",
"type": "produção",
"type_name": "PRODUCTION",
"is_entry": true,
"is_exit": false,
"quantity": 14.6073,
"previous_quantity": 38.3443,
"new_quantity": 52.9516,
"reason": null,
"movement_date": "2026-11-30T01:07:09.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 hPdkceg4Vab5361DEZaf8v6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"359d9275-c764-3831-97fe-cf8dec056c33\",
\"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 hPdkceg4Vab5361DEZaf8v6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "359d9275-c764-3831-97fe-cf8dec056c33",
"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": "8210916c-1e24-3705-82ca-44d37c14722a",
"code": "MOV-904479",
"type": "saída transferência",
"type_name": "TRANSFER_OUT",
"is_entry": false,
"is_exit": true,
"quantity": 62.0717,
"previous_quantity": 312.9953,
"new_quantity": 250.9236,
"reason": "Laboriosam quibusdam ut in omnis quae earum nesciunt.",
"movement_date": "2026-11-28T22:42:07.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 6eba3g5kcdZDV48Pa61fhvE" \
--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 6eba3g5kcdZDV48Pa61fhvE",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "c16dfd52-9a84-3688-9d22-41a80efba36d",
"code": "MOV-531518",
"type": "ajuste saída",
"type_name": "ADJUSTMENT_OUT",
"is_entry": false,
"is_exit": true,
"quantity": 16.4296,
"previous_quantity": 490.3852,
"new_quantity": 473.9556,
"reason": "Sint voluptate reiciendis provident doloribus est incidunt.",
"movement_date": "2026-12-02T15:44: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.
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 VE68fhD5g1Zbak3av4Pedc6" \
--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 VE68fhD5g1Zbak3av4Pedc6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "689e741d-403e-3765-b9af-31ad04f169d0",
"name": "Alonso Vale",
"email": "lucas76@example.com",
"phone": "(55) 90317-0891",
"document": "74.516.742/0001-00",
"type": "pf",
"responsible": "Vitória das Neves",
"image": {
"id": null,
"url": null
},
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
}
},
{
"id": "fdc417f6-099e-34ca-81f3-7dcc5392cf9a",
"name": "Camilo Henrique Flores Sobrinho",
"email": "soares.saulo@example.com",
"phone": "(62) 95105-5490",
"document": "74.296.944/0001-94",
"type": "pj",
"responsible": "Sr. Leo Hernani Quintana Filho",
"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 Pcf4vakEa58Vgh6e3bd6Z1D" \
--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 Pcf4vakEa58Vgh6e3bd6Z1D",
"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 e1Z6a65dEg3Pcfbkhva48DV" \
--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 e1Z6a65dEg3Pcfbkhva48DV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d763fe8a-3e72-39b9-b20e-e7851d73351b",
"name": "Jennifer Bonilha",
"email": "carmona.cauan@example.com",
"phone": "(38) 4888-2069",
"document": "35.808.612/0001-90",
"type": "pj",
"responsible": "Mário Rodolfo Teles",
"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 EevV35k86ha6Zf4gcab1PDd" \
--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 EevV35k86ha6Zf4gcab1PDd",
"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 3vakgVhE45fc6eD6b18PadZ" \
--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 3vakgVhE45fc6eD6b18PadZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List supplier bank accounts
requires authentication suppliers show
Contas e chaves PIX do fornecedor, com a favorita primeiro.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/suppliers/1/bank-account" \
--header "Authorization: Bearer vEaf5bd4k6e8a3PcgDZ1h6V" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/suppliers/1/bank-account"
);
const headers = {
"Authorization": "Bearer vEaf5bd4k6e8a3PcgDZ1h6V",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "a35fbfec-067f-4eb5-82b3-3449fa0f3110",
"bank": null,
"agency": null,
"account": null,
"account_type": null,
"pix_key": "verdie.hilpert@dietrich.com",
"favorite": false
},
{
"id": "a35fbfec-09a6-4d83-88e2-ff55b26bdb4d",
"bank": null,
"agency": null,
"account": null,
"account_type": null,
"pix_key": "antonette06@ward.info",
"favorite": false
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Add supplier bank account
requires authentication suppliers update
Agência e conta são opcionais: o prestador costuma ter só a chave PIX. Marcar como favorita desmarca as outras.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/suppliers/1/bank-account" \
--header "Authorization: Bearer Ea415Zkg86dhfVv3e6aDPbc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_id\": \"c7eee290-8047-3448-b95e-58d2d8499c39\",
\"agency\": \"tje\",
\"account\": \"ript\",
\"account_type\": \"tvod\",
\"pix_key\": \"qrybdq\",
\"favorite\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/suppliers/1/bank-account"
);
const headers = {
"Authorization": "Bearer Ea415Zkg86dhfVv3e6aDPbc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_id": "c7eee290-8047-3448-b95e-58d2d8499c39",
"agency": "tje",
"account": "ript",
"account_type": "tvod",
"pix_key": "qrybdq",
"favorite": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "a35fbfec-1129-4740-91ec-27c781dcdf75",
"bank": null,
"agency": null,
"account": null,
"account_type": null,
"pix_key": "uboyer@daugherty.com",
"favorite": false
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update supplier bank account
requires authentication suppliers update
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/suppliers/1/bank-account/est" \
--header "Authorization: Bearer ZD4PE6a3gbkachVd85f6e1v" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_id\": \"05255b54-8b1c-32b2-954c-003523cbb843\",
\"agency\": \"tiirebhihhyk\",
\"account\": \"yminbsugdoofomlzwgl\",
\"account_type\": \"fcqmgncrhoxugzky\",
\"pix_key\": \"qxvumpdkuxnrmt\",
\"favorite\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/suppliers/1/bank-account/est"
);
const headers = {
"Authorization": "Bearer ZD4PE6a3gbkachVd85f6e1v",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_id": "05255b54-8b1c-32b2-954c-003523cbb843",
"agency": "tiirebhihhyk",
"account": "yminbsugdoofomlzwgl",
"account_type": "fcqmgncrhoxugzky",
"pix_key": "qxvumpdkuxnrmt",
"favorite": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a35fbfec-1998-497f-80f8-252c09c8eea6",
"bank": null,
"agency": null,
"account": null,
"account_type": null,
"pix_key": "miguel96@hotmail.com",
"favorite": false
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete supplier bank account
requires authentication suppliers update
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/suppliers/delectus/bank-account/exercitationem" \
--header "Authorization: Bearer EbgcZPaV5avk3481eDf66hd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/suppliers/delectus/bank-account/exercitationem"
);
const headers = {
"Authorization": "Bearer EbgcZPaV5avk3481eDf66hd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Conta removida com sucesso."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
System Types
Endpoints for system types
System Types
requires authentication No specific permission required
Get the system types
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/system-types" \
--header "Authorization: Bearer EkdfVe8c1aDZhg5v6Pab364" \
--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 EkdfVe8c1aDZhg5v6Pab364",
"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 EDb3ef1cavg5dZa6k486hPV" \
--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 EDb3ef1cavg5dZa6k486hPV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "189f86dc-b4f2-3b1c-8b18-9692a548b183",
"name": "Wesley Davi Serra Neto",
"description": "Ullam nostrum corrupti consequatur animi dolor iure nostrum. Similique libero non ut error. Qui quasi ex nemo fugit. Quis aut aliquid non facere et sapiente officiis. Et ea reprehenderit hic quidem.",
"type": "entrada"
},
{
"id": "de366cbc-afb0-3a01-ae6c-0d3c9e57d0b2",
"name": "Sr. Gean Rodrigues",
"description": "Consequatur maxime magnam id rem eligendi et. In culpa in cumque omnis ea dicta fugit. Unde facilis occaecati autem sed.",
"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/blanditiis" \
--header "Authorization: Bearer eh8a64c3kE16PZ5VDbavfgd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/transaction-categories/blanditiis"
);
const headers = {
"Authorization": "Bearer eh8a64c3kE16PZ5VDbavfgd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "7efd0ebd-e866-3692-951d-ad3861704681",
"name": "Dr. Lucas Aranda",
"description": "In praesentium qui doloremque non ut voluptatem eum. Ipsam voluptatem velit sed. Maiores veniam dolorum voluptatum impedit.",
"type": "saque"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Vc5ag8Phk3Z1beDEfda6v64" \
--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 Vc5ag8Phk3Z1beDEfda6v64",
"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/hic" \
--header "Authorization: Bearer a8k5fh3gdVac46vZ6DPbE1e" \
--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/hic"
);
const headers = {
"Authorization": "Bearer a8k5fh3gdVac46vZ6DPbE1e",
"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/tenetur" \
--header "Authorization: Bearer c1had65EaVD6fgv4P8Zkeb3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/transaction-categories/tenetur"
);
const headers = {
"Authorization": "Bearer c1had65EaVD6fgv4P8Zkeb3",
"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 aVP6aD4E61kgd5Zbfc3veh8" \
--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 aVP6aD4E61kgd5Zbfc3veh8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "0bb8a55b-68c5-3530-b153-ad8996f0fbad",
"name": "Beatae est",
"slug": "beatae-est-904479",
"description": "Qui doloribus praesentium esse perspiciatis voluptatem.",
"icon": null,
"color": null,
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
},
{
"id": "aa3cac72-2ce7-3eb9-8376-5209dc70f8ec",
"name": "Debitis qui",
"slug": "debitis-qui-895589",
"description": "Recusandae non vel non ut illo omnis.",
"icon": null,
"color": null,
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cadastrar módulo
requires authentication tutorials store
Cria um módulo no catálogo. O slug é derivado do nome quando não informado.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules" \
--header "Authorization: Bearer DhVPk6ev3acfaZgb1E845d6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"slug\": \"Example Slug\",
\"description\": \"Example Description\",
\"icon\": \"Example Icon\",
\"color\": \"Example Color\",
\"sort_order\": 1,
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules"
);
const headers = {
"Authorization": "Bearer DhVPk6ev3acfaZgb1E845d6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"slug": "Example Slug",
"description": "Example Description",
"icon": "Example Icon",
"color": "Example Color",
"sort_order": 1,
"is_active": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "5bfbec7c-eaee-3d8e-8fce-d6c5661ed601",
"name": "Est suscipit",
"slug": "est-suscipit-897627",
"description": "Magni et non qui debitis repudiandae doloremque.",
"icon": null,
"color": null,
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Visualizar módulo
requires authentication tutorials index
Detalhe de um módulo do catálogo
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer 6vV143hEacD8k6Z5Pagdbef" \
--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 6vV143hEacD8k6Z5Pagdbef",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "5c7098a2-5ba3-316e-9190-edf49568f05d",
"name": "Omnis blanditiis",
"slug": "omnis-blanditiis-471665",
"description": "Recusandae molestiae error reprehenderit sint.",
"icon": null,
"color": null,
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Atualizar módulo
requires authentication tutorials update
Atualiza um módulo do catálogo
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer 3P4fDd56ea1b8EgZhk6Vcva" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"slug\": \"Example Slug\",
\"description\": \"Example Description\",
\"icon\": \"Example Icon\",
\"color\": \"Example Color\",
\"sort_order\": 1,
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer 3P4fDd56ea1b8EgZhk6Vcva",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"slug": "Example Slug",
"description": "Example Description",
"icon": "Example Icon",
"color": "Example Color",
"sort_order": 1,
"is_active": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "20fd10ac-fa66-33a5-a45b-e1ea61b3bae8",
"name": "Molestiae odit",
"slug": "molestiae-odit-986082",
"description": "Ut et excepturi et totam minima maiores.",
"icon": null,
"color": null,
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remover módulo
requires authentication tutorials destroy
Remove o módulo e, junto, os tutoriais que pertenciam a ele
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer kab463DfdPv165EVhgcZea8" \
--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 kab463DfdPv165EVhgcZea8",
"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[]=2a7721fe-438a-3647-9801-d36b15b429ba&status=published" \
--header "Authorization: Bearer dgbeEVPD1ak4536vh8fac6Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "ordem de serviço",
"module_id[0]": "2a7721fe-438a-3647-9801-d36b15b429ba",
"status": "published",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer dgbeEVPD1ak4536vh8fac6Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "214f6ac1-63e9-30d7-92f2-d9818be8f9b9",
"title": "Impedit fuga vero fugit",
"description": "Sint quaerat aut voluptates quia officia in voluptates.",
"cover_url": null,
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a35fbfec-5bb8-4944-b01b-79afe5b33c7e",
"name": "Magni corporis",
"slug": "magni-corporis-294651",
"icon": null,
"color": null
},
"created_at": null,
"updated_at": null
},
{
"id": "bb4ba6d1-9709-343c-afe7-f88fe4b33a7a",
"title": "Quia harum quis repellat",
"description": "Quia voluptatem at odio perferendis deleniti inventore.",
"cover_url": null,
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a35fbfec-5f1c-483a-a401-e4eb08acfda2",
"name": "Illo nesciunt",
"slug": "illo-nesciunt-368315",
"icon": null,
"color": null
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cadastrar tutorial
requires authentication tutorials store
Cria um tutorial. Nasce como rascunho e só aparece na central depois de publicado.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials" \
--header "Authorization: Bearer 1ecbPh6fk4aVZE3D6dgva85" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"module_id\": \"993d1156-40be-392e-af12-1d1d0aa3962f\",
\"title\": \"Example Title\",
\"description\": \"Example Description\",
\"cover_path\": \"Example Cover path\",
\"sort_order\": 1,
\"sectors\": [
\"cdc22d75-7d32-3e22-bf9f-c748b4937913\"
],
\"permissions\": [
\"326733b7-8e7c-3a13-adc6-9d52666df863\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials"
);
const headers = {
"Authorization": "Bearer 1ecbPh6fk4aVZE3D6dgva85",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"module_id": "993d1156-40be-392e-af12-1d1d0aa3962f",
"title": "Example Title",
"description": "Example Description",
"cover_path": "Example Cover path",
"sort_order": 1,
"sectors": [
"cdc22d75-7d32-3e22-bf9f-c748b4937913"
],
"permissions": [
"326733b7-8e7c-3a13-adc6-9d52666df863"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "36b06acf-183c-3f21-bb0e-578504f8a204",
"title": "Temporibus quia asperiores soluta",
"description": "Et ut sed aliquam aspernatur consectetur enim.",
"cover_url": null,
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a35fbfec-6805-40ae-abd8-d75550210b03",
"name": "Laboriosam ad",
"slug": "laboriosam-ad-240588",
"icon": null,
"color": null
},
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Gerar URL de upload
requires authentication tutorials store
Devolve uma URL assinada de curta validade para o cliente enviar o arquivo direto ao S3. O arquivo só é conferido depois, ao criar o item ou salvar a capa.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/upload-url" \
--header "Authorization: Bearer cbV6df35Dv8aPge6aEkh4Z1" \
--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 cbV6df35Dv8aPge6aEkh4Z1",
"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 c6P4agv31dfZaD65EVh8bek" \
--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 c6P4agv31dfZaD65EVh8bek",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "402d13a6-03cc-3f24-9392-db3bce3f2af2",
"title": "Atque aut sequi et",
"description": "Molestias optio neque est omnis doloribus.",
"cover_url": null,
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a35fbfec-7125-4fc5-bbe2-2289fbf9e2bf",
"name": "Et sed",
"slug": "et-sed-173653",
"icon": null,
"color": null
},
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Atualizar tutorial
requires authentication tutorials update
Atualiza o tutorial e os vínculos de setor e permissão
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1" \
--header "Authorization: Bearer EdcagfPa5Zk6Vb6v8h4eD31" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"module_id\": \"73fa728d-d76f-3832-b051-7750b2aa736f\",
\"title\": \"Example Title\",
\"description\": \"Example Description\",
\"cover_path\": \"Example Cover path\",
\"sort_order\": 1,
\"sectors\": [
\"23c00e66-8dee-380f-a50d-9aff253208a7\"
],
\"permissions\": [
\"1e893b21-db52-359c-8d8a-a6426a984f3a\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1"
);
const headers = {
"Authorization": "Bearer EdcagfPa5Zk6Vb6v8h4eD31",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"module_id": "73fa728d-d76f-3832-b051-7750b2aa736f",
"title": "Example Title",
"description": "Example Description",
"cover_path": "Example Cover path",
"sort_order": 1,
"sectors": [
"23c00e66-8dee-380f-a50d-9aff253208a7"
],
"permissions": [
"1e893b21-db52-359c-8d8a-a6426a984f3a"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "3b223394-4d1b-3ce4-9366-f3dace52f2ee",
"title": "Qui rerum voluptas dolorum",
"description": "Cupiditate quam voluptatem voluptates assumenda debitis tempore illum.",
"cover_url": null,
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a35fbfec-7a2d-4f8a-b190-c753a56d5455",
"name": "Eius ea",
"slug": "eius-ea-234614",
"icon": null,
"color": null
},
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remover tutorial
requires authentication tutorials destroy
Remove o tutorial, os itens e os arquivos correspondentes no S3
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1" \
--header "Authorization: Bearer 5a8E1aZbDVfvgk364ePcdh6" \
--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 5a8E1aZbDVfvgk364ePcdh6",
"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 4khZaVbE36gDvde16cfa58P" \
--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 4khZaVbE36gDvde16cfa58P",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "8fee1a12-ef39-3bcb-b081-12526eb892cb",
"title": "Eligendi et officiis odit",
"description": "Aut ea possimus velit.",
"cover_url": null,
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a35fbfec-82c7-45ab-b81c-e66d767474f9",
"name": "A consectetur",
"slug": "a-consectetur-592131",
"icon": null,
"color": null
},
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Despublicar tutorial
requires authentication tutorials update
Devolve o tutorial ao rascunho e limpa a data de publicação
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/019556e7-2e9f-777c-a177-30bbf0646c32/unpublish" \
--header "Authorization: Bearer haZ8f6Ev3bce41dgP5kaV6D" \
--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 haZ8f6Ev3bce41dgP5kaV6D",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "11c9b600-8627-34fe-98f3-dd27ec0813f3",
"title": "Laboriosam omnis voluptatibus velit",
"description": "Et molestias quae eos sint suscipit quia corporis.",
"cover_url": null,
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a35fbfec-8885-4d20-80ed-3949973b2730",
"name": "Eum quia",
"slug": "eum-quia-224299",
"icon": null,
"color": null
},
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Adicionar item ao tutorial
requires authentication tutorials store
Cria o item a partir de um arquivo já enviado ao S3 (pdf ou video) ou de um link do YouTube/Vimeo. O arquivo é conferido aqui: existência, tamanho real e assinatura do conteúdo.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1/items" \
--header "Authorization: Bearer 3DPbdvfV1Zeha84Eg6ca5k6" \
--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 3DPbdvfV1Zeha84Eg6ca5k6",
"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": "63ddb1c3-fde8-3f5e-8480-34cc0e28725d",
"type": "pdf",
"title": "Doloremque qui et",
"mime_type": "application/pdf",
"size_bytes": 2221973,
"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 Ddebhg43k5Pc86vZfaVE6a1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"f28945b7-0122-332c-b659-4a6508c2be73\"
]
}"
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 Ddebhg43k5Pc86vZfaVE6a1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"f28945b7-0122-332c-b659-4a6508c2be73"
]
};
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 6fEkvD3a6bZ8c54hV1edagP" \
--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 6fEkvD3a6bZ8c54hV1edagP",
"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": "899fe841-563b-389c-90c5-2d3e0a7f2c27",
"type": "pdf",
"title": "Accusantium eum illo",
"mime_type": "application/pdf",
"size_bytes": 3074015,
"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 Veb16vcfk4PdDZh86Ea3ga5" \
--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 Veb16vcfk4PdDZh86Ea3ga5",
"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 ZaP6a816k5dcgEbh3DVfev4" \
--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 ZaP6a816k5dcgEbh3DVfev4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "8fa4d95b-ec07-3c46-8e15-000c265a32d5",
"name": "Dr. Aline de Freitas Filho",
"abbreviation": "Danilo Solano",
"description": "Non porro sed dolorum ea qui.",
"created_at": null,
"updated_at": null
},
{
"id": "5226ba29-aff8-35de-b594-1d1671c8fbfe",
"name": "Dr. Tâmara Malu Oliveira",
"abbreviation": "Dr. Thalita Sophie Flores Neto",
"description": "Ipsam magnam et enim alias.",
"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 45cPef638Va6hbvaE1gZDdk" \
--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 45cPef638Va6hbvaE1gZDdk",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "07cb9a2f-e14e-3bd1-a287-46e129b52a95",
"name": "Davi Igor Rivera Filho",
"abbreviation": "Maraisa Branco Neto",
"description": "Voluptas odio nulla quis.",
"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 3kc8E4PaedaZ6Dh5g6V1vbf" \
--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 3kc8E4PaedaZ6Dh5g6V1vbf",
"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 hf63Eg4ad5vV68kaDe1bPZc" \
--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 hf63Eg4ad5vV68kaDe1bPZc",
"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/magnam" \
--header "Authorization: Bearer 3a4akf1VhevbdDEgc56P6Z8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/units/magnam"
);
const headers = {
"Authorization": "Bearer 3a4akf1VhevbdDEgc56P6Z8",
"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 cgaEdva6fDk41b3eVP8Z56h" \
--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 cgaEdva6fDk41b3eVP8Z56h",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "4814fd77-38c3-3ab5-a728-e403f816ccc3",
"name": "Craig Braun",
"username": "clair.jacobson",
"email": "bhackett@example.net",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "3e7f4407-c425-336e-b599-d4f2fff52810",
"name": "Edwin Batz",
"username": "kihn.della",
"email": "xbahringer@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 ec8aa1b35Z64vd6DhfEkVgP" \
--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 ec8aa1b35Z64vd6DhfEkVgP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "dd84fdfa-e393-3339-9476-4d00e1f65fc6",
"name": "Lisette Blanda",
"username": "constance.schowalter",
"email": "dubuque.chelsea@example.com",
"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 h1a4e6DEZ5f3cPdaV6vk8bg" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"eldon.zieme\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"67b25a42-2ca8-34f3-9641-735291b736ad\"
],
\"roles\": [
\"7460be0c-8168-391f-9a93-cab89476a8bc\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users"
);
const headers = {
"Authorization": "Bearer h1a4e6DEZ5f3cPdaV6vk8bg",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "eldon.zieme",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"67b25a42-2ca8-34f3-9641-735291b736ad"
],
"roles": [
"7460be0c-8168-391f-9a93-cab89476a8bc"
]
};
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 ea8g3fvkhd6EVac4ZPb65D1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"dasia38\",
\"password\": \"password123\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"9ff5e3a1-7c31-3319-bb7d-81a68c26fabd\"
],
\"roles\": [
\"c95b9dc7-685b-3fe3-b86f-d0452361caac\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users/1"
);
const headers = {
"Authorization": "Bearer ea8g3fvkhd6EVac4ZPb65D1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "dasia38",
"password": "password123",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"9ff5e3a1-7c31-3319-bb7d-81a68c26fabd"
],
"roles": [
"c95b9dc7-685b-3fe3-b86f-d0452361caac"
]
};
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 36hc4ZevaEaP15DdgfV6kb8" \
--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 36hc4ZevaEaP15DdgfV6kb8",
"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 cgVaf8akbeD54P36EZd1h6v" \
--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 cgVaf8akbeD54P36EZd1h6v",
"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 Dkfag6v6hE8P5bZVd3ea1c4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"7a922132-47db-3eb9-ad99-70ff9e006197\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users/1/permissions"
);
const headers = {
"Authorization": "Bearer Dkfag6v6hE8P5bZVd3ea1c4",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"7a922132-47db-3eb9-ad99-70ff9e006197"
]
};
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 cf66aPE8ZvdebVkDg3ah415" \
--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 cf66aPE8ZvdebVkDg3ah415",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "reiciendis",
"display_name": "In ut officia vel occaecati voluptatem laudantium vel."
},
{
"id": null,
"name": "qui",
"display_name": "Rerum cumque harum impedit earum omnis sunt."
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 ahPce8Z3g14vEVfbD5dk66a" \
--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 ahPce8Z3g14vEVfbD5dk66a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "e26b93e6-6535-35e4-b3bf-2af4518d9b4f",
"description": "Dr. Téo Aguiar Ávila Neto",
"work": {
"id": null,
"name": null
},
"documents": [],
"created_at": null,
"updated_at": null
},
{
"id": "b67ecac1-ab4b-39f7-bad3-ddf7be95f6b9",
"description": "Alonso da Rosa Zambrano",
"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 gkZD5h3bPVeavfEc1866d4a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"description\": \"Example Description\",
\"work_id\": \"cf55097b-07a8-3b7a-ab7d-06f6b48463b1\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/work-locations"
);
const headers = {
"Authorization": "Bearer gkZD5h3bPVeavfEc1866d4a",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"description": "Example Description",
"work_id": "cf55097b-07a8-3b7a-ab7d-06f6b48463b1"
};
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 k8E13V4adefha5cDgb6Z6vP" \
--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 k8E13V4adefha5cDgb6Z6vP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "58365a55-9628-37a6-904f-21e384ae93e7",
"description": "Sra. Alma Bezerra Sobrinho",
"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 ahDV8c646v5d1febkEPgaZ3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"description\": \"Example Description\",
\"work_id\": \"47de6013-374e-3b0a-b023-9567ec1789f5\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/work-locations/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer ahDV8c646v5d1febkEPgaZ3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"description": "Example Description",
"work_id": "47de6013-374e-3b0a-b023-9567ec1789f5"
};
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 DbP8aVe1vgZfa46Eh5dk6c3" \
--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 DbP8aVe1vgZfa46Eh5dk6c3",
"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 EavV48ehb3cdZkPfD6ag516" \
--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 EavV48ehb3cdZkPfD6ag516",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "7fa58bb7-2984-3362-bb74-078ac5e8da3e",
"name": "Flávia Graziela Soares",
"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": "2014-07-08 12:31:31.000000",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"created_at": null,
"updated_at": null
},
{
"id": "889f1a9d-e32a-3ca1-a741-739946152f67",
"name": "Dr. Bernardo Cervantes",
"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": "1990-08-06 03:46:09.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 dEfe6Zkag81D4VcabPv653h" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"customer_id\": \"6e83668a-b7b8-36a1-8041-af435e56c195\",
\"status_id\": \"90662870-99da-3152-ab97-b69e9425f782\",
\"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 dEfe6Zkag81D4VcabPv653h",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"customer_id": "6e83668a-b7b8-36a1-8041-af435e56c195",
"status_id": "90662870-99da-3152-ab97-b69e9425f782",
"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 e1EDPaZb4k5Vhgc3vd6f86a" \
--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 e1EDPaZb4k5Vhgc3vd6f86a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "56137bbc-ed61-32b7-ae3d-ad17bee4ebb3",
"name": "Otávio Medina Sobrinho",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"documents": [],
"locations": [],
"product_quantity_lists_count": 0,
"product_quantity_list_items_count": 0,
"product_requests_count": 0,
"product_request_items_count": 0,
"documents_count": 0,
"locations_documents_count": 0,
"total_documents_count": 0,
"daily_logs_count": 0,
"projects_count": 0,
"started_at": {
"date": "1974-11-22 01:35:55.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 Ed5vbPafhV6a6Z413g8kcDe" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"customer_id\": \"9208d0b7-3ff3-390c-b1f5-f3718bc60ed0\",
\"status_id\": \"1e717b74-8009-3f0b-8512-0a3c5b37878c\",
\"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 Ed5vbPafhV6a6Z413g8kcDe",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"customer_id": "9208d0b7-3ff3-390c-b1f5-f3718bc60ed0",
"status_id": "1e717b74-8009-3f0b-8512-0a3c5b37878c",
"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 6584V36kveaacEfbhPD1dgZ" \
--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 6584V36kveaacEfbhPD1dgZ",
"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 EekZ6Dfva361b5g8acVh4Pd" \
--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 EekZ6Dfva361b5g8acVh4Pd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "d08d763b-fb96-3b1d-b768-8fa00078c85c",
"name": "Antoinette Kessler",
"username": "vohara",
"email": "zieme.tia@example.net",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "154baa63-5e91-348b-8b4e-5c2717d0d788",
"name": "Sabina Franecki",
"username": "parker.harvey",
"email": "gbergnaum@example.org",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Attach responsibles to work
requires authentication work-responsibles attach
Attach users as responsibles to a work without removing existing ones
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach" \
--header "Authorization: Bearer 4316kPhcv8VaZDg6Eebdf5a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"ab4b0107-210c-3b92-9013-f817756886ef\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach"
);
const headers = {
"Authorization": "Bearer 4316kPhcv8VaZDg6Eebdf5a",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"ab4b0107-210c-3b92-9013-f817756886ef"
]
};
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 38badevc1P5EfV6hDa6g4Zk" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"b30f45f5-f086-3e3e-a10d-0be0ae69adf5\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/detach"
);
const headers = {
"Authorization": "Bearer 38badevc1P5EfV6hDa6g4Zk",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"b30f45f5-f086-3e3e-a10d-0be0ae69adf5"
]
};
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 ZPDak5d38hf66cbEa4v1Vge" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"f863f183-2df0-30ee-8885-750deeee658c\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/sync"
);
const headers = {
"Authorization": "Bearer ZPDak5d38hf66cbEa4v1Vge",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"f863f183-2df0-30ee-8885-750deeee658c"
]
};
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.