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 8h6d6vE1egVkc34ZabD5Paf" \
--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 8h6d6vE1egVkc34ZabD5Paf",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "a47865ce-3d9f-3bef-ac57-435f7273474b",
"name": "iusto-6a6d07c39889c",
"display_name": "Quasi eos corrupti voluptas amet beatae saepe.",
"permissions_count": null
},
{
"id": "9f801a28-b9e5-3978-ab2c-3a4d5cd7900f",
"name": "aliquid-6a6d07c39c403",
"display_name": "Sint quos eius nesciunt temporibus consectetur amet voluptatem.",
"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 Ead6kVP5bDae4c3hfg8vZ16" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"display_name\": \"Example Name\",
\"permissions\": [
\"d9871b00-56c1-3781-a4c4-49c1d7199774\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/roles"
);
const headers = {
"Authorization": "Bearer Ead6kVP5bDae4c3hfg8vZ16",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"display_name": "Example Name",
"permissions": [
"d9871b00-56c1-3781-a4c4-49c1d7199774"
]
};
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 6h3agaP6dE58VeZvbcfD1k4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"display_name\": \"Example Name\",
\"permissions\": [
\"bdf3a16f-0e84-3b59-9f08-06959ff251a2\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/roles/1"
);
const headers = {
"Authorization": "Bearer 6h3agaP6dE58VeZvbcfD1k4",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"display_name": "Example Name",
"permissions": [
"bdf3a16f-0e84-3b59-9f08-06959ff251a2"
]
};
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 1eZak6356vgaV4fEDdh8Pbc" \
--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 1eZak6356vgaV4fEDdh8Pbc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "f4af82fc-cf5f-374a-8e6a-6306160cc2c5",
"name": "nisi-6a6d07c3aba86",
"display_name": "Aspernatur velit eos dolores quis nihil.",
"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 64Z3gaefP8kbEv5chd6aVD1" \
--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 64Z3gaefP8kbEv5chd6aVD1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "doloribus",
"display_name": "Minima commodi est voluptas quo voluptate nesciunt laborum."
},
{
"id": null,
"name": "autem",
"display_name": "Quia illum rerum soluta rem dolorem est consectetur porro."
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 1kc36avg6d8fbVE4ePDha5Z" \
--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 1kc36avg6d8fbVE4ePDha5Z",
"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 E43dcb5Vav1eahgZPf6D86k" \
--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 E43dcb5Vav1eahgZPf6D86k",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "et",
"display_name": "Explicabo rerum et natus et impedit nam."
},
{
"id": null,
"name": "illo",
"display_name": "Natus corporis ut totam eos."
}
],
"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 V3kbf64Zc5vEa1hPga8Ded6" \
--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 V3kbf64Zc5vEa1hPga8Ded6",
"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 hfD56kP6aebEaVg3d18c4Zv" \
--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 hfD56kP6aebEaVg3d18c4Zv",
"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 V1hc6kaf3ZbvegD8Pa5d4E6" \
--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 V1hc6kaf3ZbvegD8Pa5d4E6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": null,
"name": "odio",
"display_name": "Blanditiis ratione perferendis at officiis quisquam quo necessitatibus."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 e8gDaZVf6h413vdkcaEbP65" \
--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 e8gDaZVf6h413vdkcaEbP65",
"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 EP3861654bZVeaaDcdkgfhv" \
--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 EP3861654bZVeaaDcdkgfhv",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "129342c9-1d89-35d4-a77b-be995e8b3468",
"code": null,
"type": "entrada",
"payment_method": "boleto",
"amount": 4181.52,
"due_date": "2026-08-12T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Et illum qui ratione ex velit sit a.",
"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": "accusamus",
"field2": 100,
"field3": false,
"notes": "Ut quod blanditiis non magnam hic neque.",
"created_at": null,
"updated_at": null
},
{
"id": "3a41b447-7045-37e4-9601-9882fc0fa3d2",
"code": null,
"type": "saída",
"payment_method": "boleto",
"amount": 1089.65,
"due_date": "2026-08-21T03: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": "Dolorem magni iure enim fuga nihil vel harum.",
"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": "unde",
"field2": 28,
"field3": true,
"notes": "Magnam porro molestiae fugit voluptate sint.",
"created_at": null,
"updated_at": null
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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[]=aliquam" \
--header "Authorization: Bearer c3P6kv4aaVh5egDdf6bZ1E8" \
--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]": "aliquam",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer c3P6kv4aaVh5egDdf6bZ1E8",
"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 d4fvE1VaakcD83h56gZPeb6" \
--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 d4fvE1VaakcD83h56gZPeb6",
"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[]=sit&suppliers[]=eos&works[]=qui&statuses[]=cancelado&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-07-31T17%3A38%3A27&protest_date_end=2026-07-31T17%3A38%3A27&has_protest=&has_children=1&is_recurring=1" \
--header "Authorization: Bearer 8ePVaf4D5ac3vdZEgh16b6k" \
--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]": "sit",
"suppliers[0]": "eos",
"works[0]": "qui",
"statuses[0]": "cancelado",
"payment_method": "cheque",
"date_start": "2023-01-01",
"date_end": "2023-12-31",
"protest_date_start": "2026-07-31T17:38:27",
"protest_date_end": "2026-07-31T17:38:27",
"has_protest": "0",
"has_children": "1",
"is_recurring": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 8ePVaf4D5ac3vdZEgh16b6k",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "74f2c957-626c-3969-8605-fc4dc6d2afd5",
"code": null,
"type": "saída",
"payment_method": "boleto",
"amount": 6604.63,
"due_date": "2026-08-11T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Eaque maiores non optio qui iste harum numquam a consectetur et alias.",
"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": "eum",
"field2": 62,
"field3": true,
"notes": "Delectus sequi ut voluptas non eveniet.",
"created_at": null,
"updated_at": null
},
{
"id": "cbfec8a2-384c-3778-920a-804b0f287aab",
"code": null,
"type": "saída",
"payment_method": "boleto",
"amount": 9803.84,
"due_date": "2026-08-11T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Quia omnis molestiae eos consectetur impedit et corporis veritatis est nulla quo.",
"is_recurring": null,
"recurrence_config": null,
"parent_id": null,
"recurrence_order": 1,
"total_recurrences": null,
"children_count": 0,
"remaining_recurrences": null,
"has_children": false,
"field1": "quia",
"field2": 68,
"field3": false,
"notes": "Aut et in ex. Id ut rerum earum sed rerum.",
"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[]=hic&suppliers[]=aspernatur&works[]=eligendi&statuses[]=pago_sem_lancamento&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-07-31T17%3A38%3A27&protest_date_end=2026-07-31T17%3A38%3A27&has_protest=1&has_children=1&is_recurring=1" \
--header "Authorization: Bearer PekDvfh1ac6b4daE53gZ86V" \
--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]": "hic",
"suppliers[0]": "aspernatur",
"works[0]": "eligendi",
"statuses[0]": "pago_sem_lancamento",
"payment_method": "cheque",
"date_start": "2023-01-01",
"date_end": "2023-12-31",
"protest_date_start": "2026-07-31T17:38:27",
"protest_date_end": "2026-07-31T17:38:27",
"has_protest": "1",
"has_children": "1",
"is_recurring": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer PekDvfh1ac6b4daE53gZ86V",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "e75d4c07-c895-3492-9634-2c7b024c4b9a",
"code": null,
"type": "saída",
"payment_method": "boleto",
"amount": 5654.96,
"due_date": "2026-08-28T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Enim et error id velit consequatur quaerat illum totam id et consequuntur.",
"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": "quod",
"field2": 15,
"field3": false,
"notes": "Cumque dolorum et quia sit sed illo vero.",
"created_at": null,
"updated_at": null
},
{
"id": "f563169c-5908-31e6-8f42-25bce4b7400c",
"code": null,
"type": "entrada",
"payment_method": "boleto",
"amount": 9801.52,
"due_date": "2026-08-13T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Aut minima ut atque pariatur aut saepe qui.",
"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": "sequi",
"field2": 32,
"field3": false,
"notes": "Voluptatem esse aut quo in 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 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 6VvP4613hgdbkcea8ZED5af" \
--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\": \"4d3e9e2d-7106-3b08-b95d-53bd103103ff\",
\"customer_id\": \"84192fdf-0360-3c99-af0c-cfac9b8a45f2\",
\"work_id\": \"bd50cbf5-acf9-3db2-a83e-8dfeae81c50e\",
\"status\": \"Example Status\",
\"protest_date\": \"2024-01-01\",
\"bank_account_id\": \"752cb8b9-8def-35e8-95c4-c3746697638a\",
\"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 6VvP4613hgdbkcea8ZED5af",
"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": "4d3e9e2d-7106-3b08-b95d-53bd103103ff",
"customer_id": "84192fdf-0360-3c99-af0c-cfac9b8a45f2",
"work_id": "bd50cbf5-acf9-3db2-a83e-8dfeae81c50e",
"status": "Example Status",
"protest_date": "2024-01-01",
"bank_account_id": "752cb8b9-8def-35e8-95c4-c3746697638a",
"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 PaDebVf86h4g31d5akcEZ6v" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"fiscal_document_id\": \"nobis\",
\"installment_ids\": [
\"molestiae\"
],
\"payment_method\": \"outro\",
\"work_id\": \"explicabo\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/import-nfe"
);
const headers = {
"Authorization": "Bearer PaDebVf86h4g31d5akcEZ6v",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"fiscal_document_id": "nobis",
"installment_ids": [
"molestiae"
],
"payment_method": "outro",
"work_id": "explicabo"
};
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/sit/history" \
--header "Authorization: Bearer Vdhc46begZ1vPafk3E8aD65" \
--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/history"
);
const headers = {
"Authorization": "Bearer Vdhc46begZ1vPafk3E8aD65",
"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/eos" \
--header "Authorization: Bearer Egfk6ahd41ZDc6v38abeVP5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/eos"
);
const headers = {
"Authorization": "Bearer Egfk6ahd41ZDc6v38abeVP5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "ce052709-bcc4-3f25-b5b6-03084d3489c1",
"code": null,
"type": "saída",
"payment_method": "cheque",
"amount": 4945.53,
"due_date": "2026-08-29T03: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": "Suscipit aspernatur rerum sunt omnis id nihil nihil omnis nulla maxime.",
"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": "porro",
"field2": 40,
"field3": true,
"notes": "Ut nam repudiandae voluptatem.",
"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/veritatis" \
--header "Authorization: Bearer b5ekDaZ1fv6gaP3Ec4dh8V6" \
--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\": \"cadacb00-963d-3dfe-a00b-242da47c8721\",
\"customer_id\": \"e306d385-4000-3844-b64c-63f30d7e3fbe\",
\"work_id\": \"bbe39468-249b-3ece-ace4-30724d39aee9\",
\"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\": \"313220d7-987d-3a86-bb83-67bc50bf5632\",
\"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/veritatis"
);
const headers = {
"Authorization": "Bearer b5ekDaZ1fv6gaP3Ec4dh8V6",
"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": "cadacb00-963d-3dfe-a00b-242da47c8721",
"customer_id": "e306d385-4000-3844-b64c-63f30d7e3fbe",
"work_id": "bbe39468-249b-3ece-ace4-30724d39aee9",
"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": "313220d7-987d-3a86-bb83-67bc50bf5632",
"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/molestiae" \
--header "Authorization: Bearer D4b83agEa6d5h6kvPcVZfe1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/molestiae"
);
const headers = {
"Authorization": "Bearer D4b83agEa6d5h6kvPcVZfe1",
"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\": \"demarcus.bode@example.org\",
\"password\": \"password\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "demarcus.bode@example.org",
"password": "password"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"token": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Me
requires authentication No specific permission required
Get the current user
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/auth/user" \
--header "Authorization: Bearer 36fkP5Dh6EVeZa14gavc8db" \
--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 36fkP5Dh6EVeZa14gavc8db",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "8e237ed1-4491-3a84-bda1-5699d7f5c635",
"name": "Jayda Cormier",
"username": "della.fahey",
"email": "kevon.gutmann@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 edZfb8g51PD6aEhc3a64Vvk" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"dicki.princess\",
\"password\": \"password123\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"31c8af3e-4b92-3aa9-a429-ab6fb22d2e25\"
],
\"roles\": [
\"c250d9af-4679-31e3-a041-be75715bc311\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/user"
);
const headers = {
"Authorization": "Bearer edZfb8g51PD6aEhc3a64Vvk",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "dicki.princess",
"password": "password123",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"31c8af3e-4b92-3aa9-a429-ab6fb22d2e25"
],
"roles": [
"c250d9af-4679-31e3-a041-be75715bc311"
]
};
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 63gPcd5a1kfDa84EVZhe6bv" \
--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 63gPcd5a1kfDa84EVZhe6bv",
"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 14eEPaf5dDV6c8hZgvb3k6a" \
--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 14eEPaf5dDV6c8hZgvb3k6a",
"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 gD8Eaf4e1VP3h5Zabdkv6c6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"key\": \"ldwgnujnvroenrd\",
\"value\": []
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/preferences"
);
const headers = {
"Authorization": "Bearer gD8Eaf4e1VP3h5Zabdkv6c6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"key": "ldwgnujnvroenrd",
"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/aliquid" \
--header "Authorization: Bearer 3Dva4Vkd1fEb865eP6hacZg" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/preferences/aliquid"
);
const headers = {
"Authorization": "Bearer 3Dva4Vkd1fEb865eP6hacZg",
"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 D861fVh5c6dZ3EevbgaP4ak" \
--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 D861fVh5c6dZ3EevbgaP4ak",
"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 4Dc6be5a1EkVv3dahPZ86fg" \
--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 4Dc6be5a1EkVv3dahPZ86fg",
"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/suscipit" \
--header "Authorization: Bearer vkP8DcefV5bad6h143ZaE6g" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/transfers/suscipit"
);
const headers = {
"Authorization": "Bearer vkP8DcefV5bad6h143ZaE6g",
"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/15/deposit" \
--header "Authorization: Bearer gVa66E43hv8cPa1eb5DkfdZ" \
--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/15/deposit"
);
const headers = {
"Authorization": "Bearer gVa66E43hv8cPa1eb5DkfdZ",
"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/19/withdraw" \
--header "Authorization: Bearer 66Ve5EdfhgPk3aacbDv481Z" \
--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/19/withdraw"
);
const headers = {
"Authorization": "Bearer 66Ve5EdfhgPk3aacbDv481Z",
"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 16a3d4PbhavekVZcE65fD8g" \
--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 16a3d4PbhavekVZcE65fD8g",
"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 a6vZaDbc6dkgEP38V54h1fe" \
--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 a6vZaDbc6dkgEP38V54h1fe",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "ab96cb5d-abf1-3683-bf12-76fc0d75f3b7",
"agency": "6059",
"account": "9905428-1",
"type": "caixa",
"balance": 7255.42,
"holder_type": "pf",
"alias": "ut",
"limit": 9784.87,
"available_balance": 17040.29,
"used_limit": 0,
"available_limit": 9784.87,
"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 ck1Vhe4vD3Z6d6gE8Pafba5" \
--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 ck1Vhe4vD3Z6d6gE8Pafba5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "2d3ec404-1596-3d13-b977-afaf20c8d06e",
"agency": "2869",
"account": "6433324-2",
"type": "poupança",
"balance": 6863.31,
"holder_type": "pj",
"alias": "eaque",
"limit": 8565.45,
"available_balance": 15428.760000000002,
"used_limit": 0,
"available_limit": 8565.45,
"is_default": null,
"default_payment_method": null,
"bank": {
"id": null,
"name": null,
"code": null
},
"created_at": null,
"updated_at": null
},
{
"id": "162dd4ab-b5f4-35c3-97e0-c826af6de577",
"agency": "4749",
"account": "9383386-3",
"type": "caixa",
"balance": 3118.66,
"holder_type": "pj",
"alias": "modi",
"limit": 282.81,
"available_balance": 3401.47,
"used_limit": 0,
"available_limit": 282.81,
"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 haEafd1e63vVkPcb468gZD5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"agency\": \"Example Agency\",
\"account\": \"1616874-7\",
\"bank_id\": \"40e5edab-dacb-30ef-ba67-ca4d37df31cb\",
\"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 haEafd1e63vVkPcb468gZD5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"agency": "Example Agency",
"account": "1616874-7",
"bank_id": "40e5edab-dacb-30ef-ba67-ca4d37df31cb",
"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/2" \
--header "Authorization: Bearer cEk3v8g4fe6aZ1hdPbDV56a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"agency\": \"Example Agency\",
\"account\": \"1017327-1\",
\"bank_id\": \"42c02f9a-04e6-37ee-afcd-29a0faae1e37\",
\"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/2"
);
const headers = {
"Authorization": "Bearer cEk3v8g4fe6aZ1hdPbDV56a",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"agency": "Example Agency",
"account": "1017327-1",
"bank_id": "42c02f9a-04e6-37ee-afcd-29a0faae1e37",
"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/17" \
--header "Authorization: Bearer 4VaZD3ace1dgPE6k65vfh8b" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/17"
);
const headers = {
"Authorization": "Bearer 4VaZD3ace1dgPE6k65vfh8b",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "6e017fd6-e593-35f1-b6e6-051db417fe9d",
"agency": "3749",
"account": "5396583-1",
"type": "poupança",
"balance": 9339.88,
"holder_type": "pf",
"alias": "enim",
"limit": 1940.03,
"available_balance": 11279.91,
"used_limit": 0,
"available_limit": 1940.03,
"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/15" \
--header "Authorization: Bearer hE6vaP68k3c4dabD5Vfg1eZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/15"
);
const headers = {
"Authorization": "Bearer hE6vaP68k3c4dabD5Vfg1eZ",
"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/4/statements/summary" \
--header "Authorization: Bearer cZv6dghVfk6ae3b5aD48P1E" \
--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/4/statements/summary"
);
const headers = {
"Authorization": "Bearer cZv6dghVfk6ae3b5aD48P1E",
"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/2/statements" \
--header "Authorization: Bearer abfd64a81Z63gPkhDcve5VE" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"cumque\",
\"sort_desc\": false,
\"page\": 40,
\"per_page\": 21,
\"q\": \"arxvbicfxtvwqflvi\",
\"type\": \"saída\",
\"date_start\": \"2026-07-31T17:38:28\",
\"date_end\": \"2081-05-23\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/2/statements"
);
const headers = {
"Authorization": "Bearer abfd64a81Z63gPkhDcve5VE",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "cumque",
"sort_desc": false,
"page": 40,
"per_page": 21,
"q": "arxvbicfxtvwqflvi",
"type": "saída",
"date_start": "2026-07-31T17:38:28",
"date_end": "2081-05-23"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"type": null,
"amount": null,
"balance_after": null,
"description": null,
"date": null,
"statement_date": null,
"created_at": null,
"updated_at": null
},
{
"id": null,
"type": null,
"amount": null,
"balance_after": null,
"description": null,
"date": null,
"statement_date": null,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show bank statement
requires authentication bank-statement show
Show a specific statement entry
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/bank-accounts/20/statements/numquam" \
--header "Authorization: Bearer e1bacagZk6PDf3Vd6h4v5E8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/20/statements/numquam"
);
const headers = {
"Authorization": "Bearer e1bacagZk6PDf3Vd6h4v5E8",
"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 vafZVPD5g3d4ecb8ahEk166" \
--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 vafZVPD5g3d4ecb8ahEk166",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "5da8ff14-2684-34eb-b349-4da32f28f5c7",
"name": "Serra e Cortês e Associados",
"code": "650"
},
{
"id": "da6bd226-c6a1-38d5-92f8-b7c49bbe3efd",
"name": "Martines e Correia Ltda.",
"code": "841"
}
],
"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 g3EP5cvkde4Zaa6f6D8b1hV" \
--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 g3EP5cvkde4Zaa6f6D8b1hV",
"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 fE8a6v5P4ZgcV61aDhdkbe3" \
--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 fE8a6v5P4ZgcV61aDhdkbe3",
"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 E5hdZPakev4Dgfa613bV8c6" \
--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 E5hdZPakev4Dgfa613bV8c6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "31bdb634-3d42-3228-81fb-609dddb7d743",
"name": "Guerra e Teles Ltda.",
"code": "95"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 63dVE84P6k1faDebvZhga5c" \
--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 63dVE84P6k1faDebvZhga5c",
"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 kc5f6Zv4b83gaDhV1deEP6a" \
--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 kc5f6Zv4b83gaDhV1deEP6a",
"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=Odio+sunt+saepe+quasi+porro+molestiae+saepe+qui.&categories[]=rerum&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=ipsam&customers[]=cupiditate&suppliers[]=atque&works[]=temporibus" \
--header "Authorization: Bearer hgZ86VdkceaEaf1D4v35P6b" \
--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": "Odio sunt saepe quasi porro molestiae saepe qui.",
"categories[0]": "rerum",
"date_start": "2021-01-01",
"date_end": "2021-01-31",
"bank_accounts[0]": "ipsam",
"customers[0]": "cupiditate",
"suppliers[0]": "atque",
"works[0]": "temporibus",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer hgZ86VdkceaEaf1D4v35P6b",
"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=Omnis+nihil+porro+qui+facilis+temporibus.&categories[]=quaerat&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=officiis&customers[]=accusantium&suppliers[]=dolorem&works[]=et" \
--header "Authorization: Bearer k8Z1fce5agvP6E43hdDabV6" \
--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": "Omnis nihil porro qui facilis temporibus.",
"categories[0]": "quaerat",
"date_start": "2021-01-01",
"date_end": "2021-01-31",
"bank_accounts[0]": "officiis",
"customers[0]": "accusantium",
"suppliers[0]": "dolorem",
"works[0]": "et",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer k8Z1fce5agvP6E43hdDabV6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "2031ce64-cb74-3aa4-8972-e1cd03cf0782",
"code": "FC-66862017",
"type": "saque",
"amount": -512.01,
"description": "Qui ut asperiores sapiente ut deserunt iusto neque.",
"transaction_date": "2008-05-27T03:00:00.000000Z",
"transaction_category": {
"id": null,
"name": null,
"type": null
},
"created_at": null,
"updated_at": null
},
{
"id": "d9b02489-030a-3a37-8abb-766f59eca133",
"code": "FC-73803423",
"type": "saque",
"amount": -6822.19,
"description": "Praesentium in neque ea voluptatem labore ad qui.",
"transaction_date": "2018-05-16T03: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 gcEbavD1fV3e66aZh854dPk" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"Example Type\",
\"cash_session_id\": \"9ae7d220-2206-3d68-929a-77003144ee10\",
\"transaction_category_id\": \"f0801d41-2f07-3445-b109-86d3c12701e9\",
\"bank_account_id\": \"45da9d2d-ddb7-3f79-819b-ef097db5109d\",
\"customer_id\": \"804b100f-a281-3da7-a4b1-dea7e68a8972\",
\"supplier_id\": \"52513ad6-7836-3a20-bb42-7a5c2daac782\",
\"work_id\": \"75f1f7b5-0a92-3159-9962-8034b0275129\",
\"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 gcEbavD1fV3e66aZh854dPk",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "Example Type",
"cash_session_id": "9ae7d220-2206-3d68-929a-77003144ee10",
"transaction_category_id": "f0801d41-2f07-3445-b109-86d3c12701e9",
"bank_account_id": "45da9d2d-ddb7-3f79-819b-ef097db5109d",
"customer_id": "804b100f-a281-3da7-a4b1-dea7e68a8972",
"supplier_id": "52513ad6-7836-3a20-bb42-7a5c2daac782",
"work_id": "75f1f7b5-0a92-3159-9962-8034b0275129",
"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/12" \
--header "Authorization: Bearer b5dZc6khv4gaD1ef3E8VPa6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/12"
);
const headers = {
"Authorization": "Bearer b5dZc6khv4gaD1ef3E8VPa6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a21dfe62-f99d-3c7b-a698-7f108ab46a6e",
"code": "FC-69650457",
"type": "saída",
"amount": -6877.32,
"description": "Dolor vero nisi quis.",
"transaction_date": "1982-06-05T03: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/3" \
--header "Authorization: Bearer 8v6bP5fdh4Ecge6aZkV1Da3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"Example Type\",
\"cash_session_id\": \"320b5721-cba3-367c-8a7c-42ddd223ee0e\",
\"transaction_category_id\": \"fa3f2f9f-4b1c-3463-96f2-7f9d90d78acb\",
\"bank_account_id\": \"a1ea516f-0d62-30fc-9f79-886d5f86c0d8\",
\"customer_id\": \"b877d253-d386-36bb-bbb3-1b7ee8b6ad70\",
\"supplier_id\": \"2ba2a836-e812-307f-b209-6fc92a49a000\",
\"work_id\": \"188e8340-3238-38d1-b53d-d69d09de3743\",
\"amount\": 1,
\"description\": \"Example Description\",
\"transaction_date\": \"2024-01-01\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/3"
);
const headers = {
"Authorization": "Bearer 8v6bP5fdh4Ecge6aZkV1Da3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "Example Type",
"cash_session_id": "320b5721-cba3-367c-8a7c-42ddd223ee0e",
"transaction_category_id": "fa3f2f9f-4b1c-3463-96f2-7f9d90d78acb",
"bank_account_id": "a1ea516f-0d62-30fc-9f79-886d5f86c0d8",
"customer_id": "b877d253-d386-36bb-bbb3-1b7ee8b6ad70",
"supplier_id": "2ba2a836-e812-307f-b209-6fc92a49a000",
"work_id": "188e8340-3238-38d1-b53d-d69d09de3743",
"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/5" \
--header "Authorization: Bearer fZaDve56Vd4hEg6Pckab183" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/5"
);
const headers = {
"Authorization": "Bearer fZaDve56Vd4hEg6Pckab183",
"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 4e6Z1PgcaVh3bavE86d5fDk" \
--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 4e6Z1PgcaVh3bavE86d5fDk",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "305edf80-bdf4-3bbf-82a1-4f6ebca63d98",
"code": null,
"opened_by": null,
"opened_at": "1982-06-14T20:00:47.000000Z",
"closed_by": null,
"closed_at": "1989-01-25T14:55:38.000000Z",
"opening_balance": 9049.23,
"closing_balance": 9283.4,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Aberto",
"hasSnapshot": false,
"created_at": "1970-04-01T07:25:10.000000Z",
"updated_at": "1999-05-22T01:04:08.000000Z"
},
{
"id": "50fd877b-5f10-387b-acbd-10413fa5dcad",
"code": null,
"opened_by": null,
"opened_at": "2000-07-26T11:38:17.000000Z",
"closed_by": null,
"closed_at": "1984-01-14T19:04:38.000000Z",
"opening_balance": 703.24,
"closing_balance": 4993.8,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Fechado",
"hasSnapshot": false,
"created_at": "1990-01-14T17:00:59.000000Z",
"updated_at": "1986-06-20T05:50:03.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 a54Zgdca3bDkP8v6Vh6Ee1f" \
--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 a54Zgdca3bDkP8v6Vh6Ee1f",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "84ba01ed-a2d6-32b9-bc3b-6c4e2224d1b9",
"code": null,
"opened_by": null,
"opened_at": "1988-12-05T07:55:11.000000Z",
"closed_by": null,
"closed_at": "1998-08-28T05:58:38.000000Z",
"opening_balance": 2970.26,
"closing_balance": 5470.03,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Aberto",
"hasSnapshot": false,
"created_at": "2005-12-02T07:15:21.000000Z",
"updated_at": "2023-11-23T08:01:48.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/f32ab42e-8447-3623-9e81-5b220d8dfbfa" \
--header "Authorization: Bearer aDEg48c5ak6eZ3bvhfVdP61" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/close/f32ab42e-8447-3623-9e81-5b220d8dfbfa"
);
const headers = {
"Authorization": "Bearer aDEg48c5ak6eZ3bvhfVdP61",
"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/a553c419-6e90-3d10-855a-8e09ee6a55bb/account-snapshot" \
--header "Authorization: Bearer h1dbZgfkE846V5c6evDa3Pa" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/a553c419-6e90-3d10-855a-8e09ee6a55bb/account-snapshot"
);
const headers = {
"Authorization": "Bearer h1dbZgfkE846V5c6evDa3Pa",
"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/df3629ee-ae27-35e4-a58b-6435cb4cbb22" \
--header "Authorization: Bearer v5dDb6eaEf3PVa6kgch418Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/df3629ee-ae27-35e4-a58b-6435cb4cbb22"
);
const headers = {
"Authorization": "Bearer v5dDb6eaEf3PVa6kgch418Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "13b25536-58b8-3983-b8ae-0102ce87302b",
"code": null,
"opened_by": null,
"opened_at": "1979-11-18T10:38:57.000000Z",
"closed_by": null,
"closed_at": "1971-07-29T01:29:44.000000Z",
"opening_balance": 3828.45,
"closing_balance": 2706.94,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Fechado",
"hasSnapshot": false,
"created_at": "1987-07-05T20:33:17.000000Z",
"updated_at": "1986-11-26T07:17:43.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/26a2f5f4-d66f-3890-9b5a-7103f090942f" \
--header "Authorization: Bearer dP8c4366gakfZvahbEeDV51" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/26a2f5f4-d66f-3890-9b5a-7103f090942f"
);
const headers = {
"Authorization": "Bearer dP8c4366gakfZvahbEeDV51",
"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.
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 egZbkv6Dc41af5h6VP38daE" \
--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\": \"c2f5a077-bf61-3b84-9342-b2ba408dc0b3\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts"
);
const headers = {
"Authorization": "Bearer egZbkv6Dc41af5h6VP38daE",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "Example Sort by",
"sort_desc": true,
"page": 1,
"per_page": 1,
"work_id": "c2f5a077-bf61-3b84-9342-b2ba408dc0b3"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "c8d472d3-fb00-3af3-85f8-a01dfa34295f",
"number": "035/2026",
"started_at": "2026-07-31",
"deadline_at": "2027-07-31",
"work": {
"id": "a2649dfa-bb0a-40ee-8625-31704fb79cff",
"name": "Martinho Padrão Sobrinho"
},
"created_at": null,
"updated_at": null
},
{
"id": "73550c1d-e863-314d-93f2-23688234b2f8",
"number": "707/2026",
"started_at": "2026-07-31",
"deadline_at": "2027-07-31",
"work": {
"id": "a2649dfa-c27f-44ed-8de6-eb0fb7652d66",
"name": "Leandro Esteves 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.
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 fkVd65v8hZeg61aDEPcb34a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"work_id\": \"76422daa-b17b-316c-ba00-35fb94c4c19a\",
\"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 fkVd65v8hZeg61aDEPcb34a",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"work_id": "76422daa-b17b-316c-ba00-35fb94c4c19a",
"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/12" \
--header "Authorization: Bearer hf4a3vek8a1Z5E6VPD6bdgc" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts/12"
);
const headers = {
"Authorization": "Bearer hf4a3vek8a1Z5E6VPD6bdgc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d0c00b00-04e2-3e3a-9a73-946b7bb15731",
"number": "991/2026",
"started_at": "2026-07-31",
"deadline_at": "2027-07-31",
"work": {
"id": "a2649dfa-ce80-45c4-b975-89b16659a75e",
"name": "Jasmin Espinoza Salas"
},
"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/6" \
--header "Authorization: Bearer akZbgda1EcD6P3645hVf8ev" \
--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/6"
);
const headers = {
"Authorization": "Bearer akZbgda1EcD6P3645hVf8ev",
"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/vero" \
--header "Authorization: Bearer Zg43cv6Ph5d6baVfDe18Eak" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts/vero"
);
const headers = {
"Authorization": "Bearer Zg43cv6Ph5d6baVfDe18Eak",
"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 Z1eav63c6gkPbfDE5ad84Vh" \
--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 Z1eav63c6gkPbfDE5ad84Vh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "474de3ed-15bc-3797-81f7-670e7b1b2a9a",
"name": "Srta. Lúcia Cristiana Mendonça Jr.",
"email": "itoledo@example.org",
"phone": "(74) 99367-1978",
"document": "610.979.288-88",
"type": "pj",
"responsible": "Srta. Caroline Flores Marés Neto",
"image": {
"id": null,
"url": null
},
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"documents_count": 0
},
{
"id": "174690c3-331c-3443-9ac1-f377f81ad6bb",
"name": "Dr. Hortência Olga Salas",
"email": "marina13@example.net",
"phone": "(65) 4232-0720",
"document": "995.126.583-99",
"type": "pf",
"responsible": "Srta. Rebeca Franco Neto",
"image": {
"id": null,
"url": null
},
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"documents_count": 0
}
],
"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 Vh8gvDfca3E6dkb51P6aZe4" \
--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 Vh8gvDfca3E6dkb51P6aZe4",
"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/6" \
--header "Authorization: Bearer v645a8Vchad3Ee6f1ZPbgDk" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/customers/6"
);
const headers = {
"Authorization": "Bearer v645a8Vchad3Ee6f1ZPbgDk",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "6456f168-8bae-363b-a441-7afca43806dd",
"name": "Srta. Maria Thalita Santiago Jr.",
"email": "vitoria14@example.com",
"phone": "(92) 97452-1823",
"document": "877.457.149-40",
"type": "pj",
"responsible": "Dr. Kléber Luis Teles Filho",
"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/10" \
--header "Authorization: Bearer fD3c8kaaPvE61de64V5Zgbh" \
--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/10"
);
const headers = {
"Authorization": "Bearer fD3c8kaaPvE61de64V5Zgbh",
"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 5fh4ca8eVbDZ1d36v6PgkaE" \
--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 5fh4ca8eVbDZ1d36v6PgkaE",
"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 hf4PceZ31gabvaDd8E566Vk" \
--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\": \"1fc29948-e316-33b1-a81e-544f4c35a5d7\",
\"contract_id\": \"a27e3a47-15d7-33df-8f9d-3587a278ae72\",
\"status_id\": \"077e897f-87e0-315a-8a93-176825c01bff\",
\"filled_by\": \"a1ef54cb-e43f-35da-865d-0ad2e4d3db78\",
\"responsible_id\": \"b5018cbe-6137-34c6-b02c-763c76e0b244\",
\"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 hf4PceZ31gabvaDd8E566Vk",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "Example Sort by",
"sort_desc": true,
"page": 1,
"per_page": 1,
"work_id": "1fc29948-e316-33b1-a81e-544f4c35a5d7",
"contract_id": "a27e3a47-15d7-33df-8f9d-3587a278ae72",
"status_id": "077e897f-87e0-315a-8a93-176825c01bff",
"filled_by": "a1ef54cb-e43f-35da-865d-0ad2e4d3db78",
"responsible_id": "b5018cbe-6137-34c6-b02c-763c76e0b244",
"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": "21334ec0-cc4c-3a42-9bc6-a6dbbfd6c1ad",
"code": "RDO-001",
"report_number": 1,
"date": "2026-07-31",
"status": {
"id": "a2649dfb-18ea-4f82-9732-02b0cc69cd34",
"slug": null,
"name": null,
"abbreviation": "eaque",
"color": "#9ce68a",
"text_color": "#d02af7"
},
"work": {
"id": "a2649dfb-11ca-4de7-a530-730e2d4407e6",
"name": "Sr. Fabiano Sales Valentin Neto",
"started_at": "2012-10-02 20:01:26"
},
"filled_by": {
"id": "a2649dfb-162e-4f2b-b747-72b8774ecdae",
"name": "Shania Sauer"
},
"contract_number": "458/2026",
"deadline_at": "2027-07-31",
"technical_responsible": {
"name": null,
"certification": null,
"crea": null
},
"activities": [],
"occurrences": null,
"next_day_forecast": null,
"finalized_at": null,
"content_hash": null,
"gov_br_validation_url": null,
"created_at": null,
"updated_at": null
},
{
"id": "b34480ba-79c8-3b52-a617-b9c95fe8ee6f",
"code": "RDO-001",
"report_number": 1,
"date": "2026-07-31",
"status": {
"id": "a2649dfb-22ca-4034-bdc2-4bdddcf8a5b2",
"slug": null,
"name": null,
"abbreviation": "non",
"color": "#4f0d85",
"text_color": "#589015"
},
"work": {
"id": "a2649dfb-1c97-4eb0-af7c-be46c1553238",
"name": "Carla Camila Gusmão Jr.",
"started_at": "2008-07-31 17:38:59"
},
"filled_by": {
"id": "a2649dfb-2110-415b-800a-ffdd077b7704",
"name": "Reuben Bradtke V"
},
"contract_number": "479/2026",
"deadline_at": "2027-07-31",
"technical_responsible": {
"name": null,
"certification": null,
"crea": null
},
"activities": [],
"occurrences": null,
"next_day_forecast": null,
"finalized_at": null,
"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 ca6gafEe4bhdPD816vk5Z3V" \
--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 ca6gafEe4bhdPD816vk5Z3V",
"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/debitis" \
--header "Authorization: Bearer D68Vgbk6dE1ec5v3fPa4hZa" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/debitis"
);
const headers = {
"Authorization": "Bearer D68Vgbk6dE1ec5v3fPa4hZa",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "968b35e2-4f92-37cb-9b52-59520e324885",
"code": "RDO-001",
"report_number": 1,
"date": "2026-07-31",
"status": {
"id": "a2649dfb-3631-44c0-bf03-21a327031086",
"slug": null,
"name": null,
"abbreviation": "adipisci",
"color": "#083aff",
"text_color": "#622d93"
},
"work": {
"id": "a2649dfb-2efd-4db8-967b-a6ee2cc17e24",
"name": "Srta. Pietra Urias",
"started_at": "2013-08-30 02:46:38"
},
"filled_by": {
"id": "a2649dfb-341b-4e8a-bdb3-32db87dcc8e2",
"name": "Alvina Bartoletti"
},
"contract_number": "304/2026",
"deadline_at": "2027-07-31",
"technical_responsible": {
"name": null,
"certification": null,
"crea": null
},
"activities": [],
"occurrences": null,
"next_day_forecast": null,
"finalized_at": null,
"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 h6afceDav83PVEgk61Zb45d" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"contract_id\": \"Example Contract id\",
\"date\": \"2024-01-01\",
\"status_id\": \"ad97aaa1-cd3f-33b5-b95e-81cc9534550f\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs"
);
const headers = {
"Authorization": "Bearer h6afceDav83PVEgk61Zb45d",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"contract_id": "Example Contract id",
"date": "2024-01-01",
"status_id": "ad97aaa1-cd3f-33b5-b95e-81cc9534550f"
};
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/aut" \
--header "Authorization: Bearer 5E6P3D6cVf4vhdZaeg1bak8" \
--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\": \"b9833f68-74d8-4d2d-a08e-8f62dfe2cdbb\",
\"quantity\": 1
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/aut"
);
const headers = {
"Authorization": "Bearer 5E6P3D6cVf4vhdZaeg1bak8",
"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": "b9833f68-74d8-4d2d-a08e-8f62dfe2cdbb",
"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/rem/finalize" \
--header "Authorization: Bearer adZek6c1v5bD3gPf6h8EVa4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/rem/finalize"
);
const headers = {
"Authorization": "Bearer adZek6c1v5bD3gPf6h8EVa4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": "object"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Attach gov.br signed document
requires authentication daily-log finalize
Attach the gov.br-signed PDF and validation link to a finalized RDO
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/daily-logs/omnis/signed-document" \
--header "Authorization: Bearer gaP3aVdEb8k4cZD5e16fhv6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"path\": \"Example Path\",
\"name\": \"Example Name\",
\"size\": \"Example Size\",
\"extension\": \"Example Extension\",
\"gov_br_validation_url\": \"https:\\/\\/example.com\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/omnis/signed-document"
);
const headers = {
"Authorization": "Bearer gaP3aVdEb8k4cZD5e16fhv6",
"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.
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/et/photos" \
--header "Authorization: Bearer kadgh8Z43e6a56cPf1DvbEV" \
--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/et/photos"
);
const headers = {
"Authorization": "Bearer kadgh8Z43e6a56cPf1DvbEV",
"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/occaecati/photos/occaecati" \
--header "Authorization: Bearer evdgV6E4a13b8kPZc56aDhf" \
--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/occaecati/photos/occaecati"
);
const headers = {
"Authorization": "Bearer evdgV6E4a13b8kPZc56aDhf",
"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/id/photos/alias" \
--header "Authorization: Bearer 6vVcfa38Ed45gZhbekP16aD" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/id/photos/alias"
);
const headers = {
"Authorization": "Bearer 6vVcfa38Ed45gZhbekP16aD",
"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/molestias" \
--header "Authorization: Bearer hVZ5D6v4aa1bkEf36de8gcP" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/molestias"
);
const headers = {
"Authorization": "Bearer hVZ5D6v4aa1bkEf36de8gcP",
"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 aZ68hg43cVdkEDva5b16feP" \
--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 aZ68hg43cVdkEDva5b16feP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "aa91e2a6-28da-3fad-aa9b-ee78815161cc",
"name": "Ipsam",
"code": "VTH",
"description": "Natus facere numquam nam earum incidunt.",
"active": true
},
{
"id": "3868a44a-1144-36a0-86d9-fc4806e11361",
"name": "Aut",
"code": "CIL",
"description": "Veniam porro corrupti fugiat libero adipisci exercitationem.",
"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 DfhcbZV3486ve156dakgEaP" \
--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 DfhcbZV3486ve156dakgEaP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "b93fbf40-d496-3e67-a6b4-870fd429e2bd",
"name": "Nesciunt",
"code": "OWW",
"description": "Iusto commodi exercitationem deleniti dolorem saepe itaque.",
"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 adEbgkv6Vfc46Da1h8ePZ53" \
--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 adEbgkv6Vfc46Da1h8ePZ53",
"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 Eaag1kc8eP6VbD6435fZdvh" \
--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 Eaag1kc8eP6VbD6435fZdvh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"code": "Example Code",
"description": "Example Description",
"active": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete discipline
requires authentication discipline delete
Delete a discipline
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/disciplines/doloribus" \
--header "Authorization: Bearer bf5h6E3kaZDvVc164e8dagP" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/disciplines/doloribus"
);
const headers = {
"Authorization": "Bearer bf5h6E3kaZDvVc164e8dagP",
"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 g4h1kEcd583fPZaDb6vVa6e" \
--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 g4h1kEcd583fPZaDb6vVa6e",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "59a43116-820b-329c-9e29-cae863fc76e7",
"name": "Sr. Kléber Mauro Salas",
"description": "Magni quae ab doloribus sed ad. Eos nemo eum illum. Ipsa ex eum doloribus facere eum est facere aut.",
"module": "document"
},
{
"id": "49422e1e-afa5-3eea-a5c0-6539fd74d3d2",
"name": "Sra. Eunice Fernanda Dominato",
"description": "Esse error impedit aut magni molestiae ad sed. Voluptatem et minima iusto dolorem repudiandae et expedita vel. Aut id quod vitae illum.",
"module": "document"
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show document category
requires authentication document-category show
Show a document category
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/document-categories/et" \
--header "Authorization: Bearer Zh6k5P3af4ea8bV1cdDvg6E" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/document-categories/et"
);
const headers = {
"Authorization": "Bearer Zh6k5P3af4ea8bV1cdDvg6E",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "8c9014a1-fb89-3182-be5c-d42073827668",
"name": "Agustina Emily Pacheco",
"description": "Ducimus qui et corporis eligendi. Consectetur atque sit tempora corrupti ipsum neque blanditiis. Voluptas qui et neque tenetur et quia. Quia aut culpa illum esse modi perspiciatis.",
"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 3aVP4cgv8haeZbDd616f5kE" \
--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 3aVP4cgv8haeZbDd616f5kE",
"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/qui" \
--header "Authorization: Bearer ad1g45eEa6fZ3DPhv8cbkV6" \
--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/qui"
);
const headers = {
"Authorization": "Bearer ad1g45eEa6fZ3DPhv8cbkV6",
"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/aut" \
--header "Authorization: Bearer bv4aZE8fVaD6deP35hkcg61" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/document-categories/aut"
);
const headers = {
"Authorization": "Bearer bv4aZE8fVaD6deP35hkcg61",
"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[]=repellendus&documentable_type=hic&customers[]=ut&suppliers[]=aliquid" \
--header "Authorization: Bearer PkZEb584a3gV61hDdcva6fe" \
--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]": "repellendus",
"documentable_type": "hic",
"customers[0]": "ut",
"suppliers[0]": "aliquid",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer PkZEb584a3gV61hDdcva6fe",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "104ca228-a038-380d-b15c-2e6c796995c7",
"name": "Srta. Michelle Milene Pacheco Filho",
"file": {
"id": null,
"url": null,
"extension": null
},
"created_at": null,
"updated_at": null
},
{
"id": "39321b1b-db30-33ea-835e-c6d4db4b53aa",
"name": "Mônica Mayara Fonseca Sobrinho",
"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/1" \
--header "Authorization: Bearer vdP536beVkfhEDgc614aZ8a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/documents/1"
);
const headers = {
"Authorization": "Bearer vdP536beVkfhEDgc614aZ8a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "53aeaa35-27d8-3b45-b01e-e8823f7182bd",
"name": "Dr. Everton Thales Maldonado",
"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 ha3vZ4e51V6E8DbfkgP6cad" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"category_id\": \"fd001a3d-9349-3b98-883a-92a55477a49e\",
\"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 ha3vZ4e51V6E8DbfkgP6cad",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"category_id": "fd001a3d-9349-3b98-883a-92a55477a49e",
"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/14" \
--header "Authorization: Bearer aac1E6V6ZDdh5vkfeg3b8P4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"category_id\": \"a213129a-de64-3f0e-853c-74fbe22b8dfa\",
\"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/14"
);
const headers = {
"Authorization": "Bearer aac1E6V6ZDdh5vkfeg3b8P4",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"category_id": "a213129a-de64-3f0e-853c-74fbe22b8dfa",
"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 PdDv36Eafea461g8hVcZ5bk" \
--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 PdDv36Eafea461g8hVcZ5bk",
"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 h5g861aV4vkePcEab3fdZ6D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"aut\",
\"renewal_status\": \"pending\",
\"urgency\": \"expired\",
\"employee_id\": \"itaque\",
\"epi_type_id\": \"totam\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals"
);
const headers = {
"Authorization": "Bearer h5g861aV4vkePcEab3fdZ6D",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "aut",
"renewal_status": "pending",
"urgency": "expired",
"employee_id": "itaque",
"epi_type_id": "totam"
};
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 V4cPg6adeE18b5vkhZ6aD3f" \
--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 V4cPg6adeE18b5vkhZ6aD3f",
"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/voluptatem/renew" \
--header "Authorization: Bearer ka3bD1Pf5g846ec6VvZaEdh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"quantity\": 1,
\"condition\": \"new\",
\"lot\": \"LOTE-001\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/voluptatem/renew"
);
const headers = {
"Authorization": "Bearer ka3bD1Pf5g846ec6VvZaEdh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quantity": 1,
"condition": "new",
"lot": "LOTE-001"
};
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/aut/ignore" \
--header "Authorization: Bearer d36Daf6c5E8gh4bZaPv1Vek" \
--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/aut/ignore"
);
const headers = {
"Authorization": "Bearer d36Daf6c5E8gh4bZaPv1Vek",
"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/eaque/ignore" \
--header "Authorization: Bearer aE4ekDZ1hvf6dV63cg85Pba" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/eaque/ignore"
);
const headers = {
"Authorization": "Bearer aE4ekDZ1hvf6dV63cg85Pba",
"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 Zkd5E6gPe6VDahb1v4ca8f3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"est\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types"
);
const headers = {
"Authorization": "Bearer Zkd5E6gPe6VDahb1v4ca8f3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "est"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "0bb545ee-fc53-37a0-8da0-58e69a5bd3df",
"name": "impedit non",
"default_validity_days": 168,
"requires_signature": true,
"created_at": null,
"updated_at": null
},
{
"id": "62a5a75b-e965-3fb9-86cc-e310295e604c",
"name": "autem voluptas",
"default_validity_days": 389,
"requires_signature": 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.
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/ullam" \
--header "Authorization: Bearer av8bcEVk66gP5Dhd3fa1Z4e" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/ullam"
);
const headers = {
"Authorization": "Bearer av8bcEVk66gP5Dhd3fa1Z4e",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a7c0d676-8023-3b27-ad18-b037054072a0",
"name": "dicta voluptas",
"default_validity_days": 459,
"requires_signature": 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.
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 E4d16c3abVP65Dh8kgfaveZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"default_validity_days\": 1,
\"requires_signature\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types"
);
const headers = {
"Authorization": "Bearer E4d16c3abVP65Dh8kgfaveZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"default_validity_days": 1,
"requires_signature": 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 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/cupiditate" \
--header "Authorization: Bearer EgaV4D6h51ePdZ8ckvabf63" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"default_validity_days\": 1,
\"requires_signature\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/cupiditate"
);
const headers = {
"Authorization": "Bearer EgaV4D6h51ePdZ8ckvabf63",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"default_validity_days": 1,
"requires_signature": 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 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/nobis" \
--header "Authorization: Bearer dPbgk4D5f1ac8v6EZ3ahVe6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/nobis"
);
const headers = {
"Authorization": "Bearer dPbgk4D5f1ac8v6EZ3ahVe6",
"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 hg5kV6ev3adDE4f6caZ8P1b" \
--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 hg5kV6ev3adDE4f6caZ8P1b",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "7c40ae8b-8ed3-4073-8882-9e662a4fa034",
"name": "saepe",
"description": "Aut qui iusto natus velit odio quis.",
"created_at": null,
"updated_at": null
},
{
"id": "c9c36a90-b912-4840-8f11-4189d9f4a7df",
"name": "laudantium",
"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/ut" \
--header "Authorization: Bearer e8va65acg41b6hZ3PVEfdDk" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employee-roles/ut"
);
const headers = {
"Authorization": "Bearer e8va65acg41b6hZ3PVEfdDk",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "b0549fbe-42f2-4e8c-a83a-4d326dbff941",
"name": "mollitia",
"description": null,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create employee role
requires authentication employee-role store
Create a new employee role
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/employee-roles" \
--header "Authorization: Bearer aDg66P4EZfv3dVha1kb85ec" \
--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 aDg66P4EZfv3dVha1kb85ec",
"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/molestiae" \
--header "Authorization: Bearer 6efvc845Z3EP6DhgVbkda1a" \
--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/molestiae"
);
const headers = {
"Authorization": "Bearer 6efvc845Z3EP6DhgVbkda1a",
"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/esse" \
--header "Authorization: Bearer 43ehaED6a68VgcvkZ1bdPf5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employee-roles/esse"
);
const headers = {
"Authorization": "Bearer 43ehaED6a68VgcvkZ1bdPf5",
"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 a8he6d3EaPV4c51Zfbkgv6D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"delivery_date\",
\"sort_desc\": false,
\"page\": 12,
\"per_page\": 25,
\"q\": \"qui\",
\"employee_id\": \"saepe\",
\"has_term\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-terms"
);
const headers = {
"Authorization": "Bearer a8he6d3EaPV4c51Zfbkgv6D",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "delivery_date",
"sort_desc": false,
"page": 12,
"per_page": 25,
"q": "qui",
"employee_id": "saepe",
"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" \
--header "Authorization: Bearer PVE3gd8v6bc6h1aefk4DaZ5" \
--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",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer PVE3gd8v6bc6h1aefk4DaZ5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "8bc14b8f-5556-43c0-bf6e-14923f4771b8",
"name": "Sr. Jean Vale",
"cpf": "913.934.949-70",
"rg": null,
"ctps": "916077327",
"phone": "(24) 3375-8244",
"birthdate": "2018-04-28T03:00:00.000000Z",
"email": "paes.marcelo@example.com",
"pis_pasep": null,
"admission_date": null,
"daily_salary": null,
"monthly_salary": "1444.11",
"nationality": null,
"place_of_birth": "Priscila d'Oeste",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"employee_role": {
"id": "a2649dfb-c11f-40f7-925d-a28807223a5c",
"name": "blanditiis"
},
"created_at": null,
"updated_at": null
},
{
"id": "0afcbef3-eccb-4a66-88ef-145f1abcb0e7",
"name": "Maraisa Vasques",
"cpf": "256.524.094-41",
"rg": "905460124",
"ctps": null,
"phone": "(61) 2383-8839",
"birthdate": "1980-06-23T03:00:00.000000Z",
"email": "lutero.emerson@example.org",
"pis_pasep": null,
"admission_date": "2009-01-01T02:00:00.000000Z",
"daily_salary": null,
"monthly_salary": null,
"nationality": "Suiça",
"place_of_birth": null,
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"employee_role": {
"id": "a2649dfb-c394-475e-97a7-5c7fe30c1bca",
"name": "esse"
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": "/?page=11",
"next": null
},
"meta": {
"current_page": 12,
"from": 111,
"last_page": 1,
"links": [
{
"url": "/?page=11",
"label": "« Anterior",
"page": 11,
"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": 112,
"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
requires authentication employee show
Show an employee
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employees/13" \
--header "Authorization: Bearer v4e1d63c5kb8h6fEaZVgDPa" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/13"
);
const headers = {
"Authorization": "Bearer v4e1d63c5kb8h6fEaZVgDPa",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "36370566-015c-40c6-a288-b51296b5c68c",
"name": "Aline Sophie Lutero Filho",
"cpf": "181.385.041-25",
"rg": "555561330",
"ctps": "786371230",
"phone": null,
"birthdate": null,
"email": null,
"pis_pasep": null,
"admission_date": null,
"daily_salary": "195.09",
"monthly_salary": null,
"nationality": null,
"place_of_birth": null,
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"employee_role": {
"id": "a2649dfb-ca55-4392-b9e8-c6f3c9bccecb",
"name": "quo"
},
"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 68E6d43veDacf15gkbhZPaV" \
--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\": \"7849614b-300c-4746-8223-3b15be78f9e7\",
\"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 68E6d43veDacf15gkbhZPaV",
"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": "7849614b-300c-4746-8223-3b15be78f9e7",
"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):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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/12" \
--header "Authorization: Bearer 8bkv63EVcDPZgea6hf5a1d4" \
--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\": \"9314de7d-8223-4d0a-8ed6-5976afddd941\",
\"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/12"
);
const headers = {
"Authorization": "Bearer 8bkv63EVcDPZgea6hf5a1d4",
"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": "9314de7d-8223-4d0a-8ed6-5976afddd941",
"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.
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 8ZvaVED6d13645abkhPfgec" \
--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 8ZvaVED6d13645abkhPfgec",
"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/17/bank-account" \
--header "Authorization: Bearer 653dVhZbv4ecPg6DaE81akf" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/17/bank-account"
);
const headers = {
"Authorization": "Bearer 653dVhZbv4ecPg6DaE81akf",
"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/1/bank-account" \
--header "Authorization: Bearer P13a4DZkVE8vfh5d6caeg6b" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_id\": \"non\",
\"agency\": \"ahjwg\",
\"account\": \"zsfyztxlityzdv\",
\"account_type\": \"poupança\",
\"pix_key\": \"xktegh\",
\"favorite\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/1/bank-account"
);
const headers = {
"Authorization": "Bearer P13a4DZkVE8vfh5d6caeg6b",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_id": "non",
"agency": "ahjwg",
"account": "zsfyztxlityzdv",
"account_type": "poupança",
"pix_key": "xktegh",
"favorite": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update employee bank account
requires authentication employee-bank-account update
Update a bank account for an employee
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/employees/13/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33" \
--header "Authorization: Bearer aZ13VdPvb4hcg6Df6e5aEk8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_id\": \"nisi\",
\"agency\": \"yqrcl\",
\"account\": \"aqbvuoosxukwueylaqgr\",
\"account_type\": \"poupança\",
\"pix_key\": \"kemtk\",
\"favorite\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/13/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33"
);
const headers = {
"Authorization": "Bearer aZ13VdPvb4hcg6Df6e5aEk8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_id": "nisi",
"agency": "yqrcl",
"account": "aqbvuoosxukwueylaqgr",
"account_type": "poupança",
"pix_key": "kemtk",
"favorite": 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 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 5d3bk6ge18vf6cEaah4PVZD" \
--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 5d3bk6ge18vf6cEaah4PVZD",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List employee EPI deliveries
requires authentication employee-epi index
List EPI deliveries for an employee
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employees/1/epi-deliveries" \
--header "Authorization: Bearer 1E6bc4afh6dPaZVv8geD3k5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"modi\",
\"status\": \"expired\",
\"epi_type_id\": \"vero\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/1/epi-deliveries"
);
const headers = {
"Authorization": "Bearer 1E6bc4afh6dPaZVv8geD3k5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "modi",
"status": "expired",
"epi_type_id": "vero"
};
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/et/epi-deliveries/pending-renewals-count" \
--header "Authorization: Bearer 8PZk1hfED64evbcadag36V5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/et/epi-deliveries/pending-renewals-count"
);
const headers = {
"Authorization": "Bearer 8PZk1hfED64evbcadag36V5",
"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/illum" \
--header "Authorization: Bearer ZPa6Egdhk4be1V35cD86vaf" \
--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/illum"
);
const headers = {
"Authorization": "Bearer ZPa6Egdhk4be1V35cD86vaf",
"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/1/epi-deliveries" \
--header "Authorization: Bearer P8hVfadbgck6v3Ze6D45a1E" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"epi_type_id\": \"9b7e6b4a-dbe6-3d09-8316-cf64cb121b3a\",
\"delivery_date\": \"2024-01-01\",
\"quantity\": 1,
\"condition\": \"Example Condition\",
\"lot\": \"Example Lot\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/1/epi-deliveries"
);
const headers = {
"Authorization": "Bearer P8hVfadbgck6v3Ze6D45a1E",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"epi_type_id": "9b7e6b4a-dbe6-3d09-8316-cf64cb121b3a",
"delivery_date": "2024-01-01",
"quantity": 1,
"condition": "Example Condition",
"lot": "Example Lot"
};
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/tempora/epi-deliveries/kit" \
--header "Authorization: Bearer 6kaDPhvdEZ3ce8V6g5afb41" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"delivery_date\": \"2024-01-01\",
\"items\": [
{
\"epi_type_id\": \"2b39f2cb-a4dd-3a6a-8bec-30ec011b88ce\",
\"quantity\": 1,
\"condition\": \"Example Items * condition\",
\"lot\": \"Example Items * lot\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/tempora/epi-deliveries/kit"
);
const headers = {
"Authorization": "Bearer 6kaDPhvdEZ3ce8V6g5afb41",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"delivery_date": "2024-01-01",
"items": [
{
"epi_type_id": "2b39f2cb-a4dd-3a6a-8bec-30ec011b88ce",
"quantity": 1,
"condition": "Example Items * condition",
"lot": "Example Items * lot"
},
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.
Update employee EPI delivery
requires authentication employee-epi update
Update an EPI delivery for an employee
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/employees/1/epi-deliveries/nemo" \
--header "Authorization: Bearer DEfe6aa84b5k3gdv6hV1PcZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"epi_type_id\": \"bc3dc37c-e3ff-38a6-b9d8-c5503a6cd1c0\",
\"delivery_date\": \"2024-01-01\",
\"quantity\": 1,
\"condition\": \"Example Condition\",
\"lot\": \"Example Lot\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/1/epi-deliveries/nemo"
);
const headers = {
"Authorization": "Bearer DEfe6aa84b5k3gdv6hV1PcZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"epi_type_id": "bc3dc37c-e3ff-38a6-b9d8-c5503a6cd1c0",
"delivery_date": "2024-01-01",
"quantity": 1,
"condition": "Example Condition",
"lot": "Example Lot"
};
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/architecto/epi-deliveries/debitis" \
--header "Authorization: Bearer fgeD3V61Z8daa5kEc46hbPv" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/architecto/epi-deliveries/debitis"
);
const headers = {
"Authorization": "Bearer fgeD3V61Z8daa5kEc46hbPv",
"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/5/epi-terms" \
--header "Authorization: Bearer 3fbV4k5g1v6DhE8cZ6eaaPd" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"delivery_date\",
\"sort_desc\": false,
\"page\": 34,
\"per_page\": 7,
\"q\": \"earum\",
\"employee_id\": \"molestiae\",
\"has_term\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/5/epi-terms"
);
const headers = {
"Authorization": "Bearer 3fbV4k5g1v6DhE8cZ6eaaPd",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "delivery_date",
"sort_desc": false,
"page": 34,
"per_page": 7,
"q": "earum",
"employee_id": "molestiae",
"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/accusantium/epi-terms/cf3a8168-5c4d-3b7e-b306-bf1c059f1491/upload" \
--header "Authorization: Bearer VE6c416hb3Pg8adfZkeavD5" \
--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/accusantium/epi-terms/cf3a8168-5c4d-3b7e-b306-bf1c059f1491/upload"
);
const headers = {
"Authorization": "Bearer VE6c416hb3Pg8adfZkeavD5",
"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/velit/epi-terms/d2831402-2c6f-32e0-a4f3-c3040e5bed0d/document" \
--header "Authorization: Bearer 6cVae4Z1D38bfhkgdv6Ea5P" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/velit/epi-terms/d2831402-2c6f-32e0-a4f3-c3040e5bed0d/document"
);
const headers = {
"Authorization": "Bearer 6cVae4Z1D38bfhkgdv6Ea5P",
"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/42bd15e0-01f6-31cf-8db5-8d436edd55f4" \
--header "Authorization: Bearer 8ZdEb4gDf61eavkV5chP36a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/42bd15e0-01f6-31cf-8db5-8d436edd55f4"
);
const headers = {
"Authorization": "Bearer 8ZdEb4gDf61eavkV5chP36a",
"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/189dd7b2-e6cc-341b-a71c-c77b61c6bb58/info" \
--header "Authorization: Bearer f5deEahgc6aDZ4638vkP1Vb" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/189dd7b2-e6cc-341b-a71c-c77b61c6bb58/info"
);
const headers = {
"Authorization": "Bearer f5deEahgc6aDZ4638vkP1Vb",
"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/a2b844c8-5b96-3afa-943a-d1debfa64c45/download" \
--header "Authorization: Bearer d1khEZg5abPvD86f463aVec" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/a2b844c8-5b96-3afa-943a-d1debfa64c45/download"
);
const headers = {
"Authorization": "Bearer d1khEZg5abPvD86f463aVec",
"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 ZDahgev86ba164Pk3V5dfcE" \
--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 ZDahgev86ba164Pk3V5dfcE",
"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 Vkd1Efgec3ahbDv66P8Za54" \
--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 Vkd1Efgec3ahbDv66P8Za54",
"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 a8vE1h3faZVdD6kePc5b46g" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"aut\",
\"supplier_id\": \"eligendi\",
\"work_id\": \"sed\",
\"start_date\": \"2026-07-31T17:38:29\",
\"end_date\": \"2094-06-25\",
\"per_page\": 5
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);
const headers = {
"Authorization": "Bearer a8vE1h3faZVdD6kePc5b46g",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "aut",
"supplier_id": "eligendi",
"work_id": "sed",
"start_date": "2026-07-31T17:38:29",
"end_date": "2094-06-25",
"per_page": 5
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"nfe_access_key": null,
"nfe_number": null,
"nfe_series": null,
"issue_date": null,
"total_value": null,
"emit": {
"cnpj": null,
"name": null
},
"dest": {
"document": null,
"name": null
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
},
{
"id": null,
"nfe_access_key": null,
"nfe_number": null,
"nfe_series": null,
"issue_date": null,
"total_value": null,
"emit": {
"cnpj": null,
"name": null
},
"dest": {
"document": null,
"name": null
},
"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 ea165gvkhf86dZbVaDEP3c4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"s3_file_path\": \"unde\",
\"original_filename\": \".xml$\\/i\",
\"work_ids\": [
\"esse\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);
const headers = {
"Authorization": "Bearer ea165gvkhf86dZbVaDEP3c4",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"s3_file_path": "unde",
"original_filename": ".xml$\/i",
"work_ids": [
"esse"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": null,
"nfe_access_key": null,
"nfe_number": null,
"nfe_series": null,
"issue_date": null,
"total_value": null,
"emit": {
"cnpj": null,
"name": null
},
"dest": {
"document": null,
"name": null
},
"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/ratione" \
--header "Authorization: Bearer 6bdEaagc1D6h54Zv3Pkf8eV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/ratione"
);
const headers = {
"Authorization": "Bearer 6bdEaagc1D6h54Zv3Pkf8eV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": null,
"nfe_access_key": null,
"nfe_number": null,
"nfe_series": null,
"issue_date": null,
"total_value": null,
"emit": {
"cnpj": null,
"name": null
},
"dest": {
"document": null,
"name": null
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete fiscal document
requires authentication fiscal-documents delete
Exclui definitivamente uma nota fiscal. Não permitido quando a nota já gerou parcelas no financeiro ou já teve produtos importados.
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/earum" \
--header "Authorization: Bearer fP3v84ahD6k1Ede6b5ZgcVa" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/earum"
);
const headers = {
"Authorization": "Bearer fP3v84ahD6k1Ede6b5ZgcVa",
"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/voluptatibus/files" \
--header "Authorization: Bearer cZD16h85bEV43vaPfgd6kae" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"file\": {
\"path\": \"commodi\",
\"name\": \"veritatis\",
\"extension\": \"repellendus\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/voluptatibus/files"
);
const headers = {
"Authorization": "Bearer cZD16h85bEV43vaPfgd6kae",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"file": {
"path": "commodi",
"name": "veritatis",
"extension": "repellendus"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": null,
"nfe_access_key": null,
"nfe_number": null,
"nfe_series": null,
"issue_date": null,
"total_value": null,
"emit": {
"cnpj": null,
"name": null
},
"dest": {
"document": null,
"name": null
},
"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/quia/files/id" \
--header "Authorization: Bearer 6ZfPek8Vdb6ava4DhcE135g" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/quia/files/id"
);
const headers = {
"Authorization": "Bearer 6ZfPek8Vdb6ava4DhcE135g",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": null,
"nfe_access_key": null,
"nfe_number": null,
"nfe_series": null,
"issue_date": null,
"total_value": null,
"emit": {
"cnpj": null,
"name": null
},
"dest": {
"document": null,
"name": null
},
"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/est/works" \
--header "Authorization: Bearer eDkfgPv1hb4Z58dcV66E3aa" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"work_ids\": [
\"sit\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/est/works"
);
const headers = {
"Authorization": "Bearer eDkfgPv1hb4Z58dcV66E3aa",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"work_ids": [
"sit"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": null,
"nfe_access_key": null,
"nfe_number": null,
"nfe_series": null,
"issue_date": null,
"total_value": null,
"emit": {
"cnpj": null,
"name": null
},
"dest": {
"document": null,
"name": null
},
"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 65a13PhbZDagd4v8Vk6cfeE" \
--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\": \"019556e7-2e9f-777c-a177-30bbf0646c32\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/nfe/products"
);
const headers = {
"Authorization": "Bearer 65a13PhbZDagd4v8Vk6cfeE",
"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": "019556e7-2e9f-777c-a177-30bbf0646c32"
};
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 4dPaVavE6368gh5Dc1kbZfe" \
--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 4dPaVavE6368gh5Dc1kbZfe",
"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/laboriosam" \
--header "Authorization: Bearer 86Eg1edDcfaZ3vakb6hP54V" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/laboriosam"
);
const headers = {
"Authorization": "Bearer 86Eg1edDcfaZ3vakb6hP54V",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Import details retrieved successfully):
{
"import_id": "9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a",
"status": "completed",
"import_type": "nfe",
"original_filename": "nota_fiscal_001.xml",
"nfe_number": "123456",
"nfe_date": "2023-12-01",
"total_products": 15,
"processed_products": 10,
"progress_percentage": 66.67,
"auto_linked_count": 4,
"stock_launched_count": 7,
"pending_stock_launch_count": 3,
"imported_by": "João Silva",
"imported_at": "2023-12-01T10:30:00.000Z",
"supplier": {
"id": "supplier-uuid",
"name": "Fornecedor Ltda",
"document": "12345678000199"
},
"channel": "import-progress.9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Import
requires authentication imports delete
Delete an NFe import along with its supplier products and pending link mappings. Only allowed when no imported product has been linked to a system product and the import is not being processed.
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/imports/non" \
--header "Authorization: Bearer k64d5Vga6c3hDf1vbe8ZEaP" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/non"
);
const headers = {
"Authorization": "Bearer k64d5Vga6c3hDf1vbe8ZEaP",
"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/est/products?sort_by=created_at&sort_desc=1&page=1&per_page=15&status=pending&q=Produto+ABC" \
--header "Authorization: Bearer vcak4P3VeZ8hfb6Eda15g6D" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/est/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 vcak4P3VeZ8hfb6Eda15g6D",
"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/accusamus/distributions" \
--header "Authorization: Bearer D683gcabEfd1P4hke6vaV5Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/accusamus/distributions"
);
const headers = {
"Authorization": "Bearer D683gcabEfd1P4hke6vaV5Z",
"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/asperiores/products/link" \
--header "Authorization: Bearer gdcD1V46hf36PvZ8aeE5akb" \
--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/asperiores/products/link"
);
const headers = {
"Authorization": "Bearer gdcD1V46hf36PvZ8aeE5akb",
"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 kg18Ve665bP3cahZ4faDEdv" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"illo\",
\"sort_desc\": false,
\"page\": 34,
\"per_page\": 3
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/locations/states"
);
const headers = {
"Authorization": "Bearer kg18Ve665bP3cahZ4faDEdv",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "illo",
"sort_desc": false,
"page": 34,
"per_page": 3
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "et enim",
"abbreviation": "HL"
},
{
"id": null,
"name": "tempore autem",
"abbreviation": "FJ"
}
],
"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 1DZ5bdhafe6vE43cVa6gkP8" \
--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 1DZ5bdhafe6vE43cVa6gkP8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "Deeburgh"
},
{
"id": null,
"name": "Port Martineview"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 eZgaDEV68k3c6Ph5va1f4db" \
--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 eZgaDEV68k3c6Ph5va1f4db",
"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 ePdhEk6v58gD4ZVf61caa3b" \
--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 ePdhEk6v58gD4ZVf61caa3b",
"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 vaf36adkVgEZhb41e86D5Pc" \
--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 vaf36adkVgEZhb41e86D5Pc",
"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 cvP4613hbd5Vf6agaZEe8kD" \
--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 cvP4613hbd5Vf6agaZEe8kD",
"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 5vaV6DE6kh1gZa3Pc4bfd8e" \
--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 5vaV6DE6kh1gZa3Pc4bfd8e",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Payment Receipts
Endpoints for payment receipts
List payment receipts
requires authentication payment-receipt index
List all payment receipts with filters
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/payment-receipts?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Jo%C3%A3o+Silva&employee_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&receiver_type=employee&start_date=2025-01-01&end_date=2025-12-31&min_amount=100&max_amount=1000&payment_method=PIX&city=S%C3%A3o+Paulo&search=aut&document=possimus&work_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&bank_account_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3" \
--header "Authorization: Bearer vfbak36Zc4dag856VDh1eEP" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "João Silva",
"employee_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
"receiver_type": "employee",
"start_date": "2025-01-01",
"end_date": "2025-12-31",
"min_amount": "100",
"max_amount": "1000",
"payment_method": "PIX",
"city": "São Paulo",
"search": "aut",
"document": "possimus",
"work_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
"bank_account_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer vfbak36Zc4dag856VDh1eEP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "ab64e969-ac48-3666-82a4-80fd0af14557",
"receipt_number": "REC-8846",
"receiver_type": "employee",
"receiver": {
"id": null,
"name": "Rey Daniel",
"document": "383.179.573-21"
},
"payment": {
"amount": 1195.73,
"amount_in_words": "Valor por extenso de teste",
"method": "bank_transfer",
"description": "Inventore eum qui perspiciatis optio quae est."
},
"issuer": {
"name": "Sporer-Kuhic",
"document": "59.312.987/7171-61"
},
"issue": {
"date": "2026-07-05",
"city": "Adellburgh",
"state": "MG"
},
"created_by": {
"id": "a2649dfc-b035-4934-addc-623fef68726f",
"name": "Lucio Kunde"
},
"created_at": null,
"updated_at": null
},
{
"id": "0ffe17dd-f6db-3054-becb-8c4d57f90712",
"receipt_number": "REC-6124",
"receiver_type": "employee",
"receiver": {
"id": null,
"name": "Nigel Sanford DDS",
"document": "461.638.677-06"
},
"payment": {
"amount": 1656.87,
"amount_in_words": "Valor por extenso de teste",
"method": "cash",
"description": "Recusandae qui voluptatem saepe omnis architecto."
},
"issuer": {
"name": "Spencer, Mayert and Breitenberg",
"document": "34.732.827/0889-12"
},
"issue": {
"date": "2026-07-03",
"city": "North Colbyside",
"state": "GO"
},
"created_by": {
"id": "a2649dfc-b34c-4c69-b4ff-c5dae5765312",
"name": "Miss Sonya Mosciski III"
},
"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.
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 1P6eV5gc8Df4aE6vdZh3akb" \
--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 1P6eV5gc8Df4aE6vdZh3akb",
"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 3DebP64a18Ed5vfc6kaghZV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"methods\": [
{
\"method\": \"pix\",
\"eligible\": false
}
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/cash-flow-config"
);
const headers = {
"Authorization": "Bearer 3DebP64a18Ed5vfc6kaghZV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"methods": [
{
"method": "pix",
"eligible": false
}
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show payment receipt
requires authentication payment-receipt show
Show a payment receipt
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer a18Pkv4d3VeZ66gEhabDcf5" \
--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 a18Pkv4d3VeZ66gEhabDcf5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a582a822-c1eb-3651-9675-61666d7762ef",
"receipt_number": "REC-5832",
"receiver_type": "employee",
"receiver": {
"id": null,
"name": "Dora Metz",
"document": "654.171.092-33"
},
"payment": {
"amount": 6812.7,
"amount_in_words": "Valor por extenso de teste",
"method": "bank_transfer",
"description": "Qui ipsam accusamus est qui unde."
},
"issuer": {
"name": "Cassin, Weissnat and Dare",
"document": "32.394.122/2818-87"
},
"issue": {
"date": "2026-07-09",
"city": "New Caleighmouth",
"state": "SP"
},
"created_by": {
"id": "a2649dfc-c075-492d-822f-d9a2cfb5119e",
"name": "Miss Lillie Huel V"
},
"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 Z3ck8a41hdPbeE5V6aDf6gv" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"receiver_type\": \"Example Receiver type\",
\"employee_id\": \"8dfb4968-7c54-4bb3-ab85-963477f629b3\",
\"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\": \"6aed1b6b-9e1d-34de-822f-5236e93f168f\",
\"bank_account_id\": \"f5ad59bf-73a5-3c08-89af-b29002c1ab51\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts"
);
const headers = {
"Authorization": "Bearer Z3ck8a41hdPbeE5V6aDf6gv",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"receiver_type": "Example Receiver type",
"employee_id": "8dfb4968-7c54-4bb3-ab85-963477f629b3",
"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": "6aed1b6b-9e1d-34de-822f-5236e93f168f",
"bank_account_id": "f5ad59bf-73a5-3c08-89af-b29002c1ab51"
};
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 D6ghVe64abaEvf5P3k81dZc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"receiver_type\": \"Example Receiver type\",
\"employee_id\": \"d08ba66d-08c7-4c93-b605-22209f4e255b\",
\"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\": \"90ba4fa1-e844-3cdc-a474-5f00df995f6f\",
\"bank_account_id\": \"b2e0acf3-d43e-3d54-b8d7-7fe5d3cb362a\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer D6ghVe64abaEvf5P3k81dZc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"receiver_type": "Example Receiver type",
"employee_id": "d08ba66d-08c7-4c93-b605-22209f4e255b",
"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": "90ba4fa1-e844-3cdc-a474-5f00df995f6f",
"bank_account_id": "b2e0acf3-d43e-3d54-b8d7-7fe5d3cb362a"
};
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 461Dcaevdbga5h3VPZEfk68" \
--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 461Dcaevdbga5h3VPZEfk68",
"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/1/receipts" \
--header "Authorization: Bearer avkb1d66hf3cVe5ZPDgE4a8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/1/receipts"
);
const headers = {
"Authorization": "Bearer avkb1d66hf3cVe5ZPDgE4a8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "b8d06c9e-8f42-3a52-9941-5b3d3384898b",
"receipt_number": "REC-5555",
"receiver_type": "employee",
"receiver": {
"id": null,
"name": "Vida Beer",
"document": "907.235.512-45"
},
"payment": {
"amount": 2560.6,
"amount_in_words": "Valor por extenso de teste",
"method": "pix",
"description": "Et aut ipsa laboriosam perspiciatis voluptas perferendis."
},
"issuer": {
"name": "Christiansen and Sons",
"document": "95.533.615/8856-86"
},
"issue": {
"date": "2026-07-15",
"city": "Julestown",
"state": "BA"
},
"created_by": {
"id": "a2649dfc-f8fd-4669-bf6f-5e942b8cfcf3",
"name": "Darian Nikolaus"
},
"created_at": null,
"updated_at": null
},
{
"id": "025cbadf-c2b5-3ca2-8c82-472332792f86",
"receipt_number": "REC-5252",
"receiver_type": "employee",
"receiver": {
"id": null,
"name": "Ms. Amely Kessler",
"document": "037.772.808-15"
},
"payment": {
"amount": 7841.04,
"amount_in_words": "Valor por extenso de teste",
"method": "cash",
"description": "Id iusto quia atque ut."
},
"issuer": {
"name": "Feil Ltd",
"document": "79.407.719/5239-66"
},
"issue": {
"date": "2026-07-24",
"city": "North Xanderland",
"state": "PE"
},
"created_by": {
"id": "a2649dfc-fb5c-4d94-af09-ecfcf631093f",
"name": "Delphine Auer"
},
"created_at": null,
"updated_at": null
}
],
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"has_more_pages": false
},
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Permission Groups
Endpoints for permission groups
List ungrouped permissions
requires authentication permission-group index
List all permissions that do not belong to any permission group.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/permission-groups/ungrouped-permissions?q=Permission+name&page=1&per_page=10" \
--header "Authorization: Bearer 5DgE8Zcfadvk41h6P3Vba6e" \
--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 5DgE8Zcfadvk41h6P3Vba6e",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "7da9d034-0e20-3dfd-a69a-a4ce6671f786",
"name": "consequatur",
"display_name": "Ullam sit voluptatem est nulla."
},
{
"id": "d5e1fe5d-d6e7-3047-873c-78e9ffb85a6f",
"name": "aperiam",
"display_name": "Voluptas facere error at aut."
}
],
"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 Pe53kb866ZEchVaD1v4gfda" \
--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 Pe53kb866ZEchVaD1v4gfda",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "0a781dfe-ac30-357e-8f69-266b90973660",
"name": "aut-officiis-iste",
"display_name": "molestiae voluptatem est",
"created_at": null,
"updated_at": null
},
{
"id": "6e4ed32a-d879-3f4d-8b30-4cabca3778d5",
"name": "non-dicta-et",
"display_name": "amet quo illum",
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 VabfedZh6cP6DaEg48vk153" \
--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 VabfedZh6cP6DaEg48vk153",
"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 6h14v6aZ8dE3PgaeDVcbfk5" \
--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 6h14v6aZ8dE3PgaeDVcbfk5",
"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 538EekVa6ah4Pb6gDdfZv1c" \
--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 538EekVa6ah4Pb6gDdfZv1c",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "14e0b0f0-ef2f-365e-be27-84660c7d5039",
"name": "nobis-vel",
"display_name": "facere dolorum ipsa",
"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 dagV6D5kPfa4he6b81vZ3Ec" \
--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 dagV6D5kPfa4he6b81vZ3Ec",
"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 v8akD6PVb5Eg1634daZhfec" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"bb9c67d5-756f-3a4e-8bd7-f15459f08e91\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);
const headers = {
"Authorization": "Bearer v8akD6PVb5Eg1634daZhfec",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"bb9c67d5-756f-3a4e-8bd7-f15459f08e91"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "bf3a4ff9-0711-324f-9408-e9339a197595",
"name": "nulla-occaecati",
"display_name": "et perferendis 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.
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 baaDk6c54dh3eEvPgV6Z81f" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"c8d0ccb6-404e-3291-bf79-40af264395b6\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);
const headers = {
"Authorization": "Bearer baaDk6c54dh3eEvPgV6Z81f",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"c8d0ccb6-404e-3291-bf79-40af264395b6"
]
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "6715082f-4898-3ccd-97aa-8a1783131718",
"name": "illo-ratione",
"display_name": "fugit enim nobis",
"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 adkDPa14EZ8c65e6Vbfgvh3" \
--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 adkDPa14EZ8c65e6Vbfgvh3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "ba2fa03a-ee8f-3add-b79e-5a71173faec5",
"name": "Thomas Pontes Marques Sobrinho",
"created_at": null,
"updated_at": null
},
{
"id": "56f1279b-0967-33ee-9d24-64c9d20b13a0",
"name": "Vicente Cordeiro Gomes Sobrinho",
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show product brand
requires authentication product-brand show
Show a product brand
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-brands/et" \
--header "Authorization: Bearer 5ZhP8aDegEdc466kfa31Vvb" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-brands/et"
);
const headers = {
"Authorization": "Bearer 5ZhP8aDegEdc466kfa31Vvb",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d317eea9-23a3-3aaa-8df3-b1885a425bc2",
"name": "Dr. Paula das Dores",
"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 c635PvgaE4fdahVkbe618DZ" \
--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 c635PvgaE4fdahVkbe618DZ",
"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/voluptatem" \
--header "Authorization: Bearer k3dfZDa1chbve6EgV465aP8" \
--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/voluptatem"
);
const headers = {
"Authorization": "Bearer k3dfZDa1chbve6EgV465aP8",
"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/rerum" \
--header "Authorization: Bearer ck43a15VvdDPgfhb6Z68Eea" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-brands/rerum"
);
const headers = {
"Authorization": "Bearer ck43a15VvdDPgfhb6Z68Eea",
"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?q=Structure" \
--header "Authorization: Bearer ehEcvfb1DZg486aPkV3d56a" \
--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 = {
"q": "Structure",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ehEcvfb1DZg486aPkV3d56a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "7c70d06e-6bd4-36fb-aaaf-fa8e226e07e2",
"name": "Samuel de Aguiar Caldeira",
"created_at": null,
"updated_at": null
},
{
"id": "8697a4f0-5582-3355-ba6b-b922df2e30c2",
"name": "Dr. Luiz Artur Pontes Neto",
"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/non" \
--header "Authorization: Bearer gPv5hZkc6V48a1adfE6be3D" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families/non"
);
const headers = {
"Authorization": "Bearer gPv5hZkc6V48a1adfE6be3D",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "df9f5e5e-7e10-3411-b966-b2b54c76b3d9",
"name": "Srta. Elizabeth Benites Abreu Neto",
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 d4ePgEDfV8kZa6163c5avbh" \
--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-families"
);
const headers = {
"Authorization": "Bearer d4ePgEDfV8kZa6163c5avbh",
"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 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/cupiditate" \
--header "Authorization: Bearer kfZev451c3gEPbh86aaVd6D" \
--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-families/cupiditate"
);
const headers = {
"Authorization": "Bearer kfZev451c3gEPbh86aaVd6D",
"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 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/quis" \
--header "Authorization: Bearer kv38Vf51aPcD6aZe6h4dgbE" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families/quis"
);
const headers = {
"Authorization": "Bearer kv38Vf51aPcD6aZe6h4dgbE",
"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 6df3VbvaEDaekg14c8P56hZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"Example Q\",
\"work_id\": \"06a7b789-3653-3421-82ec-f168da2346c2\",
\"user_id\": \"9ac07dfa-bc51-3d39-8c37-438aee926476\",
\"responsible_id\": \"e82f5527-3f44-3512-b653-067d142e9d5d\",
\"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 6df3VbvaEDaekg14c8P56hZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "Example Q",
"work_id": "06a7b789-3653-3421-82ec-f168da2346c2",
"user_id": "9ac07dfa-bc51-3d39-8c37-438aee926476",
"responsible_id": "e82f5527-3f44-3512-b653-067d142e9d5d",
"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": "da0cd7e5-d96b-32e1-aa46-4e3239b1df74",
"name": "Velit non sed unde nemo.",
"description": null,
"work": {
"id": "a2649dfd-8cbd-4889-9310-cbe265d22d0c",
"name": "Stephany Aragão"
},
"user": {
"id": "a2649dfd-8fd5-4e68-84d0-59739d0083dc",
"name": "Dr. Willard Towne PhD"
},
"created_at": null,
"updated_at": null
},
{
"id": "ec0affa9-6b3b-373b-95c6-c0a336f97595",
"name": "Ea itaque nulla reprehenderit.",
"description": null,
"work": {
"id": "a2649dfd-9368-4e96-bb27-06a039256599",
"name": "Mel Arruda Jr."
},
"user": {
"id": "a2649dfd-9640-4619-96ad-89babceb3b5e",
"name": "Edison Jast"
},
"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/ipsam" \
--header "Authorization: Bearer d6E1kPvefaV4gD835Zc6hab" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/ipsam"
);
const headers = {
"Authorization": "Bearer d6E1kPvefaV4gD835Zc6hab",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "f5ba15ca-4576-39ed-a562-40281294afe4",
"name": "Harum tenetur dolores.",
"description": "Cumque in sapiente temporibus aut atque impedit. Quia consequatur ut debitis nulla officiis. Aspernatur est perferendis optio. Eligendi velit omnis officiis eum.",
"work": {
"id": "a2649dfd-9dc3-4c85-8918-a7eba10ba738",
"name": "Dr. Carla Isabella Fernandes"
},
"user": {
"id": "a2649dfd-a0ba-473f-9011-e8c1053e3906",
"name": "Vesta Lakin"
},
"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/in/items" \
--header "Authorization: Bearer 613dPEafk8b46hVZav5gDec" \
--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/in/items"
);
const headers = {
"Authorization": "Bearer 613dPEafk8b46hVZav5gDec",
"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": "34286a69-083b-36df-b252-219dfea24f3f",
"product": {
"id": "a2649dfd-b423-479d-bcc7-06c73226098c",
"name": "Srta. Constância Neves Balestero",
"code": "PRD-399501",
"unit": {
"id": "a2649dfd-b226-4a21-abc0-507c2b21455a",
"name": "Dr. Renan Teles",
"abbreviation": "Thiago Galindo"
}
},
"quantity": 131.9737,
"observation": null,
"created_at": null,
"updated_at": null
},
{
"id": "01fe7c46-5f3b-39e7-8579-db0cb9c916aa",
"product": {
"id": "a2649dfd-c399-42a6-9ddd-81f85b052d88",
"name": "Isabel Thaís Maldonado Neto",
"code": "PRD-231521",
"unit": {
"id": "a2649dfd-c261-48a5-9ebd-0e03fa3422be",
"name": "Sr. Deivid Gusmão Sobrinho",
"abbreviation": "Flávio Maia"
}
},
"quantity": 157.9435,
"observation": null,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 6aZ4vf183gPakEhcDbdV56e" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"7dc34309-fbc0-34a7-94ac-53b1e1755462\",
\"items\": [
{
\"product_id\": \"e8e5c5a7-16c1-31c9-b90e-afaece631184\",
\"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 6aZ4vf183gPakEhcDbdV56e",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "7dc34309-fbc0-34a7-94ac-53b1e1755462",
"items": [
{
"product_id": "e8e5c5a7-16c1-31c9-b90e-afaece631184",
"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/ipsa" \
--header "Authorization: Bearer cDdbf38a4kEP5ehv6Vg61aZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"items\": [
{
\"id\": \"c9a950b1-adf2-3f69-aed1-81d8d4db543e\",
\"product_id\": \"b1e6190d-d819-3a53-80e1-4b1e7b4a8128\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/ipsa"
);
const headers = {
"Authorization": "Bearer cDdbf38a4kEP5ehv6Vg61aZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"items": [
{
"id": "c9a950b1-adf2-3f69-aed1-81d8d4db543e",
"product_id": "b1e6190d-d819-3a53-80e1-4b1e7b4a8128",
"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/fugit" \
--header "Authorization: Bearer ZV5f3a4kdE8De61cPh6vbag" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/fugit"
);
const headers = {
"Authorization": "Bearer ZV5f3a4kdE8De61cPh6vbag",
"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/facere/items" \
--header "Authorization: Bearer Pva3DfE6V5bdgek1h84aZc6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"product_id\": \"2efe3e40-f571-3207-a5d7-a04be22c910f\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/facere/items"
);
const headers = {
"Authorization": "Bearer Pva3DfE6V5bdgek1h84aZc6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"product_id": "2efe3e40-f571-3207-a5d7-a04be22c910f",
"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/ducimus" \
--header "Authorization: Bearer dhgZ53c64baDEVk8fa6ePv1" \
--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/ducimus"
);
const headers = {
"Authorization": "Bearer dhgZ53c64baDEVk8fa6ePv1",
"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/consequuntur/items" \
--header "Authorization: Bearer bPfVg6ak4vD6caE18e35Zdh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"09dfc0c1-600d-342e-b5aa-29fa837a0bce\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/consequuntur/items"
);
const headers = {
"Authorization": "Bearer bPfVg6ak4vD6caE18e35Zdh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"09dfc0c1-600d-342e-b5aa-29fa837a0bce"
]
};
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/vel/sync-items" \
--header "Authorization: Bearer aeVh16fk6P4dgE8Dca5Zv3b" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"id\": \"22448d40-5f60-3a47-a1fb-bbace6f25447\",
\"product_id\": \"c334aac1-1d2e-3369-a627-c902da32c346\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/vel/sync-items"
);
const headers = {
"Authorization": "Bearer aeVh16fk6P4dgE8Dca5Zv3b",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"id": "22448d40-5f60-3a47-a1fb-bbace6f25447",
"product_id": "c334aac1-1d2e-3369-a627-c902da32c346",
"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/rem/fulfill" \
--header "Authorization: Bearer E5cg4Z1a38h66PVfdkDbeva" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"fulfillment_type\": \"Example Fulfillment type\",
\"stock_id\": \"f8ff0f54-3f4c-3621-8558-a2cbd51b3643\",
\"quantity\": 1,
\"source_stock_id\": \"70e12277-372e-31f9-87b7-1c4987dd26c8\",
\"reason\": \"Example Reason\",
\"origins\": [
{
\"supplier_product_id\": \"751612e5-5790-35ed-bce0-2c4b19f9b901\",
\"quantity\": 1
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/rem/fulfill"
);
const headers = {
"Authorization": "Bearer E5cg4Z1a38h66PVfdkDbeva",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"fulfillment_type": "Example Fulfillment type",
"stock_id": "f8ff0f54-3f4c-3621-8558-a2cbd51b3643",
"quantity": 1,
"source_stock_id": "70e12277-372e-31f9-87b7-1c4987dd26c8",
"reason": "Example Reason",
"origins": [
{
"supplier_product_id": "751612e5-5790-35ed-bce0-2c4b19f9b901",
"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/rerum/fulfillments" \
--header "Authorization: Bearer 3c41g865DfPhVaZedvakEb6" \
--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/rerum/fulfillments"
);
const headers = {
"Authorization": "Bearer 3c41g865DfPhVaZedvakEb6",
"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": "6c41d362-283d-3566-8b8a-f494c33de4c5",
"quantity": 9.5185,
"fulfilled_at": "2026-07-13T20:18:33.000000Z",
"created_at": null
},
{
"id": "b17dc9ed-b26c-39ea-8dc3-9dc44b78fa3a",
"quantity": 98.0832,
"fulfilled_at": "2026-07-03T15:18:31.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/consectetur" \
--header "Authorization: Bearer c653dP1evhkbf6aZD4gaVE8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/consectetur"
);
const headers = {
"Authorization": "Bearer c653dP1evhkbf6aZD4gaVE8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "7be847af-5457-3714-b8bb-c69f2f676887",
"product": {
"id": "a2649e01-a536-4c30-a1af-bb5706267f8f",
"name": "Sr. Maicon Campos Sobrinho",
"code": "PRD-009187",
"unit": {
"id": "a2649e01-a444-473f-8873-bd27538c1355",
"name": "Dr. Reinaldo Alcantara Filho",
"abbreviation": "Joaquim Prado"
}
},
"quantity": 733.2517,
"quantity_fulfilled": 0,
"quantity_pending": 733.2517,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Omnis beatae sed a ipsam labore reprehenderit.",
"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/itaque/pending-items" \
--header "Authorization: Bearer Zbae8665fvkg3h4a1cPEDdV" \
--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/itaque/pending-items"
);
const headers = {
"Authorization": "Bearer Zbae8665fvkg3h4a1cPEDdV",
"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": "d06cf30e-9d6f-3958-83df-72a17c55ea74",
"product": {
"id": "a2649e01-ba8d-423e-bb2a-0168ff6428c1",
"name": "Sra. Manuela Padilha Sobrinho",
"code": "PRD-593243",
"unit": {
"id": "a2649e01-b95f-49a4-8c58-eaad4fe66f71",
"name": "Ariana Beatriz Ramires Sobrinho",
"abbreviation": "Srta. Joyce Colaço Verdugo Jr."
}
},
"quantity": 227.7152,
"quantity_fulfilled": 0,
"quantity_pending": 227.7152,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Excepturi sint eligendi ullam et cupiditate pariatur quia.",
"created_at": null,
"updated_at": null
},
{
"id": "7cc99bfe-e467-3e88-8ba9-3d99ef9ef192",
"product": {
"id": "a2649e01-cb5a-4d45-8ff5-0bf822f6c6c3",
"name": "Dr. Rodolfo Matos Marques Filho",
"code": "PRD-418231",
"unit": {
"id": "a2649e01-ca3e-4e91-8f91-cf8d0965c9d9",
"name": "Sr. Wagner Padilha Serna",
"abbreviation": "Hortência Barros Zambrano"
}
},
"quantity": 341.596,
"quantity_fulfilled": 0,
"quantity_pending": 341.596,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": null,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List pending items by product
requires authentication product-request show
List all pending product request items for a specific product
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-requests/pending-by-product/eos" \
--header "Authorization: Bearer vfg58aZd6e6VPckah34ED1b" \
--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/eos"
);
const headers = {
"Authorization": "Bearer vfg58aZd6e6VPckah34ED1b",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "c23ffa3f-22ad-338e-9a37-88ca6d2693db",
"product": {
"id": "a2649e01-e0bf-482b-94fc-9c3a0f4bbfc8",
"name": "Isis Fontes Sobrinho",
"code": "PRD-070855",
"unit": {
"id": "a2649e01-df74-4fcd-839e-a94b9c5586c9",
"name": "Maraisa Alves",
"abbreviation": "Dr. Letícia Cristina Santos"
}
},
"quantity": 983.3415,
"quantity_fulfilled": 0,
"quantity_pending": 983.3415,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Dolorem nihil accusamus pariatur quasi amet deleniti iure.",
"created_at": null,
"updated_at": null
},
{
"id": "10875c0a-c33d-3383-af13-63d726234bfc",
"product": {
"id": "a2649e01-efb1-43b7-acd5-13bdc2e05d87",
"name": "Sra. Ketlin Marés",
"code": "PRD-707962",
"unit": {
"id": "a2649e01-eeb1-4b0e-a43a-c707fe8e8130",
"name": "Analu Molina Sobrinho",
"abbreviation": "Sra. Gisela Marques Ramires"
}
},
"quantity": 470.562,
"quantity_fulfilled": 0,
"quantity_pending": 470.562,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Magni et et laudantium numquam eos quibusdam corrupti.",
"created_at": null,
"updated_at": null
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 65hegZbd3P6fD4vk8Va1aEc" \
--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\": \"179a3589-158c-37f8-9edd-704685ca5ad9\",
\"work_location_id\": \"0feb45fe-0d45-393e-a83c-67b9672dea55\",
\"user_id\": \"0457afee-aac4-31ad-add2-81b3961e276c\",
\"status_id\": \"0d40f601-7812-3f80-82b0-e250607b7b77\",
\"priority\": \"Example Priority\",
\"needed_at_from\": \"Example Needed at from\",
\"needed_at_to\": \"Example Needed at to\",
\"responsible_id\": \"287fc62c-f850-32d5-8a7f-7f1e47a82fca\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests"
);
const headers = {
"Authorization": "Bearer 65hegZbd3P6fD4vk8Va1aEc",
"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": "179a3589-158c-37f8-9edd-704685ca5ad9",
"work_location_id": "0feb45fe-0d45-393e-a83c-67b9672dea55",
"user_id": "0457afee-aac4-31ad-add2-81b3961e276c",
"status_id": "0d40f601-7812-3f80-82b0-e250607b7b77",
"priority": "Example Priority",
"needed_at_from": "Example Needed at from",
"needed_at_to": "Example Needed at to",
"responsible_id": "287fc62c-f850-32d5-8a7f-7f1e47a82fca"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "29c42b32-b61c-3a6b-89b9-67b022c47b86",
"code": null,
"name": "Vero omnis delectus.",
"description": null,
"work": {
"id": "a2649dff-3876-4644-9e8a-732e73c50dd1",
"name": "Dr. Eliane Gabi Ramos Jr."
},
"user": {
"id": "a2649dff-3b6a-4548-89ba-4d24a04c4e5f",
"name": "Esperanza Corwin"
},
"status": {
"id": "a2649dff-3d7f-4eaf-aa78-ad1e7ec9bafb",
"slug": null,
"name": null,
"description": "Srta. Simone Chaves Domingues",
"abbreviation": "et",
"color": "#fc73f6",
"text_color": "#f9ad8c"
},
"priority": "high",
"priority_label": "Alta",
"needed_at": "2026-08-29",
"approved_at": null,
"rejection_reason": null,
"created_at": null,
"updated_at": null
},
{
"id": "026748e4-6508-31b9-8295-eb20fb288f67",
"code": null,
"name": "Nostrum placeat nobis temporibus.",
"description": null,
"work": {
"id": "a2649dff-41bf-4d81-9ac4-e7234769e36e",
"name": "Dr. Luna Poliana Alcantara"
},
"user": {
"id": "a2649dff-44a3-4f6c-bbaa-72352a92a7d0",
"name": "Theron Zieme"
},
"status": {
"id": "a2649dff-46f3-474a-8cb8-2129006772ff",
"slug": null,
"name": null,
"description": "Regina Zamana Filho",
"abbreviation": "saepe",
"color": "#547161",
"text_color": "#e5508b"
},
"priority": "urgent",
"priority_label": "Urgente",
"needed_at": "2026-08-30",
"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/magni" \
--header "Authorization: Bearer vc6abPZ4ge36EDahdV18k5f" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/magni"
);
const headers = {
"Authorization": "Bearer vc6abPZ4ge36EDahdV18k5f",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "fab95fd9-b8dd-36c8-96bd-40397e41a162",
"code": null,
"name": "Laudantium a ipsam.",
"description": null,
"work": {
"id": "a2649dff-50ea-4164-a342-7a0cf5d125ca",
"name": "Sr. Thiago Fonseca Santos"
},
"user": {
"id": "a2649dff-5420-458b-b2fe-66ecec0599a1",
"name": "Ted Runolfsson I"
},
"status": {
"id": "a2649dff-562e-49c4-bf28-a9cfa318066b",
"slug": null,
"name": null,
"description": "Kevin Delgado",
"abbreviation": "et",
"color": "#815266",
"text_color": "#2a8297"
},
"priority": "low",
"priority_label": "Baixa",
"needed_at": "2026-08-23",
"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/consequuntur/items" \
--header "Authorization: Bearer 5g6bh13DPkvEfZV4c8aaed6" \
--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/consequuntur/items"
);
const headers = {
"Authorization": "Bearer 5g6bh13DPkvEfZV4c8aaed6",
"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": "f886602d-b67f-3f5c-8816-9a78d50dde7f",
"product": {
"id": "a2649dff-71c7-4ede-9ef4-2a5b5e3720ae",
"name": "Srta. Jaqueline Abreu",
"code": "PRD-731826",
"unit": {
"id": "a2649dff-701b-4fb1-8dbe-c78138d90cac",
"name": "Sr. Elias Ferreira Montenegro Sobrinho",
"abbreviation": "Milena Batista"
}
},
"quantity": 761.8099,
"quantity_fulfilled": 0,
"quantity_pending": 761.8099,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Aut quas itaque placeat ut doloribus consequatur.",
"created_at": null,
"updated_at": null
},
{
"id": "317909e1-46c7-348c-8d9c-31e1d46cce60",
"product": {
"id": "a2649dff-841f-4ba9-bc21-47ee93768de2",
"name": "Gabriela Sabrina D'ávila",
"code": "PRD-861145",
"unit": {
"id": "a2649dff-82d8-4c75-bae8-2d4baee5bccb",
"name": "Srta. Kamila Garcia Campos",
"abbreviation": "Dr. Maraisa Clara Delgado Neto"
}
},
"quantity": 901.1748,
"quantity_fulfilled": 0,
"quantity_pending": 901.1748,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Quo repellendus quis nobis sint soluta totam non.",
"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 PbE8Z5v1f3ad6he6DcgV4ak" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"d0c2e269-e59c-3831-9fcb-e419cb7dfe04\",
\"work_location_id\": \"2341df5c-35fb-3c0e-9cf2-6831fa9d29a4\",
\"status_id\": \"c8cc1f4d-e019-3b63-b375-51a52c1e87f7\",
\"priority\": \"Example Priority\",
\"needed_at\": \"Example Needed at\",
\"items\": [
{
\"product_id\": \"101e8597-460e-3818-b583-997536513a89\",
\"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 PbE8Z5v1f3ad6he6DcgV4ak",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "d0c2e269-e59c-3831-9fcb-e419cb7dfe04",
"work_location_id": "2341df5c-35fb-3c0e-9cf2-6831fa9d29a4",
"status_id": "c8cc1f4d-e019-3b63-b375-51a52c1e87f7",
"priority": "Example Priority",
"needed_at": "Example Needed at",
"items": [
{
"product_id": "101e8597-460e-3818-b583-997536513a89",
"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/consequatur" \
--header "Authorization: Bearer 8daPg3ZE4V6v6hebfDk1c5a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"d7c8eb86-5e65-3907-a291-2329873f9e80\",
\"work_location_id\": \"42d78aee-a954-359c-ae7f-a9d469a660ed\",
\"status_id\": \"3e630d7c-7df6-3419-be9b-46401efbf99c\",
\"priority\": \"Example Priority\",
\"needed_at\": \"Example Needed at\",
\"items\": [
{
\"id\": \"cc3abfaf-9cca-3394-9b23-cf483f50f2e3\",
\"product_id\": \"2e5a9548-de19-37c4-8899-db2582c2b3d6\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/consequatur"
);
const headers = {
"Authorization": "Bearer 8daPg3ZE4V6v6hebfDk1c5a",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "d7c8eb86-5e65-3907-a291-2329873f9e80",
"work_location_id": "42d78aee-a954-359c-ae7f-a9d469a660ed",
"status_id": "3e630d7c-7df6-3419-be9b-46401efbf99c",
"priority": "Example Priority",
"needed_at": "Example Needed at",
"items": [
{
"id": "cc3abfaf-9cca-3394-9b23-cf483f50f2e3",
"product_id": "2e5a9548-de19-37c4-8899-db2582c2b3d6",
"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/animi" \
--header "Authorization: Bearer kDv6361dPV8Eaebfh54cZga" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/animi"
);
const headers = {
"Authorization": "Bearer kDv6361dPV8Eaebfh54cZga",
"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/eveniet/approve" \
--header "Authorization: Bearer Z3Pad66h5cDVEvkef8bg4a1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/eveniet/approve"
);
const headers = {
"Authorization": "Bearer Z3Pad66h5cDVEvkef8bg4a1",
"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/libero/reject" \
--header "Authorization: Bearer 8bVc4v56kae16gDPZfd3hEa" \
--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/libero/reject"
);
const headers = {
"Authorization": "Bearer 8bVc4v56kae16gDPZfd3hEa",
"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/quis/items" \
--header "Authorization: Bearer fbkvhadV35E66ZcP81e4aDg" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"product_id\": \"9eee1f82-f857-3217-a65e-30902a1edc7a\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/quis/items"
);
const headers = {
"Authorization": "Bearer fbkvhadV35E66ZcP81e4aDg",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"product_id": "9eee1f82-f857-3217-a65e-30902a1edc7a",
"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/sed" \
--header "Authorization: Bearer 5646kVDv3a1PZgbEfh8aecd" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"quantity\": 1,
\"observation\": \"Example Observation\",
\"status_id\": \"caf13d53-5279-34c4-be2f-028aa41f5610\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/sed"
);
const headers = {
"Authorization": "Bearer 5646kVDv3a1PZgbEfh8aecd",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quantity": 1,
"observation": "Example Observation",
"status_id": "caf13d53-5279-34c4-be2f-028aa41f5610"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": "object"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove items
requires authentication product-request update
Remove one or more product items from the request
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/product-requests/odio/items" \
--header "Authorization: Bearer 3eg8hEPafbZdV16Dc6kv54a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"c7c8ddd1-407a-342b-8bc2-eeddd4d721f0\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/odio/items"
);
const headers = {
"Authorization": "Bearer 3eg8hEPafbZdV16Dc6kv54a",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"c7c8ddd1-407a-342b-8bc2-eeddd4d721f0"
]
};
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/libero/sync-items" \
--header "Authorization: Bearer g5c6fakDhVa68eb1P3E4Zvd" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"id\": \"e2f44562-b7c9-3872-bd76-bd0c9223ebb9\",
\"product_id\": \"048621e8-eb35-3205-a461-5994e37bd8aa\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/libero/sync-items"
);
const headers = {
"Authorization": "Bearer g5c6fakDhVa68eb1P3E4Zvd",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"id": "e2f44562-b7c9-3872-bd76-bd0c9223ebb9",
"product_id": "048621e8-eb35-3205-a461-5994e37bd8aa",
"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" \
--header "Authorization: Bearer Zaa4Df5gk6dVvc6b1hePE83" \
--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",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Zaa4Df5gk6dVvc6b1hePE83",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "f183e018-54f4-32a3-af86-870f5849164f",
"name": "Gabi Vega Reis",
"code": "PRD-227568",
"stock": 331016987,
"product_family": {
"id": "a2649dfd-2a2d-4cf1-9552-5202ce119c47",
"name": "Adriano Vega Rodrigues"
},
"product_brand": {
"id": "a2649dfd-2c5c-4f2b-964e-b0eeb8ab030f",
"name": "Allan Marin"
},
"unit": {
"id": "a2649dfd-2e5d-4b16-91f4-f360cfe104db",
"name": "Marco Luiz Azevedo Neto",
"abbreviation": "Sr. Juan Garcia das Neves"
},
"image": {
"id": null,
"url": null
},
"description": "Optio illum et libero fuga rerum.",
"created_at": null,
"updated_at": null
},
{
"id": "573bcd6e-af6c-36aa-aec7-6a93133e3bfa",
"name": "Dr. Henrique Adriel Faro",
"code": "PRD-584368",
"stock": 3777616,
"product_family": {
"id": "a2649dfd-321d-4ea0-aa26-7f24c261f9c5",
"name": "Sr. Renato Rodrigo Soares"
},
"product_brand": {
"id": "a2649dfd-33ba-42bf-b7bc-ea09094ffae5",
"name": "Dr. Olívia Agatha Colaço Sobrinho"
},
"unit": {
"id": "a2649dfd-3520-410e-a071-6700f672a7d6",
"name": "Sr. Thomas Lovato Benez Neto",
"abbreviation": "Sr. Juan Delvalle"
},
"image": {
"id": null,
"url": null
},
"description": "Reiciendis tenetur neque eaque non est sed.",
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 5DEvcVe4a68gPha1fZ3kb6d" \
--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 5DEvcVe4a68gPha1fZ3kb6d",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "73eb0d4c-8181-3bf7-bef9-3739fd997c1f",
"name": "Thomas Júlio Vieira",
"code": "PRD-631233",
"stock": 152455,
"product_family": {
"id": "a2649dfd-40a5-4515-8988-8db23ac5e0af",
"name": "Sra. Pâmela Emanuelly Amaral"
},
"product_brand": {
"id": "a2649dfd-4261-48fb-b70e-bd9ee04d0dce",
"name": "Paola Delgado Espinoza Filho"
},
"unit": {
"id": "a2649dfd-4421-43de-b8e2-6ad5eb14e55f",
"name": "Angélica Fidalgo Lutero Filho",
"abbreviation": "Dr. Madalena Paes Filho"
},
"image": {
"id": null,
"url": null
},
"description": "Iure ipsam dolor occaecati voluptatem molestiae.",
"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/enim/available-origins" \
--header "Authorization: Bearer 5bcd416g6fVa3PeE8DvZkha" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/enim/available-origins"
);
const headers = {
"Authorization": "Bearer 5bcd416g6fVa3PeE8DvZkha",
"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 a5ave8cP36gbkZ61VDdh4Ef" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"product_family_id\": \"6c46b491-9c05-3d53-88e0-3fff77d7b947\",
\"product_brand_id\": \"9df3c600-bf71-365c-9eef-0f64d2102c6b\",
\"unit_id\": \"6bece2c6-b2b2-3013-8e94-26cf5fc7524b\",
\"description\": \"Example Description\",
\"stock\": 1
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products"
);
const headers = {
"Authorization": "Bearer a5ave8cP36gbkZ61VDdh4Ef",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"product_family_id": "6c46b491-9c05-3d53-88e0-3fff77d7b947",
"product_brand_id": "9df3c600-bf71-365c-9eef-0f64d2102c6b",
"unit_id": "6bece2c6-b2b2-3013-8e94-26cf5fc7524b",
"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 d6aDgvbahc5P64eV38Z1Ekf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"product_family_id\": \"3d933757-fa5c-3940-b218-b43722d72485\",
\"product_brand_id\": \"48401cf1-df76-39f9-b9a3-f59bbf1baba7\",
\"unit_id\": \"200562c8-4992-34c0-be97-fa4f02263ad0\",
\"stock\": 1,
\"description\": \"Example Description\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/1"
);
const headers = {
"Authorization": "Bearer d6aDgvbahc5P64eV38Z1Ekf",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"product_family_id": "3d933757-fa5c-3940-b218-b43722d72485",
"product_brand_id": "48401cf1-df76-39f9-b9a3-f59bbf1baba7",
"unit_id": "200562c8-4992-34c0-be97-fa4f02263ad0",
"stock": 1,
"description": "Example Description"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete product
requires authentication product delete
Delete a product
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/products/et" \
--header "Authorization: Bearer cgfd4a6e8v3PhVEaD1k5Zb6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/et"
);
const headers = {
"Authorization": "Bearer cgfd4a6e8v3PhVEaD1k5Zb6",
"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/acb6ff35-9e08-3040-a48d-4ec3a22337f9/versions" \
--header "Authorization: Bearer ED6kVfaeP54vh8Z6a1cbgd3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"notes\": \"Example Notes\",
\"responsible_user_id\": \"dd9bf3c4-c556-3e4a-8dda-0c3002a8094e\",
\"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/acb6ff35-9e08-3040-a48d-4ec3a22337f9/versions"
);
const headers = {
"Authorization": "Bearer ED6kVfaeP54vh8Z6a1cbgd3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"notes": "Example Notes",
"responsible_user_id": "dd9bf3c4-c556-3e4a-8dda-0c3002a8094e",
"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/7f089a35-197a-37cf-9afd-c1ee38bdc610/versions" \
--header "Authorization: Bearer kbZ4eaE1d6h586cfVD3vgaP" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/7f089a35-197a-37cf-9afd-c1ee38bdc610/versions"
);
const headers = {
"Authorization": "Bearer kbZ4eaE1d6h586cfVD3vgaP",
"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/8e4bba6c-d501-39da-b4e4-9e0b561d3c87" \
--header "Authorization: Bearer E6eDgZfba4635adv8PVhc1k" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/8e4bba6c-d501-39da-b4e4-9e0b561d3c87"
);
const headers = {
"Authorization": "Bearer E6eDgZfba4635adv8PVhc1k",
"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/d4cd71a4-3e66-39db-9b66-8c14e5b01e1e/download" \
--header "Authorization: Bearer 4a5ef38h6cdEaVDvk6gPZ1b" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/d4cd71a4-3e66-39db-9b66-8c14e5b01e1e/download"
);
const headers = {
"Authorization": "Bearer 4a5ef38h6cdEaVDvk6gPZ1b",
"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/aa5cabcb-2f5a-36a8-8a71-f92c313336de/restore" \
--header "Authorization: Bearer va8a53E6b4c61hgfDVeZPdk" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/aa5cabcb-2f5a-36a8-8a71-f92c313336de/restore"
);
const headers = {
"Authorization": "Bearer va8a53E6b4c61hgfDVeZPdk",
"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/d45fac90-1486-3834-b1eb-20faa4f3d829" \
--header "Authorization: Bearer Ekge54d8b6aZvahDPfV316c" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/d45fac90-1486-3834-b1eb-20faa4f3d829"
);
const headers = {
"Authorization": "Bearer Ekge54d8b6aZvahDPfV316c",
"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=d2213245-7ee4-3b17-9653-d3fb762cc55b&work_id=c54fc6c0-b691-35e8-ba1b-7ca24bc50d29&status_id=cfe63ce5-e5a6-3927-bb5b-07187cda1ff3&responsible_id=a33d1d6e-6a2e-3b48-b3d9-0340833118f3" \
--header "Authorization: Bearer 3VEgh58ePvaDfZc4ka1d66b" \
--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": "d2213245-7ee4-3b17-9653-d3fb762cc55b",
"work_id": "c54fc6c0-b691-35e8-ba1b-7ca24bc50d29",
"status_id": "cfe63ce5-e5a6-3927-bb5b-07187cda1ff3",
"responsible_id": "a33d1d6e-6a2e-3b48-b3d9-0340833118f3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 3VEgh58ePvaDfZc4ka1d66b",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "9c73f79b-f669-3204-9fb6-58d2b31c02b3",
"name": "Quas ut aut",
"description": "Sed sapiente incidunt quia qui magni.",
"current_version": 1,
"file": {
"path": "projects/f64cf704-ac4b-320d-aa90-bd099f5cc161.pdf",
"size": "3427476",
"extension": "pdf"
},
"discipline": {
"id": "a2649e01-f7a8-4a46-98b3-66b4037309f2",
"name": "Excepturi",
"code": "JKA"
},
"created_at": null,
"updated_at": null
},
{
"id": "7937bcf7-b6e6-35c0-a7d9-a5e9614a3cb7",
"name": "Ut voluptas sed",
"description": "Ut voluptate maiores molestiae voluptatem totam id possimus.",
"current_version": 1,
"file": {
"path": "projects/683bffed-f493-32ac-95f7-809715c3c16d.pdf",
"size": "3545777",
"extension": "pdf"
},
"discipline": {
"id": "a2649e01-fa5e-44c3-b34f-cefadb5c798e",
"name": "Modi",
"code": "LFH"
},
"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/7" \
--header "Authorization: Bearer a835dfEVhD6eZcgkb4vaP61" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/7"
);
const headers = {
"Authorization": "Bearer a835dfEVhD6eZcgkb4vaP61",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "dea03048-0ec2-32b4-8edb-01db8183a780",
"name": "Natus dolor rem",
"description": "Blanditiis quos dolores inventore est rerum iste delectus.",
"current_version": 1,
"file": {
"path": "projects/c6ff692d-fbce-3ecd-afa3-8731ceb01997.pdf",
"size": "908927",
"extension": "pdf"
},
"discipline": {
"id": "a2649e02-01d5-4633-859f-8acc8ee14e56",
"name": "Impedit",
"code": "ALR"
},
"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 66Zhk8eavbgfcEdPa351V4D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"discipline_id\": \"0f096a2d-6440-3bf7-a7c5-1a697abe8d51\",
\"work_id\": \"20999932-aeb4-3038-baed-5cbd8b4cdbb9\",
\"responsible_user_id\": \"57266379-9518-33aa-87f3-18427ef13447\",
\"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 66Zhk8eavbgfcEdPa351V4D",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"discipline_id": "0f096a2d-6440-3bf7-a7c5-1a697abe8d51",
"work_id": "20999932-aeb4-3038-baed-5cbd8b4cdbb9",
"responsible_user_id": "57266379-9518-33aa-87f3-18427ef13447",
"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 dDh4aVa566e18Zfvk3PEbgc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"discipline_id\": \"9a15f3fc-b345-3338-80e8-390d09d7bd60\",
\"work_id\": \"fdda975b-190d-3fd2-a9ae-b236f8c481ac\",
\"responsible_user_id\": \"2f1a7276-32ba-3c9a-9b56-2e5d48e8d2db\",
\"status_id\": \"d0685686-bcfc-3a8a-98f1-e802e8e27901\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/14"
);
const headers = {
"Authorization": "Bearer dDh4aVa566e18Zfvk3PEbgc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"discipline_id": "9a15f3fc-b345-3338-80e8-390d09d7bd60",
"work_id": "fdda975b-190d-3fd2-a9ae-b236f8c481ac",
"responsible_user_id": "2f1a7276-32ba-3c9a-9b56-2e5d48e8d2db",
"status_id": "d0685686-bcfc-3a8a-98f1-e802e8e27901"
};
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/minima" \
--header "Authorization: Bearer dvEDfcgVaa68bk6Peh5Z143" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/minima"
);
const headers = {
"Authorization": "Bearer dvEDfcgVaa68bk6Peh5Z143",
"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
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 3dP1fDEecZ6vg6Vkb54aha8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"daily_log\": \"dolor\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/daily-log"
);
const headers = {
"Authorization": "Bearer 3dP1fDEecZ6vg6Vkb54aha8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"daily_log": "dolor"
};
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 fZkDVdag684abPc5vE6e3h1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"employee\": \"culpa\",
\"kit_uuid\": \"93109b73-a84e-3429-afba-854ad758a9ff\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/epi-term"
);
const headers = {
"Authorization": "Bearer fZkDVdag684abPc5vE6e3h1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"employee": "culpa",
"kit_uuid": "93109b73-a84e-3429-afba-854ad758a9ff"
};
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 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=quaerat&type=entrada&description=Commodi+iusto+hic+consequuntur+placeat+omnis+vero+aliquid+fugit.&categories[]=ca5f0fcb-be47-32ac-a0d9-bc6aebca7fd0&exclude_categories[]=c9dca2c9-0f83-3db0-8bea-b523b2c9a84e&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=64a1ac29-7aec-35db-a632-72dcd388c8dd&customers[]=c22b9d0b-7191-3a80-b2ea-3906c3e19719&suppliers[]=8bb49ee8-f044-3045-89bb-a7747780d902&cash_session=15f578fa-7abc-36be-a5d5-21c0f2b326a5&works[]=9c62edd9-074d-30eb-86e6-4ccdc6e1ad2b" \
--header "Authorization: Bearer a51e3c68dPf46vbkZDEagVh" \
--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": "quaerat",
"type": "entrada",
"description": "Commodi iusto hic consequuntur placeat omnis vero aliquid fugit.",
"categories[0]": "ca5f0fcb-be47-32ac-a0d9-bc6aebca7fd0",
"exclude_categories[0]": "c9dca2c9-0f83-3db0-8bea-b523b2c9a84e",
"date_start": "2026-01-01",
"date_end": "2026-12-31",
"bank_accounts[0]": "64a1ac29-7aec-35db-a632-72dcd388c8dd",
"customers[0]": "c22b9d0b-7191-3a80-b2ea-3906c3e19719",
"suppliers[0]": "8bb49ee8-f044-3045-89bb-a7747780d902",
"cash_session": "15f578fa-7abc-36be-a5d5-21c0f2b326a5",
"works[0]": "9c62edd9-074d-30eb-86e6-4ccdc6e1ad2b",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer a51e3c68dPf46vbkZDEagVh",
"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=officia&type=entrada&description=Perferendis+dolorem+officia+debitis+cumque+eligendi+numquam+quas+dolorem.&categories[]=7eff16c4-58e7-33f2-91ad-30930f09546e&exclude_categories[]=845187e2-7cc2-3d48-92bc-0d008860a40e&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=2f3631a2-8d75-32ee-89cf-e514bf752b20&customers[]=fa2d8d6e-e62f-3f68-870b-a4959f33bc59&suppliers[]=e0ae5591-8eb4-370b-aee1-60c26a4ccc9c&cash_session=18395255-8a87-31ce-a455-ca5a2e701796&works[]=433e63f5-48a4-3c35-aa17-63aff2530bf0" \
--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": "officia",
"type": "entrada",
"description": "Perferendis dolorem officia debitis cumque eligendi numquam quas dolorem.",
"categories[0]": "7eff16c4-58e7-33f2-91ad-30930f09546e",
"exclude_categories[0]": "845187e2-7cc2-3d48-92bc-0d008860a40e",
"date_start": "2026-01-01",
"date_end": "2026-12-31",
"bank_accounts[0]": "2f3631a2-8d75-32ee-89cf-e514bf752b20",
"customers[0]": "fa2d8d6e-e62f-3f68-870b-a4959f33bc59",
"suppliers[0]": "e0ae5591-8eb4-370b-aee1-60c26a4ccc9c",
"cash_session": "18395255-8a87-31ce-a455-ca5a2e701796",
"works[0]": "433e63f5-48a4-3c35-aa17-63aff2530bf0",
};
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 63h4aP8VE5bkdgeDf16avZc" \
--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 63h4aP8VE5bkdgeDf16avZc",
"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 6P6fEha15gbd3V8a4eZDkvc" \
--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 6P6fEha15gbd3V8a4eZDkvc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "64c3c8a0-0eb9-3331-9a8c-a555ca3a7118",
"name": "amet non",
"slug": null,
"description": "Facere qui nostrum est perspiciatis nostrum veniam facilis. Dicta eos ut in vel quia quis laudantium. Iste veritatis repudiandae ut. Non earum dolores eveniet neque.",
"abbreviation": null,
"created_at": null,
"updated_at": null
},
{
"id": "873f2a44-e211-322c-83c2-670e79c4738c",
"name": "quae corrupti",
"slug": null,
"description": null,
"abbreviation": "vfk",
"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 v4aEP6a6h3VZ81efgcd5kDb" \
--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 v4aEP6a6h3VZ81efgcd5kDb",
"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/15" \
--header "Authorization: Bearer 16e3kb5cvDd6VfZ4Eag8Pah" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/15"
);
const headers = {
"Authorization": "Bearer 16e3kb5cvDd6VfZ4Eag8Pah",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "4d32c603-504a-3675-a3fc-b2dfa09e5827",
"name": "unde in",
"slug": null,
"description": "Dolores nemo quia quia. Sit minus labore modi officiis ut sint accusantium incidunt. Aut nesciunt sint eligendi voluptatum.",
"abbreviation": "tqh",
"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/10" \
--header "Authorization: Bearer g6kh43be5a6avVc1PfEdZ8D" \
--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/10"
);
const headers = {
"Authorization": "Bearer g6kh43be5a6avVc1PfEdZ8D",
"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/12" \
--header "Authorization: Bearer adv6D1fcha3k8bV5P4Z6gEe" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/12"
);
const headers = {
"Authorization": "Bearer adv6D1fcha3k8bV5P4Z6gEe",
"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 Z1kcE6avVfP6a38gD5hde4b" \
--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 Z1kcE6avVfP6a38gD5hde4b",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "b100a1a9-c81f-3f0f-a055-f1dccfec5f1b",
"name": "Kaylin Bosco",
"username": "ekoch",
"email": "hansen.brooks@example.com",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "c485f8cc-e94a-37c9-b688-3323a87326a7",
"name": "Miss Jaida Jenkins I",
"username": "cathrine39",
"email": "aolson@example.com",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Attach users to sector
requires authentication sector users attach
Attach users to a sector without removing existing ones. Expects an array of user UUIDs in the "users" field.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/attach" \
--header "Authorization: Bearer ah3v4E68becDkgVaPd6Z5f1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"739566e6-96fe-3896-90bb-8c1dd5c0656e\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/attach"
);
const headers = {
"Authorization": "Bearer ah3v4E68becDkgVaPd6Z5f1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"739566e6-96fe-3896-90bb-8c1dd5c0656e"
]
};
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 Dvgf18e6a4P3Z5EhcdV6abk" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"3eb99d7a-9e29-303f-99ac-e1a15e736846\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/detach"
);
const headers = {
"Authorization": "Bearer Dvgf18e6a4P3Z5EhcdV6abk",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"3eb99d7a-9e29-303f-99ac-e1a15e736846"
]
};
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 D1efvkbdVcaa6Z86gE54hP3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"0f884e1b-c15e-3729-b20a-91bce308f170\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/sync"
);
const headers = {
"Authorization": "Bearer D1efvkbdVcaa6Z86gE54hP3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"0f884e1b-c15e-3729-b20a-91bce308f170"
]
};
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 4e6aPZa36hv8d5VEkbgDf1c" \
--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 4e6aPZa36hv8d5VEkbgDf1c",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"name": "ea sed",
"slug": "nam-tempore-non-ea-aliquam"
},
{
"name": "aut rerum",
"slug": "similique-et-consequatur-eveniet-numquam-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.
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 43EaDvP6h61ZVefgbcda5k8" \
--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 43EaDvP6h61ZVefgbcda5k8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "a4dc3c44-3c36-36ba-b362-657ea7bb365e",
"slug": null,
"name": null,
"description": "Dayana Matos Padilha Jr.",
"abbreviation": "consequatur",
"color": "#7bfe3b",
"text_color": "#cb5702",
"created_at": null,
"updated_at": null
},
{
"id": "94efc916-015d-3aee-9855-b8239d801082",
"slug": null,
"name": null,
"description": "Sra. Gabriela Aguiar D'ávila Jr.",
"abbreviation": "harum",
"color": "#f8d499",
"text_color": "#2bd367",
"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 c6bDhe3dfaEVPaZ641gv58k" \
--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\": \"286281b0-b201-3bb4-b1d7-185bf5086d13\",
\"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 c6bDhe3dfaEVPaZ641gv58k",
"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": "286281b0-b201-3bb4-b1d7-185bf5086d13",
"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 3a6h4a6fkZ5gPbEvV8deD1c" \
--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 3a6h4a6fkZ5gPbEvV8deD1c",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "0567e26f-00e4-3c61-84b5-4ad35f9cbd80",
"slug": null,
"name": null,
"description": "Dr. Carol Faria Godói Filho",
"abbreviation": "non",
"color": "#2f0f47",
"text_color": "#36b6e0",
"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 v8ePag3aEf51Vcd6k6Dh4Zb" \
--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\": \"67457fa9-4013-35f3-acd4-e7c60d8299cc\",
\"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 v8ePag3aEf51Vcd6k6Dh4Zb",
"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": "67457fa9-4013-35f3-acd4-e7c60d8299cc",
"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 E65aDVbcf3gZe4dk6vP18ha" \
--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 E65aDVbcf3gZe4dk6vP18ha",
"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 D3VeaacgP46d6hk8fb15vEZ" \
--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 D3VeaacgP46d6hk8fb15vEZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "fbe92da3-a018-396e-b41f-f3d755bebb82",
"quantity": 158.2086,
"min_quantity": null,
"max_quantity": null,
"below_minimum": false,
"above_maximum": false,
"created_at": null,
"updated_at": null
},
{
"id": "af7c248e-6cfb-3fa3-9a8e-a7e2c57fcf44",
"quantity": 465.927,
"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 kh5av416ebf3da68VDcZgPE" \
--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 kh5av416ebf3da68VDcZgPE",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "74f18cf1-48f8-3496-845f-30ec96272e72",
"name": "Estoque Zaragoça Comercial Ltda.",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
},
{
"id": "6cdf84eb-aaf4-30d5-b7c3-c35052dfea1b",
"name": "Estoque Bonilha e Esteves Ltda.",
"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 PV45hb68gEd36efv1aZDcak" \
--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 PV45hb68gEd36efv1aZDcak",
"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": "232e30eb-ba0d-3fd1-ad12-a739435dfb5e",
"name": "Estoque Vasques e Valdez Ltda.",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 8a46VgPeDkafdvZEhc13b56" \
--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 8a46VgPeDkafdvZEhc13b56",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "7f1e8322-c4cf-3e7e-ac8f-fb6dd4d0e522",
"name": "Estoque Flores Comercial Ltda.",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show stock
requires authentication stock show
Returns details of a specific stock
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/stocks/1" \
--header "Authorization: Bearer e3DZkd18bgf4va5V6chaEP6" \
--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 e3DZkd18bgf4va5V6chaEP6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "1c68df92-f009-3e18-998c-6d10f2a7f760",
"name": "Estoque Caldeira Comercial Ltda.",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update stock
requires authentication stock update
Updates an existing stock
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/stocks/1" \
--header "Authorization: Bearer akh3g8456avVdbPc61eZEDf" \
--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 akh3g8456avVdbPc61eZEDf",
"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": "c14f5e62-3b32-36f9-98c1-c35f18b2ec2f",
"name": "Estoque Zamana e Tamoio Ltda.",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 36bVDkE6ac8a5ZgP1def4hv" \
--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 36bVDkE6ac8a5ZgP1def4hv",
"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 1PVeZ8fhdkE5avDgbac6634" \
--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 1PVeZ8fhdkE5avDgbac6634",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "243dcd43-f045-305a-a78e-44d30f17f714",
"quantity": 593.7216,
"min_quantity": null,
"max_quantity": null,
"below_minimum": false,
"above_maximum": false,
"created_at": null,
"updated_at": null
},
{
"id": "57da5412-6c33-3af6-a764-a5b0a091f49a",
"quantity": 514.355,
"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/a" \
--header "Authorization: Bearer ec3v6EDVab1fP64dgah8Z5k" \
--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/a"
);
const headers = {
"Authorization": "Bearer ec3v6EDVab1fP64dgah8Z5k",
"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": "c447207a-69bf-31e6-a6dc-a151e97b1bde",
"quantity": 84.8344,
"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 ad8DvhV366f5Zb4k1gecaPE" \
--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 ad8DvhV366f5Zb4k1gecaPE",
"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 k6Eh8f45VZPDvcb6eadga31" \
--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 k6Eh8f45VZPDvcb6eadga31",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "4473e8c9-b906-3899-b55d-48e7568b43a7",
"code": "MOV-482746",
"type": "ajuste saída",
"type_name": "ADJUSTMENT_OUT",
"is_entry": false,
"is_exit": true,
"quantity": 43.1537,
"previous_quantity": 900.9077,
"new_quantity": 857.754,
"reason": "Corporis sunt repellendus qui libero.",
"movement_date": "2026-07-22T13:07:46.000000Z",
"created_at": null
},
{
"id": "8d2670a0-56f5-3b21-ac01-65e992532726",
"code": "MOV-506295",
"type": "entrada transferência",
"type_name": "TRANSFER_IN",
"is_entry": true,
"is_exit": false,
"quantity": 47.489,
"previous_quantity": 611.1492,
"new_quantity": 658.6382,
"reason": null,
"movement_date": "2026-07-26T06:20:30.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 6D35cdhEv6kaaf4VP18Zbeg" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"f3f855d2-7cf0-3d2e-b621-d8152c5a1155\",
\"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 6D35cdhEv6kaaf4VP18Zbeg",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "f3f855d2-7cf0-3d2e-b621-d8152c5a1155",
"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": "e87e523f-827a-3995-8524-c542356220b3",
"code": "MOV-241720",
"type": "vencido",
"type_name": "EXPIRED",
"is_entry": false,
"is_exit": true,
"quantity": 89.1322,
"previous_quantity": 596.2525,
"new_quantity": 507.1203,
"reason": null,
"movement_date": "2026-07-18T03:36:31.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 6dZbavck1EgPVa3D48h5e6f" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"aaff65df-64c6-3859-9264-bc59d81ccb61\",
\"destination_stock_id\": \"886fb795-803c-3034-ac24-cd0a0131073a\",
\"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 6dZbavck1EgPVa3D48h5e6f",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "aaff65df-64c6-3859-9264-bc59d81ccb61",
"destination_stock_id": "886fb795-803c-3034-ac24-cd0a0131073a",
"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": "0cd2725f-3f4f-3e2d-a024-36a6291ff6f7",
"code": "MOV-777099",
"type": "vencido",
"type_name": "EXPIRED",
"is_entry": false,
"is_exit": true,
"quantity": 32.0393,
"previous_quantity": 114.1461,
"new_quantity": 82.1068,
"reason": "Laborum eum ratione nihil aliquam fugiat ratione incidunt.",
"movement_date": "2026-07-11T05:31: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.
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 eVdgE4Z86fa63hDc5P1bvka" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"b2aa31f7-9047-319d-af20-2eb0f0853a1f\",
\"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 eVdgE4Z86fa63hDc5P1bvka",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "b2aa31f7-9047-319d-af20-2eb0f0853a1f",
"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": "1320a87c-224b-31f8-9513-0c56c214390d",
"code": "MOV-251329",
"type": "consumo",
"type_name": "CONSUMPTION",
"is_entry": false,
"is_exit": true,
"quantity": 75.8175,
"previous_quantity": 382.813,
"new_quantity": 306.9955,
"reason": "Aut laborum velit quibusdam qui.",
"movement_date": "2026-07-28T21:45:17.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 8avEb61gkcf3ePh45DZa6dV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"8322e9d6-0bae-3d33-815e-41ac19846e63\",
\"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 8avEb61gkcf3ePh45DZa6dV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "8322e9d6-0bae-3d33-815e-41ac19846e63",
"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": "8692334a-24fd-3ac3-88df-8bad6ad01a65",
"code": "MOV-683887",
"type": "vencido",
"type_name": "EXPIRED",
"is_entry": false,
"is_exit": true,
"quantity": 8.8266,
"previous_quantity": 745.1822,
"new_quantity": 736.3556,
"reason": "Eius tempore vitae nesciunt et ullam.",
"movement_date": "2026-07-11T02:00:23.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 adPc64af83hEv65VDg1kZeb" \
--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 adPc64af83hEv65VDg1kZeb",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a994aa9f-6297-32ef-898c-38fd23c2285d",
"code": "MOV-342548",
"type": "devolução",
"type_name": "RETURN",
"is_entry": true,
"is_exit": false,
"quantity": 60.2666,
"previous_quantity": 316.3314,
"new_quantity": 376.598,
"reason": null,
"movement_date": "2026-07-20T07:56:31.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 g4kbfde8DP561cV3ZaEvha6" \
--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 g4kbfde8DP561cV3ZaEvha6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "b5eb0d5d-48b6-3bf3-be6a-81a6997fca40",
"name": "Dr. Stephanie Maiara Madeira",
"email": "campos.kevin@example.net",
"phone": "(12) 2374-4565",
"document": "39.728.874/0001-03",
"type": "pj",
"responsible": "Dr. Alma Poliana Ferraz Jr.",
"image": {
"id": null,
"url": null
},
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
}
},
{
"id": "0e3d421b-6fe8-3656-bc93-3e9ba3bdc122",
"name": "Willian Alonso Casanova",
"email": "inacio19@example.org",
"phone": "(74) 3799-8545",
"document": "19.251.854/0001-79",
"type": "pj",
"responsible": "Caio Valentin",
"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 6a81cZD5hEPe4ab6Vvfk3gd" \
--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 6a81cZD5hEPe4ab6Vvfk3gd",
"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 c36EaV5bgDdPvZeah168kf4" \
--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 c36EaV5bgDdPvZeah168kf4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "fcf82269-bacf-3d3e-8653-b6191997f24b",
"name": "Cristian Lovato Jimenes",
"email": "santana.simon@example.net",
"phone": "(43) 2465-9440",
"document": "78.479.904/0001-39",
"type": "pf",
"responsible": "Dr. Micaela Lozano Aguiar",
"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 4P8Dh61ekZf3gv6adVE5bca" \
--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 4P8Dh61ekZf3gv6adVE5bca",
"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 66baZfDgdcav18Ve3h54kEP" \
--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 66baZfDgdcav18Ve3h54kEP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
System Types
Endpoints for system types
System Types
requires authentication No specific permission required
Get the system types
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/system-types" \
--header "Authorization: Bearer b61Z8ahed64gafk3vEDPV5c" \
--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 b61Z8ahed64gafk3vEDPV5c",
"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 caD561ZEbV8ghaPdf3ke64v" \
--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 caD561ZEbV8ghaPdf3ke64v",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "fea61609-515e-37fd-b003-aad0b4360f20",
"name": "Dr. Thomas William Ortega Filho",
"description": "Hic nostrum eum tempore sequi dolores consectetur consequatur aspernatur. Et tempore accusantium quis sit. Beatae itaque possimus autem fugiat iusto commodi autem est.",
"type": "entrada"
},
{
"id": "4e3b1b5c-a457-34f7-bb35-7b75d2d29caa",
"name": "Anita Soares Filho",
"description": "Quos deleniti accusantium et occaecati non culpa maxime. Quis eius incidunt nesciunt accusamus omnis. At voluptatem fugit reiciendis repellat excepturi incidunt.",
"type": "transferência"
}
],
"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/voluptatum" \
--header "Authorization: Bearer hbDPEcvZa13Vek654dagf86" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/transaction-categories/voluptatum"
);
const headers = {
"Authorization": "Bearer hbDPEcvZa13Vek654dagf86",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "e16a8ee9-a0c7-3ece-b8f2-f84ecfb37818",
"name": "Vinícius Bernardo Lozano Filho",
"description": "Hic cum vel consectetur ad recusandae unde doloremque. Placeat iste quia architecto quo id. Voluptates repudiandae inventore impedit id. Expedita corrupti molestiae rem.",
"type": "ajuste saída"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create transaction category
requires authentication transaction-category store
Create a new transaction category
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/transaction-categories" \
--header "Authorization: Bearer d4E1h6V3fevgZkac6abP85D" \
--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 d4E1h6V3fevgZkac6abP85D",
"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/distinctio" \
--header "Authorization: Bearer vaED6hVdkP316c84abgfe5Z" \
--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/distinctio"
);
const headers = {
"Authorization": "Bearer vaED6hVdkP316c84abgfe5Z",
"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/ab" \
--header "Authorization: Bearer ckf1Va38Ph4dDgbvZ6a6E5e" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/transaction-categories/ab"
);
const headers = {
"Authorization": "Bearer ckf1Va38Ph4dDgbvZ6a6E5e",
"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 kvbg6adEZ5eV136Ph4fD8ac" \
--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 kvbg6adEZ5eV136Ph4fD8ac",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "24c5427e-739b-3866-9ad1-9e1d7b36446c",
"name": "Dr. Gabriel Samuel Bezerra Jr.",
"abbreviation": "Diana Queirós das Neves Filho",
"description": "Illo aut quia maiores sit.",
"created_at": null,
"updated_at": null
},
{
"id": "360cc620-6b4e-36a6-83c9-7980c48b3314",
"name": "Maicon Balestero Maldonado Jr.",
"abbreviation": "Sr. Rodolfo Flores Filho",
"description": "Sit molestiae et qui.",
"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 EV65Zf8vaD1eacbkd46g3Ph" \
--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 EV65Zf8vaD1eacbkd46g3Ph",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "c3164662-8144-3a5c-b650-2500d26eeb8d",
"name": "Sr. Luan Galindo",
"abbreviation": "Sr. Noel Barros Sanches Jr.",
"description": "Qui doloribus et qui.",
"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 k486hdaVZac3DbvE1fg56Pe" \
--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 k486hdaVZac3DbvE1fg56Pe",
"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 eac8P4gaZb1vdV663DfkEh5" \
--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 eac8P4gaZb1vdV663DfkEh5",
"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/qui" \
--header "Authorization: Bearer ab4e8kPv5gV3Zfh1c6dD6aE" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/units/qui"
);
const headers = {
"Authorization": "Bearer ab4e8kPv5gV3Zfh1c6dD6aE",
"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 6d6k3VZbP8f4cgv1aDeEha5" \
--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 6d6k3VZbP8f4cgv1aDeEha5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "c527469c-51ae-358f-b357-2c4659c82bad",
"name": "Dr. Kieran Purdy",
"username": "ometz",
"email": "maggio.edwin@example.net",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "43f6aee4-b1be-3e51-8b97-b68524883fa3",
"name": "Lorenzo Morar",
"username": "ernestine13",
"email": "jacobs.lucy@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.
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 VdZbaav3P6h854Efk6e1Dgc" \
--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 VdZbaav3P6h854Efk6e1Dgc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "12963cf1-e3be-3218-905e-9274619fed98",
"name": "Prof. Monte Howell",
"username": "otilia65",
"email": "kristy.kihn@example.net",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create user
requires authentication user store
Create a new user
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/users" \
--header "Authorization: Bearer a3hka68E5PVgbcZ1Df6d4ev" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"brooke50\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"b372c1d5-65b7-3516-bd0a-d521a67fc27b\"
],
\"roles\": [
\"7f182316-6e00-325d-8f39-2fd2aa7013e9\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users"
);
const headers = {
"Authorization": "Bearer a3hka68E5PVgbcZ1Df6d4ev",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "brooke50",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"b372c1d5-65b7-3516-bd0a-d521a67fc27b"
],
"roles": [
"7f182316-6e00-325d-8f39-2fd2aa7013e9"
]
};
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 g6PZb1afadkhV38e5Dc6E4v" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"fhodkiewicz\",
\"password\": \"password123\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"fe903222-4b37-38dd-a086-a610a86bcf51\"
],
\"roles\": [
\"1c6ea298-ff19-3fe4-aa1b-f54310798e52\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users/1"
);
const headers = {
"Authorization": "Bearer g6PZb1afadkhV38e5Dc6E4v",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "fhodkiewicz",
"password": "password123",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"fe903222-4b37-38dd-a086-a610a86bcf51"
],
"roles": [
"1c6ea298-ff19-3fe4-aa1b-f54310798e52"
]
};
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 b3e5DVd41ZvPagEa6fc6h8k" \
--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 b3e5DVd41ZvPagEa6fc6h8k",
"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 P316E8dcV5gDe4f6abvahZk" \
--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 P316E8dcV5gDe4f6abvahZk",
"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 fa5Z66cd3DEega81Pv4Vhkb" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"27c00d3c-e3c5-30a7-809c-b6917de68e86\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users/1/permissions"
);
const headers = {
"Authorization": "Bearer fa5Z66cd3DEega81Pv4Vhkb",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"27c00d3c-e3c5-30a7-809c-b6917de68e86"
]
};
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 fdbZh8ea4P6gVkc65aEv3D1" \
--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 fdbZh8ea4P6gVkc65aEv3D1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "sit",
"display_name": "Amet iste sequi sit enim harum expedita dignissimos."
},
{
"id": null,
"name": "neque",
"display_name": "Maxime exercitationem iste quo."
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 aVc81Dbv46gf5kda6EhZ3Pe" \
--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 aVc81Dbv46gf5kda6EhZ3Pe",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "4a10f596-1d30-3214-b3ae-2bf8259c67c3",
"description": "Dr. Fabiana Débora Ramos",
"work": {
"id": null,
"name": null
},
"documents": [],
"created_at": null,
"updated_at": null
},
{
"id": "17ece90a-1c3a-39f7-94b1-27035a951dd4",
"description": "Srta. Emília Olívia Faria",
"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 18aEDe43Pg6Vdkav5bhf6Zc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"description\": \"Example Description\",
\"work_id\": \"050793bf-d757-3b96-a2a6-8143af84aaa0\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/work-locations"
);
const headers = {
"Authorization": "Bearer 18aEDe43Pg6Vdkav5bhf6Zc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"description": "Example Description",
"work_id": "050793bf-d757-3b96-a2a6-8143af84aaa0"
};
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 Pck3a8fDd6v5Z641VaghEbe" \
--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 Pck3a8fDd6v5Z641VaghEbe",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "32170ad3-2a6e-323a-aed9-554761f0822b",
"description": "Sr. Santiago Manuel Galindo",
"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 63PcaEk485Z61dVvabfgheD" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"description\": \"Example Description\",
\"work_id\": \"17df3ddb-760a-3f04-bce4-86e41c615069\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/work-locations/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer 63PcaEk485Z61dVvabfgheD",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"description": "Example Description",
"work_id": "17df3ddb-760a-3f04-bce4-86e41c615069"
};
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 4cvkPaDe8f56Eag6V3b1dZh" \
--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 4cvkPaDe8f56Eag6V3b1dZh",
"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 gVE8cZ66fkDhP3aaeb51vd4" \
--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 gVE8cZ66fkDhP3aaeb51vd4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "61a752bf-4ea5-34ad-83f3-81e66212b00f",
"name": "Fabiano Quintana Matos",
"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": "1999-05-27 04:34:09.000000",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"created_at": null,
"updated_at": null
},
{
"id": "b507919a-bb5e-3377-bac6-ec1ff42e8555",
"name": "Natal Romero Molina",
"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": "2000-04-24 08:33:23.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 5a4bg18cPEDeVdk6a6hZv3f" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"customer_id\": \"1c595616-272f-38e0-9d8c-b0f838b60280\",
\"status_id\": \"7171e7ce-2258-38ce-ba63-eeafaabaf280\",
\"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 5a4bg18cPEDeVdk6a6hZv3f",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"customer_id": "1c595616-272f-38e0-9d8c-b0f838b60280",
"status_id": "7171e7ce-2258-38ce-ba63-eeafaabaf280",
"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 cEf6hdgvVkaab68P45ZDe31" \
--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 cEf6hdgvVkaab68P45ZDe31",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "4642fd04-9c36-30be-a2a9-d29e2b71dbc0",
"name": "Sra. Mirela Roberta Quintana Jr.",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"documents": [],
"locations": [],
"product_quantity_lists_count": 0,
"product_quantity_list_items_count": 0,
"product_requests_count": 0,
"product_request_items_count": 0,
"documents_count": 0,
"locations_documents_count": 0,
"total_documents_count": 0,
"daily_logs_count": 0,
"projects_count": 0,
"started_at": {
"date": "1987-01-03 03:38:18.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 Efk5bc6V13d6P4egZaDhv8a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"customer_id\": \"b894e7fb-5763-3158-ba59-d559759ab5ee\",
\"status_id\": \"07f319b3-c4c5-38f0-8e9b-ab3f2883141f\",
\"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 Efk5bc6V13d6P4egZaDhv8a",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"customer_id": "b894e7fb-5763-3158-ba59-d559759ab5ee",
"status_id": "07f319b3-c4c5-38f0-8e9b-ab3f2883141f",
"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 41aVbekafE58hPd36Dv6gZc" \
--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 41aVbekafE58hPd36Dv6gZc",
"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 aPZDch65Evd6V1kag3e84bf" \
--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 aPZDch65Evd6V1kag3e84bf",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "11465ecf-3c21-32ed-9534-79fcaf4f386c",
"name": "Miss Eva Marks MD",
"username": "cole.kaylah",
"email": "hgrimes@example.net",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "a128a975-7db3-3658-9533-05da403f5e4e",
"name": "Keanu Grimes",
"username": "istokes",
"email": "violette78@example.net",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Attach responsibles to work
requires authentication work-responsibles attach
Attach users as responsibles to a work without removing existing ones
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach" \
--header "Authorization: Bearer EDcZ4ev18bga5dkV6f3a6hP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"c8eda18a-cf38-3a8f-b187-b3d7e897da70\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach"
);
const headers = {
"Authorization": "Bearer EDcZ4ev18bga5dkV6f3a6hP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"c8eda18a-cf38-3a8f-b187-b3d7e897da70"
]
};
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 b6ZaP3VekDv1cfhE6ga548d" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"f1fae87c-c374-377e-b84b-edbf526c85f9\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/detach"
);
const headers = {
"Authorization": "Bearer b6ZaP3VekDv1cfhE6ga548d",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"f1fae87c-c374-377e-b84b-edbf526c85f9"
]
};
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 aDeZdgPb6v1cE38fVka645h" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"9b137374-1242-35d1-915a-570cae511d74\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/sync"
);
const headers = {
"Authorization": "Bearer aDeZdgPb6v1cE38fVka645h",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"9b137374-1242-35d1-915a-570cae511d74"
]
};
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.