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 de5fa6PZ8ch1kva364bgDEV" \
--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 de5fa6PZ8ch1kva364bgDEV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "bdeead01-cbee-3ec2-b5ee-8fea2f6be9f7",
"name": "possimus-6aeb871113127",
"display_name": "Officiis architecto sunt reiciendis ut aut.",
"permissions_count": null
},
{
"id": "a01d24c9-c398-3eea-98f9-e1276be63427",
"name": "sint-6aeb871116f44",
"display_name": "Molestias dolores dolor deleniti et minima ut at.",
"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 gP4v6Ekbe6dc3hV5aa8DZf1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"display_name\": \"Example Name\",
\"permissions\": [
\"ab4da2ca-0886-33f9-9c43-83d2713ac2d8\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/roles"
);
const headers = {
"Authorization": "Bearer gP4v6Ekbe6dc3hV5aa8DZf1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"display_name": "Example Name",
"permissions": [
"ab4da2ca-0886-33f9-9c43-83d2713ac2d8"
]
};
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 vZaPVEc3k1Df5gd46bhe86a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"display_name\": \"Example Name\",
\"permissions\": [
\"289de72d-8130-3e32-8222-e7dadceadf22\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/roles/1"
);
const headers = {
"Authorization": "Bearer vZaPVEc3k1Df5gd46bhe86a",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"display_name": "Example Name",
"permissions": [
"289de72d-8130-3e32-8222-e7dadceadf22"
]
};
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 5D8agcb3h6e4dZk6vPVfaE1" \
--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 5D8agcb3h6e4dZk6vPVfaE1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "f1c9cf1e-a131-32db-b026-951a1935e4b4",
"name": "sit-6aeb8711230d1",
"display_name": "Fugit et eius illum nesciunt nesciunt quia.",
"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 dDf6V36E5b4keZcgP1vaah8" \
--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 dDf6V36E5b4keZcgP1vaah8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "aut",
"display_name": "Distinctio perferendis illum provident ut veniam repellat ipsam."
},
{
"id": null,
"name": "ipsam",
"display_name": "Dolore odit aut tenetur vel molestias."
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 vc6Zhag43be15fEa86DVdPk" \
--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 vc6Zhag43be15fEa86DVdPk",
"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 gdvbcaP5V8kh4Ze6D6Ef31a" \
--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 gdvbcaP5V8kh4Ze6D6Ef31a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "explicabo",
"display_name": "Quas natus officia asperiores quos dolorem voluptatem."
},
{
"id": null,
"name": "officia",
"display_name": "Et asperiores occaecati consequatur ut est et accusantium."
}
],
"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 dgbfEhD46PaekVa163Z5v8c" \
--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 dgbfEhD46PaekVa163Z5v8c",
"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 ab64ed851gvcDVEfZhP36ak" \
--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 ab64ed851gvcDVEfZhP36ak",
"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 a3hV4gb5afZkP8eEvDd6c61" \
--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 a3hV4gb5afZkP8eEvDd6c61",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": null,
"name": "iste",
"display_name": "Qui illum sed quaerat dolor in blanditiis culpa."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 a1cDb35aZVE4Pd6hv8e6fgk" \
--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 a1cDb35aZVE4Pd6hv8e6fgk",
"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 ePDg4V86vZada5E6ckb31fh" \
--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 ePDg4V86vZada5E6ckb31fh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "9174da86-2e69-3ff2-b0da-aba85f003d4e",
"code": null,
"type": "entrada",
"payment_method": "boleto",
"amount": 3667.68,
"due_date": "2026-11-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": "Ea similique quia aut vel in minima laudantium aut molestiae hic nostrum quasi 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": "et",
"field2": 84,
"field3": false,
"notes": "Deleniti nulla ut labore perspiciatis.",
"created_at": null,
"updated_at": null
},
{
"id": "0c47e5ba-e48c-31ab-92e6-0cf15f8fc843",
"code": null,
"type": "saída",
"payment_method": "boleto",
"amount": 8131.88,
"due_date": "2026-11-24T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Quod rem illo corporis est quibusdam aut.",
"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": "vel",
"field2": 94,
"field3": false,
"notes": "Commodi nostrum a qui quibusdam.",
"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[]=aperiam" \
--header "Authorization: Bearer hZPvf6V6abDdE5k84a3ecg1" \
--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]": "aperiam",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer hZPvf6V6abDdE5k84a3ecg1",
"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 4VP1Z6akfagDEhvb6e3d58c" \
--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 4VP1Z6akfagDEhvb6e3d58c",
"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[]=reiciendis&suppliers[]=quia&works[]=ad&cost_centers[]=consectetur&statuses[]=a+vencer&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-11-04T16%3A27%3A13&protest_date_end=2026-11-04T16%3A27%3A13&has_protest=1&has_children=1&is_recurring=1" \
--header "Authorization: Bearer 8ab1eZ53EhkacDVv4f6P6gd" \
--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]": "reiciendis",
"suppliers[0]": "quia",
"works[0]": "ad",
"cost_centers[0]": "consectetur",
"statuses[0]": "a vencer",
"payment_method": "cheque",
"date_start": "2023-01-01",
"date_end": "2023-12-31",
"protest_date_start": "2026-11-04T16:27:13",
"protest_date_end": "2026-11-04T16:27:13",
"has_protest": "1",
"has_children": "1",
"is_recurring": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 8ab1eZ53EhkacDVv4f6P6gd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "9c12750d-2bad-3132-ba63-b0fee9032ce2",
"code": null,
"type": "entrada",
"payment_method": "boleto",
"amount": 9642.22,
"due_date": "2026-11-17T03: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": "Vitae id qui a distinctio veniam dolor illum.",
"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": "in",
"field2": 78,
"field3": true,
"notes": "Eum et eos corrupti occaecati veritatis rem.",
"created_at": null,
"updated_at": null
},
{
"id": "19ac1d70-1542-35b0-8dcf-70a0e3d291f9",
"code": null,
"type": "entrada",
"payment_method": "boleto",
"amount": 1411.8,
"due_date": "2026-11-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": "Deleniti debitis maiores nesciunt velit magnam rerum dolores non rerum nihil veniam laborum voluptates.",
"is_recurring": null,
"recurrence_config": null,
"parent_id": null,
"recurrence_order": 1,
"total_recurrences": null,
"children_count": 0,
"remaining_recurrences": null,
"has_children": false,
"field1": "minima",
"field2": 8,
"field3": true,
"notes": "Rem vitae fuga adipisci et distinctio autem quis.",
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List accounts payable receivable
requires authentication accounts-payable-receivable index
List all accounts payable receivable
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable?sort_by=created_at&sort_desc=1&page=1&per_page=10&q=Salary&code=CPR-000123&type=entrada&customers[]=perferendis&suppliers[]=corrupti&works[]=voluptas&cost_centers[]=architecto&statuses[]=recebido&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-11-04T16%3A27%3A13&protest_date_end=2026-11-04T16%3A27%3A13&has_protest=&has_children=1&is_recurring=1" \
--header "Authorization: Bearer eh46b8vgaaZfk16Ed3D5cVP" \
--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]": "perferendis",
"suppliers[0]": "corrupti",
"works[0]": "voluptas",
"cost_centers[0]": "architecto",
"statuses[0]": "recebido",
"payment_method": "cheque",
"date_start": "2023-01-01",
"date_end": "2023-12-31",
"protest_date_start": "2026-11-04T16:27:13",
"protest_date_end": "2026-11-04T16:27:13",
"has_protest": "0",
"has_children": "1",
"is_recurring": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer eh46b8vgaaZfk16Ed3D5cVP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "93a110d1-26eb-36a0-8368-21361594db05",
"code": null,
"type": "saída",
"payment_method": "cheque",
"amount": 3195.81,
"due_date": "2026-11-28T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Voluptas recusandae vero rerum blanditiis tenetur provident autem quia nihil dolorum voluptatem.",
"is_recurring": null,
"recurrence_config": null,
"parent_id": null,
"recurrence_order": 1,
"total_recurrences": null,
"children_count": 0,
"remaining_recurrences": null,
"has_children": false,
"field1": "est",
"field2": 7,
"field3": false,
"notes": "Illum velit asperiores quos.",
"created_at": null,
"updated_at": null
},
{
"id": "28ca789b-1e1a-38a7-9e2a-5cf321996d69",
"code": null,
"type": "saída",
"payment_method": "cheque",
"amount": 5748.59,
"due_date": "2026-12-04T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Consectetur odio nemo adipisci consectetur placeat consequatur quos et et.",
"is_recurring": null,
"recurrence_config": null,
"parent_id": null,
"recurrence_order": 1,
"total_recurrences": null,
"children_count": 0,
"remaining_recurrences": null,
"has_children": false,
"field1": "eos",
"field2": 72,
"field3": false,
"notes": "Similique ut nisi laudantium id cum numquam.",
"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 bP8g4eka13dZcD65fvV6haE" \
--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\": \"c0c8dfa0-7e31-32d5-868a-f2c72153994d\",
\"customer_id\": \"2cbbe6e0-8766-3d63-b4a3-d66dcf32881e\",
\"work_id\": \"125c3072-8e54-3775-8a64-fe0df28f9a3b\",
\"cost_center_id\": \"69711806-f905-36c4-be67-4ed912df1657\",
\"status\": \"Example Status\",
\"protest_date\": \"2024-01-01\",
\"bank_account_id\": \"b4ba34ee-f38c-3ed5-bf6e-5029db0df232\",
\"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 bP8g4eka13dZcD65fvV6haE",
"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": "c0c8dfa0-7e31-32d5-868a-f2c72153994d",
"customer_id": "2cbbe6e0-8766-3d63-b4a3-d66dcf32881e",
"work_id": "125c3072-8e54-3775-8a64-fe0df28f9a3b",
"cost_center_id": "69711806-f905-36c4-be67-4ed912df1657",
"status": "Example Status",
"protest_date": "2024-01-01",
"bank_account_id": "b4ba34ee-f38c-3ed5-bf6e-5029db0df232",
"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 ge18DZ3fba6vhVPE64dkac5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"fiscal_document_id\": \"est\",
\"installment_ids\": [
\"voluptatem\"
],
\"payment_method\": \"boleto\",
\"work_id\": \"et\",
\"cost_center_id\": \"maiores\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/import-nfe"
);
const headers = {
"Authorization": "Bearer ge18DZ3fba6vhVPE64dkac5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"fiscal_document_id": "est",
"installment_ids": [
"voluptatem"
],
"payment_method": "boleto",
"work_id": "et",
"cost_center_id": "maiores"
};
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/est/history" \
--header "Authorization: Bearer ZkvdV1Dac5heaEb36P4f86g" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/est/history"
);
const headers = {
"Authorization": "Bearer ZkvdV1Dac5heaEb36P4f86g",
"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/voluptates" \
--header "Authorization: Bearer bkV8dv1Pehaf564gaDZ6Ec3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/voluptates"
);
const headers = {
"Authorization": "Bearer bkV8dv1Pehaf564gaDZ6Ec3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "cba7c2bd-91f2-30cc-b3c2-cb7ecb0711ca",
"code": null,
"type": "entrada",
"payment_method": "boleto",
"amount": 2477.56,
"due_date": "2026-12-02T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Cumque sequi nostrum rerum fugiat omnis omnis odit omnis expedita ad tempora.",
"is_recurring": null,
"recurrence_config": null,
"parent_id": null,
"recurrence_order": 1,
"total_recurrences": null,
"children_count": 0,
"remaining_recurrences": null,
"has_children": false,
"field1": "non",
"field2": 42,
"field3": true,
"notes": "Velit dolorem a dolorem excepturi.",
"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/quo" \
--header "Authorization: Bearer 3cfVbP6Ek8Zd54e61gvaahD" \
--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\": \"be2e68ce-7132-3bcf-8822-b3c83d89f38f\",
\"customer_id\": \"4b390cc6-436f-3ed1-a7fb-f97aba997d4c\",
\"work_id\": \"5e6cc219-bf9f-3f84-b55c-f487a6236a87\",
\"cost_center_id\": \"9e669023-6e46-30ac-bbd3-7366ee7009f9\",
\"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\": \"a983f8a8-96e1-3d6d-b75f-1ce96f918e07\",
\"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/quo"
);
const headers = {
"Authorization": "Bearer 3cfVbP6Ek8Zd54e61gvaahD",
"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": "be2e68ce-7132-3bcf-8822-b3c83d89f38f",
"customer_id": "4b390cc6-436f-3ed1-a7fb-f97aba997d4c",
"work_id": "5e6cc219-bf9f-3f84-b55c-f487a6236a87",
"cost_center_id": "9e669023-6e46-30ac-bbd3-7366ee7009f9",
"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": "a983f8a8-96e1-3d6d-b75f-1ce96f918e07",
"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/dolor" \
--header "Authorization: Bearer 5Pahv31eEV6gDc8k6bdZfa4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/dolor"
);
const headers = {
"Authorization": "Bearer 5Pahv31eEV6gDc8k6bdZfa4",
"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\": \"nmuller@example.net\",
\"password\": \"password\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "nmuller@example.net",
"password": "password"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"token": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Me
requires authentication No specific permission required
Get the current user
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/auth/user" \
--header "Authorization: Bearer bv6Ddagf6h8kEZ1ae35VP4c" \
--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 bv6Ddagf6h8kEZ1ae35VP4c",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "57cf4e2a-b7fd-30c7-a75a-bffe4e251a57",
"name": "Nelda Oberbrunner",
"username": "gaetano42",
"email": "norwood41@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 eb8dD14ZkhVaEf5gP3c6va6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"arvid68\",
\"password\": \"password123\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"84d9235b-ddab-37cd-b4a5-69ab551238e6\"
],
\"roles\": [
\"62d1abfc-6dce-34bb-a1da-b2054600521f\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/user"
);
const headers = {
"Authorization": "Bearer eb8dD14ZkhVaEf5gP3c6va6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "arvid68",
"password": "password123",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"84d9235b-ddab-37cd-b4a5-69ab551238e6"
],
"roles": [
"62d1abfc-6dce-34bb-a1da-b2054600521f"
]
};
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 dgfa68aV56bPkh3vZeD1cE4" \
--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 dgfa68aV56bPkh3vZeD1cE4",
"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 cv43bekVPfa6E6D5dh1Z8ga" \
--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 cv43bekVPfa6E6D5dh1Z8ga",
"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 8Zeb346gc5DhPfv1kEaa6Vd" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"key\": \"ozhwnkermjezv\",
\"value\": []
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/preferences"
);
const headers = {
"Authorization": "Bearer 8Zeb346gc5DhPfv1kEaa6Vd",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"key": "ozhwnkermjezv",
"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/et" \
--header "Authorization: Bearer 3aV6d4bh5k8Ece1vDgPfZ6a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/preferences/et"
);
const headers = {
"Authorization": "Bearer 3aV6d4bh5k8Ece1vDgPfZ6a",
"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 vh86Z3aEVaDbfe154gckP6d" \
--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 vh86Z3aEVaDbfe154gckP6d",
"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 Pg6EbkcZDh4faav8d6V53e1" \
--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 Pg6EbkcZDh4faav8d6V53e1",
"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/minus" \
--header "Authorization: Bearer b6gPekVc85f4aZa3vhD1E6d" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/transfers/minus"
);
const headers = {
"Authorization": "Bearer b6gPekVc85f4aZa3vhD1E6d",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Deposit into bank account
requires authentication bank-account deposit
Adds funds to a bank account
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/18/deposit" \
--header "Authorization: Bearer kfDgb56a1PEV84adec6h3Zv" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"amount\": 1,
\"description\": \"Example Description\",
\"transaction_date\": \"2024-01-01\",
\"transaction_category_id\": \"Example Transaction category id\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/18/deposit"
);
const headers = {
"Authorization": "Bearer kfDgb56a1PEV84adec6h3Zv",
"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/10/withdraw" \
--header "Authorization: Bearer cebhvg4daD8aV6k6EZ1f35P" \
--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/10/withdraw"
);
const headers = {
"Authorization": "Bearer cebhvg4daD8aV6k6EZ1f35P",
"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 58k6g41abf6EeP3ZdhcaDvV" \
--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 58k6g41abf6EeP3ZdhcaDvV",
"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 56ZPa8dVc1gkD6E4efahvb3" \
--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 56ZPa8dVc1gkD6E4efahvb3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "1be28bf5-926a-3683-86d3-90ce7db4b1b4",
"agency": "0206",
"account": "0248744-0",
"type": "corrente",
"balance": 9805.83,
"holder_type": "pf",
"alias": "ipsum",
"limit": 8239.44,
"available_balance": 18045.27,
"used_limit": 0,
"available_limit": 8239.44,
"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 Dve861f5acbkd6PhVEZ4g3a" \
--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 Dve861f5acbkd6PhVEZ4g3a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "4cc0d3c2-a581-3412-9090-8ed6bc75dc99",
"agency": "0733",
"account": "4157592-3",
"type": "caixa",
"balance": 7226.08,
"holder_type": "pj",
"alias": "dolorem",
"limit": 7512.59,
"available_balance": 14738.67,
"used_limit": 0,
"available_limit": 7512.59,
"is_default": null,
"default_payment_method": null,
"bank": {
"id": null,
"name": null,
"code": null
},
"created_at": null,
"updated_at": null
},
{
"id": "52aa3196-4f3f-3ee0-b8a9-ff4b64f2651e",
"agency": "5575",
"account": "6347600-2",
"type": "caixa",
"balance": 9670.39,
"holder_type": "pf",
"alias": "ea",
"limit": 4024.6,
"available_balance": 13694.99,
"used_limit": 0,
"available_limit": 4024.6,
"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 E8agaePd46vD6bZV3c5fkh1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"agency\": \"Example Agency\",
\"account\": \"0274617-2\",
\"bank_id\": \"d582d9f1-0b4a-3bc1-9cbc-c4a46bc85779\",
\"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 E8agaePd46vD6bZV3c5fkh1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"agency": "Example Agency",
"account": "0274617-2",
"bank_id": "d582d9f1-0b4a-3bc1-9cbc-c4a46bc85779",
"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/10" \
--header "Authorization: Bearer aVf8615kEvg4aDe3PbhcdZ6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"agency\": \"Example Agency\",
\"account\": \"9831172-2\",
\"bank_id\": \"413f93f7-557c-35cf-830a-b5ac4158031a\",
\"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/10"
);
const headers = {
"Authorization": "Bearer aVf8615kEvg4aDe3PbhcdZ6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"agency": "Example Agency",
"account": "9831172-2",
"bank_id": "413f93f7-557c-35cf-830a-b5ac4158031a",
"type": "Example Type",
"holder_type": "Example Holder type",
"alias": "Example Alias",
"balance": 1,
"limit": 1,
"is_default": true,
"default_payment_method": "Example Default payment method"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show bank account
requires authentication bank-account show
Show a bank account
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/bank-accounts/3" \
--header "Authorization: Bearer kvdVfgc3616PEaha5b8D4eZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/3"
);
const headers = {
"Authorization": "Bearer kvdVfgc3616PEaha5b8D4eZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "000688b5-f791-3bb0-a197-e314b91f3d98",
"agency": "7498",
"account": "7388786-3",
"type": "corrente",
"balance": 4457.84,
"holder_type": "pj",
"alias": "eaque",
"limit": 8457.62,
"available_balance": 12915.460000000001,
"used_limit": 0,
"available_limit": 8457.62,
"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/7" \
--header "Authorization: Bearer h46Vda3PDkfbgE5ce18Z6va" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/7"
);
const headers = {
"Authorization": "Bearer h46Vda3PDkfbgE5ce18Z6va",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Bank Statements
Endpoints for bank account statements (extrato bancário)
Bank statement summary
requires authentication bank-statement summary
Get aggregated summary for the period
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/bank-accounts/3/statements/summary" \
--header "Authorization: Bearer 3hEv5D4bVP6kZage1f86acd" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_start\": \"2024-01-01\",
\"date_end\": \"2024-01-01\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/3/statements/summary"
);
const headers = {
"Authorization": "Bearer 3hEv5D4bVP6kZage1f86acd",
"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/7/statements" \
--header "Authorization: Bearer 3egkaEcv8b6f15VDahd46PZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"exercitationem\",
\"sort_desc\": false,
\"page\": 7,
\"per_page\": 8,
\"q\": \"xrdlgruibaxwfazupdnua\",
\"type\": \"tarifa\",
\"date_start\": \"2026-11-04T16:27:14\",
\"date_end\": \"2065-05-04\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/7/statements"
);
const headers = {
"Authorization": "Bearer 3egkaEcv8b6f15VDahd46PZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "exercitationem",
"sort_desc": false,
"page": 7,
"per_page": 8,
"q": "xrdlgruibaxwfazupdnua",
"type": "tarifa",
"date_start": "2026-11-04T16:27:14",
"date_end": "2065-05-04"
};
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/10/statements/quam" \
--header "Authorization: Bearer PceZaVhE68gv6d5b34kaDf1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/10/statements/quam"
);
const headers = {
"Authorization": "Bearer PceZaVhE68gv6d5b34kaDf1",
"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 5vd6VcakZP863Eaghf4De1b" \
--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 5vd6VcakZP863Eaghf4De1b",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "5b001ff8-2745-3d51-ab77-9212ded456ff",
"name": "Ramires e Cordeiro e Filhos",
"code": "503"
},
{
"id": "0cb03793-b647-3e57-9e5b-56d58f76c551",
"name": "Amaral e Valdez e Associados",
"code": "179"
}
],
"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 PV8f5Zheg16cvkb36aDadE4" \
--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 PV8f5Zheg16cvkb36aDadE4",
"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 P4bVadZ6ka3ecDf5vhE1g68" \
--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 P4bVadZ6ka3ecDf5vhE1g68",
"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 ZPcf6V3bhavDk8eg6da5E41" \
--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 ZPcf6V3bhavDk8eg6da5E41",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "3a2df79a-4017-3e2a-acad-9ac8e66c781d",
"name": "Pedrosa e Carmona e Filhos",
"code": "600"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 a6bcdVD48gae6E5vPZfhk13" \
--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 a6bcdVD48gae6E5vPZfhk13",
"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 ekV65vdZ3gPEca1fDbah864" \
--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 ekV65vdZ3gPEca1fDbah864",
"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=Dolorem+dicta+non+ut+suscipit+corporis.&categories[]=ducimus&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=ea&customers[]=ea&suppliers[]=perferendis&works[]=architecto&cost_centers[]=et" \
--header "Authorization: Bearer Dd6EckgaV14h83ZP5b6vaef" \
--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": "Dolorem dicta non ut suscipit corporis.",
"categories[0]": "ducimus",
"date_start": "2021-01-01",
"date_end": "2021-01-31",
"bank_accounts[0]": "ea",
"customers[0]": "ea",
"suppliers[0]": "perferendis",
"works[0]": "architecto",
"cost_centers[0]": "et",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Dd6EckgaV14h83ZP5b6vaef",
"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=Dignissimos+nesciunt+qui+autem+magni+sit+quasi+aperiam.&categories[]=maiores&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=quod&customers[]=sit&suppliers[]=sunt&works[]=dolores&cost_centers[]=repellat" \
--header "Authorization: Bearer PEvacVDf8dZ1kg4a3be5h66" \
--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": "Dignissimos nesciunt qui autem magni sit quasi aperiam.",
"categories[0]": "maiores",
"date_start": "2021-01-01",
"date_end": "2021-01-31",
"bank_accounts[0]": "quod",
"customers[0]": "sit",
"suppliers[0]": "sunt",
"works[0]": "dolores",
"cost_centers[0]": "repellat",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer PEvacVDf8dZ1kg4a3be5h66",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "b567a213-7a59-31a4-ba15-99721680d878",
"code": "FC-70449943",
"type": "depósito",
"amount": 744.55,
"description": "Quo quaerat eum neque consequatur ut.",
"transaction_date": "1971-10-24T03:00:00.000000Z",
"transaction_category": {
"id": null,
"name": null,
"type": null
},
"created_at": null,
"updated_at": null
},
{
"id": "cef936a3-3613-39d4-af51-38d15cc551b5",
"code": "FC-92714040",
"type": "saída",
"amount": -3824.11,
"description": "Id explicabo reiciendis ut quidem nobis quia perspiciatis voluptatem.",
"transaction_date": "1993-04-27T03:00:00.000000Z",
"transaction_category": {
"id": null,
"name": null,
"type": null
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create cash flow
requires authentication cash-flow store
Create a new cash flow
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/cash-flows" \
--header "Authorization: Bearer 3gfea4v68bZP5c6EDa1kdhV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"Example Type\",
\"cash_session_id\": \"3c94dead-9cb6-3d5b-ab6e-2917213f6e6b\",
\"transaction_category_id\": \"5bcc1cd7-8cd3-39c7-94c7-a7d3b89f7750\",
\"bank_account_id\": \"0be8d33a-eef4-39e9-9407-41ac8ebc3bba\",
\"customer_id\": \"ee0b4928-6c20-32f6-a369-0d289e699127\",
\"supplier_id\": \"30fc0ac2-869a-3e0f-a6b2-ccc4b73eee26\",
\"work_id\": \"f4bd4b01-35f0-3306-a391-d536eca37dae\",
\"cost_center_id\": \"2c9d6b80-542c-35aa-b1f5-51d1cdec56cd\",
\"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 3gfea4v68bZP5c6EDa1kdhV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "Example Type",
"cash_session_id": "3c94dead-9cb6-3d5b-ab6e-2917213f6e6b",
"transaction_category_id": "5bcc1cd7-8cd3-39c7-94c7-a7d3b89f7750",
"bank_account_id": "0be8d33a-eef4-39e9-9407-41ac8ebc3bba",
"customer_id": "ee0b4928-6c20-32f6-a369-0d289e699127",
"supplier_id": "30fc0ac2-869a-3e0f-a6b2-ccc4b73eee26",
"work_id": "f4bd4b01-35f0-3306-a391-d536eca37dae",
"cost_center_id": "2c9d6b80-542c-35aa-b1f5-51d1cdec56cd",
"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/4" \
--header "Authorization: Bearer Vk6eha6Zg3P51bEvf48Dacd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/4"
);
const headers = {
"Authorization": "Bearer Vk6eha6Zg3P51bEvf48Dacd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "e1fc8ec4-c2c1-33c4-a552-93e3e71f0636",
"code": "FC-53968466",
"type": "ajuste saída",
"amount": -9729.48,
"description": "Ut aut ad quis voluptatum nihil itaque aut.",
"transaction_date": "2025-07-08T03: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/19" \
--header "Authorization: Bearer PadZcE15af3D8b46hkVve6g" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"Example Type\",
\"cash_session_id\": \"773ddf77-134b-347a-88f9-9be3d0d48607\",
\"transaction_category_id\": \"c4ca50ec-8405-3ea0-a914-73f77642668d\",
\"bank_account_id\": \"2a70f63c-c186-37cc-8a00-6dab90e70cd1\",
\"customer_id\": \"fe081874-f126-3a85-98ea-eebfdc2d995d\",
\"supplier_id\": \"122099f4-8fe2-3795-a74d-d4b73f0b143c\",
\"work_id\": \"32d1aa1d-b63f-31b8-89fe-a48a0b1d46a8\",
\"cost_center_id\": \"1c944a9a-1218-357d-b68f-425d07972dfc\",
\"amount\": 1,
\"description\": \"Example Description\",
\"transaction_date\": \"2024-01-01\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/19"
);
const headers = {
"Authorization": "Bearer PadZcE15af3D8b46hkVve6g",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "Example Type",
"cash_session_id": "773ddf77-134b-347a-88f9-9be3d0d48607",
"transaction_category_id": "c4ca50ec-8405-3ea0-a914-73f77642668d",
"bank_account_id": "2a70f63c-c186-37cc-8a00-6dab90e70cd1",
"customer_id": "fe081874-f126-3a85-98ea-eebfdc2d995d",
"supplier_id": "122099f4-8fe2-3795-a74d-d4b73f0b143c",
"work_id": "32d1aa1d-b63f-31b8-89fe-a48a0b1d46a8",
"cost_center_id": "1c944a9a-1218-357d-b68f-425d07972dfc",
"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/13" \
--header "Authorization: Bearer P5akfEaD8c1eZ63bVdv4h6g" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/13"
);
const headers = {
"Authorization": "Bearer P5akfEaD8c1eZ63bVdv4h6g",
"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 5Eh8vfegaDZaVdb463k1cP6" \
--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 5Eh8vfegaDZaVdb463k1cP6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "57a14e4f-66cc-3912-a75a-6d73fa215a1b",
"code": null,
"opened_by": null,
"opened_at": "1976-01-09T22:30:19.000000Z",
"closed_by": null,
"closed_at": "1976-10-29T04:34:41.000000Z",
"opening_balance": 5546.86,
"closing_balance": 4949.35,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Aberto",
"hasSnapshot": false,
"created_at": "1999-08-03T01:24:26.000000Z",
"updated_at": "1987-08-21T21:05:20.000000Z"
},
{
"id": "742b671a-bd27-3797-ae08-48279d0b8dff",
"code": null,
"opened_by": null,
"opened_at": "1993-04-20T01:50:46.000000Z",
"closed_by": null,
"closed_at": "1987-05-29T04:28:20.000000Z",
"opening_balance": 6248.27,
"closing_balance": 269.23,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Fechado",
"hasSnapshot": false,
"created_at": "2000-08-02T13:19:58.000000Z",
"updated_at": "2008-05-21T20:15:46.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 fVdb568g34cvkDaa61ZhEeP" \
--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 fVdb568g34cvkDaa61ZhEeP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "ba2ca1bf-f1b6-3524-9749-d33dd10a5582",
"code": null,
"opened_by": null,
"opened_at": "1979-12-15T17:59:52.000000Z",
"closed_by": null,
"closed_at": "1991-05-09T19:49:51.000000Z",
"opening_balance": 3815.71,
"closing_balance": 2723.95,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Fechado",
"hasSnapshot": false,
"created_at": "1995-04-27T05:54:57.000000Z",
"updated_at": "1991-05-12T10:56:42.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/49d3bc34-9edf-3686-81d7-80be634e2706" \
--header "Authorization: Bearer 6adfc8ekV16EvgD5Zb34hPa" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/close/49d3bc34-9edf-3686-81d7-80be634e2706"
);
const headers = {
"Authorization": "Bearer 6adfc8ekV16EvgD5Zb34hPa",
"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/8cb58086-69eb-370b-ae67-b712911396ca/account-snapshot" \
--header "Authorization: Bearer vfDkEaV46h3bd8c15PeZga6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/8cb58086-69eb-370b-ae67-b712911396ca/account-snapshot"
);
const headers = {
"Authorization": "Bearer vfDkEaV46h3bd8c15PeZga6",
"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/d063c20e-f761-34d5-bf74-89a86d628723" \
--header "Authorization: Bearer cdP6g8ZkvE4V1ah6e3af5Db" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/d063c20e-f761-34d5-bf74-89a86d628723"
);
const headers = {
"Authorization": "Bearer cdP6g8ZkvE4V1ah6e3af5Db",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "8b59ad0d-16d3-3e9b-b68b-69e05914a1fc",
"code": null,
"opened_by": null,
"opened_at": "1989-10-22T15:53:46.000000Z",
"closed_by": null,
"closed_at": "2021-03-18T06:39:08.000000Z",
"opening_balance": 1035.18,
"closing_balance": 8395.29,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Aberto",
"hasSnapshot": false,
"created_at": "1970-04-22T11:19:51.000000Z",
"updated_at": "1986-01-09T06:21:05.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/3467d5f0-77a1-3030-94c1-4a3418692bf3" \
--header "Authorization: Bearer P1ZvEa8hd6fbakce53VD64g" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/3467d5f0-77a1-3030-94c1-4a3418692bf3"
);
const headers = {
"Authorization": "Bearer P1ZvEa8hd6fbakce53VD64g",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Central de Tutoriais
Consulta dos tutoriais liberados para quem está autenticado
Setores da central
requires authentication No specific permission required
Setores da pessoa que tenham ao menos um tutorial visível, com a contagem
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/tutorials/sectors" \
--header "Authorization: Bearer Z63vPaDgfdEkVab58h146ec" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/tutorials/sectors"
);
const headers = {
"Authorization": "Bearer Z63vPaDgfdEkVab58h146ec",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "08a6913f-ec11-34b0-885c-b8f77dbb1e8f",
"name": "excepturi voluptatem",
"slug": null,
"abbreviation": null,
"tutorials_count": 0
},
{
"id": "677ba5d6-cd9c-3d58-8b74-3b4de2fadf6b",
"name": "molestiae pariatur",
"slug": null,
"abbreviation": "twv",
"tutorials_count": 0
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Módulos da central
requires authentication No specific permission required
Módulos ativos com tutoriais visíveis para a pessoa; aceita filtro de setor
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/tutorials/modules?sector_id=2d7cf809-c2db-368b-aa21-84b54a01096a" \
--header "Authorization: Bearer 6b31vE4c6dPZ8fVake5Dgha" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/tutorials/modules"
);
const params = {
"sector_id": "2d7cf809-c2db-368b-aa21-84b54a01096a",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 6b31vE4c6dPZ8fVake5Dgha",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "e940e580-47ff-3f46-b2ad-27770715e894",
"name": "Unde quas",
"slug": "unde-quas-850652",
"description": "Ut et dolorem sunt et magnam et aspernatur.",
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
},
{
"id": "42dc97ca-c98e-37df-ab5e-f24c453c38d7",
"name": "Dolor aut",
"slug": "dolor-aut-642522",
"description": "Non rerum enim dolore suscipit dignissimos.",
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Listar tutoriais
requires authentication No specific permission required
Lista paginada dos tutoriais visíveis, com filtros de módulo, setor e busca por texto
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/tutorials?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=ordem+de+servi%C3%A7o&module_id=ac3ebd4f-374d-3ae8-a344-4284f7fc2f8c§or_id=5bb01ac5-0974-3168-a0b0-8cbec4c84fe5" \
--header "Authorization: Bearer Vf1avb536eP6khgEaZ84dDc" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/tutorials"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "ordem de serviço",
"module_id": "ac3ebd4f-374d-3ae8-a344-4284f7fc2f8c",
"sector_id": "5bb01ac5-0974-3168-a0b0-8cbec4c84fe5",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Vf1avb536eP6khgEaZ84dDc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "a54cbbce-46e0-3332-9972-e71b253a303b",
"title": "Ut impedit aspernatur qui",
"description": "Suscipit cum ratione ut libero iusto error.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a325a305-e7e5-4890-a8f7-a9d510ad2173",
"name": "Facere facilis",
"slug": "facere-facilis-69910"
},
"created_at": null,
"updated_at": null
},
{
"id": "0a95ca4c-bd04-3fdd-822c-18f8ecd0c543",
"title": "Unde ut id ab",
"description": "Voluptas similique natus qui facilis officia voluptas eos.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a325a305-e9df-46ed-85b4-f92034a40a60",
"name": "Facilis rerum",
"slug": "facilis-rerum-68245"
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Detalhe do tutorial
requires authentication No specific permission required
Tutorial com os itens em ordem. Fora da visibilidade, responde 404.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/tutorials/1" \
--header "Authorization: Bearer ZcD66Evead1f8g3Va5Pbkh4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/tutorials/1"
);
const headers = {
"Authorization": "Bearer ZcD66Evead1f8g3Va5Pbkh4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "11bd8f00-304c-3eb7-bc80-d80bff259fa0",
"title": "Velit est id voluptate",
"description": "Velit sunt et modi nobis aut.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a325a305-ef28-4bb1-a448-c3bd2a1af133",
"name": "Placeat sit",
"slug": "placeat-sit-41999"
},
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
URL do item
requires authentication No specific permission required
Devolve a URL assinada de curta validade para o arquivo no S3, ou o link externo do item. O caminho bruto do S3 nunca é exposto.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/tutorial-items/019556e7-2e9f-777c-a177-30bbf0646c32/url" \
--header "Authorization: Bearer gv6a3ZbD5E1khcdPfa864Ve" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/tutorial-items/019556e7-2e9f-777c-a177-30bbf0646c32/url"
);
const headers = {
"Authorization": "Bearer gv6a3ZbD5E1khcdPfa864Ve",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"type": "string",
"title": "string",
"url": "string",
"expires_in": "integer",
"mime_type": "string",
"size_bytes": "integer"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Contracts
Endpoints for managing work contracts
List contracts
requires authentication contract index
List all work contracts
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/contracts" \
--header "Authorization: Bearer hPE6db6af5aeg8VDZv3c14k" \
--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\": \"c852b628-017b-3e92-b98a-f3e9220e065b\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts"
);
const headers = {
"Authorization": "Bearer hPE6db6af5aeg8VDZv3c14k",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "Example Sort by",
"sort_desc": true,
"page": 1,
"per_page": 1,
"work_id": "c852b628-017b-3e92-b98a-f3e9220e065b"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "98bcf3e4-7beb-3ef8-a14f-b8a52afe5bdd",
"number": "033/2026",
"started_at": "2026-11-04",
"deadline_at": "2027-11-04",
"work": {
"id": "a325a2fa-6d49-40f0-9540-567ef4a36ca2",
"name": "Sr. Allan Thales Gusmão"
},
"created_at": null,
"updated_at": null
},
{
"id": "1107b839-4ea9-38f1-ab13-c3c3da6ebfeb",
"number": "509/2026",
"started_at": "2026-11-04",
"deadline_at": "2027-11-04",
"work": {
"id": "a325a2fa-7963-4d8b-b599-ca9c5423869e",
"name": "Srta. Lia Ortiz Sanches"
},
"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 5cv46dP6EeZg8a3fbDVhka1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"work_id\": \"6bb31180-c0c1-32ec-abac-b2d8f7588ff0\",
\"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 5cv46dP6EeZg8a3fbDVhka1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"work_id": "6bb31180-c0c1-32ec-abac-b2d8f7588ff0",
"number": "Example Number",
"started_at": "Example Started at",
"deadline_at": "Example Deadline at"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": "object"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show contract
requires authentication contract show
Show a work contract
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/contracts/5" \
--header "Authorization: Bearer Z64fekPD8v5aahdVE63gb1c" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts/5"
);
const headers = {
"Authorization": "Bearer Z64fekPD8v5aahdVE63gb1c",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "2970f1e8-20ec-3635-a371-8961ed917ec9",
"number": "212/2026",
"started_at": "2026-11-04",
"deadline_at": "2027-11-04",
"work": {
"id": "a325a2fa-86fd-4b76-b2e3-91df7fb92d29",
"name": "Dr. Pablo Francisco Pontes Jr."
},
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update contract
requires authentication contract update
Update a work contract
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/contracts/20" \
--header "Authorization: Bearer bP6453deVa1DEafvkhgZc86" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"number\": \"Example Number\",
\"started_at\": \"Example Started at\",
\"deadline_at\": \"Example Deadline at\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts/20"
);
const headers = {
"Authorization": "Bearer bP6453deVa1DEafvkhgZc86",
"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/beatae" \
--header "Authorization: Bearer 3a15hZca8vb6gk6PVfEdDe4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts/beatae"
);
const headers = {
"Authorization": "Bearer 3a15hZca8vb6gk6PVfEdDe4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cost Centers
Endpoints for cost centers
Suggest next code
requires authentication cost-center index
Próximo código livre sob o pai informado. O código é sugestão e pode ser alterado antes de salvar.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/cost-centers/next-code?parent_id=voluptatem" \
--header "Authorization: Bearer aa68fZ3chd6k4vPEebDg5V1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"parent_id\": \"est\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/next-code"
);
const params = {
"parent_id": "voluptatem",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer aa68fZ3chd6k4vPEebDg5V1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"parent_id": "est"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"code": "001.002"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cost center requirement
requires authentication cost-center requirement-config index
Data a partir da qual o centro de custo é obrigatório em lançamentos novos. A tela usa isso para marcar o campo como obrigatório sem precisar tentar salvar.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/cost-centers/requirement-config" \
--header "Authorization: Bearer 8a3avVE4gdf61ec5b6ZPDhk" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/requirement-config"
);
const headers = {
"Authorization": "Bearer 8a3avVE4gdf61ec5b6ZPDhk",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"required_from": "2026-11-03",
"required_now": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update cost center requirement
requires authentication cost-center requirement-config update
Ajusta a data de corte. Enviar nulo desliga a obrigatoriedade.
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/cost-centers/requirement-config" \
--header "Authorization: Bearer kfgaVh46cD3ea16dZ5EPv8b" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"required_from\": \"2026-11-03\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/requirement-config"
);
const headers = {
"Authorization": "Bearer kfgaVh46cD3ea16dZ5EPv8b",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"required_from": "2026-11-03"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"required_from": "2026-11-03",
"required_now": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Stock cost center
requires authentication cost-center stock-config index
Centro de custo que recebe a compra de material. A conta a pagar gerada por NF-e de produto nasce nele, porque o custo do material chega à obra pela movimentação de estoque.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/cost-centers/stock-config" \
--header "Authorization: Bearer f3EhVZbva84egD166Pkacd5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/stock-config"
);
const headers = {
"Authorization": "Bearer f3EhVZbva84egD166Pkacd5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"cost_center": {
"id": "uuid",
"code": "003.001",
"name": "Estoque central"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update stock cost center
requires authentication cost-center stock-config update
Aponta a configuração para outro centro. Nulo desliga: a conta da nota passa a nascer sem centro, para ser classificada na conferência.
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/cost-centers/stock-config" \
--header "Authorization: Bearer akc36DZVvh6Pfe1Edg8b54a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"cost_center_id\": \"nemo\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/stock-config"
);
const headers = {
"Authorization": "Bearer akc36DZVvh6Pfe1Edg8b54a",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"cost_center_id": "nemo"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"cost_center": {
"id": "uuid",
"code": "003.001",
"name": "Estoque central"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List cost centers
requires authentication cost-center index
Lista plana ordenada por código, sem paginação. Cada item traz nível e caminho completo, para o cliente montar a árvore em memória.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/cost-centers?q=vila&active=1" \
--header "Authorization: Bearer DaZhvk3fcg86Ed5P16baeV4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers"
);
const params = {
"q": "vila",
"active": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer DaZhvk3fcg86Ed5P16baeV4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "197b948d-1010-30f2-a5cd-0f52235b435e",
"code": "189",
"name": "sed enim",
"level": 1,
"path": null,
"is_active": true,
"selectable": false,
"created_at": null,
"updated_at": null
},
{
"id": "cba8aafd-4cff-3424-856d-0460d766d31c",
"code": "736",
"name": "accusamus sunt",
"level": 1,
"path": null,
"is_active": true,
"selectable": false,
"created_at": null,
"updated_at": null
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show cost center
requires authentication cost-center show
Detalhe de um centro de custo
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/cost-centers/vel" \
--header "Authorization: Bearer 46PagZVc1vh5e8fdbEDk3a6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/vel"
);
const headers = {
"Authorization": "Bearer 46PagZVc1vh5e8fdbEDk3a6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "68ec480d-51e2-3786-a578-ca6d81bafac6",
"code": "770",
"name": "et odio",
"level": 1,
"path": null,
"is_active": true,
"selectable": false,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create cost center
requires authentication cost-center store
Cadastra um centro de custo
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/cost-centers" \
--header "Authorization: Bearer aeEhd61cf4g3va8Db56VkPZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"code\": \"Example Code\",
\"name\": \"Example Name\",
\"parent_id\": \"4e3a0ab3-8303-300d-bf3c-5df3ff8be260\",
\"work_id\": \"a5d672b0-e2ec-3a7a-9260-4e1a043aa4ec\",
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers"
);
const headers = {
"Authorization": "Bearer aeEhd61cf4g3va8Db56VkPZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"code": "Example Code",
"name": "Example Name",
"parent_id": "4e3a0ab3-8303-300d-bf3c-5df3ff8be260",
"work_id": "a5d672b0-e2ec-3a7a-9260-4e1a043aa4ec",
"is_active": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update cost center
requires authentication cost-center update
Atualiza um centro de custo, inclusive a situação (inativar e reativar)
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/cost-centers/qui" \
--header "Authorization: Bearer 6eEvPhVk4Z8dcDfg35b6aa1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"code\": \"Example Code\",
\"name\": \"Example Name\",
\"parent_id\": \"6c945e39-4abf-3e79-bba3-41cd33b39c08\",
\"work_id\": \"463e377d-503a-3859-b50c-c942f13be8c3\",
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/qui"
);
const headers = {
"Authorization": "Bearer 6eEvPhVk4Z8dcDfg35b6aa1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"code": "Example Code",
"name": "Example Name",
"parent_id": "6c945e39-4abf-3e79-bba3-41cd33b39c08",
"work_id": "463e377d-503a-3859-b50c-c942f13be8c3",
"is_active": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete cost center
requires authentication cost-center delete
Exclui um centro de custo. Só é permitido quando ele não tem centros abaixo nem lançamentos.
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/cost-centers/voluptate" \
--header "Authorization: Bearer 4hf6eD6bPdZa5E3gka18Vvc" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cost-centers/voluptate"
);
const headers = {
"Authorization": "Bearer 4hf6eD6bPdZa5E3gka18Vvc",
"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 6b3g1Z5chdEaPD84fekvaV6" \
--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 6b3g1Z5chdEaPD84fekvaV6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "0479fda6-3528-3898-8d7a-fff28272662d",
"name": "Luana Solano Estrada Jr.",
"email": "eunice01@example.com",
"phone": "(28) 3391-4908",
"document": "119.791.372-69",
"type": "pj",
"responsible": "Josué Pablo Cordeiro 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
},
{
"id": "18b97d81-5edf-3fdc-ba5e-2366fd407fd1",
"name": "Alice Maitê de Souza",
"email": "laiane.uchoa@example.org",
"phone": "(68) 2675-4818",
"document": "471.567.409-20",
"type": "pj",
"responsible": "Sra. Eloá Lutero",
"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 fg6a5VZebchvd8kE46P3aD1" \
--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 fg6a5VZebchvd8kE46P3aD1",
"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/7" \
--header "Authorization: Bearer Dhea15d68f4baPvEkZ6gcV3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/customers/7"
);
const headers = {
"Authorization": "Bearer Dhea15d68f4baPvEkZ6gcV3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "7bc5fe57-ed88-3969-89f7-c7e285a2ca1c",
"name": "Dr. Carlos Azevedo Cordeiro",
"email": "orodrigues@example.com",
"phone": "(89) 3348-9970",
"document": "943.946.748-75",
"type": "pj",
"responsible": "Sr. Ítalo das Neves 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/19" \
--header "Authorization: Bearer 6eZdhv4fc5DVg86b1a3PkEa" \
--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/19"
);
const headers = {
"Authorization": "Bearer 6eZdhv4fc5DVg86b1a3PkEa",
"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 P6vc8eZ3abgfadh6kVED145" \
--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 P6vc8eZ3abgfadh6kVED145",
"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 aah6g386Ev4ZbV1PdkDe5cf" \
--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\": \"417d81a2-d1fb-3ea2-afff-18ceccfc80be\",
\"contract_id\": \"cecd40ac-2d89-314b-a088-bb0c6dcbd7b3\",
\"status_id\": \"50be6af3-1c1d-324d-893c-dc4a69abae11\",
\"filled_by\": \"da8680bc-6b07-363b-ba96-162e34d0eca0\",
\"responsible_id\": \"2d887893-ea16-340a-8531-cc2214f99069\",
\"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 aah6g386Ev4ZbV1PdkDe5cf",
"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": "417d81a2-d1fb-3ea2-afff-18ceccfc80be",
"contract_id": "cecd40ac-2d89-314b-a088-bb0c6dcbd7b3",
"status_id": "50be6af3-1c1d-324d-893c-dc4a69abae11",
"filled_by": "da8680bc-6b07-363b-ba96-162e34d0eca0",
"responsible_id": "2d887893-ea16-340a-8531-cc2214f99069",
"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": "d37d5979-791a-3c53-8c5a-99bfda754e37",
"code": "RDO-04-11-26",
"report_number": 1,
"date": "2026-11-04",
"status": {
"id": "a325a2fa-fe99-4c0a-afd2-d13be87282b3",
"slug": null,
"name": null,
"abbreviation": "non",
"color": "#b62a77",
"text_color": "#fcfdf7"
},
"work": {
"id": "a325a2fa-f1e2-4ef2-ab7f-f09234fa9f33",
"name": "Sr. Agostinho Manuel Padrão",
"started_at": "1973-08-10 14:39:52"
},
"filled_by": {
"id": "a325a2fa-fa0d-4583-ad6d-9642cad39e5d",
"name": "Dr. Pietro Feest DVM"
},
"contract_number": "830/2026",
"deadline_at": "2027-11-04",
"technical_responsible": {
"name": null,
"certification": null,
"crea": null
},
"activities": [],
"occurrences": null,
"next_day_forecast": null,
"finalized_at": null,
"has_signed_document": false,
"content_hash": null,
"gov_br_validation_url": null,
"created_at": null,
"updated_at": null
},
{
"id": "a96130b0-b1e3-3a53-9ea9-9f8166ba3cf5",
"code": "RDO-04-11-26",
"report_number": 1,
"date": "2026-11-04",
"status": {
"id": "a325a2fb-0b24-4ddd-8bbb-21cfaaa903ed",
"slug": null,
"name": null,
"abbreviation": "repudiandae",
"color": "#de1fe2",
"text_color": "#99a063"
},
"work": {
"id": "a325a2fb-03b0-4553-8e9d-5d8e372e433c",
"name": "Sr. Evandro Barreto Lira Filho",
"started_at": "2026-07-26 00:01:39"
},
"filled_by": {
"id": "a325a2fb-08e7-42d4-b664-507eb3f5aa82",
"name": "Mr. Cole Maggio DDS"
},
"contract_number": "744/2026",
"deadline_at": "2027-11-04",
"technical_responsible": {
"name": null,
"certification": null,
"crea": null
},
"activities": [],
"occurrences": null,
"next_day_forecast": null,
"finalized_at": null,
"has_signed_document": false,
"content_hash": null,
"gov_br_validation_url": null,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Pending RDO days
requires authentication daily-log index
List the days in a period that have no RDO for a given work
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/daily-logs/pending-days" \
--header "Authorization: Bearer kba1fgahdeP36EvZDc58V64" \
--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 kba1fgahdeP36EvZDc58V64",
"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/id" \
--header "Authorization: Bearer Pb3k1a8ZVgD5Edacefh664v" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/id"
);
const headers = {
"Authorization": "Bearer Pb3k1a8ZVgD5Edacefh664v",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d384d6ed-cba6-37b4-8e58-161329704f74",
"code": "RDO-04-11-26",
"report_number": 1,
"date": "2026-11-04",
"status": {
"id": "a325a2fb-2553-4781-bb62-d77e0186c26e",
"slug": null,
"name": null,
"abbreviation": "rerum",
"color": "#81727e",
"text_color": "#117bab"
},
"work": {
"id": "a325a2fb-193b-458f-81cc-0baffa299f8b",
"name": "Bruno Santiago",
"started_at": "2003-02-25 18:59:45"
},
"filled_by": {
"id": "a325a2fb-2322-4e89-8209-61dc98ef7d71",
"name": "Prof. Cristobal Morar MD"
},
"contract_number": "877/2026",
"deadline_at": "2027-11-04",
"technical_responsible": {
"name": null,
"certification": null,
"crea": null
},
"activities": [],
"occurrences": null,
"next_day_forecast": null,
"finalized_at": null,
"has_signed_document": false,
"content_hash": null,
"gov_br_validation_url": null,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create daily log
requires authentication daily-log store
Open a new daily work report (RDO) for a work
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/daily-logs" \
--header "Authorization: Bearer v134eE5kgVa686ZcdPbDhaf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"contract_id\": \"Example Contract id\",
\"date\": \"2024-01-01\",
\"status_id\": \"e93bfd94-7e84-347b-8b92-173758fdf5e2\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs"
);
const headers = {
"Authorization": "Bearer v134eE5kgVa686ZcdPbDhaf",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"contract_id": "Example Contract id",
"date": "2024-01-01",
"status_id": "e93bfd94-7e84-347b-8b92-173758fdf5e2"
};
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/voluptate" \
--header "Authorization: Bearer hb5g3aP1DEk64Vdac6e8fZv" \
--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\": \"91d58345-f405-4ea0-87b0-a00473f42b68\",
\"quantity\": 1
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/voluptate"
);
const headers = {
"Authorization": "Bearer hb5g3aP1DEk64Vdac6e8fZv",
"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": "91d58345-f405-4ea0-87b0-a00473f42b68",
"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/rerum/finalize" \
--header "Authorization: Bearer EfckDe1a63PV4vaZh86b5dg" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/rerum/finalize"
);
const headers = {
"Authorization": "Bearer EfckDe1a63PV4vaZh86b5dg",
"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/et/signed-document" \
--header "Authorization: Bearer 6e5ab3PcfgvVE4h1Dak6Zd8" \
--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/et/signed-document"
);
const headers = {
"Authorization": "Bearer 6e5ab3PcfgvVE4h1Dak6Zd8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"path": "Example Path",
"name": "Example Name",
"size": "Example Size",
"extension": "Example Extension",
"gov_br_validation_url": "https:\/\/example.com"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": "object"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reopen daily log
requires authentication daily-log reopen
Send a finalized RDO back to draft (Finalizado → Rascunho). Refused when a gov.br-signed document is attached
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/daily-logs/sapiente/reopen" \
--header "Authorization: Bearer 45DhVcfZEd186avegkab36P" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/sapiente/reopen"
);
const headers = {
"Authorization": "Bearer 45DhVcfZEd186avegkab36P",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": "object"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Attach photos
requires authentication daily-log update
Attach photographs (already uploaded to storage) to a draft RDO
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/daily-logs/accusantium/photos" \
--header "Authorization: Bearer bhgdD6Vfa4Zv8E16ek5aPc3" \
--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/accusantium/photos"
);
const headers = {
"Authorization": "Bearer bhgdD6Vfa4Zv8E16ek5aPc3",
"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/ut/photos/voluptatibus" \
--header "Authorization: Bearer 6dh5v1fbck3EaPa8Z64VDge" \
--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/ut/photos/voluptatibus"
);
const headers = {
"Authorization": "Bearer 6dh5v1fbck3EaPa8Z64VDge",
"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/est/photos/rerum" \
--header "Authorization: Bearer dbh154Evf63gZaDPkc6ea8V" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/est/photos/rerum"
);
const headers = {
"Authorization": "Bearer dbh154Evf63gZaDPkc6ea8V",
"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/temporibus" \
--header "Authorization: Bearer h6vD8V3P6gacaE1Zefb54dk" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/temporibus"
);
const headers = {
"Authorization": "Bearer h6vD8V3P6gacaE1Zefb54dk",
"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 5PEf6cbVgZD8aa34hd1k6ev" \
--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 5PEf6cbVgZD8aa34hd1k6ev",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "1ed65f71-850a-378a-83f5-9516f7be899b",
"name": "Nihil",
"code": "MKH",
"description": "Culpa enim assumenda tempora blanditiis illum.",
"active": true
},
{
"id": "ef77d1dc-31b5-31a4-8895-d4c2ceaa5347",
"name": "Quia",
"code": "ARL",
"description": "Et delectus impedit blanditiis eum sit corporis.",
"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 4aadEe61hVb56f8PkDZvg3c" \
--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 4aadEe61hVb56f8PkDZvg3c",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "2493635b-a510-32dc-aaf0-cd36b3b5560f",
"name": "A",
"code": "LTF",
"description": "Consectetur incidunt est sequi aperiam.",
"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 v1PZ5abegkV3aDdfE66ch84" \
--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 v1PZ5abegkV3aDdfE66ch84",
"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 85Zbcd6DePkf4hVgav163aE" \
--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 85Zbcd6DePkf4hVgav163aE",
"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/enim" \
--header "Authorization: Bearer vcf4D8aghP5V3bEked166Za" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/disciplines/enim"
);
const headers = {
"Authorization": "Bearer vcf4D8aghP5V3bEked166Za",
"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 hV6861akEc43e5PDgZadfbv" \
--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 hV6861akEc43e5PDgZadfbv",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "64db9f63-7ad3-3104-a3a3-d23985c11364",
"name": "Dr. Isabella Daniele Estrada Filho",
"description": "Dignissimos voluptates sapiente odit ullam. Dolore neque voluptas porro ut alias quia.",
"module": "document"
},
{
"id": "831df698-46de-375f-a88f-903f546c3acf",
"name": "Gisele Agatha Marinho Jr.",
"description": "Omnis id fuga quas nulla ullam ipsam sit officia. Dignissimos nam iste facere cumque quae reprehenderit. Et sapiente qui fugiat nam.",
"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/quam" \
--header "Authorization: Bearer bgcZfEPVk1ed4h3a56v6D8a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/document-categories/quam"
);
const headers = {
"Authorization": "Bearer bgcZfEPVk1ed4h3a56v6D8a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "bcd233c0-d11e-3b09-91a2-91131201e755",
"name": "Carolina Vila",
"description": "Saepe nulla occaecati impedit mollitia. Animi nostrum fugiat facilis officia veniam eveniet ipsam qui.",
"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 E64cbPV68vDfZagda1ke3h5" \
--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 E64cbPV68vDfZagda1ke3h5",
"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/quia" \
--header "Authorization: Bearer 5e83a1PZkg6aE4bh6dvcfVD" \
--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/quia"
);
const headers = {
"Authorization": "Bearer 5e83a1PZkg6aE4bh6dvcfVD",
"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/voluptatibus" \
--header "Authorization: Bearer bfaZ1358hegVEd6c4a6vDPk" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/document-categories/voluptatibus"
);
const headers = {
"Authorization": "Bearer bfaZ1358hegVEd6c4a6vDPk",
"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[]=aut&documentable_type=consequatur&customers[]=quae&suppliers[]=omnis" \
--header "Authorization: Bearer VcDvadbZa56ge1EhPk846f3" \
--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]": "aut",
"documentable_type": "consequatur",
"customers[0]": "quae",
"suppliers[0]": "omnis",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer VcDvadbZa56ge1EhPk846f3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "584039e6-f5c1-3482-8920-8877a6b8d32b",
"name": "Cezar Benício Correia Sobrinho",
"file": {
"id": null,
"url": null,
"extension": null
},
"created_at": null,
"updated_at": null
},
{
"id": "e84b585f-3292-3d99-b9dd-1cc957884dbc",
"name": "Srta. Amanda Madeira",
"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/18" \
--header "Authorization: Bearer P6d85ZVbf6eaDh3ga1v4kEc" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/documents/18"
);
const headers = {
"Authorization": "Bearer P6d85ZVbf6eaDh3ga1v4kEc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "9da5b7b9-63c5-3b55-8ba4-ed1761b5cf8b",
"name": "Sr. Matheus Matheus Rangel",
"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 PVZ4aehDfb38da61vkE56cg" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"category_id\": \"05b21eae-be6f-3403-a7e8-f0fc55573b1e\",
\"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 PVZ4aehDfb38da61vkE56cg",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"category_id": "05b21eae-be6f-3403-a7e8-f0fc55573b1e",
"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/19" \
--header "Authorization: Bearer h3eDcdZ6vk651EbaVf48Pga" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"category_id\": \"f0791f04-f615-3bd6-93f6-c5afd5c29599\",
\"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/19"
);
const headers = {
"Authorization": "Bearer h3eDcdZ6vk651EbaVf48Pga",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"category_id": "f0791f04-f615-3bd6-93f6-c5afd5c29599",
"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 dgEcP6ah6fv3a4V1bDZke85" \
--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 dgEcP6ah6fv3a4V1bDZke85",
"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 bZE86aa1k4Pgchdv5e6fDV3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"ut\",
\"renewal_status\": \"ignored\",
\"urgency\": \"expires_30_days\",
\"employee_id\": \"assumenda\",
\"epi_type_id\": \"blanditiis\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals"
);
const headers = {
"Authorization": "Bearer bZE86aa1k4Pgchdv5e6fDV3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "ut",
"renewal_status": "ignored",
"urgency": "expires_30_days",
"employee_id": "assumenda",
"epi_type_id": "blanditiis"
};
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 cZ146hEDePVf5k8v3dgab6a" \
--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 cZ146hEDePVf5k8v3dgab6a",
"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/facilis/renew" \
--header "Authorization: Bearer Ed6h14cefka3avg5b8ZPD6V" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"quantity\": 1,
\"condition\": \"new\",
\"confirm_insufficient_stock\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/facilis/renew"
);
const headers = {
"Authorization": "Bearer Ed6h14cefka3avg5b8ZPD6V",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quantity": 1,
"condition": "new",
"confirm_insufficient_stock": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Ignore EPI renewal
requires authentication employee-epi update
Ignore expiry alerts for an EPI delivery
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/at/ignore" \
--header "Authorization: Bearer hZka6V14f5cad6P8g3EDbve" \
--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/at/ignore"
);
const headers = {
"Authorization": "Bearer hZka6V14f5cad6P8g3EDbve",
"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/accusantium/ignore" \
--header "Authorization: Bearer eE4fZP6V65kaa1cdvg38Dbh" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/accusantium/ignore"
);
const headers = {
"Authorization": "Bearer eE4fZP6V65kaa1cdvg38Dbh",
"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 6e5ZD314vabVhc68EPgkdaf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"qui\",
\"stock_id\": \"aut\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types"
);
const headers = {
"Authorization": "Bearer 6e5ZD314vabVhc68EPgkdaf",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "qui",
"stock_id": "aut"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "ceb14767-c5e2-3684-be9b-fc5e58d0e3bc",
"name": "id ut",
"default_validity_days": 295,
"requires_signature": true,
"numero_ca": "13956",
"product": null,
"available_quantity": null,
"created_at": null,
"updated_at": null
},
{
"id": "b0b8d76b-65ef-305b-8380-4e10d8511d35",
"name": "fuga incidunt",
"default_validity_days": 385,
"requires_signature": false,
"numero_ca": "28526",
"product": null,
"available_quantity": null,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List catalog products that could become EPI
requires authentication epi index
Products sitting in a family flagged as EPI that do not have EPI attributes yet. Being here does not make a product an EPI: it becomes one when someone gives it a validity, through the create endpoint with action link_existing.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/epi-types/candidates" \
--header "Authorization: Bearer c14EPvhD6a38a6fVbkdgeZ5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"totam\",
\"stock_id\": \"provident\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/candidates"
);
const headers = {
"Authorization": "Bearer c14EPvhD6a38a6fVbkdgeZ5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "totam",
"stock_id": "provident"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show EPI type
requires authentication epi show
Show an EPI type
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/epi-types/libero" \
--header "Authorization: Bearer d6vfeV5c1b8Paa6hDkgZ34E" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/libero"
);
const headers = {
"Authorization": "Bearer d6vfeV5c1b8Paa6hDkgZ34E",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a8dff06e-5b0f-3e69-9f97-94440aa3ff59",
"name": "quia nemo",
"default_validity_days": 215,
"requires_signature": false,
"numero_ca": "15661",
"product": null,
"available_quantity": null,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create EPI type
requires authentication epi store
Create a new EPI type
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/epi-types" \
--header "Authorization: Bearer vPEcfhZ4e3V6b5dD86gka1a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"default_validity_days\": 1,
\"requires_signature\": true,
\"numero_ca\": \"Example Numero ca\",
\"action\": \"Example Action\",
\"product_id\": \"196e5f01-6d90-3daa-8042-59c830b1c2c9\",
\"product_family_id\": \"84c18a6b-2347-3bc1-b5ba-411106c59a24\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types"
);
const headers = {
"Authorization": "Bearer vPEcfhZ4e3V6b5dD86gka1a",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"default_validity_days": 1,
"requires_signature": true,
"numero_ca": "Example Numero ca",
"action": "Example Action",
"product_id": "196e5f01-6d90-3daa-8042-59c830b1c2c9",
"product_family_id": "84c18a6b-2347-3bc1-b5ba-411106c59a24"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Link EPI types to catalog products in bulk
requires authentication epi update
Link several EPI types to catalog products at once, creating the product where it does not exist yet. All or nothing: one refusal rolls back the whole batch.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/epi-types/link-products" \
--header "Authorization: Bearer 5Z1h3db6k4PvacgEafe68DV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"epi_type_id\": \"a055e9f6-6a70-31d2-9b3e-2c2385fcf8f4\",
\"action\": \"Example Items * action\",
\"product_id\": \"84a7ed55-b4cb-30d8-94f9-11e9066fbf60\",
\"product_family_id\": \"a1684ed7-7366-3cf3-ac0b-2e379a5b7de6\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/link-products"
);
const headers = {
"Authorization": "Bearer 5Z1h3db6k4PvacgEafe68DV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"epi_type_id": "a055e9f6-6a70-31d2-9b3e-2c2385fcf8f4",
"action": "Example Items * action",
"product_id": "84a7ed55-b4cb-30d8-94f9-11e9066fbf60",
"product_family_id": "a1684ed7-7366-3cf3-ac0b-2e379a5b7de6"
},
null
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Link an EPI type to a catalog product
requires authentication epi update
Link one EPI type to an existing product, or create the product from the EPI type name.
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/epi-types/earum/product" \
--header "Authorization: Bearer Pdc6b1af4V3658aEkevhDgZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"action\": \"Example Action\",
\"product_id\": \"6ec397f7-ee55-3eb9-bd7a-57bcd0467961\",
\"product_family_id\": \"dc1dc0da-efaf-39fb-a84f-010cccbe96fd\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/earum/product"
);
const headers = {
"Authorization": "Bearer Pdc6b1af4V3658aEkevhDgZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"action": "Example Action",
"product_id": "6ec397f7-ee55-3eb9-bd7a-57bcd0467961",
"product_family_id": "dc1dc0da-efaf-39fb-a84f-010cccbe96fd"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update EPI type
requires authentication epi update
Update an EPI type
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/epi-types/cumque" \
--header "Authorization: Bearer e3ac1EhDab8gdP6ZV56vf4k" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"default_validity_days\": 1,
\"requires_signature\": true,
\"numero_ca\": \"Example Numero ca\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/cumque"
);
const headers = {
"Authorization": "Bearer e3ac1EhDab8gdP6ZV56vf4k",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"default_validity_days": 1,
"requires_signature": true,
"numero_ca": "Example Numero ca"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete EPI type
requires authentication epi delete
Delete an EPI type
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/epi-types/molestias" \
--header "Authorization: Bearer D61VZE58hgvake3cf4dPb6a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/molestias"
);
const headers = {
"Authorization": "Bearer D61VZE58hgvake3cf4dPb6a",
"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 fhcgbk1vEa6ea358PV4ZdD6" \
--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 fhcgbk1vEa6ea358PV4ZdD6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "f56bf9ad-2db4-4e31-ac3e-e161ac25050f",
"name": "earum",
"description": "Nam doloribus facere eaque iusto non iusto.",
"created_at": null,
"updated_at": null
},
{
"id": "6e90cc33-6cf4-43a3-bcb8-9f287a08801c",
"name": "minus",
"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/et" \
--header "Authorization: Bearer dg86DVP4bfe5aZk1h36aEvc" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employee-roles/et"
);
const headers = {
"Authorization": "Bearer dg86DVP4bfe5aZk1h36aEvc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "2bff38de-5b1f-436b-b8ea-539061687206",
"name": "fugiat",
"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 Eg4PaVe3cv8fkZaDdb61h56" \
--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 Eg4PaVe3cv8fkZaDdb61h56",
"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/ipsum" \
--header "Authorization: Bearer Eda64P6Zb5Vc3gDhva8f1ek" \
--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/ipsum"
);
const headers = {
"Authorization": "Bearer Eda64P6Zb5Vc3gDhva8f1ek",
"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/id" \
--header "Authorization: Bearer fghZ38d4b65av1k6aVeEDPc" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employee-roles/id"
);
const headers = {
"Authorization": "Bearer fghZ38d4b65av1k6aVeEDPc",
"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 8cg4Ddh5a61VZf3a6bEvekP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"delivery_date\",
\"sort_desc\": false,
\"page\": 81,
\"per_page\": 20,
\"q\": \"qui\",
\"employee_id\": \"recusandae\",
\"has_term\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-terms"
);
const headers = {
"Authorization": "Bearer 8cg4Ddh5a61VZf3a6bEvekP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "delivery_date",
"sort_desc": false,
"page": 81,
"per_page": 20,
"q": "qui",
"employee_id": "recusandae",
"has_term": true
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List employees
requires authentication employee index
List all employees
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employees?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Jo%C3%A3o+Silva&status=active&employee_roles[]=dolore&admission_date_from=2026-01-01&admission_date_to=2026-12-31" \
--header "Authorization: Bearer Zkb65hfadDE3e4P6Va8v1cg" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "João Silva",
"status": "active",
"employee_roles[0]": "dolore",
"admission_date_from": "2026-01-01",
"admission_date_to": "2026-12-31",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Zkb65hfadDE3e4P6Va8v1cg",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "3092e052-1651-469e-a592-202688753448",
"name": "Dr. George Demian Camacho",
"cpf": "523.217.706-00",
"rg": null,
"ctps": null,
"phone": null,
"birthdate": null,
"email": "kdearruda@example.net",
"pis_pasep": "32450006823",
"admission_date": "1994-06-29",
"daily_salary": null,
"monthly_salary": "3313.74",
"nationality": "Grécia",
"place_of_birth": null,
"status": "active",
"status_label": "Ativo",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"employee_role": {
"id": "a325a2fb-cfe8-4a46-adac-3aa6d6467948",
"name": "illum"
},
"created_at": null,
"updated_at": null
},
{
"id": "4411fbb2-cc2a-4ab4-89c0-c315bae83beb",
"name": "Dr. Agostinho Zaragoça Soto Jr.",
"cpf": "093.172.695-36",
"rg": null,
"ctps": "325062876",
"phone": null,
"birthdate": "2025-02-23",
"email": null,
"pis_pasep": null,
"admission_date": "1989-09-17",
"daily_salary": "204.55",
"monthly_salary": "8962.88",
"nationality": "Santa Luzia",
"place_of_birth": null,
"status": "active",
"status_label": "Ativo",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"employee_role": {
"id": "a325a2fb-d431-4297-b7b9-713167e02fae",
"name": "expedita"
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": "/?page=80",
"next": null
},
"meta": {
"current_page": 81,
"from": 801,
"last_page": 1,
"links": [
{
"url": "/?page=80",
"label": "« Anterior",
"page": 80,
"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": 802,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Export employees to Excel
requires authentication employee export
Dispatches async Excel generation using the same filters as the listing. Frontend is notified via Pusher when ready.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employees/excel?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Jo%C3%A3o+Silva&status=active&employee_roles[]=officiis&admission_date_from=2026-01-01&admission_date_to=2026-12-31" \
--header "Authorization: Bearer f6aVk6a18veDEcZ4hg3bP5d" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/excel"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "João Silva",
"status": "active",
"employee_roles[0]": "officiis",
"admission_date_from": "2026-01-01",
"admission_date_to": "2026-12-31",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer f6aVk6a18veDEcZ4hg3bP5d",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (202):
{
"message": "string",
"channel": "string",
"event": "string"
}
Example response (422):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show employee
requires authentication employee show
Show an employee
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employees/11" \
--header "Authorization: Bearer VkaEagcZhf645D8eb361dPv" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/11"
);
const headers = {
"Authorization": "Bearer VkaEagcZhf645D8eb361dPv",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "375fc3a0-a72e-4cf9-acff-ba8a09437de6",
"name": "Sr. Ítalo Lozano Bezerra Neto",
"cpf": "227.053.472-06",
"rg": "109983910",
"ctps": null,
"phone": null,
"birthdate": "2003-09-29",
"email": "carrara.mateus@example.net",
"pis_pasep": null,
"admission_date": "2022-12-21",
"daily_salary": "131.96",
"monthly_salary": "1464.28",
"nationality": null,
"place_of_birth": null,
"status": "active",
"status_label": "Ativo",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"employee_role": {
"id": "a325a2fb-e089-4423-b1ce-12b857caf595",
"name": "eligendi"
},
"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 gbe4V13ZaPDch8va6d56fkE" \
--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\": \"40cc7ff5-57fc-4db9-82b9-3abd7acc4121\",
\"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 gbe4V13ZaPDch8va6d56fkE",
"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": "40cc7ff5-57fc-4db9-82b9-3abd7acc4121",
"pis_pasep": "Example Pis pasep",
"admission_date": "2024-01-01",
"daily_salary": 1,
"monthly_salary": 1,
"nationality": "Example Nationality",
"place_of_birth": "Example Place of birth",
"address": {
"0": "example1",
"1": "example2",
"street": "Example Address street",
"number": "Example Address number",
"complement": "Example Address complement",
"neighborhood": "Example Address neighborhood",
"city": "Example Address city",
"state": "Example Address state",
"zip_code": "Example Address zip code"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "4a6f34df-e1fa-4afa-95f5-b4ca37ed6253",
"name": "Sr. Gian Alcantara Deverso",
"cpf": "263.866.389-95",
"rg": null,
"ctps": null,
"phone": null,
"birthdate": "1970-08-20",
"email": null,
"pis_pasep": "87407874099",
"admission_date": "2000-10-06",
"daily_salary": null,
"monthly_salary": "4986.13",
"nationality": null,
"place_of_birth": "Santa Isabella do Leste",
"status": "active",
"status_label": "Ativo",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"employee_role": {
"id": "a325a2fb-ea5c-49d7-88f3-68d3cf39a9c9",
"name": "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.
Update employee
requires authentication employee update
Update an employee
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/employees/4" \
--header "Authorization: Bearer 1ba63eDPgdcEvhZVa856f4k" \
--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\": \"0deec146-aeec-4388-bd33-9bc14de19727\",
\"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/4"
);
const headers = {
"Authorization": "Bearer 1ba63eDPgdcEvhZVa856f4k",
"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": "0deec146-aeec-4388-bd33-9bc14de19727",
"pis_pasep": "Example Pis pasep",
"admission_date": "2024-01-01",
"daily_salary": 1,
"monthly_salary": 1,
"nationality": "Example Nationality",
"place_of_birth": "Example Place of birth",
"address": {
"0": "example1",
"1": "example2",
"street": "Example Address street",
"number": "Example Address number",
"complement": "Example Address complement",
"neighborhood": "Example Address neighborhood",
"city": "Example Address city",
"state": "Example Address state",
"zip_code": "Example Address zip code"
}
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Dismiss employee
requires authentication employee employment
Register the dismissal of an active employee
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32/dismiss" \
--header "Authorization: Bearer ev6f6DbgE4PdZ1acV5ha8k3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"dismissal_date\": \"2026-11-04\",
\"dismissal_reason\": \"resignation\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32/dismiss"
);
const headers = {
"Authorization": "Bearer ev6f6DbgE4PdZ1acV5ha8k3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"dismissal_date": "2026-11-04",
"dismissal_reason": "resignation"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d56e0175-bc76-474a-875a-1455d5327f7e",
"name": "Sr. Júlio Miguel Meireles",
"cpf": "909.804.748-73",
"rg": null,
"ctps": null,
"phone": "(69) 2015-1137",
"birthdate": "1986-03-12",
"email": null,
"pis_pasep": "23015303671",
"admission_date": "2007-12-10",
"daily_salary": "121.18",
"monthly_salary": null,
"nationality": null,
"place_of_birth": "Porto Valéria",
"status": "active",
"status_label": "Ativo",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"employee_role": {
"id": "a325a2fb-f8d4-4c00-af34-13a0406ae173",
"name": "libero"
},
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Rehire employee
requires authentication employee employment
Rehire an inactive employee with a new admission date
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32/rehire" \
--header "Authorization: Bearer dba138aPfcVD4kg6eh6ZE5v" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"admission_date\": \"2026-11-04\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32/rehire"
);
const headers = {
"Authorization": "Bearer dba138aPfcVD4kg6eh6ZE5v",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"admission_date": "2026-11-04"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "b5f8c524-3b8d-4ab6-9c6c-a20a6a3f0924",
"name": "Dr. Mary Cortês Alcantara",
"cpf": "102.957.312-60",
"rg": null,
"ctps": null,
"phone": "(37) 95068-6986",
"birthdate": "2026-09-13",
"email": "hosana64@example.com",
"pis_pasep": "10051370742",
"admission_date": "1997-04-21",
"daily_salary": null,
"monthly_salary": null,
"nationality": "Bósnia e Herzegovina",
"place_of_birth": null,
"status": "active",
"status_label": "Ativo",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"employee_role": {
"id": "a325a2fb-ff4b-4f36-91b5-7dfc0435286c",
"name": "odio"
},
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 6k136aZhbefvaV5P8gE4Dcd" \
--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 6k136aZhbefvaV5P8gE4Dcd",
"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/15/bank-account" \
--header "Authorization: Bearer efa6186adP3g4kDcEb5hvZV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/15/bank-account"
);
const headers = {
"Authorization": "Bearer efa6186adP3g4kDcEb5hvZV",
"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/6/bank-account" \
--header "Authorization: Bearer 4f68Pgec3kh1Da5EV6Zdbav" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_id\": \"qui\",
\"agency\": \"wpciwnycgzslkbaulzdqof\",
\"account\": \"bkechkqcx\",
\"account_type\": \"poupança\",
\"pix_key\": \"wayvcegkyk\",
\"favorite\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/6/bank-account"
);
const headers = {
"Authorization": "Bearer 4f68Pgec3kh1Da5EV6Zdbav",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_id": "qui",
"agency": "wpciwnycgzslkbaulzdqof",
"account": "bkechkqcx",
"account_type": "poupança",
"pix_key": "wayvcegkyk",
"favorite": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update employee bank account
requires authentication employee-bank-account update
Update a bank account for an employee
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/employees/14/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33" \
--header "Authorization: Bearer 6Pea4hD8g6cavfb5dZV1k3E" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_id\": \"aut\",
\"agency\": \"fpuwnzccdlneqkq\",
\"account\": \"xpcsmfbyyonnhhnulxxitkl\",
\"account_type\": \"poupança\",
\"pix_key\": \"zcyui\",
\"favorite\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/14/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33"
);
const headers = {
"Authorization": "Bearer 6Pea4hD8g6cavfb5dZV1k3E",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_id": "aut",
"agency": "fpuwnzccdlneqkq",
"account": "xpcsmfbyyonnhhnulxxitkl",
"account_type": "poupança",
"pix_key": "zcyui",
"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 gdD1cfPa4Z5k66Va8ebh3vE" \
--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 gdD1cfPa4Z5k66Va8ebh3vE",
"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/13/epi-deliveries" \
--header "Authorization: Bearer a63vafhgdV48EkDZ5b1P6ce" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"placeat\",
\"status\": \"valid\",
\"epi_type_id\": \"aspernatur\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/13/epi-deliveries"
);
const headers = {
"Authorization": "Bearer a63vafhgdV48EkDZ5b1P6ce",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "placeat",
"status": "valid",
"epi_type_id": "aspernatur"
};
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/soluta/epi-deliveries/pending-renewals-count" \
--header "Authorization: Bearer Zv34dk6e6Dfg5bEahcP1V8a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/soluta/epi-deliveries/pending-renewals-count"
);
const headers = {
"Authorization": "Bearer Zv34dk6e6Dfg5bEahcP1V8a",
"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/9/epi-deliveries/impedit" \
--header "Authorization: Bearer 6bcev4k5D8hfdaaP136EgZV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/9/epi-deliveries/impedit"
);
const headers = {
"Authorization": "Bearer 6bcev4k5D8hfdaaP136EgZV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create employee EPI delivery
requires authentication employee-epi store
Register an EPI delivery for an employee
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/employees/16/epi-deliveries" \
--header "Authorization: Bearer 1av5hdfakbP6864cEeVZg3D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"epi_type_id\": \"7d0277e2-4bbe-34e7-9013-0dd90081dc37\",
\"delivery_date\": \"2024-01-01\",
\"quantity\": 1,
\"condition\": \"Example Condition\",
\"delivered_by_employee_id\": \"8d6026da-f99b-4dca-8511-cec13104e1da\",
\"stock_id\": \"143e8ac6-6e77-385c-8194-90f94fd58b9f\",
\"confirm_insufficient_stock\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/16/epi-deliveries"
);
const headers = {
"Authorization": "Bearer 1av5hdfakbP6864cEeVZg3D",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"epi_type_id": "7d0277e2-4bbe-34e7-9013-0dd90081dc37",
"delivery_date": "2024-01-01",
"quantity": 1,
"condition": "Example Condition",
"delivered_by_employee_id": "8d6026da-f99b-4dca-8511-cec13104e1da",
"stock_id": "143e8ac6-6e77-385c-8194-90f94fd58b9f",
"confirm_insufficient_stock": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create employee initial EPI kit
requires authentication employee-epi kit
Register multiple EPI deliveries as initial kit
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/employees/ipsa/epi-deliveries/kit" \
--header "Authorization: Bearer b66P3E1V4v5agDaeckZhfd8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"delivery_date\": \"2024-01-01\",
\"is_kit_initial\": true,
\"show_epi_receipt_text\": true,
\"delivered_by_employee_id\": \"3ea933f7-759f-4f7b-9377-e50e42c93d51\",
\"stock_id\": \"8f524bd1-52f7-337a-9ae4-71e310549932\",
\"confirm_insufficient_stock\": true,
\"items\": [
{
\"epi_type_id\": \"35c752b6-3ae8-30d7-ba06-bdc8fc17ec0e\",
\"quantity\": 1,
\"condition\": \"Example Items * condition\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/ipsa/epi-deliveries/kit"
);
const headers = {
"Authorization": "Bearer b66P3E1V4v5agDaeckZhfd8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"delivery_date": "2024-01-01",
"is_kit_initial": true,
"show_epi_receipt_text": true,
"delivered_by_employee_id": "3ea933f7-759f-4f7b-9377-e50e42c93d51",
"stock_id": "8f524bd1-52f7-337a-9ae4-71e310549932",
"confirm_insufficient_stock": true,
"items": [
{
"epi_type_id": "35c752b6-3ae8-30d7-ba06-bdc8fc17ec0e",
"quantity": 1,
"condition": "Example Items * condition"
},
null
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Promote EPI delivery to kit
requires authentication employee-epi kit
Turn a standalone EPI delivery into a single-item kit so it can generate the acknowledgement term. Idempotent: a delivery already belonging to a kit is returned unchanged.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/employees/possimus/epi-deliveries/quo/promote-to-kit" \
--header "Authorization: Bearer fv1D66Vca5kZ3a8hbEed4Pg" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/possimus/epi-deliveries/quo/promote-to-kit"
);
const headers = {
"Authorization": "Bearer fv1D66Vca5kZ3a8hbEed4Pg",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update employee EPI delivery
requires authentication employee-epi update
Update an EPI delivery for an employee
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/employees/20/epi-deliveries/saepe" \
--header "Authorization: Bearer 86dek6vacbDhgZ14VEf3aP5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"epi_type_id\": \"8d8c0c93-8dd5-3f52-8308-6e1e9ae4a01e\",
\"delivery_date\": \"2024-01-01\",
\"quantity\": 1,
\"condition\": \"Example Condition\",
\"delivered_by_employee_id\": \"aa56c310-a79d-4848-8bb3-a15965ddc733\",
\"stock_id\": \"08e8b225-15ac-334c-8672-222852fa6adb\",
\"confirm_insufficient_stock\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/20/epi-deliveries/saepe"
);
const headers = {
"Authorization": "Bearer 86dek6vacbDhgZ14VEf3aP5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"epi_type_id": "8d8c0c93-8dd5-3f52-8308-6e1e9ae4a01e",
"delivery_date": "2024-01-01",
"quantity": 1,
"condition": "Example Condition",
"delivered_by_employee_id": "aa56c310-a79d-4848-8bb3-a15965ddc733",
"stock_id": "08e8b225-15ac-334c-8672-222852fa6adb",
"confirm_insufficient_stock": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete employee EPI delivery
requires authentication employee-epi delete
Delete an EPI delivery from an employee
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/employees/et/epi-deliveries/labore" \
--header "Authorization: Bearer a5V46D1hce8vgabE3dZf6Pk" \
--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/labore"
);
const headers = {
"Authorization": "Bearer a5V46D1hce8vgabE3dZf6Pk",
"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/7/epi-terms" \
--header "Authorization: Bearer a3bve4hZ6gP86cEdaVf1D5k" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"delivery_date\",
\"sort_desc\": false,
\"page\": 51,
\"per_page\": 20,
\"q\": \"et\",
\"employee_id\": \"ducimus\",
\"has_term\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/7/epi-terms"
);
const headers = {
"Authorization": "Bearer a3bve4hZ6gP86cEdaVf1D5k",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "delivery_date",
"sort_desc": false,
"page": 51,
"per_page": 20,
"q": "et",
"employee_id": "ducimus",
"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/ratione/epi-terms/bd884965-1b0e-376b-8512-9981dd431162/upload" \
--header "Authorization: Bearer 1PkgaD6Zbc64fEe58vhaV3d" \
--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/ratione/epi-terms/bd884965-1b0e-376b-8512-9981dd431162/upload"
);
const headers = {
"Authorization": "Bearer 1PkgaD6Zbc64fEe58vhaV3d",
"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/aut/epi-terms/18076872-4fa7-3481-b8a9-bc667573a061/document" \
--header "Authorization: Bearer Evbaf8e5gZ4acVDP1hkd636" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/aut/epi-terms/18076872-4fa7-3481-b8a9-bc667573a061/document"
);
const headers = {
"Authorization": "Bearer Evbaf8e5gZ4acVDP1hkd636",
"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/0d6e2729-7ceb-3eed-9f34-9239d3f840e4" \
--header "Authorization: Bearer aea5VPg64vd8Df63ZcbkE1h" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/0d6e2729-7ceb-3eed-9f34-9239d3f840e4"
);
const headers = {
"Authorization": "Bearer aea5VPg64vd8Df63ZcbkE1h",
"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/a58e82ab-35c1-312f-adea-7b8b3d9f54a3/info" \
--header "Authorization: Bearer dDEevP6Z8Vgc314hbf6ak5a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/a58e82ab-35c1-312f-adea-7b8b3d9f54a3/info"
);
const headers = {
"Authorization": "Bearer dDEevP6Z8Vgc314hbf6ak5a",
"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/0a5efc52-aca2-3df7-9f62-276a0ffdae95/download" \
--header "Authorization: Bearer 1k48hdbE35Z6vcg6PDefaVa" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/0a5efc52-aca2-3df7-9f62-276a0ffdae95/download"
);
const headers = {
"Authorization": "Bearer 1k48hdbE35Z6vcg6PDefaVa",
"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 5vacD4gf81Vhea36dZEkPb6" \
--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 5vacD4gf81Vhea36dZEkPb6",
"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 84ehZV61gaadfvcb36PE5kD" \
--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 84ehZV61gaadfvcb36PE5kD",
"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 vDVPahad83Eb461g65fZekc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"quas\",
\"document_type\": \"nfe\",
\"supplier_id\": \"non\",
\"work_id\": \"quo\",
\"products_status\": \"imported\",
\"financial_status\": \"partial\",
\"start_date\": \"2026-11-04T16:27:16\",
\"end_date\": \"2071-06-11\",
\"per_page\": 15
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);
const headers = {
"Authorization": "Bearer vDVPahad83Eb461g65fZekc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "quas",
"document_type": "nfe",
"supplier_id": "non",
"work_id": "quo",
"products_status": "imported",
"financial_status": "partial",
"start_date": "2026-11-04T16:27:16",
"end_date": "2071-06-11",
"per_page": 15
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "ee81d434-7201-3386-a767-e47bfb74b8e0",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "78476190579959106745668485582845179210071590",
"nfe_number": "685448",
"nfe_series": "02",
"issue_date": "1972-06-12T03:00:00.000000Z",
"total_value": "479.11",
"emit": {
"cnpj": "22919665027318",
"name": "Konopelski-Wyman"
},
"dest": {
"document": "75668674775946",
"name": "Huel-Cummerata"
},
"supplier": {
"id": "a325a2fd-4a14-48a2-82d1-49348ee9906d",
"name": "Valentina Medina Chaves Filho",
"document": "01.046.047/0001-59"
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
},
{
"id": "4ab5af6b-529f-3c57-b97f-08d67d80f624",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "54091642356254318254318376478292893352930107",
"nfe_number": "306551",
"nfe_series": "28",
"issue_date": "2008-10-23T02:00:00.000000Z",
"total_value": "8057.84",
"emit": {
"cnpj": "66131099322223",
"name": "Quitzon and Sons"
},
"dest": {
"document": "87351356102383",
"name": "Bailey PLC"
},
"supplier": {
"id": "a325a2fd-506b-4f91-894e-ae7b6676982e",
"name": "Sr. Vitor Fabrício Valente",
"document": "98.082.142/0001-40"
},
"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 Ef3vk461DP86aeVahZcgd5b" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"s3_file_path\": \"beatae\",
\"original_filename\": \".xml$\\/i\",
\"work_ids\": [
\"quia\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);
const headers = {
"Authorization": "Bearer Ef3vk461DP86aeVahZcgd5b",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"s3_file_path": "beatae",
"original_filename": ".xml$\/i",
"work_ids": [
"quia"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "1e9f3d71-6644-3d47-be63-24078a569b0f",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "64141232131487052628504778669258638878985228",
"nfe_number": "510864",
"nfe_series": "06",
"issue_date": "2024-10-20T03:00:00.000000Z",
"total_value": "5002.83",
"emit": {
"cnpj": "73123246802272",
"name": "Turcotte, Gislason and Jacobs"
},
"dest": {
"document": "02088904697021",
"name": "Swift, Reinger and Wehner"
},
"supplier": {
"id": "a325a2fd-5b7e-4476-9b25-20c211b17ea5",
"name": "Wagner Santiago Faro",
"document": "61.912.291/0001-89"
},
"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/voluptatibus" \
--header "Authorization: Bearer 6fDbZkvVah45Pcad38ge6E1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/voluptatibus"
);
const headers = {
"Authorization": "Bearer 6fDbZkvVah45Pcad38ge6E1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "7f4bc7c1-7112-3062-b864-7ee8182f68d3",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "07050519364149286776859182965791088504459871",
"nfe_number": "141460",
"nfe_series": "68",
"issue_date": "1998-02-09T02:00:00.000000Z",
"total_value": "1459.20",
"emit": {
"cnpj": "79826263508728",
"name": "Stanton, Breitenberg and Balistreri"
},
"dest": {
"document": "01181504848072",
"name": "Kulas-Klocko"
},
"supplier": {
"id": "a325a2fd-6396-4cc8-a3d2-f9bb71f50831",
"name": "Vicente Otávio Serrano",
"document": "72.543.528/0001-18"
},
"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/reprehenderit" \
--header "Authorization: Bearer Pa8DabEdf6Z5kcv16hg34eV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/reprehenderit"
);
const headers = {
"Authorization": "Bearer Pa8DabEdf6Z5kcv16hg34eV",
"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/eius/files" \
--header "Authorization: Bearer hbVd58ve643DfP6caaZkgE1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"file\": {
\"path\": \"vel\",
\"name\": \"atque\",
\"extension\": \"inventore\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/eius/files"
);
const headers = {
"Authorization": "Bearer hbVd58ve643DfP6caaZkgE1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"file": {
"path": "vel",
"name": "atque",
"extension": "inventore"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "dd1900f9-976a-3d84-9fc6-d863707d9bc3",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "42110234046915783406288718315868062894195214",
"nfe_number": "830610",
"nfe_series": "78",
"issue_date": "1992-02-29T03:00:00.000000Z",
"total_value": "604.06",
"emit": {
"cnpj": "47554764604453",
"name": "Pollich LLC"
},
"dest": {
"document": "94144509905267",
"name": "Mosciski, Breitenberg and Strosin"
},
"supplier": {
"id": "a325a2fd-6e20-4a3a-a2c7-b8d267083b3e",
"name": "Bárbara Velasques Aragão Neto",
"document": "55.925.614/0001-76"
},
"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/dolore/files/eos" \
--header "Authorization: Bearer 86VgPvbfcZhaaDed6E341k5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/dolore/files/eos"
);
const headers = {
"Authorization": "Bearer 86VgPvbfcZhaaDed6E341k5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "1d120178-c5ac-33c6-a257-9a15493bf69a",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "73548326091534736482851391052801866163277872",
"nfe_number": "124737",
"nfe_series": "68",
"issue_date": "2019-06-28T03:00:00.000000Z",
"total_value": "8495.29",
"emit": {
"cnpj": "43159317114280",
"name": "Sauer, Reinger and Bradtke"
},
"dest": {
"document": "86349655950163",
"name": "Schneider, Vandervort and Pollich"
},
"supplier": {
"id": "a325a2fd-7737-4e80-bae3-eea0572b053e",
"name": "Dr. Francisco Benez Galvão",
"document": "72.098.573/0001-00"
},
"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/voluptate/works" \
--header "Authorization: Bearer hdZ6VD4b853P6gkvefca1Ea" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"work_ids\": [
\"nisi\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/voluptate/works"
);
const headers = {
"Authorization": "Bearer hdZ6VD4b853P6gkvefca1Ea",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"work_ids": [
"nisi"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "4218dce8-1e59-36e7-b38c-42be3d29a59e",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "98425122819885031832949118093350438075245352",
"nfe_number": "689844",
"nfe_series": "29",
"issue_date": "2005-08-25T03:00:00.000000Z",
"total_value": "2836.25",
"emit": {
"cnpj": "83444773057997",
"name": "Lockman-Blanda"
},
"dest": {
"document": "59831174986612",
"name": "Deckow, Keebler and Mayer"
},
"supplier": {
"id": "a325a2fd-7f1b-49d8-b987-e3bacdd653ee",
"name": "Dr. Hortência Vasques",
"document": "93.952.742/0001-06"
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create installment
requires authentication fiscal-documents update
Lança uma cobrança avulsa na nota fiscal, para o boleto que o fornecedor cobra além das duplicatas do XML. Nasce pendente e sem conta no financeiro; a geração continua sendo pelo import-nfe.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/fuga/installments" \
--header "Authorization: Bearer vfba84gDcZVPehE3d5ak166" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"due_date\": \"2024-01-01\",
\"amount\": 1,
\"number\": \"Example Number\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/fuga/installments"
);
const headers = {
"Authorization": "Bearer vfba84gDcZVPehE3d5ak166",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"due_date": "2024-01-01",
"amount": 1,
"number": "Example Number"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "2202c1ba-27ef-32ec-91c3-0d3a2b3f1d1a",
"document_type": "nfe",
"document_type_label": "NF-e",
"service_description": null,
"nfe_access_key": "66293822040347221290815104663979315538219496",
"nfe_number": "081543",
"nfe_series": "03",
"issue_date": "1994-05-13T03:00:00.000000Z",
"total_value": "3129.66",
"emit": {
"cnpj": "95842255888589",
"name": "Leannon-Jast"
},
"dest": {
"document": "00770401948362",
"name": "Kris, Predovic and Leuschke"
},
"supplier": {
"id": "a325a2fd-8853-4562-a496-ea6ce4ba565c",
"name": "Sra. Tatiana Reis Neto",
"document": "96.907.401/0001-07"
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Import
Endpoints for managing NFe imports and product processing.
NFe Imports
Import and process Brazilian electronic invoice (NFe) files.
Create NFe Import
requires authentication imports store
Upload and process a Brazilian NFe (Nota Fiscal Eletrônica) XML file. The file should be uploaded to S3 first, then this endpoint processes it asynchronously.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/imports/nfe/products" \
--header "Authorization: Bearer 6EVadb6a4chf5kD3ev1gP8Z" \
--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\": \"c0a05284-22b7-341c-b381-a9dcef446467\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/nfe/products"
);
const headers = {
"Authorization": "Bearer 6EVadb6a4chf5kD3ev1gP8Z",
"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": "c0a05284-22b7-341c-b381-a9dcef446467"
};
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 hkVDb8a1cdvP3gZ6E45eaf6" \
--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 hkVDb8a1cdvP3gZ6E45eaf6",
"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/recusandae" \
--header "Authorization: Bearer D4a6EZa6v1hdkcbfV5Pge38" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/recusandae"
);
const headers = {
"Authorization": "Bearer D4a6EZa6v1hdkcbfV5Pge38",
"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/sunt" \
--header "Authorization: Bearer cdvaf66ehEb5gZ4V18akP3D" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/sunt"
);
const headers = {
"Authorization": "Bearer cdvaf66ehEb5gZ4V18akP3D",
"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/autem/products?sort_by=created_at&sort_desc=1&page=1&per_page=15&status=pending&q=Produto+ABC" \
--header "Authorization: Bearer 8DV1defhagkvb6EZ65ac3P4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/autem/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 8DV1defhagkvb6EZ65ac3P4",
"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/tenetur/distributions" \
--header "Authorization: Bearer D6bZ361kadvfaeEcVPg54h8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/tenetur/distributions"
);
const headers = {
"Authorization": "Bearer D6bZ361kadvfaeEcVPg54h8",
"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/voluptatum/products/link" \
--header "Authorization: Bearer f5d8g3Vh1Dc6ZPea4k6vabE" \
--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/voluptatum/products/link"
);
const headers = {
"Authorization": "Bearer f5d8g3Vh1Dc6ZPea4k6vabE",
"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 vebZVP8345fdaa61Dhckg6E" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"qui\",
\"sort_desc\": true,
\"page\": 42,
\"per_page\": 9
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/locations/states"
);
const headers = {
"Authorization": "Bearer vebZVP8345fdaa61Dhckg6E",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "qui",
"sort_desc": true,
"page": 42,
"per_page": 9
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "inventore laboriosam",
"abbreviation": "IG"
},
{
"id": null,
"name": "voluptate ipsa",
"abbreviation": "GR"
}
],
"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 fc3dEaP5agkb1Ve68v6DhZ4" \
--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 fc3dEaP5agkb1Ve68v6DhZ4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "North Candidoberg"
},
{
"id": null,
"name": "West Linneaside"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 6gVEZ14vdabh3fk6c85DPea" \
--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 6gVEZ14vdabh3fk6c85DPea",
"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 cPbek66458h1EdgD3aZaVvf" \
--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 cPbek66458h1EdgD3aZaVvf",
"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 14PV5EevfhZcab86kgd3aD6" \
--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 14PV5EevfhZcab86kgd3aD6",
"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 486cZd3ga5hekb1VvaED6Pf" \
--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 486cZd3ga5hekb1VvaED6Pf",
"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 3hcdg6a6kbe4faDV1Pv58EZ" \
--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 3hcdg6a6kbe4faDV1Pv58EZ",
"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=a&document=eos&work_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&cost_center_id=12355acc-9111-3a9e-b003-4b50f8dcb16c&bank_account_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3" \
--header "Authorization: Bearer ha46beED6315kgPVfdcvZa8" \
--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": "a",
"document": "eos",
"work_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
"cost_center_id": "12355acc-9111-3a9e-b003-4b50f8dcb16c",
"bank_account_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ha46beED6315kgPVfdcvZa8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "d5630bd9-7674-3deb-b5e6-ab219ffa3ed2",
"receipt_number": "REC-4130",
"receiver_type": "employee",
"receiver": {
"id": null,
"name": "Ms. Eloise Beier MD",
"document": "527.964.501-75"
},
"payment": {
"amount": 9524.69,
"amount_in_words": "Valor por extenso de teste",
"method": "check",
"description": "Sed numquam ratione voluptatibus error numquam."
},
"issuer": {
"name": "Moore Inc",
"document": "04.760.172/2838-92"
},
"issue": {
"date": "2026-10-26",
"city": "Port Tristin",
"state": "PR"
},
"created_by": {
"id": "a325a2fd-b969-405b-8762-0da8917e19c6",
"name": "Kaia Lang"
},
"created_at": null,
"updated_at": null
},
{
"id": "54cdb137-87fb-3162-bbfc-f9d3ea760c95",
"receipt_number": "REC-5424",
"receiver_type": "custom",
"receiver": {
"id": null,
"name": "Jeromy Mayer",
"document": "961.460.420-85"
},
"payment": {
"amount": 7953.05,
"amount_in_words": "Valor por extenso de teste",
"method": "check",
"description": "Tempore adipisci dolor odio asperiores."
},
"issuer": {
"name": "Little LLC",
"document": "84.171.138/3592-65"
},
"issue": {
"date": "2026-11-03",
"city": "Mittiestad",
"state": "BA"
},
"created_by": {
"id": "a325a2fd-bc95-416f-b4d6-921814dfb5ea",
"name": "Prof. Felicia Morar Sr."
},
"created_at": null,
"updated_at": null
}
],
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"has_more_pages": false
},
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Export payment receipts to Excel
requires authentication payment-receipt export
Dispatches async Excel generation using the same filters as the listing. Frontend is notified via Pusher when ready.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/payment-receipts/excel?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Jo%C3%A3o+Silva&employee_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&receiver_type=employee&start_date=2025-01-01&end_date=2025-12-31&min_amount=100&max_amount=1000&payment_method=PIX&city=S%C3%A3o+Paulo&search=sapiente&document=consequuntur&work_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&cost_center_id=7e67f0e7-e533-34a9-bc80-9f71cce2b951&bank_account_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3" \
--header "Authorization: Bearer beEPDavfa6Z6V538c1g4dhk" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/excel"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "João Silva",
"employee_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
"receiver_type": "employee",
"start_date": "2025-01-01",
"end_date": "2025-12-31",
"min_amount": "100",
"max_amount": "1000",
"payment_method": "PIX",
"city": "São Paulo",
"search": "sapiente",
"document": "consequuntur",
"work_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
"cost_center_id": "7e67f0e7-e533-34a9-bc80-9f71cce2b951",
"bank_account_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer beEPDavfa6Z6V538c1g4dhk",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (202):
{
"message": "string",
"channel": "string",
"event": "string"
}
Example response (422):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show receipt cash flow config
requires authentication payment-receipt cash-flow-config index
Lista cada forma de pagamento e se ela gera lancamento automatico no fluxo de caixa
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/payment-receipts/cash-flow-config" \
--header "Authorization: Bearer 83cdPfa6akDvE45ZVhgeb61" \
--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 83cdPfa6akDvE45ZVhgeb61",
"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 VE68cg6haPZbef1vk4aD35d" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"methods\": [
{
\"method\": \"bank_transfer\",
\"eligible\": true
}
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/cash-flow-config"
);
const headers = {
"Authorization": "Bearer VE68cg6haPZbef1vk4aD35d",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"methods": [
{
"method": "bank_transfer",
"eligible": 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.
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 eaf46vZh5E16PcaDd38gkbV" \
--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 eaf46vZh5E16PcaDd38gkbV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "b390851e-a6a6-3dcd-b3d6-4d2c6de15107",
"receipt_number": "REC-6802",
"receiver_type": "custom",
"receiver": {
"id": null,
"name": "Mr. Gianni O'Keefe",
"document": "587.332.646-84"
},
"payment": {
"amount": 3637.02,
"amount_in_words": "Valor por extenso de teste",
"method": "bank_transfer",
"description": "Voluptas saepe veniam debitis expedita vel animi."
},
"issuer": {
"name": "Farrell-Pfannerstill",
"document": "63.866.329/0934-36"
},
"issue": {
"date": "2026-10-16",
"city": "West Chelsiestad",
"state": "SC"
},
"created_by": {
"id": "a325a2fd-cf2f-43eb-8608-8eb94b2c3944",
"name": "Leonard Oberbrunner IV"
},
"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 4ehgDcfkP316EvbaZd5V6a8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"receiver_type\": \"Example Receiver type\",
\"employee_id\": \"a29bfa86-682e-4c3e-b72f-94638e2fffb5\",
\"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\": \"48e5eb3a-c7b6-3e72-96ba-b277388373de\",
\"cost_center_id\": \"25c92639-f3be-30b1-bf7e-5567d04503e5\",
\"bank_account_id\": \"ae3d65eb-115f-3477-acf7-dd7b4a786c29\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts"
);
const headers = {
"Authorization": "Bearer 4ehgDcfkP316EvbaZd5V6a8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"receiver_type": "Example Receiver type",
"employee_id": "a29bfa86-682e-4c3e-b72f-94638e2fffb5",
"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": "48e5eb3a-c7b6-3e72-96ba-b277388373de",
"cost_center_id": "25c92639-f3be-30b1-bf7e-5567d04503e5",
"bank_account_id": "ae3d65eb-115f-3477-acf7-dd7b4a786c29"
};
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 g6hVbfP5ac31eZd468DaEkv" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"receiver_type\": \"Example Receiver type\",
\"employee_id\": \"412fdf22-9cff-46f0-975f-164e8a0c995c\",
\"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\": \"c9ba0079-4148-3239-86da-85fdf549ebc0\",
\"cost_center_id\": \"7a306ea4-d7d2-34a0-b7a0-34af08ed630e\",
\"bank_account_id\": \"f74e2691-c49d-30d8-8964-190c0739b8df\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer g6hVbfP5ac31eZd468DaEkv",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"receiver_type": "Example Receiver type",
"employee_id": "412fdf22-9cff-46f0-975f-164e8a0c995c",
"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": "c9ba0079-4148-3239-86da-85fdf549ebc0",
"cost_center_id": "7a306ea4-d7d2-34a0-b7a0-34af08ed630e",
"bank_account_id": "f74e2691-c49d-30d8-8964-190c0739b8df"
};
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 34k6vb5c1PfdVg8e6haaEDZ" \
--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 34k6vb5c1PfdVg8e6haaEDZ",
"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/20/receipts" \
--header "Authorization: Bearer 5bfhevEVZDagc16d36ka48P" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/20/receipts"
);
const headers = {
"Authorization": "Bearer 5bfhevEVZDagc16d36ka48P",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "db40b740-ebe5-3c11-abd7-969205250d3b",
"receipt_number": "REC-9300",
"receiver_type": "custom",
"receiver": {
"id": null,
"name": "Eli Fritsch",
"document": "727.057.806-72"
},
"payment": {
"amount": 3018.68,
"amount_in_words": "Valor por extenso de teste",
"method": "check",
"description": "Voluptas optio nihil atque doloribus aut."
},
"issuer": {
"name": "Roob, Dooley and Jacobson",
"document": "70.640.895/9179-46"
},
"issue": {
"date": "2026-10-24",
"city": "Hermanborough",
"state": "RJ"
},
"created_by": {
"id": "a325a2fd-f718-45e1-9d84-f2b91e497295",
"name": "Miles Flatley Jr."
},
"created_at": null,
"updated_at": null
},
{
"id": "1e69a9ea-162d-316c-9070-0ff4f1ec7061",
"receipt_number": "REC-5294",
"receiver_type": "employee",
"receiver": {
"id": null,
"name": "Sincere West",
"document": "004.499.544-07"
},
"payment": {
"amount": 3573.57,
"amount_in_words": "Valor por extenso de teste",
"method": "bank_transfer",
"description": "Non quae dolorem corporis."
},
"issuer": {
"name": "Wuckert-Leuschke",
"document": "55.047.244/1469-43"
},
"issue": {
"date": "2026-10-25",
"city": "Lake Mallie",
"state": "PE"
},
"created_by": {
"id": "a325a2fd-f97d-49e3-8489-e37d852c8205",
"name": "Delia Anderson"
},
"created_at": null,
"updated_at": null
}
],
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"has_more_pages": false
},
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 bh8Z1PDda656gvVEf4ek3ac" \
--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 bh8Z1PDda656gvVEf4ek3ac",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "8ac8e0e4-3620-3fb6-87b4-5dcb49780faa",
"name": "deleniti",
"display_name": "Dolor provident pariatur soluta vel omnis earum."
},
{
"id": "5d6802d7-9840-3b15-9cb8-bf44173056ec",
"name": "error",
"display_name": "Quis voluptas voluptatem molestias eum."
}
],
"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 vfh4dcgPe185EV3bka66DZa" \
--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 vfh4dcgPe185EV3bka66DZa",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "67875e41-b5d8-3a32-9536-8da3c091da66",
"name": "neque-et",
"display_name": "voluptas incidunt corrupti",
"created_at": null,
"updated_at": null
},
{
"id": "7fcc6743-ff6c-3216-a770-71b448319d27",
"name": "aspernatur-aut",
"display_name": "et qui quis",
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 E658kegaf4ZDv31PVadcbh6" \
--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 E658kegaf4ZDv31PVadcbh6",
"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 PcvhkEfaa63bV541Zd6ge8D" \
--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 PcvhkEfaa63bV541Zd6ge8D",
"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 Vv6abhEf83P54e6cka1dZgD" \
--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 Vv6abhEf83P54e6cka1dZgD",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "e768f25c-112c-317c-b6b8-e6022266ee9b",
"name": "ad-impedit",
"display_name": "aperiam non atque",
"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 Vcahe5k8aDf4b6vP6d3E1gZ" \
--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 Vcahe5k8aDf4b6vP6d3E1gZ",
"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 PkEcDe6fbav5h368g1Z4daV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"08b60cd6-f7a7-3f3c-82ae-5253889a02a8\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);
const headers = {
"Authorization": "Bearer PkEcDe6fbav5h368g1Z4daV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"08b60cd6-f7a7-3f3c-82ae-5253889a02a8"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "37eb3e44-222b-3e40-aa45-933360dc3787",
"name": "nihil-consectetur",
"display_name": "autem ad ducimus",
"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 3b664v8gaheDfZVPcad51Ek" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"61488e19-639b-38d5-88da-c302bb6fe6e6\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);
const headers = {
"Authorization": "Bearer 3b664v8gaheDfZVPcad51Ek",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"61488e19-639b-38d5-88da-c302bb6fe6e6"
]
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "2faa3474-375d-3544-af09-46db72afde00",
"name": "tempore-deserunt-fuga",
"display_name": "reprehenderit nulla alias",
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 EebhV4Da66Z1avf3k8gP5dc" \
--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 EebhV4Da66Z1avf3k8gP5dc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "3e55fec2-2a49-33ba-9825-85120b7da2d3",
"name": "Mary Matos Filho",
"created_at": null,
"updated_at": null
},
{
"id": "88e02bdb-58e5-3d3f-adda-ca83ef4c46c8",
"name": "Giovana Caldeira Gusmão",
"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/in" \
--header "Authorization: Bearer vP1Ekbda3456D8eZcfaV6gh" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-brands/in"
);
const headers = {
"Authorization": "Bearer vP1Ekbda3456D8eZcfaV6gh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "5b142c32-8f35-3687-b700-a6af757946bc",
"name": "Alessandra Rocha Marés Jr.",
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create product brand
requires authentication product-brand store
Create a new product brand
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/product-brands" \
--header "Authorization: Bearer b5dg64va38keZE1VcD6afhP" \
--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 b5dg64va38keZE1VcD6afhP",
"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/optio" \
--header "Authorization: Bearer 6Z8vg563hP1afdEea4cVDkb" \
--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/optio"
);
const headers = {
"Authorization": "Bearer 6Z8vg563hP1afdEea4cVDkb",
"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/et" \
--header "Authorization: Bearer 1cg36kdvbafZV8h4ea5PED6" \
--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 1cg36kdvbafZV8h4ea5PED6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Families
Endpoints for product families
List product families
requires authentication product-family index
List all product families
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-families?is_epi=1&q=Structure" \
--header "Authorization: Bearer b5hvf34gka1ZPacDEde686V" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families"
);
const params = {
"is_epi": "1",
"q": "Structure",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer b5hvf34gka1ZPacDEde686V",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "38f72dc2-0e9a-3fb0-870e-936755565d12",
"name": "Sr. Tomás Lovato Sobrinho",
"is_epi": false,
"created_at": null,
"updated_at": null
},
{
"id": "5ae01c50-4771-33a6-ad52-015a85aabfb7",
"name": "Mário Aguiar Flores Jr.",
"is_epi": false,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show product family
requires authentication product-family show
Show a product family
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-families/animi" \
--header "Authorization: Bearer 6aaPbdkEecfVg6341vD8Zh5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families/animi"
);
const headers = {
"Authorization": "Bearer 6aaPbdkEecfVg6341vD8Zh5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "59ecc0f1-4c85-37d0-a578-586ab4463e15",
"name": "Beatriz Solano",
"is_epi": false,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create product family
requires authentication product-family store
Create a new product family
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/product-families" \
--header "Authorization: Bearer 1VhD4edgb3f8k6a65ZEvPca" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"is_epi\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families"
);
const headers = {
"Authorization": "Bearer 1VhD4edgb3f8k6a65ZEvPca",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"is_epi": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update product family
requires authentication product-family update
Update a product family
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/product-families/aliquam" \
--header "Authorization: Bearer 1aPD58Z6v3kEgdeh4fc6abV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"is_epi\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families/aliquam"
);
const headers = {
"Authorization": "Bearer 1aPD58Z6v3kEgdeh4fc6abV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"is_epi": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete product family
requires authentication product-family delete
Delete a product family
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/product-families/fugiat" \
--header "Authorization: Bearer avZ51648b36EaPkeDhfgdcV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families/fugiat"
);
const headers = {
"Authorization": "Bearer avZ51648b36EaPkeDhfgdcV",
"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 c56E3a4hDeVag8ZfkPdv16b" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"Example Q\",
\"work_id\": \"bf64a6ae-a734-3208-9114-cdc6e58d4360\",
\"user_id\": \"3158bdc0-ba54-3e27-b136-68682109ce94\",
\"responsible_id\": \"06602bf0-a08f-34ad-8f80-703f27b8f75a\",
\"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 c56E3a4hDeVag8ZfkPdv16b",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "Example Q",
"work_id": "bf64a6ae-a734-3208-9114-cdc6e58d4360",
"user_id": "3158bdc0-ba54-3e27-b136-68682109ce94",
"responsible_id": "06602bf0-a08f-34ad-8f80-703f27b8f75a",
"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": "d7e7c8a9-3db4-3b46-9c6f-8338f9fd79ff",
"name": "Quia quasi ut.",
"description": null,
"work": {
"id": "a325a2fe-929b-46bb-b2a6-d5a85d3c60b0",
"name": "Sr. Jerônimo Adriano Gil Filho"
},
"user": {
"id": "a325a2fe-9598-4752-a2a3-9aa3ddab00e0",
"name": "Lauren O'Hara"
},
"created_at": null,
"updated_at": null
},
{
"id": "9d313220-7be8-3f2b-8d87-6331d019fdf3",
"name": "Aperiam perferendis voluptatem id.",
"description": null,
"work": {
"id": "a325a2fe-9978-47b1-9a14-68670bac13dd",
"name": "Emily Mendonça Bezerra Jr."
},
"user": {
"id": "a325a2fe-9ca0-42cd-9598-482393311479",
"name": "Bartholome Sawayn I"
},
"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/molestiae" \
--header "Authorization: Bearer 568cEPgaDkfVdv3a4e1Zb6h" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/molestiae"
);
const headers = {
"Authorization": "Bearer 568cEPgaDkfVdv3a4e1Zb6h",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "0459b441-d5c2-35c2-9a55-8515a499f693",
"name": "Accusantium rerum neque voluptates.",
"description": null,
"work": {
"id": "a325a2fe-a461-4a54-9a56-344cf439876b",
"name": "Dr. Andres Téo Camacho Sobrinho"
},
"user": {
"id": "a325a2fe-a792-4114-93ff-88b103049e63",
"name": "Federico Shields I"
},
"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/ratione/items" \
--header "Authorization: Bearer 8cavkV3DZePf6dEh5164bga" \
--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/ratione/items"
);
const headers = {
"Authorization": "Bearer 8cavkV3DZePf6dEh5164bga",
"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": "51aa954f-ee65-3cbe-9ec5-11d9e993b75b",
"product": {
"id": "a325a2fe-becf-4be9-9f86-09ec62f0272e",
"name": "Betina Zambrano",
"code": "PRD-701359",
"unit": {
"id": "a325a2fe-bc89-471c-9f46-88b78c758886",
"name": "Dr. Cristiano Molina Filho",
"abbreviation": "Dr. Leonardo de Aguiar"
}
},
"quantity": 717.2447,
"observation": "Unde eius rem iusto id perferendis odio.",
"created_at": null,
"updated_at": null
},
{
"id": "4bdd0027-1da0-3792-b504-d2ee7bbe34a0",
"product": {
"id": "a325a2fe-d102-4862-9e53-25292d5970c4",
"name": "Srta. Melinda Assunção Serra",
"code": "PRD-180590",
"unit": {
"id": "a325a2fe-cfa5-485d-bde5-3f6c03e48277",
"name": "Angélica Carmona",
"abbreviation": "Sr. Ronaldo Vila Neto"
}
},
"quantity": 262.1139,
"observation": "Odio doloribus deleniti exercitationem consectetur ipsam vitae.",
"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 3Efea8vPhaDgcZ5bVk46d61" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"96be0801-8538-3090-9676-d42e216a71e4\",
\"items\": [
{
\"product_id\": \"6d2cc69a-b33b-360c-9e76-1f0a37283b0b\",
\"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 3Efea8vPhaDgcZ5bVk46d61",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "96be0801-8538-3090-9676-d42e216a71e4",
"items": [
{
"product_id": "6d2cc69a-b33b-360c-9e76-1f0a37283b0b",
"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/officiis" \
--header "Authorization: Bearer c836D14EVeaabhdkf6ZgvP5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"items\": [
{
\"id\": \"d79ff1e8-c547-39f8-8b3f-f75133b68545\",
\"product_id\": \"cf35f74b-ca50-3113-930d-a0d1498fa9d3\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/officiis"
);
const headers = {
"Authorization": "Bearer c836D14EVeaabhdkf6ZgvP5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"items": [
{
"id": "d79ff1e8-c547-39f8-8b3f-f75133b68545",
"product_id": "cf35f74b-ca50-3113-930d-a0d1498fa9d3",
"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/consequatur" \
--header "Authorization: Bearer ebc48dPVEaZv6k3g516ahDf" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/consequatur"
);
const headers = {
"Authorization": "Bearer ebc48dPVEaZv6k3g516ahDf",
"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/amet/items" \
--header "Authorization: Bearer Pv66ahek8DdE45cf3Zg1baV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"product_id\": \"43e3b496-2a63-3c24-b8b3-0b4fab136082\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/amet/items"
);
const headers = {
"Authorization": "Bearer Pv66ahek8DdE45cf3Zg1baV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"product_id": "43e3b496-2a63-3c24-b8b3-0b4fab136082",
"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/molestias" \
--header "Authorization: Bearer v54f6cZ3gePVaaEkD61hd8b" \
--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/molestias"
);
const headers = {
"Authorization": "Bearer v54f6cZ3gePVaaEkD61hd8b",
"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/magni/items" \
--header "Authorization: Bearer kPZa1bEfc4eV3v6dDa586gh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"3d6c8eb0-7577-3418-9f7c-18da2e6b863b\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/magni/items"
);
const headers = {
"Authorization": "Bearer kPZa1bEfc4eV3v6dDa586gh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"3d6c8eb0-7577-3418-9f7c-18da2e6b863b"
]
};
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/cumque/sync-items" \
--header "Authorization: Bearer 3cVhgEaZ16faDbk5d6vP48e" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"id\": \"c95e6e96-4453-3506-b9d3-2ac42b3c051b\",
\"product_id\": \"064d7677-2296-3151-8874-4e84c29dd5a8\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/cumque/sync-items"
);
const headers = {
"Authorization": "Bearer 3cVhgEaZ16faDbk5d6vP48e",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"id": "c95e6e96-4453-3506-b9d3-2ac42b3c051b",
"product_id": "064d7677-2296-3151-8874-4e84c29dd5a8",
"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/aut/fulfill" \
--header "Authorization: Bearer eag366dZ8DhfkabV4vE51Pc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"fulfillment_type\": \"Example Fulfillment type\",
\"stock_id\": \"5726eab6-3bad-3138-b311-15d8223ea2b4\",
\"quantity\": 1,
\"source_stock_id\": \"f3a28a6a-869a-3c34-b05e-865bbb17abaf\",
\"reason\": \"Example Reason\",
\"origins\": [
{
\"supplier_product_id\": \"6740178e-7aea-370e-be55-d2879c5ae872\",
\"quantity\": 1
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/aut/fulfill"
);
const headers = {
"Authorization": "Bearer eag366dZ8DhfkabV4vE51Pc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"fulfillment_type": "Example Fulfillment type",
"stock_id": "5726eab6-3bad-3138-b311-15d8223ea2b4",
"quantity": 1,
"source_stock_id": "f3a28a6a-869a-3c34-b05e-865bbb17abaf",
"reason": "Example Reason",
"origins": [
{
"supplier_product_id": "6740178e-7aea-370e-be55-d2879c5ae872",
"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/est/fulfillments" \
--header "Authorization: Bearer 6dbf81VEP35av4ghckD6eZa" \
--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/est/fulfillments"
);
const headers = {
"Authorization": "Bearer 6dbf81VEP35av4ghckD6eZa",
"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": "cb97b996-f1eb-3d3b-8afa-4e1c6ac98896",
"quantity": 26.508,
"fulfilled_at": "2026-10-10T08:16:39.000000Z",
"created_at": null
},
{
"id": "70d7b34b-2911-3976-95c3-01662ea3172a",
"quantity": 74.3245,
"fulfilled_at": "2026-10-27T16:58:53.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/repellendus" \
--header "Authorization: Bearer 6PEk81fh4Vbedac56agDvZ3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/repellendus"
);
const headers = {
"Authorization": "Bearer 6PEk81fh4Vbedac56agDvZ3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "1b37395c-3d78-39e6-ab7c-1b442aff6de7",
"product": {
"id": "a325a302-4e18-44b7-ba33-ccb76c4f459a",
"name": "Maurício Verdugo Ortega",
"code": "PRD-457250",
"unit": {
"id": "a325a302-4ce6-4cfa-b8f2-d554ad3e275b",
"name": "Sr. Denis Amaral Neto",
"abbreviation": "Sra. Luciana Rodrigues Torres Sobrinho"
}
},
"quantity": 11.0328,
"quantity_fulfilled": 0,
"quantity_pending": 11.0328,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": null,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List pending items
requires authentication product-request show
List all pending items from a product request
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-requests/voluptatum/pending-items" \
--header "Authorization: Bearer E6aD1bvVhPa45Z6cf8dekg3" \
--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/voluptatum/pending-items"
);
const headers = {
"Authorization": "Bearer E6aD1bvVhPa45Z6cf8dekg3",
"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": "146406ab-a106-31c3-9cff-4000df35f9dd",
"product": {
"id": "a325a302-632c-46a4-83e1-fa43fc3038c1",
"name": "Srta. Taís Marques Santacruz Jr.",
"code": "PRD-091606",
"unit": {
"id": "a325a302-6202-4147-b892-655f64741972",
"name": "Bruna Brito Benez",
"abbreviation": "Jefferson Medina Sobrinho"
}
},
"quantity": 670.5053,
"quantity_fulfilled": 0,
"quantity_pending": 670.5053,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Nobis laudantium aut rerum nemo recusandae a.",
"created_at": null,
"updated_at": null
},
{
"id": "f8194883-4148-3737-894f-bc2cc369a41d",
"product": {
"id": "a325a302-7ce1-4a88-a249-5e6faf7fc14b",
"name": "Carolina Lovato Benez Filho",
"code": "PRD-957275",
"unit": {
"id": "a325a302-7b73-439f-932d-ba2435af8764",
"name": "Dr. Agatha Maísa de Aguiar Jr.",
"abbreviation": "Juliane Clarice Vasques"
}
},
"quantity": 9.9321,
"quantity_fulfilled": 0,
"quantity_pending": 9.9321,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Ut excepturi consequuntur dolores neque possimus tempore minus.",
"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/doloribus" \
--header "Authorization: Bearer e6EgaV36f4hdP1Dab5cvkZ8" \
--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/doloribus"
);
const headers = {
"Authorization": "Bearer e6EgaV36f4hdP1Dab5cvkZ8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "68ae7239-0bd9-39e9-af69-f8406e1655a6",
"product": {
"id": "a325a302-9303-49d1-87b8-596ef40471b3",
"name": "Srta. Laiane Heloísa Lutero",
"code": "PRD-801047",
"unit": {
"id": "a325a302-91c9-4755-920a-85da8c67036a",
"name": "Evandro Thiago Sandoval Sobrinho",
"abbreviation": "Nádia Serna Rico Neto"
}
},
"quantity": 436.0381,
"quantity_fulfilled": 0,
"quantity_pending": 436.0381,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Inventore est ratione rerum quisquam dolor qui magni.",
"created_at": null,
"updated_at": null
},
{
"id": "ec2e1bd1-d092-3d23-9b26-b236b7a3d2b6",
"product": {
"id": "a325a302-a4bf-4ecd-bcba-1e6dc5eed88c",
"name": "Marta Padilha Dias",
"code": "PRD-905430",
"unit": {
"id": "a325a302-a395-47fc-b6c1-2ea3a0f77328",
"name": "Srta. Ingrid Mayara Matias Neto",
"abbreviation": "Alexa Ester Rosa Neto"
}
},
"quantity": 662.1136,
"quantity_fulfilled": 0,
"quantity_pending": 662.1136,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": null,
"created_at": null,
"updated_at": null
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Requests
Endpoints for managing product requests for works
List product requests
requires authentication product-request index
List all product requests
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-requests" \
--header "Authorization: Bearer Dad4Z1v3fVc8E5Pkagb6e6h" \
--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\": \"dc46594a-348a-3a7b-a735-ab136a3c0264\",
\"work_location_id\": \"8a14d4d0-7320-3c03-a3b1-0dd1eb74a1f0\",
\"user_id\": \"a9c46a8b-b7e0-3003-8917-25f2066affc6\",
\"status_id\": \"44eb9863-df88-3f05-9b19-6da5a8e263bd\",
\"priority\": \"Example Priority\",
\"needed_at_from\": \"Example Needed at from\",
\"needed_at_to\": \"Example Needed at to\",
\"responsible_id\": \"f687c0a5-efb2-30d0-97d9-6232df7ff577\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests"
);
const headers = {
"Authorization": "Bearer Dad4Z1v3fVc8E5Pkagb6e6h",
"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": "dc46594a-348a-3a7b-a735-ab136a3c0264",
"work_location_id": "8a14d4d0-7320-3c03-a3b1-0dd1eb74a1f0",
"user_id": "a9c46a8b-b7e0-3003-8917-25f2066affc6",
"status_id": "44eb9863-df88-3f05-9b19-6da5a8e263bd",
"priority": "Example Priority",
"needed_at_from": "Example Needed at from",
"needed_at_to": "Example Needed at to",
"responsible_id": "f687c0a5-efb2-30d0-97d9-6232df7ff577"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "7e323f1d-cd11-34da-b6ab-dd871be7ce46",
"code": null,
"name": "Corrupti eos quibusdam vero vitae.",
"description": "Illo vel iste rerum reiciendis nihil assumenda. Et magnam facilis eveniet. Incidunt rem architecto fugiat culpa asperiores quidem corrupti. Fugit sit ex quia sint ducimus veritatis nihil aut. Deleniti qui inventore natus tempora quidem magni fuga molestiae.",
"work": {
"id": "a325a2ff-e4d0-4a57-84c4-bd44de10facd",
"name": "Filipe das Neves Carvalho"
},
"user": {
"id": "a325a2ff-e7c0-4635-945c-1e8cd784ec66",
"name": "Easter Hill"
},
"status": {
"id": "a325a2ff-e9e4-4c5a-95a9-f3055be15d7b",
"slug": null,
"name": null,
"description": "Dr. Josué Marco Santos Filho",
"abbreviation": "enim",
"color": "#bf9fc1",
"text_color": "#3bc02e"
},
"priority": "high",
"priority_label": "Alta",
"needed_at": null,
"approved_at": null,
"rejection_reason": null,
"created_at": null,
"updated_at": null
},
{
"id": "ed81be50-d6c5-33aa-99d3-3ebcd31d247f",
"code": null,
"name": "Debitis suscipit officia sapiente.",
"description": "Provident ducimus aut officia et exercitationem. Voluptates odit eos non voluptas doloribus. Vel similique vitae expedita omnis numquam totam. Laboriosam qui aliquam veniam omnis iure.",
"work": {
"id": "a325a2ff-ee5c-463c-81ea-f554bf0f9b83",
"name": "Sr. Cristiano Vasques de Oliveira Sobrinho"
},
"user": {
"id": "a325a2ff-f14d-489e-8154-4ee56a2ef1c6",
"name": "Maximilian Kilback"
},
"status": {
"id": "a325a2ff-f353-4693-a673-84e309b6d3ca",
"slug": null,
"name": null,
"description": "Franco Augusto Jimenes Neto",
"abbreviation": "distinctio",
"color": "#d6200a",
"text_color": "#c68023"
},
"priority": "medium",
"priority_label": "Média",
"needed_at": null,
"approved_at": null,
"rejection_reason": null,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show product request
requires authentication product-request show
Show a product request
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-requests/ullam" \
--header "Authorization: Bearer PhVkDf1E6c5Zedv83aagb46" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/ullam"
);
const headers = {
"Authorization": "Bearer PhVkDf1E6c5Zedv83aagb46",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "bb6de0ce-fa1d-3481-8225-f8830c9c6460",
"code": null,
"name": "Aut earum tempora.",
"description": null,
"work": {
"id": "a325a2ff-fcfd-4932-b1e9-8b8274f0b416",
"name": "Sra. Ellen Daiane Soto"
},
"user": {
"id": "a325a300-0027-4a31-8087-48b1f8d015c3",
"name": "Caitlyn Skiles"
},
"status": {
"id": "a325a300-0282-437b-94ed-b6e23ee16b71",
"slug": null,
"name": null,
"description": "Eliane Rivera Domingues",
"abbreviation": "perferendis",
"color": "#b1e2b8",
"text_color": "#2ae155"
},
"priority": "medium",
"priority_label": "Média",
"needed_at": "2026-11-21",
"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/necessitatibus/items" \
--header "Authorization: Bearer hb8gD6a3V6Z14ca5PdefvEk" \
--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/necessitatibus/items"
);
const headers = {
"Authorization": "Bearer hb8gD6a3V6Z14ca5PdefvEk",
"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": "218d8e7a-1ba8-3bdb-8cb9-3975941b9cbe",
"product": {
"id": "a325a300-241a-4c05-97f3-9b6d83c30c18",
"name": "Vitor Denis Duarte Filho",
"code": "PRD-218574",
"unit": {
"id": "a325a300-22b0-431a-928d-6a4f78afa558",
"name": "Valéria Uchoa",
"abbreviation": "Sra. Cecília Solano Ortiz"
}
},
"quantity": 123.7126,
"quantity_fulfilled": 0,
"quantity_pending": 123.7126,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Officia quod ut et nemo cumque atque.",
"created_at": null,
"updated_at": null
},
{
"id": "15f808a5-d6a9-3ec2-ad86-21a664aeccd8",
"product": {
"id": "a325a300-4369-4936-9df3-6ab25272cce3",
"name": "Sr. Ítalo Isaac Ferminiano Neto",
"code": "PRD-187974",
"unit": {
"id": "a325a300-41ea-4553-8ca2-cd792ca31bb2",
"name": "Dr. Lucio Madeira Sobrinho",
"abbreviation": "Sra. Regina Brito Filho"
}
},
"quantity": 781.2151,
"quantity_fulfilled": 0,
"quantity_pending": 781.2151,
"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.
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 k46DVa3gacef1hdvEZ658Pb" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"d10886b1-b1be-36ab-9ffc-3ce3b55e4288\",
\"work_location_id\": \"71da89b4-d617-3359-bbd7-b42c3b740a0e\",
\"status_id\": \"95b05bb4-800f-35cd-bceb-84e835df471e\",
\"priority\": \"Example Priority\",
\"needed_at\": \"Example Needed at\",
\"items\": [
{
\"product_id\": \"d46c6b79-1226-3764-9942-fbf3fc54578a\",
\"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 k46DVa3gacef1hdvEZ658Pb",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "d10886b1-b1be-36ab-9ffc-3ce3b55e4288",
"work_location_id": "71da89b4-d617-3359-bbd7-b42c3b740a0e",
"status_id": "95b05bb4-800f-35cd-bceb-84e835df471e",
"priority": "Example Priority",
"needed_at": "Example Needed at",
"items": [
{
"product_id": "d46c6b79-1226-3764-9942-fbf3fc54578a",
"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/suscipit" \
--header "Authorization: Bearer 4V186E5aaD3Pve6kgdfcbZh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"bd2539c1-d5cf-3b65-b979-1c8ea8a1884f\",
\"work_location_id\": \"49afbc2a-2b57-3304-a70a-c6f1f1d24769\",
\"status_id\": \"b9ee350e-1def-325c-893e-e3f63b73ac20\",
\"priority\": \"Example Priority\",
\"needed_at\": \"Example Needed at\",
\"items\": [
{
\"id\": \"f7203ed7-efe9-3cfb-8904-3b8fae57e260\",
\"product_id\": \"002dd587-08d7-366d-8073-161e8e24af19\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/suscipit"
);
const headers = {
"Authorization": "Bearer 4V186E5aaD3Pve6kgdfcbZh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "bd2539c1-d5cf-3b65-b979-1c8ea8a1884f",
"work_location_id": "49afbc2a-2b57-3304-a70a-c6f1f1d24769",
"status_id": "b9ee350e-1def-325c-893e-e3f63b73ac20",
"priority": "Example Priority",
"needed_at": "Example Needed at",
"items": [
{
"id": "f7203ed7-efe9-3cfb-8904-3b8fae57e260",
"product_id": "002dd587-08d7-366d-8073-161e8e24af19",
"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/consequatur" \
--header "Authorization: Bearer 18af4aDVvEbZ563Pdkghec6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/consequatur"
);
const headers = {
"Authorization": "Bearer 18af4aDVvEbZ563Pdkghec6",
"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/earum/approve" \
--header "Authorization: Bearer 8abPg66k4EZc1VDhdfeva35" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/earum/approve"
);
const headers = {
"Authorization": "Bearer 8abPg66k4EZc1VDhdfeva35",
"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/nihil/reject" \
--header "Authorization: Bearer EZdV6e15Pvgk6h3b4caf8Da" \
--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/nihil/reject"
);
const headers = {
"Authorization": "Bearer EZdV6e15Pvgk6h3b4caf8Da",
"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/eum/items" \
--header "Authorization: Bearer a6E8a1DdZ64cfgPvk5e3Vhb" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"product_id\": \"0f3d7c9a-1d10-3a78-a4ca-4cd047570d96\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/eum/items"
);
const headers = {
"Authorization": "Bearer a6E8a1DdZ64cfgPvk5e3Vhb",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"product_id": "0f3d7c9a-1d10-3a78-a4ca-4cd047570d96",
"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/illo" \
--header "Authorization: Bearer EeadPDb4kZh36cVfv6ag518" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"quantity\": 1,
\"observation\": \"Example Observation\",
\"status_id\": \"545ae5e2-22f4-3d7b-96d4-952c06f4444d\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/illo"
);
const headers = {
"Authorization": "Bearer EeadPDb4kZh36cVfv6ag518",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quantity": 1,
"observation": "Example Observation",
"status_id": "545ae5e2-22f4-3d7b-96d4-952c06f4444d"
};
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/facere/items" \
--header "Authorization: Bearer hk5adDvf46b3gE1ZP6e8Vca" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"a5e01fa6-6869-3417-bfd0-1c5ce72afb44\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/facere/items"
);
const headers = {
"Authorization": "Bearer hk5adDvf46b3gE1ZP6e8Vca",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"a5e01fa6-6869-3417-bfd0-1c5ce72afb44"
]
};
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/dolores/sync-items" \
--header "Authorization: Bearer EfhdZPVDgkab68v3ea461c5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"id\": \"554780ec-ea7d-33c0-bcbe-9b393cd94fa0\",
\"product_id\": \"0741573e-ef81-34a5-ac49-3e3d18b0c3bf\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/dolores/sync-items"
);
const headers = {
"Authorization": "Bearer EfhdZPVDgkab68v3ea461c5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"id": "554780ec-ea7d-33c0-bcbe-9b393cd94fa0",
"product_id": "0741573e-ef81-34a5-ac49-3e3d18b0c3bf",
"quantity": 1,
"observation": "Example Items * observation"
},
null
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": "object"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Products
Endpoints for products
List products
requires authentication product index
List all products
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/products?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Brick&code=PROD-00003&is_epi=1&has_epi_type=" \
--header "Authorization: Bearer 5acvP4f16g3dDZkV8be6Eah" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "Brick",
"code": "PROD-00003",
"is_epi": "1",
"has_epi_type": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 5acvP4f16g3dDZkV8be6Eah",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "82e447c9-96bc-303f-add1-c106638ccc16",
"name": "Thalia Ortiz Galhardo",
"code": "PRD-194486",
"stock": 6036887,
"product_family": {
"id": "a325a2fe-2c78-4dd4-831a-ff450036ac23",
"name": "Sra. Rafaela Tatiana Colaço Jr."
},
"product_brand": {
"id": "a325a2fe-2f74-4635-a156-b4caf40954dd",
"name": "Dr. Marta Patrícia Salazar Filho"
},
"unit": {
"id": "a325a2fe-3132-4e8a-b868-1deda916769c",
"name": "Olga Faro Neto",
"abbreviation": "Sr. Vitor Juliano Santos"
},
"image": {
"id": null,
"url": null
},
"epi_type": null,
"description": "Numquam quasi laboriosam sit necessitatibus voluptate sint et.",
"created_at": null,
"updated_at": null
},
{
"id": "809de17a-5eb6-36ce-bfaa-b5ae8c6c6bdf",
"name": "Dr. Valentin Deivid Maia",
"code": "PRD-043967",
"stock": 94,
"product_family": {
"id": "a325a2fe-34c9-4a07-aeae-40f8028055e4",
"name": "Sra. Hortência de Souza Filho"
},
"product_brand": {
"id": "a325a2fe-36a2-4c1f-9514-70da06784640",
"name": "Dr. Saulo Francisco Cruz"
},
"unit": {
"id": "a325a2fe-3866-4c29-92ba-88813da94040",
"name": "Dr. Manoela Romero Assunção",
"abbreviation": "Sra. Madalena da Cruz Leon"
},
"image": {
"id": null,
"url": null
},
"epi_type": null,
"description": "Facere officia molestiae amet ut omnis ut.",
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show product
requires authentication product show
Show a product
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/products/1" \
--header "Authorization: Bearer g1P68ahDkcaV4vZEfdbe365" \
--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 g1P68ahDkcaV4vZEfdbe365",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "e31b2d29-3a49-386e-a206-36965330255c",
"name": "Dr. Heloise Franco",
"code": "PRD-420954",
"stock": 728344108,
"product_family": {
"id": "a325a2fe-412b-4443-9ca0-08f2ecfc8711",
"name": "Dr. Andres Leon Roque Sobrinho"
},
"product_brand": {
"id": "a325a2fe-42ff-4010-9d2c-2d63c8182473",
"name": "Dr. Cecília Salazar Faro Neto"
},
"unit": {
"id": "a325a2fe-448c-4d5e-a692-12100b477cc8",
"name": "Dr. William Alcantara Alves",
"abbreviation": "Gabriela Barros Gonçalves Jr."
},
"image": {
"id": null,
"url": null
},
"epi_type": null,
"description": "Atque iure voluptatem id accusantium.",
"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/eum/available-origins" \
--header "Authorization: Bearer Vg6dfhEeD15kP6caZ84vab3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/eum/available-origins"
);
const headers = {
"Authorization": "Bearer Vg6dfhEeD15kP6caZ84vab3",
"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 gf8dP41vea3kDZc66Va5hEb" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"product_family_id\": \"0abd57c2-0fbf-38cc-bfab-cd9fc29c176a\",
\"product_brand_id\": \"30b58789-b13e-36d0-8634-1fff9ca29bea\",
\"unit_id\": \"218dcd62-2256-303c-99e1-5e8ad933d39f\",
\"description\": \"Example Description\",
\"stock\": 1
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products"
);
const headers = {
"Authorization": "Bearer gf8dP41vea3kDZc66Va5hEb",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"product_family_id": "0abd57c2-0fbf-38cc-bfab-cd9fc29c176a",
"product_brand_id": "30b58789-b13e-36d0-8634-1fff9ca29bea",
"unit_id": "218dcd62-2256-303c-99e1-5e8ad933d39f",
"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 D5EPbagcZVh63afk1v46de8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"product_family_id\": \"3b3828af-9855-3c5d-894d-24ab2741a28d\",
\"product_brand_id\": \"20e5d8d0-bef3-3cb6-a903-45c13477538f\",
\"unit_id\": \"06f333e0-629f-3e2a-98cf-16459cae62e5\",
\"stock\": 1,
\"description\": \"Example Description\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/1"
);
const headers = {
"Authorization": "Bearer D5EPbagcZVh63afk1v46de8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"product_family_id": "3b3828af-9855-3c5d-894d-24ab2741a28d",
"product_brand_id": "20e5d8d0-bef3-3cb6-a903-45c13477538f",
"unit_id": "06f333e0-629f-3e2a-98cf-16459cae62e5",
"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/odio" \
--header "Authorization: Bearer P613fEDhvbc65geaV48dkaZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/odio"
);
const headers = {
"Authorization": "Bearer P613fEDhvbc65geaV48dkaZ",
"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/d32d0d4e-61b5-3f61-ba3c-043395631b40/versions" \
--header "Authorization: Bearer fP6kv4hbc8Zaa6eD1g3dVE5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"notes\": \"Example Notes\",
\"responsible_user_id\": \"4d55dff8-1090-3134-b354-d88b46272464\",
\"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/d32d0d4e-61b5-3f61-ba3c-043395631b40/versions"
);
const headers = {
"Authorization": "Bearer fP6kv4hbc8Zaa6eD1g3dVE5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"notes": "Example Notes",
"responsible_user_id": "4d55dff8-1090-3134-b354-d88b46272464",
"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/622c68b9-a60e-307d-862a-ecdbfe2eb7e7/versions" \
--header "Authorization: Bearer ZVPkDEa3deavbh84f1g656c" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/622c68b9-a60e-307d-862a-ecdbfe2eb7e7/versions"
);
const headers = {
"Authorization": "Bearer ZVPkDEa3deavbh84f1g656c",
"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/d8daa6ff-b5a3-3b4e-bdb8-32b9a329cc89" \
--header "Authorization: Bearer dh56eDZVv6fgP3kabEa14c8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/d8daa6ff-b5a3-3b4e-bdb8-32b9a329cc89"
);
const headers = {
"Authorization": "Bearer dh56eDZVv6fgP3kabEa14c8",
"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/4afc91f7-20b5-3722-8499-b19027ae4d05/download" \
--header "Authorization: Bearer 3hkvPdg1f65VZbacaD468Ee" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/4afc91f7-20b5-3722-8499-b19027ae4d05/download"
);
const headers = {
"Authorization": "Bearer 3hkvPdg1f65VZbacaD468Ee",
"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/651df01f-f1ab-3717-8eb1-01a75003d9d9/restore" \
--header "Authorization: Bearer 5gcba64eE1dPk3Zh8vV6Daf" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/651df01f-f1ab-3717-8eb1-01a75003d9d9/restore"
);
const headers = {
"Authorization": "Bearer 5gcba64eE1dPk3Zh8vV6Daf",
"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/0953a6e3-ec54-3c1c-b413-e3c7a5681939" \
--header "Authorization: Bearer 6e6ZaaPb3h54fEcdgVv1kD8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/0953a6e3-ec54-3c1c-b413-e3c7a5681939"
);
const headers = {
"Authorization": "Bearer 6e6ZaaPb3h54fEcdgVv1kD8",
"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=759b02f6-6f21-3530-a787-5fd2b4330c88&work_id=6d81ee37-df4f-3767-b869-f7434045c30f&status_id=a1769402-700a-3daf-bd32-b4edc397b50c&responsible_id=12dd7a85-7ed4-3cc2-a1d5-e25eeaa84e00" \
--header "Authorization: Bearer Va6ecv8fkhbE6Da5314dZPg" \
--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": "759b02f6-6f21-3530-a787-5fd2b4330c88",
"work_id": "6d81ee37-df4f-3767-b869-f7434045c30f",
"status_id": "a1769402-700a-3daf-bd32-b4edc397b50c",
"responsible_id": "12dd7a85-7ed4-3cc2-a1d5-e25eeaa84e00",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Va6ecv8fkhbE6Da5314dZPg",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "68b4f3ac-9b3b-3944-991c-18a57078dbcc",
"name": "Et earum quo",
"description": "Est iste error recusandae laborum nisi.",
"current_version": 1,
"file": {
"path": "projects/e9afc5dc-7a15-395d-af3d-4d86dc94612c.pdf",
"size": "1850264",
"extension": "pdf"
},
"discipline": {
"id": "a325a302-adae-4d0a-b769-9d5accb70274",
"name": "Ut",
"code": "BOA"
},
"created_at": null,
"updated_at": null
},
{
"id": "e4db62c4-7a5d-3e9b-8cd6-2d078badd555",
"name": "Pariatur ullam vel",
"description": "Aut cumque ut accusantium.",
"current_version": 1,
"file": {
"path": "projects/8566e774-373e-3900-80cb-36d493150a70.pdf",
"size": "1102427",
"extension": "pdf"
},
"discipline": {
"id": "a325a302-b10d-4e1c-93e2-bae9c7cadacb",
"name": "Ab",
"code": "OAA"
},
"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/5" \
--header "Authorization: Bearer Pv3gZEcdVeDa58a6fk14hb6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/5"
);
const headers = {
"Authorization": "Bearer Pv3gZEcdVeDa58a6fk14hb6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "32afa63c-cffd-36a8-acdf-6a9f2c046949",
"name": "Ex quasi dolore",
"description": "Autem impedit dolorum aut voluptatem.",
"current_version": 1,
"file": {
"path": "projects/c948dc2c-febc-37ac-a4b1-d2cc4538cb70.pdf",
"size": "3379707",
"extension": "pdf"
},
"discipline": {
"id": "a325a302-b890-4d96-86c6-642374d422cf",
"name": "Odio",
"code": "XHD"
},
"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 bZh543fVcdEa8Degva6k61P" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"discipline_id\": \"72866ffb-0ba0-3201-be3c-388fe8e39702\",
\"work_id\": \"62e603dc-09d9-3a9f-b07a-51613ec64bc3\",
\"responsible_user_id\": \"d3cdf91d-8a8e-3e66-8d78-6438df10f9d0\",
\"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 bZh543fVcdEa8Degva6k61P",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"discipline_id": "72866ffb-0ba0-3201-be3c-388fe8e39702",
"work_id": "62e603dc-09d9-3a9f-b07a-51613ec64bc3",
"responsible_user_id": "d3cdf91d-8a8e-3e66-8d78-6438df10f9d0",
"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/6" \
--header "Authorization: Bearer fca61hVe6bdD8E3vg5aZ4Pk" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"discipline_id\": \"06cab46d-1bdc-3525-9156-864e7cca7bba\",
\"work_id\": \"21e6826c-af91-32b5-85ba-ee73243799e5\",
\"responsible_user_id\": \"833f8a00-3b1d-3646-a9e0-787116400b1e\",
\"status_id\": \"83363ff5-f307-3f59-906f-84c064183a87\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/6"
);
const headers = {
"Authorization": "Bearer fca61hVe6bdD8E3vg5aZ4Pk",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"discipline_id": "06cab46d-1bdc-3525-9156-864e7cca7bba",
"work_id": "21e6826c-af91-32b5-85ba-ee73243799e5",
"responsible_user_id": "833f8a00-3b1d-3646-a9e0-787116400b1e",
"status_id": "83363ff5-f307-3f59-906f-84c064183a87"
};
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/occaecati" \
--header "Authorization: Bearer 85kVaPevfDbhgZd631Eca64" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/occaecati"
);
const headers = {
"Authorization": "Bearer 85kVaPevfDbhgZd631Eca64",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reports
Endpoints for reports
Generate RDO PDF
requires authentication daily-log show
Dispatches async PDF generation. Frontend receives notification via Pusher when ready.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/daily-log" \
--header "Authorization: Bearer f3vkbZ51EdhcDea4VaP8g66" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"daily_log\": \"sit\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/daily-log"
);
const headers = {
"Authorization": "Bearer f3vkbZ51EdhcDea4VaP8g66",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"daily_log": "sit"
};
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 ahd6ba6PveZ1EV43gkcf85D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"employee\": \"minus\",
\"kit_uuid\": \"8de869c6-2433-36b0-9573-56f0f922b89b\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/epi-term"
);
const headers = {
"Authorization": "Bearer ahd6ba6PveZ1EV43gkcf85D",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"employee": "minus",
"kit_uuid": "8de869c6-2433-36b0-9573-56f0f922b89b"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Generate employee sheet PDF
requires authentication No specific permission required
Dispatches async PDF generation of the employee record. Frontend receives notification via Pusher when ready.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/employee-sheet" \
--header "Authorization: Bearer b8dfa4eZ6DEagh65V3Pc1vk" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"employee\": \"sunt\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/employee-sheet"
);
const headers = {
"Authorization": "Bearer b8dfa4eZ6DEagh65V3Pc1vk",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"employee": "sunt"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cost center panel
requires authentication cost-center report
Totais por centro de custo no período, somados pela árvore. Devolve dois blocos declarados e separados: desembolso (fecha com o caixa e o banco) e custo apropriado por obra. Os dois não se somam — material comprado num mês e entregue em outro aparece em cada bloco no seu momento.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/cost-center?date_start=2026-11-01&date_end=2026-11-30&works[]=1897c2ad-272d-3c60-b5f8-4433d7e97b5a&cost_centers[]=08fe3681-77ec-3551-b4ce-773b39919927&format=xlsx" \
--header "Authorization: Bearer d8Ph6ZDf53c64gbeVkaEa1v" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/cost-center"
);
const params = {
"date_start": "2026-11-01",
"date_end": "2026-11-30",
"works[0]": "1897c2ad-272d-3c60-b5f8-4433d7e97b5a",
"cost_centers[0]": "08fe3681-77ec-3551-b4ce-773b39919927",
"format": "xlsx",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer d8Ph6ZDf53c64gbeVkaEa1v",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cost center entries
requires authentication cost-center report
Lançamentos que formam um total do painel, paginados e em ordem de data. O centro informado inclui a subárvore, então clicar no total de um grupo lista o que veio dos filhos também.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/cost-center/entries?search=ipsa&sort_by=date&sort_desc=&per_page=6" \
--header "Authorization: Bearer vfbg68D46k5Ede1aZ3VcaPh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_start\": \"2026-11-04\",
\"date_end\": \"2075-12-24\",
\"block\": \"disbursement\",
\"cost_center_id\": \"4c6cfa38-2e04-3733-825d-feba1ba17b15\",
\"without_cost_center\": false,
\"type\": \"material\",
\"per_page\": 8,
\"search\": \"cesrddczq\",
\"sort_by\": \"amount\",
\"sort_desc\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/cost-center/entries"
);
const params = {
"search": "ipsa",
"sort_by": "date",
"sort_desc": "0",
"per_page": "6",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer vfbg68D46k5Ede1aZ3VcaPh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date_start": "2026-11-04",
"date_end": "2075-12-24",
"block": "disbursement",
"cost_center_id": "4c6cfa38-2e04-3733-825d-feba1ba17b15",
"without_cost_center": false,
"type": "material",
"per_page": 8,
"search": "cesrddczq",
"sort_by": "amount",
"sort_desc": false
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Export cost center panel
requires authentication cost-center report
Gera a planilha do painel com os filtros atuais. XLSX sai com três abas (um total por bloco, mais os lançamentos); CSV sai com as mesmas três coisas em seções. O arquivo é gerado em fila e chega por notificação.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/cost-center/excel?date_start=2026-11-01&date_end=2026-11-30&works[]=64a2e9f0-dafb-3d1b-8963-536a7da4bf99&cost_centers[]=1193dfee-d353-3153-ba6e-1a35bfe01242&format=xlsx" \
--header "Authorization: Bearer b3DadVv68514ZgaEkhcPf6e" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/cost-center/excel"
);
const params = {
"date_start": "2026-11-01",
"date_end": "2026-11-30",
"works[0]": "64a2e9f0-dafb-3d1b-8963-536a7da4bf99",
"cost_centers[0]": "1193dfee-d353-3153-ba6e-1a35bfe01242",
"format": "xlsx",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer b3DadVv68514ZgaEkhcPf6e",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (202):
{
"message": "Relatório sendo gerado. Você será notificado quando estiver pronto.",
"channel": "reports.{uuid}",
"event": "excel-report.completed"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Export Cash Flow to Excel
requires authentication No specific permission required
Dispatches async Excel generation. Frontend receives notification via Pusher when ready.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/cash-flow/excel?q=itaque&type=entrada&description=Accusamus+quidem+autem+voluptatem+aperiam+quam+nostrum.&categories[]=a59d7d84-9b25-3d31-9653-23c064252efe&exclude_categories[]=b22c54c9-8563-3bfd-bc89-ac84abd6ea74&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=cb7a6bac-82fb-3dcb-9d51-6d4c4dd35a32&customers[]=e9e8de9b-7fd5-3874-953d-739be70eb4f1&suppliers[]=d15e3134-404f-36cf-8f0d-b4a5e9863276&cash_session=357151ad-ee2e-3449-8aa2-5a22bb1166ba&works[]=7b65673e-0e5e-3d78-bf9e-789c81d3ed4f" \
--header "Authorization: Bearer 6khZd8gaVv1465Pc3eEDbfa" \
--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": "itaque",
"type": "entrada",
"description": "Accusamus quidem autem voluptatem aperiam quam nostrum.",
"categories[0]": "a59d7d84-9b25-3d31-9653-23c064252efe",
"exclude_categories[0]": "b22c54c9-8563-3bfd-bc89-ac84abd6ea74",
"date_start": "2026-01-01",
"date_end": "2026-12-31",
"bank_accounts[0]": "cb7a6bac-82fb-3dcb-9d51-6d4c4dd35a32",
"customers[0]": "e9e8de9b-7fd5-3874-953d-739be70eb4f1",
"suppliers[0]": "d15e3134-404f-36cf-8f0d-b4a5e9863276",
"cash_session": "357151ad-ee2e-3449-8aa2-5a22bb1166ba",
"works[0]": "7b65673e-0e5e-3d78-bf9e-789c81d3ed4f",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 6khZd8gaVv1465Pc3eEDbfa",
"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=iusto&type=entrada&description=Magnam+sed+temporibus+delectus+officia+deserunt.&categories[]=b1a0a7a0-6246-3107-bbd2-9c086bf3d89f&exclude_categories[]=12722c8b-9d7f-3c17-a81a-0aaa12cb9b5a&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=391b6888-9c55-3652-9e32-32d69e5bf603&customers[]=c6a0065f-de53-3ad1-99fd-0df5df9c690e&suppliers[]=954d00aa-d106-3abf-ba31-86f3dd2fd405&cash_session=e24aaa2f-3273-31f0-9fa2-27f32b0af301&works[]=3152efae-13df-38db-9834-164fa6761e7f" \
--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": "iusto",
"type": "entrada",
"description": "Magnam sed temporibus delectus officia deserunt.",
"categories[0]": "b1a0a7a0-6246-3107-bbd2-9c086bf3d89f",
"exclude_categories[0]": "12722c8b-9d7f-3c17-a81a-0aaa12cb9b5a",
"date_start": "2026-01-01",
"date_end": "2026-12-31",
"bank_accounts[0]": "391b6888-9c55-3652-9e32-32d69e5bf603",
"customers[0]": "c6a0065f-de53-3ad1-99fd-0df5df9c690e",
"suppliers[0]": "954d00aa-d106-3abf-ba31-86f3dd2fd405",
"cash_session": "e24aaa2f-3273-31f0-9fa2-27f32b0af301",
"works[0]": "3152efae-13df-38db-9834-164fa6761e7f",
};
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 Z3kg4D6d8eEfhbvca1Pa6V5" \
--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 Z3kg4D6d8eEfhbvca1Pa6V5",
"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 b5v1ghPafV3de4EkZ68aD6c" \
--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 b5v1ghPafV3de4EkZ68aD6c",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "507cf411-8b7c-3380-bc85-f2d96806f52c",
"name": "est et",
"slug": null,
"description": "Qui laborum officiis excepturi. Laborum vel dolore natus eius. Accusamus qui consectetur sit velit.",
"abbreviation": "qkg",
"created_at": null,
"updated_at": null
},
{
"id": "2bea7ec8-096f-3540-ba74-38ab0402357d",
"name": "accusantium maiores",
"slug": null,
"description": null,
"abbreviation": "gin",
"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 6EcbDv8keV6hdga5aZ13Pf4" \
--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 6EcbDv8keV6hdga5aZ13Pf4",
"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/5" \
--header "Authorization: Bearer dV6fbhvg3kPcaD1a546eEZ8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/5"
);
const headers = {
"Authorization": "Bearer dV6fbhvg3kPcaD1a546eEZ8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "3454723e-2857-3582-a07c-f4c5760f3457",
"name": "est quis",
"slug": null,
"description": "Optio quidem ab eligendi explicabo tempora. Expedita tempore iusto aspernatur quisquam voluptatem ab. Sit placeat non voluptatem numquam.",
"abbreviation": null,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update sector
requires authentication sector update
Update a sector
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/sectors/18" \
--header "Authorization: Bearer kch5ev68VD14f6EagaZ3dbP" \
--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/18"
);
const headers = {
"Authorization": "Bearer kch5ev68VD14f6EagaZ3dbP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"slug": "Example Slug",
"description": "Example Description",
"abbreviation": "Example Abbreviation",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"url": "https:\/\/example.com",
"name": "Example Name",
"size": "Example Image size",
"extension": "Example Image extension"
}
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete sector
requires authentication sector delete
Delete a sector
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/sectors/20" \
--header "Authorization: Bearer bf1hP6Eck63eg4ad5Z8vaVD" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/20"
);
const headers = {
"Authorization": "Bearer bf1hP6Eck63eg4ad5Z8vaVD",
"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 5aEbfvP6De8ch1a3kZVd4g6" \
--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 5aEbfvP6De8ch1a3kZVd4g6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "8ca85584-e08a-3d12-8e34-ab7a3e21cffe",
"name": "Mrs. Elvie Bogan",
"username": "carlo.lang",
"email": "marina81@example.org",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "6fe6f258-cfd7-33e0-8e84-157d79d7614f",
"name": "Dr. Robyn Littel Jr.",
"username": "elva.stamm",
"email": "pearlie.reinger@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 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 Zbdv5DfE34h1P6aVcea68gk" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"2698df0e-aac2-39fd-b3ac-97f884aebef4\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/attach"
);
const headers = {
"Authorization": "Bearer Zbdv5DfE34h1P6aVcea68gk",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"2698df0e-aac2-39fd-b3ac-97f884aebef4"
]
};
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 fk86PD6v54Vdbaa1Zch3Eeg" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"6b690580-661e-3db7-9f3c-098ace0ce15e\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/detach"
);
const headers = {
"Authorization": "Bearer fk86PD6v54Vdbaa1Zch3Eeg",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"6b690580-661e-3db7-9f3c-098ace0ce15e"
]
};
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 a6a6k1hgdZP4eb8cDVE35vf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"3b1b489c-7d37-36eb-bb48-e332cf2edfb4\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/sync"
);
const headers = {
"Authorization": "Bearer a6a6k1hgdZP4eb8cDVE35vf",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"3b1b489c-7d37-36eb-bb48-e332cf2edfb4"
]
};
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 54khv61ade3EP6cV8bgafDZ" \
--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 54khv61ade3EP6cV8bgafDZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"name": "et eius",
"slug": "ut-commodi-dolorem-quia-quam-voluptatem"
},
{
"name": "tempora est",
"slug": "odio-quia-nihil-mollitia-molestiae-eveniet-rerum"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 a3e541kEPvhbDg66Za8fdcV" \
--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 a3e541kEPvhbDg66Za8fdcV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "739f202f-f4d9-3602-acc0-2b1cbacae6d6",
"slug": null,
"name": null,
"description": "Naiara Salas",
"abbreviation": "eos",
"color": "#7b1042",
"text_color": "#51ec9c",
"created_at": null,
"updated_at": null
},
{
"id": "6e066799-23bd-3dd8-93a7-17172ebf9bf6",
"slug": null,
"name": null,
"description": "Dr. Luana Giovanna Pena Filho",
"abbreviation": "quasi",
"color": "#9dc64c",
"text_color": "#0b0d7b",
"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 8ah13k6gbcV5dDEev4a6ZPf" \
--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\": \"04a140c5-fc4c-3fb7-ab24-ae9c169f60be\",
\"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 8ah13k6gbcV5dDEev4a6ZPf",
"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": "04a140c5-fc4c-3fb7-ab24-ae9c169f60be",
"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 86cPea3bV6v1ZaD4fkh5dgE" \
--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 86cPea3bV6v1ZaD4fkh5dgE",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "412b8a4f-ba16-32a5-a5d6-d175f6cdf6c5",
"slug": null,
"name": null,
"description": "Noa Marília Gomes",
"abbreviation": "dolores",
"color": "#c6d600",
"text_color": "#4f08c1",
"module": {
"name": "Solicitação de Produtos",
"slug": "product_request"
},
"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 45ahafP18bEkeDV6Zd6g3cv" \
--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\": \"088fe973-40b5-36bd-8017-9fb8f57315e1\",
\"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 45ahafP18bEkeDV6Zd6g3cv",
"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": "088fe973-40b5-36bd-8017-9fb8f57315e1",
"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 1d4V6cea8avhE3ZPkfD65bg" \
--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 1d4V6cea8avhE3ZPkfD65bg",
"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 bgeD1f8E3465cv6aPadkhVZ" \
--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 bgeD1f8E3465cv6aPadkhVZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "58e8b44e-daaa-3965-95ad-c84c318d75a8",
"quantity": 507.1406,
"min_quantity": null,
"max_quantity": null,
"below_minimum": false,
"above_maximum": false,
"created_at": null,
"updated_at": null
},
{
"id": "a7be1ed8-f33c-3afd-a509-822d71248c37",
"quantity": 420.7535,
"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 ZkgE6vb4aacf53186PVDhed" \
--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 ZkgE6vb4aacf53186PVDhed",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "e4e92be5-532f-3154-8aca-8dfc1a493850",
"name": "Estoque Padrão S.A.",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
},
{
"id": "aef0482d-ec23-37c7-b106-a8d86427bc3d",
"name": "Estoque Fidalgo e Filhos",
"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 PkhvEZ1ca3faD486bV5d6ge" \
--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 PkhvEZ1ca3faD486bV5d6ge",
"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": "d6d48bba-07c7-3a63-9aa0-1ec0ea5dbce3",
"name": "Estoque Cervantes e Cortês S.A.",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get main stock
requires authentication stock.main show
Returns the main stock
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/stocks/main" \
--header "Authorization: Bearer ZPb56fh43cEekdv6Vga18Da" \
--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 ZPb56fh43cEekdv6Vga18Da",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "ce1f64f0-bb2d-3d92-be3e-eaf53070166d",
"name": "Estoque Romero e Associados",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show stock
requires authentication stock show
Returns details of a specific stock
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/stocks/1" \
--header "Authorization: Bearer DcPa5d1f4Zk6ag6b3hvVE8e" \
--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 DcPa5d1f4Zk6ag6b3hvVE8e",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "da9194f8-7426-3ff6-b26e-56962ffdfd34",
"name": "Estoque Garcia e Cordeiro e Filhos",
"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 1fZ3d6bgaDaVPEc85v4h6ke" \
--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 1fZ3d6bgaDaVPEc85v4h6ke",
"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": "5765f3b2-6691-3bfd-914e-5abcafe61b97",
"name": "Estoque Salgado e Pedrosa e Filhos",
"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 c64VbaZ1Dd6efEvgha8Pk53" \
--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 c64VbaZ1Dd6efEvgha8Pk53",
"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 8k4eZVaPbEad36f5v6h1gDc" \
--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 8k4eZVaPbEad36f5v6h1gDc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "80679b1d-9f7a-358c-b51b-da75176d2f70",
"quantity": 269.2398,
"min_quantity": null,
"max_quantity": null,
"below_minimum": false,
"above_maximum": false,
"created_at": null,
"updated_at": null
},
{
"id": "68a85379-c5fd-324d-a5a9-68988ecc1476",
"quantity": 243.8404,
"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/maxime" \
--header "Authorization: Bearer 3h4fgvb6PdEV6DeZaa5ck18" \
--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/maxime"
);
const headers = {
"Authorization": "Bearer 3h4fgvb6PdEV6DeZaa5ck18",
"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": "2ad50f39-13dc-348a-80a8-256bf9c648ec",
"quantity": 890.9044,
"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 ckv6aebg1dP5483ZaD6fhVE" \
--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 ckv6aebg1dP5483ZaD6fhVE",
"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 5ebEhPk8cavd3D6Vfg41aZ6" \
--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 5ebEhPk8cavd3D6Vfg41aZ6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "17eb0f97-4de0-3c41-9413-cc9b3872e74d",
"code": "MOV-118726",
"type": "ajuste entrada",
"type_name": "ADJUSTMENT_IN",
"is_entry": true,
"is_exit": false,
"quantity": 41.8559,
"previous_quantity": 197.0502,
"new_quantity": 238.9061,
"reason": "Illum optio temporibus dicta voluptate blanditiis dicta ut.",
"movement_date": "2026-10-08T03:12:45.000000Z",
"created_at": null
},
{
"id": "3d341a35-27ac-3d39-9300-c4ceb1ec9917",
"code": "MOV-491127",
"type": "compra",
"type_name": "PURCHASE",
"is_entry": true,
"is_exit": false,
"quantity": 50.1765,
"previous_quantity": 276.2714,
"new_quantity": 326.4479,
"reason": null,
"movement_date": "2026-10-17T19:06:24.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 8E64bgkeZ5DV1fv3ac6ahdP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"dd37c48e-3274-3d7a-b2cc-451246e89cc4\",
\"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 8E64bgkeZ5DV1fv3ac6ahdP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "dd37c48e-3274-3d7a-b2cc-451246e89cc4",
"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": "4c7ac965-857d-3f27-bb82-54bd5c1035ad",
"code": "MOV-322526",
"type": "compra",
"type_name": "PURCHASE",
"is_entry": true,
"is_exit": false,
"quantity": 21.1877,
"previous_quantity": 209.4487,
"new_quantity": 230.6364,
"reason": null,
"movement_date": "2026-10-15T09:28:22.000000Z",
"created_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 h486aadbD6vg1Zk5cVfP3Ee" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"25869e8c-91a1-3ea8-a01f-51bfc4cca5d7\",
\"destination_stock_id\": \"5e86464d-4973-324e-8005-b7b31be34abd\",
\"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 h486aadbD6vg1Zk5cVfP3Ee",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "25869e8c-91a1-3ea8-a01f-51bfc4cca5d7",
"destination_stock_id": "5e86464d-4973-324e-8005-b7b31be34abd",
"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": "51478000-6c2c-3916-9a30-18b11ec28b29",
"code": "MOV-485968",
"type": "devolução",
"type_name": "RETURN",
"is_entry": true,
"is_exit": false,
"quantity": 27.1555,
"previous_quantity": 475.2851,
"new_quantity": 502.4406,
"reason": "Autem sapiente eum ea eum.",
"movement_date": "2026-10-07T07:42:29.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 k6cgdbEaPe5v8ZVfDh43a16" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"7aa40569-cb47-3758-89b7-62e3be6fc870\",
\"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 k6cgdbEaPe5v8ZVfDh43a16",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "7aa40569-cb47-3758-89b7-62e3be6fc870",
"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": "929531a5-2fb3-3feb-ad9b-2b0ee4253e38",
"code": "MOV-723694",
"type": "venda",
"type_name": "SALE",
"is_entry": false,
"is_exit": true,
"quantity": 58.3092,
"previous_quantity": 106.4016,
"new_quantity": 48.0924,
"reason": "Sit dolorem quo harum quo et.",
"movement_date": "2026-10-12T12:23:09.000000Z",
"created_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Purchase entry
requires authentication stock.movement store
Registers a purchase entry directly into the main stock
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/stock-movements/purchase" \
--header "Authorization: Bearer 3ek8bD5Efhg6caa6dVZvP41" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"21b6b97c-168e-39ac-b721-12fa690f0d16\",
\"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 3ek8bD5Efhg6caa6dVZvP41",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "21b6b97c-168e-39ac-b721-12fa690f0d16",
"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": "bf163918-3ce9-3052-b72b-c0ed8c76169b",
"code": "MOV-022818",
"type": "vencido",
"type_name": "EXPIRED",
"is_entry": false,
"is_exit": true,
"quantity": 47.9905,
"previous_quantity": 67.6968,
"new_quantity": 19.7063,
"reason": null,
"movement_date": "2026-11-02T21:18:40.000000Z",
"created_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 kEeP5h4cZ8da6vVD6fab13g" \
--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 kEeP5h4cZ8da6vVD6fab13g",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a5a448eb-e505-341d-bbde-7e5d39e7dd48",
"code": "MOV-122544",
"type": "perda",
"type_name": "LOSS",
"is_entry": false,
"is_exit": true,
"quantity": 80.0935,
"previous_quantity": 439.5592,
"new_quantity": 359.4657,
"reason": null,
"movement_date": "2026-10-14T05:56:36.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 51Zcvk6g6E3hbaV84eafdDP" \
--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 51Zcvk6g6E3hbaV84eafdDP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "e14287e5-1775-3178-9426-22712cde4c36",
"name": "Ester Ortiz",
"email": "rangel.marco@example.net",
"phone": "(89) 2798-2052",
"document": "81.726.478/0001-03",
"type": "pj",
"responsible": "Hosana Esteves Jr.",
"image": {
"id": null,
"url": null
},
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
}
},
{
"id": "7e66e323-02ca-3fc1-8c17-d03dd77da141",
"name": "Dr. Cristiano Ortiz Jr.",
"email": "alice.furtado@example.org",
"phone": "(46) 3648-2651",
"document": "22.730.803/0001-34",
"type": "pf",
"responsible": "Sra. Eva Lozano Sobrinho",
"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 c5aD4dZVfka86egE1b3hPv6" \
--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 c5aD4dZVfka86egE1b3hPv6",
"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 3vDckf854EeabVd616ghaPZ" \
--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 3vDckf854EeabVd616ghaPZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "906896c9-4c7f-3fe9-9ecd-fdbf8f507096",
"name": "Dr. Patrícia Lívia Cruz",
"email": "lovato.kauan@example.net",
"phone": "(17) 4954-6147",
"document": "95.630.377/0001-30",
"type": "pf",
"responsible": "Dr. Everton Robson Verdugo",
"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 Da6bdePkE6Z8cVf34vh5ga1" \
--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 Da6bdePkE6Z8cVf34vh5ga1",
"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 eDE6dakZ81Vf5b4g3avh6Pc" \
--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 eDE6dakZ81Vf5b4g3avh6Pc",
"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 aVgvb1D456akhe83ZEPcf6d" \
--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 aVgvb1D456akhe83ZEPcf6d",
"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 VdDcbh8v135kag64feaE6PZ" \
--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 VdDcbh8v135kag64feaE6PZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "25cb7a0e-ded9-3c08-8f96-d352ec56c6fc",
"name": "Thalita Leon Galvão",
"description": "Officiis ab laudantium et officia dicta fugit odio rerum. In voluptatem reiciendis doloremque libero quo quidem. Similique at dolor enim autem.",
"type": "saque"
},
{
"id": "e5dcd48e-cf80-30d9-9ef9-e7827deba296",
"name": "Hosana Gonçalves Furtado",
"description": "Perferendis dolor magni quae commodi. Quidem quia voluptatem quo nihil. Numquam omnis tempora est suscipit natus est fugit.",
"type": "juros"
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show transaction category
requires authentication transaction-category show
Show a transaction category
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/transaction-categories/eos" \
--header "Authorization: Bearer h6k3fVcZD4165ebdEvaagP8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/transaction-categories/eos"
);
const headers = {
"Authorization": "Bearer h6k3fVcZD4165ebdEvaagP8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "e7a09716-534b-3728-9c0e-81be007604bc",
"name": "Sr. Richard Caldeira Neto",
"description": "Veritatis quaerat et et rerum. Similique temporibus beatae ullam sint nesciunt. Itaque optio minus quidem illum qui ea suscipit.",
"type": "juros"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 8v5hb6eZ31kdfa6EagD4PcV" \
--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 8v5hb6eZ31kdfa6EagD4PcV",
"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/ex" \
--header "Authorization: Bearer 4P6vehZd5fg61cDaEak8b3V" \
--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/ex"
);
const headers = {
"Authorization": "Bearer 4P6vehZd5fg61cDaEak8b3V",
"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/qui" \
--header "Authorization: Bearer 5641beVcaavdhD3EP6kZfg8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/transaction-categories/qui"
);
const headers = {
"Authorization": "Bearer 5641beVcaavdhD3EP6kZfg8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tutoriais (administração)
Cadastro do catálogo de módulos da Central de Tutoriais
Listar módulos
requires authentication tutorials index
Lista o catálogo de módulos de tutorial
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Financeiro&is_active=1" \
--header "Authorization: Bearer 6EehD3fZPg6b5V1avdakc48" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "Financeiro",
"is_active": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 6EehD3fZPg6b5V1avdakc48",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "04813ff9-9b18-335c-937f-68cf67d6d4d6",
"name": "Quibusdam quia",
"slug": "quibusdam-quia-401392",
"description": "Quam repudiandae sed voluptatem amet consequatur necessitatibus delectus nostrum.",
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
},
{
"id": "36d91027-30a6-3fbe-9200-527af342b8ef",
"name": "Non ex",
"slug": "non-ex-204000",
"description": "Voluptate eos eius consequatur in id asperiores.",
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cadastrar módulo
requires authentication tutorials store
Cria um módulo no catálogo. O slug é derivado do nome quando não informado.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules" \
--header "Authorization: Bearer d4ePg63avbV1a65fZkc8EDh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"slug\": \"Example Slug\",
\"description\": \"Example Description\",
\"sort_order\": 1,
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules"
);
const headers = {
"Authorization": "Bearer d4ePg63avbV1a65fZkc8EDh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"slug": "Example Slug",
"description": "Example Description",
"sort_order": 1,
"is_active": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "c957b550-c805-3031-9e43-ac81c9703bc1",
"name": "Sit et",
"slug": "sit-et-179716",
"description": "Deleniti vero vel dolores.",
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Visualizar módulo
requires authentication tutorials index
Detalhe de um módulo do catálogo
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer akv5ed4c3EP8VbDZh66fga1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer akv5ed4c3EP8VbDZh66fga1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "7a020761-d9b0-351d-ab64-87e5d703d741",
"name": "Est minus",
"slug": "est-minus-487550",
"description": "Beatae ad eum et ut nesciunt sed voluptate.",
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Atualizar módulo
requires authentication tutorials update
Atualiza um módulo do catálogo
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer a8dfgbeP5h6c14kaEZv3VD6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"slug\": \"Example Slug\",
\"description\": \"Example Description\",
\"sort_order\": 1,
\"is_active\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer a8dfgbeP5h6c14kaEZv3VD6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"slug": "Example Slug",
"description": "Example Description",
"sort_order": 1,
"is_active": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "8aacbc30-de56-3277-8017-af9bb99027f6",
"name": "Libero quas",
"slug": "libero-quas-306111",
"description": "Perspiciatis quo ad accusamus.",
"sort_order": 0,
"is_active": true,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remover módulo
requires authentication tutorials destroy
Remove o módulo e, junto, os tutoriais que pertenciam a ele
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer a5ckEfv48DhP661dbZe3gaV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer a5ckEfv48DhP661dbZe3gaV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Listar tutoriais
requires authentication tutorials index
Lista os tutoriais em qualquer status, para quem administra
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/admin/tutorials?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=ordem+de+servi%C3%A7o&module_id=85919139-2d6a-3e10-8a2a-40a6a06ec0a6§or_id=341e58d2-95c7-3ab8-b6f5-565505b8f638&status=published" \
--header "Authorization: Bearer eaPE6f14Zh58akbg6dcvV3D" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "ordem de serviço",
"module_id": "85919139-2d6a-3e10-8a2a-40a6a06ec0a6",
"sector_id": "341e58d2-95c7-3ab8-b6f5-565505b8f638",
"status": "published",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer eaPE6f14Zh58akbg6dcvV3D",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "2b093188-48f7-33b2-8c4f-57e78744cf67",
"title": "Voluptate nostrum illum veritatis",
"description": "Ratione explicabo maxime est cumque excepturi.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a325a305-7034-493a-9545-a24fe1ddd528",
"name": "Beatae tempore",
"slug": "beatae-tempore-94145"
},
"created_at": null,
"updated_at": null
},
{
"id": "6e8dcb3d-5bac-3adb-8bd6-1f83345ed201",
"title": "Blanditiis minus consequuntur ipsa",
"description": "Ipsam odio itaque libero eligendi id.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a325a305-7425-4524-b3a8-a3966edeac16",
"name": "Nisi animi",
"slug": "nisi-animi-499637"
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cadastrar tutorial
requires authentication tutorials store
Cria um tutorial. Nasce como rascunho e só aparece na central depois de publicado.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials" \
--header "Authorization: Bearer fkd5Z6PVb1echD8vg63aE4a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"module_id\": \"7a9fb079-db5a-3c96-b8f1-e3326e585c40\",
\"title\": \"Example Title\",
\"description\": \"Example Description\",
\"cover_path\": \"Example Cover path\",
\"sort_order\": 1,
\"sectors\": [
\"725d6a7d-41d5-37b4-ae88-0bebdbbb50e9\"
],
\"permissions\": [
\"23cfcc39-a19e-37d5-91e9-e037b85cbb73\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials"
);
const headers = {
"Authorization": "Bearer fkd5Z6PVb1echD8vg63aE4a",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"module_id": "7a9fb079-db5a-3c96-b8f1-e3326e585c40",
"title": "Example Title",
"description": "Example Description",
"cover_path": "Example Cover path",
"sort_order": 1,
"sectors": [
"725d6a7d-41d5-37b4-ae88-0bebdbbb50e9"
],
"permissions": [
"23cfcc39-a19e-37d5-91e9-e037b85cbb73"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "a9f4673a-e667-30f9-a689-45dc1aa5a37a",
"title": "Laborum ut sint ducimus",
"description": "Sit qui tempora quidem.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a325a305-8082-4c7b-911f-cdadacb66713",
"name": "Eligendi officiis",
"slug": "eligendi-officiis-60022"
},
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Gerar URL de upload
requires authentication tutorials store
Devolve uma URL assinada de curta validade para o cliente enviar o arquivo direto ao S3. O arquivo só é conferido depois, ao criar o item ou salvar a capa.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/upload-url" \
--header "Authorization: Bearer acbfZvg8k6ad4h6E1V3P5eD" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"kind\": \"Example Kind\",
\"filename\": \"Example Name\",
\"extension\": \"Example Extension\",
\"size_bytes\": 1
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/upload-url"
);
const headers = {
"Authorization": "Bearer acbfZvg8k6ad4h6E1V3P5eD",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"kind": "Example Kind",
"filename": "Example Name",
"extension": "Example Extension",
"size_bytes": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"url": "string",
"headers": "array",
"path": "string",
"expires_in": "integer"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Visualizar tutorial
requires authentication tutorials index
Detalhe do tutorial com vínculos e itens
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1" \
--header "Authorization: Bearer a45dcDEg3Z81Pkf6e6vbVah" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1"
);
const headers = {
"Authorization": "Bearer a45dcDEg3Z81Pkf6e6vbVah",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "8737daf4-634d-3478-8ed8-fa088ab743ac",
"title": "Rerum mollitia et explicabo",
"description": "Et quibusdam minus sed perspiciatis rerum.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a325a305-9302-42ce-aa86-61de8f6d85d7",
"name": "Ipsam sapiente",
"slug": "ipsam-sapiente-349561"
},
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Atualizar tutorial
requires authentication tutorials update
Atualiza o tutorial e os vínculos de setor e permissão
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1" \
--header "Authorization: Bearer aZc48Pevag5hDbEd6k36fV1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"module_id\": \"8acd0c05-344e-32c2-9aab-624602b75be8\",
\"title\": \"Example Title\",
\"description\": \"Example Description\",
\"cover_path\": \"Example Cover path\",
\"sort_order\": 1,
\"sectors\": [
\"b024c92a-50ce-32d3-9d05-84cb258f7d0d\"
],
\"permissions\": [
\"f7ce764e-df4a-3392-b8ed-9f25a44b7e51\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1"
);
const headers = {
"Authorization": "Bearer aZc48Pevag5hDbEd6k36fV1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"module_id": "8acd0c05-344e-32c2-9aab-624602b75be8",
"title": "Example Title",
"description": "Example Description",
"cover_path": "Example Cover path",
"sort_order": 1,
"sectors": [
"b024c92a-50ce-32d3-9d05-84cb258f7d0d"
],
"permissions": [
"f7ce764e-df4a-3392-b8ed-9f25a44b7e51"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a50a3901-c5ff-3051-bdfe-af1f0092d27d",
"title": "Fugit adipisci fuga magnam",
"description": "Rem nostrum molestias enim explicabo.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a325a305-9cdf-4b49-bb4a-a5cd22a51a6b",
"name": "Saepe adipisci",
"slug": "saepe-adipisci-7781"
},
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remover tutorial
requires authentication tutorials destroy
Remove o tutorial, os itens e os arquivos correspondentes no S3
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1" \
--header "Authorization: Bearer hb5Dg6Z1va4eV3kEcPdf86a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1"
);
const headers = {
"Authorization": "Bearer hb5Dg6Z1va4eV3kEcPdf86a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Publicar tutorial
requires authentication tutorials update
Publica o tutorial e carimba a data de publicação
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/019556e7-2e9f-777c-a177-30bbf0646c32/publish" \
--header "Authorization: Bearer 5f1ED8kcVvaadhZP3e6gb46" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/019556e7-2e9f-777c-a177-30bbf0646c32/publish"
);
const headers = {
"Authorization": "Bearer 5f1ED8kcVvaadhZP3e6gb46",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "c558df39-1df5-3049-b6b6-19126a253e5d",
"title": "Et officia qui dolor",
"description": "Voluptatem possimus tempore et dolore vitae veniam et.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a325a305-a67d-40fe-a2af-eab7736a0281",
"name": "Quis corrupti",
"slug": "quis-corrupti-451443"
},
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Despublicar tutorial
requires authentication tutorials update
Devolve o tutorial ao rascunho e limpa a data de publicação
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/019556e7-2e9f-777c-a177-30bbf0646c32/unpublish" \
--header "Authorization: Bearer 63vVckae5h6adf1g8EPbDZ4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/019556e7-2e9f-777c-a177-30bbf0646c32/unpublish"
);
const headers = {
"Authorization": "Bearer 63vVckae5h6adf1g8EPbDZ4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "c363baef-c634-35b1-9fc9-ed215c24c218",
"title": "Quasi at eos eos",
"description": "Ut quibusdam vero dolorem autem.",
"status": "draft",
"published_at": null,
"sort_order": 0,
"module": {
"id": "a325a305-ac58-40b3-8310-1d90e85819fe",
"name": "Eligendi et",
"slug": "eligendi-et-61452"
},
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Adicionar item ao tutorial
requires authentication tutorials store
Cria o item a partir de um arquivo já enviado ao S3 (pdf ou video) ou de um link do YouTube/Vimeo. O arquivo é conferido aqui: existência, tamanho real e assinatura do conteúdo.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1/items" \
--header "Authorization: Bearer a58b6VDhgZ1kv6aE4fdPc3e" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"Example Type\",
\"title\": \"Example Title\",
\"file_path\": \"Example File path\",
\"external_url\": \"https:\\/\\/example.com\",
\"duration_seconds\": 1,
\"sort_order\": 1
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1/items"
);
const headers = {
"Authorization": "Bearer a58b6VDhgZ1kv6aE4fdPc3e",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "Example Type",
"title": "Example Title",
"file_path": "Example File path",
"external_url": "https:\/\/example.com",
"duration_seconds": 1,
"sort_order": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": "504fc604-3f8e-3394-8b8e-3b1d59e6aebd",
"type": "pdf",
"title": "Id molestias sunt",
"mime_type": "application/pdf",
"size_bytes": 1744635,
"duration_seconds": null,
"sort_order": 0,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reordenar itens
requires authentication tutorials update
Grava a ordem dos itens conforme a sequência de UUIDs enviada
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/019556e7-2e9f-777c-a177-30bbf0646c32/items/reorder" \
--header "Authorization: Bearer EDkV6Pe3abZah46vcf851gd" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"0f941ff5-076d-3af4-bf04-66e2a324c67a\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorials/019556e7-2e9f-777c-a177-30bbf0646c32/items/reorder"
);
const headers = {
"Authorization": "Bearer EDkV6Pe3abZah46vcf851gd",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"0f941ff5-076d-3af4-bf04-66e2a324c67a"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Itens reordenados com sucesso"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Atualizar item
requires authentication tutorials update
Atualiza o item. O tipo não muda depois de criado.
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-items/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer acZaD51h66gfvk8eb4PEdV3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"Example Title\",
\"file_path\": \"Example File path\",
\"external_url\": \"https:\\/\\/example.com\",
\"duration_seconds\": 1,
\"sort_order\": 1
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-items/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer acZaD51h66gfvk8eb4PEdV3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "Example Title",
"file_path": "Example File path",
"external_url": "https:\/\/example.com",
"duration_seconds": 1,
"sort_order": 1
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "f1324938-3d6f-3a83-b6cc-37d3e10e87cb",
"type": "pdf",
"title": "Voluptates ut cum",
"mime_type": "application/pdf",
"size_bytes": 2032050,
"duration_seconds": null,
"sort_order": 0,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remover item
requires authentication tutorials destroy
Remove o item e apaga o arquivo correspondente no S3
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-items/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer bhva3Pk6E8g6V4fd5c1DZae" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/admin/tutorial-items/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer bhva3Pk6E8g6V4fd5c1DZae",
"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 DZgca65a1bv4kehEPV386df" \
--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 DZgca65a1bv4kehEPV386df",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "e281145d-2dc3-3e47-9014-0c86aa630e72",
"name": "Rafaela Salas Barreto",
"abbreviation": "Felipe Pereira Prado Sobrinho",
"description": "Et dolor at accusamus.",
"created_at": null,
"updated_at": null
},
{
"id": "25b6aa4a-39cb-30dd-9982-8669e9044437",
"name": "Dr. Nayara Roque",
"abbreviation": "Sr. Adriel Padrão Rivera Sobrinho",
"description": "Eum veritatis esse harum ea.",
"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 65hbagkE4f61e3a8cZVDdvP" \
--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 65hbagkE4f61e3a8cZVDdvP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "704fd506-4718-3c73-9aec-7499428ec281",
"name": "Agustina Beltrão Sobrinho",
"abbreviation": "Sra. Bia Juliana Santiago",
"description": "Quasi culpa omnis est nulla.",
"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 Z41fPk3g5E6dbDa6ecv8Vha" \
--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 Z41fPk3g5E6dbDa6ecv8Vha",
"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 b431h8vekVZc656DfgaEdPa" \
--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 b431h8vekVZc656DfgaEdPa",
"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/et" \
--header "Authorization: Bearer ec36E4gfDdk5PvbaVZ618ah" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/units/et"
);
const headers = {
"Authorization": "Bearer ec36E4gfDdk5PvbaVZ618ah",
"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 65D3fdgvk1PcVa8ZEa46bhe" \
--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 65D3fdgvk1PcVa8ZEa46bhe",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "a3aae658-f4c4-3dc3-b320-0a930ad25970",
"name": "Dr. Adrain Ferry I",
"username": "rkshlerin",
"email": "stroman.vanessa@example.org",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "f8a76c49-3b73-386e-aca0-dfc225b97a07",
"name": "Unique Frami",
"username": "eliezer90",
"email": "reinger.vivian@example.net",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get user
requires authentication user show
Get a user
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/users/1" \
--header "Authorization: Bearer kaghdVaf6EvD1Ze6834bP5c" \
--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 kaghdVaf6EvD1Ze6834bP5c",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "21c42c1b-2dc1-3993-9e27-b50e8fcd0d1b",
"name": "Ila Treutel",
"username": "rebert",
"email": "legros.jude@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 kbe3v8dah5g64afPV16ZDEc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"mertie.donnelly\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"6a176e93-9bed-3694-8495-89536732fdef\"
],
\"roles\": [
\"7441de31-5f28-3d28-8db8-b96dff49c4bc\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users"
);
const headers = {
"Authorization": "Bearer kbe3v8dah5g64afPV16ZDEc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "mertie.donnelly",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"6a176e93-9bed-3694-8495-89536732fdef"
],
"roles": [
"7441de31-5f28-3d28-8db8-b96dff49c4bc"
]
};
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 5EZcVd4gDv66ahf3a18kebP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"kuvalis.daryl\",
\"password\": \"password123\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"eff04358-1892-316b-8592-790786bc6a3d\"
],
\"roles\": [
\"502bc76c-3fd1-3db4-a5dd-d568c789b9a0\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users/1"
);
const headers = {
"Authorization": "Bearer 5EZcVd4gDv66ahf3a18kebP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "kuvalis.daryl",
"password": "password123",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"eff04358-1892-316b-8592-790786bc6a3d"
],
"roles": [
"502bc76c-3fd1-3db4-a5dd-d568c789b9a0"
]
};
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 f65Dhvedk84E1PV6Zcgaa3b" \
--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 f65Dhvedk84E1PV6Zcgaa3b",
"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 d85afZ1Vk6vDE3ebcgaP4h6" \
--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 d85afZ1Vk6vDE3ebcgaP4h6",
"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 6fEaDh3Zadcv48V5gb61Pke" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"a3121bae-679f-3e83-b6d4-545a5d54901c\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users/1/permissions"
);
const headers = {
"Authorization": "Bearer 6fEaDh3Zadcv48V5gb61Pke",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"a3121bae-679f-3e83-b6d4-545a5d54901c"
]
};
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 V3Pf1gZbe6d6Dch5vaE48ka" \
--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 V3Pf1gZbe6d6Dch5vaE48ka",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "quia",
"display_name": "Ex magni ex cumque rerum fuga."
},
{
"id": null,
"name": "eaque",
"display_name": "Et suscipit neque ut voluptate tempore nihil."
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 P45Ebfav3cV68ahde16DZgk" \
--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 P45Ebfav3cV68ahde16DZgk",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "dc9819a8-3cda-3290-8952-4a9195c36006",
"description": "Sra. Paula Tâmara Carvalho Jr.",
"work": {
"id": null,
"name": null
},
"documents": [],
"created_at": null,
"updated_at": null
},
{
"id": "6b07ae91-df98-3ea7-9f15-ca3c54251570",
"description": "Valentin Caldeira Jr.",
"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 h64fP3VadeZ8E6ac5bv1gkD" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"description\": \"Example Description\",
\"work_id\": \"13d91893-0eb0-30d5-8231-7db810027cbf\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/work-locations"
);
const headers = {
"Authorization": "Bearer h64fP3VadeZ8E6ac5bv1gkD",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"description": "Example Description",
"work_id": "13d91893-0eb0-30d5-8231-7db810027cbf"
};
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 vh1Z65V4E3aPaf8gDedbkc6" \
--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 vh1Z65V4E3aPaf8gDedbkc6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "5941427b-3e82-3084-94fb-7ff8f5128bad",
"description": "Eduardo Dominato Dominato",
"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 gDa5adh3fb1k8PEV4Z6e6cv" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"description\": \"Example Description\",
\"work_id\": \"172cf577-f116-365f-ae82-8626a82012e8\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/work-locations/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer gDa5adh3fb1k8PEV4Z6e6cv",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"description": "Example Description",
"work_id": "172cf577-f116-365f-ae82-8626a82012e8"
};
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 ak4PfhvgEV6cZd65aeDb138" \
--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 ak4PfhvgEV6cZd65aeDb138",
"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 68b6kfDVPa1Zc3eE4gahvd5" \
--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 68b6kfDVPa1Zc3eE4gahvd5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "2ea8e40e-11fa-395d-a2c5-28e66099950c",
"name": "Sr. Gustavo Ícaro Cruz Neto",
"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": "1976-09-28 05:34:21.000000",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"created_at": null,
"updated_at": null
},
{
"id": "7f371061-eaaa-392c-acf8-400190e11d58",
"name": "Dr. Cristian Sergio Carmona",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"documents": [],
"locations": [],
"product_quantity_lists_count": 0,
"product_quantity_list_items_count": 0,
"product_requests_count": 0,
"product_request_items_count": 0,
"documents_count": 0,
"locations_documents_count": 0,
"total_documents_count": 0,
"daily_logs_count": 0,
"projects_count": 0,
"started_at": {
"date": "1987-05-28 23:00:43.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 5Vc8d6ZPgvDEhafek416a3b" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"customer_id\": \"91d00da6-6c20-3d70-976a-827b9d3ea234\",
\"status_id\": \"c57ac0ef-b4bf-3f34-8f53-02a29f9885cc\",
\"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 5Vc8d6ZPgvDEhafek416a3b",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"customer_id": "91d00da6-6c20-3d70-976a-827b9d3ea234",
"status_id": "c57ac0ef-b4bf-3f34-8f53-02a29f9885cc",
"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 1bVvgcZdfEaea586D63kh4P" \
--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 1bVvgcZdfEaea586D63kh4P",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "15d87841-d41e-3e56-8dc6-b09485b2baaa",
"name": "Dayane Abreu Verdara",
"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": "2005-02-06 08:39:35.000000",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update work
requires authentication work update
Update a work
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/works/1" \
--header "Authorization: Bearer dg6Ec3vae4PhZ1k6b58aVfD" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"customer_id\": \"04ec0aa5-a234-3fe8-94ef-74f5c2b955f2\",
\"status_id\": \"6506c93d-63e0-3a40-a59f-20c5aedfeab4\",
\"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 dg6Ec3vae4PhZ1k6b58aVfD",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"customer_id": "04ec0aa5-a234-3fe8-94ef-74f5c2b955f2",
"status_id": "6506c93d-63e0-3a40-a59f-20c5aedfeab4",
"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 bhVkPZ4a865cD31Eaf6dgve" \
--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 bhVkPZ4a865cD31Eaf6dgve",
"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 vV5646Z1eEhfgaPc8Da3kbd" \
--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 vV5646Z1eEhfgaPc8Da3kbd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "9d1cb7c4-a591-382d-bac2-213d70e3684c",
"name": "Delilah Berge",
"username": "williamson.kelly",
"email": "jules71@example.net",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "9ee48b91-d25e-3b02-b063-989f48db52e2",
"name": "Misty Roob",
"username": "sosinski",
"email": "cody.rolfson@example.org",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Attach responsibles to work
requires authentication work-responsibles attach
Attach users as responsibles to a work without removing existing ones
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach" \
--header "Authorization: Bearer eE5hPf1vkDZ6cad6Vb8g4a3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"166939af-56be-35b6-b164-149a4e48209b\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach"
);
const headers = {
"Authorization": "Bearer eE5hPf1vkDZ6cad6Vb8g4a3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"166939af-56be-35b6-b164-149a4e48209b"
]
};
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 baDe43kh8v6daPE65gf1ZcV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"cc65b691-18cc-3a2e-b1d6-e2ff4e9b94b0\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/detach"
);
const headers = {
"Authorization": "Bearer baDe43kh8v6daPE65gf1ZcV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"cc65b691-18cc-3a2e-b1d6-e2ff4e9b94b0"
]
};
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 a664aPZb5cv3g8E1DedkVfh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"dbb5c14e-1c2b-3025-92b7-0de82c540a88\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/sync"
);
const headers = {
"Authorization": "Bearer a664aPZb5cv3g8E1DedkVfh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"dbb5c14e-1c2b-3025-92b7-0de82c540a88"
]
};
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.