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 fbecv8ha5kEV64P3aDdg1Z6" \
--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 fbecv8ha5kEV64P3aDdg1Z6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "210b9756-f0e2-3a96-aa18-15f7fd6684a0",
"name": "nulla-6a7c57f8c2c46",
"display_name": "Fugit aut in quasi non assumenda et libero et.",
"permissions_count": null
},
{
"id": "31bb7e04-5928-3e43-b26b-87a7c462cb64",
"name": "asperiores-6a7c57f8c99f4",
"display_name": "Alias soluta aperiam quae.",
"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 8aavDgfZ5E34h6PVbkc6e1d" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"display_name\": \"Example Name\",
\"permissions\": [
\"83ccd9f1-0d5c-385b-afb5-78e6c7315811\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/roles"
);
const headers = {
"Authorization": "Bearer 8aavDgfZ5E34h6PVbkc6e1d",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"display_name": "Example Name",
"permissions": [
"83ccd9f1-0d5c-385b-afb5-78e6c7315811"
]
};
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 ZPa3h5f6Ec1k6aDeg4dvbV8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"display_name\": \"Example Name\",
\"permissions\": [
\"da65fe17-104b-3ab8-81e5-e41a9a1e9499\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/acl/roles/1"
);
const headers = {
"Authorization": "Bearer ZPa3h5f6Ec1k6aDeg4dvbV8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"display_name": "Example Name",
"permissions": [
"da65fe17-104b-3ab8-81e5-e41a9a1e9499"
]
};
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 4Zb3DVkgaP1566Ed8acvefh" \
--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 4Zb3DVkgaP1566Ed8acvefh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "317ad2d6-ed58-3899-ae5a-0c88f71906e9",
"name": "pariatur-6a7c57f8ddd71",
"display_name": "Dolorem saepe rerum quo dolores perferendis.",
"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 g5cvD8P3fZk6eV6E1ha4adb" \
--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 g5cvD8P3fZk6eV6E1ha4adb",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "molestiae",
"display_name": "In voluptatem et quia expedita quis saepe."
},
{
"id": null,
"name": "aliquam",
"display_name": "Eveniet soluta enim quasi aut harum enim."
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 g5P3ek1EcV46Zf68hdbDaav" \
--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 g5P3ek1EcV46Zf68hdbDaav",
"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 6b6Ed1kZ3cPa45eDh8vagVf" \
--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 6b6Ed1kZ3cPa45eDh8vagVf",
"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": "Molestiae temporibus tempore quia temporibus dolores sed."
},
{
"id": null,
"name": "sit",
"display_name": "Sunt quae quaerat consectetur qui porro fuga accusamus voluptatem."
}
],
"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 3a15dEZaPVh8vgDeb664kfc" \
--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 3a15dEZaPVh8vgDeb664kfc",
"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 edD6vkZ31hbafEV6cPg548a" \
--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 edD6vkZ31hbafEV6cPg548a",
"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 cVe5hEdvba1ZDafP48kg366" \
--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 cVe5hEdvba1ZDafP48kg366",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": null,
"name": "tempore",
"display_name": "Dolorem odit laboriosam vel eos."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 a8V6eb1hdkZv5cE4a63DPgf" \
--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 a8V6eb1hdkZv5cE4a63DPgf",
"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 4Vbkg53v6dcD1haPfaE8Z6e" \
--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 4Vbkg53v6dcD1haPfaE8Z6e",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "f6fc22ac-f63c-31f0-8ed5-4e8261e601ff",
"code": null,
"type": "saída",
"payment_method": "boleto",
"amount": 4803.94,
"due_date": "2026-08-21T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Soluta blanditiis eveniet distinctio et placeat corrupti molestias voluptatem fugit quis expedita doloremque.",
"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": "dolor",
"field2": 32,
"field3": false,
"notes": "Rerum et voluptas nemo.",
"created_at": null,
"updated_at": null
},
{
"id": "c89665ff-03d8-31d3-9155-dc86cac4469a",
"code": null,
"type": "entrada",
"payment_method": "cheque",
"amount": 9673.87,
"due_date": "2026-08-28T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Veritatis voluptatem eos magnam qui ut et neque adipisci autem.",
"is_recurring": null,
"recurrence_config": null,
"parent_id": null,
"recurrence_order": 1,
"total_recurrences": null,
"children_count": 0,
"remaining_recurrences": null,
"has_children": false,
"field1": "molestiae",
"field2": 90,
"field3": true,
"notes": "Quod et sequi sint et quae voluptatem harum.",
"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[]=rerum" \
--header "Authorization: Bearer 6Egvba65VZhe3fkD8Pac4d1" \
--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]": "rerum",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 6Egvba65VZhe3fkD8Pac4d1",
"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 e64E56hvVa8ZfPkgabd13Dc" \
--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 e64E56hvVa8ZfPkgabd13Dc",
"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[]=magnam&suppliers[]=ea&works[]=inventore&statuses[]=vencido&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-08-12T08%3A24%3A41&protest_date_end=2026-08-12T08%3A24%3A41&has_protest=1&has_children=1&is_recurring=1" \
--header "Authorization: Bearer gc6bkVh1dZ6e4aPav3EDf85" \
--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]": "magnam",
"suppliers[0]": "ea",
"works[0]": "inventore",
"statuses[0]": "vencido",
"payment_method": "cheque",
"date_start": "2023-01-01",
"date_end": "2023-12-31",
"protest_date_start": "2026-08-12T08:24:41",
"protest_date_end": "2026-08-12T08:24:41",
"has_protest": "1",
"has_children": "1",
"is_recurring": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer gc6bkVh1dZ6e4aPav3EDf85",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "5aab094a-6274-37e9-9973-73a31cf0e127",
"code": null,
"type": "entrada",
"payment_method": "boleto",
"amount": 9820.55,
"due_date": "2026-08-31T03: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": "Aspernatur et aspernatur quia laborum accusantium corporis suscipit eaque.",
"is_recurring": null,
"recurrence_config": null,
"parent_id": null,
"recurrence_order": 1,
"total_recurrences": null,
"children_count": 0,
"remaining_recurrences": null,
"has_children": false,
"field1": "quia",
"field2": 80,
"field3": true,
"notes": "Accusantium dolore eum impedit aut.",
"created_at": null,
"updated_at": null
},
{
"id": "a41d4a8e-868e-33d8-b287-bc70c61c2a23",
"code": null,
"type": "entrada",
"payment_method": "boleto",
"amount": 7930.56,
"due_date": "2026-09-07T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Quia non nihil ut corporis perspiciatis ea cumque 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": "doloremque",
"field2": 89,
"field3": true,
"notes": "Architecto vel ab porro sit veritatis.",
"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[]=ipsa&suppliers[]=omnis&works[]=hic&statuses[]=pago&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-08-12T08%3A24%3A41&protest_date_end=2026-08-12T08%3A24%3A41&has_protest=&has_children=1&is_recurring=1" \
--header "Authorization: Bearer ZDe4afh56a3Pvdkcb8gV16E" \
--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]": "ipsa",
"suppliers[0]": "omnis",
"works[0]": "hic",
"statuses[0]": "pago",
"payment_method": "cheque",
"date_start": "2023-01-01",
"date_end": "2023-12-31",
"protest_date_start": "2026-08-12T08:24:41",
"protest_date_end": "2026-08-12T08:24:41",
"has_protest": "0",
"has_children": "1",
"is_recurring": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ZDe4afh56a3Pvdkcb8gV16E",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "91561f03-3374-329d-8109-670e8e114b17",
"code": null,
"type": "entrada",
"payment_method": "cheque",
"amount": 6568.6,
"due_date": "2026-08-27T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Et rerum a incidunt distinctio quod excepturi corporis aperiam.",
"is_recurring": null,
"recurrence_config": null,
"parent_id": null,
"recurrence_order": 1,
"total_recurrences": null,
"children_count": 0,
"remaining_recurrences": null,
"has_children": false,
"field1": "in",
"field2": 95,
"field3": true,
"notes": "Minima velit dolores aut dolor consectetur.",
"created_at": null,
"updated_at": null
},
{
"id": "24ff0ab8-b530-3b90-8c36-81bac5902f14",
"code": null,
"type": "saída",
"payment_method": "boleto",
"amount": 7172.11,
"due_date": "2026-08-22T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Doloremque dolorum minima illo aperiam asperiores quos consequatur incidunt id sapiente.",
"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": "soluta",
"field2": 67,
"field3": false,
"notes": "Repudiandae aspernatur velit accusamus aut.",
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create accounts payable receivable
requires authentication accounts-payable-receivable store
Create a new accounts payable receivable
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable" \
--header "Authorization: Bearer 6De83dPc15fabh64kEaVgZv" \
--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\": \"a52e14cf-0559-3266-8f56-5933bf7387e4\",
\"customer_id\": \"e1df8602-132f-3393-a981-c9ae3952e62b\",
\"work_id\": \"132d4e49-4fb1-3fea-927d-a0367ca5b2f4\",
\"status\": \"Example Status\",
\"protest_date\": \"2024-01-01\",
\"bank_account_id\": \"83b4d538-3a74-33d2-98dc-72167c81b921\",
\"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 6De83dPc15fabh64kEaVgZv",
"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": "a52e14cf-0559-3266-8f56-5933bf7387e4",
"customer_id": "e1df8602-132f-3393-a981-c9ae3952e62b",
"work_id": "132d4e49-4fb1-3fea-927d-a0367ca5b2f4",
"status": "Example Status",
"protest_date": "2024-01-01",
"bank_account_id": "83b4d538-3a74-33d2-98dc-72167c81b921",
"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 4a3VEv8Za6Pgkch1fd6Deb5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"fiscal_document_id\": \"corrupti\",
\"installment_ids\": [
\"fugiat\"
],
\"payment_method\": \"outro\",
\"work_id\": \"sapiente\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/import-nfe"
);
const headers = {
"Authorization": "Bearer 4a3VEv8Za6Pgkch1fd6Deb5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"fiscal_document_id": "corrupti",
"installment_ids": [
"fugiat"
],
"payment_method": "outro",
"work_id": "sapiente"
};
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/eum/history" \
--header "Authorization: Bearer 1bveZ5dakD63cgEh4af8PV6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/eum/history"
);
const headers = {
"Authorization": "Bearer 1bveZ5dakD63cgEh4af8PV6",
"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/tempora" \
--header "Authorization: Bearer bZEV61ve84g653aDhkfcadP" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/tempora"
);
const headers = {
"Authorization": "Bearer bZEV61ve84g653aDhkfcadP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "51bae03a-c27e-3781-b7d9-7682dde43538",
"code": null,
"type": "entrada",
"payment_method": "boleto",
"amount": 938.45,
"due_date": "2026-09-05T03:00:00.000000Z",
"status": null,
"payment_date": null,
"protest_date": null,
"paid_amount": null,
"interest_amount": null,
"penalty_amount": null,
"notary_fee_amount": null,
"description": "Nesciunt temporibus omnis blanditiis qui rerum harum dolores sit et officia.",
"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": "quis",
"field2": 81,
"field3": true,
"notes": "Ipsam et fugit animi qui voluptatem maxime.",
"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/fuga" \
--header "Authorization: Bearer cb3Dgha41Ek865d6ZaePVvf" \
--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\": \"8a4b85f6-2b5a-3bff-bc75-21c213e12a3b\",
\"customer_id\": \"3d1e8c0d-bd36-3489-8146-3d90a974b104\",
\"work_id\": \"8896f747-0608-3f86-97ea-f85fc2ceeeaa\",
\"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\": \"221f72a9-2eab-34f9-8358-0fb715fa1386\",
\"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/fuga"
);
const headers = {
"Authorization": "Bearer cb3Dgha41Ek865d6ZaePVvf",
"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": "8a4b85f6-2b5a-3bff-bc75-21c213e12a3b",
"customer_id": "3d1e8c0d-bd36-3489-8146-3d90a974b104",
"work_id": "8896f747-0608-3f86-97ea-f85fc2ceeeaa",
"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": "221f72a9-2eab-34f9-8358-0fb715fa1386",
"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/et" \
--header "Authorization: Bearer d1aVbDZge435k8af6cvEP6h" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/et"
);
const headers = {
"Authorization": "Bearer d1aVbDZge435k8af6cvEP6h",
"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\": \"lambert.rohan@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": "lambert.rohan@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 v6agkd64hDcaP3bEZ1e8fV5" \
--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 v6agkd64hDcaP3bEZ1e8fV5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "22185f67-d843-3fba-8016-c121f58658a7",
"name": "Mr. Price O'Conner",
"username": "xratke",
"email": "sromaguera@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 a1VD658adfeZ4bvhc6Eg3kP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"blair.pfannerstill\",
\"password\": \"password123\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"147972e9-d6f1-36f1-a1d5-9c867980a39f\"
],
\"roles\": [
\"f0e3ffd4-d199-3c1d-94b5-c8cf87d6d7c6\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/user"
);
const headers = {
"Authorization": "Bearer a1VD658adfeZ4bvhc6Eg3kP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "blair.pfannerstill",
"password": "password123",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"147972e9-d6f1-36f1-a1d5-9c867980a39f"
],
"roles": [
"f0e3ffd4-d199-3c1d-94b5-c8cf87d6d7c6"
]
};
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 1Z54db6ckehVfa8aE3Dvg6P" \
--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 1Z54db6ckehVfa8aE3Dvg6P",
"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 4c65heb8vaVdgEa1Zf6k3PD" \
--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 4c65heb8vaVdgEa1Zf6k3PD",
"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 4Vecbva6adg135hPEZkf68D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"key\": \"wfoqdsrn\",
\"value\": []
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/preferences"
);
const headers = {
"Authorization": "Bearer 4Vecbva6adg135hPEZkf68D",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"key": "wfoqdsrn",
"value": []
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Preference saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete user preference
requires authentication No specific permission required
Delete a specific user preference
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/auth/preferences/quam" \
--header "Authorization: Bearer 6ebgahav56VcEDZ14f83dkP" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/auth/preferences/quam"
);
const headers = {
"Authorization": "Bearer 6ebgahav56VcEDZ14f83dkP",
"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 ab1gefD6d8a6P5hckEZ34vV" \
--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 ab1gefD6d8a6P5hckEZ34vV",
"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 k6E8g5havdVP6bfD3c1ae4Z" \
--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 k6E8g5havdVP6bfD3c1ae4Z",
"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/et" \
--header "Authorization: Bearer gfkZ6h14V8Dd5PaecEba6v3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/transfers/et"
);
const headers = {
"Authorization": "Bearer gfkZ6h14V8Dd5PaecEba6v3",
"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/13/deposit" \
--header "Authorization: Bearer 36dE6eD1hg8aPcZbV5fva4k" \
--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/13/deposit"
);
const headers = {
"Authorization": "Bearer 36dE6eD1hg8aPcZbV5fva4k",
"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/4/withdraw" \
--header "Authorization: Bearer bh3aVvPZ6da8kf4e5c6gD1E" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"amount\": 1,
\"description\": \"Example Description\",
\"transaction_date\": \"2024-01-01\",
\"transaction_category_id\": \"Example Transaction category id\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/4/withdraw"
);
const headers = {
"Authorization": "Bearer bh3aVvPZ6da8kf4e5c6gD1E",
"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 cek4Evdgb53fa6DVZ8ah1P6" \
--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 cek4Evdgb53fa6DVZ8ah1P6",
"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 hafV1354PkEaeDdZ6bc6v8g" \
--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 hafV1354PkEaeDdZ6bc6v8g",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "7c9b9fd3-fdf0-3974-bd58-47f68e219ef2",
"agency": "9419",
"account": "0613240-3",
"type": "caixa",
"balance": 7674.22,
"holder_type": "pj",
"alias": "reiciendis",
"limit": 2611.79,
"available_balance": 10286.01,
"used_limit": 0,
"available_limit": 2611.79,
"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 Vvaehc6fPE61gk5D8Zb43da" \
--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 Vvaehc6fPE61gk5D8Zb43da",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "f59446cc-39e7-33c1-a518-0fbb6d02f748",
"agency": "3688",
"account": "1470483-2",
"type": "caixa",
"balance": 9319.39,
"holder_type": "pf",
"alias": "alias",
"limit": 3638.47,
"available_balance": 12957.859999999999,
"used_limit": 0,
"available_limit": 3638.47,
"is_default": null,
"default_payment_method": null,
"bank": {
"id": null,
"name": null,
"code": null
},
"created_at": null,
"updated_at": null
},
{
"id": "51851217-3d01-3092-9d4a-29b98ad53d3c",
"agency": "4697",
"account": "9611009-8",
"type": "caixa",
"balance": 3585.59,
"holder_type": "pj",
"alias": "at",
"limit": 4558.41,
"available_balance": 8144,
"used_limit": 0,
"available_limit": 4558.41,
"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 fa16Pd4V35kvEec6DahZbg8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"agency\": \"Example Agency\",
\"account\": \"2111380-1\",
\"bank_id\": \"04938a19-6d7a-37ea-b32a-dea6ad596dbb\",
\"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 fa16Pd4V35kvEec6DahZbg8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"agency": "Example Agency",
"account": "2111380-1",
"bank_id": "04938a19-6d7a-37ea-b32a-dea6ad596dbb",
"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/18" \
--header "Authorization: Bearer eh65cD4kPbfEv1dV3a8g6aZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"agency\": \"Example Agency\",
\"account\": \"4476425-4\",
\"bank_id\": \"14e25f45-1958-3ed9-beda-9ada3ed89b9f\",
\"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/18"
);
const headers = {
"Authorization": "Bearer eh65cD4kPbfEv1dV3a8g6aZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"agency": "Example Agency",
"account": "4476425-4",
"bank_id": "14e25f45-1958-3ed9-beda-9ada3ed89b9f",
"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/7" \
--header "Authorization: Bearer 5k8Db6dZh41aaEegvf63cVP" \
--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 5k8Db6dZh41aaEegvf63cVP",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "0a78532b-b1f8-36b5-8419-0de523a73561",
"agency": "2607",
"account": "5759873-6",
"type": "caixa",
"balance": 74.77,
"holder_type": "pj",
"alias": "unde",
"limit": 9513.45,
"available_balance": 9588.220000000001,
"used_limit": 0,
"available_limit": 9513.45,
"is_default": null,
"default_payment_method": null,
"bank": {
"id": null,
"name": null,
"code": null
},
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete bank account
requires authentication bank-account delete
Delete a bank account
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/11" \
--header "Authorization: Bearer 8dhD6Ev541k3eVagfcbPZa6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/11"
);
const headers = {
"Authorization": "Bearer 8dhD6Ev541k3eVagfcbPZa6",
"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/20/statements/summary" \
--header "Authorization: Bearer vZe615E4d6chbVkDPgfa83a" \
--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/20/statements/summary"
);
const headers = {
"Authorization": "Bearer vZe615E4d6chbVkDPgfa83a",
"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/6/statements" \
--header "Authorization: Bearer EV6v3P1Da8da5keZbgf6ch4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"explicabo\",
\"sort_desc\": true,
\"page\": 26,
\"per_page\": 2,
\"q\": \"qnghu\",
\"type\": \"ajuste saída\",
\"date_start\": \"2026-08-12T08:24:42\",
\"date_end\": \"2066-09-20\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/6/statements"
);
const headers = {
"Authorization": "Bearer EV6v3P1Da8da5keZbgf6ch4",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "explicabo",
"sort_desc": true,
"page": 26,
"per_page": 2,
"q": "qnghu",
"type": "ajuste saída",
"date_start": "2026-08-12T08:24:42",
"date_end": "2066-09-20"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"type": null,
"amount": null,
"balance_after": null,
"description": null,
"date": null,
"statement_date": null,
"created_at": null,
"updated_at": null
},
{
"id": null,
"type": null,
"amount": null,
"balance_after": null,
"description": null,
"date": null,
"statement_date": null,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show bank statement
requires authentication bank-statement show
Show a specific statement entry
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/bank-accounts/20/statements/eum" \
--header "Authorization: Bearer agk56dVEvb348hP1cZDef6a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/bank-accounts/20/statements/eum"
);
const headers = {
"Authorization": "Bearer agk56dVEvb348hP1cZDef6a",
"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 6gP3k5Dv8VeahZ6baE14dfc" \
--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 6gP3k5Dv8VeahZ6baE14dfc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "58ea85cd-94f1-38c2-880d-e1fc2e11ce25",
"name": "Zambrano e Filhos",
"code": "676"
},
{
"id": "762a8ae6-daad-35fe-bd9a-a980c89feede",
"name": "Valentin-Sepúlveda",
"code": "268"
}
],
"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 Zfad34c5b6ek16h8aPDgEvV" \
--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 Zfad34c5b6ek16h8aPDgEvV",
"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 ae61avE56kDVdhc3bP48gfZ" \
--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 ae61avE56kDVdhc3bP48gfZ",
"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 kZghvafbd5c8VDea34P16E6" \
--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 kZghvafbd5c8VDea34P16E6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "5e37f19b-c0b1-3d50-8f6f-fe84c39adb9f",
"name": "Azevedo e Vasques",
"code": "661"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 5bD4ehk6v3P6afgZ1E8Vacd" \
--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 5bD4ehk6v3P6afgZ1E8Vacd",
"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 ca6Zhd6PgeE18Vvf4b3a5kD" \
--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 ca6Zhd6PgeE18Vvf4b3a5kD",
"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=Id+ab+itaque+sed+ut.&categories[]=sed&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=fuga&customers[]=et&suppliers[]=reprehenderit&works[]=est" \
--header "Authorization: Bearer ac63d461hvDgf5bakVE8eZP" \
--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": "Id ab itaque sed ut.",
"categories[0]": "sed",
"date_start": "2021-01-01",
"date_end": "2021-01-31",
"bank_accounts[0]": "fuga",
"customers[0]": "et",
"suppliers[0]": "reprehenderit",
"works[0]": "est",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ac63d461hvDgf5bakVE8eZP",
"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=Quo+cupiditate+quibusdam+laboriosam+quia.&categories[]=fuga&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=ducimus&customers[]=quas&suppliers[]=adipisci&works[]=aut" \
--header "Authorization: Bearer P4fcZ6k5Va8habed1vg3E6D" \
--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": "Quo cupiditate quibusdam laboriosam quia.",
"categories[0]": "fuga",
"date_start": "2021-01-01",
"date_end": "2021-01-31",
"bank_accounts[0]": "ducimus",
"customers[0]": "quas",
"suppliers[0]": "adipisci",
"works[0]": "aut",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer P4fcZ6k5Va8habed1vg3E6D",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "79ba9a2b-7308-3664-9ae2-197eb275255b",
"code": "FC-80571598",
"type": "tarifa",
"amount": -4036.35,
"description": "Pariatur excepturi modi hic molestiae commodi aut qui quia.",
"transaction_date": "1978-04-20T03:00:00.000000Z",
"transaction_category": {
"id": null,
"name": null,
"type": null
},
"created_at": null,
"updated_at": null
},
{
"id": "d0b862c9-2cab-33ba-b86a-8c385bd4c565",
"code": "FC-27443041",
"type": "pagamento",
"amount": -1159.42,
"description": "Nesciunt et soluta eius voluptatem blanditiis ut.",
"transaction_date": "1989-09-07T03: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 e5a6f8kbZaDdhEvcg6413VP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"Example Type\",
\"cash_session_id\": \"c4460630-ae28-38ac-81ca-ab9a80c5559d\",
\"transaction_category_id\": \"58baac77-1e42-3fea-a82f-274e9b23832f\",
\"bank_account_id\": \"937f4855-e335-3a60-86c7-3c5240ecf8af\",
\"customer_id\": \"0ff5cbc4-baa8-3ed1-b0ab-431c3d1da4ba\",
\"supplier_id\": \"5e420a22-c5da-3d55-bd4c-ac184f373005\",
\"work_id\": \"b697e108-04bb-330f-bb89-72b4ae1760f8\",
\"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 e5a6f8kbZaDdhEvcg6413VP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "Example Type",
"cash_session_id": "c4460630-ae28-38ac-81ca-ab9a80c5559d",
"transaction_category_id": "58baac77-1e42-3fea-a82f-274e9b23832f",
"bank_account_id": "937f4855-e335-3a60-86c7-3c5240ecf8af",
"customer_id": "0ff5cbc4-baa8-3ed1-b0ab-431c3d1da4ba",
"supplier_id": "5e420a22-c5da-3d55-bd4c-ac184f373005",
"work_id": "b697e108-04bb-330f-bb89-72b4ae1760f8",
"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/20" \
--header "Authorization: Bearer 1fkc56d6VebEDv38aaPg4Zh" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/20"
);
const headers = {
"Authorization": "Bearer 1fkc56d6VebEDv38aaPg4Zh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "84178cfb-504a-3d54-a9d7-f53cd54d3f55",
"code": "FC-16631964",
"type": "pagamento",
"amount": -3541.13,
"description": "Sequi non quos voluptatem provident rerum.",
"transaction_date": "2009-07-27T03: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/13" \
--header "Authorization: Bearer Va6Zahv36cge8P4E15kfbdD" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"Example Type\",
\"cash_session_id\": \"1f001b14-0884-37bf-802f-3a98827d330a\",
\"transaction_category_id\": \"c0ceffc6-660a-30d0-9a9a-c5d4603b0e3c\",
\"bank_account_id\": \"34a8b735-1fb3-3ccf-b591-402c8e51b8b2\",
\"customer_id\": \"c55a6d53-6612-3971-9d8f-8e7e883db451\",
\"supplier_id\": \"e248bf83-ccde-3f57-958e-7a6ca3446d4c\",
\"work_id\": \"7f340bdc-1acc-372d-9b6e-527b22b6643b\",
\"amount\": 1,
\"description\": \"Example Description\",
\"transaction_date\": \"2024-01-01\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/13"
);
const headers = {
"Authorization": "Bearer Va6Zahv36cge8P4E15kfbdD",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "Example Type",
"cash_session_id": "1f001b14-0884-37bf-802f-3a98827d330a",
"transaction_category_id": "c0ceffc6-660a-30d0-9a9a-c5d4603b0e3c",
"bank_account_id": "34a8b735-1fb3-3ccf-b591-402c8e51b8b2",
"customer_id": "c55a6d53-6612-3971-9d8f-8e7e883db451",
"supplier_id": "e248bf83-ccde-3f57-958e-7a6ca3446d4c",
"work_id": "7f340bdc-1acc-372d-9b6e-527b22b6643b",
"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/10" \
--header "Authorization: Bearer acgvhDb6d85Ee4PkZ6f13Va" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-flows/10"
);
const headers = {
"Authorization": "Bearer acgvhDb6d85Ee4PkZ6f13Va",
"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 6VbhaP386ca1E5dZgvf4kDe" \
--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 6VbhaP386ca1E5dZgvf4kDe",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "553d45df-b915-3c0f-9d18-dc392bbdf4ec",
"code": null,
"opened_by": null,
"opened_at": "2003-10-07T13:00:49.000000Z",
"closed_by": null,
"closed_at": "1997-09-26T19:33:23.000000Z",
"opening_balance": 2008.29,
"closing_balance": 8142.08,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Aberto",
"hasSnapshot": false,
"created_at": "2020-03-16T06:20:48.000000Z",
"updated_at": "2005-05-15T23:51:51.000000Z"
},
{
"id": "d3c9ef87-2caf-37c1-b690-faeef0ecfcf4",
"code": null,
"opened_by": null,
"opened_at": "2001-06-30T08:30:31.000000Z",
"closed_by": null,
"closed_at": "1991-04-09T12:30:18.000000Z",
"opening_balance": 7234.6,
"closing_balance": 1448.02,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Aberto",
"hasSnapshot": false,
"created_at": "2026-07-30T22:46:54.000000Z",
"updated_at": "2006-10-01T07:58:03.000000Z"
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Open cash session
requires authentication cash-session open
Open a new cash session
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/open" \
--header "Authorization: Bearer c5haf3E4ZPdka6g6DV81evb" \
--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 c5haf3E4ZPdka6g6DV81evb",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "7ba3b98c-1de9-37d8-9a44-f9925ab177dd",
"code": null,
"opened_by": null,
"opened_at": "2008-04-05T03:13:35.000000Z",
"closed_by": null,
"closed_at": "1972-10-06T14:05:15.000000Z",
"opening_balance": 1751.89,
"closing_balance": 976.76,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Fechado",
"hasSnapshot": false,
"created_at": "2011-08-22T20:53:14.000000Z",
"updated_at": "1977-01-08T08:50:27.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/a700e661-ee29-3de4-8a56-1dcc24cba564" \
--header "Authorization: Bearer 85EPavV4efb6dZ1c6kgDha3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/close/a700e661-ee29-3de4-8a56-1dcc24cba564"
);
const headers = {
"Authorization": "Bearer 85EPavV4efb6dZ1c6kgDha3",
"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/df5d1146-8004-33f9-aac0-d45909df2047/account-snapshot" \
--header "Authorization: Bearer D36Pc1Zfbvhd64eaEkg58aV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/df5d1146-8004-33f9-aac0-d45909df2047/account-snapshot"
);
const headers = {
"Authorization": "Bearer D36Pc1Zfbvhd64eaEkg58aV",
"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/d9ef6d68-6143-3a83-be8c-40ca70182a9d" \
--header "Authorization: Bearer 1DfcVZ6536Phg8ea4kvdbEa" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/d9ef6d68-6143-3a83-be8c-40ca70182a9d"
);
const headers = {
"Authorization": "Bearer 1DfcVZ6536Phg8ea4kvdbEa",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "46f4fcf6-080e-345b-a571-66b114e6452f",
"code": null,
"opened_by": null,
"opened_at": "2017-10-13T09:31:21.000000Z",
"closed_by": null,
"closed_at": "2026-07-09T10:05:16.000000Z",
"opening_balance": 2383.99,
"closing_balance": 9107.15,
"total_income": 0,
"total_expense": 0,
"total_balance": 0,
"status": "Aberto",
"hasSnapshot": false,
"created_at": "2010-08-09T12:36:34.000000Z",
"updated_at": "1995-06-02T01:57:20.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/020c9c55-5515-3fed-921d-c22c062a9137" \
--header "Authorization: Bearer 3bdv5hDa6gkac8f1Z6eE4PV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/cash-sessions/020c9c55-5515-3fed-921d-c22c062a9137"
);
const headers = {
"Authorization": "Bearer 3bdv5hDa6gkac8f1Z6eE4PV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Contracts
Endpoints for managing work contracts
List contracts
requires authentication contract index
List all work contracts
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/contracts" \
--header "Authorization: Bearer Z4Pcd6b8afDke6EvVhg3a51" \
--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\": \"f83a7e02-adc6-3a83-9d17-2ca2f0850dc2\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts"
);
const headers = {
"Authorization": "Bearer Z4Pcd6b8afDke6EvVhg3a51",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "Example Sort by",
"sort_desc": true,
"page": 1,
"per_page": 1,
"work_id": "f83a7e02-adc6-3a83-9d17-2ca2f0850dc2"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "8ebc8b51-f8a3-3c2b-9f09-35d1c93f24bb",
"number": "950/2026",
"started_at": "2026-08-12",
"deadline_at": "2027-08-12",
"work": {
"id": "a27bfbbe-7722-4066-b729-2346800f9de2",
"name": "Dr. Kelly Vasques Furtado"
},
"created_at": null,
"updated_at": null
},
{
"id": "8eb2148d-69b0-3d15-8883-f32e7f6749b6",
"number": "407/2026",
"started_at": "2026-08-12",
"deadline_at": "2027-08-12",
"work": {
"id": "a27bfbbe-863b-4b0c-bdbe-f3193d22713a",
"name": "Sra. Pietra Prado"
},
"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 6VEZ4acevPk8g3a6f1bDh5d" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"work_id\": \"337d369a-eb01-39f2-8c0b-4644e9b34801\",
\"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 6VEZ4acevPk8g3a6f1bDh5d",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"work_id": "337d369a-eb01-39f2-8c0b-4644e9b34801",
"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/10" \
--header "Authorization: Bearer Ea4VgPkf58ed6vh1b6cD3aZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts/10"
);
const headers = {
"Authorization": "Bearer Ea4VgPkf58ed6vh1b6cD3aZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "fdb53e22-13d7-3531-889f-2fd01b1f705d",
"number": "582/2026",
"started_at": "2026-08-12",
"deadline_at": "2027-08-12",
"work": {
"id": "a27bfbbe-953a-4c21-acab-14ef1e7d8ac0",
"name": "Sr. Luis Rivera"
},
"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/2" \
--header "Authorization: Bearer f1Zach3de5VDgE6a68bPk4v" \
--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/2"
);
const headers = {
"Authorization": "Bearer f1Zach3de5VDgE6a68bPk4v",
"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/numquam" \
--header "Authorization: Bearer edaacvfD631gkEb6hVP48Z5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/contracts/numquam"
);
const headers = {
"Authorization": "Bearer edaacvfD631gkEb6hVP48Z5",
"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 hDbVEdPv34gkZa668fa15ce" \
--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 hDbVEdPv34gkZa668fa15ce",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "5569b7a2-7ddf-3d39-9c33-31d859faa01f",
"name": "Dr. Constância Assunção Jr.",
"email": "santana.benicio@example.com",
"phone": "(96) 97200-3121",
"document": "401.687.221-94",
"type": "pf",
"responsible": "Katherine Saito Lira 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": "73b2aed9-b838-374e-8e9d-69249391c18c",
"name": "Sônia de Oliveira Jr.",
"email": "colaco.horacio@example.net",
"phone": "(98) 90665-7574",
"document": "260.208.313-53",
"type": "pf",
"responsible": "Sra. Marília Rosa Carvalho",
"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 vbV6e5PDac1Ekdgh43f6a8Z" \
--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 vbV6e5PDac1Ekdgh43f6a8Z",
"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/10" \
--header "Authorization: Bearer D6gE58Z6khVP3ea1avfdcb4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/customers/10"
);
const headers = {
"Authorization": "Bearer D6gE58Z6khVP3ea1avfdcb4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "955e51d8-6c50-3228-8abb-f501eb2cf040",
"name": "Dr. Luis Benez",
"email": "maicon.caldeira@example.net",
"phone": "(64) 4540-8242",
"document": "437.792.018-95",
"type": "pj",
"responsible": "Benício Azevedo Lira",
"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/11" \
--header "Authorization: Bearer fg8ePDa465kh6E3Z1cVvbad" \
--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/11"
);
const headers = {
"Authorization": "Bearer fg8ePDa465kh6E3Z1cVvbad",
"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 5f6ak14V3vcEZ6PgdDehba8" \
--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 5f6ak14V3vcEZ6PgdDehba8",
"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 a3Z66evk8fdDhP4cV1gEa5b" \
--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\": \"92ac421b-98da-301a-9496-ad02f22df3ac\",
\"contract_id\": \"9462e6f5-6a09-3ca4-89fe-6551d1b60430\",
\"status_id\": \"dae9cc74-db86-30b3-89ed-3d84fa8120c1\",
\"filled_by\": \"65da1c2b-f814-3fd6-95bb-af7baaeea156\",
\"responsible_id\": \"b28ed772-903f-3d33-a64f-da1c578d1790\",
\"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 a3Z66evk8fdDhP4cV1gEa5b",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "Example Sort by",
"sort_desc": true,
"page": 1,
"per_page": 1,
"work_id": "92ac421b-98da-301a-9496-ad02f22df3ac",
"contract_id": "9462e6f5-6a09-3ca4-89fe-6551d1b60430",
"status_id": "dae9cc74-db86-30b3-89ed-3d84fa8120c1",
"filled_by": "65da1c2b-f814-3fd6-95bb-af7baaeea156",
"responsible_id": "b28ed772-903f-3d33-a64f-da1c578d1790",
"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": "e10f82e5-fd0b-393f-852b-67a62b53e40c",
"code": "RDO-001",
"report_number": 1,
"date": "2026-08-12",
"status": {
"id": "a27bfbbe-fabc-4b18-8a3a-9fff295311ea",
"slug": null,
"name": null,
"abbreviation": "quas",
"color": "#40aaf4",
"text_color": "#853afd"
},
"work": {
"id": "a27bfbbe-ecaf-42e8-92ab-2841ca5e2a84",
"name": "Norma Suelen Santacruz",
"started_at": "1985-01-01 02:01:51"
},
"filled_by": {
"id": "a27bfbbe-f573-4950-a719-7286ce172f68",
"name": "Karianne Towne"
},
"contract_number": "487/2026",
"deadline_at": "2027-08-12",
"technical_responsible": {
"name": null,
"certification": null,
"crea": null
},
"activities": [],
"occurrences": null,
"next_day_forecast": null,
"finalized_at": null,
"content_hash": null,
"gov_br_validation_url": null,
"created_at": null,
"updated_at": null
},
{
"id": "7dddc8dd-b4d4-3e47-8153-6326f43ed050",
"code": "RDO-001",
"report_number": 1,
"date": "2026-08-12",
"status": {
"id": "a27bfbbf-0bf5-43f5-a089-0df00e84cf6b",
"slug": null,
"name": null,
"abbreviation": "fuga",
"color": "#c5adee",
"text_color": "#ccaefd"
},
"work": {
"id": "a27bfbbf-04b3-4ba1-ad56-76354a4fd949",
"name": "Eloah Arruda",
"started_at": "1990-03-06 23:54:58"
},
"filled_by": {
"id": "a27bfbbf-09b9-496b-86c8-3a9bf750f038",
"name": "Mr. Judson Sauer PhD"
},
"contract_number": "973/2026",
"deadline_at": "2027-08-12",
"technical_responsible": {
"name": null,
"certification": null,
"crea": null
},
"activities": [],
"occurrences": null,
"next_day_forecast": null,
"finalized_at": null,
"content_hash": null,
"gov_br_validation_url": null,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Pending RDO days
requires authentication daily-log index
List the days in a period that have no RDO for a given work
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/daily-logs/pending-days" \
--header "Authorization: Bearer k8P14ev3gEa65bZDcVfa6hd" \
--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 k8P14ev3gEa65bZDcVfa6hd",
"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/expedita" \
--header "Authorization: Bearer aZfbe351VcDhE6akPg48d6v" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/expedita"
);
const headers = {
"Authorization": "Bearer aZfbe351VcDhE6akPg48d6v",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "644f515c-14f8-303d-9628-f93e337f02ec",
"code": "RDO-001",
"report_number": 1,
"date": "2026-08-12",
"status": {
"id": "a27bfbbf-252f-4723-b7fd-6c6b5a4393a4",
"slug": null,
"name": null,
"abbreviation": "dignissimos",
"color": "#4cde55",
"text_color": "#c791a0"
},
"work": {
"id": "a27bfbbf-1cbc-4d9a-9bc5-6827d04b95f0",
"name": "Samara Melina Leal Sobrinho",
"started_at": "2025-08-31 13:26:34"
},
"filled_by": {
"id": "a27bfbbf-22c7-4002-be8a-e30bb99869aa",
"name": "Cameron Roob"
},
"contract_number": "424/2026",
"deadline_at": "2027-08-12",
"technical_responsible": {
"name": null,
"certification": null,
"crea": null
},
"activities": [],
"occurrences": null,
"next_day_forecast": null,
"finalized_at": null,
"content_hash": null,
"gov_br_validation_url": null,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create daily log
requires authentication daily-log store
Open a new daily work report (RDO) for a work
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/daily-logs" \
--header "Authorization: Bearer dk13DgZ5aeVcvEPh4b6a86f" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"contract_id\": \"Example Contract id\",
\"date\": \"2024-01-01\",
\"status_id\": \"9f2fe86f-573e-3117-9cff-6eb4e4d558e0\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs"
);
const headers = {
"Authorization": "Bearer dk13DgZ5aeVcvEPh4b6a86f",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"contract_id": "Example Contract id",
"date": "2024-01-01",
"status_id": "9f2fe86f-573e-3117-9cff-6eb4e4d558e0"
};
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/quia" \
--header "Authorization: Bearer Vdbac1ZPaf3vD48g5h6e6kE" \
--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\": \"933d7cac-507a-48a9-9533-768ff4d2e571\",
\"quantity\": 1
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/quia"
);
const headers = {
"Authorization": "Bearer Vdbac1ZPaf3vD48g5h6e6kE",
"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": "933d7cac-507a-48a9-9533-768ff4d2e571",
"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/quasi/finalize" \
--header "Authorization: Bearer 6VDa8eP4k3vfc6ahE5dZbg1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/quasi/finalize"
);
const headers = {
"Authorization": "Bearer 6VDa8eP4k3vfc6ahE5dZbg1",
"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/voluptatem/signed-document" \
--header "Authorization: Bearer agk36EVeDdcf5h6P8Z1av4b" \
--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/voluptatem/signed-document"
);
const headers = {
"Authorization": "Bearer agk36EVeDdcf5h6P8Z1av4b",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"path": "Example Path",
"name": "Example Name",
"size": "Example Size",
"extension": "Example Extension",
"gov_br_validation_url": "https:\/\/example.com"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": "object"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Attach photos
requires authentication daily-log update
Attach photographs (already uploaded to storage) to a draft RDO
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/daily-logs/eos/photos" \
--header "Authorization: Bearer be8a613chkEv54ZfDadP6gV" \
--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/eos/photos"
);
const headers = {
"Authorization": "Bearer be8a613chkEv54ZfDadP6gV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"photos": [
{
"path": "Example Photos * path",
"name": "Example Name",
"size": "Example Photos * size",
"extension": "Example Photos * extension",
"caption": "Example Photos * caption"
},
null
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": "object"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update photo caption
requires authentication daily-log update
Update the caption of a photo in a draft RDO
Example request:
curl --request PATCH \
"https://api.bs-homolog.pensou.app.br/api/daily-logs/et/photos/consectetur" \
--header "Authorization: Bearer hPvb66Ee3185caDagZf4dkV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"caption\": \"Example Caption\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/et/photos/consectetur"
);
const headers = {
"Authorization": "Bearer hPvb66Ee3185caDagZf4dkV",
"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/dolores/photos/est" \
--header "Authorization: Bearer 38aPag4fdDcbvh66Vk5E1Ze" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/dolores/photos/est"
);
const headers = {
"Authorization": "Bearer 38aPag4fdDcbvh66Vk5E1Ze",
"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/error" \
--header "Authorization: Bearer bvcf4ka631ehV8gE6aDd5PZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/daily-logs/error"
);
const headers = {
"Authorization": "Bearer bvcf4ka631ehV8gE6aDd5PZ",
"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 aZcgDEfV4Pvkh6bd36815ae" \
--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 aZcgDEfV4Pvkh6bd36815ae",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "400568b6-1a2d-3b0b-a179-d65c576fb5cd",
"name": "Alias",
"code": "ZWT",
"description": "Quod sint ipsa vel quod facere culpa autem.",
"active": true
},
{
"id": "9675d588-b5ab-3b7d-b72f-6f6dcc0637e0",
"name": "Sed",
"code": "MKP",
"description": "Quia nihil quis reiciendis amet consequuntur quam enim.",
"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 v8Ped1Z6Dag36f5hcbVk4Ea" \
--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 v8Ped1Z6Dag36f5hcbVk4Ea",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "609858fc-2ab5-39b9-8b8d-c57e8e30b32f",
"name": "Quis",
"code": "KEQ",
"description": "Nemo autem cupiditate sint molestias accusamus facilis.",
"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 Vvcbfe5h6dZ14Pa38gak6DE" \
--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 Vvcbfe5h6dZ14Pa38gak6DE",
"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 fkaP468a53dDbV6he1cgvZE" \
--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 fkaP468a53dDbV6he1cgvZE",
"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/aut" \
--header "Authorization: Bearer b6PZv8acg1EVdakh34D65ef" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/disciplines/aut"
);
const headers = {
"Authorization": "Bearer b6PZv8acg1EVdakh34D65ef",
"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 4PhgdkbVaZE686v3caefD15" \
--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 4PhgdkbVaZE686v3caefD15",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "15617f9a-4188-348d-b7d1-d39ed677456a",
"name": "Vinícius Fidalgo Filho",
"description": "Excepturi at unde ratione et. Qui recusandae ipsum et occaecati et. Quas provident nisi est nemo doloremque.",
"module": "document"
},
{
"id": "96305dca-aec5-319b-8309-abfc4c883121",
"name": "Dr. Daiana Rivera Romero",
"description": "Dolores sit et rerum ipsam modi. Fuga reiciendis repellendus ad sed doloribus explicabo. Quae saepe et dignissimos sunt aut.",
"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/odio" \
--header "Authorization: Bearer 6P4hfbEcZ83ek5av6gV1aDd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/document-categories/odio"
);
const headers = {
"Authorization": "Bearer 6P4hfbEcZ83ek5av6gV1aDd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "05db6d78-57f7-3280-9215-e0d1f3a6a811",
"name": "Dr. Alonso Luan Guerra Sobrinho",
"description": "Similique nulla eveniet placeat perferendis. Fugit nisi enim exercitationem ut.",
"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 DZkav8d4cPfaV3gb56Ee16h" \
--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 DZkav8d4cPfaV3gb56Ee16h",
"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/maxime" \
--header "Authorization: Bearer e3kf86Dv6aVPZacg4hE15bd" \
--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/maxime"
);
const headers = {
"Authorization": "Bearer e3kf86Dv6aVPZacg4hE15bd",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"module": "Example Module"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete document category
requires authentication document-category delete
Delete a document category
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/document-categories/aut" \
--header "Authorization: Bearer fha6Z4V5a1Db3veP8cgdk6E" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/document-categories/aut"
);
const headers = {
"Authorization": "Bearer fha6Z4V5a1Db3veP8cgdk6E",
"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[]=perspiciatis&documentable_type=culpa&customers[]=nesciunt&suppliers[]=sed" \
--header "Authorization: Bearer bE5V6cvkD6aa4P1d3hfge8Z" \
--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]": "perspiciatis",
"documentable_type": "culpa",
"customers[0]": "nesciunt",
"suppliers[0]": "sed",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer bE5V6cvkD6aa4P1d3hfge8Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "b9854b52-a274-3a71-8307-5f5eb3dd0a96",
"name": "Michelle Zamana Ferraz",
"file": {
"id": null,
"url": null,
"extension": null
},
"created_at": null,
"updated_at": null
},
{
"id": "01c9b2b7-8089-3230-83d6-3758550658ed",
"name": "Dr. Pedro Sales Arruda",
"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/8" \
--header "Authorization: Bearer aVDdePgkEh51f664Zb8cav3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/documents/8"
);
const headers = {
"Authorization": "Bearer aVDdePgkEh51f664Zb8cav3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "e85e09cc-afb2-3b81-b42a-794ba5d964a2",
"name": "Igor Reis Saraiva",
"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 VZDgck5adPE8av1h6364ebf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"category_id\": \"e848e84d-5913-3159-9590-9fe8f516beca\",
\"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 VZDgck5adPE8av1h6364ebf",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"category_id": "e848e84d-5913-3159-9590-9fe8f516beca",
"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/1" \
--header "Authorization: Bearer cbEd1D65vh4afPZeaV3kg86" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"category_id\": \"2cf6d8cb-954a-399b-a905-a5b9cbaeaeee\",
\"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/1"
);
const headers = {
"Authorization": "Bearer cbEd1D65vh4afPZeaV3kg86",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"category_id": "2cf6d8cb-954a-399b-a905-a5b9cbaeaeee",
"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 afgb663aEZvP8cVh1kD4d5e" \
--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 afgb663aEZvP8cVh1kD4d5e",
"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 a3b8hVEDZdPkg6v6ecf15a4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"dignissimos\",
\"renewal_status\": \"pending\",
\"urgency\": \"expires_30_days\",
\"employee_id\": \"natus\",
\"epi_type_id\": \"in\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals"
);
const headers = {
"Authorization": "Bearer a3b8hVEDZdPkg6v6ecf15a4",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "dignissimos",
"renewal_status": "pending",
"urgency": "expires_30_days",
"employee_id": "natus",
"epi_type_id": "in"
};
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 vZ4DVa8h5Efd6P6a3eb1cgk" \
--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 vZ4DVa8h5Efd6P6a3eb1cgk",
"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/totam/renew" \
--header "Authorization: Bearer dPg5VE1ekh6cvafa34DZ86b" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"quantity\": 1,
\"condition\": \"new\",
\"lot\": \"LOTE-001\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/totam/renew"
);
const headers = {
"Authorization": "Bearer dPg5VE1ekh6cvafa34DZ86b",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quantity": 1,
"condition": "new",
"lot": "LOTE-001"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Ignore EPI renewal
requires authentication employee-epi update
Ignore expiry alerts for an EPI delivery
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/et/ignore" \
--header "Authorization: Bearer EcZPD6a6vd8g5V4akb3feh1" \
--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/et/ignore"
);
const headers = {
"Authorization": "Bearer EcZPD6a6vd8g5V4akb3feh1",
"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/cumque/ignore" \
--header "Authorization: Bearer 6ZPhaDdeg14f3568aVvkcEb" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-renewals/cumque/ignore"
);
const headers = {
"Authorization": "Bearer 6ZPhaDdeg14f3568aVvkcEb",
"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 54kPchaa6VvDE136bedZgf8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"laudantium\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types"
);
const headers = {
"Authorization": "Bearer 54kPchaa6VvDE136bedZgf8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "laudantium"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "84f39a35-6940-39f0-803d-8fa1701ca943",
"name": "doloribus et",
"default_validity_days": 120,
"requires_signature": true,
"created_at": null,
"updated_at": null
},
{
"id": "36dfc259-f6e2-3405-8409-8db07f9010e6",
"name": "rerum nam",
"default_validity_days": 489,
"requires_signature": true,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show EPI type
requires authentication epi show
Show an EPI type
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/epi-types/porro" \
--header "Authorization: Bearer 8eEV13aka4fvdPg66hb5cDZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/porro"
);
const headers = {
"Authorization": "Bearer 8eEV13aka4fvdPg66hb5cDZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "71e3b2c7-653f-34a5-95bd-234cb9d0f324",
"name": "quia molestias",
"default_validity_days": 627,
"requires_signature": 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 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 86dacbhf3DZVg54PEv1eak6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"default_validity_days\": 1,
\"requires_signature\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types"
);
const headers = {
"Authorization": "Bearer 86dacbhf3DZVg54PEv1eak6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"default_validity_days": 1,
"requires_signature": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update EPI type
requires authentication epi update
Update an EPI type
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/epi-types/sequi" \
--header "Authorization: Bearer ZaP36cdEgba5DVf4h8ekv16" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"default_validity_days\": 1,
\"requires_signature\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/sequi"
);
const headers = {
"Authorization": "Bearer ZaP36cdEgba5DVf4h8ekv16",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"default_validity_days": 1,
"requires_signature": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete EPI type
requires authentication epi delete
Delete an EPI type
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/epi-types/consequatur" \
--header "Authorization: Bearer 4DPv6b5Zhdg8a31afc6ekEV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-types/consequatur"
);
const headers = {
"Authorization": "Bearer 4DPv6b5Zhdg8a31afc6ekEV",
"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 1vkDabfchZVa3Pg65E8de64" \
--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 1vkDabfchZVa3Pg65E8de64",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "0e6840dc-7ded-4c08-b6c5-7616a3b1cc78",
"name": "libero",
"description": "In velit quod deleniti vel.",
"created_at": null,
"updated_at": null
},
{
"id": "a650a544-b9b8-4e78-8fc2-5026ce01e7a2",
"name": "quod",
"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/consequatur" \
--header "Authorization: Bearer 4EadZ6bc3f6a5PDekhVgv81" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employee-roles/consequatur"
);
const headers = {
"Authorization": "Bearer 4EadZ6bc3f6a5PDekhVgv81",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "1dd30e8d-2c3c-40a4-8319-ab03c50efd05",
"name": "ipsa",
"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 VPd6a46DE8153aeZkfhbcgv" \
--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 VPd6a46DE8153aeZkfhbcgv",
"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/explicabo" \
--header "Authorization: Bearer Z1cakgvDf34b65aE8hVd6eP" \
--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/explicabo"
);
const headers = {
"Authorization": "Bearer Z1cakgvDf34b65aE8hVd6eP",
"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/a" \
--header "Authorization: Bearer Vkvc56P3aedgfb41ED8hZ6a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employee-roles/a"
);
const headers = {
"Authorization": "Bearer Vkvc56P3aedgfb41ED8hZ6a",
"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 fEZDghba1a4kPc65e8v63dV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"delivery_date\",
\"sort_desc\": true,
\"page\": 72,
\"per_page\": 20,
\"q\": \"voluptate\",
\"employee_id\": \"similique\",
\"has_term\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/epi-terms"
);
const headers = {
"Authorization": "Bearer fEZDghba1a4kPc65e8v63dV",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "delivery_date",
"sort_desc": true,
"page": 72,
"per_page": 20,
"q": "voluptate",
"employee_id": "similique",
"has_term": false
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List employees
requires authentication employee index
List all employees
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employees?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Jo%C3%A3o+Silva" \
--header "Authorization: Bearer DEP6bc1aafegh35Z86kv4dV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "João Silva",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer DEP6bc1aafegh35Z86kv4dV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "3ce534d1-c559-4f4a-a078-cd466e152015",
"name": "Cezar Roque Azevedo",
"cpf": "443.949.945-11",
"rg": "292668880",
"ctps": null,
"phone": null,
"birthdate": "1993-06-27T03:00:00.000000Z",
"email": "benjamin92@example.com",
"pis_pasep": "85096610369",
"admission_date": "1998-03-16T03:00:00.000000Z",
"daily_salary": null,
"monthly_salary": "6696.33",
"nationality": null,
"place_of_birth": null,
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"employee_role": {
"id": "a27bfbbf-e7f9-45fe-9e0b-af031fe6f9e9",
"name": "aliquid"
},
"created_at": null,
"updated_at": null
},
{
"id": "c50d9fce-0f0f-4c47-843f-7c18c9cc91c8",
"name": "Dr. Wesley Santiago Barros Sobrinho",
"cpf": "123.900.581-05",
"rg": "547280762",
"ctps": "002888581",
"phone": "(21) 98287-4492",
"birthdate": "2008-08-11T03:00:00.000000Z",
"email": null,
"pis_pasep": null,
"admission_date": "1985-10-13T03:00:00.000000Z",
"daily_salary": null,
"monthly_salary": "9852.75",
"nationality": null,
"place_of_birth": "Daniella d'Oeste",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"employee_role": {
"id": "a27bfbbf-ee0d-46e7-b5a7-67d48e308c59",
"name": "est"
},
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": "/?page=71",
"next": null
},
"meta": {
"current_page": 72,
"from": 711,
"last_page": 1,
"links": [
{
"url": "/?page=71",
"label": "« Anterior",
"page": 71,
"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": 712,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show employee
requires authentication employee show
Show an employee
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employees/10" \
--header "Authorization: Bearer ZP386bDe5ackh14EvgVa6df" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/10"
);
const headers = {
"Authorization": "Bearer ZP386bDe5ackh14EvgVa6df",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "ef0fb57e-a9a8-4785-8b34-4daa23fc7edd",
"name": "Srta. Giovana Raissa Rocha Sobrinho",
"cpf": "321.515.293-48",
"rg": "364428298",
"ctps": null,
"phone": null,
"birthdate": "2023-07-20T03:00:00.000000Z",
"email": null,
"pis_pasep": "36414175779",
"admission_date": null,
"daily_salary": null,
"monthly_salary": null,
"nationality": "Croácia",
"place_of_birth": "Porto Ian",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"employee_role": {
"id": "a27bfbbf-f9a8-49ed-9de1-0bd57f6cea52",
"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.
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 ZaV1cP6kvfe3Dbhd6ag5E84" \
--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\": \"cade81fa-8785-4325-9085-d7adf50e1088\",
\"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 ZaV1cP6kvfe3Dbhd6ag5E84",
"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": "cade81fa-8785-4325-9085-d7adf50e1088",
"pis_pasep": "Example Pis pasep",
"admission_date": "2024-01-01",
"daily_salary": 1,
"monthly_salary": 1,
"nationality": "Example Nationality",
"place_of_birth": "Example Place of birth",
"address": {
"0": "example1",
"1": "example2",
"street": "Example Address street",
"number": "Example Address number",
"complement": "Example Address complement",
"neighborhood": "Example Address neighborhood",
"city": "Example Address city",
"state": "Example Address state",
"zip_code": "Example Address zip code"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update employee
requires authentication employee update
Update an employee
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/employees/16" \
--header "Authorization: Bearer kDec6abg5V1d4fPZh8E6v3a" \
--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\": \"d696c957-39d7-40b8-9759-e61d9c8ac1ec\",
\"pis_pasep\": \"Example Pis pasep\",
\"admission_date\": \"2024-01-01\",
\"daily_salary\": 1,
\"monthly_salary\": 1,
\"nationality\": \"Example Nationality\",
\"place_of_birth\": \"Example Place of birth\",
\"address\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"street\": \"Example Address street\",
\"number\": \"Example Address number\",
\"complement\": \"Example Address complement\",
\"neighborhood\": \"Example Address neighborhood\",
\"city\": \"Example Address city\",
\"state\": \"Example Address state\",
\"zip_code\": \"Example Address zip code\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/16"
);
const headers = {
"Authorization": "Bearer kDec6abg5V1d4fPZh8E6v3a",
"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": "d696c957-39d7-40b8-9759-e61d9c8ac1ec",
"pis_pasep": "Example Pis pasep",
"admission_date": "2024-01-01",
"daily_salary": 1,
"monthly_salary": 1,
"nationality": "Example Nationality",
"place_of_birth": "Example Place of birth",
"address": {
"0": "example1",
"1": "example2",
"street": "Example Address street",
"number": "Example Address number",
"complement": "Example Address complement",
"neighborhood": "Example Address neighborhood",
"city": "Example Address city",
"state": "Example Address state",
"zip_code": "Example Address zip code"
}
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete employee
requires authentication employee delete
Delete an employee
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer DbfVZ3ePg8E6kdha64v51ac" \
--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 DbfVZ3ePg8E6kdha64v51ac",
"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/13/bank-account" \
--header "Authorization: Bearer 631fke6v45habZEDaPgcdV8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/13/bank-account"
);
const headers = {
"Authorization": "Bearer 631fke6v45habZEDaPgcdV8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create employee bank account
requires authentication employee-bank-account store
Add a bank account to an employee
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/employees/8/bank-account" \
--header "Authorization: Bearer aZvPDe1kVb5ga64hcdf6E83" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_id\": \"aut\",
\"agency\": \"ssqcqsnhiuywstleygeo\",
\"account\": \"ecv\",
\"account_type\": \"poupança\",
\"pix_key\": \"dojxprpubvqwypdgoewvzhq\",
\"favorite\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/8/bank-account"
);
const headers = {
"Authorization": "Bearer aZvPDe1kVb5ga64hcdf6E83",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_id": "aut",
"agency": "ssqcqsnhiuywstleygeo",
"account": "ecv",
"account_type": "poupança",
"pix_key": "dojxprpubvqwypdgoewvzhq",
"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/4/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33" \
--header "Authorization: Bearer 5Vae3P1ZhkDEafcv4bgd866" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_id\": \"quia\",
\"agency\": \"dxksdlmoqeghpzxizvj\",
\"account\": \"qmhjkihil\",
\"account_type\": \"corrente\",
\"pix_key\": \"xdbcigkmbnbxiywx\",
\"favorite\": false
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/4/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33"
);
const headers = {
"Authorization": "Bearer 5Vae3P1ZhkDEafcv4bgd866",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_id": "quia",
"agency": "dxksdlmoqeghpzxizvj",
"account": "qmhjkihil",
"account_type": "corrente",
"pix_key": "xdbcigkmbnbxiywx",
"favorite": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete employee bank account
requires authentication employee-bank-account delete
Delete a bank account from an employee
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33" \
--header "Authorization: Bearer g8c51fadVDh3Pva6Z4b6Eke" \
--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 g8c51fadVDh3Pva6Z4b6Eke",
"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/10/epi-deliveries" \
--header "Authorization: Bearer a86bEP5cvekg1hVfa6ZdD34" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"aut\",
\"status\": \"expired\",
\"epi_type_id\": \"non\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/10/epi-deliveries"
);
const headers = {
"Authorization": "Bearer a86bEP5cvekg1hVfa6ZdD34",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "aut",
"status": "expired",
"epi_type_id": "non"
};
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/voluptatibus/epi-deliveries/pending-renewals-count" \
--header "Authorization: Bearer v3866afD4c1dgaZhbV5ekEP" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/voluptatibus/epi-deliveries/pending-renewals-count"
);
const headers = {
"Authorization": "Bearer v3866afD4c1dgaZhbV5ekEP",
"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/15/epi-deliveries/quibusdam" \
--header "Authorization: Bearer 45aE61hkb8aPVdgfcZDev63" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/15/epi-deliveries/quibusdam"
);
const headers = {
"Authorization": "Bearer 45aE61hkb8aPVdgfcZDev63",
"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/15/epi-deliveries" \
--header "Authorization: Bearer b8eV4vk1ha6EfcgPD6Z5a3d" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"epi_type_id\": \"eb4fb00a-30be-32da-8e3b-88a5334b1561\",
\"delivery_date\": \"2024-01-01\",
\"quantity\": 1,
\"condition\": \"Example Condition\",
\"lot\": \"Example Lot\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/15/epi-deliveries"
);
const headers = {
"Authorization": "Bearer b8eV4vk1ha6EfcgPD6Z5a3d",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"epi_type_id": "eb4fb00a-30be-32da-8e3b-88a5334b1561",
"delivery_date": "2024-01-01",
"quantity": 1,
"condition": "Example Condition",
"lot": "Example Lot"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create employee initial EPI kit
requires authentication employee-epi kit
Register multiple EPI deliveries as initial kit
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/employees/aut/epi-deliveries/kit" \
--header "Authorization: Bearer gv8P3d6V41b5fe6kachaZED" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"delivery_date\": \"2024-01-01\",
\"items\": [
{
\"epi_type_id\": \"f167b6cf-b714-3498-863a-b70b6b0cc91f\",
\"quantity\": 1,
\"condition\": \"Example Items * condition\",
\"lot\": \"Example Items * lot\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/aut/epi-deliveries/kit"
);
const headers = {
"Authorization": "Bearer gv8P3d6V41b5fe6kachaZED",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"delivery_date": "2024-01-01",
"items": [
{
"epi_type_id": "f167b6cf-b714-3498-863a-b70b6b0cc91f",
"quantity": 1,
"condition": "Example Items * condition",
"lot": "Example Items * lot"
},
null
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update employee EPI delivery
requires authentication employee-epi update
Update an EPI delivery for an employee
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/employees/8/epi-deliveries/ab" \
--header "Authorization: Bearer hvbE8Vk1g6a3e6fDPaZ4cd5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"epi_type_id\": \"922aa6b2-0d53-36b8-8730-ae837ef59d38\",
\"delivery_date\": \"2024-01-01\",
\"quantity\": 1,
\"condition\": \"Example Condition\",
\"lot\": \"Example Lot\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/8/epi-deliveries/ab"
);
const headers = {
"Authorization": "Bearer hvbE8Vk1g6a3e6fDPaZ4cd5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"epi_type_id": "922aa6b2-0d53-36b8-8730-ae837ef59d38",
"delivery_date": "2024-01-01",
"quantity": 1,
"condition": "Example Condition",
"lot": "Example Lot"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete employee EPI delivery
requires authentication employee-epi delete
Delete an EPI delivery from an employee
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/employees/aut/epi-deliveries/ut" \
--header "Authorization: Bearer bce45hgEP6f3Ddvk8aaV16Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/aut/epi-deliveries/ut"
);
const headers = {
"Authorization": "Bearer bce45hgEP6f3Ddvk8aaV16Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List employee EPI terms
requires authentication employee-epi index
List initial EPI kit terms for an employee
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/employees/4/epi-terms" \
--header "Authorization: Bearer P8aZ43cgk1dbvDhVf6E6ae5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"delivery_date\",
\"sort_desc\": true,
\"page\": 84,
\"per_page\": 1,
\"q\": \"adipisci\",
\"employee_id\": \"sed\",
\"has_term\": true
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/4/epi-terms"
);
const headers = {
"Authorization": "Bearer P8aZ43cgk1dbvDhVf6E6ae5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "delivery_date",
"sort_desc": true,
"page": 84,
"per_page": 1,
"q": "adipisci",
"employee_id": "sed",
"has_term": true
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Upload signed EPI term
requires authentication employee-epi update
Upload signed Termo de Ciência for an initial kit
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/employees/non/epi-terms/6db90406-5244-3652-9d6c-5c5515c6ccbe/upload" \
--header "Authorization: Bearer cZagP6d831evhk5aD4bE6fV" \
--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/non/epi-terms/6db90406-5244-3652-9d6c-5c5515c6ccbe/upload"
);
const headers = {
"Authorization": "Bearer cZagP6d831evhk5aD4bE6fV",
"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/quisquam/epi-terms/42da30f4-b988-3955-87d9-d0909b155f65/document" \
--header "Authorization: Bearer 8ecPZ6aEv6kV5gf3hbD1a4d" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/quisquam/epi-terms/42da30f4-b988-3955-87d9-d0909b155f65/document"
);
const headers = {
"Authorization": "Bearer 8ecPZ6aEv6kV5gf3hbD1a4d",
"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/cbf5d709-6924-30cd-a218-3b55422eba1f" \
--header "Authorization: Bearer b3aZ6V1D5PvedEhg4c8a6fk" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/cbf5d709-6924-30cd-a218-3b55422eba1f"
);
const headers = {
"Authorization": "Bearer b3aZ6V1D5PvedEhg4c8a6fk",
"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/0f49b0c6-0cf3-34f0-abc9-b6432263230b/info" \
--header "Authorization: Bearer 4vf5aP3bV6g1D6kZcaeE8hd" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/0f49b0c6-0cf3-34f0-abc9-b6432263230b/info"
);
const headers = {
"Authorization": "Bearer 4vf5aP3bV6g1D6kZcaeE8hd",
"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/24f21b2f-1d86-3838-bbb3-bbde1af469ad/download" \
--header "Authorization: Bearer 4e6Pfak3E8hb6Z5V1gdvDac" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/files/24f21b2f-1d86-3838-bbb3-bbde1af469ad/download"
);
const headers = {
"Authorization": "Bearer 4e6Pfak3E8hb6Z5V1gdvDac",
"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 3gb41avPkZc8f5eD6EhadV6" \
--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 3gb41avPkZc8f5eD6EhadV6",
"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 ZbVfgdDc86e34ka65vPh1aE" \
--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 ZbVfgdDc86e34ka65vPh1aE",
"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 1Dd66ebPcka3aV4fgEZ8vh5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"dicta\",
\"supplier_id\": \"odio\",
\"work_id\": \"officia\",
\"start_date\": \"2026-08-12T08:24:44\",
\"end_date\": \"2029-06-13\",
\"per_page\": 15
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);
const headers = {
"Authorization": "Bearer 1Dd66ebPcka3aV4fgEZ8vh5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "dicta",
"supplier_id": "odio",
"work_id": "officia",
"start_date": "2026-08-12T08:24:44",
"end_date": "2029-06-13",
"per_page": 15
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"nfe_access_key": null,
"nfe_number": null,
"nfe_series": null,
"issue_date": null,
"total_value": null,
"emit": {
"cnpj": null,
"name": null
},
"dest": {
"document": null,
"name": null
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
},
{
"id": null,
"nfe_access_key": null,
"nfe_number": null,
"nfe_series": null,
"issue_date": null,
"total_value": null,
"emit": {
"cnpj": null,
"name": null
},
"dest": {
"document": null,
"name": null
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 15,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create fiscal document
requires authentication fiscal-documents store
Registra uma NFe a partir do XML já enviado ao S3 e o vincula às obras informadas.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents" \
--header "Authorization: Bearer VPahvk4f6DbeaZ1Ec5d63g8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"s3_file_path\": \"consequatur\",
\"original_filename\": \".xml$\\/i\",
\"work_ids\": [
\"vitae\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);
const headers = {
"Authorization": "Bearer VPahvk4f6DbeaZ1Ec5d63g8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"s3_file_path": "consequatur",
"original_filename": ".xml$\/i",
"work_ids": [
"vitae"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": null,
"nfe_access_key": null,
"nfe_number": null,
"nfe_series": null,
"issue_date": null,
"total_value": null,
"emit": {
"cnpj": null,
"name": null
},
"dest": {
"document": null,
"name": null
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get fiscal document
requires authentication fiscal-documents show
Detalha uma nota fiscal com arquivos e obras vinculadas.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/fiscal-documents/laborum" \
--header "Authorization: Bearer bea8v6ghdDkf4ca5PE6VZ31" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/laborum"
);
const headers = {
"Authorization": "Bearer bea8v6ghdDkf4ca5PE6VZ31",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": null,
"nfe_access_key": null,
"nfe_number": null,
"nfe_series": null,
"issue_date": null,
"total_value": null,
"emit": {
"cnpj": null,
"name": null
},
"dest": {
"document": null,
"name": null
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete fiscal document
requires authentication fiscal-documents delete
Exclui definitivamente uma nota fiscal. Não permitido quando a nota já gerou parcelas no financeiro ou já teve produtos importados.
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/dolores" \
--header "Authorization: Bearer Ze6Va43ahdDbk8v16gcE5Pf" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/dolores"
);
const headers = {
"Authorization": "Bearer Ze6Va43ahdDbk8v16gcE5Pf",
"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/reprehenderit/files" \
--header "Authorization: Bearer bvPkfh3Za15cgedEaV684D6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"file\": {
\"path\": \"ipsum\",
\"name\": \"necessitatibus\",
\"extension\": \"est\"
}
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/reprehenderit/files"
);
const headers = {
"Authorization": "Bearer bvPkfh3Za15cgedEaV684D6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"file": {
"path": "ipsum",
"name": "necessitatibus",
"extension": "est"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": null,
"nfe_access_key": null,
"nfe_number": null,
"nfe_series": null,
"issue_date": null,
"total_value": null,
"emit": {
"cnpj": null,
"name": null
},
"dest": {
"document": null,
"name": null
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Detach file
requires authentication fiscal-documents update
Remove definitivamente um anexo da nota fiscal, inclusive o objeto no S3. O XML original da NFe não pode ser removido.
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/placeat/files/est" \
--header "Authorization: Bearer 6d5vgVZ3ha8ka1EP6be4fDc" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/placeat/files/est"
);
const headers = {
"Authorization": "Bearer 6d5vgVZ3ha8ka1EP6be4fDc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": null,
"nfe_access_key": null,
"nfe_number": null,
"nfe_series": null,
"issue_date": null,
"total_value": null,
"emit": {
"cnpj": null,
"name": null
},
"dest": {
"document": null,
"name": null
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sync works
requires authentication fiscal-documents update
Sincroniza o vínculo documental da nota fiscal com N obras.
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/facere/works" \
--header "Authorization: Bearer kP1vZfea6EDcbad56V34h8g" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"work_ids\": [
\"aut\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/fiscal-documents/facere/works"
);
const headers = {
"Authorization": "Bearer kP1vZfea6EDcbad56V34h8g",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"work_ids": [
"aut"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": null,
"nfe_access_key": null,
"nfe_number": null,
"nfe_series": null,
"issue_date": null,
"total_value": null,
"emit": {
"cnpj": null,
"name": null
},
"dest": {
"document": null,
"name": null
},
"financial_status": "pending",
"products_imported_at": null,
"created_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Import
Endpoints for managing NFe imports and product processing.
NFe Imports
Import and process Brazilian electronic invoice (NFe) files.
Create NFe Import
requires authentication imports store
Upload and process a Brazilian NFe (Nota Fiscal Eletrônica) XML file. The file should be uploaded to S3 first, then this endpoint processes it asynchronously.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/imports/nfe/products" \
--header "Authorization: Bearer dkbE416hg3Zef6aV8aPDv5c" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"s3_file_path\": \"imports\\/nfe_12345.xml\",
\"original_filename\": \"nota_fiscal_001.xml\",
\"import_type\": \"nfe\",
\"fiscal_document_id\": \"019556e7-2e9f-777c-a177-30bbf0646c32\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/nfe/products"
);
const headers = {
"Authorization": "Bearer dkbE416hg3Zef6aV8aPDv5c",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"s3_file_path": "imports\/nfe_12345.xml",
"original_filename": "nota_fiscal_001.xml",
"import_type": "nfe",
"fiscal_document_id": "019556e7-2e9f-777c-a177-30bbf0646c32"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201, Import created successfully):
{
"import_id": "9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a",
"status": "pending",
"channel": "import-progress.9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a"
}
Example response (404, File not found in S3):
{
"error": "Arquivo não encontrado no S3"
}
Example response (422, Invalid XML or not a valid NFe):
{
"error": "Arquivo XML inválido ou não é uma NFe"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List Imports
requires authentication imports index
List all NFe imports with filtering and pagination options.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/imports?sort_by=created_at&sort_desc=1&page=1&per_page=15&status=completed&import_type=nfe" \
--header "Authorization: Bearer V3kfb1ag66aE4P85hecZDvd" \
--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 V3kfb1ag66aE4P85hecZDvd",
"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/voluptatem" \
--header "Authorization: Bearer vVak3Z16PEb8fgdDa5h64ec" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/voluptatem"
);
const headers = {
"Authorization": "Bearer vVak3Z16PEb8fgdDa5h64ec",
"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/eum" \
--header "Authorization: Bearer ehgVP63dZ541Da8c6Ekafvb" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/eum"
);
const headers = {
"Authorization": "Bearer ehgVP63dZ541Da8c6Ekafvb",
"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/asperiores/products?sort_by=created_at&sort_desc=1&page=1&per_page=15&status=pending&q=Produto+ABC" \
--header "Authorization: Bearer 38a1cPZef4EVb56v6ahdgDk" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/asperiores/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 38a1cPZef4EVb56v6ahdgDk",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Products retrieved successfully):
{
"import": {
"id": "9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a",
"total_products": 15,
"processed_products": 10,
"progress_percentage": 66.67
},
"products": {
"data": [
{
"id": "product-uuid",
"supplier_product_code": "ABC123",
"ean_code": "7891234567890",
"name": "Nome do Produto",
"unit": "UN",
"quantity": 10,
"unit_price": 15.5,
"total_price": 155,
"is_processed": false,
"system_product": null,
"linked_at": null,
"linked_by": null,
"has_stock_movement": false
}
]
},
"pagination": {
"current_page": 1,
"per_page": 15,
"total": 15,
"last_page": 1
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List Import Stock Distributions
requires authentication import-products index
Return, per imported product, how the purchased quantity was distributed across stocks (works and main). Aggregated from stock movements generated by the import.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/imports/accusamus/distributions" \
--header "Authorization: Bearer v4gc5k68EVfDh6adae31ZPb" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/imports/accusamus/distributions"
);
const headers = {
"Authorization": "Bearer v4gc5k68EVfDh6adae31ZPb",
"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/quas/products/link" \
--header "Authorization: Bearer PVZ1g65vaDa46dEc8fbke3h" \
--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/quas/products/link"
);
const headers = {
"Authorization": "Bearer PVZ1g65vaDa46dEc8fbke3h",
"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 Db1k4Ed38aVPfe65Z6ghacv" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"cupiditate\",
\"sort_desc\": true,
\"page\": 64,
\"per_page\": 4
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/locations/states"
);
const headers = {
"Authorization": "Bearer Db1k4Ed38aVPfe65Z6ghacv",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "cupiditate",
"sort_desc": true,
"page": 64,
"per_page": 4
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "dolorem dolor",
"abbreviation": "LP"
},
{
"id": null,
"name": "velit dignissimos",
"abbreviation": "YP"
}
],
"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 d6Z51PkvVEa6e3Dac8hbgf4" \
--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 d6Z51PkvVEa6e3Dac8hbgf4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "North Magnoliafurt"
},
{
"id": null,
"name": "Ebertborough"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 56ZhEdc3PkeVvDa148fbga6" \
--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 56ZhEdc3PkeVvDa148fbga6",
"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 1P8c4Zakev6g3fV5h6dbaDE" \
--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 1P8c4Zakev6g3fV5h6dbaDE",
"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 g53vkafPVc8ebE46ahDd1Z6" \
--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 g53vkafPVc8ebE46ahDd1Z6",
"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 c1fDh5gkbE4aP3Zda6vV68e" \
--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 c1fDh5gkbE4aP3Zda6vV68e",
"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 VPhv5Z1kefbc634a6gaE8Dd" \
--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 VPhv5Z1kefbc634a6gaE8Dd",
"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=consequuntur&document=odio&work_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&bank_account_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3" \
--header "Authorization: Bearer 3hf8Za1v64Vgk6beEcdDaP5" \
--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": "consequuntur",
"document": "odio",
"work_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
"bank_account_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 3hf8Za1v64Vgk6beEcdDaP5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "d37d1880-1d71-39f1-a773-3897aec4cb11",
"receipt_number": "REC-7743",
"receiver_type": "employee",
"receiver": {
"id": null,
"name": "Ms. Destiny Corkery",
"document": "009.675.007-30"
},
"payment": {
"amount": 8176.89,
"amount_in_words": "Valor por extenso de teste",
"method": "check",
"description": "Aspernatur et quia quod sed."
},
"issuer": {
"name": "Romaguera, Schaefer and Kuvalis",
"document": "52.218.288/1091-04"
},
"issue": {
"date": "2026-08-12",
"city": "Port Rebekahport",
"state": "PE"
},
"created_by": {
"id": "a27bfbc1-7708-4035-a2eb-860896b7cf5b",
"name": "Zachery Cormier"
},
"created_at": null,
"updated_at": null
},
{
"id": "cdfae098-c545-3dbe-8e90-bc831ff3b40a",
"receipt_number": "REC-0172",
"receiver_type": "employee",
"receiver": {
"id": null,
"name": "Dr. Guy Lowe Jr.",
"document": "520.531.016-27"
},
"payment": {
"amount": 6691.64,
"amount_in_words": "Valor por extenso de teste",
"method": "bank_transfer",
"description": "Ut eveniet sapiente molestiae sed."
},
"issuer": {
"name": "Haley, Breitenberg and Haag",
"document": "50.846.260/7470-45"
},
"issue": {
"date": "2026-07-30",
"city": "West Coy",
"state": "SC"
},
"created_by": {
"id": "a27bfbc1-7bc3-4352-92a8-0cee47ff11d6",
"name": "Dashawn Witting I"
},
"created_at": null,
"updated_at": null
}
],
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"has_more_pages": false
},
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show receipt cash flow config
requires authentication payment-receipt cash-flow-config index
Lista cada forma de pagamento e se ela gera lancamento automatico no fluxo de caixa
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/payment-receipts/cash-flow-config" \
--header "Authorization: Bearer ve4Pa6k8cDaV6bhZE3d1f5g" \
--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 ve4Pa6k8cDaV6bhZE3d1f5g",
"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 Z4P6ea51dc38hDgaEVbv6kf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"methods\": [
{
\"method\": \"check\",
\"eligible\": true
}
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/cash-flow-config"
);
const headers = {
"Authorization": "Bearer Z4P6ea51dc38hDgaEVbv6kf",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"methods": [
{
"method": "check",
"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 6kPfd6Dagv341VZh5cEeab8" \
--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 6kPfd6Dagv341VZh5cEeab8",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d69cb724-d630-3f31-838c-1f6940f18dce",
"receipt_number": "REC-2900",
"receiver_type": "custom",
"receiver": {
"id": null,
"name": "Faye Graham",
"document": "022.868.507-19"
},
"payment": {
"amount": 1173.18,
"amount_in_words": "Valor por extenso de teste",
"method": "bank_transfer",
"description": "Reprehenderit qui aliquid magnam aliquam nostrum."
},
"issuer": {
"name": "Rodriguez LLC",
"document": "71.152.494/0842-79"
},
"issue": {
"date": "2026-07-29",
"city": "North Treva",
"state": "RS"
},
"created_by": {
"id": "a27bfbc1-906e-40b6-a027-8f235577d478",
"name": "Esta Feest"
},
"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 Z1d645bPEV6kvh8cf3Daaeg" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"receiver_type\": \"Example Receiver type\",
\"employee_id\": \"e9885ddd-1a3f-4a41-8440-4f5f39f68653\",
\"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\": \"2a0703d6-f2ce-3ee6-9be7-5719a20d1073\",
\"bank_account_id\": \"68e3112c-9e73-3349-b67c-bff1f0c1e864\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts"
);
const headers = {
"Authorization": "Bearer Z1d645bPEV6kvh8cf3Daaeg",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"receiver_type": "Example Receiver type",
"employee_id": "e9885ddd-1a3f-4a41-8440-4f5f39f68653",
"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": "2a0703d6-f2ce-3ee6-9be7-5719a20d1073",
"bank_account_id": "68e3112c-9e73-3349-b67c-bff1f0c1e864"
};
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 Eef3PcZaab541hv6kgd6D8V" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"receiver_type\": \"Example Receiver type\",
\"employee_id\": \"7df3a54f-c93e-4acf-b710-5af2fbe86a23\",
\"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\": \"cf0623be-5290-389a-8696-3b37c35a4975\",
\"bank_account_id\": \"ddd9d2bc-ef54-3fde-b932-7d55262589ec\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer Eef3PcZaab541hv6kgd6D8V",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"receiver_type": "Example Receiver type",
"employee_id": "7df3a54f-c93e-4acf-b710-5af2fbe86a23",
"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": "cf0623be-5290-389a-8696-3b37c35a4975",
"bank_account_id": "ddd9d2bc-ef54-3fde-b932-7d55262589ec"
};
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 Eak4g68DZ365fcvbVdPe1ha" \
--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 Eak4g68DZ365fcvbVdPe1ha",
"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/3/receipts" \
--header "Authorization: Bearer 4Egf158aPDhb6d3ZcevV6ak" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/employees/3/receipts"
);
const headers = {
"Authorization": "Bearer 4Egf158aPDhb6d3ZcevV6ak",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "fd9968bb-5929-3cb5-8530-ff4f14f1ab68",
"receipt_number": "REC-6861",
"receiver_type": "employee",
"receiver": {
"id": null,
"name": "Lemuel Kemmer",
"document": "028.256.631-65"
},
"payment": {
"amount": 5763.5,
"amount_in_words": "Valor por extenso de teste",
"method": "pix",
"description": "Voluptatum ducimus sunt ipsam dolore."
},
"issuer": {
"name": "VonRueden, Tromp and Goodwin",
"document": "56.750.991/5862-45"
},
"issue": {
"date": "2026-08-12",
"city": "Marcelinachester",
"state": "CE"
},
"created_by": {
"id": "a27bfbc1-de37-49e0-8188-81addd05f848",
"name": "Jeffrey Renner Jr."
},
"created_at": null,
"updated_at": null
},
{
"id": "a04712b3-3ae6-3f3e-9c2a-f35499753274",
"receipt_number": "REC-6402",
"receiver_type": "custom",
"receiver": {
"id": null,
"name": "Ms. Berniece Oberbrunner",
"document": "522.156.188-29"
},
"payment": {
"amount": 7030.32,
"amount_in_words": "Valor por extenso de teste",
"method": "cash",
"description": "Nostrum et est et aut sint quibusdam perspiciatis omnis."
},
"issuer": {
"name": "Sipes-Aufderhar",
"document": "25.390.014/7937-76"
},
"issue": {
"date": "2026-07-28",
"city": "Beckerport",
"state": "RS"
},
"created_by": {
"id": "a27bfbc1-e124-423a-8a09-5d1d0d93a595",
"name": "Olaf Pfannerstill"
},
"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 gbE6efVd5kvha1aZcD34P68" \
--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 gbE6efVd5kvha1aZcD34P68",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "617eeee5-8835-3632-9686-b1b8645357c4",
"name": "quia",
"display_name": "Dolor quia suscipit repellendus vero voluptas."
},
{
"id": "15b153b0-93e6-31a4-b55a-25c1bd61ba80",
"name": "omnis",
"display_name": "Veritatis libero corporis id sed corrupti atque."
}
],
"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 1agDPbv6kce435adfZh8EV6" \
--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 1agDPbv6kce435adfZh8EV6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "ecafec9c-6a4a-35f3-a72a-37244d7b6e19",
"name": "et-praesentium-sed",
"display_name": "repellat hic sunt",
"created_at": null,
"updated_at": null
},
{
"id": "25f10625-028e-39e3-b8b0-92521643fa42",
"name": "sed-et",
"display_name": "exercitationem ut earum",
"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 38f6ZcvbVEhgPa451dDea6k" \
--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 38f6ZcvbVEhgPa451dDea6k",
"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 DcVhEb4kvfg1Pa536d6eZ8a" \
--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 DcVhEb4kvfg1Pa536d6eZ8a",
"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 E6D3fe6cgdaaVP85Z4vhb1k" \
--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 E6D3fe6cgdaaVP85Z4vhb1k",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "72abd246-a42c-3beb-9cba-570ebcaf7f3f",
"name": "ut-velit-quis",
"display_name": "dicta sunt 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.
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 fag61PdE6D85avZ3bhcek4V" \
--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 fag61PdE6D85avZ3bhcek4V",
"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 f6k43EDvaVeb8c1Pagh5dZ6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"a725fa02-1136-3a44-97e7-6f9f6f23b95c\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);
const headers = {
"Authorization": "Bearer f6k43EDvaVeb8c1Pagh5dZ6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"a725fa02-1136-3a44-97e7-6f9f6f23b95c"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "f78edfe7-7396-3ce4-84da-1e55139ea3b2",
"name": "quia-itaque",
"display_name": "animi at sint",
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 kv48E663bVcgaaPZD15hfde" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"170ae560-0de6-32b9-a1c6-72d5314b6a5b\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);
const headers = {
"Authorization": "Bearer kv48E663bVcgaaPZD15hfde",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"170ae560-0de6-32b9-a1c6-72d5314b6a5b"
]
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "db64dece-aea9-3cfb-a9c4-24c3638bff88",
"name": "amet-fugiat-sit",
"display_name": "mollitia tempore maiores",
"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 f4a8bPdkeZaVc6E5gh631Dv" \
--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 f4a8bPdkeZaVc6E5gh631Dv",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "615ca497-64b8-36a4-8ef9-7fdd71d633a1",
"name": "Daniella Padrão Fidalgo",
"created_at": null,
"updated_at": null
},
{
"id": "cf554abe-c057-32bf-8918-aa55f0612725",
"name": "Tatiane Zaragoça Delatorre",
"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/qui" \
--header "Authorization: Bearer EDkV34Zge8vhcbdP6651aaf" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-brands/qui"
);
const headers = {
"Authorization": "Bearer EDkV34Zge8vhcbdP6651aaf",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "779bba01-5297-3ff2-8041-39bbc43077fe",
"name": "Cléber Cruz Sobrinho",
"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 Z3avV1ak5bEce8fD6dg46Ph" \
--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 Z3avV1ak5bEce8fD6dg46Ph",
"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/labore" \
--header "Authorization: Bearer c66Z51P8v4kVdeaahDgbEf3" \
--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/labore"
);
const headers = {
"Authorization": "Bearer c66Z51P8v4kVdeaahDgbEf3",
"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/recusandae" \
--header "Authorization: Bearer h6Ea53edkvafgc6VP48bZ1D" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-brands/recusandae"
);
const headers = {
"Authorization": "Bearer h6Ea53edkvafgc6VP48bZ1D",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Families
Endpoints for product families
List product families
requires authentication product-family index
List all product families
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-families?q=Structure" \
--header "Authorization: Bearer D351gkVafavhEcZdb4e86P6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families"
);
const params = {
"q": "Structure",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer D351gkVafavhEcZdb4e86P6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "fc12e1cc-b21b-3c91-9893-d36b51c286c1",
"name": "Vanessa Escobar Fonseca",
"created_at": null,
"updated_at": null
},
{
"id": "ca3a806f-e6fc-3941-b857-f434635acc51",
"name": "Rosana Louise Torres",
"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/omnis" \
--header "Authorization: Bearer e5dZak34hPc81DgVb66Efav" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families/omnis"
);
const headers = {
"Authorization": "Bearer e5dZak34hPc81DgVb66Efav",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "b1e06a8d-c550-398d-b216-6e595eb9cba1",
"name": "Sr. Eduardo Dias",
"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 aVkbga1fdhP6EvZD53684ce" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families"
);
const headers = {
"Authorization": "Bearer aVkbga1fdhP6EvZD53684ce",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update product family
requires authentication product-family update
Update a product family
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/product-families/placeat" \
--header "Authorization: Bearer 3h4c8fdZ5aeaVEPbg16vk6D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families/placeat"
);
const headers = {
"Authorization": "Bearer 3h4c8fdZ5aeaVEPbg16vk6D",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete product family
requires authentication product-family delete
Delete a product family
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/product-families/rerum" \
--header "Authorization: Bearer e6ka6hEfZ1gba5V3dPcvD48" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-families/rerum"
);
const headers = {
"Authorization": "Bearer e6ka6hEfZ1gba5V3dPcvD48",
"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 V5e4adaD6b3k8cfEhg1Zv6P" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"Example Q\",
\"work_id\": \"0d43e2d0-e7fc-3214-95e6-b43ea4209df0\",
\"user_id\": \"9e016e20-f295-3a15-a4e0-54a5c8ee70ae\",
\"responsible_id\": \"e288e6b9-c36a-3a5a-96da-ecaa58ff36c0\",
\"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 V5e4adaD6b3k8cfEhg1Zv6P",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "Example Q",
"work_id": "0d43e2d0-e7fc-3214-95e6-b43ea4209df0",
"user_id": "9e016e20-f295-3a15-a4e0-54a5c8ee70ae",
"responsible_id": "e288e6b9-c36a-3a5a-96da-ecaa58ff36c0",
"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": "9811a784-7593-3ebf-aebc-2421da504adf",
"name": "Provident sint doloribus quibusdam.",
"description": "Unde dignissimos esse voluptas velit neque porro omnis. Dolores iste quis illum repudiandae eum sit. Fugit sint ipsam aut molestiae. Cum ut exercitationem vero voluptatem sunt.",
"work": {
"id": "a27bfbc2-ae36-4ae2-85bb-a115868a0446",
"name": "Sra. Isabelly Amaral Espinoza"
},
"user": {
"id": "a27bfbc2-b240-4771-957b-8ad4eb310ac3",
"name": "Ella Johns II"
},
"created_at": null,
"updated_at": null
},
{
"id": "9ff633b7-a742-3957-8a83-10ba48978d04",
"name": "Sapiente qui.",
"description": "Explicabo nihil non ipsa repellat. Ut fuga debitis iste. Corrupti eaque ab beatae dignissimos saepe numquam suscipit. Id ea deserunt animi non cumque consequatur quis.",
"work": {
"id": "a27bfbc2-b70d-4dc2-8d37-8267d89f9852",
"name": "Kelly Taís Vasques"
},
"user": {
"id": "a27bfbc2-bc4b-48ff-8c7b-eb38069462fe",
"name": "Dr. Vernice Macejkovic"
},
"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/quisquam" \
--header "Authorization: Bearer 6fD3ka1ae6h4Zgd8EbVPv5c" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/quisquam"
);
const headers = {
"Authorization": "Bearer 6fD3ka1ae6h4Zgd8EbVPv5c",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "df50ef72-03b6-3adf-8d54-a3be6f8d2d42",
"name": "Sed optio velit.",
"description": "Inventore vel quia quis quaerat vero doloremque. Nostrum non eos molestiae quibusdam repellat nisi libero hic. Aliquam eaque quae reprehenderit.",
"work": {
"id": "a27bfbc2-c6d7-4721-8abb-260a0ca75e22",
"name": "Dr. Jean Estrada Jr."
},
"user": {
"id": "a27bfbc2-ca8b-4545-be8d-0d926aa25dc4",
"name": "Ruben Corwin II"
},
"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/perspiciatis/items" \
--header "Authorization: Bearer g6V6abdPEe4851fZcvkDh3a" \
--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/perspiciatis/items"
);
const headers = {
"Authorization": "Bearer g6V6abdPEe4851fZcvkDh3a",
"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": "3b58afb0-3099-38c0-9fc2-99057fa71a1a",
"product": {
"id": "a27bfbc2-edd2-458b-ab1a-ec0c1efb7c5d",
"name": "Vitor Mascarenhas Meireles",
"code": "PRD-387081",
"unit": {
"id": "a27bfbc2-eb32-468e-97e2-2215dc612735",
"name": "Gustavo Barros Caldeira",
"abbreviation": "Sra. Luísa Guerra Delvalle Sobrinho"
}
},
"quantity": 368.4432,
"observation": null,
"created_at": null,
"updated_at": null
},
{
"id": "5c5e43c3-1e3c-3557-a60a-ea1d412dc989",
"product": {
"id": "a27bfbc3-0149-4eb9-8797-4f023000919f",
"name": "Dr. Flávio Aragão Martines Filho",
"code": "PRD-552684",
"unit": {
"id": "a27bfbc2-fff8-42d9-8aa3-728961ec86a8",
"name": "Dr. Filipe William Souza",
"abbreviation": "Dr. Thiago Diogo Delvalle Sobrinho"
}
},
"quantity": 595.6214,
"observation": "Debitis sint at sunt incidunt qui veritatis.",
"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 ah5kfDP46gaV81c6ZEdbv3e" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"44c28df3-14d0-3f1a-95f4-15ff40815a94\",
\"items\": [
{
\"product_id\": \"18966e19-5d46-349c-8af9-f7c94130005a\",
\"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 ah5kfDP46gaV81c6ZEdbv3e",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "44c28df3-14d0-3f1a-95f4-15ff40815a94",
"items": [
{
"product_id": "18966e19-5d46-349c-8af9-f7c94130005a",
"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/animi" \
--header "Authorization: Bearer Vfv6a3dbch5aZ4e6PEDgk18" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"items\": [
{
\"id\": \"346471fa-25bf-37cb-80b4-dc7b5145e73b\",
\"product_id\": \"269467fa-3845-3164-813e-f877a12871ad\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/animi"
);
const headers = {
"Authorization": "Bearer Vfv6a3dbch5aZ4e6PEDgk18",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"items": [
{
"id": "346471fa-25bf-37cb-80b4-dc7b5145e73b",
"product_id": "269467fa-3845-3164-813e-f877a12871ad",
"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/impedit" \
--header "Authorization: Bearer bPe645ghaVdZ3EDva618fck" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/impedit"
);
const headers = {
"Authorization": "Bearer bPe645ghaVdZ3EDva618fck",
"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/id/items" \
--header "Authorization: Bearer c8kh6V5ga4EZ6eDbdv1Paf3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"product_id\": \"af2a400a-0c13-39da-89de-9229edd98b41\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/id/items"
);
const headers = {
"Authorization": "Bearer c8kh6V5ga4EZ6eDbdv1Paf3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"product_id": "af2a400a-0c13-39da-89de-9229edd98b41",
"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/cumque" \
--header "Authorization: Bearer 83bkdEhZva4a6D5fcP6g1eV" \
--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/cumque"
);
const headers = {
"Authorization": "Bearer 83bkdEhZva4a6D5fcP6g1eV",
"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/repudiandae/items" \
--header "Authorization: Bearer kveZ86bE1caDaPd3h4fV5g6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"e8ce924c-38ba-3ffc-bedd-df41b92a59d8\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/repudiandae/items"
);
const headers = {
"Authorization": "Bearer kveZ86bE1caDaPd3h4fV5g6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"e8ce924c-38ba-3ffc-bedd-df41b92a59d8"
]
};
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/esse/sync-items" \
--header "Authorization: Bearer 3DZVc5ev8b4PEakfda6g1h6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"id\": \"7a9559eb-2531-3488-95b1-625b2a286863\",
\"product_id\": \"c0928460-aa7c-3962-97fe-8466bab7085d\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/esse/sync-items"
);
const headers = {
"Authorization": "Bearer 3DZVc5ev8b4PEakfda6g1h6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"id": "7a9559eb-2531-3488-95b1-625b2a286863",
"product_id": "c0928460-aa7c-3962-97fe-8466bab7085d",
"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/totam/fulfill" \
--header "Authorization: Bearer eaaD81cEhbZkg5346vfd6VP" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"fulfillment_type\": \"Example Fulfillment type\",
\"stock_id\": \"c3784bc4-3efb-3196-8074-a6165dd58534\",
\"quantity\": 1,
\"source_stock_id\": \"eab31a15-4e06-39f9-b601-d20a20302275\",
\"reason\": \"Example Reason\",
\"origins\": [
{
\"supplier_product_id\": \"045c7c7f-1dbe-3dff-b259-1bc95ee0fe4f\",
\"quantity\": 1
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/totam/fulfill"
);
const headers = {
"Authorization": "Bearer eaaD81cEhbZkg5346vfd6VP",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"fulfillment_type": "Example Fulfillment type",
"stock_id": "c3784bc4-3efb-3196-8074-a6165dd58534",
"quantity": 1,
"source_stock_id": "eab31a15-4e06-39f9-b601-d20a20302275",
"reason": "Example Reason",
"origins": [
{
"supplier_product_id": "045c7c7f-1dbe-3dff-b259-1bc95ee0fe4f",
"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/quia/fulfillments" \
--header "Authorization: Bearer 4Vg6fZvbDEacPa6he58k31d" \
--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/quia/fulfillments"
);
const headers = {
"Authorization": "Bearer 4Vg6fZvbDEacPa6he58k31d",
"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": "5fc1864b-9827-330b-8540-40fb3bf619af",
"quantity": 98.5104,
"fulfilled_at": "2026-08-08T20:57:55.000000Z",
"created_at": null
},
{
"id": "ea4db37c-621a-34c2-9b67-d7d2999ee014",
"quantity": 28.633,
"fulfilled_at": "2026-07-31T11:15:05.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/aut" \
--header "Authorization: Bearer E3hdaPZ561f8g6bakDvVe4c" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/aut"
);
const headers = {
"Authorization": "Bearer E3hdaPZ561f8g6bakDvVe4c",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "344d4013-28f1-3c40-a300-b9a38de96745",
"product": {
"id": "a27bfbc7-f120-4a24-85e3-e974d667b79a",
"name": "Fernanda Luara Rocha",
"code": "PRD-964896",
"unit": {
"id": "a27bfbc7-efb3-4273-a410-acff32f8f798",
"name": "Heloísa Esteves Alcantara Neto",
"abbreviation": "Dr. Rosana Molina"
}
},
"quantity": 381.687,
"quantity_fulfilled": 0,
"quantity_pending": 381.687,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": null,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List pending items
requires authentication product-request show
List all pending items from a product request
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-requests/et/pending-items" \
--header "Authorization: Bearer echvad4gEaZV6f36bk81D5P" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"per_page\": 1,
\"page\": 1
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/et/pending-items"
);
const headers = {
"Authorization": "Bearer echvad4gEaZV6f36bk81D5P",
"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": "37617f77-e300-3a8e-83e2-494b53fb6f68",
"product": {
"id": "a27bfbc8-1768-48db-9669-b56de5bc28e3",
"name": "Ayla Furtado Sobrinho",
"code": "PRD-324646",
"unit": {
"id": "a27bfbc8-15bd-44ce-8c3b-44dcbff5221f",
"name": "Srta. Bianca Sofia Dominato Jr.",
"abbreviation": "Demian Emiliano Benez Jr."
}
},
"quantity": 504.8154,
"quantity_fulfilled": 0,
"quantity_pending": 504.8154,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Rerum earum nam sed ullam molestiae eum corrupti.",
"created_at": null,
"updated_at": null
},
{
"id": "50ba4e9a-deae-38e5-8610-d926501e7ffa",
"product": {
"id": "a27bfbc8-28e8-4dbb-9cac-13e1f794f0ba",
"name": "Sr. Eric Prado Urias Sobrinho",
"code": "PRD-666530",
"unit": {
"id": "a27bfbc8-27a8-4472-a354-a0702ef7a459",
"name": "Srta. Stephanie Souza Filho",
"abbreviation": "Louise Velasques Carvalho Sobrinho"
}
},
"quantity": 344.6292,
"quantity_fulfilled": 0,
"quantity_pending": 344.6292,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Voluptatibus voluptatum similique quia et earum velit id necessitatibus.",
"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/atque" \
--header "Authorization: Bearer b66EfchkZ3davV1g8ePD4a5" \
--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/atque"
);
const headers = {
"Authorization": "Bearer b66EfchkZ3davV1g8ePD4a5",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "9de32562-a7b0-3919-aac6-50223bb7ad73",
"product": {
"id": "a27bfbc8-4218-49fb-bb34-9df25dcee581",
"name": "Sr. Vicente Jean Lourenço",
"code": "PRD-081217",
"unit": {
"id": "a27bfbc8-40d1-4f5f-a962-91cb7a08d35a",
"name": "Sr. Vinícius Gian de Freitas",
"abbreviation": "Franciele Padrão Solano Sobrinho"
}
},
"quantity": 621.4643,
"quantity_fulfilled": 0,
"quantity_pending": 621.4643,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": null,
"created_at": null,
"updated_at": null
},
{
"id": "1bc1fa09-df6c-32a0-a431-b320d9e43d86",
"product": {
"id": "a27bfbc8-538a-49d0-b963-8ad7159e1b91",
"name": "Tábata Isabelly Caldeira",
"code": "PRD-854962",
"unit": {
"id": "a27bfbc8-528c-4783-8920-0ec51c814618",
"name": "Daniela Gomes Soares",
"abbreviation": "Thomas Lourenço"
}
},
"quantity": 725.1011,
"quantity_fulfilled": 0,
"quantity_pending": 725.1011,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": "Laboriosam doloribus voluptatem architecto rem aut expedita adipisci repellat.",
"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 aE36kcvePbgfD41VZa5d68h" \
--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\": \"2119a6a8-c62e-3830-8a39-7375c4feccf7\",
\"work_location_id\": \"71691dca-36ad-35ea-ba28-21e74414ea08\",
\"user_id\": \"a538befc-da53-33b4-9e3d-b62acc8955d7\",
\"status_id\": \"046c53c9-cf3f-35e4-8d1f-8b7f91e40f83\",
\"priority\": \"Example Priority\",
\"needed_at_from\": \"Example Needed at from\",
\"needed_at_to\": \"Example Needed at to\",
\"responsible_id\": \"2b99077d-4ffc-361f-8633-d212bae1e5f4\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests"
);
const headers = {
"Authorization": "Bearer aE36kcvePbgfD41VZa5d68h",
"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": "2119a6a8-c62e-3830-8a39-7375c4feccf7",
"work_location_id": "71691dca-36ad-35ea-ba28-21e74414ea08",
"user_id": "a538befc-da53-33b4-9e3d-b62acc8955d7",
"status_id": "046c53c9-cf3f-35e4-8d1f-8b7f91e40f83",
"priority": "Example Priority",
"needed_at_from": "Example Needed at from",
"needed_at_to": "Example Needed at to",
"responsible_id": "2b99077d-4ffc-361f-8633-d212bae1e5f4"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "2f3d4817-4929-3366-bcf6-25db46452d2e",
"code": null,
"name": "Consectetur officia fuga dolorem.",
"description": "Ipsam voluptatum sed blanditiis sed. Est enim ipsa et vitae. Animi at quas et.",
"work": {
"id": "a27bfbc4-9b73-4700-81c4-6624cac178be",
"name": "Jácomo Sandoval Campos"
},
"user": {
"id": "a27bfbc4-a0b4-4bbd-93a5-7b9d174b201d",
"name": "Bryon Pfannerstill III"
},
"status": {
"id": "a27bfbc4-a314-445c-bb49-92a281e0c4ea",
"slug": null,
"name": null,
"description": "Regina Madeira Neto",
"abbreviation": "inventore",
"color": "#55f03e",
"text_color": "#57cc62"
},
"priority": "urgent",
"priority_label": "Urgente",
"needed_at": "2026-08-29",
"approved_at": null,
"rejection_reason": null,
"created_at": null,
"updated_at": null
},
{
"id": "e152383a-1c55-35f3-b93d-4e1dd46bca49",
"code": null,
"name": "Vitae temporibus earum.",
"description": "Repudiandae est est temporibus voluptatibus. At rerum fugiat nihil officia autem eum consequatur. Saepe in totam velit et perspiciatis suscipit. Illum eaque quam quia repellat sed.",
"work": {
"id": "a27bfbc4-a8da-452b-bdbf-e7a33b33850d",
"name": "Dr. Elaine Iasmin Zambrano"
},
"user": {
"id": "a27bfbc4-ac28-48dc-aa7b-1bb4918d1a1f",
"name": "Zola Sanford"
},
"status": {
"id": "a27bfbc4-ae6f-482f-9053-bd27e1bee80e",
"slug": null,
"name": null,
"description": "Thales da Silva",
"abbreviation": "quis",
"color": "#e40acb",
"text_color": "#f6be09"
},
"priority": "low",
"priority_label": "Baixa",
"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/suscipit" \
--header "Authorization: Bearer 64h81g3V5acZd6fbeDaPkEv" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/suscipit"
);
const headers = {
"Authorization": "Bearer 64h81g3V5acZd6fbeDaPkEv",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "226aa985-4349-301a-93c0-9d974065201d",
"code": null,
"name": "Repellat excepturi voluptatum et.",
"description": null,
"work": {
"id": "a27bfbc4-c2cb-4727-818e-5a4c3fcca0d9",
"name": "Maria Faro Romero"
},
"user": {
"id": "a27bfbc4-c6ac-4093-b5e0-1372e0bc1ecf",
"name": "Hudson Luettgen"
},
"status": {
"id": "a27bfbc4-c8c0-4c14-a6ac-8968ab5391c7",
"slug": null,
"name": null,
"description": "Sr. Gian Michael Bittencourt",
"abbreviation": "explicabo",
"color": "#b53359",
"text_color": "#664521"
},
"priority": "urgent",
"priority_label": "Urgente",
"needed_at": null,
"approved_at": null,
"rejection_reason": null,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List items
requires authentication product-request show
List all items from a product request with pagination
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/product-requests/in/items" \
--header "Authorization: Bearer k6dPgacaEhv16Z38eVb5fD4" \
--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/in/items"
);
const headers = {
"Authorization": "Bearer k6dPgacaEhv16Z38eVb5fD4",
"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": "e43b1d6c-b08c-3f2d-b677-8622e6f52479",
"product": {
"id": "a27bfbc4-f6c8-4be9-af58-9e38fcc4c2a4",
"name": "Sra. Priscila Santos Filho",
"code": "PRD-551145",
"unit": {
"id": "a27bfbc4-f4df-4145-af58-34ad1395dd5d",
"name": "Sr. Gian Filipe Burgos Sobrinho",
"abbreviation": "Sra. Daniella Campos Vasques"
}
},
"quantity": 628.2283,
"quantity_fulfilled": 0,
"quantity_pending": 628.2283,
"is_fulfilled": false,
"is_partially_fulfilled": false,
"observation": null,
"created_at": null,
"updated_at": null
},
{
"id": "0fa73035-973f-33fa-91d3-68278e688e5e",
"product": {
"id": "a27bfbc5-19a1-41a4-8398-60e604d169eb",
"name": "Dr. Josefina Rosa Dias Sobrinho",
"code": "PRD-848537",
"unit": {
"id": "a27bfbc5-1807-4a89-9bd7-c22f3b6b0ce3",
"name": "Eloá Suzana Lovato",
"abbreviation": "Adriel Matias Marés Sobrinho"
}
},
"quantity": 806.097,
"quantity_fulfilled": 0,
"quantity_pending": 806.097,
"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 P831v6hbEDf5eakcdagV64Z" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"033cac09-b874-3f07-a806-40fe98958d80\",
\"work_location_id\": \"cd6aa0af-ce90-36b0-824a-155b3ae92f38\",
\"status_id\": \"5ddcf954-87cc-310e-8cf8-3f6fa342ae1d\",
\"priority\": \"Example Priority\",
\"needed_at\": \"Example Needed at\",
\"items\": [
{
\"product_id\": \"e82b2ec7-0fa0-3357-8a68-8a10e96a08c8\",
\"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 P831v6hbEDf5eakcdagV64Z",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "033cac09-b874-3f07-a806-40fe98958d80",
"work_location_id": "cd6aa0af-ce90-36b0-824a-155b3ae92f38",
"status_id": "5ddcf954-87cc-310e-8cf8-3f6fa342ae1d",
"priority": "Example Priority",
"needed_at": "Example Needed at",
"items": [
{
"product_id": "e82b2ec7-0fa0-3357-8a68-8a10e96a08c8",
"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/est" \
--header "Authorization: Bearer vfZ34a1VE8Pe6hcd5Dagbk6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"work_id\": \"6f2f2ac9-b9c3-3e8e-8caa-d828f11c7024\",
\"work_location_id\": \"b91cd10e-7f9c-31d8-8907-efd3e0d2e946\",
\"status_id\": \"b99e9052-6c61-38f2-8b62-f05bb0898630\",
\"priority\": \"Example Priority\",
\"needed_at\": \"Example Needed at\",
\"items\": [
{
\"id\": \"649d2ce9-a26f-3f64-9a95-83b4b67387da\",
\"product_id\": \"9d9e214c-b84b-3bca-b69e-5bafd7887cce\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/est"
);
const headers = {
"Authorization": "Bearer vfZ34a1VE8Pe6hcd5Dagbk6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"work_id": "6f2f2ac9-b9c3-3e8e-8caa-d828f11c7024",
"work_location_id": "b91cd10e-7f9c-31d8-8907-efd3e0d2e946",
"status_id": "b99e9052-6c61-38f2-8b62-f05bb0898630",
"priority": "Example Priority",
"needed_at": "Example Needed at",
"items": [
{
"id": "649d2ce9-a26f-3f64-9a95-83b4b67387da",
"product_id": "9d9e214c-b84b-3bca-b69e-5bafd7887cce",
"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/aspernatur" \
--header "Authorization: Bearer 3aPkb486gd5hf1va6DZeEVc" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/aspernatur"
);
const headers = {
"Authorization": "Bearer 3aPkb486gd5hf1va6DZeEVc",
"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/nihil/approve" \
--header "Authorization: Bearer eacda8v5f3khZ64PbgE16DV" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/nihil/approve"
);
const headers = {
"Authorization": "Bearer eacda8v5f3khZ64PbgE16DV",
"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/maxime/reject" \
--header "Authorization: Bearer a3Pv8khf5gaD664bVdZecE1" \
--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/maxime/reject"
);
const headers = {
"Authorization": "Bearer a3Pv8khf5gaD664bVdZecE1",
"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/officia/items" \
--header "Authorization: Bearer ech8vg6aE4Zf1PdVD35kb6a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"product_id\": \"321e1ec4-e495-37f5-8e02-d59d49900f6c\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/officia/items"
);
const headers = {
"Authorization": "Bearer ech8vg6aE4Zf1PdVD35kb6a",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"product_id": "321e1ec4-e495-37f5-8e02-d59d49900f6c",
"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/animi" \
--header "Authorization: Bearer 68aZVd3c6bPah5ekE1fDvg4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"quantity\": 1,
\"observation\": \"Example Observation\",
\"status_id\": \"cedd8d2e-e3a4-385d-b5cd-a187076ada09\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/items/animi"
);
const headers = {
"Authorization": "Bearer 68aZVd3c6bPah5ekE1fDvg4",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quantity": 1,
"observation": "Example Observation",
"status_id": "cedd8d2e-e3a4-385d-b5cd-a187076ada09"
};
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/quas/items" \
--header "Authorization: Bearer b4agDakcEPvf613e6hd85VZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"b62ed613-194c-36a8-915f-738900a769b8\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/quas/items"
);
const headers = {
"Authorization": "Bearer b4agDakcEPvf613e6hd85VZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"b62ed613-194c-36a8-915f-738900a769b8"
]
};
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/dolor/sync-items" \
--header "Authorization: Bearer Ph3166fkDZbEec8gV54daav" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"id\": \"5a20d8e6-2e42-3bc4-aa92-13d2dd6a348d\",
\"product_id\": \"e2f60d16-21c5-3f01-a8b1-37a5ec47a0cc\",
\"quantity\": 1,
\"observation\": \"Example Items * observation\"
},
null
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/product-requests/dolor/sync-items"
);
const headers = {
"Authorization": "Bearer Ph3166fkDZbEec8gV54daav",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"id": "5a20d8e6-2e42-3bc4-aa92-13d2dd6a348d",
"product_id": "e2f60d16-21c5-3f01-a8b1-37a5ec47a0cc",
"quantity": 1,
"observation": "Example Items * observation"
},
null
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": "object"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Products
Endpoints for products
List products
requires authentication product index
List all products
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/products?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Brick&code=PROD-00003" \
--header "Authorization: Bearer E6vVgcba5dZfD1ak683P4he" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products"
);
const params = {
"sort_by": "created_at",
"sort_desc": "1",
"page": "1",
"per_page": "15",
"q": "Brick",
"code": "PROD-00003",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer E6vVgcba5dZfD1ak683P4he",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "71ff6115-bd81-31f0-a408-a50c79e5cf91",
"name": "Srta. Laiane Salas Valência",
"code": "PRD-012863",
"stock": 58014705,
"product_family": {
"id": "a27bfbc2-1aa3-47e4-aa06-1b573c4551de",
"name": "Anderson Aragão Serna Filho"
},
"product_brand": {
"id": "a27bfbc2-1dfb-42ee-846e-e90dfde8f4cf",
"name": "Sr. Miguel Teobaldo da Silva Filho"
},
"unit": {
"id": "a27bfbc2-2258-403c-8522-6805af559b08",
"name": "Thales Artur Casanova Sobrinho",
"abbreviation": "William Alcantara Jr."
},
"image": {
"id": null,
"url": null
},
"description": "Quos minus impedit voluptatum ut explicabo aut.",
"created_at": null,
"updated_at": null
},
{
"id": "b07fd804-5f61-3baa-8c5b-8be8d5e69ca6",
"name": "Dr. Daniella Marina Mendonça",
"code": "PRD-883347",
"stock": 8074,
"product_family": {
"id": "a27bfbc2-2b35-4aa6-93f4-fd1558168fee",
"name": "Ivan Carlos Matos Sobrinho"
},
"product_brand": {
"id": "a27bfbc2-2d3e-40c6-b9df-46a9b2ed7914",
"name": "Benício Velasques Fonseca"
},
"unit": {
"id": "a27bfbc2-301c-4215-934e-9c4c887b1e9c",
"name": "Marco Carvalho Neto",
"abbreviation": "Eunice Ferraz Jr."
},
"image": {
"id": null,
"url": null
},
"description": "Eum aut cum aut nulla eos.",
"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 P5f8vD64ZVahbkae1E3dcg6" \
--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 P5f8vD64ZVahbkae1E3dcg6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a89454a0-b189-30f3-a85b-e374f43765df",
"name": "Dr. Melina Karine Saito Neto",
"code": "PRD-437953",
"stock": 2156,
"product_family": {
"id": "a27bfbc2-3a4e-44bb-9db6-fe973ddbc770",
"name": "Cíntia Stephanie Marques"
},
"product_brand": {
"id": "a27bfbc2-3c40-4946-9e2c-33a3e8e1057b",
"name": "Alexa Marques"
},
"unit": {
"id": "a27bfbc2-3e2e-4c93-9af5-eb3a705e313f",
"name": "Gabrielly Taís Aranda Filho",
"abbreviation": "Kauan Sérgio Dias"
},
"image": {
"id": null,
"url": null
},
"description": "Esse dolores sit velit optio sit optio velit.",
"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/similique/available-origins" \
--header "Authorization: Bearer P68aeEfah16dZcbDvk5g34V" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/similique/available-origins"
);
const headers = {
"Authorization": "Bearer P68aeEfah16dZcbDvk5g34V",
"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 v64Vbf6358ZDEcgah1kPeda" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"product_family_id\": \"84109a5f-32cb-3512-83c3-180677c1f079\",
\"product_brand_id\": \"feba62d8-d576-364d-a1da-6aa54521d330\",
\"unit_id\": \"f864e656-2d9c-3b31-b40a-73411d15eaf6\",
\"description\": \"Example Description\",
\"stock\": 1
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products"
);
const headers = {
"Authorization": "Bearer v64Vbf6358ZDEcgah1kPeda",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"product_family_id": "84109a5f-32cb-3512-83c3-180677c1f079",
"product_brand_id": "feba62d8-d576-364d-a1da-6aa54521d330",
"unit_id": "f864e656-2d9c-3b31-b40a-73411d15eaf6",
"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 661db48VZPcEDekvgah5af3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"product_family_id\": \"9949542a-50cc-3e00-8116-1be6a201d060\",
\"product_brand_id\": \"6f9d1cfb-bc58-37d7-889e-580fbf251b55\",
\"unit_id\": \"521e70b0-1274-33a9-ae37-b129fda3884d\",
\"stock\": 1,
\"description\": \"Example Description\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/1"
);
const headers = {
"Authorization": "Bearer 661db48VZPcEDekvgah5af3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"product_family_id": "9949542a-50cc-3e00-8116-1be6a201d060",
"product_brand_id": "6f9d1cfb-bc58-37d7-889e-580fbf251b55",
"unit_id": "521e70b0-1274-33a9-ae37-b129fda3884d",
"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/porro" \
--header "Authorization: Bearer g41f8VdPe6Z5a6back3EhDv" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/products/porro"
);
const headers = {
"Authorization": "Bearer g41f8VdPe6Z5a6back3EhDv",
"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/bc11685e-0459-3ff5-aa74-edeb8d6bfded/versions" \
--header "Authorization: Bearer a64dDvP3ce8kgV5Efha61Zb" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"notes\": \"Example Notes\",
\"responsible_user_id\": \"59beec1b-d7df-339c-b38b-1119104086e4\",
\"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/bc11685e-0459-3ff5-aa74-edeb8d6bfded/versions"
);
const headers = {
"Authorization": "Bearer a64dDvP3ce8kgV5Efha61Zb",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"notes": "Example Notes",
"responsible_user_id": "59beec1b-d7df-339c-b38b-1119104086e4",
"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/0627904e-9e08-321b-a4b9-6d11c7a7c057/versions" \
--header "Authorization: Bearer 468vfDZ5gV6acPa3dEbkeh1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/0627904e-9e08-321b-a4b9-6d11c7a7c057/versions"
);
const headers = {
"Authorization": "Bearer 468vfDZ5gV6acPa3dEbkeh1",
"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/1f238683-e092-39dc-963e-1132e76b401d" \
--header "Authorization: Bearer 3ZagvDkfPE864Veabc1d6h5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/1f238683-e092-39dc-963e-1132e76b401d"
);
const headers = {
"Authorization": "Bearer 3ZagvDkfPE864Veabc1d6h5",
"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/4d9a053b-ff40-3da4-ba01-7a31efadde45/download" \
--header "Authorization: Bearer DP4Zk3hbg6aefvVEdac8561" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/4d9a053b-ff40-3da4-ba01-7a31efadde45/download"
);
const headers = {
"Authorization": "Bearer DP4Zk3hbg6aefvVEdac8561",
"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/0c0dba68-ad2b-344a-935c-35ffa278e76d/restore" \
--header "Authorization: Bearer 4v6hV68Eedc3DbagZfP5ak1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/0c0dba68-ad2b-344a-935c-35ffa278e76d/restore"
);
const headers = {
"Authorization": "Bearer 4v6hV68Eedc3DbagZfP5ak1",
"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/6c0c73b6-9d10-39fb-80dd-3809a1a0c2b6" \
--header "Authorization: Bearer adaPkV63EZfe581cbh6gvD4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/project-versions/6c0c73b6-9d10-39fb-80dd-3809a1a0c2b6"
);
const headers = {
"Authorization": "Bearer adaPkV63EZfe581cbh6gvD4",
"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=69ec2472-8792-3d38-b877-ab1b81eda43a&work_id=e985d97f-30da-3f78-9f56-2990def36fc0&status_id=339ff0c8-c872-350d-b968-4574a2d1f819&responsible_id=ca929b72-4f54-3a28-a03c-b6715864bcd4" \
--header "Authorization: Bearer 8EVk4e6avD6P3gdahZ5f1cb" \
--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": "69ec2472-8792-3d38-b877-ab1b81eda43a",
"work_id": "e985d97f-30da-3f78-9f56-2990def36fc0",
"status_id": "339ff0c8-c872-350d-b968-4574a2d1f819",
"responsible_id": "ca929b72-4f54-3a28-a03c-b6715864bcd4",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 8EVk4e6avD6P3gdahZ5f1cb",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "c689e2e2-3ae3-32ca-b55f-911f3e5cd6ad",
"name": "Repellendus amet aut",
"description": "Dolorem quis eum doloribus.",
"current_version": 1,
"file": {
"path": "projects/f5c1cf59-7c85-30da-ad11-d231c5466caf.pdf",
"size": "4822593",
"extension": "pdf"
},
"discipline": {
"id": "a27bfbc8-5cc7-4ada-bb6a-b0b26acd7485",
"name": "Et",
"code": "MUF"
},
"created_at": null,
"updated_at": null
},
{
"id": "5cd589a4-03b0-3749-9a10-e6ddb66b1500",
"name": "Maxime facilis amet",
"description": "Aliquam voluptatem impedit ullam.",
"current_version": 1,
"file": {
"path": "projects/48652a59-6e46-3583-a8ba-0d24c37e574a.pdf",
"size": "4609817",
"extension": "pdf"
},
"discipline": {
"id": "a27bfbc8-6090-4d0a-aaa2-bcdbba645453",
"name": "Est",
"code": "VTT"
},
"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/12" \
--header "Authorization: Bearer 8Vk4af5dPbgEeDZvc6a361h" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/12"
);
const headers = {
"Authorization": "Bearer 8Vk4af5dPbgEeDZvc6a361h",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "694ce117-9a60-3aa5-9292-8f006ba5c47d",
"name": "Placeat voluptatem consequatur",
"description": "Voluptatem natus occaecati sit omnis quo aliquid.",
"current_version": 1,
"file": {
"path": "projects/20bb1f3d-f4a0-355c-ba1a-898818e94428.pdf",
"size": "1751997",
"extension": "pdf"
},
"discipline": {
"id": "a27bfbc8-6b5e-405b-9868-782aa1460298",
"name": "Et",
"code": "IPB"
},
"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 5EPZ48aeb1kDav6cgh3df6V" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"discipline_id\": \"e6213d39-3e9f-33bd-b548-872a7ad2aa49\",
\"work_id\": \"1d903fa3-3927-37d6-8ae8-03f812f2deef\",
\"responsible_user_id\": \"2927fc30-f0fd-3293-83da-15089a7204e6\",
\"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 5EPZ48aeb1kDav6cgh3df6V",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"discipline_id": "e6213d39-3e9f-33bd-b548-872a7ad2aa49",
"work_id": "1d903fa3-3927-37d6-8ae8-03f812f2deef",
"responsible_user_id": "2927fc30-f0fd-3293-83da-15089a7204e6",
"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/9" \
--header "Authorization: Bearer 3ZfvE661Ph5akcaegV4d8Db" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"description\": \"Example Description\",
\"discipline_id\": \"457d6042-4941-326d-a009-ce50c894827f\",
\"work_id\": \"4e0ac4b2-327b-3746-bd7d-edc70910ea1f\",
\"responsible_user_id\": \"dfc2b338-d7d4-361e-bacb-976213288216\",
\"status_id\": \"b02055bb-ebe8-32ff-91ef-7e4843358659\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/9"
);
const headers = {
"Authorization": "Bearer 3ZfvE661Ph5akcaegV4d8Db",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"description": "Example Description",
"discipline_id": "457d6042-4941-326d-a009-ce50c894827f",
"work_id": "4e0ac4b2-327b-3746-bd7d-edc70910ea1f",
"responsible_user_id": "dfc2b338-d7d4-361e-bacb-976213288216",
"status_id": "b02055bb-ebe8-32ff-91ef-7e4843358659"
};
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/ut" \
--header "Authorization: Bearer 8kZgD6avh5E1346cfdaVbPe" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/projects/ut"
);
const headers = {
"Authorization": "Bearer 8kZgD6avh5E1346cfdaVbPe",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reports
Generate RDO PDF
requires authentication daily-log show
Dispatches async PDF generation. Frontend receives notification via Pusher when ready.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/daily-log" \
--header "Authorization: Bearer eafD3bdvgE68VacP1kZ5h46" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"daily_log\": \"in\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/daily-log"
);
const headers = {
"Authorization": "Bearer eafD3bdvgE68VacP1kZ5h46",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"daily_log": "in"
};
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 6kah48dgD3ZefV1b6PEvc5a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"employee\": \"consequatur\",
\"kit_uuid\": \"d132d0dc-d71c-3f3e-bf56-604024a33362\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/reports/epi-term"
);
const headers = {
"Authorization": "Bearer 6kah48dgD3ZefV1b6PEvc5a",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"employee": "consequatur",
"kit_uuid": "d132d0dc-d71c-3f3e-bf56-604024a33362"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Export Cash Flow to Excel
requires authentication No specific permission required
Dispatches async Excel generation. Frontend receives notification via Pusher when ready.
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/reports/cash-flow/excel?q=voluptates&type=entrada&description=Iste+placeat+ut+cumque+qui+quia+nesciunt+voluptas.&categories[]=d39d8246-c7fb-3fcb-ac7d-36db96abb969&exclude_categories[]=a445a4b8-4c2e-39c2-973a-b22f82cab460&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=6d4342c5-55e6-3d8b-8ecb-356e48e1a686&customers[]=a3c3c793-6b71-315b-8db9-731f4e2fbbe8&suppliers[]=91764cdb-437b-3b6b-8e71-c7328e069ea1&cash_session=8d491b97-24ab-3397-9b46-f4c8b8f86ce2&works[]=76c4a43e-eea9-32f5-bb15-dd2d72b68122" \
--header "Authorization: Bearer bkcevEg3654a6d81fDZVhaP" \
--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": "voluptates",
"type": "entrada",
"description": "Iste placeat ut cumque qui quia nesciunt voluptas.",
"categories[0]": "d39d8246-c7fb-3fcb-ac7d-36db96abb969",
"exclude_categories[0]": "a445a4b8-4c2e-39c2-973a-b22f82cab460",
"date_start": "2026-01-01",
"date_end": "2026-12-31",
"bank_accounts[0]": "6d4342c5-55e6-3d8b-8ecb-356e48e1a686",
"customers[0]": "a3c3c793-6b71-315b-8db9-731f4e2fbbe8",
"suppliers[0]": "91764cdb-437b-3b6b-8e71-c7328e069ea1",
"cash_session": "8d491b97-24ab-3397-9b46-f4c8b8f86ce2",
"works[0]": "76c4a43e-eea9-32f5-bb15-dd2d72b68122",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer bkcevEg3654a6d81fDZVhaP",
"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=est&type=entrada&description=Est+voluptatem+id+voluptas+eligendi+quo+consectetur.&categories[]=473cb623-7db2-3873-9c55-db87cde9f298&exclude_categories[]=dec903be-de28-3e35-9bdb-bc47a990a297&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=3705a25e-c3b0-3d86-af2c-efceb50548fb&customers[]=55ed88fe-a1d6-340c-a047-a040890e6f61&suppliers[]=642784b8-352e-3f89-90ae-54412b73f712&cash_session=98727502-da25-33cf-84ab-4049cc31fe50&works[]=b5164bde-0b13-379a-8dbf-232cbfc4772a" \
--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": "est",
"type": "entrada",
"description": "Est voluptatem id voluptas eligendi quo consectetur.",
"categories[0]": "473cb623-7db2-3873-9c55-db87cde9f298",
"exclude_categories[0]": "dec903be-de28-3e35-9bdb-bc47a990a297",
"date_start": "2026-01-01",
"date_end": "2026-12-31",
"bank_accounts[0]": "3705a25e-c3b0-3d86-af2c-efceb50548fb",
"customers[0]": "55ed88fe-a1d6-340c-a047-a040890e6f61",
"suppliers[0]": "642784b8-352e-3f89-90ae-54412b73f712",
"cash_session": "98727502-da25-33cf-84ab-4049cc31fe50",
"works[0]": "b5164bde-0b13-379a-8dbf-232cbfc4772a",
};
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 gZkdbv6h1aPaEcD5Vfe3864" \
--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 gZkdbv6h1aPaEcD5Vfe3864",
"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 e13aDav66kb5h4Pdg8fEVcZ" \
--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 e13aDav66kb5h4Pdg8fEVcZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "f59e11d0-fe53-33ca-aae4-ae727f9f9575",
"name": "repudiandae autem",
"slug": null,
"description": "In quis saepe ut. Ex tenetur soluta alias facilis. Laborum ipsam natus hic incidunt corrupti vel culpa.",
"abbreviation": "ggm",
"created_at": null,
"updated_at": null
},
{
"id": "618f1db1-83c3-301c-ac76-022d987019a3",
"name": "recusandae qui",
"slug": null,
"description": null,
"abbreviation": null,
"created_at": null,
"updated_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create sector
requires authentication sector store
Create a new sector
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/sectors" \
--header "Authorization: Bearer a6aPfe1hv4c6Z5E3DgV8kbd" \
--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 a6aPfe1hv4c6Z5E3DgV8kbd",
"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/10" \
--header "Authorization: Bearer haaf4k36vdDc5bZ16VgEP8e" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/10"
);
const headers = {
"Authorization": "Bearer haaf4k36vdDc5bZ16VgEP8e",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "60762cdf-0036-31eb-8d81-8af02c93e2f2",
"name": "laudantium ratione",
"slug": null,
"description": null,
"abbreviation": null,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update sector
requires authentication sector update
Update a sector
Example request:
curl --request PUT \
"https://api.bs-homolog.pensou.app.br/api/sectors/13" \
--header "Authorization: Bearer 1Ee56h4b86VZkcPa3Dadfvg" \
--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/13"
);
const headers = {
"Authorization": "Bearer 1Ee56h4b86VZkcPa3Dadfvg",
"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/3" \
--header "Authorization: Bearer bdva1e664VEZPafk8ghc53D" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/3"
);
const headers = {
"Authorization": "Bearer bdva1e664VEZPafk8ghc53D",
"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 45VcZa3EgPb8d66kfDv1eha" \
--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 45VcZa3EgPb8d66kfDv1eha",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "8050b00c-33fa-333d-a437-79d5ae43f6e2",
"name": "Crystal Yost",
"username": "hertha.rodriguez",
"email": "williamson.alvena@example.net",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "3a641216-8f4b-3953-8b97-3ad475b10cce",
"name": "Mrs. Stephany Klocko",
"username": "koelpin.jewell",
"email": "zthompson@example.com",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Attach users to sector
requires authentication sector users attach
Attach users to a sector without removing existing ones. Expects an array of user UUIDs in the "users" field.
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/attach" \
--header "Authorization: Bearer bPgV4d8eZ6ka3fD6cavE51h" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"af58c151-5ac5-3ef0-94c8-81732cdf3d0e\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/attach"
);
const headers = {
"Authorization": "Bearer bPgV4d8eZ6ka3fD6cavE51h",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"af58c151-5ac5-3ef0-94c8-81732cdf3d0e"
]
};
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 3DEc6agVbv1aZ6f54kehd8P" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"06d0e7cc-d947-3767-9d7a-22101bd20b56\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/detach"
);
const headers = {
"Authorization": "Bearer 3DEc6agVbv1aZ6f54kehd8P",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"06d0e7cc-d947-3767-9d7a-22101bd20b56"
]
};
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 b3Pa5gvD6a6cE48Vdf1hZek" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"a73a1ac6-e8ed-34e4-aefa-92f71560d83d\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/sync"
);
const headers = {
"Authorization": "Bearer b3Pa5gvD6a6cE48Vdf1hZek",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"a73a1ac6-e8ed-34e4-aefa-92f71560d83d"
]
};
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 a1b6fvZed8caE4DV6Pgh5k3" \
--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 a1b6fvZed8caE4DV6Pgh5k3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"name": "molestiae sunt",
"slug": "fugiat-quas-minima-aut-soluta"
},
{
"name": "qui eveniet",
"slug": "voluptatum-nisi-possimus-dolores-libero-sit-dolorem-maxime"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Statuses
Endpoints for statuses
List statuses
requires authentication status index
List all statuses
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/statuses?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Em+andamento&module=work§or_id=019556e7-2e9f-777c-a177-30bbf0646c32" \
--header "Authorization: Bearer 5vf8gD34d61hVbkaPZeca6E" \
--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 5vf8gD34d61hVbkaPZeca6E",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "1e63265e-6eb4-31ab-b432-eccb8bc20889",
"slug": null,
"name": null,
"description": "Tessália Escobar",
"abbreviation": "amet",
"color": "#bd043b",
"text_color": "#86884c",
"created_at": null,
"updated_at": null
},
{
"id": "dbb0a78d-7003-384f-b28f-8211388e0085",
"slug": null,
"name": null,
"description": "Sra. Melissa Tainara Leon Neto",
"abbreviation": "deserunt",
"color": "#c88fc2",
"text_color": "#60009a",
"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 EvDk5ca316e6gPfdVhZ8ab4" \
--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\": \"c5edada0-18aa-3e1e-9be0-9c937e0e1c22\",
\"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 EvDk5ca316e6gPfdVhZ8ab4",
"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": "c5edada0-18aa-3e1e-9be0-9c937e0e1c22",
"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 6g8vEZePha36a4kcVbdD5f1" \
--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 6g8vEZePha36a4kcVbdD5f1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "c2bf3622-e8bc-3dc6-b717-534f83ebcd2d",
"slug": null,
"name": null,
"description": "Rodolfo Gusmão Maia Filho",
"abbreviation": "distinctio",
"color": "#e553a2",
"text_color": "#b786f5",
"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 ehba5gkE6DcVd1Zv38f6Pa4" \
--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\": \"d9c9507e-9cca-3aed-9fb4-37a61a42c7df\",
\"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 ehba5gkE6DcVd1Zv38f6Pa4",
"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": "d9c9507e-9cca-3aed-9fb4-37a61a42c7df",
"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 4DkV65c8deEb61vfhaagZ3P" \
--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 4DkV65c8deEb61vfhaagZ3P",
"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 Eg651kbDV3cvaP8haZfe46d" \
--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 Eg651kbDV3cvaP8haZfe46d",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "655a5f2f-a69f-33ef-9fdf-644385b909d8",
"quantity": 422.8743,
"min_quantity": null,
"max_quantity": null,
"below_minimum": false,
"above_maximum": false,
"created_at": null,
"updated_at": null
},
{
"id": "9456bf84-03ca-32dc-a89d-0f15b8cb6633",
"quantity": 962.0832,
"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 8a5b146VekcPDZ6Edfg3hva" \
--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 8a5b146VekcPDZ6Edfg3hva",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "1140c0d0-4cb0-3705-886f-b317a65872a5",
"name": "Estoque Marinho Comercial Ltda.",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
},
{
"id": "1ddd22be-4912-31f0-abc7-ef4f369d947c",
"name": "Estoque Perez-Rangel",
"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 fePVcZavgE64hbD68k53a1d" \
--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 fePVcZavgE64hbD68k53a1d",
"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": "71f85641-5e97-3614-976f-a55b40d3d1d3",
"name": "Estoque Marin e Feliciano 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 5PdD3b4Z1kV6ech8vEfaa6g" \
--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 5PdD3b4Z1kV6ech8vEfaa6g",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "b907d5c3-58c5-3c5e-a7e9-2556b3baf90f",
"name": "Estoque Fonseca e Zamana Ltda.",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show stock
requires authentication stock show
Returns details of a specific stock
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/stocks/1" \
--header "Authorization: Bearer 48bDhEZevkPdagV66135cfa" \
--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 48bDhEZevkPdagV66135cfa",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "6ed1992c-bc7b-3142-81d2-dbd0920a39e7",
"name": "Estoque D'ávila e Mendonça 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 36bchVgfEkvdD4ea6ZPa581" \
--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 36bchVgfEkvdD4ea6ZPa581",
"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": "711699ff-cfdc-38c6-8ef7-fdc4c196480e",
"name": "Estoque Zambrano e Carvalho e Associados",
"module": "work",
"is_active": true,
"is_main": false,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete stock
requires authentication stock delete
Removes a stock (soft delete)
Example request:
curl --request DELETE \
"https://api.bs-homolog.pensou.app.br/api/stocks/1" \
--header "Authorization: Bearer V6v4gec38ZaPd1f6hEbDka5" \
--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 V6v4gec38ZaPd1f6hEbDka5",
"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 fahDv6346e5EPcdabg8kVZ1" \
--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 fahDv6346e5EPcdabg8kVZ1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "311f05d4-662c-3eb5-8179-4c53cef40e77",
"quantity": 836.7562,
"min_quantity": null,
"max_quantity": null,
"below_minimum": false,
"above_maximum": false,
"created_at": null,
"updated_at": null
},
{
"id": "45f7e77b-e2f6-3223-bab1-88ea39955186",
"quantity": 138.3042,
"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/nemo" \
--header "Authorization: Bearer aPekhVg68vZbfD34cda1E65" \
--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/nemo"
);
const headers = {
"Authorization": "Bearer aPekhVg68vZbfD34cda1E65",
"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": "06527943-9324-32c5-bc87-040fcaa8d235",
"quantity": 472.7119,
"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 E6vkb8V1d43gP6fe5ZaaDhc" \
--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 E6vkb8V1d43gP6fe5ZaaDhc",
"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 a16VDdEZa6fc5bekg84hPv3" \
--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 a16VDdEZa6fc5bekg84hPv3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "1327820b-a68b-3add-a9d6-416f562306d7",
"code": "MOV-312143",
"type": "ajuste saída",
"type_name": "ADJUSTMENT_OUT",
"is_entry": false,
"is_exit": true,
"quantity": 65.5285,
"previous_quantity": 221.4153,
"new_quantity": 155.8868,
"reason": null,
"movement_date": "2026-08-02T19:12:59.000000Z",
"created_at": null
},
{
"id": "cb1a4f07-86cb-3df7-94ad-1e7c29261bf4",
"code": "MOV-723984",
"type": "venda",
"type_name": "SALE",
"is_entry": false,
"is_exit": true,
"quantity": 3.15,
"previous_quantity": 890.3813,
"new_quantity": 887.2313,
"reason": null,
"movement_date": "2026-07-14T08:46:34.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 g3148aacZEbvPDh5fek6V6d" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"3dd19b6a-9b33-3164-a64a-7f0a8c4ef28f\",
\"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 g3148aacZEbvPDh5fek6V6d",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "3dd19b6a-9b33-3164-a64a-7f0a8c4ef28f",
"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": "8d089b21-d001-3c5c-81fa-702122730c35",
"code": "MOV-802700",
"type": "ajuste entrada",
"type_name": "ADJUSTMENT_IN",
"is_entry": true,
"is_exit": false,
"quantity": 47.4514,
"previous_quantity": 887.0112,
"new_quantity": 934.4626,
"reason": "Nobis velit distinctio assumenda et qui labore.",
"movement_date": "2026-07-21T20:29:16.000000Z",
"created_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 5bdkag36fveVZ4PE18a6cDh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"e6e6e953-b342-35a5-8379-f03803cecc8a\",
\"destination_stock_id\": \"4234b893-c701-35eb-9f10-5aaa2b1c7b6c\",
\"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 5bdkag36fveVZ4PE18a6cDh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "e6e6e953-b342-35a5-8379-f03803cecc8a",
"destination_stock_id": "4234b893-c701-35eb-9f10-5aaa2b1c7b6c",
"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": "f0b0f244-c39f-3efc-ad14-c01aef12f558",
"code": "MOV-443816",
"type": "produção",
"type_name": "PRODUCTION",
"is_entry": true,
"is_exit": false,
"quantity": 35.5537,
"previous_quantity": 846.0228,
"new_quantity": 881.5765,
"reason": "Quo corrupti qui doloremque laudantium quidem neque voluptatum.",
"movement_date": "2026-07-26T14:53:19.000000Z",
"created_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 vcDVEb1P63g6edf8Zkaha54" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"8fa2b657-4a43-372b-a555-1c6b23672398\",
\"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 vcDVEb1P63g6edf8Zkaha54",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "8fa2b657-4a43-372b-a555-1c6b23672398",
"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": "931e6166-9fed-317b-88a9-888486607c8c",
"code": "MOV-655120",
"type": "ajuste saída",
"type_name": "ADJUSTMENT_OUT",
"is_entry": false,
"is_exit": true,
"quantity": 73.123,
"previous_quantity": 317.6606,
"new_quantity": 244.5376,
"reason": null,
"movement_date": "2026-07-14T07:08:07.000000Z",
"created_at": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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 D56ge1kZ8c6fahb4vEd3VPa" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"fccb3d0d-ee3c-3cf1-beee-535b76030938\",
\"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 D56ge1kZ8c6fahb4vEd3VPa",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "fccb3d0d-ee3c-3cf1-beee-535b76030938",
"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": "3cc723dc-ebc6-3b64-8f37-31ab8d6a13d6",
"code": "MOV-736803",
"type": "ajuste saída",
"type_name": "ADJUSTMENT_OUT",
"is_entry": false,
"is_exit": true,
"quantity": 34.8112,
"previous_quantity": 841.7819,
"new_quantity": 806.9707,
"reason": null,
"movement_date": "2026-07-20T09:12:00.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 kvfh1gaV3eDZ66bE4Pad85c" \
--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 kvfh1gaV3eDZ66bE4Pad85c",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "04b1209a-ef80-331b-b5d5-6d500d8819d1",
"code": "MOV-819288",
"type": "ajuste saída",
"type_name": "ADJUSTMENT_OUT",
"is_entry": false,
"is_exit": true,
"quantity": 55.0239,
"previous_quantity": 776.9762,
"new_quantity": 721.9523,
"reason": null,
"movement_date": "2026-07-28T09:12:00.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 gVE6Z1fbakcd8D63vehPa45" \
--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 gVE6Z1fbakcd8D63vehPa45",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "0cc3a408-9af5-3fad-be21-4414a3551773",
"name": "Sr. Vitor Franco Montenegro Filho",
"email": "vicente.ferraz@example.com",
"phone": "(38) 92882-3314",
"document": "59.131.484/0001-50",
"type": "pj",
"responsible": "Gabrielly Bruna Galvão",
"image": {
"id": null,
"url": null
},
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
}
},
{
"id": "c85d1d76-5c6a-30b9-a127-2ba126117dfd",
"name": "Viviane Josefina Padilha",
"email": "wagner63@example.com",
"phone": "(16) 94083-6449",
"document": "37.602.445/0001-51",
"type": "pf",
"responsible": "Elisa Vitória Azevedo",
"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 e3a6b4Z5akDvVf61g8EdcPh" \
--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 e3a6b4Z5akDvVf61g8EdcPh",
"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 ZDeck1bVdP65ha834agf6vE" \
--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 ZDeck1bVdP65ha834agf6vE",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d967ba0f-7dc0-3f73-9640-2479638652ea",
"name": "Dr. Luis Toledo Sobrinho",
"email": "xsantos@example.org",
"phone": "(18) 90801-6852",
"document": "98.318.089/0001-33",
"type": "pj",
"responsible": "Sra. Léia Marés Barros",
"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 EgPadh5aVv1fkDZb3e68c64" \
--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 EgPadh5aVv1fkDZb3e68c64",
"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 VvagfDhEk5P6b3Z1a8dec64" \
--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 VvagfDhEk5P6b3Z1a8dec64",
"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 V1vgEPacDhd66ae34fb8kZ5" \
--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 V1vgEPacDhd66ae34fb8kZ5",
"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 4Zac56e8fEhdPV63k1bgvaD" \
--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 4Zac56e8fEhdPV63k1bgvaD",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "c6eb436a-b049-33a9-b8f0-edd11517186e",
"name": "Teobaldo Gomes Rodrigues Sobrinho",
"description": "Omnis voluptatum id deserunt laborum officiis est aut. Ratione ea est veritatis doloribus accusamus ut aperiam nemo. Aspernatur excepturi qui aut quae explicabo sunt.",
"type": "ajuste saída"
},
{
"id": "b9223c6d-f804-30ab-b4f2-21463320187e",
"name": "Srta. Pietra Louise Matos",
"description": "Vel ut natus vel error impedit quaerat. Eligendi quae dignissimos sit ut blanditiis non. Aliquid ullam aut ea quaerat.",
"type": "depósito"
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show transaction category
requires authentication transaction-category show
Show a transaction category
Example request:
curl --request GET \
--get "https://api.bs-homolog.pensou.app.br/api/transaction-categories/libero" \
--header "Authorization: Bearer aPD183agV45veZdkf6Eh6cb" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/transaction-categories/libero"
);
const headers = {
"Authorization": "Bearer aPD183agV45veZdkf6Eh6cb",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a14ce947-241c-3f24-a92e-8decf6cc5961",
"name": "Benjamin Ricardo Saraiva Neto",
"description": "Est ipsum et eum. Tempore et distinctio illo quo quia non et fugiat. Amet quisquam sapiente dicta ad fuga non. Et eos voluptate iusto mollitia perspiciatis. Earum velit alias est.",
"type": "saque"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create transaction category
requires authentication transaction-category store
Create a new transaction category
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/transaction-categories" \
--header "Authorization: Bearer f6aZD5b6aedc1Ek3vhP8g4V" \
--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 f6aZD5b6aedc1Ek3vhP8g4V",
"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/quos" \
--header "Authorization: Bearer 46hacD3eVZbEfP18g5dvka6" \
--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/quos"
);
const headers = {
"Authorization": "Bearer 46hacD3eVZbEfP18g5dvka6",
"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/incidunt" \
--header "Authorization: Bearer fhbae68vcg3Ed54aZVD6k1P" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/transaction-categories/incidunt"
);
const headers = {
"Authorization": "Bearer fhbae68vcg3Ed54aZVD6k1P",
"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 bVgDv13EZ65ahcPke6a8df4" \
--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 bVgDv13EZ65ahcPke6a8df4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "efa8197b-54d6-3f12-863f-1dcb8dbdadd3",
"name": "Alan Urias",
"abbreviation": "Nathalia Bárbara Maia",
"description": "Iure et optio ea.",
"created_at": null,
"updated_at": null
},
{
"id": "cff7c472-8444-3606-bd85-523079044051",
"name": "Wagner Santiago Campos",
"abbreviation": "Violeta Mendonça",
"description": "Quia et qui itaque.",
"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 a3hb5adEf846vDckeVZPg61" \
--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 a3hb5adEf846vDckeVZPg61",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "08b68ec6-3ca6-3ce9-8fe5-47c862a8fce0",
"name": "Sr. Caio Hugo Beltrão Jr.",
"abbreviation": "Ellen Betina Prado Neto",
"description": "Omnis ipsum officiis harum.",
"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 EP46gcaVDZk56h8fabv13de" \
--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 EP46gcaVDZk56h8fabv13de",
"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 Zv3b54a6dg8cVDfea1hEPk6" \
--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 Zv3b54a6dg8cVDfea1hEPk6",
"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/quo" \
--header "Authorization: Bearer kE6ehdaab4vf53cP1DV86gZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/units/quo"
);
const headers = {
"Authorization": "Bearer kE6ehdaab4vf53cP1DV86gZ",
"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 Ddabe3fVP6c568ZgEah14kv" \
--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 Ddabe3fVP6c568ZgEah14kv",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "7a7d8717-d34b-3353-a89b-bb28c8996f3a",
"name": "Timmothy Altenwerth",
"username": "kailee.medhurst",
"email": "fay15@example.org",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "7c59f57d-4df2-358f-a425-440de1096f33",
"name": "Una Ritchie",
"username": "stark.paris",
"email": "xabernathy@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 EfcbehaDkgP5V41va6638Zd" \
--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 EfcbehaDkgP5V41va6638Zd",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "1fc032b6-3e1c-300f-aa90-e32ffaf1b53a",
"name": "Ms. Joanie Pfeffer Sr.",
"username": "kuphal.cristina",
"email": "ffahey@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 kZ458gPeV1Ev6af3dacbhD6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"abagail.beier\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"e62541cd-c185-3a9d-a485-e7be3fe6cab1\"
],
\"roles\": [
\"a769b27e-80aa-3ed0-be35-181bd354d99a\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users"
);
const headers = {
"Authorization": "Bearer kZ458gPeV1Ev6af3dacbhD6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "abagail.beier",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"e62541cd-c185-3a9d-a485-e7be3fe6cab1"
],
"roles": [
"a769b27e-80aa-3ed0-be35-181bd354d99a"
]
};
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 bga1adkh686Pv4e3ZcVf5DE" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"certification\": \"Example Certification\",
\"crea\": \"Example Crea\",
\"email\": \"user@example.com\",
\"username\": \"bgulgowski\",
\"password\": \"password123\",
\"image\": {
\"0\": \"example1\",
\"1\": \"example2\",
\"path\": \"Example Image path\",
\"name\": \"Example Name\",
\"extension\": \"Example Image extension\",
\"size\": \"Example Image size\"
},
\"sectors\": [
\"28d1c191-ba4e-3cf3-b219-af5df50f6ade\"
],
\"roles\": [
\"b6108182-0a1f-3c70-a310-b332e3e2f963\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users/1"
);
const headers = {
"Authorization": "Bearer bga1adkh686Pv4e3ZcVf5DE",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"certification": "Example Certification",
"crea": "Example Crea",
"email": "user@example.com",
"username": "bgulgowski",
"password": "password123",
"image": {
"0": "example1",
"1": "example2",
"path": "Example Image path",
"name": "Example Name",
"extension": "Example Image extension",
"size": "Example Image size"
},
"sectors": [
"28d1c191-ba4e-3cf3-b219-af5df50f6ade"
],
"roles": [
"b6108182-0a1f-3c70-a310-b332e3e2f963"
]
};
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 aZ8v61PdEfkbceg5a6hD3V4" \
--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 aZ8v61PdEfkbceg5a6hD3V4",
"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 18f4kv6Ddgaa36c5PZVbehE" \
--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 18f4kv6Ddgaa36c5PZVbehE",
"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 ckgPf63a5d8v4abVh1EDZ6e" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permissions\": [
\"6e2c9114-c331-3a56-886a-e5721ca1f936\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/users/1/permissions"
);
const headers = {
"Authorization": "Bearer ckgPf63a5d8v4abVh1EDZ6e",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
"6e2c9114-c331-3a56-886a-e5721ca1f936"
]
};
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 16EPfgVade3cbkZ456vDh8a" \
--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 16EPfgVade3cbkZ456vDh8a",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"name": "eum",
"display_name": "Est voluptates consequatur maiores consequuntur et sunt."
},
{
"id": null,
"name": "minus",
"display_name": "Porro esse quos et dolorem quibusdam et."
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 aVvD6h1dacgP8ek3fEZ654b" \
--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 aVvD6h1dacgP8ek3fEZ654b",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "d6737348-3bbc-3a50-af3c-072dac904346",
"description": "Dr. Ronaldo Estrada",
"work": {
"id": null,
"name": null
},
"documents": [],
"created_at": null,
"updated_at": null
},
{
"id": "d1b6e63b-01f8-35f7-9b0a-cebf2c8230d9",
"description": "Norma Mendonça 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 gZeka4VEda8P1cD3v6b65fh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"description\": \"Example Description\",
\"work_id\": \"a26dfd1f-2969-3818-a301-0955cabf5bc3\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/work-locations"
);
const headers = {
"Authorization": "Bearer gZeka4VEda8P1cD3v6b65fh",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"description": "Example Description",
"work_id": "a26dfd1f-2969-3818-a301-0955cabf5bc3"
};
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 dV8Ehg51ka3af6DZvc4ePb6" \
--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 dV8Ehg51ka3af6DZvc4ePb6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "7047f32e-c0e7-3477-b2e4-ab0b62bf35cf",
"description": "Sr. Rafael Hernani Aranda Filho",
"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 aV8dv5e64aDgh631cPbfEkZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"description\": \"Example Description\",
\"work_id\": \"1b6ebbd4-af72-348c-86e4-44cf76ba433c\"
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/work-locations/019556e7-2e9f-777c-a177-30bbf0646c32"
);
const headers = {
"Authorization": "Bearer aV8dv5e64aDgh631cPbfEkZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"description": "Example Description",
"work_id": "1b6ebbd4-af72-348c-86e4-44cf76ba433c"
};
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 P65V4g8ZaD1fdb6aEchvke3" \
--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 P65V4g8ZaD1fdb6aEchvke3",
"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 cfdb56Paa8V46DkgEZ3veh1" \
--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 cfdb56Paa8V46DkgEZ3veh1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "c1db035c-0278-3834-a683-8515dbe88f5b",
"name": "Dr. Agustina de Oliveira",
"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": "1980-10-31 07:55:44.000000",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"created_at": null,
"updated_at": null
},
{
"id": "6a69387f-a4b8-340f-970e-a8c9e83c727d",
"name": "Sr. William Lozano Medina Filho",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"documents": [],
"locations": [],
"product_quantity_lists_count": 0,
"product_quantity_list_items_count": 0,
"product_requests_count": 0,
"product_request_items_count": 0,
"documents_count": 0,
"locations_documents_count": 0,
"total_documents_count": 0,
"daily_logs_count": 0,
"projects_count": 0,
"started_at": {
"date": "2008-01-19 12:15:44.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 3hDEfPa61eVca6kgd48b5Zv" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"customer_id\": \"7e9cfeb8-cadc-32c4-92d1-7ab465470fe3\",
\"status_id\": \"5ce2fb67-472d-39e9-9bad-f8966a9562b7\",
\"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 3hDEfPa61eVca6kgd48b5Zv",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"customer_id": "7e9cfeb8-cadc-32c4-92d1-7ab465470fe3",
"status_id": "5ce2fb67-472d-39e9-9bad-f8966a9562b7",
"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 dV5ab4ec3PE86vfZhDa6kg1" \
--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 dV5ab4ec3PE86vfZhDa6kg1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "f960f77d-a25c-31c8-a1a5-88bfd205b6d1",
"name": "Dr. Camilo Correia Godói",
"address": {
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"zip_code": null
},
"documents": [],
"locations": [],
"product_quantity_lists_count": 0,
"product_quantity_list_items_count": 0,
"product_requests_count": 0,
"product_request_items_count": 0,
"documents_count": 0,
"locations_documents_count": 0,
"total_documents_count": 0,
"daily_logs_count": 0,
"projects_count": 0,
"started_at": {
"date": "2014-08-28 03:11:31.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 5Z4381h6fkePVEgvDacabd6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Example Name\",
\"customer_id\": \"cc726f58-465e-3390-986c-23d870a7f099\",
\"status_id\": \"e4f46f0d-d45c-3461-a0c1-9a3413c4b5e9\",
\"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 5Z4381h6fkePVEgvDacabd6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Example Name",
"customer_id": "cc726f58-465e-3390-986c-23d870a7f099",
"status_id": "e4f46f0d-d45c-3461-a0c1-9a3413c4b5e9",
"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 hbgDkv656aZPaVE3fc41de8" \
--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 hbgDkv656aZPaVE3fc41de8",
"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 k4ahEP5Zvad36f1b8egDV6c" \
--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 k4ahEP5Zvad36f1b8egDV6c",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "8d8037a0-0b2c-3470-8741-5e6ec0ff5ab8",
"name": "Ocie Runte DDS",
"username": "uledner",
"email": "rhoda.vandervort@example.com",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
},
{
"id": "139855fd-7150-323b-ae34-aba13757a3e4",
"name": "Mr. Darwin Jacobs",
"username": "lueilwitz.jared",
"email": "sauer.laurianne@example.net",
"certification": null,
"crea": null,
"last_login_at": null,
"image": {
"id": null,
"url": null
},
"sectors": [],
"roles": []
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Próximo »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Attach responsibles to work
requires authentication work-responsibles attach
Attach users as responsibles to a work without removing existing ones
Example request:
curl --request POST \
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach" \
--header "Authorization: Bearer aPEahdv66Dg5cf3be8V14kZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"f4e38aca-8d3a-3bef-b150-9c3e3973541e\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach"
);
const headers = {
"Authorization": "Bearer aPEahdv66Dg5cf3be8V14kZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"f4e38aca-8d3a-3bef-b150-9c3e3973541e"
]
};
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 fkDPd6VEb85g13vc4aa6ehZ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"287ec69a-982f-377b-bad6-72cea2f3cbeb\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/detach"
);
const headers = {
"Authorization": "Bearer fkDPd6VEb85g13vc4aa6ehZ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"287ec69a-982f-377b-bad6-72cea2f3cbeb"
]
};
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 k5vPE8gh4cZaa6Vd6f1D3eb" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"users\": [
\"41a41314-c0bd-344f-8f93-410cf068cc53\"
]
}"
const url = new URL(
"https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/sync"
);
const headers = {
"Authorization": "Bearer k5vPE8gh4cZaa6Vd6f1D3eb",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"users": [
"41a41314-c0bd-344f-8f93-410cf068cc53"
]
};
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.