MENU navbar-image

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 861Zk65aP3hVdDgce4avfbE" \
    --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 861Zk65aP3hVdDgce4avfbE",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "41a6c147-dbfe-388b-bdc3-df2819c78a1b",
            "name": "delectus-6aedfa3c8f813",
            "display_name": "Laudantium et non ullam.",
            "permissions_count": null
        },
        {
            "id": "a838ef73-4be4-35f1-baea-8a02bc939059",
            "name": "voluptatum-6aedfa3c938ef",
            "display_name": "Aut est et et ut enim architecto odio iure.",
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/acl/roles

Headers

Authorization        

Example: Bearer 861Zk65aP3hVdDgce4avfbE

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

q   string  optional    

Search query. Example: Role name

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 kd5vaEaDhZ483b6gf6ec1PV" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"display_name\": \"Example Name\",
    \"permissions\": [
        \"09477fa9-9141-301a-b05a-5bdad15d2d08\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/acl/roles"
);

const headers = {
    "Authorization": "Bearer kd5vaEaDhZ483b6gf6ec1PV",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "display_name": "Example Name",
    "permissions": [
        "09477fa9-9141-301a-b05a-5bdad15d2d08"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "message": "string"
}
 

Request      

POST api/acl/roles

Headers

Authorization        

Example: Bearer kd5vaEaDhZ483b6gf6ec1PV

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Name. Example: Example Name

display_name   string     

Display name. Example: Example Name

permissions   string[]  optional    

Permissions *. The uuid of an existing record in the permissions table.

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 hDk46ev61d3PbEg5fca8ZaV" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"display_name\": \"Example Name\",
    \"permissions\": [
        \"7aa218e9-e0eb-34bb-bbba-4db7926cf300\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/acl/roles/1"
);

const headers = {
    "Authorization": "Bearer hDk46ev61d3PbEg5fca8ZaV",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "display_name": "Example Name",
    "permissions": [
        "7aa218e9-e0eb-34bb-bbba-4db7926cf300"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "string"
}
 

Request      

PUT api/acl/roles/{id}

Headers

Authorization        

Example: Bearer hDk46ev61d3PbEg5fca8ZaV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the role. Example: 1

Body Parameters

name   string  optional    

Name. Example: Example Name

display_name   string  optional    

Display name. Example: Example Name

permissions   string[]  optional    

Permissions *. The uuid of an existing record in the permissions table.

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 3c61gvabD84EVh6PfdaeZ5k" \
    --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 3c61gvabD84EVh6PfdaeZ5k",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "0b1ae0c7-5533-3fec-bfe9-1d85af51b1d2",
        "name": "facere-6aedfa3ca0835",
        "display_name": "Ipsam rem aut dolor magni velit exercitationem laboriosam.",
        "permissions_count": null
    }
}
 

Request      

GET api/acl/roles/{id}

Headers

Authorization        

Example: Bearer 3c61gvabD84EVh6PfdaeZ5k

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the role. Example: 1

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 3E6ev8h6fdZkPa5ac1Vbg4D" \
    --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 3E6ev8h6fdZkPa5ac1Vbg4D",
    "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": "Perspiciatis ut alias et reiciendis labore."
        },
        {
            "id": null,
            "name": "est",
            "display_name": "Architecto pariatur aut odit velit exercitationem."
        }
    ]
}
 

Request      

GET api/acl/roles/{role}/permissions

Headers

Authorization        

Example: Bearer 3E6ev8h6fdZkPa5ac1Vbg4D

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

role   integer     

The role. Example: 1

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 a3ec51agh8dZVb6kf4vE6PD" \
    --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 a3ec51agh8dZVb6kf4vE6PD",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/acl/roles/{role}

Headers

Authorization        

Example: Bearer a3ec51agh8dZVb6kf4vE6PD

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

role   integer     

The role. Example: 1

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 h8D6kv3eVP5Za4gcE1f6dba" \
    --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 h8D6kv3eVP5Za4gcE1f6dba",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "est",
            "display_name": "Temporibus reprehenderit molestiae et tempore voluptatibus."
        },
        {
            "id": null,
            "name": "voluptas",
            "display_name": "Ut qui magnam beatae dolores fugit dolorum earum ut."
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/acl/permissions

Headers

Authorization        

Example: Bearer h8D6kv3eVP5Za4gcE1f6dba

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

q   string  optional    

Search query. Example: Permission name

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 bD6c4E5a3hfevV6a1kZP8gd" \
    --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 bD6c4E5a3hfevV6a1kZP8gd",
    "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"
}
 

Request      

POST api/acl/permissions

Headers

Authorization        

Example: Bearer bD6c4E5a3hfevV6a1kZP8gd

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Name. Example: Example Name

display_name   string     

Display name. Example: Example Name

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 43k5dg8EVv6Pab1hD6Zafce" \
    --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 43k5dg8EVv6Pab1hD6Zafce",
    "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"
}
 

Request      

PUT api/acl/permissions/{id}

Headers

Authorization        

Example: Bearer 43k5dg8EVv6Pab1hD6Zafce

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the permission. Example: 1

Body Parameters

name   string  optional    

Name. Example: Example Name

display_name   string  optional    

Display name. Example: Example Name

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 gVd1b5Zhv4EeaP8a36fc6Dk" \
    --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 gVd1b5Zhv4EeaP8a36fc6Dk",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": null,
        "name": "maiores",
        "display_name": "Id voluptatibus minus ullam quae aut rerum."
    }
}
 

Request      

GET api/acl/permissions/{id}

Headers

Authorization        

Example: Bearer gVd1b5Zhv4EeaP8a36fc6Dk

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the permission. Example: 1

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 P6hvbcE1ke8gad35Z64DaVf" \
    --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 P6hvbcE1ke8gad35Z64DaVf",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/acl/permissions/{permission}

Headers

Authorization        

Example: Bearer P6hvbcE1ke8gad35Z64DaVf

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

permission   integer     

The permission. Example: 1

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 DkZde438vg6cafEa5V1Phb6" \
    --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 DkZde438vg6cafEa5V1Phb6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "df399040-1489-3a8d-adbc-0d97a04468cb",
            "code": null,
            "type": "saída",
            "payment_method": "boleto",
            "amount": 5042.57,
            "due_date": "2026-12-04T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Sit eveniet et labore aspernatur et fuga ducimus commodi magni praesentium.",
            "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": "sit",
            "field2": 8,
            "field3": false,
            "notes": "Aut aspernatur dolore id sed voluptates.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "e781b60c-92e2-39e8-930a-bdfca10c0812",
            "code": null,
            "type": "entrada",
            "payment_method": "cheque",
            "amount": 8125.51,
            "due_date": "2026-12-06T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Aut est et eligendi vitae aspernatur facere similique.",
            "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": "neque",
            "field2": 44,
            "field3": true,
            "notes": "Harum suscipit sapiente voluptas impedit.",
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/accounts-payable-receivable/reminders

Headers

Authorization        

Example: Bearer DkZde438vg6cafEa5V1Phb6

Content-Type        

Example: application/json

Accept        

Example: application/json

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[]=aut" \
    --header "Authorization: Bearer D6EveghfVd364aPa581bkcZ" \
    --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]": "aut",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer D6EveghfVd364aPa581bkcZ",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "string"
}
 

Request      

POST api/accounts-payable-receivable/reminders/mark-as-read

Headers

Authorization        

Example: Bearer D6EveghfVd364aPa581bkcZ

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

items   string[]     

The uuid of an existing record in the account_payable_receivables table.

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 6kcvef5hgDVdPE4Za8a3b16" \
    --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 6kcvef5hgDVdPE4Za8a3b16",
    "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"
}
 

Request      

GET api/accounts-payable-receivable/protests/summary

Headers

Authorization        

Example: Bearer 6kcvef5hgDVdPE4Za8a3b16

Content-Type        

Example: application/json

Accept        

Example: application/json

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[]=esse&suppliers[]=non&works[]=quo&cost_centers[]=reiciendis&statuses[]=cancelado&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-11-06T13%3A03%3A08&protest_date_end=2026-11-06T13%3A03%3A08&has_protest=&has_children=1&is_recurring=1" \
    --header "Authorization: Bearer e3a618hPc6bf4dVZEaDvg5k" \
    --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]": "esse",
    "suppliers[0]": "non",
    "works[0]": "quo",
    "cost_centers[0]": "reiciendis",
    "statuses[0]": "cancelado",
    "payment_method": "cheque",
    "date_start": "2023-01-01",
    "date_end": "2023-12-31",
    "protest_date_start": "2026-11-06T13:03:08",
    "protest_date_end": "2026-11-06T13:03:08",
    "has_protest": "0",
    "has_children": "1",
    "is_recurring": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer e3a618hPc6bf4dVZEaDvg5k",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "c31e5ac3-915a-3981-a2e2-2c41823b2a91",
            "code": null,
            "type": "saída",
            "payment_method": "cheque",
            "amount": 982.09,
            "due_date": "2026-11-23T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Velit molestiae id eius id quibusdam sint voluptatem quia nulla.",
            "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": "fugiat",
            "field2": 87,
            "field3": false,
            "notes": "Eius quo est est sapiente sequi ut mollitia.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "c6f2d6d9-9e9f-3a59-bb84-c8b6653332f2",
            "code": null,
            "type": "entrada",
            "payment_method": "cheque",
            "amount": 6870.53,
            "due_date": "2026-11-27T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Aut sit repellendus hic officia omnis amet dolorum et ut tenetur temporibus.",
            "is_recurring": null,
            "recurrence_config": null,
            "parent_id": null,
            "recurrence_order": 1,
            "total_recurrences": null,
            "children_count": 0,
            "remaining_recurrences": null,
            "has_children": false,
            "field1": "deleniti",
            "field2": 73,
            "field3": true,
            "notes": "Dolor perferendis molestias sed quis assumenda.",
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/accounts-payable-receivable/protests

Headers

Authorization        

Example: Bearer e3a618hPc6bf4dVZEaDvg5k

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Items per page. O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 10

q   string  optional    

Search query. Example: Salary

code   string  optional    

Filter by account code. Example: CPR-000123

type   string  optional    

Type. Example: entrada

Must be one of:
  • entrada
  • saída
customers   string[]  optional    

The uuid of an existing record in the customers table.

suppliers   string[]  optional    

The uuid of an existing record in the suppliers table.

works   string[]  optional    

The uuid of an existing record in the works table.

cost_centers   string[]  optional    

The uuid of an existing record in the cost_centers table.

statuses   string[]  optional    
Must be one of:
  • a vencer
  • pago
  • pago_sem_lancamento
  • vencido
  • recebido
  • cancelado
  • a protestar
  • protestado
payment_method   string  optional    

Payment method. Example: cheque

Must be one of:
  • cheque
  • boleto
  • pix
  • cartao
  • outro
date_start   string  optional    

Start date. O campo value deve ser uma data válida. Example: 2023-01-01

date_end   string  optional    

End date. O campo value deve ser uma data válida. Example: 2023-12-31

protest_date_start   string  optional    

O campo value deve ser uma data válida. Example: 2026-11-06T13:03:08

protest_date_end   string  optional    

O campo value deve ser uma data válida. Example: 2026-11-06T13:03:08

has_protest   boolean  optional    

Example: false

has_children   boolean  optional    

Filter accounts that have recurring children. Example: true

is_recurring   boolean  optional    

Filter by recurring status (true: only recurring, false: only non-recurring, null: all). Example: true

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[]=officia&suppliers[]=est&works[]=rem&cost_centers[]=consequatur&statuses[]=pago&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-11-06T13%3A03%3A08&protest_date_end=2026-11-06T13%3A03%3A08&has_protest=&has_children=1&is_recurring=1" \
    --header "Authorization: Bearer bakPf1d4cDhV56368gEvaZe" \
    --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]": "officia",
    "suppliers[0]": "est",
    "works[0]": "rem",
    "cost_centers[0]": "consequatur",
    "statuses[0]": "pago",
    "payment_method": "cheque",
    "date_start": "2023-01-01",
    "date_end": "2023-12-31",
    "protest_date_start": "2026-11-06T13:03:08",
    "protest_date_end": "2026-11-06T13:03:08",
    "has_protest": "0",
    "has_children": "1",
    "is_recurring": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer bakPf1d4cDhV56368gEvaZe",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "da773aa2-daff-32e7-a1c6-6234e7dbc2fc",
            "code": null,
            "type": "saída",
            "payment_method": "cheque",
            "amount": 8539.14,
            "due_date": "2026-12-03T03: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": "Magni ullam ipsum velit cupiditate dignissimos sequi consectetur.",
            "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": "quos",
            "field2": 78,
            "field3": true,
            "notes": "Voluptas velit officia expedita.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "ea160bca-de70-3796-8ba9-432be3a1bc48",
            "code": null,
            "type": "saída",
            "payment_method": "boleto",
            "amount": 9607.61,
            "due_date": "2026-11-20T03: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": "Cupiditate distinctio velit dolorem culpa et qui quos similique.",
            "is_recurring": null,
            "recurrence_config": null,
            "parent_id": null,
            "recurrence_order": 1,
            "total_recurrences": null,
            "children_count": 0,
            "remaining_recurrences": null,
            "has_children": false,
            "field1": "eos",
            "field2": 33,
            "field3": false,
            "notes": "Dignissimos iure alias quod eligendi nam.",
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/accounts-payable-receivable

Headers

Authorization        

Example: Bearer bakPf1d4cDhV56368gEvaZe

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Items per page. O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 10

q   string  optional    

Search query. Example: Salary

code   string  optional    

Filter by account code. Example: CPR-000123

type   string  optional    

Type. Example: entrada

Must be one of:
  • entrada
  • saída
customers   string[]  optional    

The uuid of an existing record in the customers table.

suppliers   string[]  optional    

The uuid of an existing record in the suppliers table.

works   string[]  optional    

The uuid of an existing record in the works table.

cost_centers   string[]  optional    

The uuid of an existing record in the cost_centers table.

statuses   string[]  optional    
Must be one of:
  • a vencer
  • pago
  • pago_sem_lancamento
  • vencido
  • recebido
  • cancelado
  • a protestar
  • protestado
payment_method   string  optional    

Payment method. Example: cheque

Must be one of:
  • cheque
  • boleto
  • pix
  • cartao
  • outro
date_start   string  optional    

Start date. O campo value deve ser uma data válida. Example: 2023-01-01

date_end   string  optional    

End date. O campo value deve ser uma data válida. Example: 2023-12-31

protest_date_start   string  optional    

O campo value deve ser uma data válida. Example: 2026-11-06T13:03:08

protest_date_end   string  optional    

O campo value deve ser uma data válida. Example: 2026-11-06T13:03:08

has_protest   boolean  optional    

Example: false

has_children   boolean  optional    

Filter accounts that have recurring children. Example: true

is_recurring   boolean  optional    

Filter by recurring status (true: only recurring, false: only non-recurring, null: all). Example: true

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 D8ZbveVdPkf5h1Eag3ca466" \
    --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\": \"e3bd2ba9-5c44-389e-a2f9-d2d5aa0f5edf\",
    \"customer_id\": \"c3d7ed09-7427-3500-90ab-da18fb1ba376\",
    \"work_id\": \"50af7513-b55f-3381-b8eb-d91c7141a602\",
    \"cost_center_id\": \"db1ea72e-33e9-3709-8732-9215d6bf1343\",
    \"status\": \"Example Status\",
    \"protest_date\": \"2024-01-01\",
    \"bank_account_id\": \"1e101d1b-c4fa-3349-8899-1a50eee58544\",
    \"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 D8ZbveVdPkf5h1Eag3ca466",
    "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": "e3bd2ba9-5c44-389e-a2f9-d2d5aa0f5edf",
    "customer_id": "c3d7ed09-7427-3500-90ab-da18fb1ba376",
    "work_id": "50af7513-b55f-3381-b8eb-d91c7141a602",
    "cost_center_id": "db1ea72e-33e9-3709-8732-9215d6bf1343",
    "status": "Example Status",
    "protest_date": "2024-01-01",
    "bank_account_id": "1e101d1b-c4fa-3349-8899-1a50eee58544",
    "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"
}
 

Request      

POST api/accounts-payable-receivable

Headers

Authorization        

Example: Bearer D8ZbveVdPkf5h1Eag3ca466

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

type   string     

Tipo. Example: Example Type

Must be one of:
  • entrada
  • saída
payment_method   string     

Forma de pagamento. Example: Example Payment method

Must be one of:
  • cheque
  • boleto
  • pix
  • cartao
  • outro
due_date   string     

Data de vencimento. O campo value deve ser uma data válida. Example: 2024-01-01

amount   number     

Valor. Example: 1

description   string     

Descrição. Example: Example Description

supplier_id   string  optional    

Fornecedor. The uuid of an existing record in the suppliers table. Example: e3bd2ba9-5c44-389e-a2f9-d2d5aa0f5edf

customer_id   string  optional    

Cliente. The uuid of an existing record in the customers table. Example: c3d7ed09-7427-3500-90ab-da18fb1ba376

work_id   string  optional    

Obra. The uuid of an existing record in the works table. Example: 50af7513-b55f-3381-b8eb-d91c7141a602

cost_center_id   string     

Cost center id. The uuid of an existing record in the cost_centers table. Example: db1ea72e-33e9-3709-8732-9215d6bf1343

status   string  optional    

Status. Example: Example Status

Must be one of:
  • a vencer
  • pago
  • vencido
  • recebido
  • cancelado
  • a protestar
  • protestado
protest_date   string  optional    

Protest date. O campo value deve ser uma data válida. O campo value deve ser uma data posterior ou igual a due_date. Example: 2024-01-01

bank_account_id   string  optional    

Bank account id. The uuid of an existing record in the bank_accounts table. Example: 1e101d1b-c4fa-3349-8899-1a50eee58544

custom_fields   object  optional    

Custom fields.

is_recurring   boolean  optional    

Is recurring. Example: true

recurrence_config   object  optional    

Recurrence config.

frequency_type   string  optional    

Recurrence config frequency type. Example: Example Recurrence config frequency type

Must be one of:
  • monthly
  • weekly
  • biweekly
  • yearly
frequency_value   integer  optional    

Recurrence config frequency value. O campo value deve ser pelo menos 0. O campo value não pode ser superior a 31. Example: 1

end_date   string  optional    

Recurrence config end date. O campo value deve ser uma data válida. O campo value deve ser uma data posterior a due_date. Example: 2024-01-01

max_occurrences   integer  optional    

Recurrence config max occurrences. O campo value deve ser pelo menos 1. Example: 1

generation_days_ahead   integer  optional    

Recurrence config generation days ahead. O campo value deve ser pelo menos 1. O campo value não pode ser superior a 30. Example: 1

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 64b65vhaPVdge38Zackf1ED" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"fiscal_document_id\": \"explicabo\",
    \"installment_ids\": [
        \"ullam\"
    ],
    \"payment_method\": \"cheque\",
    \"work_id\": \"totam\",
    \"cost_center_id\": \"earum\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/import-nfe"
);

const headers = {
    "Authorization": "Bearer 64b65vhaPVdge38Zackf1ED",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "fiscal_document_id": "explicabo",
    "installment_ids": [
        "ullam"
    ],
    "payment_method": "cheque",
    "work_id": "totam",
    "cost_center_id": "earum"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "message": "string",
    "total": "integer"
}
 

Request      

POST api/accounts-payable-receivable/import-nfe

Headers

Authorization        

Example: Bearer 64b65vhaPVdge38Zackf1ED

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

fiscal_document_id   string     

The uuid of an existing record in the fiscal_documents table. Example: explicabo

installment_ids   string[]  optional    

The uuid of an existing record in the fiscal_document_installments table.

payment_method   string  optional    

Example: cheque

Must be one of:
  • cheque
  • boleto
  • pix
  • cartao
  • outro
work_id   string  optional    

The uuid of an existing record in the works table. Example: totam

cost_center_id   string  optional    

The uuid of an existing record in the cost_centers table. Example: earum

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/velit/history" \
    --header "Authorization: Bearer aa8Db15e6Vkv4ZcP6hEdgf3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/velit/history"
);

const headers = {
    "Authorization": "Bearer aa8Db15e6Vkv4ZcP6hEdgf3",
    "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."
}
 

Request      

GET api/accounts-payable-receivable/{accountPayableReceivable}/history

Headers

Authorization        

Example: Bearer aa8Db15e6Vkv4ZcP6hEdgf3

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: velit

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/sunt" \
    --header "Authorization: Bearer Zg1ab48VE63hkd5acPf6evD" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/sunt"
);

const headers = {
    "Authorization": "Bearer Zg1ab48VE63hkd5acPf6evD",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "de7014d8-17a3-3111-ba39-f7aded1f6b20",
        "code": null,
        "type": "entrada",
        "payment_method": "boleto",
        "amount": 8044.74,
        "due_date": "2026-11-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": "Est itaque fugit mollitia voluptas reprehenderit sint adipisci voluptas aspernatur.",
        "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": "ex",
        "field2": 11,
        "field3": true,
        "notes": "Id minus id at sed et quo.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/accounts-payable-receivable/{accountPayableReceivable}

Headers

Authorization        

Example: Bearer Zg1ab48VE63hkd5acPf6evD

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: sunt

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/totam" \
    --header "Authorization: Bearer a4hfvDdP6cEVgb68kZ3a15e" \
    --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\": \"ba84e2a2-d687-3da0-89d8-c484332af22c\",
    \"customer_id\": \"e962fa44-001f-3b46-9067-39451079b821\",
    \"work_id\": \"ee6c92f1-14d5-3716-9310-be700aa1698c\",
    \"cost_center_id\": \"be52003e-6688-3378-8506-ab95987981c2\",
    \"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\": \"beb1cab7-2fe3-3eba-96ac-3c2951277e83\",
    \"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/totam"
);

const headers = {
    "Authorization": "Bearer a4hfvDdP6cEVgb68kZ3a15e",
    "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": "ba84e2a2-d687-3da0-89d8-c484332af22c",
    "customer_id": "e962fa44-001f-3b46-9067-39451079b821",
    "work_id": "ee6c92f1-14d5-3716-9310-be700aa1698c",
    "cost_center_id": "be52003e-6688-3378-8506-ab95987981c2",
    "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": "beb1cab7-2fe3-3eba-96ac-3c2951277e83",
    "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"
}
 

Request      

PUT api/accounts-payable-receivable/{accountPayableReceivable}

Headers

Authorization        

Example: Bearer a4hfvDdP6cEVgb68kZ3a15e

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: totam

Body Parameters

type   string  optional    

Type. Example: Example Type

Must be one of:
  • entrada
  • saída
payment_method   string  optional    

Payment method. Example: Example Payment method

Must be one of:
  • cheque
  • boleto
  • pix
  • cartao
  • outro
due_date   string  optional    

Due date. O campo value deve ser uma data válida. Example: 2024-01-01

amount   number  optional    

Amount. Example: 1

description   string  optional    

Description. Example: Example Description

supplier_id   string  optional    

Supplier id. The uuid of an existing record in the suppliers table. Example: ba84e2a2-d687-3da0-89d8-c484332af22c

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: e962fa44-001f-3b46-9067-39451079b821

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: ee6c92f1-14d5-3716-9310-be700aa1698c

cost_center_id   string     

Cost center id. The uuid of an existing record in the cost_centers table. Example: be52003e-6688-3378-8506-ab95987981c2

status   string  optional    

Status. Example: Example Status

Must be one of:
  • a vencer
  • pago
  • vencido
  • recebido
  • cancelado
  • a protestar
  • protestado
payment_date   string  optional    

Payment date. O campo value deve ser uma data válida. Example: 2024-01-01

protest_date   string  optional    

Protest date. O campo value deve ser uma data válida. O campo value deve ser uma data posterior ou igual a due_date. Example: 2024-01-01

paid_amount   number  optional    

Paid amount. O campo value deve ser pelo menos 0. Example: 1

interest_amount   number  optional    

Interest amount. O campo value deve ser pelo menos 0. Example: 1

penalty_amount   number  optional    

Penalty amount. O campo value deve ser pelo menos 0. Example: 1

notary_fee_amount   number  optional    

Notary fee amount. O campo value deve ser pelo menos 0. Example: 1

bank_account_id   string  optional    

Bank account id. The uuid of an existing record in the bank_accounts table. Example: beb1cab7-2fe3-3eba-96ac-3c2951277e83

custom_fields   object  optional    

Custom fields.

is_recurring   boolean  optional    

Is recurring. Example: true

recurrence_config   object  optional    

Recurrence config.

frequency_type   string  optional    

Recurrence config frequency type. Example: Example Recurrence config frequency type

Must be one of:
  • monthly
  • weekly
  • biweekly
  • yearly
frequency_value   integer  optional    

Recurrence config frequency value. O campo value deve ser pelo menos 0. O campo value não pode ser superior a 31. Example: 1

end_date   string  optional    

Recurrence config end date. O campo value deve ser uma data válida. O campo value deve ser uma data posterior a due_date. Example: 2024-01-01

max_occurrences   integer  optional    

Recurrence config max occurrences. O campo value deve ser pelo menos 1. Example: 1

generation_days_ahead   integer  optional    

Recurrence config generation days ahead. O campo value deve ser pelo menos 1. O campo value não pode ser superior a 30. Example: 1

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/quidem" \
    --header "Authorization: Bearer 18D6a3advgh6VcfebPZE4k5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/quidem"
);

const headers = {
    "Authorization": "Bearer 18D6a3advgh6VcfebPZE4k5",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "string"
}
 

Request      

DELETE api/accounts-payable-receivable/{accountPayableReceivable}

Headers

Authorization        

Example: Bearer 18D6a3advgh6VcfebPZE4k5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: quidem

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\": \"yadira.donnelly@example.org\",
    \"password\": \"password\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/auth/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "yadira.donnelly@example.org",
    "password": "password"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "token": "string"
}
 

Request      

POST api/auth/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Example: yadira.donnelly@example.org

password   string     

User password. Example: password

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 eh3fgPavak1VdZ6cE486Db5" \
    --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 eh3fgPavak1VdZ6cE486Db5",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "b6d55999-2df7-3c96-8d7e-8378437196bd",
        "name": "Sidney Grimes Jr.",
        "username": "emerson.balistreri",
        "email": "willy69@example.com",
        "ability": [
            {
                "action": "read",
                "subject": "Auth"
            },
            {
                "action": "listar",
                "subject": "padrão"
            }
        ],
        "roles": [],
        "preferences": [],
        "sectors": [],
        "image": {
            "id": null,
            "url": null
        }
    }
}
 

Request      

GET api/auth/user

Headers

Authorization        

Example: Bearer eh3fgPavak1VdZ6cE486Db5

Content-Type        

Example: application/json

Accept        

Example: application/json

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 EDcVfgd4Phba86Z613e5kav" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"certification\": \"Example Certification\",
    \"crea\": \"Example Crea\",
    \"email\": \"user@example.com\",
    \"username\": \"heidi91\",
    \"password\": \"password123\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"cb6a82b5-55bf-3859-8557-b760d1910b7a\"
    ],
    \"roles\": [
        \"da1e364e-febc-3df7-9c84-4c76c949dd12\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/auth/user"
);

const headers = {
    "Authorization": "Bearer EDcVfgd4Phba86Z613e5kav",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "certification": "Example Certification",
    "crea": "Example Crea",
    "email": "user@example.com",
    "username": "heidi91",
    "password": "password123",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "cb6a82b5-55bf-3859-8557-b760d1910b7a"
    ],
    "roles": [
        "da1e364e-febc-3df7-9c84-4c76c949dd12"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

PUT api/auth/user

Headers

Authorization        

Example: Bearer EDcVfgd4Phba86Z613e5kav

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string  optional    

Nome. Example: Example Name

certification   string  optional    

Certificação. O campo value não pode ser superior a 255 caracteres. Example: Example Certification

crea   string  optional    

CREA. O campo value não pode ser superior a 255 caracteres. Example: Example Crea

email   string  optional    

E-mail. O campo value deve ser um endereço de e-mail válido. Example: user@example.com

username   string  optional    

Usuário. Example: heidi91

password   string  optional    

Password. Example: password123

image   object  optional    

Imagem.

path   string  optional    

Caminho da imagem. This field is required when image is present. Example: Example Image path

name   string  optional    

Nome da imagem. Example: Example Name

extension   string  optional    

Extensão da imagem. Example: Example Image extension

size   string  optional    

Tamanho da imagem. Example: Example Image size

sectors   string[]  optional    

UUID do setor. The uuid of an existing record in the sectors table.

roles   string[]  optional    

UUID da função. The uuid of an existing record in the roles table.

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 56E34vbc8gd6ZPDf1kaaVhe" \
    --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 56E34vbc8gd6ZPDf1kaaVhe",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

POST api/auth/logout

Headers

Authorization        

Example: Bearer 56E34vbc8gd6ZPDf1kaaVhe

Content-Type        

Example: application/json

Accept        

Example: application/json

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 86abVkDdP14gZ5Eafec6vh3" \
    --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 86abVkDdP14gZ5Eafec6vh3",
    "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
    }
}
 

Request      

GET api/auth/preferences

Headers

Authorization        

Example: Bearer 86abVkDdP14gZ5Eafec6vh3

Content-Type        

Example: application/json

Accept        

Example: application/json

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 ZP6dEVv8eg4hak63D51fabc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"key\": \"cxivssmedaimfrwrhl\",
    \"value\": []
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/auth/preferences"
);

const headers = {
    "Authorization": "Bearer ZP6dEVv8eg4hak63D51fabc",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "key": "cxivssmedaimfrwrhl",
    "value": []
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "Preference saved successfully"
}
 

Request      

POST api/auth/preferences

Headers

Authorization        

Example: Bearer ZP6dEVv8eg4hak63D51fabc

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

key   string     

O campo value não pode ser superior a 255 caracteres. Example: cxivssmedaimfrwrhl

value   object     

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/occaecati" \
    --header "Authorization: Bearer adfbg6Pv51ck864aEeDV3Zh" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/auth/preferences/occaecati"
);

const headers = {
    "Authorization": "Bearer adfbg6Pv51ck864aEeDV3Zh",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "Preference deleted successfully"
}
 

Request      

DELETE api/auth/preferences/{key}

Headers

Authorization        

Example: Bearer adfbg6Pv51ck864aEeDV3Zh

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

key   string     

Example: occaecati

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 3g6k456D8bvZaPhecfEV1da" \
    --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 3g6k456D8bvZaPhecfEV1da",
    "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"
        }
    }
}
 

Request      

POST api/auth/{user}/token

Headers

Authorization        

Example: Bearer 3g6k456D8bvZaPhecfEV1da

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

user   string     

User UUID Example: 550e8400-e29b-41d4-a716-446655440000

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 badZ38hf1v45cgEe66kaDPV" \
    --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 badZ38hf1v45cgEe66kaDPV",
    "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"
}
 

Request      

POST api/bank-accounts/transfers

Headers

Authorization        

Example: Bearer badZ38hf1v45cgEe66kaDPV

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

source_id   string     

Source id. The value and destination_id must be different. The uuid of an existing record in the bank_accounts table. Example: Example Source id

destination_id   string     

Destination id. The uuid of an existing record in the bank_accounts table. Example: Example Destination id

amount   number     

Amount. Example: 1

description   string  optional    

Description. O campo value não pode ser superior a 255 caracteres. Example: Example Description

transaction_date   string     

Transaction date. Must be a valid date in the format Y-m-d H:i:s. Example: 2024-01-01

transaction_category_id   string  optional    

Transaction category id. The uuid of an existing record in the transaction_categories table. Example: Example Transaction category id

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/eius" \
    --header "Authorization: Bearer aEaPd53Zfb6veg8VD4kc6h1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/bank-accounts/transfers/eius"
);

const headers = {
    "Authorization": "Bearer aEaPd53Zfb6veg8VD4kc6h1",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "string"
}
 

Request      

DELETE api/bank-accounts/transfers/{bankTransfer}

Headers

Authorization        

Example: Bearer aEaPd53Zfb6veg8VD4kc6h1

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankTransfer   string     

Example: eius

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/1/deposit" \
    --header "Authorization: Bearer hV53bZd4c6k16e8PaEDfgav" \
    --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/1/deposit"
);

const headers = {
    "Authorization": "Bearer hV53bZd4c6k16e8PaEDfgav",
    "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"
}
 

Request      

POST api/bank-accounts/{bankAccount}/deposit

Headers

Authorization        

Example: Bearer hV53bZd4c6k16e8PaEDfgav

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 1

Body Parameters

amount   number     

Amount. Example: 1

description   string  optional    

Description. O campo value não pode ser superior a 255 caracteres. Example: Example Description

transaction_date   string     

Transaction date. Must be a valid date in the format Y-m-d H:i:s. Example: 2024-01-01

transaction_category_id   string  optional    

Transaction category id. The uuid of an existing record in the transaction_categories table. Example: Example Transaction category id

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/12/withdraw" \
    --header "Authorization: Bearer 6chbEfevgaZ8Vd4Dka31P65" \
    --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/12/withdraw"
);

const headers = {
    "Authorization": "Bearer 6chbEfevgaZ8Vd4Dka31P65",
    "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"
}
 

Request      

POST api/bank-accounts/{bankAccount}/withdraw

Headers

Authorization        

Example: Bearer 6chbEfevgaZ8Vd4Dka31P65

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 12

Body Parameters

amount   number     

Amount. Example: 1

description   string  optional    

Description. O campo value não pode ser superior a 255 caracteres. Example: Example Description

transaction_date   string     

Transaction date. Must be a valid date in the format Y-m-d H:i:s. Example: 2024-01-01

transaction_category_id   string  optional    

Transaction category id. The uuid of an existing record in the transaction_categories table. Example: Example Transaction category id

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 P3e8hdgfEZa56bcvka4V16D" \
    --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 P3e8hdgfEZa56bcvka4V16D",
    "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"
            }
        }
    }
}
 

Request      

GET api/bank-accounts/balance-summary

Headers

Authorization        

Example: Bearer P3e8hdgfEZa56bcvka4V16D

Content-Type        

Example: application/json

Accept        

Example: application/json

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 aa6e1bcgd8PV3kED65Zvh4f" \
    --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 aa6e1bcgd8PV3kED65Zvh4f",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "ca9662b4-3af7-3a37-9b61-8670c6d70a8d",
        "agency": "5664",
        "account": "8966064-1",
        "type": "corrente",
        "balance": 4768.62,
        "holder_type": "pf",
        "alias": "et",
        "limit": 2724.98,
        "available_balance": 7493.6,
        "used_limit": 0,
        "available_limit": 2724.98,
        "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"
}
 

Request      

GET api/bank-accounts/default-by-payment-method

Headers

Authorization        

Example: Bearer aa6e1bcgd8PV3kED65Zvh4f

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

method   string     

Forma de pagamento (pix, bank_transfer, cash, check). Example: cash

Must be one of:
  • pix
  • bank_transfer
  • cash
  • check

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 ab8e1fc3E5hDdv4g6aVk6PZ" \
    --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 ab8e1fc3E5hDdv4g6aVk6PZ",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "04f0a697-ec08-3524-b4f0-560a93fae321",
            "agency": "4840",
            "account": "3920333-8",
            "type": "poupança",
            "balance": 39.33,
            "holder_type": "pj",
            "alias": "sint",
            "limit": 8726.74,
            "available_balance": 8766.07,
            "used_limit": 0,
            "available_limit": 8726.74,
            "is_default": null,
            "default_payment_method": null,
            "bank": {
                "id": null,
                "name": null,
                "code": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "e36e4575-e626-3c74-8441-c5029416de68",
            "agency": "1305",
            "account": "2968714-7",
            "type": "corrente",
            "balance": 2787.68,
            "holder_type": "pj",
            "alias": "consequatur",
            "limit": 5086.15,
            "available_balance": 7873.83,
            "used_limit": 0,
            "available_limit": 5086.15,
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/bank-accounts

Headers

Authorization        

Example: Bearer ab8e1fc3E5hDdv4g6aVk6PZ

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Search query. Example: name

is_default   boolean  optional    

Filter by default account (1 or 0). Example: true

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 vb385caVkEfa64gP6Z1hDde" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"agency\": \"Example Agency\",
    \"account\": \"9456642-5\",
    \"bank_id\": \"51afef1d-5691-38d2-8cc0-9f8c4485664b\",
    \"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 vb385caVkEfa64gP6Z1hDde",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "agency": "Example Agency",
    "account": "9456642-5",
    "bank_id": "51afef1d-5691-38d2-8cc0-9f8c4485664b",
    "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"
}
 

Request      

POST api/bank-accounts

Headers

Authorization        

Example: Bearer vb385caVkEfa64gP6Z1hDde

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

agency   string     

Agency. Example: Example Agency

account   string     

Account. Example: 9456642-5

bank_id   string     

Bank id. The uuid of an existing record in the banks table. Example: 51afef1d-5691-38d2-8cc0-9f8c4485664b

type   string     

Type. Example: Example Type

Must be one of:
  • corrente
  • poupança
  • caixa
holder_type   string     

Holder type. Example: Example Holder type

Must be one of:
  • pf
  • pj
alias   string     

Alias. Example: Example Alias

balance   number     

Balance. Example: 1

limit   number  optional    

Limit. Example: 1

is_default   boolean  optional    

Is default. Example: true

default_payment_method   string  optional    

Default payment method. Example: Example Default payment method

Must be one of:
  • pix
  • bank_transfer
  • cash
  • check

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/3" \
    --header "Authorization: Bearer Zbeg6a4vPa1f3ch6E58VkDd" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"agency\": \"Example Agency\",
    \"account\": \"3168706-6\",
    \"bank_id\": \"77f9c59e-b176-3b8c-a64f-f68f8e17a2fc\",
    \"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/3"
);

const headers = {
    "Authorization": "Bearer Zbeg6a4vPa1f3ch6E58VkDd",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "agency": "Example Agency",
    "account": "3168706-6",
    "bank_id": "77f9c59e-b176-3b8c-a64f-f68f8e17a2fc",
    "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"
}
 

Request      

PUT api/bank-accounts/{bankAccount}

Headers

Authorization        

Example: Bearer Zbeg6a4vPa1f3ch6E58VkDd

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 3

Body Parameters

agency   string  optional    

Agency. Example: Example Agency

account   string  optional    

Account. Example: 3168706-6

bank_id   string  optional    

Bank id. The uuid of an existing record in the banks table. Example: 77f9c59e-b176-3b8c-a64f-f68f8e17a2fc

type   string  optional    

Type. Example: Example Type

Must be one of:
  • corrente
  • poupança
  • caixa
holder_type   string  optional    

Holder type. Example: Example Holder type

Must be one of:
  • pf
  • pj
alias   string  optional    

Alias. Example: Example Alias

balance   number  optional    

Balance. Example: 1

limit   number  optional    

Limit. Example: 1

is_default   boolean  optional    

Is default. Example: true

default_payment_method   string  optional    

Default payment method. Example: Example Default payment method

Must be one of:
  • pix
  • bank_transfer
  • cash
  • check

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/9" \
    --header "Authorization: Bearer Zb6dfav3VE5e8a6cP1gkhD4" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/bank-accounts/9"
);

const headers = {
    "Authorization": "Bearer Zb6dfav3VE5e8a6cP1gkhD4",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "e4e980d4-fbc5-3b22-8edf-8344aa6d0d97",
        "agency": "1365",
        "account": "9318664-9",
        "type": "corrente",
        "balance": 1998.26,
        "holder_type": "pj",
        "alias": "reprehenderit",
        "limit": 6383.5,
        "available_balance": 8381.76,
        "used_limit": 0,
        "available_limit": 6383.5,
        "is_default": null,
        "default_payment_method": null,
        "bank": {
            "id": null,
            "name": null,
            "code": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/bank-accounts/{bankAccount}

Headers

Authorization        

Example: Bearer Zb6dfav3VE5e8a6cP1gkhD4

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 9

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/12" \
    --header "Authorization: Bearer 4f5k6DvVh63abZEadc8ge1P" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/bank-accounts/12"
);

const headers = {
    "Authorization": "Bearer 4f5k6DvVh63abZEadc8ge1P",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "string"
}
 

Request      

DELETE api/bank-accounts/{bankAccount}

Headers

Authorization        

Example: Bearer 4f5k6DvVh63abZEadc8ge1P

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 12

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/1/statements/summary" \
    --header "Authorization: Bearer kPD61vha56EVdeg4cZf8ba3" \
    --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/1/statements/summary"
);

const headers = {
    "Authorization": "Bearer kPD61vha56EVdeg4cZf8ba3",
    "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"
    }
}
 

Request      

GET api/bank-accounts/{bankAccount}/statements/summary

Headers

Authorization        

Example: Bearer kPD61vha56EVdeg4cZf8ba3

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 1

Body Parameters

date_start   string  optional    

Date start. O campo value deve ser uma data válida. Example: 2024-01-01

date_end   string  optional    

Date end. O campo value deve ser uma data válida. O campo value deve ser uma data posterior ou igual a date_start. Example: 2024-01-01

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/14/statements" \
    --header "Authorization: Bearer Z4VhDvE81kc6aab3degPf56" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sort_by\": \"est\",
    \"sort_desc\": false,
    \"page\": 62,
    \"per_page\": 2,
    \"q\": \"edvrlgbjbctra\",
    \"type\": \"saída\",
    \"date_start\": \"2026-11-06T13:03:09\",
    \"date_end\": \"2065-04-24\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/bank-accounts/14/statements"
);

const headers = {
    "Authorization": "Bearer Z4VhDvE81kc6aab3degPf56",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "sort_by": "est",
    "sort_desc": false,
    "page": 62,
    "per_page": 2,
    "q": "edvrlgbjbctra",
    "type": "saída",
    "date_start": "2026-11-06T13:03:09",
    "date_end": "2065-04-24"
};

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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/bank-accounts/{bankAccount}/statements

Headers

Authorization        

Example: Bearer Z4VhDvE81kc6aab3degPf56

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 14

Body Parameters

sort_by   string  optional    

Example: est

sort_desc   boolean  optional    

Example: false

page   integer  optional    

O campo value deve ser pelo menos 1. Example: 62

per_page   integer  optional    

O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 2

q   string  optional    

O campo value não pode ser superior a 255 caracteres. Example: edvrlgbjbctra

type   string  optional    

Example: saída

Must be one of:
  • entrada
  • saída
  • tarifa
  • depósito
  • saque
  • transferência
  • pagamento
  • juros
  • ajuste
  • ajuste saída
date_start   string  optional    

O campo value deve ser uma data válida. Example: 2026-11-06T13:03:09

date_end   string  optional    

O campo value deve ser uma data válida. O campo value deve ser uma data posterior ou igual a date_start. Example: 2065-04-24

cash_flow_id   string  optional    

The uuid of an existing record in the cash_flows table.

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/19/statements/rem" \
    --header "Authorization: Bearer a6h1Da86ZdVP4cEfb3gevk5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/bank-accounts/19/statements/rem"
);

const headers = {
    "Authorization": "Bearer a6h1Da86ZdVP4cEfb3gevk5",
    "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
    }
}
 

Request      

GET api/bank-accounts/{bankAccount}/statements/{bankStatement}

Headers

Authorization        

Example: Bearer a6h1Da86ZdVP4cEfb3gevk5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 19

bankStatement   string     

Example: rem

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 63kvZ48ga1DeVa6Pcd5Efbh" \
    --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 63kvZ48ga1DeVa6Pcd5Efbh",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "89c55070-7183-3f26-8481-cffcc9a06591",
            "name": "Gomes e Colaço Ltda.",
            "code": "411"
        },
        {
            "id": "ee247d4c-18f2-3673-a5e5-a7aa20343fc2",
            "name": "Rios-Furtado",
            "code": "863"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/banks

Headers

Authorization        

Example: Bearer 63kvZ48ga1DeVa6Pcd5Efbh

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Search query. Example: Permission name

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 8fZE1dch465e6PagVDkvb3a" \
    --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 8fZE1dch465e6PagVDkvb3a",
    "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"
}
 

Request      

POST api/banks

Headers

Authorization        

Example: Bearer 8fZE1dch465e6PagVDkvb3a

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Name. O campo value não pode ser superior a 255 caracteres. Example: Example Name

code   string     

Code. O campo value não pode ser superior a 255 caracteres. Example: Example Code

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 d6D3b4c5E16Zfevagh8akPV" \
    --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 d6D3b4c5E16Zfevagh8akPV",
    "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"
}
 

Request      

PUT api/banks/{bank}

Headers

Authorization        

Example: Bearer d6D3b4c5E16Zfevagh8akPV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bank   integer     

The bank. Example: 1

Body Parameters

name   string  optional    

Name. O campo value não pode ser superior a 255 caracteres. Example: Example Name

code   string  optional    

Code. O campo value não pode ser superior a 255 caracteres. Example: Example Code

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 5f64gdP8b3kEevDZVaha16c" \
    --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 5f64gdP8b3kEevDZVaha16c",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "35d01543-f0a4-3be6-b022-631a772d413b",
        "name": "Aragão e Arruda e Filhos",
        "code": "737"
    }
}
 

Request      

GET api/banks/{bank}

Headers

Authorization        

Example: Bearer 5f64gdP8b3kEevDZVaha16c

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bank   integer     

The bank. Example: 1

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 P341bagac5V8fk6e6EDvZhd" \
    --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 P341bagac5V8fk6e6EDvZhd",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/banks/{bank}

Headers

Authorization        

Example: Bearer P341bagac5V8fk6e6EDvZhd

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bank   integer     

The bank. Example: 1

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 fev6Vg8a51hZd3DEa4bPck6" \
    --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 fev6Vg8a51hZd3DEa4bPck6",
    "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
    }
}
 

Request      

GET api/cep/{cep}

Headers

Authorization        

Example: Bearer fev6Vg8a51hZd3DEa4bPck6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cep   string     

CEP to search for Example: 01001000

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=Nam+ratione+perferendis+sed+sunt+laborum+et.&categories[]=molestias&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=perferendis&customers[]=ea&suppliers[]=totam&works[]=inventore&cost_centers[]=numquam" \
    --header "Authorization: Bearer k65Pbv468VhDZef3g1cEaad" \
    --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": "Nam ratione perferendis sed sunt laborum et.",
    "categories[0]": "molestias",
    "date_start": "2021-01-01",
    "date_end": "2021-01-31",
    "bank_accounts[0]": "perferendis",
    "customers[0]": "ea",
    "suppliers[0]": "totam",
    "works[0]": "inventore",
    "cost_centers[0]": "numquam",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer k65Pbv468VhDZef3g1cEaad",
    "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"
    }
}
 

Request      

GET api/cash-flows/summary

Headers

Authorization        

Example: Bearer k65Pbv468VhDZef3g1cEaad

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Search query. Example: Salary

cash_session   string  optional    

Cash session. The uuid of an existing record in the cash_sessions table. Example: uuid

type   string  optional    

Cash flow type. Example: entrada

Must be one of:
  • entrada
  • saída
  • tarifa
  • depósito
  • saque
  • transferência
  • pagamento
  • juros
  • ajuste
  • ajuste saída
description   string  optional    

Description . Example: Nam ratione perferendis sed sunt laborum et.

categories   string[]  optional    

The uuid of an existing record in the transaction_categories table.

date_start   string  optional    

Start date. O campo value deve ser uma data válida. Example: 2021-01-01

date_end   string  optional    

End date. O campo value deve ser uma data válida. Example: 2021-01-31

bank_accounts   string[]  optional    

The uuid of an existing record in the bank_accounts table.

customers   string[]  optional    

The uuid of an existing record in the customers table.

suppliers   string[]  optional    

The uuid of an existing record in the suppliers table.

works   string[]  optional    

The uuid of an existing record in the works table.

cost_centers   string[]  optional    

The uuid of an existing record in the cost_centers table.

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=Quaerat+voluptatum+veritatis+qui+molestias+aspernatur+mollitia+molestiae+enim.&categories[]=omnis&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=aut&customers[]=et&suppliers[]=ipsa&works[]=voluptatem&cost_centers[]=atque" \
    --header "Authorization: Bearer 6c1vgVEa3b48hZdfkae5DP6" \
    --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": "Quaerat voluptatum veritatis qui molestias aspernatur mollitia molestiae enim.",
    "categories[0]": "omnis",
    "date_start": "2021-01-01",
    "date_end": "2021-01-31",
    "bank_accounts[0]": "aut",
    "customers[0]": "et",
    "suppliers[0]": "ipsa",
    "works[0]": "voluptatem",
    "cost_centers[0]": "atque",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer 6c1vgVEa3b48hZdfkae5DP6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "ee2d3e59-5b8e-3414-8afd-5bf2a45171f6",
            "code": "FC-51892312",
            "type": "saque",
            "amount": -2968.41,
            "description": "Vero odit ratione ut voluptatem.",
            "transaction_date": "2021-02-02T03:00:00.000000Z",
            "transaction_category": {
                "id": null,
                "name": null,
                "type": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "8a20d714-3c99-37af-9d35-cb708248cb5f",
            "code": "FC-06421289",
            "type": "saída",
            "amount": -1479.82,
            "description": "Consequatur voluptates iusto expedita aliquam.",
            "transaction_date": "1983-02-15T03: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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/cash-flows

Headers

Authorization        

Example: Bearer 6c1vgVEa3b48hZdfkae5DP6

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Search query. Example: Salary

cash_session   string  optional    

Cash session. The uuid of an existing record in the cash_sessions table. Example: uuid

type   string  optional    

Cash flow type. Example: entrada

Must be one of:
  • entrada
  • saída
  • tarifa
  • depósito
  • saque
  • transferência
  • pagamento
  • juros
  • ajuste
  • ajuste saída
description   string  optional    

Description . Example: Quaerat voluptatum veritatis qui molestias aspernatur mollitia molestiae enim.

categories   string[]  optional    

The uuid of an existing record in the transaction_categories table.

date_start   string  optional    

Start date. O campo value deve ser uma data válida. Example: 2021-01-01

date_end   string  optional    

End date. O campo value deve ser uma data válida. Example: 2021-01-31

bank_accounts   string[]  optional    

The uuid of an existing record in the bank_accounts table.

customers   string[]  optional    

The uuid of an existing record in the customers table.

suppliers   string[]  optional    

The uuid of an existing record in the suppliers table.

works   string[]  optional    

The uuid of an existing record in the works table.

cost_centers   string[]  optional    

The uuid of an existing record in the cost_centers table.

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 hVZkfe5PcE81vaD4dg663ab" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"Example Type\",
    \"cash_session_id\": \"9fda7a3d-83d8-3a1f-a81c-6b512ab33643\",
    \"transaction_category_id\": \"3f1783d2-cb2e-3d6b-9b56-1454ecf7428b\",
    \"bank_account_id\": \"19bd60a8-6b24-3523-8041-e6929f5ad9c3\",
    \"customer_id\": \"f649ce8b-0050-3059-af49-38a31b8d508e\",
    \"supplier_id\": \"5e0b9454-cd5a-32e4-8325-28f34c3c9570\",
    \"work_id\": \"f365b3cf-260d-3d46-b8a2-253bb55cc885\",
    \"cost_center_id\": \"127ca393-c3ad-3e01-bffc-46d35d00ad56\",
    \"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 hVZkfe5PcE81vaD4dg663ab",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "Example Type",
    "cash_session_id": "9fda7a3d-83d8-3a1f-a81c-6b512ab33643",
    "transaction_category_id": "3f1783d2-cb2e-3d6b-9b56-1454ecf7428b",
    "bank_account_id": "19bd60a8-6b24-3523-8041-e6929f5ad9c3",
    "customer_id": "f649ce8b-0050-3059-af49-38a31b8d508e",
    "supplier_id": "5e0b9454-cd5a-32e4-8325-28f34c3c9570",
    "work_id": "f365b3cf-260d-3d46-b8a2-253bb55cc885",
    "cost_center_id": "127ca393-c3ad-3e01-bffc-46d35d00ad56",
    "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"
}
 

Request      

POST api/cash-flows

Headers

Authorization        

Example: Bearer hVZkfe5PcE81vaD4dg663ab

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

type   string     

Type. Example: Example Type

Must be one of:
  • entrada
  • saída
  • tarifa
  • depósito
  • saque
  • transferência
  • pagamento
  • juros
  • ajuste
  • ajuste saída
cash_session_id   string     

Cash session id. The uuid of an existing record in the cash_sessions table. Example: 9fda7a3d-83d8-3a1f-a81c-6b512ab33643

transaction_category_id   string  optional    

Transaction category id. The uuid of an existing record in the transaction_categories table. Example: 3f1783d2-cb2e-3d6b-9b56-1454ecf7428b

bank_account_id   string  optional    

Bank account id. The uuid of an existing record in the bank_accounts table. Example: 19bd60a8-6b24-3523-8041-e6929f5ad9c3

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: f649ce8b-0050-3059-af49-38a31b8d508e

supplier_id   string  optional    

Supplier id. The uuid of an existing record in the suppliers table. Example: 5e0b9454-cd5a-32e4-8325-28f34c3c9570

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: f365b3cf-260d-3d46-b8a2-253bb55cc885

cost_center_id   string     

Cost center id. The uuid of an existing record in the cost_centers table. Example: 127ca393-c3ad-3e01-bffc-46d35d00ad56

amount   number     

Amount. Example: 1

description   string  optional    

Description. Example: Example Description

transaction_date   string     

Transaction date. O campo value deve ser uma data válida. Example: 2024-01-01

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/3" \
    --header "Authorization: Bearer aaDv4e5hf8Zk36bPVd6Eg1c" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-flows/3"
);

const headers = {
    "Authorization": "Bearer aaDv4e5hf8Zk36bPVd6Eg1c",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "d0dd9751-7711-3dc0-b0a4-226483ef6758",
        "code": "FC-50556747",
        "type": "pagamento",
        "amount": -3344.85,
        "description": "Nemo aut aut dolorem.",
        "transaction_date": "1976-10-12T03:00:00.000000Z",
        "transaction_category": {
            "id": null,
            "name": null,
            "type": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/cash-flows/{cashFlow}

Headers

Authorization        

Example: Bearer aaDv4e5hf8Zk36bPVd6Eg1c

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 3

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/5" \
    --header "Authorization: Bearer d5cDZkbPE6a6g1ef4vhV38a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"Example Type\",
    \"cash_session_id\": \"9c92e749-88c8-3041-9a28-cd65d04fb13d\",
    \"transaction_category_id\": \"79245e79-bca5-3ece-a696-62a09a388771\",
    \"bank_account_id\": \"3edc0755-df89-3670-b92a-48766a3aca09\",
    \"customer_id\": \"9df8846a-3531-38f5-bbdc-6fbe1fc14f16\",
    \"supplier_id\": \"7cf37e4d-61f0-37f8-8ae4-f2df9b9c96a6\",
    \"work_id\": \"5f3ad9c2-2071-37fa-b2ad-57806ce1312c\",
    \"cost_center_id\": \"7ca085f9-8479-3f19-9d20-903948943aae\",
    \"amount\": 1,
    \"description\": \"Example Description\",
    \"transaction_date\": \"2024-01-01\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-flows/5"
);

const headers = {
    "Authorization": "Bearer d5cDZkbPE6a6g1ef4vhV38a",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "Example Type",
    "cash_session_id": "9c92e749-88c8-3041-9a28-cd65d04fb13d",
    "transaction_category_id": "79245e79-bca5-3ece-a696-62a09a388771",
    "bank_account_id": "3edc0755-df89-3670-b92a-48766a3aca09",
    "customer_id": "9df8846a-3531-38f5-bbdc-6fbe1fc14f16",
    "supplier_id": "7cf37e4d-61f0-37f8-8ae4-f2df9b9c96a6",
    "work_id": "5f3ad9c2-2071-37fa-b2ad-57806ce1312c",
    "cost_center_id": "7ca085f9-8479-3f19-9d20-903948943aae",
    "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"
}
 

Request      

PUT api/cash-flows/{cashFlow}

Headers

Authorization        

Example: Bearer d5cDZkbPE6a6g1ef4vhV38a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 5

Body Parameters

type   string  optional    

Type. Example: Example Type

Must be one of:
  • entrada
  • saída
  • tarifa
  • depósito
  • saque
  • transferência
  • pagamento
  • juros
  • ajuste
  • ajuste saída
cash_session_id   string  optional    

Cash session id. The uuid of an existing record in the cash_sessions table. Example: 9c92e749-88c8-3041-9a28-cd65d04fb13d

transaction_category_id   string  optional    

Transaction category id. The uuid of an existing record in the transaction_categories table. Example: 79245e79-bca5-3ece-a696-62a09a388771

bank_account_id   string  optional    

Bank account id. The uuid of an existing record in the bank_accounts table. Example: 3edc0755-df89-3670-b92a-48766a3aca09

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: 9df8846a-3531-38f5-bbdc-6fbe1fc14f16

supplier_id   string  optional    

Supplier id. The uuid of an existing record in the suppliers table. Example: 7cf37e4d-61f0-37f8-8ae4-f2df9b9c96a6

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: 5f3ad9c2-2071-37fa-b2ad-57806ce1312c

cost_center_id   string     

Cost center id. The uuid of an existing record in the cost_centers table. Example: 7ca085f9-8479-3f19-9d20-903948943aae

amount   number  optional    

Amount. Example: 1

description   string  optional    

Description. Example: Example Description

transaction_date   string  optional    

Transaction date. O campo value deve ser uma data válida. Example: 2024-01-01

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/14" \
    --header "Authorization: Bearer a543g86dha1PDkbvE6ZfcVe" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-flows/14"
);

const headers = {
    "Authorization": "Bearer a543g86dha1PDkbvE6ZfcVe",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "string"
}
 

Request      

DELETE api/cash-flows/{cashFlow}

Headers

Authorization        

Example: Bearer a543g86dha1PDkbvE6ZfcVe

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 14

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 8DfkPhg4avVZ56b1d6cE3ea" \
    --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 8DfkPhg4avVZ56b1d6cE3ea",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "d9878a6a-f1ff-3229-91fa-01b704734a6a",
            "code": null,
            "opened_by": null,
            "opened_at": "2010-07-04T17:37:30.000000Z",
            "closed_by": null,
            "closed_at": "1999-03-26T06:09:10.000000Z",
            "opening_balance": 7687.1,
            "closing_balance": 7941.58,
            "total_income": 0,
            "total_expense": 0,
            "total_balance": 0,
            "status": "Aberto",
            "hasSnapshot": false,
            "created_at": "2009-03-03T02:20:11.000000Z",
            "updated_at": "1974-05-15T15:40:43.000000Z"
        },
        {
            "id": "a7b34977-1f7a-38a0-be99-a8c5f2354be5",
            "code": null,
            "opened_by": null,
            "opened_at": "2005-05-10T00:11:48.000000Z",
            "closed_by": null,
            "closed_at": "1991-01-05T03:26:07.000000Z",
            "opening_balance": 6465.63,
            "closing_balance": 5935.37,
            "total_income": 0,
            "total_expense": 0,
            "total_balance": 0,
            "status": "Fechado",
            "hasSnapshot": false,
            "created_at": "1977-06-16T21:33:08.000000Z",
            "updated_at": "1976-06-15T15:46:02.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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/cash-sessions

Headers

Authorization        

Example: Bearer 8DfkPhg4avVZ56b1d6cE3ea

Content-Type        

Example: application/json

Accept        

Example: application/json

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 Vg1h85eDP6k3f4ZdbavaEc6" \
    --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 Vg1h85eDP6k3f4ZdbavaEc6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "16c0beed-a080-3a61-9139-0689a21fa84a",
        "code": null,
        "opened_by": null,
        "opened_at": "1987-09-27T09:04:16.000000Z",
        "closed_by": null,
        "closed_at": "1981-12-16T03:22:53.000000Z",
        "opening_balance": 8386.96,
        "closing_balance": 2526.43,
        "total_income": 0,
        "total_expense": 0,
        "total_balance": 0,
        "status": "Aberto",
        "hasSnapshot": false,
        "created_at": "2020-12-30T10:24:23.000000Z",
        "updated_at": "2014-03-03T10:45:36.000000Z"
    }
}
 

Request      

POST api/cash-sessions/open

Headers

Authorization        

Example: Bearer Vg1h85eDP6k3f4ZdbavaEc6

Content-Type        

Example: application/json

Accept        

Example: application/json

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/f0408cf7-6437-3f22-b20c-c0c14362edde" \
    --header "Authorization: Bearer cdfab1ahZe4Dv8g653VE6Pk" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/close/f0408cf7-6437-3f22-b20c-c0c14362edde"
);

const headers = {
    "Authorization": "Bearer cdfab1ahZe4Dv8g653VE6Pk",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "string"
}
 

Request      

POST api/cash-sessions/close/{uuid}

Headers

Authorization        

Example: Bearer cdfab1ahZe4Dv8g653VE6Pk

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: f0408cf7-6437-3f22-b20c-c0c14362edde

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/4971d795-b828-33da-a7b3-d0461c7a762f/account-snapshot" \
    --header "Authorization: Bearer k8EV16fava6cb3h4DgedZ5P" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/4971d795-b828-33da-a7b3-d0461c7a762f/account-snapshot"
);

const headers = {
    "Authorization": "Bearer k8EV16fava6cb3h4DgedZ5P",
    "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."
}
 

Request      

GET api/cash-sessions/{uuid}/account-snapshot

Headers

Authorization        

Example: Bearer k8EV16fava6cb3h4DgedZ5P

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 4971d795-b828-33da-a7b3-d0461c7a762f

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/44ffcdf9-f7b7-3649-bf2a-07a4b75ccf70" \
    --header "Authorization: Bearer b5Z3vg1ca86kVEfP4dea6Dh" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/44ffcdf9-f7b7-3649-bf2a-07a4b75ccf70"
);

const headers = {
    "Authorization": "Bearer b5Z3vg1ca86kVEfP4dea6Dh",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "043aeaf4-bc15-3943-b432-44c3ef263800",
        "code": null,
        "opened_by": null,
        "opened_at": "2018-02-05T17:59:00.000000Z",
        "closed_by": null,
        "closed_at": "2010-11-02T08:00:55.000000Z",
        "opening_balance": 3699.16,
        "closing_balance": 3264.13,
        "total_income": 0,
        "total_expense": 0,
        "total_balance": 0,
        "status": "Aberto",
        "hasSnapshot": false,
        "created_at": "1995-10-27T14:50:13.000000Z",
        "updated_at": "2011-09-18T16:51:43.000000Z"
    }
}
 

Request      

GET api/cash-sessions/{uuid}

Headers

Authorization        

Example: Bearer b5Z3vg1ca86kVEfP4dea6Dh

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 44ffcdf9-f7b7-3649-bf2a-07a4b75ccf70

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/5c7a831b-672e-339b-9e61-e2cd4d34227e" \
    --header "Authorization: Bearer kgd1aEa6hP54ZDevc63Vf8b" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/5c7a831b-672e-339b-9e61-e2cd4d34227e"
);

const headers = {
    "Authorization": "Bearer kgd1aEa6hP54ZDevc63Vf8b",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "string"
}
 

Request      

DELETE api/cash-sessions/{uuid}

Headers

Authorization        

Example: Bearer kgd1aEa6hP54ZDevc63Vf8b

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 5c7a831b-672e-339b-9e61-e2cd4d34227e

Central de Tutoriais

Consulta dos tutoriais liberados para quem está autenticado

Setores da central

requires authentication No specific permission required

Setores da pessoa que tenham ao menos um tutorial visível, com a contagem

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/tutorials/sectors" \
    --header "Authorization: Bearer ade43Dcb8af6k6PVZg1hvE5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/tutorials/sectors"
);

const headers = {
    "Authorization": "Bearer ade43Dcb8af6k6PVZg1hvE5",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "eeb5a27f-7d34-37e5-9b4d-729c0902c5b6",
            "name": "voluptate aperiam",
            "slug": null,
            "abbreviation": null,
            "tutorials_count": 0
        },
        {
            "id": "1d6e85a3-80aa-3145-adfd-5382e40755ff",
            "name": "maiores qui",
            "slug": null,
            "abbreviation": null,
            "tutorials_count": 0
        }
    ]
}
 

Request      

GET api/tutorials/sectors

Headers

Authorization        

Example: Bearer ade43Dcb8af6k6PVZg1hvE5

Content-Type        

Example: application/json

Accept        

Example: application/json

Módulos da central

requires authentication No specific permission required

Módulos ativos com tutoriais visíveis para a pessoa; aceita filtro de setor

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/tutorials/modules" \
    --header "Authorization: Bearer k6Z3e1dvPaDb8V5afhcEg46" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/tutorials/modules"
);

const headers = {
    "Authorization": "Bearer k6Z3e1dvPaDb8V5afhcEg46",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "6eb4e111-a9a5-3857-9dff-59c1f50da98c",
            "name": "Unde nihil",
            "slug": "unde-nihil-158238",
            "description": "Dicta autem sit in velit nihil qui vel asperiores.",
            "icon": null,
            "color": null,
            "sort_order": 0,
            "is_active": true,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "07446c04-75dc-36c4-8839-edeaa897bca0",
            "name": "Saepe est",
            "slug": "saepe-est-297535",
            "description": "Quia consequatur sequi nisi deleniti eaque perferendis omnis.",
            "icon": null,
            "color": null,
            "sort_order": 0,
            "is_active": true,
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/tutorials/modules

Headers

Authorization        

Example: Bearer k6Z3e1dvPaDb8V5afhcEg46

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sector_id   string[]  optional    

Listar tutoriais

requires authentication No specific permission required

Lista paginada dos tutoriais visíveis, com filtros de módulo, setor e busca por texto

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/tutorials?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=ordem+de+servi%C3%A7o&module_id[]=df0654f9-79cc-3ddb-afe1-d96e0b83af3a" \
    --header "Authorization: Bearer dkD6a13vfEgeZP6b4c5V8ha" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/tutorials"
);

const params = {
    "sort_by": "created_at",
    "sort_desc": "1",
    "page": "1",
    "per_page": "15",
    "q": "ordem de serviço",
    "module_id[0]": "df0654f9-79cc-3ddb-afe1-d96e0b83af3a",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer dkD6a13vfEgeZP6b4c5V8ha",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "143229c2-7b91-38a1-8238-005afe5e624e",
            "title": "Unde in quaerat magnam",
            "description": "Voluptate similique optio eos provident sit quia.",
            "cover_url": null,
            "status": "draft",
            "published_at": null,
            "sort_order": 0,
            "module": {
                "id": "a3296004-fb42-4fd2-bc6a-a9ccb83c3de8",
                "name": "Quod incidunt",
                "slug": "quod-incidunt-684191",
                "icon": null,
                "color": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "727498bb-56a1-33ed-be86-203d90ae04c3",
            "title": "Nemo dolorem et voluptatem",
            "description": "Nemo voluptates ut et ea.",
            "cover_url": null,
            "status": "draft",
            "published_at": null,
            "sort_order": 0,
            "module": {
                "id": "a3296004-fd60-47b9-aa03-1f7a77ed1068",
                "name": "Cumque repudiandae",
                "slug": "cumque-repudiandae-775793",
                "icon": null,
                "color": null
            },
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/tutorials

Headers

Authorization        

Example: Bearer dkD6a13vfEgeZP6b4c5V8ha

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Busca por título ou descrição. Example: ordem de serviço

module_id   string[]  optional    

O campo value deve ser um UUID válido. The uuid of an existing record in the tutorial_modules table.

sector_id   string[]  optional    

Detalhe do tutorial

requires authentication No specific permission required

Tutorial com os itens em ordem. Fora da visibilidade, responde 404.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/tutorials/1" \
    --header "Authorization: Bearer 3ZEc1egaV456bhfadk6DPv8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/tutorials/1"
);

const headers = {
    "Authorization": "Bearer 3ZEc1egaV456bhfadk6DPv8",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "9733414e-32bd-33a0-a9dd-87bc8a244f5c",
        "title": "Sit nisi eos omnis",
        "description": "Sint dolores impedit quasi.",
        "cover_url": null,
        "status": "draft",
        "published_at": null,
        "sort_order": 0,
        "module": {
            "id": "a3296005-041c-44bc-86ad-829822016d3f",
            "name": "Est recusandae",
            "slug": "est-recusandae-566158",
            "icon": null,
            "color": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/tutorials/{id}

Headers

Authorization        

Example: Bearer 3ZEc1egaV456bhfadk6DPv8

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the tutorial. Example: 1

tutorial   string     

UUID do tutorial Example: 019556e7-2e9f-777c-a177-30bbf0646c32

URL do item

requires authentication No specific permission required

Devolve a URL assinada de curta validade para o arquivo no S3, ou o link externo do item. O caminho bruto do S3 nunca é exposto.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/tutorial-items/019556e7-2e9f-777c-a177-30bbf0646c32/url" \
    --header "Authorization: Bearer 6PZe1g4f3bca6Ea5vhDV8dk" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/tutorial-items/019556e7-2e9f-777c-a177-30bbf0646c32/url"
);

const headers = {
    "Authorization": "Bearer 6PZe1g4f3bca6Ea5vhDV8dk",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "type": "string",
    "title": "string",
    "url": "string",
    "expires_in": "integer",
    "mime_type": "string",
    "size_bytes": "integer"
}
 

Request      

GET api/tutorial-items/{tutorialItem}/url

Headers

Authorization        

Example: Bearer 6PZe1g4f3bca6Ea5vhDV8dk

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

tutorialItem   string     

UUID do item Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 Za5khEev4cdg3a6bV18PD6f" \
    --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\": \"0a0f9d9c-3d84-3e28-bfd0-c40162116b46\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/contracts"
);

const headers = {
    "Authorization": "Bearer Za5khEev4cdg3a6bV18PD6f",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "sort_by": "Example Sort by",
    "sort_desc": true,
    "page": 1,
    "per_page": 1,
    "work_id": "0a0f9d9c-3d84-3e28-bfd0-c40162116b46"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "56e93eb7-b29c-34be-9456-74c7736ea58b",
            "number": "134/2026",
            "started_at": "2026-11-06",
            "deadline_at": "2027-11-06",
            "work": {
                "id": "a3295ff6-ad2e-4105-894f-704d9cd4179e",
                "name": "Dr. Malu Gabriela Deverso"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "da9370f5-5f42-3b35-8914-6ecabf59e32c",
            "number": "309/2026",
            "started_at": "2026-11-06",
            "deadline_at": "2027-11-06",
            "work": {
                "id": "a3295ff6-b64f-4df4-aede-426f3ed0b8e5",
                "name": "Srta. Mari Vasques Corona Jr."
            },
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/contracts

Headers

Authorization        

Example: Bearer Za5khEev4cdg3a6bV18PD6f

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

sort_by   string  optional    

Sort by. Example: Example Sort by

sort_desc   boolean  optional    

Sort desc. Example: true

page   integer  optional    

Page. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Per page. O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 1

work_id   string  optional    

Obra. The uuid of an existing record in the works table. Example: 0a0f9d9c-3d84-3e28-bfd0-c40162116b46

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 Ea4kVhfD31bP5gvcad8Z66e" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"work_id\": \"13b97750-7e58-322f-bb46-fceff44b7c66\",
    \"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 Ea4kVhfD31bP5gvcad8Z66e",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "work_id": "13b97750-7e58-322f-bb46-fceff44b7c66",
    "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"
}
 

Request      

POST api/contracts

Headers

Authorization        

Example: Bearer Ea4kVhfD31bP5gvcad8Z66e

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

work_id   string     

Obra. The uuid of an existing record in the works table. Example: 13b97750-7e58-322f-bb46-fceff44b7c66

number   string     

Número do contrato. O campo value não pode ser superior a 255 caracteres. Example: Example Number

started_at   string  optional    

Data de início. O campo value deve ser uma data válida. Example: Example Started at

deadline_at   string  optional    

Prazo. O campo value deve ser uma data válida. O campo value deve ser uma data posterior ou igual a started_at. Example: Example Deadline at

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/9" \
    --header "Authorization: Bearer geP5bdD86h14ac6VEZk3afv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/contracts/9"
);

const headers = {
    "Authorization": "Bearer geP5bdD86h14ac6VEZk3afv",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "ba58d8ed-84fe-3444-b32d-624f678f3d29",
        "number": "722/2026",
        "started_at": "2026-11-06",
        "deadline_at": "2027-11-06",
        "work": {
            "id": "a3295ff6-c41f-401c-b992-272fe4eea64a",
            "name": "Sr. Luciano Robson Delvalle"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/contracts/{id}

Headers

Authorization        

Example: Bearer geP5bdD86h14ac6VEZk3afv

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the contract. Example: 9

contract   string     

Contract UUID Example: nihil

Update contract

requires authentication contract update

Update a work contract

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/contracts/18" \
    --header "Authorization: Bearer 34k6gheEabV8fPv5aZcd6D1" \
    --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/18"
);

const headers = {
    "Authorization": "Bearer 34k6gheEabV8fPv5aZcd6D1",
    "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"
}
 

Request      

PUT api/contracts/{id}

Headers

Authorization        

Example: Bearer 34k6gheEabV8fPv5aZcd6D1

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the contract. Example: 18

contract   string     

Contract UUID Example: dolorem

Body Parameters

number   string  optional    

Número do contrato. O campo value não pode ser superior a 255 caracteres. Example: Example Number

started_at   string  optional    

Data de início. O campo value deve ser uma data válida. Example: Example Started at

deadline_at   string  optional    

Prazo. O campo value deve ser uma data válida. O campo value deve ser uma data posterior ou igual a started_at. Example: Example Deadline at

Delete contract

requires authentication contract delete

Delete a work contract

Example request:
curl --request DELETE \
    "https://api.bs-homolog.pensou.app.br/api/contracts/ducimus" \
    --header "Authorization: Bearer Pa34c6Zegbfkv158DVdE6ah" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/contracts/ducimus"
);

const headers = {
    "Authorization": "Bearer Pa34c6Zegbfkv158DVdE6ah",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/contracts/{contract}

Headers

Authorization        

Example: Bearer Pa34c6Zegbfkv158DVdE6ah

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

contract   string     

Contract UUID Example: ducimus

Cost Centers

Endpoints for cost centers

Suggest next code

requires authentication cost-center index

Próximo código livre sob o pai informado. O código é sugestão e pode ser alterado antes de salvar.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/cost-centers/next-code?parent_id=ipsam" \
    --header "Authorization: Bearer h3gaPdEbva51k64ef8DcZV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"parent_id\": \"molestiae\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cost-centers/next-code"
);

const params = {
    "parent_id": "ipsam",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer h3gaPdEbva51k64ef8DcZV6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "parent_id": "molestiae"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "code": "001.002"
}
 

Request      

GET api/cost-centers/next-code

Headers

Authorization        

Example: Bearer h3gaPdEbva51k64ef8DcZV6

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

parent_id   string  optional    

UUID do centro de custo pai. Omitido, sugere no primeiro nível. Example: ipsam

Body Parameters

parent_id   string  optional    

The uuid of an existing record in the cost_centers table. Example: molestiae

Cost center requirement

requires authentication cost-center requirement-config index

Data a partir da qual o centro de custo é obrigatório em lançamentos novos. A tela usa isso para marcar o campo como obrigatório sem precisar tentar salvar.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/cost-centers/requirement-config" \
    --header "Authorization: Bearer eZvk4g1dDfPa66a3hEcV5b8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cost-centers/requirement-config"
);

const headers = {
    "Authorization": "Bearer eZvk4g1dDfPa66a3hEcV5b8",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "required_from": "2026-11-03",
    "required_now": true
}
 

Request      

GET api/cost-centers/requirement-config

Headers

Authorization        

Example: Bearer eZvk4g1dDfPa66a3hEcV5b8

Content-Type        

Example: application/json

Accept        

Example: application/json

Update cost center requirement

requires authentication cost-center requirement-config update

Ajusta a data de corte. Enviar nulo desliga a obrigatoriedade.

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/cost-centers/requirement-config" \
    --header "Authorization: Bearer haDgP5b61k4c3d6EvaeVfZ8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"required_from\": \"2026-11-03\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cost-centers/requirement-config"
);

const headers = {
    "Authorization": "Bearer haDgP5b61k4c3d6EvaeVfZ8",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "required_from": "2026-11-03"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "required_from": "2026-11-03",
    "required_now": true
}
 

Request      

PUT api/cost-centers/requirement-config

Headers

Authorization        

Example: Bearer haDgP5b61k4c3d6EvaeVfZ8

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

required_from   string     

Data no formato Y-m-d, ou nulo para desligar Example: 2026-11-03

Stock cost center

requires authentication cost-center stock-config index

Centro de custo que recebe a compra de material. A conta a pagar gerada por NF-e de produto nasce nele, porque o custo do material chega à obra pela movimentação de estoque.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/cost-centers/stock-config" \
    --header "Authorization: Bearer 4VgDPhc8Zfb5a1av6E3ked6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cost-centers/stock-config"
);

const headers = {
    "Authorization": "Bearer 4VgDPhc8Zfb5a1av6E3ked6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "cost_center": {
        "id": "uuid",
        "code": "003.001",
        "name": "Estoque central"
    }
}
 

Request      

GET api/cost-centers/stock-config

Headers

Authorization        

Example: Bearer 4VgDPhc8Zfb5a1av6E3ked6

Content-Type        

Example: application/json

Accept        

Example: application/json

Update stock cost center

requires authentication cost-center stock-config update

Aponta a configuração para outro centro. Nulo desliga: a conta da nota passa a nascer sem centro, para ser classificada na conferência.

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/cost-centers/stock-config" \
    --header "Authorization: Bearer 4b538e6khVDPfdEc6avag1Z" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"cost_center_id\": \"omnis\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cost-centers/stock-config"
);

const headers = {
    "Authorization": "Bearer 4b538e6khVDPfdEc6avag1Z",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "cost_center_id": "omnis"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "cost_center": {
        "id": "uuid",
        "code": "003.001",
        "name": "Estoque central"
    }
}
 

Request      

PUT api/cost-centers/stock-config

Headers

Authorization        

Example: Bearer 4b538e6khVDPfdEc6avag1Z

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

cost_center_id   string     

UUID do centro de custo, ou nulo Example: omnis

List cost centers

requires authentication cost-center index

Lista plana ordenada por código, sem paginação. Cada item traz nível e caminho completo, para o cliente montar a árvore em memória.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/cost-centers?q=vila&active=1" \
    --header "Authorization: Bearer d5v8aVg1akZbEhe63f4DPc6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cost-centers"
);

const params = {
    "q": "vila",
    "active": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer d5v8aVg1akZbEhe63f4DPc6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "0163de52-0f47-39a2-8f0c-cbc10af93972",
            "code": "306",
            "name": "aut odit",
            "level": 1,
            "path": null,
            "is_active": true,
            "selectable": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "cf91e2fe-a8fa-3708-8372-34801b2a0071",
            "code": "493",
            "name": "itaque sint",
            "level": 1,
            "path": null,
            "is_active": true,
            "selectable": false,
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/cost-centers

Headers

Authorization        

Example: Bearer d5v8aVg1akZbEhe63f4DPc6

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

q   string  optional    

Busca por parte do nome ou do código. Example: vila

active   boolean  optional    

Filtra por situação. Omitido, traz ativos e inativos. Example: true

Show cost center

requires authentication cost-center show

Detalhe de um centro de custo

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/cost-centers/sit" \
    --header "Authorization: Bearer 3DdgZ6ba5E1486vVafkcehP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cost-centers/sit"
);

const headers = {
    "Authorization": "Bearer 3DdgZ6ba5E1486vVafkcehP",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "300209f5-0942-3145-84a5-17120f4b3da6",
        "code": "370",
        "name": "eos molestiae",
        "level": 1,
        "path": null,
        "is_active": true,
        "selectable": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/cost-centers/{costCenter}

Headers

Authorization        

Example: Bearer 3DdgZ6ba5E1486vVafkcehP

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

costCenter   string     

Cost center UUID Example: sit

Create cost center

requires authentication cost-center store

Cadastra um centro de custo

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/cost-centers" \
    --header "Authorization: Bearer kaDEagc61Vhbd5vfP46e3Z8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"Example Code\",
    \"name\": \"Example Name\",
    \"parent_id\": \"6927a136-b3e0-3b9b-914f-69130594bf3a\",
    \"work_id\": \"3a015543-8199-30ef-bad2-7cf8f0397d76\",
    \"is_active\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cost-centers"
);

const headers = {
    "Authorization": "Bearer kaDEagc61Vhbd5vfP46e3Z8",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "code": "Example Code",
    "name": "Example Name",
    "parent_id": "6927a136-b3e0-3b9b-914f-69130594bf3a",
    "work_id": "3a015543-8199-30ef-bad2-7cf8f0397d76",
    "is_active": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "message": "string"
}
 

Request      

POST api/cost-centers

Headers

Authorization        

Example: Bearer kaDEagc61Vhbd5vfP46e3Z8

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

code   string     

Código. Must match the regex /^\d{3}(.\d{3}){0,2}$/. Example: Example Code

name   string     

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

parent_id   string  optional    

Centro de custo pai. The uuid of an existing record in the cost_centers table. Example: 6927a136-b3e0-3b9b-914f-69130594bf3a

work_id   string  optional    

Obra. The uuid of an existing record in the works table. Example: 3a015543-8199-30ef-bad2-7cf8f0397d76

is_active   boolean  optional    

Situação. Example: true

Update cost center

requires authentication cost-center update

Atualiza um centro de custo, inclusive a situação (inativar e reativar)

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/cost-centers/tempore" \
    --header "Authorization: Bearer Vfvh84E65Pk3Da61cZdgbea" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"Example Code\",
    \"name\": \"Example Name\",
    \"parent_id\": \"63013f2a-f14a-34cd-bfaf-b35f0b7fde9f\",
    \"work_id\": \"90195977-7fef-35cb-973e-170e0c26e38d\",
    \"is_active\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cost-centers/tempore"
);

const headers = {
    "Authorization": "Bearer Vfvh84E65Pk3Da61cZdgbea",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "code": "Example Code",
    "name": "Example Name",
    "parent_id": "63013f2a-f14a-34cd-bfaf-b35f0b7fde9f",
    "work_id": "90195977-7fef-35cb-973e-170e0c26e38d",
    "is_active": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "string"
}
 

Request      

PUT api/cost-centers/{costCenter}

Headers

Authorization        

Example: Bearer Vfvh84E65Pk3Da61cZdgbea

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

costCenter   string     

Cost center UUID Example: tempore

Body Parameters

code   string  optional    

Código. Must match the regex /^\d{3}(.\d{3}){0,2}$/. Example: Example Code

name   string  optional    

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

parent_id   string  optional    

Centro de custo pai. The uuid of an existing record in the cost_centers table. Example: 63013f2a-f14a-34cd-bfaf-b35f0b7fde9f

work_id   string  optional    

Obra. The uuid of an existing record in the works table. Example: 90195977-7fef-35cb-973e-170e0c26e38d

is_active   boolean  optional    

Situação. Example: true

Delete cost center

requires authentication cost-center delete

Exclui um centro de custo. Só é permitido quando ele não tem centros abaixo nem lançamentos.

Example request:
curl --request DELETE \
    "https://api.bs-homolog.pensou.app.br/api/cost-centers/voluptatem" \
    --header "Authorization: Bearer Vf6caZDbd3kEav1g5e6P4h8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cost-centers/voluptatem"
);

const headers = {
    "Authorization": "Bearer Vf6caZDbd3kEav1g5e6P4h8",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/cost-centers/{costCenter}

Headers

Authorization        

Example: Bearer Vf6caZDbd3kEav1g5e6P4h8

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

costCenter   string     

Cost center UUID Example: voluptatem

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 PVhgZDf4e61bEk6aav83d5c" \
    --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 PVhgZDf4e61bEk6aav83d5c",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "56938128-bb94-30cc-bb69-c65280ae9830",
            "name": "Matias Leon Lutero",
            "email": "montenegro.danilo@example.net",
            "phone": "(47) 3159-4164",
            "document": "431.304.278-48",
            "type": "pf",
            "responsible": "Srta. Kamila Meireles Ferraz Jr.",
            "image": {
                "id": null,
                "url": null
            },
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "documents_count": 0
        },
        {
            "id": "2a07d594-2ada-323c-9b5e-eed382edd578",
            "name": "Ellen Cervantes",
            "email": "gbranco@example.net",
            "phone": "(11) 2507-4761",
            "document": "438.680.406-41",
            "type": "pf",
            "responsible": "Nádia Violeta Lourenço",
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/customers

Headers

Authorization        

Example: Bearer PVhgZDf4e61bEk6aav83d5c

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Search query. Example: Customer name

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 fkha5DV6a43EvPegbc61dZ8" \
    --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 fkha5DV6a43EvPegbc61dZ8",
    "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"
}
 

Request      

POST api/customers

Headers

Authorization        

Example: Bearer fkha5DV6a43EvPegbc61dZ8

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. Example: Example Name

email   string  optional    

E-mail. O campo value deve ser um endereço de e-mail válido. Example: user@example.com

phone   string  optional    

Telefone. Example: (11) 99999-9999

document   string     

CPF/CNPJ. Example: Example Document

type   string     

Tipo. Example: Example Type

Must be one of:
  • pf
  • pj
responsible   string  optional    

Responsável. Example: Example Responsible

image   object  optional    

Imagem.

path   string  optional    

Caminho da imagem. This field is required when image is present. Example: Example Image path

name   string  optional    

Nome da imagem. Example: Example Name

extension   string  optional    

Extensão da imagem. Example: Example Image extension

size   string  optional    

Tamanho da imagem. Example: Example Image size

address   object     

Endereço.

street   string     

Rua. Example: Example Address street

number   string     

Número. Example: Example Address number

complement   string  optional    

Complemento. Example: Example Address complement

neighborhood   string     

Bairro. Example: Example Address neighborhood

city   string     

Cidade. Example: Example Address city

state   string     

Estado. Example: Example Address state

zip_code   string     

CEP. Example: Example Address zip code

Get customer

requires authentication customers index

Get a customer

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/customers/4" \
    --header "Authorization: Bearer adPaDV5436efbcZvgEkh816" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/customers/4"
);

const headers = {
    "Authorization": "Bearer adPaDV5436efbcZvgEkh816",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "0b5cbd76-2a8c-3501-b8c0-566fe9b69297",
        "name": "Bernardo Edilson Ferreira Neto",
        "email": "claudio.benites@example.com",
        "phone": "(42) 3386-3004",
        "document": "955.120.995-82",
        "type": "pj",
        "responsible": "Dr. Nádia Mônica de Freitas Jr.",
        "image": {
            "id": null,
            "url": null
        },
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        },
        "documents_count": 0
    }
}
 

Request      

GET api/customers/{id}

Headers

Authorization        

Example: Bearer adPaDV5436efbcZvgEkh816

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the customer. Example: 4

customer   string     

Customer ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Update customer

requires authentication customers update

Update a customer

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/customers/17" \
    --header "Authorization: Bearer VPfcgD61b3aZ86khv5Ed4ea" \
    --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/17"
);

const headers = {
    "Authorization": "Bearer VPfcgD61b3aZ86khv5Ed4ea",
    "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"
}
 

Request      

PUT api/customers/{id}

Headers

Authorization        

Example: Bearer VPfcgD61b3aZ86khv5Ed4ea

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the customer. Example: 17

customer   string     

Customer ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

name   string  optional    

Nome. Example: Example Name

email   string  optional    

E-mail. O campo value deve ser um endereço de e-mail válido. Example: user@example.com

phone   string  optional    

Telefone. Example: (11) 99999-9999

document   string  optional    

CPF/CNPJ. Example: Example Document

type   string  optional    

Tipo. Example: Example Type

Must be one of:
  • pf
  • pj
responsible   string  optional    

Responsável. Example: Example Responsible

image   object  optional    

Imagem.

path   string  optional    

Caminho da imagem. This field is required when image is present. Example: Example Image path

name   string  optional    

Nome da imagem. Example: Example Name

extension   string  optional    

Extensão da imagem. Example: Example Image extension

size   string  optional    

Tamanho da imagem. Example: Example Image size

address   object  optional    

Endereço.

street   string  optional    

Rua. Example: Example Address street

number   string  optional    

Número. Example: Example Address number

complement   string  optional    

Complemento. Example: Example Address complement

neighborhood   string  optional    

Bairro. Example: Example Address neighborhood

city   string  optional    

Cidade. Example: Example Address city

state   string  optional    

Estado. Example: Example Address state

zip_code   string  optional    

CEP. Example: Example Address zip code

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 3Zcae8g5kVd46fvbPa16EDh" \
    --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 3Zcae8g5kVd46fvbPa16EDh",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/customers/{customer}

Headers

Authorization        

Example: Bearer 3Zcae8g5kVd46fvbPa16EDh

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

customer   string     

Customer ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 8gcaDbP3Zkfh6415adVevE6" \
    --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\": \"4b36afdb-aea8-3546-8750-46396cb0d43f\",
    \"contract_id\": \"7f32d83f-9dc9-3c54-a87e-c413a2d204b5\",
    \"status_id\": \"a207375b-bf72-3b0f-8cdb-3d8cc627bfcd\",
    \"filled_by\": \"5b279b15-eafe-3b9e-8ec3-ff68ae947f52\",
    \"responsible_id\": \"a4da5c32-3367-3059-a8e9-927f3ea3090a\",
    \"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 8gcaDbP3Zkfh6415adVevE6",
    "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": "4b36afdb-aea8-3546-8750-46396cb0d43f",
    "contract_id": "7f32d83f-9dc9-3c54-a87e-c413a2d204b5",
    "status_id": "a207375b-bf72-3b0f-8cdb-3d8cc627bfcd",
    "filled_by": "5b279b15-eafe-3b9e-8ec3-ff68ae947f52",
    "responsible_id": "a4da5c32-3367-3059-a8e9-927f3ea3090a",
    "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": "caf2975c-c06b-36c9-b475-89d63cc0abb7",
            "code": "RDO-06-11-26",
            "report_number": 1,
            "date": "2026-11-06",
            "status": {
                "id": "a3295ff7-40db-4a97-a47c-0b67a884be92",
                "slug": null,
                "name": null,
                "abbreviation": "voluptates",
                "color": "#f6f1a5",
                "text_color": "#2b7257"
            },
            "work": {
                "id": "a3295ff7-37e3-4a76-ad0a-56541acdedb2",
                "name": "Sr. Marco Amaral Pedrosa",
                "started_at": "1981-06-02 21:39:33"
            },
            "filled_by": {
                "id": "a3295ff7-3d63-4beb-ab85-2816c12692cd",
                "name": "Saul Watsica"
            },
            "contract_number": "940/2026",
            "deadline_at": "2027-11-06",
            "technical_responsible": {
                "name": null,
                "certification": null,
                "crea": null
            },
            "activities": [],
            "occurrences": null,
            "next_day_forecast": null,
            "finalized_at": null,
            "has_signed_document": false,
            "content_hash": null,
            "gov_br_validation_url": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "519ca545-6c30-3c7c-a116-a335c5aa3400",
            "code": "RDO-06-11-26",
            "report_number": 1,
            "date": "2026-11-06",
            "status": {
                "id": "a3295ff7-4b0c-406a-b731-4cf9d7db0a76",
                "slug": null,
                "name": null,
                "abbreviation": "nulla",
                "color": "#db669d",
                "text_color": "#b33a09"
            },
            "work": {
                "id": "a3295ff7-44e8-48e8-9374-7fcef62adacd",
                "name": "Ester Perez Sobrinho",
                "started_at": "1995-06-05 06:18:07"
            },
            "filled_by": {
                "id": "a3295ff7-4941-4c30-9d6b-57223d7bd9ff",
                "name": "Prof. Alphonso Spinka DVM"
            },
            "contract_number": "409/2026",
            "deadline_at": "2027-11-06",
            "technical_responsible": {
                "name": null,
                "certification": null,
                "crea": null
            },
            "activities": [],
            "occurrences": null,
            "next_day_forecast": null,
            "finalized_at": null,
            "has_signed_document": false,
            "content_hash": null,
            "gov_br_validation_url": null,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/daily-logs

Headers

Authorization        

Example: Bearer 8gcaDbP3Zkfh6415adVevE6

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

sort_by   string  optional    

Sort by. Example: Example Sort by

sort_desc   boolean  optional    

Sort desc. Example: true

page   integer  optional    

Page. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Per page. O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 1

q   string  optional    

Busca. Example: Example Q

work_id   string  optional    

Obra. The uuid of an existing record in the works table. Example: 4b36afdb-aea8-3546-8750-46396cb0d43f

contract_id   string  optional    

Contrato. The uuid of an existing record in the contracts table. Example: 7f32d83f-9dc9-3c54-a87e-c413a2d204b5

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: a207375b-bf72-3b0f-8cdb-3d8cc627bfcd

filled_by   string  optional    

Preenchido por. The uuid of an existing record in the users table. Example: 5b279b15-eafe-3b9e-8ec3-ff68ae947f52

responsible_id   string  optional    

Responsável. The uuid of an existing record in the users table. Example: a4da5c32-3367-3059-a8e9-927f3ea3090a

date_from   string  optional    

Data inicial. O campo value deve ser uma data válida. Example: 2024-01-01

date_to   string  optional    

Data final. O campo value deve ser uma data válida. Example: 2024-01-01

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 Eacefv48V6D1bg6PZkh3da5" \
    --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 Eacefv48V6D1bg6PZkh3da5",
    "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"
    ]
}
 

Request      

GET api/daily-logs/pending-days

Headers

Authorization        

Example: Bearer Eacefv48V6D1bg6PZkh3da5

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

contract_id   string     

Contrato. The uuid of an existing record in the contracts table. Example: Example Contract id

date_from   string     

Data inicial. O campo value deve ser uma data válida. Example: 2024-01-01

date_to   string     

Data final. O campo value deve ser uma data válida. O campo value deve ser uma data posterior ou igual a date_from. O campo value deve ser uma data anterior ou igual a 9999-12-31. Example: 2024-01-01

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/quidem" \
    --header "Authorization: Bearer khZa3PfDc51db6gaeVv6E84" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/daily-logs/quidem"
);

const headers = {
    "Authorization": "Bearer khZa3PfDc51db6gaeVv6E84",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "63f19bd4-1a78-3e33-9ae7-9fb57b17e9dd",
        "code": "RDO-06-11-26",
        "report_number": 1,
        "date": "2026-11-06",
        "status": {
            "id": "a3295ff7-6552-4095-8de3-d9988f320e83",
            "slug": null,
            "name": null,
            "abbreviation": "voluptatem",
            "color": "#23439f",
            "text_color": "#c3fa65"
        },
        "work": {
            "id": "a3295ff7-587f-4d9a-abf4-a05bcb05a374",
            "name": "Davi Maurício Maldonado Jr.",
            "started_at": "2021-07-21 02:58:25"
        },
        "filled_by": {
            "id": "a3295ff7-6363-4bf8-b5f5-8eb3218718d0",
            "name": "Prof. Eulalia Gaylord IV"
        },
        "contract_number": "895/2026",
        "deadline_at": "2027-11-06",
        "technical_responsible": {
            "name": null,
            "certification": null,
            "crea": null
        },
        "activities": [],
        "occurrences": null,
        "next_day_forecast": null,
        "finalized_at": null,
        "has_signed_document": false,
        "content_hash": null,
        "gov_br_validation_url": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/daily-logs/{dailyLog}

Headers

Authorization        

Example: Bearer khZa3PfDc51db6gaeVv6E84

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: quidem

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 P86DvfZbdVagk6cehE3145a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"contract_id\": \"Example Contract id\",
    \"date\": \"2024-01-01\",
    \"status_id\": \"e81d2732-4b20-3ff9-82bf-9bec25b3ca4c\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/daily-logs"
);

const headers = {
    "Authorization": "Bearer P86DvfZbdVagk6cehE3145a",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "contract_id": "Example Contract id",
    "date": "2024-01-01",
    "status_id": "e81d2732-4b20-3ff9-82bf-9bec25b3ca4c"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "data": "object"
}
 

Request      

POST api/daily-logs

Headers

Authorization        

Example: Bearer P86DvfZbdVagk6cehE3145a

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

contract_id   string     

Contrato. The uuid of an existing record in the contracts table. Example: Example Contract id

date   string     

Data do RDO. O campo value deve ser uma data válida. Example: 2024-01-01

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: e81d2732-4b20-3ff9-82bf-9bec25b3ca4c

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/hic" \
    --header "Authorization: Bearer 6PgacfaEh6vbZ4V1dD385ek" \
    --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\": \"f5749054-223c-4687-8ef7-2a6e2aa696f3\",
            \"quantity\": 1
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/daily-logs/hic"
);

const headers = {
    "Authorization": "Bearer 6PgacfaEh6vbZ4V1dD385ek",
    "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": "f5749054-223c-4687-8ef7-2a6e2aa696f3",
            "quantity": 1
        },
        null
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": "object"
}
 

Request      

PATCH api/daily-logs/{dailyLog}

Headers

Authorization        

Example: Bearer 6PgacfaEh6vbZ4V1dD385ek

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: hic

Body Parameters

activities   string  optional    

Atividades executadas. Example: Example Activities

occurrences   string  optional    

Ocorrências. Example: Example Occurrences

next_day_forecast   string  optional    

Previsão do dia seguinte. Example: Example Next day forecast

weather   object[]  optional    

Registro do tempo.

shift   string  optional    

Turno. This field is required when weather is present. Example: Example Weather * shift

Must be one of:
  • manha
  • tarde
  • noite
weather   string  optional    

Clima. This field is required when weather is present. Example: Example Weather * weather

Must be one of:
  • sol
  • sol_nuvens
  • chuva
  • tempestade
teams   object[]  optional    

Composição da equipe.

employee_role_id   string  optional    

Função. This field is required when teams is present. The uuid of an existing record in the employee_roles table. Example: f5749054-223c-4687-8ef7-2a6e2aa696f3

quantity   integer  optional    

Quantidade. This field is required when teams is present. O campo value deve ser pelo menos 1. Example: 1

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/omnis/finalize" \
    --header "Authorization: Bearer ghdPfc6bvk8E43DZea1V56a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/daily-logs/omnis/finalize"
);

const headers = {
    "Authorization": "Bearer ghdPfc6bvk8E43DZea1V56a",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": "object"
}
 

Request      

POST api/daily-logs/{dailyLog}/finalize

Headers

Authorization        

Example: Bearer ghdPfc6bvk8E43DZea1V56a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: omnis

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/temporibus/signed-document" \
    --header "Authorization: Bearer 6k5E4dbeZ1P8DcvVa3gfha6" \
    --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/temporibus/signed-document"
);

const headers = {
    "Authorization": "Bearer 6k5E4dbeZ1P8DcvVa3gfha6",
    "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"
}
 

Request      

POST api/daily-logs/{dailyLog}/signed-document

Headers

Authorization        

Example: Bearer 6k5E4dbeZ1P8DcvVa3gfha6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: temporibus

Body Parameters

path   string     

Arquivo assinado. Example: Example Path

name   string  optional    

Nome do arquivo. Example: Example Name

size   string  optional    

Size. Example: Example Size

extension   string  optional    

Extension. Example: Example Extension

gov_br_validation_url   string  optional    

Link de validação (gov.br). Must be a valid URL. Must match the regex /^https:\/\/([a-z0-9-]+.)*gov.br(\/|$)/i. O campo value não pode ser superior a 2048 caracteres. Example: https://example.com

Reopen daily log

requires authentication daily-log reopen

Send a finalized RDO back to draft (Finalizado → Rascunho). Refused when a gov.br-signed document is attached

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/daily-logs/sint/reopen" \
    --header "Authorization: Bearer hf5dvaD6E1346PceZ8aVgkb" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/daily-logs/sint/reopen"
);

const headers = {
    "Authorization": "Bearer hf5dvaD6E1346PceZ8aVgkb",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": "object"
}
 

Request      

POST api/daily-logs/{dailyLog}/reopen

Headers

Authorization        

Example: Bearer hf5dvaD6E1346PceZ8aVgkb

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: sint

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/quaerat/photos" \
    --header "Authorization: Bearer Vebf45dcgE1h66Z8D3kPava" \
    --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/quaerat/photos"
);

const headers = {
    "Authorization": "Bearer Vebf45dcgE1h66Z8D3kPava",
    "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"
}
 

Request      

POST api/daily-logs/{dailyLog}/photos

Headers

Authorization        

Example: Bearer Vebf45dcgE1h66Z8D3kPava

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: quaerat

Body Parameters

photos   object[]     

Fotos. O campo value deve ter pelo menos 1 itens.

path   string     

Arquivo. Example: Example Photos * path

name   string  optional    

Nome do arquivo. Example: Example Name

size   string  optional    

Photos size. Example: `Example Photos size`

extension   string  optional    

Photos extension. Example: `Example Photos extension`

caption   string  optional    

Legenda. Example: Example Photos * caption

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/dicta/photos/ex" \
    --header "Authorization: Bearer kafdg354vbDhPcVe618EZa6" \
    --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/dicta/photos/ex"
);

const headers = {
    "Authorization": "Bearer kafdg354vbDhPcVe618EZa6",
    "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"
}
 

Request      

PATCH api/daily-logs/{dailyLog}/photos/{id}

Headers

Authorization        

Example: Bearer kafdg354vbDhPcVe618EZa6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: dicta

id   string     

The ID of the photo. Example: ex

photo   string     

Photo (File) UUID Example: qui

Body Parameters

caption   string  optional    

Legenda. Example: Example Caption

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/deleniti/photos/itaque" \
    --header "Authorization: Bearer 4Vf63ahZdgkb6a81D5EcPev" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/daily-logs/deleniti/photos/itaque"
);

const headers = {
    "Authorization": "Bearer 4Vf63ahZdgkb6a81D5EcPev",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/daily-logs/{dailyLog}/photos/{photo}

Headers

Authorization        

Example: Bearer 4Vf63ahZdgkb6a81D5EcPev

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: deleniti

photo   string     

Photo (File) UUID Example: itaque

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/vel" \
    --header "Authorization: Bearer EV3cfavhe8kgd4Z6b1P5Da6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/daily-logs/vel"
);

const headers = {
    "Authorization": "Bearer EV3cfavhe8kgd4Z6b1P5Da6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/daily-logs/{dailyLog}

Headers

Authorization        

Example: Bearer EV3cfavhe8kgd4Z6b1P5Da6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: vel

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 hacbP6f1vge8EdkV635ZaD4" \
    --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 hacbP6f1vge8EdkV635ZaD4",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "4ba9bafb-631c-359c-9e5f-7fd2d960801b",
            "name": "Culpa",
            "code": "PJN",
            "description": "Optio quas voluptas labore qui in cumque soluta.",
            "active": true
        },
        {
            "id": "2454f261-dd60-3eda-aba6-dc8e1919d380",
            "name": "Id",
            "code": "FBP",
            "description": "Accusantium ut voluptas qui nihil ipsam.",
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/disciplines

Headers

Authorization        

Example: Bearer hacbP6f1vge8EdkV635ZaD4

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

q   string  optional    

Search query. Example: Elétrico

active   string  optional    

Filter by active status. Example: true

Must be one of:
  • true
  • false
  • 1
  • 0

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 Zd3h1fbPa6e6DvE5ka4g8Vc" \
    --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 Zd3h1fbPa6e6DvE5ka4g8Vc",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "1179d834-fbcd-39c9-a6f2-f024fa8ffc96",
        "name": "Porro",
        "code": "BPA",
        "description": "Est nulla eaque ea eum assumenda.",
        "active": true
    }
}
 

Request      

GET api/disciplines/{id}

Headers

Authorization        

Example: Bearer Zd3h1fbPa6e6DvE5ka4g8Vc

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the discipline. Example: 1

discipline   string     

Discipline UUID Example: dolorum

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 c4fdDv5eg61ZVh8aE3bk6aP" \
    --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 c4fdDv5eg61ZVh8aE3bk6aP",
    "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"
}
 

Request      

POST api/disciplines

Headers

Authorization        

Example: Bearer c4fdDv5eg61ZVh8aE3bk6aP

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

nome. Example: Example Name

code   string  optional    

código. Example: Example Code

description   string  optional    

descrição. Example: Example Description

active   boolean  optional    

ativo. Example: true

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 Z8V4ah66EgbavD5cfkd1eP3" \
    --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 Z8V4ah66EgbavD5cfkd1eP3",
    "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"
}
 

Request      

PUT api/disciplines/{id}

Headers

Authorization        

Example: Bearer Z8V4ah66EgbavD5cfkd1eP3

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the discipline. Example: 1

discipline   string     

Discipline UUID Example: dicta

Body Parameters

name   string     

nome. Example: Example Name

code   string  optional    

código. Example: Example Code

description   string  optional    

descrição. Example: Example Description

active   boolean  optional    

ativo. Example: true

Delete discipline

requires authentication discipline delete

Delete a discipline

Example request:
curl --request DELETE \
    "https://api.bs-homolog.pensou.app.br/api/disciplines/omnis" \
    --header "Authorization: Bearer 36E8Dh5Pf4Vbagvcae1Zdk6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/disciplines/omnis"
);

const headers = {
    "Authorization": "Bearer 36E8Dh5Pf4Vbagvcae1Zdk6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/disciplines/{discipline}

Headers

Authorization        

Example: Bearer 36E8Dh5Pf4Vbagvcae1Zdk6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

discipline   string     

Discipline UUID Example: omnis

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 8vEk4fbadVD5ga16eZhc6P3" \
    --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 8vEk4fbadVD5ga16eZhc6P3",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "453222a4-ae10-324a-b61a-25b0c7ecb3e6",
            "name": "Sr. Fabiano Adriel de Arruda Filho",
            "description": "Vel corrupti et nihil voluptas ipsum. Sit itaque excepturi ut aut consectetur quibusdam. Quia id ut est vel voluptatibus rerum et. Velit id autem consequatur perspiciatis id.",
            "module": "document"
        },
        {
            "id": "bbe7e4b7-98e2-373f-bcaf-02a69989f5da",
            "name": "Emanuelly Michelle Assunção",
            "description": "Ut quasi nam culpa voluptatem eos dolores repellendus. Minus odio nulla qui error. Voluptas repudiandae voluptas rerum laborum pariatur perspiciatis ad iure. Est est veniam esse culpa qui aut ut.",
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/document-categories

Headers

Authorization        

Example: Bearer 8vEk4fbadVD5ga16eZhc6P3

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

q   string  optional    

Search query. Example: Contracts

module   string  optional    

Filter by module. Example: employee

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/enim" \
    --header "Authorization: Bearer 1af85DdZ6k4vb6EPahg3Vce" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/document-categories/enim"
);

const headers = {
    "Authorization": "Bearer 1af85DdZ6k4vb6EPahg3Vce",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "8be74317-6cd5-3e37-a793-ea74f327b424",
        "name": "Dr. Diana Cervantes Jr.",
        "description": "Ad et est ut fuga voluptatem libero delectus. Et sit repudiandae ab nihil quidem quia quis. Dicta at neque quis aut aut odit ea.",
        "module": "document"
    }
}
 

Request      

GET api/document-categories/{documentCategory}

Headers

Authorization        

Example: Bearer 1af85DdZ6k4vb6EPahg3Vce

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: enim

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 Vg35DEd86PZfb1kcaa6v4eh" \
    --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 Vg35DEd86PZfb1kcaa6v4eh",
    "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"
}
 

Request      

POST api/document-categories

Headers

Authorization        

Example: Bearer Vg35DEd86PZfb1kcaa6v4eh

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Name. Example: Example Name

description   string  optional    

Description. Example: Example Description

module   string     

Module. Example: Example Module

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/commodi" \
    --header "Authorization: Bearer v38VPfD4a6ha6dk1cge5bZE" \
    --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/commodi"
);

const headers = {
    "Authorization": "Bearer v38VPfD4a6ha6dk1cge5bZE",
    "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"
}
 

Request      

PUT api/document-categories/{documentCategory}

Headers

Authorization        

Example: Bearer v38VPfD4a6ha6dk1cge5bZE

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: commodi

Body Parameters

name   string     

Name. Example: Example Name

description   string  optional    

Description. Example: Example Description

module   string     

Module. Example: Example Module

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/modi" \
    --header "Authorization: Bearer Z5Vb613gfcdevaDhP84a6kE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/document-categories/modi"
);

const headers = {
    "Authorization": "Bearer Z5Vb613gfcdevaDhP84a6kE",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/document-categories/{documentCategory}

Headers

Authorization        

Example: Bearer Z5Vb613gfcdevaDhP84a6kE

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: modi

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[]=sed&documentable_type=culpa&customers[]=aut&suppliers[]=ratione" \
    --header "Authorization: Bearer 4Ec5eghaa36bv81kfdPDV6Z" \
    --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]": "sed",
    "documentable_type": "culpa",
    "customers[0]": "aut",
    "suppliers[0]": "ratione",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer 4Ec5eghaa36bv81kfdPDV6Z",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "2cf68f69-bbbf-3672-91ab-03f52059e83a",
            "name": "Teobaldo Isaac Campos Neto",
            "file": {
                "id": null,
                "url": null,
                "extension": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "33987e3b-9f65-3525-ab74-03e584a4408b",
            "name": "Eric das Dores Valente",
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/documents

Headers

Authorization        

Example: Bearer 4Ec5eghaa36bv81kfdPDV6Z

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Example: Document name

categories   string[]  optional    

The uuid of an existing record in the document_categories table.

documentable_type   string  optional    

Type of the related documentable entity. The type of an existing record in the documentables table. Example: culpa

customers   string[]  optional    

The uuid of an existing record in the customers table.

suppliers   string[]  optional    

The uuid of an existing record in the suppliers table.

Get document

requires authentication documents show

Get a document

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/documents/10" \
    --header "Authorization: Bearer P56ga6aDb3kecVEZdh1f4v8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/documents/10"
);

const headers = {
    "Authorization": "Bearer P56ga6aDb3kecVEZdh1f4v8",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "d5e39173-6f56-3a1a-887f-649d7dfe92e1",
        "name": "Cristian Emiliano Rico",
        "file": {
            "id": null,
            "url": null,
            "extension": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/documents/{id}

Headers

Authorization        

Example: Bearer P56ga6aDb3kecVEZdh1f4v8

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the document. Example: 10

document   string     

Document ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 4ckVE1Dh3ge6ab6f8v5dZaP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"category_id\": \"395f8e06-1b17-39be-a66e-24de5efb7075\",
    \"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 4ckVE1Dh3ge6ab6f8v5dZaP",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "category_id": "395f8e06-1b17-39be-a66e-24de5efb7075",
    "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"
}
 

Request      

POST api/documents

Headers

Authorization        

Example: Bearer 4ckVE1Dh3ge6ab6f8v5dZaP

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. Example: Example Name

category_id   string     

Categoria. The uuid of an existing record in the document_categories table. Example: 395f8e06-1b17-39be-a66e-24de5efb7075

file   object     

Arquivo.

path   string  optional    

Caminho do arquivo. This field is required when file is present. Example: Example File path

name   string     

Nome do arquivo. Example: Example Name

extension   string     

Extensão do arquivo. Example: Example File extension

size   string     

Tamanho do arquivo. Example: Example File size

documentable_type   string     

Tipo de relacionado do documento. Example: Example Documentable type

Must be one of:
  • customer
  • work
  • work_location
  • supplier
  • employee
documentable_id   string     

Relacionado do documento. Example: Example Documentable id

Update document

requires authentication documents update

Update a document

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/documents/6" \
    --header "Authorization: Bearer 16EPc4kZvbe3V6gda5Dfh8a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"category_id\": \"4e088904-8d7d-3505-96ef-8f50df227850\",
    \"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/6"
);

const headers = {
    "Authorization": "Bearer 16EPc4kZvbe3V6gda5Dfh8a",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "category_id": "4e088904-8d7d-3505-96ef-8f50df227850",
    "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"
}
 

Request      

PUT api/documents/{id}

Headers

Authorization        

Example: Bearer 16EPc4kZvbe3V6gda5Dfh8a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the document. Example: 6

document   string     

Document ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

name   string  optional    

Nome. Example: Example Name

category_id   string  optional    

Categoria. The uuid of an existing record in the document_categories table. Example: 4e088904-8d7d-3505-96ef-8f50df227850

file   object  optional    

Arquivo.

path   string  optional    

Caminho do arquivo. This field is required when file is present. Example: Example File path

name   string  optional    

Nome do arquivo. Example: Example Name

extension   string  optional    

Extensão do arquivo. Example: Example File extension

size   string  optional    

Tamanho do arquivo. Example: Example File size

documentable_type   string  optional    

Documentable type. Example: Example Documentable type

Must be one of:
  • customer
  • work
  • work_location
  • supplier
  • employee
documentable_id   string  optional    

Documentable id. Example: Example Documentable id

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 d6a615EPVZDfbck3e48gavh" \
    --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 d6a615EPVZDfbck3e48gavh",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/documents/{document}

Headers

Authorization        

Example: Bearer d6a615EPVZDfbck3e48gavh

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

document   string     

Document ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 5Ead6Dv6a1cfeZgP3b8V4kh" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"eos\",
    \"renewal_status\": \"pending\",
    \"urgency\": \"expires_30_days\",
    \"employee_id\": \"non\",
    \"epi_type_id\": \"possimus\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-renewals"
);

const headers = {
    "Authorization": "Bearer 5Ead6Dv6a1cfeZgP3b8V4kh",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "q": "eos",
    "renewal_status": "pending",
    "urgency": "expires_30_days",
    "employee_id": "non",
    "epi_type_id": "possimus"
};

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."
}
 

Request      

GET api/epi-renewals

Headers

Authorization        

Example: Bearer 5Ead6Dv6a1cfeZgP3b8V4kh

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: eos

renewal_status   string  optional    

Example: pending

Must be one of:
  • pending
  • completed
  • ignored
urgency   string  optional    

Example: expires_30_days

Must be one of:
  • expired
  • expires_7_days
  • expires_30_days
employee_id   string  optional    

The uuid of an existing record in the employees table. Example: non

epi_type_id   string  optional    

The uuid of an existing record in the epi_types table. Example: possimus

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 5841EvhPaZDc636fkgVbaed" \
    --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 5841EvhPaZDc636fkgVbaed",
    "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."
}
 

Request      

GET api/epi-renewals/summary

Headers

Authorization        

Example: Bearer 5841EvhPaZDc636fkgVbaed

Content-Type        

Example: application/json

Accept        

Example: application/json

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/minus/renew" \
    --header "Authorization: Bearer eZdc4hv63kbEf1a8P6D5agV" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"quantity\": 1,
    \"condition\": \"new\",
    \"confirm_insufficient_stock\": false
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-renewals/minus/renew"
);

const headers = {
    "Authorization": "Bearer eZdc4hv63kbEf1a8P6D5agV",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "quantity": 1,
    "condition": "new",
    "confirm_insufficient_stock": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/epi-renewals/{id}/renew

Headers

Authorization        

Example: Bearer eZdc4hv63kbEf1a8P6D5agV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

EPI delivery UUID Example: minus

Body Parameters

quantity   integer  optional    

Quantidade entregue. O campo value deve ser pelo menos 1. Example: 1

condition   string  optional    

Condição do EPI. Example: new

Must be one of:
  • new
  • used
  • reformed
confirm_insufficient_stock   boolean  optional    

Example: false

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/alias/ignore" \
    --header "Authorization: Bearer d3eagf8Vavk5hbZE4P661Dc" \
    --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/alias/ignore"
);

const headers = {
    "Authorization": "Bearer d3eagf8Vavk5hbZE4P661Dc",
    "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());

Request      

POST api/epi-renewals/{id}/ignore

Headers

Authorization        

Example: Bearer d3eagf8Vavk5hbZE4P661Dc

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

EPI delivery UUID Example: alias

Body Parameters

ignore_reason   string     

Motivo para ignorar o alerta de vencimento. O campo value não pode ser superior a 500 caracteres. Example: Colaborador afastado temporariamente

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/officia/ignore" \
    --header "Authorization: Bearer Z6veEfgakcV6541PD3ahb8d" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-renewals/officia/ignore"
);

const headers = {
    "Authorization": "Bearer Z6veEfgakcV6541PD3ahb8d",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):



 

Request      

DELETE api/epi-renewals/{id}/ignore

Headers

Authorization        

Example: Bearer Z6veEfgakcV6541PD3ahb8d

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

EPI delivery UUID Example: officia

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 hd18Eg5f4a63PkDV6veaZcb" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"error\",
    \"stock_id\": \"architecto\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-types"
);

const headers = {
    "Authorization": "Bearer hd18Eg5f4a63PkDV6veaZcb",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "q": "error",
    "stock_id": "architecto"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "7e7963f3-7ce3-3cc0-9c73-2b07098ea5b6",
            "name": "aliquid et",
            "default_validity_days": 557,
            "requires_signature": false,
            "numero_ca": "38017",
            "product": null,
            "available_quantity": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "5e98ff64-8fbd-37ff-b23c-3d1bfe7f46f2",
            "name": "qui sit",
            "default_validity_days": 68,
            "requires_signature": false,
            "numero_ca": "15674",
            "product": null,
            "available_quantity": null,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/epi-types

Headers

Authorization        

Example: Bearer hd18Eg5f4a63PkDV6veaZcb

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: error

stock_id   string  optional    

The uuid of an existing record in the stocks table. Example: architecto

List catalog products that could become EPI

requires authentication epi index

Products sitting in a family flagged as EPI that do not have EPI attributes yet. Being here does not make a product an EPI: it becomes one when someone gives it a validity, through the create endpoint with action link_existing.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/epi-types/candidates" \
    --header "Authorization: Bearer fg4Vkh616bPDev8c3daE5aZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"maiores\",
    \"stock_id\": \"et\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-types/candidates"
);

const headers = {
    "Authorization": "Bearer fg4Vkh616bPDev8c3daE5aZ",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "q": "maiores",
    "stock_id": "et"
};

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."
}
 

Request      

GET api/epi-types/candidates

Headers

Authorization        

Example: Bearer fg4Vkh616bPDev8c3daE5aZ

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: maiores

stock_id   string  optional    

The uuid of an existing record in the stocks table. Example: et

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/quam" \
    --header "Authorization: Bearer VbZa4Ea6k1fg58PceD3d6hv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-types/quam"
);

const headers = {
    "Authorization": "Bearer VbZa4Ea6k1fg58PceD3d6hv",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "29256266-2dd2-370d-9fda-9c08c4f7df3a",
        "name": "autem id",
        "default_validity_days": 216,
        "requires_signature": false,
        "numero_ca": "40150",
        "product": null,
        "available_quantity": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/epi-types/{epiType}

Headers

Authorization        

Example: Bearer VbZa4Ea6k1fg58PceD3d6hv

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: quam

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 5fPv8agZeka4dbD631EcV6h" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"default_validity_days\": 1,
    \"requires_signature\": true,
    \"numero_ca\": \"Example Numero ca\",
    \"action\": \"Example Action\",
    \"product_id\": \"0d3ccbfd-4635-35e7-a9e5-921e9e2d84c5\",
    \"product_family_id\": \"b24c5c56-ae3e-37ec-83f9-fc95ccc971be\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-types"
);

const headers = {
    "Authorization": "Bearer 5fPv8agZeka4dbD631EcV6h",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "default_validity_days": 1,
    "requires_signature": true,
    "numero_ca": "Example Numero ca",
    "action": "Example Action",
    "product_id": "0d3ccbfd-4635-35e7-a9e5-921e9e2d84c5",
    "product_family_id": "b24c5c56-ae3e-37ec-83f9-fc95ccc971be"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "message": "string"
}
 

Request      

POST api/epi-types

Headers

Authorization        

Example: Bearer 5fPv8agZeka4dbD631EcV6h

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. Example: Example Name

default_validity_days   integer     

Validade padrão (dias). O campo value deve ser pelo menos 1. Example: 1

requires_signature   boolean  optional    

Exige assinatura. Example: true

numero_ca   string  optional    

Número do CA. O campo value não pode ser superior a 20 caracteres. Example: Example Numero ca

action   string     

Ação. Example: Example Action

Must be one of:
  • link_existing
  • create_new
product_id   string  optional    

Produto. This field is required when action is link_existing. The uuid of an existing record in the products table. Example: 0d3ccbfd-4635-35e7-a9e5-921e9e2d84c5

product_family_id   string  optional    

Família do produto. This field is required when action is create_new. The uuid of an existing record in the product_families table. Example: b24c5c56-ae3e-37ec-83f9-fc95ccc971be

requires authentication epi update

Link several EPI types to catalog products at once, creating the product where it does not exist yet. All or nothing: one refusal rolls back the whole batch.

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/epi-types/link-products" \
    --header "Authorization: Bearer Vbh3DZeP8dgEv541a6akfc6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"epi_type_id\": \"eb254c05-38a6-3eb4-a3bb-16fe124faa80\",
            \"action\": \"Example Items * action\",
            \"product_id\": \"bb5ef129-349c-33a8-b041-a4f52cd2d877\",
            \"product_family_id\": \"d6d493c3-012f-30cd-b8ae-2a226a4b82e9\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-types/link-products"
);

const headers = {
    "Authorization": "Bearer Vbh3DZeP8dgEv541a6akfc6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "items": [
        {
            "epi_type_id": "eb254c05-38a6-3eb4-a3bb-16fe124faa80",
            "action": "Example Items * action",
            "product_id": "bb5ef129-349c-33a8-b041-a4f52cd2d877",
            "product_family_id": "d6d493c3-012f-30cd-b8ae-2a226a4b82e9"
        },
        null
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Link an EPI type to a catalog product

requires authentication epi update

Link one EPI type to an existing product, or create the product from the EPI type name.

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/epi-types/cumque/product" \
    --header "Authorization: Bearer a6d1hc4D6VE5kabeZP83vgf" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"action\": \"Example Action\",
    \"product_id\": \"f40c2139-5d53-3dc8-a6c6-c3864b26d7f7\",
    \"product_family_id\": \"c15f1dcc-0942-34f7-9377-678a3eda0964\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-types/cumque/product"
);

const headers = {
    "Authorization": "Bearer a6d1hc4D6VE5kabeZP83vgf",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "action": "Example Action",
    "product_id": "f40c2139-5d53-3dc8-a6c6-c3864b26d7f7",
    "product_family_id": "c15f1dcc-0942-34f7-9377-678a3eda0964"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/epi-types/{epiType}/product

Headers

Authorization        

Example: Bearer a6d1hc4D6VE5kabeZP83vgf

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: cumque

Body Parameters

action   string     

Ação. Example: Example Action

Must be one of:
  • link_existing
  • create_new
product_id   string  optional    

Produto. This field is required when action is link_existing. The uuid of an existing record in the products table. Example: f40c2139-5d53-3dc8-a6c6-c3864b26d7f7

product_family_id   string  optional    

Família do produto. This field is required when action is create_new. The uuid of an existing record in the product_families table. Example: c15f1dcc-0942-34f7-9377-678a3eda0964

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/quia" \
    --header "Authorization: Bearer ZbVaP6fav6d1h54eDck3E8g" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"default_validity_days\": 1,
    \"requires_signature\": true,
    \"numero_ca\": \"Example Numero ca\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-types/quia"
);

const headers = {
    "Authorization": "Bearer ZbVaP6fav6d1h54eDck3E8g",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "default_validity_days": 1,
    "requires_signature": true,
    "numero_ca": "Example Numero ca"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "string"
}
 

Request      

PUT api/epi-types/{epiType}

Headers

Authorization        

Example: Bearer ZbVaP6fav6d1h54eDck3E8g

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: quia

Body Parameters

name   string     

Nome. Example: Example Name

default_validity_days   integer     

Validade padrão (dias). O campo value deve ser pelo menos 1. Example: 1

requires_signature   boolean  optional    

Exige assinatura. Example: true

numero_ca   string  optional    

Número do CA. O campo value não pode ser superior a 20 caracteres. Example: Example Numero ca

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/laudantium" \
    --header "Authorization: Bearer k6g4Ed5VPabec83vZafh16D" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-types/laudantium"
);

const headers = {
    "Authorization": "Bearer k6g4Ed5VPabec83vZafh16D",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/epi-types/{epiType}

Headers

Authorization        

Example: Bearer k6g4Ed5VPabec83vZafh16D

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: laudantium

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 6ePav4EZhfD8V31kcg56dba" \
    --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 6ePav4EZhfD8V31kcg56dba",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "55b35ae7-5ea3-424f-8b9d-49f0f9d3b6b9",
            "name": "delectus",
            "description": "Qui autem aut nihil itaque laboriosam nulla autem.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "b09d0096-b763-4495-8455-49707456a18e",
            "name": "autem",
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/employee-roles

Headers

Authorization        

Example: Bearer 6ePav4EZhfD8V31kcg56dba

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Search query. Example: Manager

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/odit" \
    --header "Authorization: Bearer c8g4kadE6a5V3hZbfv6D1eP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employee-roles/odit"
);

const headers = {
    "Authorization": "Bearer c8g4kadE6a5V3hZbfv6D1eP",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "f964e01a-5e4a-46bf-9009-6b120f437473",
        "name": "dicta",
        "description": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/employee-roles/{employeeRole}

Headers

Authorization        

Example: Bearer c8g4kadE6a5V3hZbfv6D1eP

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employeeRole   string     

Employee Role UUID Example: odit

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 ce51baVh6k6vDZPd8fEa43g" \
    --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 ce51baVh6k6vDZPd8fEa43g",
    "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"
}
 

Request      

POST api/employee-roles

Headers

Authorization        

Example: Bearer ce51baVh6k6vDZPd8fEa43g

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

description   string  optional    

Descrição. Example: Example Description

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/molestias" \
    --header "Authorization: Bearer h3E4cg1DvfbPd5ZVke6aa86" \
    --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/molestias"
);

const headers = {
    "Authorization": "Bearer h3E4cg1DvfbPd5ZVke6aa86",
    "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"
}
 

Request      

PUT api/employee-roles/{employeeRole}

Headers

Authorization        

Example: Bearer h3E4cg1DvfbPd5ZVke6aa86

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employeeRole   string     

Employee Role UUID Example: molestias

Body Parameters

name   string  optional    

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

description   string  optional    

Descrição. Example: Example Description

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/sapiente" \
    --header "Authorization: Bearer E6bfD6Ze183Vaa5Pghdck4v" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employee-roles/sapiente"
);

const headers = {
    "Authorization": "Bearer E6bfD6Ze183Vaa5Pghdck4v",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/employee-roles/{employeeRole}

Headers

Authorization        

Example: Bearer E6bfD6Ze183Vaa5Pghdck4v

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employeeRole   string     

Employee Role UUID Example: sapiente

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 Vad13c6Dhf5avb4ek6ZEPg8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sort_by\": \"delivery_date\",
    \"sort_desc\": false,
    \"page\": 87,
    \"per_page\": 10,
    \"q\": \"minima\",
    \"employee_id\": \"sapiente\",
    \"has_term\": false
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-terms"
);

const headers = {
    "Authorization": "Bearer Vad13c6Dhf5avb4ek6ZEPg8",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "sort_by": "delivery_date",
    "sort_desc": false,
    "page": 87,
    "per_page": 10,
    "q": "minima",
    "employee_id": "sapiente",
    "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."
}
 

Request      

GET api/epi-terms

Headers

Authorization        

Example: Bearer Vad13c6Dhf5avb4ek6ZEPg8

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

sort_by   string  optional    

Example: delivery_date

Must be one of:
  • delivery_date
  • created_at
sort_desc   boolean  optional    

Example: false

page   integer  optional    

O campo value deve ser pelo menos 1. Example: 87

per_page   integer  optional    

O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 10

q   string  optional    

Example: minima

employee_id   string  optional    

The uuid of an existing record in the employees table. Example: sapiente

has_term   boolean  optional    

Example: false

List employees

requires authentication employee index

List all employees

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/employees?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Jo%C3%A3o+Silva&status=active&employee_roles[]=consequatur&admission_date_from=2026-01-01&admission_date_to=2026-12-31" \
    --header "Authorization: Bearer aZbfacE8g664Ve3Pk5dD1vh" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees"
);

const params = {
    "sort_by": "created_at",
    "sort_desc": "1",
    "page": "1",
    "per_page": "15",
    "q": "João Silva",
    "status": "active",
    "employee_roles[0]": "consequatur",
    "admission_date_from": "2026-01-01",
    "admission_date_to": "2026-12-31",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer aZbfacE8g664Ve3Pk5dD1vh",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "e21a79c3-bf03-4228-b522-ff9595b58f85",
            "name": "Máximo Ortiz Jr.",
            "cpf": "323.792.263-85",
            "rg": null,
            "ctps": null,
            "phone": "(43) 97072-0925",
            "birthdate": "1989-08-26",
            "email": null,
            "pis_pasep": null,
            "admission_date": "2004-10-24",
            "daily_salary": "152.41",
            "monthly_salary": null,
            "nationality": "Tunísia",
            "place_of_birth": null,
            "status": "active",
            "status_label": "Ativo",
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "employee_role": {
                "id": "a3295ff7-feb3-4c24-b22e-f7ed89e473c8",
                "name": "qui"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "b47b4cb8-0da5-4134-9a89-d9a6a9788c83",
            "name": "Juan Carrara Filho",
            "cpf": "845.842.034-42",
            "rg": null,
            "ctps": null,
            "phone": "(11) 2774-6180",
            "birthdate": null,
            "email": "carla56@example.com",
            "pis_pasep": "07798237010",
            "admission_date": "1988-11-11",
            "daily_salary": null,
            "monthly_salary": "5667.82",
            "nationality": null,
            "place_of_birth": null,
            "status": "active",
            "status_label": "Ativo",
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "employee_role": {
                "id": "a3295ff8-01d0-44b0-ac80-e0f78ca87224",
                "name": "nesciunt"
            },
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": "/?page=86",
        "next": null
    },
    "meta": {
        "current_page": 87,
        "from": 861,
        "last_page": 1,
        "links": [
            {
                "url": "/?page=86",
                "label": "&laquo; Anterior",
                "page": 86,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": false
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 862,
        "total": 2
    }
}
 

Request      

GET api/employees

Headers

Authorization        

Example: Bearer aZbfacE8g664Ve3Pk5dD1vh

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Search query. Example: João Silva

status   string  optional    

Filtrar por situação (active, inactive ou all). Sem o parâmetro, lista apenas ativos. Example: active

Must be one of:
  • active
  • inactive
  • all
employee_roles   string[]  optional    

The uuid of an existing record in the employee_roles table.

admission_date_from   string  optional    

Data inicial do período de admissão. O campo value deve ser uma data válida. Example: 2026-01-01

admission_date_to   string  optional    

Data final do período de admissão. O campo value deve ser uma data válida. O campo value deve ser uma data posterior ou igual a admission_date_from. Example: 2026-12-31

Export employees to Excel

requires authentication employee export

Dispatches async Excel generation using the same filters as the listing. Frontend is notified via Pusher when ready.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/employees/excel?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Jo%C3%A3o+Silva&status=active&employee_roles[]=voluptas&admission_date_from=2026-01-01&admission_date_to=2026-12-31" \
    --header "Authorization: Bearer bVgdZea6Ea4h865cvkfDP31" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/excel"
);

const params = {
    "sort_by": "created_at",
    "sort_desc": "1",
    "page": "1",
    "per_page": "15",
    "q": "João Silva",
    "status": "active",
    "employee_roles[0]": "voluptas",
    "admission_date_from": "2026-01-01",
    "admission_date_to": "2026-12-31",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer bVgdZea6Ea4h865cvkfDP31",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (202):


{
    "message": "string",
    "channel": "string",
    "event": "string"
}
 

Example response (422):


{
    "message": "string"
}
 

Request      

GET api/employees/excel

Headers

Authorization        

Example: Bearer bVgdZea6Ea4h865cvkfDP31

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Search query. Example: João Silva

status   string  optional    

Filtrar por situação (active, inactive ou all). Sem o parâmetro, lista apenas ativos. Example: active

Must be one of:
  • active
  • inactive
  • all
employee_roles   string[]  optional    

The uuid of an existing record in the employee_roles table.

admission_date_from   string  optional    

Data inicial do período de admissão. O campo value deve ser uma data válida. Example: 2026-01-01

admission_date_to   string  optional    

Data final do período de admissão. O campo value deve ser uma data válida. O campo value deve ser uma data posterior ou igual a admission_date_from. Example: 2026-12-31

Show employee

requires authentication employee show

Show an employee

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/employees/18" \
    --header "Authorization: Bearer dceDf61ghP63bk8Zv45EaVa" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/18"
);

const headers = {
    "Authorization": "Bearer dceDf61ghP63bk8Zv45EaVa",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "b475adef-1c10-4aa9-965c-cc68831af602",
        "name": "Dr. Agostinho Luciano Camacho",
        "cpf": "844.851.508-94",
        "rg": "940160858",
        "ctps": null,
        "phone": "(54) 98684-4339",
        "birthdate": null,
        "email": "carolina82@example.com",
        "pis_pasep": null,
        "admission_date": "2010-06-01",
        "daily_salary": null,
        "monthly_salary": "7985.23",
        "nationality": "Croácia",
        "place_of_birth": null,
        "status": "active",
        "status_label": "Ativo",
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        },
        "employee_role": {
            "id": "a3295ff8-0e1d-4134-b385-9f634ee9dfe1",
            "name": "quod"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/employees/{id}

Headers

Authorization        

Example: Bearer dceDf61ghP63bk8Zv45EaVa

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the employee. Example: 18

employee   string     

Employee ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 dkg6veZD5ba6V18P43fcEha" \
    --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\": \"3896eb9c-79be-4f17-ae20-4c54b577c330\",
    \"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 dkg6veZD5ba6V18P43fcEha",
    "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": "3896eb9c-79be-4f17-ae20-4c54b577c330",
    "pis_pasep": "Example Pis pasep",
    "admission_date": "2024-01-01",
    "daily_salary": 1,
    "monthly_salary": 1,
    "nationality": "Example Nationality",
    "place_of_birth": "Example Place of birth",
    "address": {
        "0": "example1",
        "1": "example2",
        "street": "Example Address street",
        "number": "Example Address number",
        "complement": "Example Address complement",
        "neighborhood": "Example Address neighborhood",
        "city": "Example Address city",
        "state": "Example Address state",
        "zip_code": "Example Address zip code"
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "data": {
        "id": "363e5e81-4685-4f01-a8f9-74b81f974e64",
        "name": "Sr. Luan Gil Filho",
        "cpf": "015.802.953-21",
        "rg": null,
        "ctps": null,
        "phone": "(18) 99417-4973",
        "birthdate": "2000-06-30",
        "email": "lorenzo.pontes@example.com",
        "pis_pasep": null,
        "admission_date": "1993-05-04",
        "daily_salary": "143.83",
        "monthly_salary": "7348.58",
        "nationality": null,
        "place_of_birth": null,
        "status": "active",
        "status_label": "Ativo",
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        },
        "employee_role": {
            "id": "a3295ff8-175c-43b8-be07-550134046fac",
            "name": "aut"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/employees

Headers

Authorization        

Example: Bearer dkg6veZD5ba6V18P43fcEha

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

cpf   string     

CPF. O campo value deve ser 14 caracteres. Example: Example Cpf

rg   string  optional    

RG. O campo value não pode ser superior a 20 caracteres. Example: Example Rg

ctps   string  optional    

CTPS. O campo value não pode ser superior a 20 caracteres. Example: Example Ctps

phone   string  optional    

Telefone. O campo value não pode ser superior a 20 caracteres. Example: (11) 99999-9999

birthdate   string  optional    

Data de Nascimento. O campo value deve ser uma data válida. Example: 2024-01-01

email   string  optional    

E-mail. O campo value deve ser um endereço de e-mail válido. Example: user@example.com

employee_role_id   string     

Cargo. The uuid of an existing record in the employee_roles table. Example: 3896eb9c-79be-4f17-ae20-4c54b577c330

pis_pasep   string  optional    

PIS/PASEP. O campo value deve ter 11 dígitos. Example: Example Pis pasep

admission_date   string  optional    

Data de Admissão. O campo value deve ser uma data válida. O campo value deve ser uma data anterior ou igual a today. Example: 2024-01-01

daily_salary   number  optional    

Salário Diário. O campo value deve ser pelo menos 0. Example: 1

monthly_salary   number  optional    

Salário Mensal. O campo value deve ser pelo menos 0. Example: 1

nationality   string  optional    

Nacionalidade. O campo value não pode ser superior a 100 caracteres. Example: Example Nationality

place_of_birth   string  optional    

Naturalidade. O campo value não pode ser superior a 255 caracteres. Example: Example Place of birth

address   object  optional    

Endereço.

street   string  optional    

Rua. Example: Example Address street

number   string  optional    

Número. Example: Example Address number

complement   string  optional    

Complemento. Example: Example Address complement

neighborhood   string  optional    

Bairro. Example: Example Address neighborhood

city   string  optional    

Cidade. Example: Example Address city

state   string  optional    

Estado. Example: Example Address state

zip_code   string  optional    

CEP. Example: Example Address zip code

Update employee

requires authentication employee update

Update an employee

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/employees/10" \
    --header "Authorization: Bearer aV15h6Zecfvg8k3Dba6dPE4" \
    --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\": \"f745f207-c0a7-4ecb-9bd1-225a0aa67b6a\",
    \"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/10"
);

const headers = {
    "Authorization": "Bearer aV15h6Zecfvg8k3Dba6dPE4",
    "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": "f745f207-c0a7-4ecb-9bd1-225a0aa67b6a",
    "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"
}
 

Request      

PUT api/employees/{id}

Headers

Authorization        

Example: Bearer aV15h6Zecfvg8k3Dba6dPE4

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the employee. Example: 10

employee   string     

Employee ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

name   string  optional    

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

cpf   string  optional    

CPF. O campo value deve ser 14 caracteres. Example: Example Cpf

rg   string  optional    

RG. O campo value não pode ser superior a 20 caracteres. Example: Example Rg

ctps   string  optional    

CTPS. O campo value não pode ser superior a 20 caracteres. Example: Example Ctps

phone   string  optional    

Telefone. O campo value não pode ser superior a 20 caracteres. Example: (11) 99999-9999

birthdate   string  optional    

Data de Nascimento. O campo value deve ser uma data válida. Example: 2024-01-01

email   string  optional    

E-mail. O campo value deve ser um endereço de e-mail válido. Example: user@example.com

employee_role_id   string  optional    

Cargo. The uuid of an existing record in the employee_roles table. Example: f745f207-c0a7-4ecb-9bd1-225a0aa67b6a

pis_pasep   string  optional    

PIS/PASEP. O campo value deve ter 11 dígitos. Example: Example Pis pasep

admission_date   string  optional    

Data de Admissão. O campo value deve ser uma data válida. O campo value deve ser uma data anterior ou igual a today. Example: 2024-01-01

daily_salary   number  optional    

Salário Diário. O campo value deve ser pelo menos 0. Example: 1

monthly_salary   number  optional    

Salário Mensal. O campo value deve ser pelo menos 0. Example: 1

nationality   string  optional    

Nacionalidade. O campo value não pode ser superior a 100 caracteres. Example: Example Nationality

place_of_birth   string  optional    

Naturalidade. O campo value não pode ser superior a 255 caracteres. Example: Example Place of birth

address   object  optional    

Endereço.

street   string  optional    

Rua. Example: Example Address street

number   string  optional    

Número. Example: Example Address number

complement   string  optional    

Complemento. Example: Example Address complement

neighborhood   string  optional    

Bairro. Example: Example Address neighborhood

city   string  optional    

Cidade. Example: Example Address city

state   string  optional    

Estado. Example: Example Address state

zip_code   string  optional    

CEP. Example: Example Address zip code

Dismiss employee

requires authentication employee employment

Register the dismissal of an active employee

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32/dismiss" \
    --header "Authorization: Bearer P684DcEgZbea6hd5Vvk3a1f" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"dismissal_date\": \"2026-11-06\",
    \"dismissal_reason\": \"resignation\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32/dismiss"
);

const headers = {
    "Authorization": "Bearer P684DcEgZbea6hd5Vvk3a1f",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "dismissal_date": "2026-11-06",
    "dismissal_reason": "resignation"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "618431ab-b306-4d3e-85b5-a3dff0a0502f",
        "name": "Michelle Clarice Gonçalves",
        "cpf": "155.696.868-14",
        "rg": "339206686",
        "ctps": null,
        "phone": "(28) 4526-4708",
        "birthdate": "1984-03-18",
        "email": "daniel57@example.org",
        "pis_pasep": "64556637148",
        "admission_date": "1998-11-01",
        "daily_salary": null,
        "monthly_salary": "5480.19",
        "nationality": null,
        "place_of_birth": null,
        "status": "active",
        "status_label": "Ativo",
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        },
        "employee_role": {
            "id": "a3295ff8-2610-4224-8c68-97cae160c8e5",
            "name": "ut"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/employees/{employee}/dismiss

Headers

Authorization        

Example: Bearer P684DcEgZbea6hd5Vvk3a1f

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

dismissal_date   string     

Data da baixa. O campo value deve ser uma data válida. O campo value deve ser uma data anterior ou igual a today. Example: 2026-11-06

dismissal_reason   string     

Motivo da saída. Example: resignation

Must be one of:
  • resignation
  • dismissal_without_cause
  • dismissal_with_cause
  • end_of_contract
  • retirement

Rehire employee

requires authentication employee employment

Rehire an inactive employee with a new admission date

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32/rehire" \
    --header "Authorization: Bearer V8k53E6g6cha4dbaef1PZDv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"admission_date\": \"2026-11-06\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32/rehire"
);

const headers = {
    "Authorization": "Bearer V8k53E6g6cha4dbaef1PZDv",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "admission_date": "2026-11-06"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "d5e26f3f-def7-4dfb-abec-d36b8ded8f77",
        "name": "Eric Azevedo Aguiar",
        "cpf": "114.998.391-10",
        "rg": "009453181",
        "ctps": null,
        "phone": "(83) 2696-0084",
        "birthdate": "2026-03-14",
        "email": null,
        "pis_pasep": "54134947525",
        "admission_date": "2016-06-30",
        "daily_salary": "65.29",
        "monthly_salary": null,
        "nationality": "Croácia",
        "place_of_birth": null,
        "status": "active",
        "status_label": "Ativo",
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        },
        "employee_role": {
            "id": "a3295ff8-2c61-465c-aa75-406d184cbb78",
            "name": "perspiciatis"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/employees/{employee}/rehire

Headers

Authorization        

Example: Bearer V8k53E6g6cha4dbaef1PZDv

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

admission_date   string     

Nova data de admissão. O campo value deve ser uma data válida. O campo value deve ser uma data anterior ou igual a today. Example: 2026-11-06

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 kD1c8vdE466hPZg5aV3fabe" \
    --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 kD1c8vdE466hPZg5aV3fabe",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/employees/{employee}

Headers

Authorization        

Example: Bearer kD1c8vdE466hPZg5aV3fabe

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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/1/bank-account" \
    --header "Authorization: Bearer 1fv4Ebaca3DP6kVhde56Zg8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/1/bank-account"
);

const headers = {
    "Authorization": "Bearer 1fv4Ebaca3DP6kVhde56Zg8",
    "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."
}
 

Request      

GET api/employees/{employee_id}/bank-account

Headers

Authorization        

Example: Bearer 1fv4Ebaca3DP6kVhde56Zg8

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 1

employee   string     

Employee UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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/16/bank-account" \
    --header "Authorization: Bearer h1PEb66fa83agdekvZcV45D" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bank_id\": \"rem\",
    \"agency\": \"gubo\",
    \"account\": \"q\",
    \"account_type\": \"corrente\",
    \"pix_key\": \"mfluyriurccjzdwja\",
    \"favorite\": false
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/16/bank-account"
);

const headers = {
    "Authorization": "Bearer h1PEb66fa83agdekvZcV45D",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "bank_id": "rem",
    "agency": "gubo",
    "account": "q",
    "account_type": "corrente",
    "pix_key": "mfluyriurccjzdwja",
    "favorite": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):



 

Request      

POST api/employees/{employee_id}/bank-account

Headers

Authorization        

Example: Bearer h1PEb66fa83agdekvZcV45D

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 16

employee   string     

Employee UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

bank_id   string     

The uuid of an existing record in the banks table. Example: rem

agency   string     

O campo value não pode ser superior a 255 caracteres. Example: gubo

account   string     

O campo value não pode ser superior a 255 caracteres. Example: q

account_type   string     

Example: corrente

Must be one of:
  • corrente
  • poupança
pix_key   string  optional    

O campo value não pode ser superior a 255 caracteres. Example: mfluyriurccjzdwja

favorite   boolean  optional    

Example: false

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/17/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33" \
    --header "Authorization: Bearer Vd436avf6k81bEhZc5eaDgP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bank_id\": \"enim\",
    \"agency\": \"zodllleexsrlr\",
    \"account\": \"rvfwto\",
    \"account_type\": \"poupança\",
    \"pix_key\": \"fzhdpaqfivbsnjqpvke\",
    \"favorite\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/17/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33"
);

const headers = {
    "Authorization": "Bearer Vd436avf6k81bEhZc5eaDgP",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "bank_id": "enim",
    "agency": "zodllleexsrlr",
    "account": "rvfwto",
    "account_type": "poupança",
    "pix_key": "fzhdpaqfivbsnjqpvke",
    "favorite": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/employees/{employee_id}/bank-account/{id}

Headers

Authorization        

Example: Bearer Vd436avf6k81bEhZc5eaDgP

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 17

id   string     

Bank account UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c33

employee   string     

Employee UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

bank_id   string  optional    

The uuid of an existing record in the banks table. Example: enim

agency   string  optional    

O campo value não pode ser superior a 255 caracteres. Example: zodllleexsrlr

account   string  optional    

O campo value não pode ser superior a 255 caracteres. Example: rvfwto

account_type   string  optional    

Example: poupança

Must be one of:
  • corrente
  • poupança
pix_key   string  optional    

O campo value não pode ser superior a 255 caracteres. Example: fzhdpaqfivbsnjqpvke

favorite   boolean  optional    

Example: true

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 1g5b6Evd8akeZ64PhVfaD3c" \
    --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 1g5b6Evd8akeZ64PhVfaD3c",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/employees/{employee}/bank-account/{id}

Headers

Authorization        

Example: Bearer 1g5b6Evd8akeZ64PhVfaD3c

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

id   string     

Bank account UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c33

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/5/epi-deliveries" \
    --header "Authorization: Bearer k1c6aeD8Pa543bdZhVfEv6g" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"temporibus\",
    \"status\": \"expiring\",
    \"epi_type_id\": \"id\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/5/epi-deliveries"
);

const headers = {
    "Authorization": "Bearer k1c6aeD8Pa543bdZhVfEv6g",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "q": "temporibus",
    "status": "expiring",
    "epi_type_id": "id"
};

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."
}
 

Request      

GET api/employees/{employee_id}/epi-deliveries

Headers

Authorization        

Example: Bearer k1c6aeD8Pa543bdZhVfEv6g

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 5

employee   string     

Employee UUID Example: facere

Body Parameters

q   string  optional    

Example: temporibus

status   string  optional    

Example: expiring

Must be one of:
  • valid
  • expiring
  • expired
epi_type_id   string  optional    

The uuid of an existing record in the epi_types table. Example: id

has_term   string  optional    

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/omnis/epi-deliveries/pending-renewals-count" \
    --header "Authorization: Bearer 15ZcPdkg6DVeEah8bv463fa" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/omnis/epi-deliveries/pending-renewals-count"
);

const headers = {
    "Authorization": "Bearer 15ZcPdkg6DVeEah8bv463fa",
    "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."
}
 

Request      

GET api/employees/{employee}/epi-deliveries/pending-renewals-count

Headers

Authorization        

Example: Bearer 15ZcPdkg6DVeEah8bv463fa

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: omnis

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/11/epi-deliveries/voluptas" \
    --header "Authorization: Bearer cgfka5bv1PZh66d843eaDVE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/11/epi-deliveries/voluptas"
);

const headers = {
    "Authorization": "Bearer cgfka5bv1PZh66d843eaDVE",
    "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."
}
 

Request      

GET api/employees/{employee_id}/epi-deliveries/{id}

Headers

Authorization        

Example: Bearer cgfka5bv1PZh66d843eaDVE

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 11

id   string     

EPI delivery UUID Example: voluptas

employee   string     

Employee UUID Example: odit

Create employee EPI delivery

requires authentication employee-epi store

Register an EPI delivery for an employee

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/employees/8/epi-deliveries" \
    --header "Authorization: Bearer ZaVkDgf4v68h16aPeE5db3c" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"epi_type_id\": \"2567b47a-8f67-314e-92d7-60df8ca8f4b2\",
    \"delivery_date\": \"2024-01-01\",
    \"quantity\": 1,
    \"condition\": \"Example Condition\",
    \"delivered_by_employee_id\": \"5a5c14cd-1d6e-47f7-b978-727bab24bbee\",
    \"stock_id\": \"3230b8ca-5c1f-3720-bd49-2f8b5280194a\",
    \"confirm_insufficient_stock\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/8/epi-deliveries"
);

const headers = {
    "Authorization": "Bearer ZaVkDgf4v68h16aPeE5db3c",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "epi_type_id": "2567b47a-8f67-314e-92d7-60df8ca8f4b2",
    "delivery_date": "2024-01-01",
    "quantity": 1,
    "condition": "Example Condition",
    "delivered_by_employee_id": "5a5c14cd-1d6e-47f7-b978-727bab24bbee",
    "stock_id": "3230b8ca-5c1f-3720-bd49-2f8b5280194a",
    "confirm_insufficient_stock": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):



 

Request      

POST api/employees/{employee_id}/epi-deliveries

Headers

Authorization        

Example: Bearer ZaVkDgf4v68h16aPeE5db3c

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 8

employee   string     

Employee UUID Example: in

Body Parameters

epi_type_id   string     

Tipo de EPI. The uuid of an existing record in the epi_types table. Example: 2567b47a-8f67-314e-92d7-60df8ca8f4b2

delivery_date   string     

Data de entrega. O campo value deve ser uma data válida. Example: 2024-01-01

quantity   integer  optional    

Quantidade. O campo value deve ser pelo menos 1. Example: 1

condition   string     

Condicao. Example: Example Condition

Must be one of:
  • new
  • used
  • reformed
delivered_by_employee_id   string  optional    

Responsável pela entrega. The uuid of an existing record in the employees table. Example: 5a5c14cd-1d6e-47f7-b978-727bab24bbee

stock_id   string  optional    

Estoque. The uuid of an existing record in the stocks table. Example: 3230b8ca-5c1f-3720-bd49-2f8b5280194a

confirm_insufficient_stock   boolean  optional    

Confirmar saldo insuficiente. Example: true

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/natus/epi-deliveries/kit" \
    --header "Authorization: Bearer 1kV8fcbe36D4v6aaPhd5gEZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"delivery_date\": \"2024-01-01\",
    \"is_kit_initial\": true,
    \"show_epi_receipt_text\": true,
    \"delivered_by_employee_id\": \"bbd4ca6b-5f8c-4a9c-b6ad-5e70a502a083\",
    \"stock_id\": \"6927c6a7-b95c-3d9e-a9d7-fedfcb34ebba\",
    \"confirm_insufficient_stock\": true,
    \"items\": [
        {
            \"epi_type_id\": \"074e7ae6-78c7-31d1-92b7-ddc2c57c6e27\",
            \"quantity\": 1,
            \"condition\": \"Example Items * condition\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/natus/epi-deliveries/kit"
);

const headers = {
    "Authorization": "Bearer 1kV8fcbe36D4v6aaPhd5gEZ",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "delivery_date": "2024-01-01",
    "is_kit_initial": true,
    "show_epi_receipt_text": true,
    "delivered_by_employee_id": "bbd4ca6b-5f8c-4a9c-b6ad-5e70a502a083",
    "stock_id": "6927c6a7-b95c-3d9e-a9d7-fedfcb34ebba",
    "confirm_insufficient_stock": true,
    "items": [
        {
            "epi_type_id": "074e7ae6-78c7-31d1-92b7-ddc2c57c6e27",
            "quantity": 1,
            "condition": "Example Items * condition"
        },
        null
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):



 

Request      

POST api/employees/{employee}/epi-deliveries/kit

Headers

Authorization        

Example: Bearer 1kV8fcbe36D4v6aaPhd5gEZ

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: natus

Body Parameters

delivery_date   string     

Data de entrega. O campo value deve ser uma data válida. Example: 2024-01-01

is_kit_initial   boolean  optional    

Kit inicial. Example: true

show_epi_receipt_text   boolean  optional    

Exibir texto do recibo. Example: true

delivered_by_employee_id   string  optional    

Responsável pela entrega. The uuid of an existing record in the employees table. Example: bbd4ca6b-5f8c-4a9c-b6ad-5e70a502a083

stock_id   string  optional    

Estoque. The uuid of an existing record in the stocks table. Example: 6927c6a7-b95c-3d9e-a9d7-fedfcb34ebba

confirm_insufficient_stock   boolean  optional    

Confirmar saldo insuficiente. Example: true

items   object[]     

Itens do kit. O campo value deve ter pelo menos 1 itens.

epi_type_id   string     

Tipo de EPI. The uuid of an existing record in the epi_types table. Example: 074e7ae6-78c7-31d1-92b7-ddc2c57c6e27

quantity   integer  optional    

Quantidade. O campo value deve ser pelo menos 1. Example: 1

condition   string     

Condição. Example: Example Items * condition

Must be one of:
  • new
  • used
  • reformed

Promote EPI delivery to kit

requires authentication employee-epi kit

Turn a standalone EPI delivery into a single-item kit so it can generate the acknowledgement term. Idempotent: a delivery already belonging to a kit is returned unchanged.

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/employees/est/epi-deliveries/eligendi/promote-to-kit" \
    --header "Authorization: Bearer a6465gPe1k8dEcvbaZVfDh3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/est/epi-deliveries/eligendi/promote-to-kit"
);

const headers = {
    "Authorization": "Bearer a6465gPe1k8dEcvbaZVfDh3",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/employees/{employee}/epi-deliveries/{id}/promote-to-kit

Headers

Authorization        

Example: Bearer a6465gPe1k8dEcvbaZVfDh3

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: est

id   string     

EPI delivery UUID Example: eligendi

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/16/epi-deliveries/et" \
    --header "Authorization: Bearer EaDkdZPV8ga4h66e3vcfb51" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"epi_type_id\": \"7264860a-5116-3d7f-990d-72fa807cb1cf\",
    \"delivery_date\": \"2024-01-01\",
    \"quantity\": 1,
    \"condition\": \"Example Condition\",
    \"delivered_by_employee_id\": \"fa3d581b-c38d-47d5-9e27-02d7f59fe248\",
    \"stock_id\": \"1e7794cf-08ba-3212-a466-b49cbbf23070\",
    \"confirm_insufficient_stock\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/16/epi-deliveries/et"
);

const headers = {
    "Authorization": "Bearer EaDkdZPV8ga4h66e3vcfb51",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "epi_type_id": "7264860a-5116-3d7f-990d-72fa807cb1cf",
    "delivery_date": "2024-01-01",
    "quantity": 1,
    "condition": "Example Condition",
    "delivered_by_employee_id": "fa3d581b-c38d-47d5-9e27-02d7f59fe248",
    "stock_id": "1e7794cf-08ba-3212-a466-b49cbbf23070",
    "confirm_insufficient_stock": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/employees/{employee_id}/epi-deliveries/{id}

Headers

Authorization        

Example: Bearer EaDkdZPV8ga4h66e3vcfb51

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 16

id   string     

EPI delivery UUID Example: et

employee   string     

Employee UUID Example: modi

Body Parameters

epi_type_id   string  optional    

Tipo de EPI. The uuid of an existing record in the epi_types table. Example: 7264860a-5116-3d7f-990d-72fa807cb1cf

delivery_date   string  optional    

Data de entrega. O campo value deve ser uma data válida. Example: 2024-01-01

quantity   integer  optional    

Quantidade. O campo value deve ser pelo menos 1. Example: 1

condition   string  optional    

Condição. Example: Example Condition

Must be one of:
  • new
  • used
  • reformed
delivered_by_employee_id   string  optional    

Responsável pela entrega. The uuid of an existing record in the employees table. Example: fa3d581b-c38d-47d5-9e27-02d7f59fe248

stock_id   string  optional    

Estoque. The uuid of an existing record in the stocks table. Example: 1e7794cf-08ba-3212-a466-b49cbbf23070

confirm_insufficient_stock   boolean  optional    

Confirmar saldo insuficiente. Example: true

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/quia" \
    --header "Authorization: Bearer 85akZ1Dvdfhc3P6eEVb6a4g" \
    --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/quia"
);

const headers = {
    "Authorization": "Bearer 85akZ1Dvdfhc3P6eEVb6a4g",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/employees/{employee}/epi-deliveries/{id}

Headers

Authorization        

Example: Bearer 85akZ1Dvdfhc3P6eEVb6a4g

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: aut

id   string     

EPI delivery UUID Example: quia

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/13/epi-terms" \
    --header "Authorization: Bearer fZ36hVdeEPb6aakDv4g518c" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sort_by\": \"created_at\",
    \"sort_desc\": false,
    \"page\": 47,
    \"per_page\": 7,
    \"q\": \"eaque\",
    \"employee_id\": \"illum\",
    \"has_term\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/13/epi-terms"
);

const headers = {
    "Authorization": "Bearer fZ36hVdeEPb6aakDv4g518c",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "sort_by": "created_at",
    "sort_desc": false,
    "page": 47,
    "per_page": 7,
    "q": "eaque",
    "employee_id": "illum",
    "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."
}
 

Request      

GET api/employees/{employee_id}/epi-terms

Headers

Authorization        

Example: Bearer fZ36hVdeEPb6aakDv4g518c

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 13

employee   string     

Employee UUID Example: voluptas

Body Parameters

sort_by   string  optional    

Example: created_at

Must be one of:
  • delivery_date
  • created_at
sort_desc   boolean  optional    

Example: false

page   integer  optional    

O campo value deve ser pelo menos 1. Example: 47

per_page   integer  optional    

O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 7

q   string  optional    

Example: eaque

employee_id   string  optional    

The uuid of an existing record in the employees table. Example: illum

has_term   boolean  optional    

Example: true

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/quaerat/epi-terms/41209750-fb34-38d0-8ece-4b29de60703c/upload" \
    --header "Authorization: Bearer VaEba1Zdchf356k8P4Dv6ge" \
    --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/quaerat/epi-terms/41209750-fb34-38d0-8ece-4b29de60703c/upload"
);

const headers = {
    "Authorization": "Bearer VaEba1Zdchf356k8P4Dv6ge",
    "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):



 

Request      

POST api/employees/{employee}/epi-terms/{kitUuid}/upload

Headers

Authorization        

Example: Bearer VaEba1Zdchf356k8P4Dv6ge

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: quaerat

kitUuid   string     

Kit UUID Example: 41209750-fb34-38d0-8ece-4b29de60703c

Body Parameters

name   string  optional    

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

file   object     

Arquivo.

path   string     

Caminho do arquivo. Example: Example File path

name   string     

Nome do arquivo. Example: Example Name

extension   string     

Extensão do arquivo. Example: Example File extension

size   string     

Tamanho do arquivo. Example: Example File size

mime_type   string  optional    

File mime type. Example: Example File mime type

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/impedit/epi-terms/a0d570d8-84b4-38e0-9354-cddd77b3ed29/document" \
    --header "Authorization: Bearer 6habg1f84V5eE3aPZkd6Dcv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/impedit/epi-terms/a0d570d8-84b4-38e0-9354-cddd77b3ed29/document"
);

const headers = {
    "Authorization": "Bearer 6habg1f84V5eE3aPZkd6Dcv",
    "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."
}
 

Request      

GET api/employees/{employee}/epi-terms/{kitUuid}/document

Headers

Authorization        

Example: Bearer 6habg1f84V5eE3aPZkd6Dcv

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: impedit

kitUuid   string     

Kit UUID Example: a0d570d8-84b4-38e0-9354-cddd77b3ed29

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"
}
 

Request      

GET api/up

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

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/f29366c9-3745-3467-8f0d-b7a14da90660" \
    --header "Authorization: Bearer PhDaga1eZ3kdcfV6vE684b5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/f29366c9-3745-3467-8f0d-b7a14da90660"
);

const headers = {
    "Authorization": "Bearer PhDaga1eZ3kdcfV6vE684b5",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/files/{uuid}

Headers

Authorization        

Example: Bearer PhDaga1eZ3kdcfV6vE684b5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: f29366c9-3745-3467-8f0d-b7a14da90660

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/dab52a22-5b65-30c4-841a-88106cf1014e/info" \
    --header "Authorization: Bearer c541b6vPa38kEhfVZg6adeD" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/dab52a22-5b65-30c4-841a-88106cf1014e/info"
);

const headers = {
    "Authorization": "Bearer c541b6vPa38kEhfVZg6adeD",
    "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"
}
 

Request      

GET api/files/{uuid}/info

Headers

Authorization        

Example: Bearer c541b6vPa38kEhfVZg6adeD

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: dab52a22-5b65-30c4-841a-88106cf1014e

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/205dd305-fbeb-3a6d-b852-95533632d867/download" \
    --header "Authorization: Bearer 3Egkc1Dv64b6fhV58PaZade" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/205dd305-fbeb-3a6d-b852-95533632d867/download"
);

const headers = {
    "Authorization": "Bearer 3Egkc1Dv64b6fhV58PaZade",
    "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"
}
 

Request      

GET api/files/{uuid}/download

Headers

Authorization        

Example: Bearer 3Egkc1Dv64b6fhV58PaZade

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

The UUID of the file to download Example: 205dd305-fbeb-3a6d-b852-95533632d867

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 k35d8Vv6g6hfbEeZa4aDPc1" \
    --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 k35d8Vv6g6hfbEeZa4aDPc1",
    "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"
}
 

Request      

POST api/files/generate-upload-url

Headers

Authorization        

Example: Bearer k35d8Vv6g6hfbEeZa4aDPc1

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

path   string     

Path. Example: Example Path

mimetype   string     

Mimetype. Example: Example Mimetype

public   boolean     

Public. Example: true

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 65kgedfPahbv6acVZ8E314D" \
    --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 65kgedfPahbv6acVZ8E314D",
    "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"
    }
]
 

Request      

POST api/files/generate-bulk-upload-url

Headers

Authorization        

Example: Bearer 65kgedfPahbv6acVZ8E314D

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

files   object[]     

Files.

path   string     

Files path. Example: `Example Files path`

mimetype   string     

Files mimetype. Example: `Example Files mimetype`

public   boolean     

Files * public. Example: true

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 V6Zgcbh5eaPDvkad16E384f" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"corporis\",
    \"document_type\": \"nfe\",
    \"supplier_id\": \"exercitationem\",
    \"work_id\": \"iusto\",
    \"products_status\": \"imported\",
    \"financial_status\": \"partial\",
    \"start_date\": \"2026-11-06T13:03:12\",
    \"end_date\": \"2093-01-12\",
    \"per_page\": 2,
    \"cost_centers\": [
        \"magni\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);

const headers = {
    "Authorization": "Bearer V6Zgcbh5eaPDvkad16E384f",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "q": "corporis",
    "document_type": "nfe",
    "supplier_id": "exercitationem",
    "work_id": "iusto",
    "products_status": "imported",
    "financial_status": "partial",
    "start_date": "2026-11-06T13:03:12",
    "end_date": "2093-01-12",
    "per_page": 2,
    "cost_centers": [
        "magni"
    ]
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "9b9666ba-0f64-3aa1-acfa-dac6c1ceabae",
            "document_type": "nfe",
            "document_type_label": "NF-e",
            "service_description": null,
            "nfe_access_key": "57346366959219299865659780501736487438170114",
            "nfe_number": "505213",
            "nfe_series": "44",
            "issue_date": "1974-01-02T03:00:00.000000Z",
            "total_value": "7560.09",
            "emit": {
                "cnpj": "09659616498440",
                "name": "Gibson, Kozey and Runolfsdottir"
            },
            "dest": {
                "document": "42710274160507",
                "name": "Hyatt-Senger"
            },
            "supplier": {
                "id": "a3295ffa-4140-4049-bd34-ec714575ac5c",
                "name": "Dr. Luis Nero Bonilha Neto",
                "document": "62.226.435/0001-06"
            },
            "financial_status": "pending",
            "products_imported_at": null,
            "created_at": null
        },
        {
            "id": "de525b46-7eee-3164-85b2-fd0f74dff1e5",
            "document_type": "nfe",
            "document_type_label": "NF-e",
            "service_description": null,
            "nfe_access_key": "91672342579726519026148026762199222333768146",
            "nfe_number": "828122",
            "nfe_series": "40",
            "issue_date": "1981-07-23T03:00:00.000000Z",
            "total_value": "1748.78",
            "emit": {
                "cnpj": "25605107232023",
                "name": "Renner Ltd"
            },
            "dest": {
                "document": "47865344272827",
                "name": "Hermann Ltd"
            },
            "supplier": {
                "id": "a3295ffa-4b22-48c3-a5c9-70fd75e395df",
                "name": "Willian Brito Queirós Sobrinho",
                "document": "89.547.100/0001-46"
            },
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 15,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/fiscal-documents

Headers

Authorization        

Example: Bearer V6Zgcbh5eaPDvkad16E384f

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: corporis

document_type   string  optional    

Example: nfe

Must be one of:
  • nfe
  • nfse
supplier_id   string  optional    

The uuid of an existing record in the suppliers table. Example: exercitationem

work_id   string  optional    

The uuid of an existing record in the works table. Example: iusto

products_status   string  optional    

Example: imported

Must be one of:
  • imported
  • pending
financial_status   string  optional    

Example: partial

Must be one of:
  • pending
  • partial
  • generated
start_date   string  optional    

O campo value deve ser uma data válida. Example: 2026-11-06T13:03:12

end_date   string  optional    

O campo value deve ser uma data válida. O campo value deve ser uma data posterior ou igual a start_date. Example: 2093-01-12

per_page   integer  optional    

O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 2

cost_centers   string[]  optional    

The uuid of an existing record in the cost_centers table.

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 Dbg36a1ckE5vhdeZP4fa86V" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"s3_file_path\": \"qui\",
    \"original_filename\": \".xml$\\/i\",
    \"work_ids\": [
        \"consequatur\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);

const headers = {
    "Authorization": "Bearer Dbg36a1ckE5vhdeZP4fa86V",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "s3_file_path": "qui",
    "original_filename": ".xml$\/i",
    "work_ids": [
        "consequatur"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "data": {
        "id": "d8a61ba3-bfed-308b-b8c7-6364ff79e34a",
        "document_type": "nfe",
        "document_type_label": "NF-e",
        "service_description": null,
        "nfe_access_key": "72118191611829069103468322121241950635230136",
        "nfe_number": "363397",
        "nfe_series": "76",
        "issue_date": "2013-10-08T03:00:00.000000Z",
        "total_value": "479.20",
        "emit": {
            "cnpj": "58768067191855",
            "name": "Langosh-Lakin"
        },
        "dest": {
            "document": "46418936201386",
            "name": "O'Keefe PLC"
        },
        "supplier": {
            "id": "a3295ffa-5e5c-4f5e-aa05-4edec85c8dc5",
            "name": "Srta. Josefina Corona Lira",
            "document": "30.520.863/0001-50"
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

POST api/fiscal-documents

Headers

Authorization        

Example: Bearer Dbg36a1ckE5vhdeZP4fa86V

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

s3_file_path   string     

Example: qui

original_filename   string     

Must match the regex /.xml$/i. Example: .xml$/i

work_ids   string[]  optional    

The uuid of an existing record in the works table.

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/maiores" \
    --header "Authorization: Bearer ckeDvh6a5Zb3aPE8dV14fg6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents/maiores"
);

const headers = {
    "Authorization": "Bearer ckeDvh6a5Zb3aPE8dV14fg6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "5f296db5-1214-31e8-b063-aa477968c966",
        "document_type": "nfe",
        "document_type_label": "NF-e",
        "service_description": null,
        "nfe_access_key": "63573033282060467482259308540818556475134602",
        "nfe_number": "894742",
        "nfe_series": "63",
        "issue_date": "1991-02-18T03:00:00.000000Z",
        "total_value": "7485.56",
        "emit": {
            "cnpj": "14336184247539",
            "name": "Sipes Inc"
        },
        "dest": {
            "document": "55665382584516",
            "name": "Feest LLC"
        },
        "supplier": {
            "id": "a3295ffa-717c-49e6-a0a3-ce753b486b36",
            "name": "Dr. Thales Quintana",
            "document": "57.763.545/0001-77"
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

GET api/fiscal-documents/{fiscalDocument}

Headers

Authorization        

Example: Bearer ckeDvh6a5Zb3aPE8dV14fg6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: maiores

Fiscal document by cost center

requires authentication fiscal-documents show

Distribui a nota por centro de custo. NF-e de produto sai do estoque: o que a vinculação dos itens lançou em cada estoque de obra (quantidade × preço do lote, o mesmo cálculo do custo apropriado do painel), o que foi para o estoque principal e o que ainda não foi integrado. NFS-e sai das parcelas, pelo centro da conta gerada. As linhas somam o total da nota; a diferença vai para other_values, que pode ser negativo quando há desconto. Linhas zeradas são omitidas.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/fiscal-documents/ipsum/cost-centers" \
    --header "Authorization: Bearer VPDk18e6vbhaag5fEc64Zd3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents/ipsum/cost-centers"
);

const headers = {
    "Authorization": "Bearer VPDk18e6vbhaag5fEc64Zd3",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "total": "5074.19",
        "source": "stock",
        "rows": [
            {
                "kind": "cost_center",
                "cost_center": {
                    "id": "uuid",
                    "code": "002.001",
                    "name": "Residencial Vila Nova"
                },
                "amount": "2100.00",
                "share": 41.39
            },
            {
                "kind": "work_without_cost_center",
                "work": {
                    "id": "uuid",
                    "name": "Reforma Centro"
                },
                "amount": "474.19",
                "share": 9.35
            },
            {
                "kind": "main_stock",
                "cost_center": {
                    "id": "uuid",
                    "code": "003.001",
                    "name": "Estoque central"
                },
                "amount": "1500.00",
                "share": 29.56
            },
            {
                "kind": "not_integrated",
                "amount": "900.00",
                "share": 17.74
            },
            {
                "kind": "other_values",
                "amount": "100.00",
                "share": 1.97
            }
        ]
    }
}
 

Request      

GET api/fiscal-documents/{fiscalDocument}/cost-centers

Headers

Authorization        

Example: Bearer VPDk18e6vbhaag5fEc64Zd3

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: ipsum

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/minus" \
    --header "Authorization: Bearer 6b4agavVZh18eDdkcP365Ef" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents/minus"
);

const headers = {
    "Authorization": "Bearer 6b4agavVZh18eDdkcP365Ef",
    "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
 

Request      

DELETE api/fiscal-documents/{fiscalDocument}

Headers

Authorization        

Example: Bearer 6b4agavVZh18eDdkcP365Ef

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: minus

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/et/files" \
    --header "Authorization: Bearer a36e1aZg8vdEV5PcfD4bk6h" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"file\": {
        \"path\": \"quae\",
        \"name\": \"ullam\",
        \"extension\": \"aut\"
    }
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents/et/files"
);

const headers = {
    "Authorization": "Bearer a36e1aZg8vdEV5PcfD4bk6h",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "file": {
        "path": "quae",
        "name": "ullam",
        "extension": "aut"
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "a87d6787-68ff-3219-96d0-e2b050145926",
        "document_type": "nfe",
        "document_type_label": "NF-e",
        "service_description": null,
        "nfe_access_key": "99921916690155451162886394139840105648881274",
        "nfe_number": "416382",
        "nfe_series": "03",
        "issue_date": "1976-07-06T03:00:00.000000Z",
        "total_value": "8684.42",
        "emit": {
            "cnpj": "55302163574486",
            "name": "Robel, Donnelly and Ebert"
        },
        "dest": {
            "document": "36416039269769",
            "name": "Torp Group"
        },
        "supplier": {
            "id": "a3295ffa-9513-4fd5-b4f8-5b23646b73cb",
            "name": "Dr. Marcos Renato Carmona",
            "document": "11.320.016/0001-06"
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

POST api/fiscal-documents/{fiscalDocument}/files

Headers

Authorization        

Example: Bearer a36e1aZg8vdEV5PcfD4bk6h

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: et

Body Parameters

file   object     
path   string     

Example: quae

name   string     

Example: ullam

extension   string     

Example: aut

size   string  optional    

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/consequatur/files/magnam" \
    --header "Authorization: Bearer 3g1beachdavV864fZD6E5Pk" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents/consequatur/files/magnam"
);

const headers = {
    "Authorization": "Bearer 3g1beachdavV864fZD6E5Pk",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "efcd0d99-970e-3efa-a289-23b111c6e402",
        "document_type": "nfe",
        "document_type_label": "NF-e",
        "service_description": null,
        "nfe_access_key": "96602636946465048270208530062591312471050083",
        "nfe_number": "355005",
        "nfe_series": "41",
        "issue_date": "1971-08-14T03:00:00.000000Z",
        "total_value": "9924.08",
        "emit": {
            "cnpj": "17013285603447",
            "name": "Rutherford LLC"
        },
        "dest": {
            "document": "58823113202138",
            "name": "Kertzmann, Johnson and Vandervort"
        },
        "supplier": {
            "id": "a3295ffa-a5fb-464e-949d-7f54226cbc2f",
            "name": "Dr. Gustavo Carvalho Jr.",
            "document": "63.657.673/0001-39"
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

DELETE api/fiscal-documents/{fiscalDocument}/files/{file}

Headers

Authorization        

Example: Bearer 3g1beachdavV864fZD6E5Pk

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: consequatur

file   string     

UUID do arquivo anexado Example: magnam

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/et/works" \
    --header "Authorization: Bearer 8bah56ak6VfDcEd4gPv3e1Z" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"work_ids\": [
        \"at\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents/et/works"
);

const headers = {
    "Authorization": "Bearer 8bah56ak6VfDcEd4gPv3e1Z",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "work_ids": [
        "at"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "df0710cd-2bdd-3b87-8090-bf05f7c5a32b",
        "document_type": "nfe",
        "document_type_label": "NF-e",
        "service_description": null,
        "nfe_access_key": "36492282433658096388601148392212878120732250",
        "nfe_number": "779225",
        "nfe_series": "24",
        "issue_date": "2008-11-05T02:00:00.000000Z",
        "total_value": "1022.69",
        "emit": {
            "cnpj": "67440952846444",
            "name": "Gerlach Ltd"
        },
        "dest": {
            "document": "85041902037964",
            "name": "Sporer, Murray and Gutkowski"
        },
        "supplier": {
            "id": "a3295ffa-b8bc-4d3b-9ca1-6220c4920539",
            "name": "Sr. Giovane Maicon Cervantes Neto",
            "document": "10.605.945/0001-90"
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

PUT api/fiscal-documents/{fiscalDocument}/works

Headers

Authorization        

Example: Bearer 8bah56ak6VfDcEd4gPv3e1Z

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: et

Body Parameters

work_ids   string[]  optional    

The uuid of an existing record in the works table.

Create installment

requires authentication fiscal-documents update

Lança uma cobrança avulsa na nota fiscal, para o boleto que o fornecedor cobra além das duplicatas do XML. Nasce pendente e sem conta no financeiro; a geração continua sendo pelo import-nfe.

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents/corrupti/installments" \
    --header "Authorization: Bearer 5D4evc1f6PEb6hdaZak83Vg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"due_date\": \"2024-01-01\",
    \"amount\": 1,
    \"number\": \"Example Number\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents/corrupti/installments"
);

const headers = {
    "Authorization": "Bearer 5D4evc1f6PEb6hdaZak83Vg",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "due_date": "2024-01-01",
    "amount": 1,
    "number": "Example Number"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "data": {
        "id": "84abad8e-0def-3651-ab01-db4521d91381",
        "document_type": "nfe",
        "document_type_label": "NF-e",
        "service_description": null,
        "nfe_access_key": "50095668849183015167179041654037945482319862",
        "nfe_number": "763901",
        "nfe_series": "76",
        "issue_date": "2004-01-27T02:00:00.000000Z",
        "total_value": "3609.42",
        "emit": {
            "cnpj": "43600608156911",
            "name": "Hermann, O'Connell and Swift"
        },
        "dest": {
            "document": "84717747139869",
            "name": "Lindgren, Senger and Halvorson"
        },
        "supplier": {
            "id": "a3295ffa-cae2-4a26-8070-1ebd6895b107",
            "name": "Yasmin Marques Neto",
            "document": "63.506.978/0001-40"
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

POST api/fiscal-documents/{fiscalDocument}/installments

Headers

Authorization        

Example: Bearer 5D4evc1f6PEb6hdaZak83Vg

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: corrupti

Body Parameters

due_date   string     

Vencimento. O campo value deve ser uma data válida. Example: 2024-01-01

amount   number     

Valor. Example: 1

number   string  optional    

Número da cobrança. O campo value não pode ser superior a 60 caracteres. Example: Example Number

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 aV1e86Pa65cbZd3gvEf4kDh" \
    --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\": \"46883037-937c-3d34-a70c-10ac409054ef\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/imports/nfe/products"
);

const headers = {
    "Authorization": "Bearer aV1e86Pa65cbZd3gvEf4kDh",
    "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": "46883037-937c-3d34-a70c-10ac409054ef"
};

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"
}
 

Request      

POST api/imports/nfe/products

Headers

Authorization        

Example: Bearer aV1e86Pa65cbZd3gvEf4kDh

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

s3_file_path   string     

Path to the NFe XML file in S3 storage Example: imports/nfe_12345.xml

original_filename   string     

Original filename of the uploaded NFe Example: nota_fiscal_001.xml

import_type   string     

Type of import (currently only "nfe" is supported) Example: nfe

fiscal_document_id   string  optional    

Fiscal document id. The uuid of an existing record in the fiscal_documents table. Example: 46883037-937c-3d34-a70c-10ac409054ef

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 agZb6df86k31caeD5hVEvP4" \
    --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 agZb6df86k31caeD5hVEvP4",
    "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"
            }
        }
    ]
}
 

Request      

GET api/imports

Headers

Authorization        

Example: Bearer agZb6df86k31caeD5hVEvP4

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of imports per page. O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

status   string  optional    

Filter imports by status (pending, processing, completed, failed). Example: completed

Must be one of:
  • pending
  • processing
  • completed
  • failed
import_type   string  optional    

Filter imports by type. Example: nfe

Must be one of:
  • initial_load
  • stock_update
  • nfe

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/autem" \
    --header "Authorization: Bearer 3ca6ZV1hd8eED6vabkPg54f" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/imports/autem"
);

const headers = {
    "Authorization": "Bearer 3ca6ZV1hd8eED6vabkPg54f",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200, Import details retrieved successfully):


{
    "import_id": "9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a",
    "status": "completed",
    "import_type": "nfe",
    "original_filename": "nota_fiscal_001.xml",
    "nfe_number": "123456",
    "nfe_date": "2023-12-01",
    "total_products": 15,
    "processed_products": 10,
    "progress_percentage": 66.67,
    "auto_linked_count": 4,
    "stock_launched_count": 7,
    "pending_stock_launch_count": 3,
    "imported_by": "João Silva",
    "imported_at": "2023-12-01T10:30:00.000Z",
    "supplier": {
        "id": "supplier-uuid",
        "name": "Fornecedor Ltda",
        "document": "12345678000199"
    },
    "fiscal_document": {
        "id": "fiscal-document-uuid",
        "nfe_number": "123456",
        "works": [
            {
                "id": "work-uuid",
                "name": "Hospital Bom Jesus",
                "cost_center": {
                    "id": "cost-center-uuid",
                    "code": "002.001",
                    "name": "Hospital Bom Jesus"
                }
            },
            {
                "id": "work-uuid-2",
                "name": "Reforma Centro",
                "cost_center": null
            }
        ]
    },
    "channel": "import-progress.9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a"
}
 

Request      

GET api/imports/{importId}

Headers

Authorization        

Example: Bearer 3ca6ZV1hd8eED6vabkPg54f

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: autem

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/atque" \
    --header "Authorization: Bearer fc64gbea3P8kVh615EZvDda" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/imports/atque"
);

const headers = {
    "Authorization": "Bearer fc64gbea3P8kVh615EZvDda",
    "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."
}
 

Request      

DELETE api/imports/{importId}

Headers

Authorization        

Example: Bearer fc64gbea3P8kVh615EZvDda

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: atque

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/quia/products?sort_by=created_at&sort_desc=1&page=1&per_page=15&status=pending&q=Produto+ABC" \
    --header "Authorization: Bearer eaEZg1d6DP6b3kcVa4fh85v" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/imports/quia/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 eaEZg1d6DP6b3kcVa4fh85v",
    "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
    }
}
 

Request      

GET api/imports/{importId}/products

Headers

Authorization        

Example: Bearer eaEZg1d6DP6b3kcVa4fh85v

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: quia

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of products per page. O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

status   string  optional    

Filter products by processing status (pending, processed). Example: pending

Must be one of:
  • pending
  • processed
q   string  optional    

Search products by name / code / EAN. O campo value não pode ser superior a 255 caracteres. Example: Produto ABC

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/dolores/distributions" \
    --header "Authorization: Bearer 3h8kDfPeab6gEvd15a4ZcV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/imports/dolores/distributions"
);

const headers = {
    "Authorization": "Bearer 3h8kDfPeab6gEvd15a4ZcV6",
    "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
                }
            ]
        }
    ]
}
 

Request      

GET api/imports/{importId}/distributions

Headers

Authorization        

Example: Bearer 3h8kDfPeab6gEvd15a4ZcV6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: dolores

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/dignissimos/products/link" \
    --header "Authorization: Bearer Phf5gdeZD63864vk1acaVbE" \
    --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/dignissimos/products/link"
);

const headers = {
    "Authorization": "Bearer Phf5gdeZD63864vk1acaVbE",
    "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"
}
 

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 3daVEkvf6Z58bha4eDP16cg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sort_by\": \"vero\",
    \"sort_desc\": false,
    \"page\": 21,
    \"per_page\": 23
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/locations/states"
);

const headers = {
    "Authorization": "Bearer 3daVEkvf6Z58bha4eDP16cg",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "sort_by": "vero",
    "sort_desc": false,
    "page": 21,
    "per_page": 23
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "qui veniam",
            "abbreviation": "XK"
        },
        {
            "id": null,
            "name": "cupiditate ut",
            "abbreviation": "HS"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 30,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/locations/states

Headers

Authorization        

Example: Bearer 3daVEkvf6Z58bha4eDP16cg

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

sort_by   string  optional    

Example: vero

sort_desc   boolean  optional    

Example: false

page   integer  optional    

O campo value deve ser pelo menos 1. Example: 21

per_page   integer  optional    

O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 23

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 3P4b1aae8kZ6gDEh5Vcf6dv" \
    --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 3P4b1aae8kZ6gDEh5Vcf6dv",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "Dibberttown"
        },
        {
            "id": null,
            "name": "Wallaceville"
        }
    ]
}
 

Request      

GET api/locations/states/{state}/cities

Headers

Authorization        

Example: Bearer 3P4b1aae8kZ6gDEh5Vcf6dv

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

state   string     

State UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 e5bh6ZaaDv4cfkP81Vg3dE6" \
    --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 e5bh6ZaaDv4cfkP81Vg3dE6",
    "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."
}
 

Request      

GET api/notifications

Headers

Authorization        

Example: Bearer e5bh6ZaaDv4cfkP81Vg3dE6

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

module   string  optional    

Filter by module name. O campo value não pode ser superior a 100 caracteres. Example: CashFlow

type   string  optional    

Filter by type (ex.: info, success, warning, error). O campo value não pode ser superior a 100 caracteres. Example: success

priority   integer  optional    

Filter by priority number. O campo value deve ser pelo menos 0. O campo value não pode ser superior a 255. Example: 10

unread_only   boolean  optional    

Only unread notifications when true. Example: true

read_status   string  optional    

Filter by read status (all, read, unread). Example: unread

Must be one of:
  • all
  • read
  • unread
date_start   string  optional    

Filter notifications created from this date (YYYY-MM-DD). O campo value deve ser uma data válida. Example: 2024-01-01

date_end   string  optional    

Filter notifications created until this date (YYYY-MM-DD). O campo value deve ser uma data válida. O campo value deve ser uma data posterior ou igual a date_start. Example: 2024-12-31

q   string  optional    

Search by title/message. O campo value não pode ser superior a 255 caracteres. Example: erro faturamento

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 Z1kfP635ch48aEgVba6Devd" \
    --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 Z1kfP635ch48aEgVba6Devd",
    "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());

Request      

POST api/notifications/mark-as-read

Headers

Authorization        

Example: Bearer Z1kfP635ch48aEgVba6Devd

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

notifications   string[]     

notificação. O campo value deve ser um UUID válido.

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 cP6De4516gVakvfd3E8Zhab" \
    --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 cP6De4516gVakvfd3E8Zhab",
    "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());

Request      

POST api/notifications/mark-as-unread

Headers

Authorization        

Example: Bearer cP6De4516gVakvfd3E8Zhab

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

notifications   string[]     

notificação. O campo value deve ser um UUID válido.

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 ahZk1a5dfgE4Db68cPv63Ve" \
    --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 ahZk1a5dfgE4Db68cPv63Ve",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/notifications/mark-all-as-read

Headers

Authorization        

Example: Bearer ahZk1a5dfgE4Db68cPv63Ve

Content-Type        

Example: application/json

Accept        

Example: application/json

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 aD4ab81e53fV6Pdv6EgkZch" \
    --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 aD4ab81e53fV6Pdv6EgkZch",
    "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."
}
 

Request      

GET api/notifications/unread-count

Headers

Authorization        

Example: Bearer aD4ab81e53fV6Pdv6EgkZch

Content-Type        

Example: application/json

Accept        

Example: application/json

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=ad&document=incidunt&work_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&cost_center_id=0cde452a-a564-3a1d-b326-738f9e51f654&bank_account_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3" \
    --header "Authorization: Bearer 4P68hka3EZ6fveDVdgab1c5" \
    --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": "ad",
    "document": "incidunt",
    "work_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
    "cost_center_id": "0cde452a-a564-3a1d-b326-738f9e51f654",
    "bank_account_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer 4P68hka3EZ6fveDVdgab1c5",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "dbcfdcd5-8567-3b77-93bf-8cf447c7ec8b",
            "receipt_number": "REC-0806",
            "receiver_type": "custom",
            "receiver": {
                "id": null,
                "name": "Miss Sydni O'Reilly",
                "document": "167.192.963-53"
            },
            "payment": {
                "amount": 3179.3,
                "amount_in_words": "Valor por extenso de teste",
                "method": "pix",
                "description": "Velit a et facere qui consectetur nesciunt."
            },
            "issuer": {
                "name": "Hermiston and Sons",
                "document": "42.084.544/4876-02"
            },
            "issue": {
                "date": "2026-11-03",
                "city": "Creolahaven",
                "state": "RJ"
            },
            "created_by": {
                "id": "a3295ffb-315e-47d4-b216-79a68daf9b31",
                "name": "Prof. Karson Kulas"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "71f7d359-76ef-33fd-bfe0-6409c64c97b5",
            "receipt_number": "REC-5704",
            "receiver_type": "employee",
            "receiver": {
                "id": null,
                "name": "Samson Feest",
                "document": "313.312.512-98"
            },
            "payment": {
                "amount": 7885.98,
                "amount_in_words": "Valor por extenso de teste",
                "method": "check",
                "description": "Eveniet fuga fugiat dignissimos non aliquid esse quo sit."
            },
            "issuer": {
                "name": "Upton and Sons",
                "document": "40.975.184/7122-96"
            },
            "issue": {
                "date": "2026-10-17",
                "city": "Batzport",
                "state": "SP"
            },
            "created_by": {
                "id": "a3295ffb-3a1a-43e7-ba3a-f79411bfe616",
                "name": "Dr. Buford Kessler Sr."
            },
            "created_at": null,
            "updated_at": null
        }
    ],
    "pagination": {
        "total": 2,
        "count": 2,
        "per_page": 10,
        "current_page": 1,
        "total_pages": 1,
        "has_more_pages": false
    },
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/payment-receipts

Headers

Authorization        

Example: Bearer 4P68hka3EZ6fveDVdgab1c5

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Search query (searches in receiver name, document, and receipt number). Example: João Silva

employee_id   string  optional    

Filter by employee UUID. The uuid of an existing record in the employees table. Example: a01edd80-bf3e-40f7-8613-ccb4be5831b3

receiver_type   string  optional    

Filter by receiver type. Example: employee

Must be one of:
  • employee
  • custom
start_date   string  optional    

Filter by issue date (start). O campo value deve ser uma data válida. Example: 2025-01-01

end_date   string  optional    

Filter by issue date (end). O campo value deve ser uma data válida. O campo value deve ser uma data posterior ou igual a start_date. Example: 2025-12-31

min_amount   number  optional    

Filter by minimum amount. O campo value deve ser pelo menos 0. Example: 100

max_amount   number  optional    

Filter by maximum amount. O campo value deve ser pelo menos 0. Example: 1000

payment_method   string  optional    

Filter by payment method. Example: PIX

city   string  optional    

Filter by city. Example: São Paulo

search   string  optional    

Example: ad

document   string  optional    

Example: incidunt

work_id   string  optional    

Filter by work UUID. O campo value deve ser um UUID válido. The uuid of an existing record in the works table. Example: a01edd80-bf3e-40f7-8613-ccb4be5831b3

cost_center_id   string  optional    

O campo value deve ser um UUID válido. The uuid of an existing record in the cost_centers table. Example: 0cde452a-a564-3a1d-b326-738f9e51f654

bank_account_id   string  optional    

Filter by bank account UUID. O campo value deve ser um UUID válido. The uuid of an existing record in the bank_accounts table. Example: a01edd80-bf3e-40f7-8613-ccb4be5831b3

Export payment receipts to Excel

requires authentication payment-receipt export

Dispatches async Excel generation using the same filters as the listing. Frontend is notified via Pusher when ready.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/payment-receipts/excel?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Jo%C3%A3o+Silva&employee_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&receiver_type=employee&start_date=2025-01-01&end_date=2025-12-31&min_amount=100&max_amount=1000&payment_method=PIX&city=S%C3%A3o+Paulo&search=corporis&document=eaque&work_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&cost_center_id=2c10ac21-a902-33fd-868f-c1cf93dcfb74&bank_account_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3" \
    --header "Authorization: Bearer Dvk6c8Ve3PagbZf4hEa5d61" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payment-receipts/excel"
);

const params = {
    "sort_by": "created_at",
    "sort_desc": "1",
    "page": "1",
    "per_page": "15",
    "q": "João Silva",
    "employee_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
    "receiver_type": "employee",
    "start_date": "2025-01-01",
    "end_date": "2025-12-31",
    "min_amount": "100",
    "max_amount": "1000",
    "payment_method": "PIX",
    "city": "São Paulo",
    "search": "corporis",
    "document": "eaque",
    "work_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
    "cost_center_id": "2c10ac21-a902-33fd-868f-c1cf93dcfb74",
    "bank_account_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer Dvk6c8Ve3PagbZf4hEa5d61",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (202):


{
    "message": "string",
    "channel": "string",
    "event": "string"
}
 

Example response (422):


{
    "message": "string"
}
 

Request      

GET api/payment-receipts/excel

Headers

Authorization        

Example: Bearer Dvk6c8Ve3PagbZf4hEa5d61

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Search query (searches in receiver name, document, and receipt number). Example: João Silva

employee_id   string  optional    

Filter by employee UUID. The uuid of an existing record in the employees table. Example: a01edd80-bf3e-40f7-8613-ccb4be5831b3

receiver_type   string  optional    

Filter by receiver type. Example: employee

Must be one of:
  • employee
  • custom
start_date   string  optional    

Filter by issue date (start). O campo value deve ser uma data válida. Example: 2025-01-01

end_date   string  optional    

Filter by issue date (end). O campo value deve ser uma data válida. O campo value deve ser uma data posterior ou igual a start_date. Example: 2025-12-31

min_amount   number  optional    

Filter by minimum amount. O campo value deve ser pelo menos 0. Example: 100

max_amount   number  optional    

Filter by maximum amount. O campo value deve ser pelo menos 0. Example: 1000

payment_method   string  optional    

Filter by payment method. Example: PIX

city   string  optional    

Filter by city. Example: São Paulo

search   string  optional    

Example: corporis

document   string  optional    

Example: eaque

work_id   string  optional    

Filter by work UUID. O campo value deve ser um UUID válido. The uuid of an existing record in the works table. Example: a01edd80-bf3e-40f7-8613-ccb4be5831b3

cost_center_id   string  optional    

O campo value deve ser um UUID válido. The uuid of an existing record in the cost_centers table. Example: 2c10ac21-a902-33fd-868f-c1cf93dcfb74

bank_account_id   string  optional    

Filter by bank account UUID. O campo value deve ser um UUID válido. The uuid of an existing record in the bank_accounts table. Example: a01edd80-bf3e-40f7-8613-ccb4be5831b3

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 81VDgevkEd65f3bc46PhaaZ" \
    --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 81VDgevkEd65f3bc46PhaaZ",
    "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."
}
 

Request      

GET api/payment-receipts/cash-flow-config

Headers

Authorization        

Example: Bearer 81VDgevkEd65f3bc46PhaaZ

Content-Type        

Example: application/json

Accept        

Example: application/json

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 vc4Va5bD16Pdfh6e3kZaE8g" \
    --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 vc4Va5bD16Pdfh6e3kZaE8g",
    "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());

Request      

PUT api/payment-receipts/cash-flow-config

Headers

Authorization        

Example: Bearer vc4Va5bD16Pdfh6e3kZaE8g

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

methods   object[]     

O campo value deve ter pelo menos 1 itens.

method   string     

Example: check

Must be one of:
  • pix
  • bank_transfer
  • cash
  • check
eligible   boolean     

Example: true

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 eV6ga53db6fPkvEhcD81Z4a" \
    --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 eV6ga53db6fPkvEhcD81Z4a",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "2e7ab2fd-3c9e-3916-8cbf-5b7ff756031e",
        "receipt_number": "REC-4697",
        "receiver_type": "custom",
        "receiver": {
            "id": null,
            "name": "Jaunita Torp",
            "document": "528.915.967-85"
        },
        "payment": {
            "amount": 8853.8,
            "amount_in_words": "Valor por extenso de teste",
            "method": "bank_transfer",
            "description": "Dolores voluptates temporibus architecto dolores minima eius."
        },
        "issuer": {
            "name": "Lockman, McClure and Prohaska",
            "document": "31.936.280/3093-93"
        },
        "issue": {
            "date": "2026-10-23",
            "city": "Keiraberg",
            "state": "SC"
        },
        "created_by": {
            "id": "a3295ffb-5ff4-40a6-9717-43a17f501ab3",
            "name": "Casandra Franecki"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/payment-receipts/{receipt}

Headers

Authorization        

Example: Bearer eV6ga53db6fPkvEhcD81Z4a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

receipt   string     

Payment Receipt ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 4gv5f6Ed8khVb6c13eZPaaD" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"receiver_type\": \"Example Receiver type\",
    \"employee_id\": \"9007ace7-817d-448f-b632-da5133aa2360\",
    \"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\": \"7e135069-639e-3e6d-831e-16c331425a04\",
    \"cost_center_id\": \"551baef9-77d0-3965-a90c-fc37cd971b82\",
    \"bank_account_id\": \"3908d31a-dc1e-30b2-8166-36efab3de5fe\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payment-receipts"
);

const headers = {
    "Authorization": "Bearer 4gv5f6Ed8khVb6c13eZPaaD",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "receiver_type": "Example Receiver type",
    "employee_id": "9007ace7-817d-448f-b632-da5133aa2360",
    "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": "7e135069-639e-3e6d-831e-16c331425a04",
    "cost_center_id": "551baef9-77d0-3965-a90c-fc37cd971b82",
    "bank_account_id": "3908d31a-dc1e-30b2-8166-36efab3de5fe"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "message": "string"
}
 

Request      

POST api/payment-receipts

Headers

Authorization        

Example: Bearer 4gv5f6Ed8khVb6c13eZPaaD

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

receiver_type   string     

Tipo de Recebedor. Example: Example Receiver type

Must be one of:
  • employee
  • custom
employee_id   string  optional    

Funcionário. This field is required when receiver_type is employee. The uuid of an existing record in the employees table. Example: 9007ace7-817d-448f-b632-da5133aa2360

receiver_name   string  optional    

Nome do Recebedor. This field is required when receiver_type is custom. O campo value não pode ser superior a 255 caracteres. Example: Example Name

receiver_document   string  optional    

Documento do Recebedor. This field is required when receiver_type is custom. O campo value não pode ser superior a 255 caracteres. Example: Example Receiver document

amount   number     

Valor. O campo value deve ser pelo menos 0.01. Example: 1

amount_in_words   string  optional    

Valor por Extenso. Example: Example Amount in words

payment_method   string     

Método de Pagamento. Example: Example Payment method

Must be one of:
  • pix
  • bank_transfer
  • cash
  • check
description   string     

Descrição. Example: Example Description

issuer_name   string     

Nome do Emissor. O campo value não pode ser superior a 255 caracteres. Example: Example Name

issuer_document   string     

Documento do Emissor. O campo value não pode ser superior a 255 caracteres. Example: Example Issuer document

issue_date   string     

Data de Emissão. O campo value deve ser uma data válida. O campo value deve ser uma data anterior ou igual a today. Example: 2024-01-01

city   string     

Cidade. O campo value não pode ser superior a 255 caracteres. Example: Example City

state   string     

Estado. O campo value não pode ser superior a 2 caracteres. Example: Example State

work_id   string  optional    

Obra. O campo value deve ser um UUID válido. The uuid of an existing record in the works table. Example: 7e135069-639e-3e6d-831e-16c331425a04

cost_center_id   string     

Cost center id. The uuid of an existing record in the cost_centers table. Example: 551baef9-77d0-3965-a90c-fc37cd971b82

bank_account_id   string  optional    

Conta Bancária. O campo value deve ser um UUID válido. The uuid of an existing record in the bank_accounts table. Example: 3908d31a-dc1e-30b2-8166-36efab3de5fe

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 a6Db8dhcV456ePaE1Zvgk3f" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"receiver_type\": \"Example Receiver type\",
    \"employee_id\": \"db1b29ef-0618-4f87-84c1-71b568acd464\",
    \"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\": \"80212a3c-5535-3ab6-9a79-28139997228a\",
    \"cost_center_id\": \"30819968-945f-3a4d-bd45-459cdc84d285\",
    \"bank_account_id\": \"b8e0adb8-0542-3fd6-b040-2420d9794ba3\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32"
);

const headers = {
    "Authorization": "Bearer a6Db8dhcV456ePaE1Zvgk3f",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "receiver_type": "Example Receiver type",
    "employee_id": "db1b29ef-0618-4f87-84c1-71b568acd464",
    "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": "80212a3c-5535-3ab6-9a79-28139997228a",
    "cost_center_id": "30819968-945f-3a4d-bd45-459cdc84d285",
    "bank_account_id": "b8e0adb8-0542-3fd6-b040-2420d9794ba3"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "string"
}
 

Request      

PUT api/payment-receipts/{receipt}

Headers

Authorization        

Example: Bearer a6Db8dhcV456ePaE1Zvgk3f

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

receipt   string     

Payment Receipt ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

receiver_type   string  optional    

Tipo de Recebedor. Example: Example Receiver type

Must be one of:
  • employee
  • custom
employee_id   string  optional    

Funcionário. This field is required when receiver_type is employee. The uuid of an existing record in the employees table. Example: db1b29ef-0618-4f87-84c1-71b568acd464

receiver_name   string  optional    

Nome do Recebedor. This field is required when receiver_type is custom. O campo value não pode ser superior a 255 caracteres. Example: Example Name

receiver_document   string  optional    

Documento do Recebedor. This field is required when receiver_type is custom. O campo value não pode ser superior a 255 caracteres. Example: Example Receiver document

amount   number  optional    

Valor. O campo value deve ser pelo menos 0.01. Example: 1

amount_in_words   string  optional    

Valor por Extenso. Example: Example Amount in words

payment_method   string  optional    

Método de Pagamento. Example: Example Payment method

Must be one of:
  • pix
  • bank_transfer
  • cash
  • check
description   string  optional    

Descrição. Example: Example Description

issuer_name   string  optional    

Nome do Emissor. O campo value não pode ser superior a 255 caracteres. Example: Example Name

issuer_document   string  optional    

Documento do Emissor. O campo value não pode ser superior a 255 caracteres. Example: Example Issuer document

issue_date   string  optional    

Data de Emissão. O campo value deve ser uma data válida. O campo value deve ser uma data anterior ou igual a today. Example: 2024-01-01

city   string  optional    

Cidade. O campo value não pode ser superior a 255 caracteres. Example: Example City

state   string  optional    

Estado. O campo value não pode ser superior a 2 caracteres. Example: Example State

work_id   string  optional    

Obra. O campo value deve ser um UUID válido. The uuid of an existing record in the works table. Example: 80212a3c-5535-3ab6-9a79-28139997228a

cost_center_id   string     

Cost center id. The uuid of an existing record in the cost_centers table. Example: 30819968-945f-3a4d-bd45-459cdc84d285

bank_account_id   string  optional    

Conta Bancária. O campo value deve ser um UUID válido. The uuid of an existing record in the bank_accounts table. Example: b8e0adb8-0542-3fd6-b040-2420d9794ba3

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 Vce3hba1fvP5gkD46daZE68" \
    --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 Vce3hba1fvP5gkD46daZE68",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/payment-receipts/{receipt}

Headers

Authorization        

Example: Bearer Vce3hba1fvP5gkD46daZE68

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

receipt   string     

Payment Receipt ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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/2/receipts" \
    --header "Authorization: Bearer 3hke6fa41b6VD5gdaZ8PEcv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/2/receipts"
);

const headers = {
    "Authorization": "Bearer 3hke6fa41b6VD5gdaZ8PEcv",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "5a634ead-f262-3748-bf6f-38afcf475f99",
            "receipt_number": "REC-5913",
            "receiver_type": "custom",
            "receiver": {
                "id": null,
                "name": "Rick Will",
                "document": "603.882.945-06"
            },
            "payment": {
                "amount": 9235.18,
                "amount_in_words": "Valor por extenso de teste",
                "method": "cash",
                "description": "Eos voluptas aut aperiam."
            },
            "issuer": {
                "name": "Hammes-Aufderhar",
                "document": "86.605.287/8940-68"
            },
            "issue": {
                "date": "2026-10-19",
                "city": "Rennerside",
                "state": "SC"
            },
            "created_by": {
                "id": "a3295ffb-979b-44e0-b5a1-e958b4ba2d4d",
                "name": "Dell Grimes"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "a345b796-7d4d-3b05-b80b-797240326a04",
            "receipt_number": "REC-2833",
            "receiver_type": "employee",
            "receiver": {
                "id": null,
                "name": "Dr. Telly Stark Jr.",
                "document": "147.506.999-91"
            },
            "payment": {
                "amount": 3755.27,
                "amount_in_words": "Valor por extenso de teste",
                "method": "bank_transfer",
                "description": "Nulla ullam et praesentium dolorem inventore voluptatum mollitia."
            },
            "issuer": {
                "name": "Rodriguez, Dach and Trantow",
                "document": "74.438.262/4375-73"
            },
            "issue": {
                "date": "2026-10-19",
                "city": "Davonteburgh",
                "state": "PE"
            },
            "created_by": {
                "id": "a3295ffb-9a14-42f2-97fd-bcf85f1c23d5",
                "name": "Tracey Heaney"
            },
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/employees/{employee_id}/receipts

Headers

Authorization        

Example: Bearer 3hke6fa41b6VD5gdaZ8PEcv

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 2

employee   string     

Employee ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 Vg1D5EvcPbaad3e8k646hZf" \
    --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 Vg1D5EvcPbaad3e8k646hZf",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "836e690e-5cf6-3f5b-a477-d304c16fc682",
            "name": "non",
            "display_name": "Soluta accusantium neque est consequatur."
        },
        {
            "id": "4ab72aec-dc40-3813-aee1-143da6e03d49",
            "name": "voluptas",
            "display_name": "Excepturi voluptatum eligendi dolor sunt ad pariatur."
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/permission-groups/ungrouped-permissions

Headers

Authorization        

Example: Bearer Vg1D5EvcPbaad3e8k646hZf

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

q   string  optional    

Search query. Example: Permission name

page   integer  optional    

Page number. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Items per page. O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 10

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 635ZPavbcDdkfg46E18Vhea" \
    --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 635ZPavbcDdkfg46E18Vhea",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "10802bf3-fce2-3906-86bc-66fa32904256",
            "name": "qui-asperiores-et",
            "display_name": "repudiandae nam maiores",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "1ae6a27c-848f-3b06-bb0d-a5b5041f45cd",
            "name": "cumque-nam-sint",
            "display_name": "sed eum ipsam",
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/permission-groups

Headers

Authorization        

Example: Bearer 635ZPavbcDdkfg46E18Vhea

Content-Type        

Example: application/json

Accept        

Example: application/json

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 bEk166Pvd54e8VhaDca3fZg" \
    --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 bEk166Pvd54e8VhaDca3fZg",
    "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"
}
 

Request      

POST api/permission-groups

Headers

Authorization        

Example: Bearer bEk166Pvd54e8VhaDca3fZg

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Name. O campo value não pode ser superior a 255 caracteres. Example: Example Name

display_name   string     

Display name. O campo value não pode ser superior a 255 caracteres. Example: Example Name

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 b58d4e1aagVfEc6k3hDvP6Z" \
    --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 b58d4e1aagVfEc6k3hDvP6Z",
    "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"
}
 

Request      

PUT api/permission-groups/{permissionGroup}

Headers

Authorization        

Example: Bearer b58d4e1aagVfEc6k3hDvP6Z

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

permissionGroup   integer     

Example: 1

Body Parameters

name   string  optional    

Name. O campo value não pode ser superior a 255 caracteres. Example: Example Name

display_name   string  optional    

Display name. O campo value não pode ser superior a 255 caracteres. Example: Example Name

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 VZ8DE4gfb531ahPd6vck6ea" \
    --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 VZ8DE4gfb531ahPd6vck6ea",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "e754e2ea-76e7-3906-8d3b-2423182fda43",
        "name": "explicabo-id-vero",
        "display_name": "recusandae velit non",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/permission-groups/{permissionGroup}

Headers

Authorization        

Example: Bearer VZ8DE4gfb531ahPd6vck6ea

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

permissionGroup   integer     

Example: 1

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 e1cvVZgEdfP6h34akb65a8D" \
    --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 e1cvVZgEdfP6h34akb65a8D",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/permission-groups/{permissionGroup}

Headers

Authorization        

Example: Bearer e1cvVZgEdfP6h34akb65a8D

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

permissionGroup   integer     

Example: 1

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 e3vcgfDa5dZb864ka6EPV1h" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [
        \"b99efcd7-fbdd-39d1-9209-691eadce7438\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);

const headers = {
    "Authorization": "Bearer e3vcgfDa5dZb864ka6EPV1h",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "permissions": [
        "b99efcd7-fbdd-39d1-9209-691eadce7438"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "c786111d-7d8d-322d-b2b7-046edfc85670",
        "name": "occaecati-eveniet-cupiditate",
        "display_name": "labore natus id",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/permission-groups/{permissionGroup}/permissions

Headers

Authorization        

Example: Bearer e3vcgfDa5dZb864ka6EPV1h

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

permissionGroup   integer     

Example: 1

Body Parameters

permissions   string[]     

ID da permissão. O campo value deve ser um UUID válido. The uuid of an existing record in the permissions table.

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 Ehva4gcf1e6Pba58Z3D6dVk" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [
        \"1cb29fd2-c263-32bb-ad66-d907526d326e\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);

const headers = {
    "Authorization": "Bearer Ehva4gcf1e6Pba58Z3D6dVk",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "permissions": [
        "1cb29fd2-c263-32bb-ad66-d907526d326e"
    ]
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "0a321d5e-2612-3c6a-8b0b-5f19ce7a7766",
        "name": "dignissimos-aut-qui",
        "display_name": "natus praesentium incidunt",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

DELETE api/permission-groups/{permissionGroup}/permissions

Headers

Authorization        

Example: Bearer Ehva4gcf1e6Pba58Z3D6dVk

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

permissionGroup   integer     

Example: 1

Body Parameters

permissions   string[]     

ID da permissão. O campo value deve ser um UUID válido. The uuid of an existing record in the permissions table.

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 gb5P4d1vVDc3EeZk6a8hf6a" \
    --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 gb5P4d1vVDc3EeZk6a8hf6a",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "7e1e0713-d184-3003-8cff-46a651b6edc8",
            "name": "Stephanie Daniela Deverso Jr.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "b067e867-f96b-3f3a-8cb2-17a7b1da59be",
            "name": "Sr. Mário Manuel Carrara Jr.",
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/product-brands

Headers

Authorization        

Example: Bearer gb5P4d1vVDc3EeZk6a8hf6a

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

q   string  optional    

Example: Structure

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/excepturi" \
    --header "Authorization: Bearer eka8gdEP34bvfc1a6VZ6D5h" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-brands/excepturi"
);

const headers = {
    "Authorization": "Bearer eka8gdEP34bvfc1a6VZ6D5h",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "aa01d287-adca-3921-9ce6-5684160625be",
        "name": "Alma Beltrão Faro Jr.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-brands/{productBrand}

Headers

Authorization        

Example: Bearer eka8gdEP34bvfc1a6VZ6D5h

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: excepturi

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 f68DZ3Ek1gcePbv64haaV5d" \
    --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 f68DZ3Ek1gcePbv64haaV5d",
    "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"
}
 

Request      

POST api/product-brands

Headers

Authorization        

Example: Bearer f68DZ3Ek1gcePbv64haaV5d

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. Example: Example Name

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/excepturi" \
    --header "Authorization: Bearer 6da36bfP5EaevkZh1DgcV84" \
    --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/excepturi"
);

const headers = {
    "Authorization": "Bearer 6da36bfP5EaevkZh1DgcV84",
    "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"
}
 

Request      

PUT api/product-brands/{productBrand}

Headers

Authorization        

Example: Bearer 6da36bfP5EaevkZh1DgcV84

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: excepturi

Body Parameters

name   string     

Nome. Example: Example Name

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/voluptas" \
    --header "Authorization: Bearer 8Z3vD66k4dafVehab5c1EgP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-brands/voluptas"
);

const headers = {
    "Authorization": "Bearer 8Z3vD66k4dafVehab5c1EgP",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/product-brands/{productBrand}

Headers

Authorization        

Example: Bearer 8Z3vD66k4dafVehab5c1EgP

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: voluptas

Product Families

Endpoints for product families

List product families

requires authentication product-family index

List all product families

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/product-families?is_epi=&q=Structure" \
    --header "Authorization: Bearer aV6v4kZE85Pdf3ehbcaD1g6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-families"
);

const params = {
    "is_epi": "0",
    "q": "Structure",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer aV6v4kZE85Pdf3ehbcaD1g6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "73f31a9d-fe56-301c-9e62-4889ea52ca41",
            "name": "George Ricardo Gusmão Neto",
            "is_epi": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "967c0d32-7c5b-3b63-9ffc-08784aff7d46",
            "name": "Dr. Amanda Catarina Serna",
            "is_epi": false,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/product-families

Headers

Authorization        

Example: Bearer aV6v4kZE85Pdf3ehbcaD1g6

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

is_epi   boolean  optional    

Example: false

q   string  optional    

Example: Structure

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/tempore" \
    --header "Authorization: Bearer 4e36Dk5PahZvb1Vfdg86caE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-families/tempore"
);

const headers = {
    "Authorization": "Bearer 4e36Dk5PahZvb1Vfdg86caE",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "37a0e428-589a-3f52-82b2-ef389135f9d4",
        "name": "Sra. Franciele Paloma Mendes Filho",
        "is_epi": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-families/{productFamily}

Headers

Authorization        

Example: Bearer 4e36Dk5PahZvb1Vfdg86caE

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: tempore

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 5dPeakbhD4Za3f616vEcg8V" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"is_epi\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-families"
);

const headers = {
    "Authorization": "Bearer 5dPeakbhD4Za3f616vEcg8V",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "is_epi": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "message": "string"
}
 

Request      

POST api/product-families

Headers

Authorization        

Example: Bearer 5dPeakbhD4Za3f616vEcg8V

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. Example: Example Name

is_epi   boolean  optional    

É família de EPI. Example: true

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/quasi" \
    --header "Authorization: Bearer acZa1Dkd6eVg5bvE6Ph48f3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"is_epi\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-families/quasi"
);

const headers = {
    "Authorization": "Bearer acZa1Dkd6eVg5bvE6Ph48f3",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "is_epi": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "string"
}
 

Request      

PUT api/product-families/{productFamily}

Headers

Authorization        

Example: Bearer acZa1Dkd6eVg5bvE6Ph48f3

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: quasi

Body Parameters

name   string     

Nome. Example: Example Name

is_epi   boolean  optional    

É família de EPI. Example: true

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/sunt" \
    --header "Authorization: Bearer EbcdZP86fD4gV5ke6a1ahv3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-families/sunt"
);

const headers = {
    "Authorization": "Bearer EbcdZP86fD4gV5ke6a1ahv3",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/product-families/{productFamily}

Headers

Authorization        

Example: Bearer EbcdZP86fD4gV5ke6a1ahv3

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: sunt

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 gP6Zba3fEhe8a4V56cdkDv1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"Example Q\",
    \"work_id\": \"81bc507f-211b-35cc-899e-71d7530ad055\",
    \"user_id\": \"27858add-9e1b-384b-b6f5-3a06505c1b79\",
    \"responsible_id\": \"1bc2968d-c43b-3bd5-8b34-977748b56dc7\",
    \"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 gP6Zba3fEhe8a4V56cdkDv1",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "q": "Example Q",
    "work_id": "81bc507f-211b-35cc-899e-71d7530ad055",
    "user_id": "27858add-9e1b-384b-b6f5-3a06505c1b79",
    "responsible_id": "1bc2968d-c43b-3bd5-8b34-977748b56dc7",
    "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": "e1532b3a-8785-3f96-bbbb-5abf033270ab",
            "name": "Ullam unde et aliquam.",
            "description": null,
            "work": {
                "id": "a3295ffc-3344-4eb5-9534-8e9e9667b22e",
                "name": "Mauro Ferreira de Oliveira Sobrinho"
            },
            "user": {
                "id": "a3295ffc-35f0-4962-8fc0-541b76dce414",
                "name": "Ms. Heloise Emard DVM"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "17e55f38-9cb8-3cba-980f-889b47b7a760",
            "name": "Qui consectetur et.",
            "description": null,
            "work": {
                "id": "a3295ffc-3949-4dd6-bb6d-557af6915c28",
                "name": "Mari Noemi Abreu Neto"
            },
            "user": {
                "id": "a3295ffc-3c00-410d-8814-3f4eb68e72e1",
                "name": "Lela Reynolds"
            },
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/product-quantity-lists

Headers

Authorization        

Example: Bearer gP6Zba3fEhe8a4V56cdkDv1

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Busca. Example: Example Q

work_id   string  optional    

Obra. The uuid of an existing record in the works table. Example: 81bc507f-211b-35cc-899e-71d7530ad055

user_id   string  optional    

Usuário. The uuid of an existing record in the users table. Example: 27858add-9e1b-384b-b6f5-3a06505c1b79

responsible_id   string  optional    

Responsável. The uuid of an existing record in the users table. Example: 1bc2968d-c43b-3bd5-8b34-977748b56dc7

per_page   integer  optional    

Itens por página. O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 1

sort   string  optional    

Ordenação. Example: Example Sort

sort_desc   boolean  optional    

Ordem decrescente. Example: true

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/et" \
    --header "Authorization: Bearer gd3E5befPkaV16v86hZDa4c" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/et"
);

const headers = {
    "Authorization": "Bearer gd3E5befPkaV16v86hZDa4c",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "6e18b351-3395-3d87-8d3f-a59ab94c0bd3",
        "name": "Similique suscipit consequatur numquam.",
        "description": "Officiis delectus et veniam reiciendis. Eos culpa aliquid doloribus reiciendis.",
        "work": {
            "id": "a3295ffc-43b0-4b63-a7d3-9c8a9c138564",
            "name": "Leandro Josué Benez"
        },
        "user": {
            "id": "a3295ffc-46ad-4099-adfc-ddacd19a943a",
            "name": "Kassandra Considine III"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-quantity-lists/{productQuantityList}

Headers

Authorization        

Example: Bearer gd3E5befPkaV16v86hZDa4c

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: et

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/id/items" \
    --header "Authorization: Bearer 8bZd1vk36eg4aEPVhf6cD5a" \
    --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/id/items"
);

const headers = {
    "Authorization": "Bearer 8bZd1vk36eg4aEPVhf6cD5a",
    "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": "8629f2fe-814d-3b26-8202-110375f3ce15",
            "product": {
                "id": "a3295ffc-5c96-4171-b033-b0ed0db9c1ad",
                "name": "Mauro Verdara Rico Jr.",
                "code": "PRD-431993",
                "unit": {
                    "id": "a3295ffc-5a83-4f07-a2e3-195d3d90bb3d",
                    "name": "Betina Sanches Perez",
                    "abbreviation": "Sra. Dayane Valentin Neto"
                }
            },
            "quantity": 539.2014,
            "observation": "Aliquid quam rerum facilis aspernatur omnis sint.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "431783c2-a084-33e8-aa2e-6494a125486f",
            "product": {
                "id": "a3295ffc-6c48-4f2a-90e0-13d8bd511447",
                "name": "Sr. Flávio Aguiar Madeira Sobrinho",
                "code": "PRD-773697",
                "unit": {
                    "id": "a3295ffc-6b0c-4732-a3de-f7ffa0f25f32",
                    "name": "Flávio Lira Aguiar Sobrinho",
                    "abbreviation": "Dr. Erik Simon Padilha"
                }
            },
            "quantity": 409.7053,
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/product-quantity-lists/{productQuantityList}/items

Headers

Authorization        

Example: Bearer 8bZd1vk36eg4aEPVhf6cD5a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: id

Body Parameters

per_page   integer  optional    

Itens por página. O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 1

q   string  optional    

Busca. O campo value não pode ser superior a 255 caracteres. Example: Example Q

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 avkE3P4Dcga1hVdf5eZb668" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"0a7231ca-2e5d-3403-af35-ccf7e7c097b3\",
    \"items\": [
        {
            \"product_id\": \"0236b20f-5498-33bd-b88f-f975dae5e3c4\",
            \"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 avkE3P4Dcga1hVdf5eZb668",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "0a7231ca-2e5d-3403-af35-ccf7e7c097b3",
    "items": [
        {
            "product_id": "0236b20f-5498-33bd-b88f-f975dae5e3c4",
            "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"
}
 

Request      

POST api/product-quantity-lists

Headers

Authorization        

Example: Bearer avkE3P4Dcga1hVdf5eZb668

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string  optional    

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

description   string  optional    

Descrição. Example: Example Description

work_id   string     

Obra. The uuid of an existing record in the works table. Example: 0a7231ca-2e5d-3403-af35-ccf7e7c097b3

items   object[]  optional    

Itens.

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 0236b20f-5498-33bd-b88f-f975dae5e3c4

quantity   number     

Quantidade. O campo value deve ser pelo menos 0.0001. Example: 1

observation   string  optional    

Observação. Example: Example Items * observation

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/culpa" \
    --header "Authorization: Bearer 38vDVa1Pd6ac4egEk5f6bhZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"items\": [
        {
            \"id\": \"72aa2c36-43ee-3824-a334-0a6709f50e62\",
            \"product_id\": \"a6b733e3-1f32-3cfe-9162-eaff7d8e6a8d\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/culpa"
);

const headers = {
    "Authorization": "Bearer 38vDVa1Pd6ac4egEk5f6bhZ",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "items": [
        {
            "id": "72aa2c36-43ee-3824-a334-0a6709f50e62",
            "product_id": "a6b733e3-1f32-3cfe-9162-eaff7d8e6a8d",
            "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"
}
 

Request      

PUT api/product-quantity-lists/{productQuantityList}

Headers

Authorization        

Example: Bearer 38vDVa1Pd6ac4egEk5f6bhZ

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: culpa

Body Parameters

name   string  optional    

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

description   string  optional    

Descrição. Example: Example Description

items   object[]  optional    

Itens.

id   string  optional    

ID do Item. The uuid of an existing record in the product_quantity_list_items table. Example: 72aa2c36-43ee-3824-a334-0a6709f50e62

product_id   string     

Produto. The uuid of an existing record in the products table. Example: a6b733e3-1f32-3cfe-9162-eaff7d8e6a8d

quantity   number     

Quantidade. O campo value deve ser pelo menos 0.0001. Example: 1

observation   string  optional    

Observação. Example: Example Items * observation

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/inventore" \
    --header "Authorization: Bearer EhdV46fc5Za3DPv1a68bekg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/inventore"
);

const headers = {
    "Authorization": "Bearer EhdV46fc5Za3DPv1a68bekg",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/product-quantity-lists/{productQuantityList}

Headers

Authorization        

Example: Bearer EhdV46fc5Za3DPv1a68bekg

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: inventore

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/officia/items" \
    --header "Authorization: Bearer be3aVvk8cE6Z64g1afdPDh5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"product_id\": \"7f292008-6863-3624-ab52-7c2001d4eeb4\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/officia/items"
);

const headers = {
    "Authorization": "Bearer be3aVvk8cE6Z64g1afdPDh5",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "items": [
        {
            "product_id": "7f292008-6863-3624-ab52-7c2001d4eeb4",
            "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"
}
 

Request      

POST api/product-quantity-lists/{productQuantityList}/items

Headers

Authorization        

Example: Bearer be3aVvk8cE6Z64g1afdPDh5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: officia

Body Parameters

items   object[]     

Itens. O campo value deve ter pelo menos 1 itens.

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 7f292008-6863-3624-ab52-7c2001d4eeb4

quantity   number     

Quantidade. O campo value deve ser pelo menos 0.0001. Example: 1

observation   string  optional    

Observação. Example: Example Items * observation

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/unde" \
    --header "Authorization: Bearer kPD6cvg8ah6Vb5faE3dZ1e4" \
    --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/unde"
);

const headers = {
    "Authorization": "Bearer kPD6cvg8ah6Vb5faE3dZ1e4",
    "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"
}
 

Request      

PUT api/product-quantity-lists/items/{id}

Headers

Authorization        

Example: Bearer kPD6cvg8ah6Vb5faE3dZ1e4

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: unde

item   string     

Product Quantity List Item UUID Example: sed

Body Parameters

quantity   number  optional    

Quantidade. O campo value deve ser pelo menos 0.0001. Example: 1

observation   string  optional    

Observação. Example: Example Observation

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/voluptas/items" \
    --header "Authorization: Bearer 8b6PdEahcZVkv6f3Dg41e5a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        \"8ff07637-e911-3c86-8e98-dabc44c8965f\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/voluptas/items"
);

const headers = {
    "Authorization": "Bearer 8b6PdEahcZVkv6f3Dg41e5a",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "items": [
        "8ff07637-e911-3c86-8e98-dabc44c8965f"
    ]
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "deleted": "integer"
}
 

Request      

DELETE api/product-quantity-lists/{productQuantityList}/items

Headers

Authorization        

Example: Bearer 8b6PdEahcZVkv6f3Dg41e5a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: voluptas

Body Parameters

items   string[]     

Item. The uuid of an existing record in the product_quantity_list_items table.

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/ea/sync-items" \
    --header "Authorization: Bearer Vbah6Dv6d1c8gP4kafeEZ35" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"id\": \"01540724-9f3e-3086-b8d5-0047e4046223\",
            \"product_id\": \"cf02bbb5-65ca-3ffa-9ed0-8ad99321898b\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/ea/sync-items"
);

const headers = {
    "Authorization": "Bearer Vbah6Dv6d1c8gP4kafeEZ35",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "items": [
        {
            "id": "01540724-9f3e-3086-b8d5-0047e4046223",
            "product_id": "cf02bbb5-65ca-3ffa-9ed0-8ad99321898b",
            "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"
}
 

Request      

PUT api/product-quantity-lists/{productQuantityList}/sync-items

Headers

Authorization        

Example: Bearer Vbah6Dv6d1c8gP4kafeEZ35

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: ea

Body Parameters

items   object[]     

Itens.

id   string  optional    

ID do Item. The uuid of an existing record in the product_quantity_list_items table. Example: 01540724-9f3e-3086-b8d5-0047e4046223

product_id   string     

Produto. The uuid of an existing record in the products table. Example: cf02bbb5-65ca-3ffa-9ed0-8ad99321898b

quantity   number     

Quantidade. O campo value deve ser pelo menos 0.0001. Example: 1

observation   string  optional    

Observação. Example: Example Items * observation

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/alias/fulfill" \
    --header "Authorization: Bearer VdeZ81c636vDbghaEPk54af" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"fulfillment_type\": \"Example Fulfillment type\",
    \"stock_id\": \"9583bc3a-e0fb-3c1b-a646-eb8ac04a441e\",
    \"quantity\": 1,
    \"source_stock_id\": \"f65bbb61-9849-3a4f-9319-f1f0dc60e0ed\",
    \"reason\": \"Example Reason\",
    \"origins\": [
        {
            \"supplier_product_id\": \"6d4ac084-f6c5-367b-9023-d6a9a6a9ad36\",
            \"quantity\": 1
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/items/alias/fulfill"
);

const headers = {
    "Authorization": "Bearer VdeZ81c636vDbghaEPk54af",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "fulfillment_type": "Example Fulfillment type",
    "stock_id": "9583bc3a-e0fb-3c1b-a646-eb8ac04a441e",
    "quantity": 1,
    "source_stock_id": "f65bbb61-9849-3a4f-9319-f1f0dc60e0ed",
    "reason": "Example Reason",
    "origins": [
        {
            "supplier_product_id": "6d4ac084-f6c5-367b-9023-d6a9a6a9ad36",
            "quantity": 1
        },
        null
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "data": "object"
}
 

Request      

POST api/product-requests/items/{item}/fulfill

Headers

Authorization        

Example: Bearer VdeZ81c636vDbghaEPk54af

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

item   string     

Product Request Item UUID Example: alias

Body Parameters

fulfillment_type   string     

Tipo de atendimento. Example: Example Fulfillment type

Must be one of:
  • transfer
  • entry
stock_id   string  optional    

Estoque de destino. This field is required when fulfillment_type is transfer. The uuid of an existing record in the stocks table. Example: 9583bc3a-e0fb-3c1b-a646-eb8ac04a441e

quantity   number     

Quantidade. O campo value deve ser pelo menos 0.0001. Example: 1

source_stock_id   string  optional    

Estoque de origem. This field is required when fulfillment_type is transfer. The value and stock_id must be different. The uuid of an existing record in the stocks table. Example: f65bbb61-9849-3a4f-9319-f1f0dc60e0ed

reason   string  optional    

Motivo. O campo value não pode ser superior a 500 caracteres. Example: Example Reason

origins   object[]  optional    

Origens (NFs).

supplier_product_id   string  optional    

NF de origem. This field is required when origins is present. The uuid of an existing record in the supplier_products table. Example: 6d4ac084-f6c5-367b-9023-d6a9a6a9ad36

quantity   number  optional    

Quantidade da origem. This field is required when origins is present. O campo value deve ser pelo menos 0.0001. Example: 1

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/fugiat/fulfillments" \
    --header "Authorization: Bearer aV6kfag4cDev83h16b5PZEd" \
    --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/fugiat/fulfillments"
);

const headers = {
    "Authorization": "Bearer aV6kfag4cDev83h16b5PZEd",
    "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": "414668be-857e-3e49-bfc1-2dde650196c0",
            "quantity": 53.5578,
            "fulfilled_at": "2026-10-23T12:18:04.000000Z",
            "created_at": null
        },
        {
            "id": "3fde187e-41ae-3117-bfd8-2679cb861327",
            "quantity": 96.8006,
            "fulfilled_at": "2026-10-28T20:09:11.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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/product-requests/items/{item}/fulfillments

Headers

Authorization        

Example: Bearer aV6kfag4cDev83h16b5PZEd

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

item   string     

Product Request Item UUID Example: fugiat

Body Parameters

per_page   integer  optional    

Per page. O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 1

page   integer  optional    

Page. O campo value deve ser pelo menos 1. Example: 1

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/perspiciatis" \
    --header "Authorization: Bearer P5bhD6d34EkfacagZ6veV81" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/items/perspiciatis"
);

const headers = {
    "Authorization": "Bearer P5bhD6d34EkfacagZ6veV81",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "cc1721a8-625f-3b0f-8f27-daa8e96974b0",
        "product": {
            "id": "a3296001-531a-4a31-b000-314d90e7d699",
            "name": "Beatriz Godói",
            "code": "PRD-487381",
            "unit": {
                "id": "a3296001-51e2-444a-bf93-bf5208df6127",
                "name": "Vitória Noa Espinoza",
                "abbreviation": "Guilherme Aaron Molina Jr."
            }
        },
        "quantity": 45.5158,
        "quantity_fulfilled": 0,
        "quantity_pending": 45.5158,
        "is_fulfilled": false,
        "is_partially_fulfilled": false,
        "observation": "Perspiciatis rerum nemo cum molestiae.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-requests/items/{id}

Headers

Authorization        

Example: Bearer P5bhD6d34EkfacagZ6veV81

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: perspiciatis

item   string     

Product Request Item UUID Example: earum

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/suscipit/pending-items" \
    --header "Authorization: Bearer fedhDac6k63abP45Z8v1EgV" \
    --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/suscipit/pending-items"
);

const headers = {
    "Authorization": "Bearer fedhDac6k63abP45Z8v1EgV",
    "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": "e632cc92-2732-3790-8404-59ad3d2613d5",
            "product": {
                "id": "a3296001-67e2-4a64-86cd-9316f0f5197d",
                "name": "Jerônimo César Carvalho Sobrinho",
                "code": "PRD-258776",
                "unit": {
                    "id": "a3296001-66ac-4b68-beaa-cbeb7336669b",
                    "name": "Srta. Stephanie Gomes Neto",
                    "abbreviation": "Sr. Artur Urias Jr."
                }
            },
            "quantity": 674.5476,
            "quantity_fulfilled": 0,
            "quantity_pending": 674.5476,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "f6000afc-3629-3e91-b358-8d8d4b1695d9",
            "product": {
                "id": "a3296001-7db7-436c-bca4-0cb09387fe2f",
                "name": "Sr. David Joaquin Amaral",
                "code": "PRD-572578",
                "unit": {
                    "id": "a3296001-7cac-4936-b084-618033b395aa",
                    "name": "Dr. Gabriel Franco Queirós",
                    "abbreviation": "Marisa Serra"
                }
            },
            "quantity": 684.8509,
            "quantity_fulfilled": 0,
            "quantity_pending": 684.8509,
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/product-requests/{productRequest}/pending-items

Headers

Authorization        

Example: Bearer fedhDac6k63abP45Z8v1EgV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: suscipit

Body Parameters

per_page   integer  optional    

Per page. O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 1

page   integer  optional    

Page. O campo value deve ser pelo menos 1. Example: 1

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/quam" \
    --header "Authorization: Bearer cv5aV618gf3Zh6PEbeDdk4a" \
    --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/quam"
);

const headers = {
    "Authorization": "Bearer cv5aV618gf3Zh6PEbeDdk4a",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "757f674b-ac75-3189-9cd6-b980b2bbecf2",
            "product": {
                "id": "a3296001-91cb-4b5f-8a83-8b11534c751c",
                "name": "Aaron Marques Barros",
                "code": "PRD-609435",
                "unit": {
                    "id": "a3296001-90bc-4b70-a81f-e5d46d676eae",
                    "name": "Dr. Isadora Roque",
                    "abbreviation": "Marta Sarah Verdugo Sobrinho"
                }
            },
            "quantity": 729.685,
            "quantity_fulfilled": 0,
            "quantity_pending": 729.685,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "05b9f4ce-2247-358d-b2b4-cdb2d5d02c15",
            "product": {
                "id": "a3296001-a30b-46e2-89fb-79db2ee627c5",
                "name": "Gael Cordeiro",
                "code": "PRD-200785",
                "unit": {
                    "id": "a3296001-a1d8-4575-83c5-e60bf94a3ed4",
                    "name": "Srta. Anita Rosa Sobrinho",
                    "abbreviation": "Sra. Manuela Oliveira Filho"
                }
            },
            "quantity": 547.5845,
            "quantity_fulfilled": 0,
            "quantity_pending": 547.5845,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "Ipsam aut iusto non ut officia itaque quam.",
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/product-requests/pending-by-product/{product}

Headers

Authorization        

Example: Bearer cv5aV618gf3Zh6PEbeDdk4a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: quam

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 36VaED1Pevh8fgbZ5dkc46a" \
    --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\": \"f73fd794-51d0-3dfe-b41b-1d4113651a83\",
    \"work_location_id\": \"47ea20da-a2e9-37d8-9012-4113dd1738c8\",
    \"user_id\": \"789b581b-5151-3a51-8131-6240f2847381\",
    \"status_id\": \"c0018b70-0736-365f-8ecf-d99fa442c09b\",
    \"priority\": \"Example Priority\",
    \"needed_at_from\": \"Example Needed at from\",
    \"needed_at_to\": \"Example Needed at to\",
    \"responsible_id\": \"93933037-5e8e-35f4-a088-17ab6af7567a\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests"
);

const headers = {
    "Authorization": "Bearer 36VaED1Pevh8fgbZ5dkc46a",
    "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": "f73fd794-51d0-3dfe-b41b-1d4113651a83",
    "work_location_id": "47ea20da-a2e9-37d8-9012-4113dd1738c8",
    "user_id": "789b581b-5151-3a51-8131-6240f2847381",
    "status_id": "c0018b70-0736-365f-8ecf-d99fa442c09b",
    "priority": "Example Priority",
    "needed_at_from": "Example Needed at from",
    "needed_at_to": "Example Needed at to",
    "responsible_id": "93933037-5e8e-35f4-a088-17ab6af7567a"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "41be78ab-e1e2-359e-ae9a-d0de03ca7e66",
            "code": null,
            "name": "Omnis molestiae.",
            "description": null,
            "work": {
                "id": "a3295ffe-2039-4626-9874-06ce2d852834",
                "name": "Dr. Sophie Alessandra Lutero"
            },
            "user": {
                "id": "a3295ffe-232b-4e89-b150-e30133e97529",
                "name": "Kristopher Dach"
            },
            "status": {
                "id": "a3295ffe-2500-44ea-b09b-2ca56b275543",
                "slug": null,
                "name": null,
                "description": "Débora Delgado",
                "abbreviation": "omnis",
                "color": "#11e1d8",
                "text_color": "#b69466"
            },
            "priority": "medium",
            "priority_label": "Média",
            "needed_at": "2026-11-19",
            "approved_at": null,
            "rejection_reason": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "9191cc6b-18a3-34b8-b19a-13e91d8f33de",
            "code": null,
            "name": "Nihil eos quia debitis.",
            "description": null,
            "work": {
                "id": "a3295ffe-2992-4d75-95da-99b1c6b1a7a3",
                "name": "Aaron Queirós"
            },
            "user": {
                "id": "a3295ffe-2ca3-43f4-80cb-ab0319d4affb",
                "name": "Amya Carroll"
            },
            "status": {
                "id": "a3295ffe-2eb0-4c98-858e-cb762249202e",
                "slug": null,
                "name": null,
                "description": "Sr. Simão Azevedo Batista",
                "abbreviation": "quia",
                "color": "#2710eb",
                "text_color": "#6b9d89"
            },
            "priority": "urgent",
            "priority_label": "Urgente",
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/product-requests

Headers

Authorization        

Example: Bearer 36VaED1Pevh8fgbZ5dkc46a

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

sort_by   string  optional    

Sort by. Example: Example Sort by

sort_desc   boolean  optional    

Sort desc. Example: true

page   integer  optional    

Page. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Per page. O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 1

q   string  optional    

Busca. Example: Example Q

work_id   string  optional    

Obra. The uuid of an existing record in the works table. Example: f73fd794-51d0-3dfe-b41b-1d4113651a83

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: 47ea20da-a2e9-37d8-9012-4113dd1738c8

user_id   string  optional    

Usuário. The uuid of an existing record in the users table. Example: 789b581b-5151-3a51-8131-6240f2847381

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: c0018b70-0736-365f-8ecf-d99fa442c09b

priority   string  optional    

Prioridade. Example: Example Priority

Must be one of:
  • low
  • medium
  • high
  • urgent
needed_at_from   string  optional    

Data de necessidade inicial. O campo value deve ser uma data válida. Example: Example Needed at from

needed_at_to   string  optional    

Data de necessidade final. O campo value deve ser uma data válida. Example: Example Needed at to

responsible_id   string  optional    

Responsável. The uuid of an existing record in the users table. Example: 93933037-5e8e-35f4-a088-17ab6af7567a

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/quia" \
    --header "Authorization: Bearer 6aPeZ5cVEa83gfbkdv64h1D" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/quia"
);

const headers = {
    "Authorization": "Bearer 6aPeZ5cVEa83gfbkdv64h1D",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "3aca14ab-99dc-30e4-8a35-29228fcd3d63",
        "code": null,
        "name": "Id nulla eaque et.",
        "description": null,
        "work": {
            "id": "a3295ffe-38cf-447d-acdc-c0f50763ec06",
            "name": "Srta. Mariah Vanessa Maia"
        },
        "user": {
            "id": "a3295ffe-3bec-47c2-b2cb-d6b02c099a4c",
            "name": "Bert Gusikowski"
        },
        "status": {
            "id": "a3295ffe-3dfd-4849-b349-fee312e361aa",
            "slug": null,
            "name": null,
            "description": "Srta. Anita Ávila Serna",
            "abbreviation": "explicabo",
            "color": "#a53c4c",
            "text_color": "#49f568"
        },
        "priority": "high",
        "priority_label": "Alta",
        "needed_at": "2026-12-03",
        "approved_at": null,
        "rejection_reason": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-requests/{productRequest}

Headers

Authorization        

Example: Bearer 6aPeZ5cVEa83gfbkdv64h1D

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: quia

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/similique/items" \
    --header "Authorization: Bearer a4k1D6Pdb8Ve3ghcfvZE6a5" \
    --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/similique/items"
);

const headers = {
    "Authorization": "Bearer a4k1D6Pdb8Ve3ghcfvZE6a5",
    "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": "f25b01d0-a985-366c-8da4-8e485b8aafe3",
            "product": {
                "id": "a3295ffe-615c-467c-a108-6c7a291d9420",
                "name": "Vinícius Serna",
                "code": "PRD-742173",
                "unit": {
                    "id": "a3295ffe-5ff2-415b-9bad-c5f1f6402ab8",
                    "name": "Sra. Priscila Valente",
                    "abbreviation": "Matheus Pedrosa Jr."
                }
            },
            "quantity": 225.992,
            "quantity_fulfilled": 0,
            "quantity_pending": 225.992,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "8090862a-9e6c-32aa-adcb-e6a2a20aaefb",
            "product": {
                "id": "a3295ffe-7a62-4bf7-9f65-df8d37d585a6",
                "name": "Miranda Padrão Jr.",
                "code": "PRD-215756",
                "unit": {
                    "id": "a3295ffe-791a-4ec9-93b1-6353f91a006a",
                    "name": "Rayane Michelle Prado",
                    "abbreviation": "Dayane Maiara Pacheco"
                }
            },
            "quantity": 71.9137,
            "quantity_fulfilled": 0,
            "quantity_pending": 71.9137,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "Ut rem veritatis et architecto at.",
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/product-requests/{productRequest}/items

Headers

Authorization        

Example: Bearer a4k1D6Pdb8Ve3ghcfvZE6a5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: similique

Body Parameters

q   string  optional    

Busca. Example: Example Q

per_page   integer  optional    

Itens por página. O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 1

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 Egfa56VeDhdP6Z41ck8bav3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"9695dc8e-511c-3e99-b317-8c6eaf488889\",
    \"work_location_id\": \"a0064262-a0e3-39c4-8667-313fb748107e\",
    \"status_id\": \"8ec79828-c98c-37e6-b950-58c47cbe53a2\",
    \"priority\": \"Example Priority\",
    \"needed_at\": \"Example Needed at\",
    \"items\": [
        {
            \"product_id\": \"6fb41ce7-f4df-345f-8a11-795554782546\",
            \"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 Egfa56VeDhdP6Z41ck8bav3",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "9695dc8e-511c-3e99-b317-8c6eaf488889",
    "work_location_id": "a0064262-a0e3-39c4-8667-313fb748107e",
    "status_id": "8ec79828-c98c-37e6-b950-58c47cbe53a2",
    "priority": "Example Priority",
    "needed_at": "Example Needed at",
    "items": [
        {
            "product_id": "6fb41ce7-f4df-345f-8a11-795554782546",
            "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"
}
 

Request      

POST api/product-requests

Headers

Authorization        

Example: Bearer Egfa56VeDhdP6Z41ck8bav3

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string  optional    

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

description   string  optional    

Descrição. Example: Example Description

work_id   string     

Obra. The uuid of an existing record in the works table. Example: 9695dc8e-511c-3e99-b317-8c6eaf488889

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: a0064262-a0e3-39c4-8667-313fb748107e

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 8ec79828-c98c-37e6-b950-58c47cbe53a2

priority   string  optional    

Prioridade. Example: Example Priority

Must be one of:
  • low
  • medium
  • high
  • urgent
needed_at   string  optional    

Data de necessidade. O campo value deve ser uma data válida. Example: Example Needed at

items   object[]  optional    

Itens.

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 6fb41ce7-f4df-345f-8a11-795554782546

quantity   number     

Quantidade. O campo value deve ser pelo menos 0.0001. Example: 1

observation   string  optional    

Observação. Example: Example Items * observation

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/quis" \
    --header "Authorization: Bearer 3D5P1ahVdbgaeZ46kE8f6cv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"d06976f9-8dd9-3d82-95ea-88c966d4b981\",
    \"work_location_id\": \"891f559e-48b5-3ba2-897f-de1db31db81c\",
    \"status_id\": \"59f7b17f-9eee-3d35-9c42-df1f70c89215\",
    \"priority\": \"Example Priority\",
    \"needed_at\": \"Example Needed at\",
    \"items\": [
        {
            \"id\": \"261bf617-9659-3dd9-9329-a913e692cbdd\",
            \"product_id\": \"e9e77d7c-679f-314a-ad10-929f8dfddcef\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/quis"
);

const headers = {
    "Authorization": "Bearer 3D5P1ahVdbgaeZ46kE8f6cv",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "d06976f9-8dd9-3d82-95ea-88c966d4b981",
    "work_location_id": "891f559e-48b5-3ba2-897f-de1db31db81c",
    "status_id": "59f7b17f-9eee-3d35-9c42-df1f70c89215",
    "priority": "Example Priority",
    "needed_at": "Example Needed at",
    "items": [
        {
            "id": "261bf617-9659-3dd9-9329-a913e692cbdd",
            "product_id": "e9e77d7c-679f-314a-ad10-929f8dfddcef",
            "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"
}
 

Request      

PUT api/product-requests/{productRequest}

Headers

Authorization        

Example: Bearer 3D5P1ahVdbgaeZ46kE8f6cv

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: quis

Body Parameters

name   string  optional    

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

description   string  optional    

Descrição. Example: Example Description

work_id   string  optional    

Obra. The uuid of an existing record in the works table. Example: d06976f9-8dd9-3d82-95ea-88c966d4b981

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: 891f559e-48b5-3ba2-897f-de1db31db81c

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 59f7b17f-9eee-3d35-9c42-df1f70c89215

priority   string  optional    

Prioridade. Example: Example Priority

Must be one of:
  • low
  • medium
  • high
  • urgent
needed_at   string  optional    

Data de necessidade. O campo value deve ser uma data válida. Example: Example Needed at

items   object[]  optional    

Itens.

id   string  optional    

ID do Item. The uuid of an existing record in the product_request_items table. Example: 261bf617-9659-3dd9-9329-a913e692cbdd

product_id   string     

Produto. The uuid of an existing record in the products table. Example: e9e77d7c-679f-314a-ad10-929f8dfddcef

quantity   number     

Quantidade. O campo value deve ser pelo menos 0.0001. Example: 1

observation   string  optional    

Observação. Example: Example Items * observation

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/quo" \
    --header "Authorization: Bearer eZ6a5gD8bfEcdV16vP3hk4a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/quo"
);

const headers = {
    "Authorization": "Bearer eZ6a5gD8bfEcdV16vP3hk4a",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/product-requests/{productRequest}

Headers

Authorization        

Example: Bearer eZ6a5gD8bfEcdV16vP3hk4a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: quo

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/aperiam/approve" \
    --header "Authorization: Bearer 4ZE8a5a61cbVfvD6ge3dkhP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/aperiam/approve"
);

const headers = {
    "Authorization": "Bearer 4ZE8a5a61cbVfvD6ge3dkhP",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": "object"
}
 

Request      

POST api/product-requests/{productRequest}/approve

Headers

Authorization        

Example: Bearer 4ZE8a5a61cbVfvD6ge3dkhP

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: aperiam

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/et/reject" \
    --header "Authorization: Bearer Vchb1akD85ePZ6d4fag63vE" \
    --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/et/reject"
);

const headers = {
    "Authorization": "Bearer Vchb1akD85ePZ6d4fag63vE",
    "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"
}
 

Request      

POST api/product-requests/{productRequest}/reject

Headers

Authorization        

Example: Bearer Vchb1akD85ePZ6d4fag63vE

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: et

Body Parameters

reason   string     

Motivo da rejeição. O campo value não pode ser superior a 1000 caracteres. Example: Example Reason

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/ea/items" \
    --header "Authorization: Bearer fP3VakZd6gED85cv16bae4h" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"product_id\": \"7f7b640d-e1a2-391e-bda5-cf6f6ed46c55\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/ea/items"
);

const headers = {
    "Authorization": "Bearer fP3VakZd6gED85cv16bae4h",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "items": [
        {
            "product_id": "7f7b640d-e1a2-391e-bda5-cf6f6ed46c55",
            "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"
}
 

Request      

POST api/product-requests/{productRequest}/items

Headers

Authorization        

Example: Bearer fP3VakZd6gED85cv16bae4h

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: ea

Body Parameters

items   object[]     

Itens. O campo value deve ter pelo menos 1 itens.

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 7f7b640d-e1a2-391e-bda5-cf6f6ed46c55

quantity   number     

Quantidade. O campo value deve ser pelo menos 0.0001. Example: 1

observation   string  optional    

Observação. Example: Example Items * observation

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/mollitia" \
    --header "Authorization: Bearer 8a5Zc6Ddagb16fhPvk43VEe" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"quantity\": 1,
    \"observation\": \"Example Observation\",
    \"status_id\": \"3a37e85b-9ebf-3505-a1f2-9e82605ca4a2\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/items/mollitia"
);

const headers = {
    "Authorization": "Bearer 8a5Zc6Ddagb16fhPvk43VEe",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "quantity": 1,
    "observation": "Example Observation",
    "status_id": "3a37e85b-9ebf-3505-a1f2-9e82605ca4a2"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": "object"
}
 

Request      

PUT api/product-requests/items/{id}

Headers

Authorization        

Example: Bearer 8a5Zc6Ddagb16fhPvk43VEe

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: mollitia

item   string     

Product Request Item UUID Example: et

Body Parameters

quantity   number  optional    

Quantidade. O campo value deve ser pelo menos 0.0001. Example: 1

observation   string  optional    

Observação. Example: Example Observation

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 3a37e85b-9ebf-3505-a1f2-9e82605ca4a2

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/fuga/items" \
    --header "Authorization: Bearer f1cEDe4ab3dP8g6khZa56Vv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        \"36b9b998-9d93-3d69-97e9-13d115213a9e\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/fuga/items"
);

const headers = {
    "Authorization": "Bearer f1cEDe4ab3dP8g6khZa56Vv",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "items": [
        "36b9b998-9d93-3d69-97e9-13d115213a9e"
    ]
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "deleted": "integer"
}
 

Request      

DELETE api/product-requests/{productRequest}/items

Headers

Authorization        

Example: Bearer f1cEDe4ab3dP8g6khZa56Vv

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: fuga

Body Parameters

items   string[]     

Item. The uuid of an existing record in the product_request_items table.

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/ut/sync-items" \
    --header "Authorization: Bearer bP4DdaEeg1686f3VhaZvk5c" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"id\": \"974b23b9-75b1-3e66-b8e8-44e06c38b4a4\",
            \"product_id\": \"95faeb55-ae2f-3a7c-8f7c-7b5ea7ce16fc\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/ut/sync-items"
);

const headers = {
    "Authorization": "Bearer bP4DdaEeg1686f3VhaZvk5c",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "items": [
        {
            "id": "974b23b9-75b1-3e66-b8e8-44e06c38b4a4",
            "product_id": "95faeb55-ae2f-3a7c-8f7c-7b5ea7ce16fc",
            "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"
}
 

Request      

PUT api/product-requests/{productRequest}/sync-items

Headers

Authorization        

Example: Bearer bP4DdaEeg1686f3VhaZvk5c

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: ut

Body Parameters

items   object[]     

Itens.

id   string  optional    

ID do Item. The uuid of an existing record in the product_request_items table. Example: 974b23b9-75b1-3e66-b8e8-44e06c38b4a4

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 95faeb55-ae2f-3a7c-8f7c-7b5ea7ce16fc

quantity   number     

Quantidade. O campo value deve ser pelo menos 0.0001. Example: 1

observation   string  optional    

Observação. Example: Example Items * observation

Products

Endpoints for products

List products

requires authentication product index

List all products

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/products?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Brick&code=PROD-00003&is_epi=1&has_epi_type=" \
    --header "Authorization: Bearer Pefgcb6E1daak64DhZv53V8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/products"
);

const params = {
    "sort_by": "created_at",
    "sort_desc": "1",
    "page": "1",
    "per_page": "15",
    "q": "Brick",
    "code": "PROD-00003",
    "is_epi": "1",
    "has_epi_type": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer Pefgcb6E1daak64DhZv53V8",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "c106737c-737a-3d07-9b1b-0b6ec5ad7691",
            "name": "Dr. Marcos Marques Neto",
            "code": "PRD-237867",
            "stock": 495,
            "product_family": {
                "id": "a3295ffb-cc51-4561-8370-cc2f97dce8ff",
                "name": "Antonieta Andréia Campos"
            },
            "product_brand": {
                "id": "a3295ffb-ce2e-4d26-9b40-859b838c980e",
                "name": "Emanuelly Gil Ortega Jr."
            },
            "unit": {
                "id": "a3295ffb-cff1-417d-b3aa-3c6d63fcc959",
                "name": "Ester Fernanda Dominato",
                "abbreviation": "Sr. Raphael Soares Neto"
            },
            "image": {
                "id": null,
                "url": null
            },
            "epi_type": null,
            "description": "Ipsam libero commodi dolores et quae.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "1c7137e5-548b-37c8-806a-eadd38ef4be8",
            "name": "Isabella Gabrielle Marin Neto",
            "code": "PRD-599156",
            "stock": 77,
            "product_family": {
                "id": "a3295ffb-d35b-45c3-95ce-1b88455e8fe3",
                "name": "Dr. Abgail Fabiana de Freitas"
            },
            "product_brand": {
                "id": "a3295ffb-d4de-4604-b5ab-8bfc1c9a2658",
                "name": "Elizabeth das Neves Teles Filho"
            },
            "unit": {
                "id": "a3295ffb-d684-42d6-aab8-26414b4b842a",
                "name": "Dr. Josué Sanches Salazar",
                "abbreviation": "Srta. Priscila Salazar Grego Neto"
            },
            "image": {
                "id": null,
                "url": null
            },
            "epi_type": null,
            "description": "Ab eos voluptas molestias voluptatibus magnam et in ducimus.",
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/products

Headers

Authorization        

Example: Bearer Pefgcb6E1daak64DhZv53V8

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Search query. Example: Brick

code   string  optional    

Filter by product code. Example: PROD-00003

is_epi   boolean  optional    

Filter by products whose family is flagged as EPI. Example: true

has_epi_type   boolean  optional    

Filter by products that already are an EPI type. Pass 0 to list only products still available to become one. Example: false

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 hZaga8vbD6k15E4Vfced6P3" \
    --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 hZaga8vbD6k15E4Vfced6P3",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "7680cd48-72a0-357a-a469-cb8818ea5b5b",
        "name": "Anderson Solano",
        "code": "PRD-443935",
        "stock": 8006961,
        "product_family": {
            "id": "a3295ffb-df05-4b97-8bde-98d47fd5f982",
            "name": "Sra. Michelle Corona Serna"
        },
        "product_brand": {
            "id": "a3295ffb-e0b8-46bc-ac69-8da807343558",
            "name": "Dr. Emerson Benites Sobrinho"
        },
        "unit": {
            "id": "a3295ffb-e256-43e1-ab8d-c8c22732adab",
            "name": "Luciana Mascarenhas Marin Sobrinho",
            "abbreviation": "Miguel Gil Torres"
        },
        "image": {
            "id": null,
            "url": null
        },
        "epi_type": null,
        "description": "Animi architecto ipsa ipsa fugit modi.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/products/{id}

Headers

Authorization        

Example: Bearer hZaga8vbD6k15E4Vfced6P3

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the product. Example: 1

product   string     

Product UUID Example: aut

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/soluta/available-origins" \
    --header "Authorization: Bearer kEeDaP6h6158bVgfZ3v4adc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/products/soluta/available-origins"
);

const headers = {
    "Authorization": "Bearer kEeDaP6h6158bVgfZ3v4adc",
    "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."
}
 

Request      

GET api/products/{product}/available-origins

Headers

Authorization        

Example: Bearer kEeDaP6h6158bVgfZ3v4adc

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: soluta

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 6d615cDPvheZ4f8Vbaa3kEg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"product_family_id\": \"bdd9edcb-9c8c-37c9-8872-a20726513cd0\",
    \"product_brand_id\": \"33d3c17b-faee-32dd-936c-a231f354a259\",
    \"unit_id\": \"f4d15468-c876-39c5-8bc2-e9264fa255c8\",
    \"description\": \"Example Description\",
    \"stock\": 1
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/products"
);

const headers = {
    "Authorization": "Bearer 6d615cDPvheZ4f8Vbaa3kEg",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "product_family_id": "bdd9edcb-9c8c-37c9-8872-a20726513cd0",
    "product_brand_id": "33d3c17b-faee-32dd-936c-a231f354a259",
    "unit_id": "f4d15468-c876-39c5-8bc2-e9264fa255c8",
    "description": "Example Description",
    "stock": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "message": "string"
}
 

Request      

POST api/products

Headers

Authorization        

Example: Bearer 6d615cDPvheZ4f8Vbaa3kEg

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

product_family_id   string     

Família do Produto. The uuid of an existing record in the product_families table. Example: bdd9edcb-9c8c-37c9-8872-a20726513cd0

product_brand_id   string     

Marca do Produto. The uuid of an existing record in the product_brands table. Example: 33d3c17b-faee-32dd-936c-a231f354a259

unit_id   string     

Unidade. The uuid of an existing record in the units table. Example: f4d15468-c876-39c5-8bc2-e9264fa255c8

description   string  optional    

Descrição. Example: Example Description

stock   number     

Estoque. O campo value deve ser pelo menos 0. Example: 1

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 Ve1b8g6va6dZ5hkfDca43PE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"product_family_id\": \"28cf361a-1c74-3cb9-ab03-82c08ad5a61a\",
    \"product_brand_id\": \"7c05a439-f445-3f0e-a371-e220207a5665\",
    \"unit_id\": \"5b296445-d764-3443-9224-bee464705ecc\",
    \"stock\": 1,
    \"description\": \"Example Description\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/products/1"
);

const headers = {
    "Authorization": "Bearer Ve1b8g6va6dZ5hkfDca43PE",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "product_family_id": "28cf361a-1c74-3cb9-ab03-82c08ad5a61a",
    "product_brand_id": "7c05a439-f445-3f0e-a371-e220207a5665",
    "unit_id": "5b296445-d764-3443-9224-bee464705ecc",
    "stock": 1,
    "description": "Example Description"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "string"
}
 

Request      

PUT api/products/{id}

Headers

Authorization        

Example: Bearer Ve1b8g6va6dZ5hkfDca43PE

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the product. Example: 1

product   string     

Product UUID Example: vel

Body Parameters

name   string  optional    

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

product_family_id   string  optional    

Família do Produto. The uuid of an existing record in the product_families table. Example: 28cf361a-1c74-3cb9-ab03-82c08ad5a61a

product_brand_id   string  optional    

Marca do Produto. The uuid of an existing record in the product_brands table. Example: 7c05a439-f445-3f0e-a371-e220207a5665

unit_id   string  optional    

Unidade. The uuid of an existing record in the units table. Example: 5b296445-d764-3443-9224-bee464705ecc

stock   number  optional    

Estoque. O campo value deve ser pelo menos 0. Example: 1

description   string  optional    

Descrição. Example: Example Description

Delete product

requires authentication product delete

Delete a product

Example request:
curl --request DELETE \
    "https://api.bs-homolog.pensou.app.br/api/products/similique" \
    --header "Authorization: Bearer vc8gkV4b6EfP6D3adaZh15e" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/products/similique"
);

const headers = {
    "Authorization": "Bearer vc8gkV4b6EfP6D3adaZh15e",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/products/{product}

Headers

Authorization        

Example: Bearer vc8gkV4b6EfP6D3adaZh15e

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: similique

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/762cf6f7-2c38-37a0-8c16-4bfb3b33db7b/versions" \
    --header "Authorization: Bearer dc4P56hak6efaZ3Vbgv1D8E" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"notes\": \"Example Notes\",
    \"responsible_user_id\": \"cb867a04-a200-3dfe-ab41-85c461b248ab\",
    \"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/762cf6f7-2c38-37a0-8c16-4bfb3b33db7b/versions"
);

const headers = {
    "Authorization": "Bearer dc4P56hak6efaZ3Vbgv1D8E",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "notes": "Example Notes",
    "responsible_user_id": "cb867a04-a200-3dfe-ab41-85c461b248ab",
    "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):



 

Request      

POST api/projects/{projectUuid}/versions

Headers

Authorization        

Example: Bearer dc4P56hak6efaZ3Vbgv1D8E

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

projectUuid   string     

Project UUID Example: 762cf6f7-2c38-37a0-8c16-4bfb3b33db7b

Body Parameters

notes   string  optional    

observação. Example: Example Notes

responsible_user_id   string  optional    

responsável. O campo value deve ser um UUID válido. The uuid of an existing record in the users table. Example: cb867a04-a200-3dfe-ab41-85c461b248ab

file   object     

arquivo.

path   string  optional    

caminho do arquivo. This field is required when file is present. Example: Example File path

name   string     

nome do arquivo. Example: Example Name

size   string  optional    

tamanho do arquivo. Example: Example File size

extension   string  optional    

extensão do arquivo. Example: Example File extension

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/d0017d80-1a9d-3415-8f84-dd0a5d2ed1ec/versions" \
    --header "Authorization: Bearer Z6agDVk8cfv1a5ebE6d43Ph" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/projects/d0017d80-1a9d-3415-8f84-dd0a5d2ed1ec/versions"
);

const headers = {
    "Authorization": "Bearer Z6agDVk8cfv1a5ebE6d43Ph",
    "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."
}
 

Request      

GET api/projects/{projectUuid}/versions

Headers

Authorization        

Example: Bearer Z6agDVk8cfv1a5ebE6d43Ph

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

projectUuid   string     

Project UUID Example: d0017d80-1a9d-3415-8f84-dd0a5d2ed1ec

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/6acf0ad0-bd23-3725-ae25-656074ddafaf" \
    --header "Authorization: Bearer cf64aE65P1b3adhZ8VgekDv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/6acf0ad0-bd23-3725-ae25-656074ddafaf"
);

const headers = {
    "Authorization": "Bearer cf64aE65P1b3adhZ8VgekDv",
    "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."
}
 

Request      

GET api/project-versions/{versionUuid}

Headers

Authorization        

Example: Bearer cf64aE65P1b3adhZ8VgekDv

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: 6acf0ad0-bd23-3725-ae25-656074ddafaf

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/26426e2d-b800-37c7-9d31-5e9b214bbddd/download" \
    --header "Authorization: Bearer 5Pv6816Zh4kdbDaag3VecfE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/26426e2d-b800-37c7-9d31-5e9b214bbddd/download"
);

const headers = {
    "Authorization": "Bearer 5Pv6816Zh4kdbDaag3VecfE",
    "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"
}
 

Request      

GET api/project-versions/{versionUuid}/download

Headers

Authorization        

Example: Bearer 5Pv6816Zh4kdbDaag3VecfE

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: 26426e2d-b800-37c7-9d31-5e9b214bbddd

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/7fd6fef6-e200-3970-8c94-4c417e0db12c/restore" \
    --header "Authorization: Bearer 6h6Vg4aaEbZv8De3P15fkdc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/7fd6fef6-e200-3970-8c94-4c417e0db12c/restore"
);

const headers = {
    "Authorization": "Bearer 6h6Vg4aaEbZv8De3P15fkdc",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "string"
}
 

Request      

POST api/project-versions/{versionUuid}/restore

Headers

Authorization        

Example: Bearer 6h6Vg4aaEbZv8De3P15fkdc

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: 7fd6fef6-e200-3970-8c94-4c417e0db12c

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/16087596-3509-30b5-b15f-9a37af506291" \
    --header "Authorization: Bearer Zvh3E4Va56aD6db8fkgc1eP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/16087596-3509-30b5-b15f-9a37af506291"
);

const headers = {
    "Authorization": "Bearer Zvh3E4Va56aD6db8fkgc1eP",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/project-versions/{versionUuid}

Headers

Authorization        

Example: Bearer Zvh3E4Va56aD6db8fkgc1eP

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: 16087596-3509-30b5-b15f-9a37af506291

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=02843c85-e1e8-364d-92a7-04d1a8d1cae1&work_id=58cea06a-4284-38b1-8eab-cc1dbc6cc0cf&status_id=e418afa2-5c74-3104-b994-a2c1114c22f3&responsible_id=0b5dbcc9-30e2-3a92-959f-1fc65f0111b6" \
    --header "Authorization: Bearer PVZ63cdb5efEak86D4v1ahg" \
    --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": "02843c85-e1e8-364d-92a7-04d1a8d1cae1",
    "work_id": "58cea06a-4284-38b1-8eab-cc1dbc6cc0cf",
    "status_id": "e418afa2-5c74-3104-b994-a2c1114c22f3",
    "responsible_id": "0b5dbcc9-30e2-3a92-959f-1fc65f0111b6",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer PVZ63cdb5efEak86D4v1ahg",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "ebdf5172-06d1-3261-904f-46753f7bb3ed",
            "name": "Reiciendis occaecati nam",
            "description": "Error doloremque nihil sit minus.",
            "current_version": 1,
            "file": {
                "path": "projects/2baa1786-2127-33fd-a3e6-953a8596259e.pdf",
                "size": "1783563",
                "extension": "pdf"
            },
            "discipline": {
                "id": "a3296001-ada5-47d8-adb6-39957a2722f1",
                "name": "Quasi",
                "code": "ZZW"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "fcdeaf6c-4a1b-3d54-9aa8-846d5bc44dbf",
            "name": "Odio consequatur qui",
            "description": "Iste sit excepturi aut reiciendis vitae in molestias.",
            "current_version": 1,
            "file": {
                "path": "projects/e03e398c-441d-304c-83d2-1457184ee155.pdf",
                "size": "1609415",
                "extension": "pdf"
            },
            "discipline": {
                "id": "a3296001-b091-4d83-9472-a84fceeab0c1",
                "name": "Nemo",
                "code": "UDS"
            },
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/projects

Headers

Authorization        

Example: Bearer PVZ63cdb5efEak86D4v1ahg

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Search query. Example: Elétrico

discipline_id   string  optional    

Filter by discipline UUID. O campo value deve ser um UUID válido. The uuid of an existing record in the disciplines table. Example: 02843c85-e1e8-364d-92a7-04d1a8d1cae1

work_id   string  optional    

Filter by work UUID. O campo value deve ser um UUID válido. The uuid of an existing record in the works table. Example: 58cea06a-4284-38b1-8eab-cc1dbc6cc0cf

status_id   string  optional    

Filter by status UUID. O campo value deve ser um UUID válido. The uuid of an existing record in the statuses table. Example: e418afa2-5c74-3104-b994-a2c1114c22f3

responsible_id   string  optional    

Filter by responsible user UUID. O campo value deve ser um UUID válido. The uuid of an existing record in the users table. Example: 0b5dbcc9-30e2-3a92-959f-1fc65f0111b6

Show project

requires authentication project show

Show a project

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/projects/1" \
    --header "Authorization: Bearer bEf6Ze4ca8gPhk3V6a5d1vD" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/projects/1"
);

const headers = {
    "Authorization": "Bearer bEf6Ze4ca8gPhk3V6a5d1vD",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "52066aeb-2141-332e-ad3f-4b17ad607d95",
        "name": "Et unde est",
        "description": "Ut voluptas nihil occaecati eos quo.",
        "current_version": 1,
        "file": {
            "path": "projects/72878fe6-590a-3b22-9cff-672fc549b18f.pdf",
            "size": "2535118",
            "extension": "pdf"
        },
        "discipline": {
            "id": "a3296001-b850-4512-93b5-6449bcf6cab2",
            "name": "Adipisci",
            "code": "YLR"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/projects/{id}

Headers

Authorization        

Example: Bearer bEf6Ze4ca8gPhk3V6a5d1vD

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the project. Example: 1

project   string     

Project UUID Example: a

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 V6Zgfaeh6b4d35kvaPDE18c" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"discipline_id\": \"3adb07d1-d004-3ac5-8923-600f23f21bb9\",
    \"work_id\": \"0c3118f2-7e22-3197-b2cc-2f4c1a12f88d\",
    \"responsible_user_id\": \"8ed321f1-2574-312d-add9-1277fe9c3857\",
    \"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 V6Zgfaeh6b4d35kvaPDE18c",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "discipline_id": "3adb07d1-d004-3ac5-8923-600f23f21bb9",
    "work_id": "0c3118f2-7e22-3197-b2cc-2f4c1a12f88d",
    "responsible_user_id": "8ed321f1-2574-312d-add9-1277fe9c3857",
    "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"
}
 

Request      

POST api/projects

Headers

Authorization        

Example: Bearer V6Zgfaeh6b4d35kvaPDE18c

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

nome. Example: Example Name

description   string  optional    

descrição. Example: Example Description

discipline_id   string     

disciplina. O campo value deve ser um UUID válido. The uuid of an existing record in the disciplines table. Example: 3adb07d1-d004-3ac5-8923-600f23f21bb9

work_id   string  optional    

obra. O campo value deve ser um UUID válido. The uuid of an existing record in the works table. Example: 0c3118f2-7e22-3197-b2cc-2f4c1a12f88d

responsible_user_id   string  optional    

responsável. O campo value deve ser um UUID válido. The uuid of an existing record in the users table. Example: 8ed321f1-2574-312d-add9-1277fe9c3857

notes   string  optional    

observação. Example: Example Notes

file   object     

arquivo.

path   string  optional    

caminho do arquivo. This field is required when file is present. Example: Example File path

name   string     

nome do arquivo. Example: Example Name

size   string  optional    

tamanho do arquivo. Example: Example File size

extension   string  optional    

extensão do arquivo. Example: Example File extension

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/17" \
    --header "Authorization: Bearer eE1aVh384ba6k65DfcdPZvg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"discipline_id\": \"be154304-d135-3ae1-ba71-a7129e07c7d7\",
    \"work_id\": \"6bb5508d-dac6-3c30-b8fc-b871c3aab3ac\",
    \"responsible_user_id\": \"398b4420-1724-3f8f-8328-c4286f227a87\",
    \"status_id\": \"8afbf8af-8ac4-33ac-9f2b-75a23823d00a\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/projects/17"
);

const headers = {
    "Authorization": "Bearer eE1aVh384ba6k65DfcdPZvg",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "discipline_id": "be154304-d135-3ae1-ba71-a7129e07c7d7",
    "work_id": "6bb5508d-dac6-3c30-b8fc-b871c3aab3ac",
    "responsible_user_id": "398b4420-1724-3f8f-8328-c4286f227a87",
    "status_id": "8afbf8af-8ac4-33ac-9f2b-75a23823d00a"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "string"
}
 

Request      

PUT api/projects/{id}

Headers

Authorization        

Example: Bearer eE1aVh384ba6k65DfcdPZvg

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the project. Example: 17

project   string     

Project UUID Example: a

Body Parameters

name   string  optional    

nome. Example: Example Name

description   string  optional    

descrição. Example: Example Description

discipline_id   string  optional    

disciplina. O campo value deve ser um UUID válido. The uuid of an existing record in the disciplines table. Example: be154304-d135-3ae1-ba71-a7129e07c7d7

work_id   string  optional    

obra. O campo value deve ser um UUID válido. The uuid of an existing record in the works table. Example: 6bb5508d-dac6-3c30-b8fc-b871c3aab3ac

responsible_user_id   string  optional    

responsável. O campo value deve ser um UUID válido. The uuid of an existing record in the users table. Example: 398b4420-1724-3f8f-8328-c4286f227a87

status_id   string  optional    

situação. O campo value deve ser um UUID válido. The uuid of an existing record in the statuses table. Example: 8afbf8af-8ac4-33ac-9f2b-75a23823d00a

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/voluptas" \
    --header "Authorization: Bearer 6PDEbav3Z1h68a4gdVce5fk" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/projects/voluptas"
);

const headers = {
    "Authorization": "Bearer 6PDEbav3Z1h68a4gdVce5fk",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/projects/{project}

Headers

Authorization        

Example: Bearer 6PDEbav3Z1h68a4gdVce5fk

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

project   string     

Project UUID Example: voluptas

Reports

Endpoints for reports

Generate RDO PDF

requires authentication daily-log show

Dispatches async PDF generation. Frontend receives notification via Pusher when ready.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/reports/daily-log" \
    --header "Authorization: Bearer Pcbadfeg6Dvh6453V18ZEak" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"daily_log\": \"quaerat\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/daily-log"
);

const headers = {
    "Authorization": "Bearer Pcbadfeg6Dvh6453V18ZEak",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "daily_log": "quaerat"
};

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."
}
 

Request      

GET api/reports/daily-log

Headers

Authorization        

Example: Bearer Pcbadfeg6Dvh6453V18ZEak

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

daily_log   string     

The uuid of an existing record in the daily_logs table. Example: quaerat

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 vkb6e3ZcDdEafg815a46PhV" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"employee\": \"earum\",
    \"kit_uuid\": \"60aa4ce2-81d7-3324-bfba-6828bd50f5cb\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/epi-term"
);

const headers = {
    "Authorization": "Bearer vkb6e3ZcDdEafg815a46PhV",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "employee": "earum",
    "kit_uuid": "60aa4ce2-81d7-3324-bfba-6828bd50f5cb"
};

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."
}
 

Request      

GET api/reports/epi-term

Headers

Authorization        

Example: Bearer vkb6e3ZcDdEafg815a46PhV

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

employee   string     

The uuid of an existing record in the employees table. Example: earum

kit_uuid   string     

O campo value deve ser um UUID válido. Example: 60aa4ce2-81d7-3324-bfba-6828bd50f5cb

Generate employee sheet PDF

requires authentication No specific permission required

Dispatches async PDF generation of the employee record. Frontend receives notification via Pusher when ready.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/reports/employee-sheet" \
    --header "Authorization: Bearer V1avPEZbhc3keg664f8d5Da" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"employee\": \"est\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/employee-sheet"
);

const headers = {
    "Authorization": "Bearer V1avPEZbhc3keg664f8d5Da",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "employee": "est"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/reports/employee-sheet

Headers

Authorization        

Example: Bearer V1avPEZbhc3keg664f8d5Da

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

employee   string     

The uuid of an existing record in the employees table. Example: est

Cost center panel

requires authentication cost-center report

Totais por centro de custo no período, somados pela árvore. Devolve dois blocos declarados e separados: desembolso (fecha com o caixa e o banco) e custo apropriado por obra. Os dois não se somam — material comprado num mês e entregue em outro aparece em cada bloco no seu momento.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/reports/cost-center?date_start=2026-11-01&date_end=2026-11-30&works[]=f6b58205-c4eb-36b2-92c0-2e839d1be4a8&cost_centers[]=a838fb3c-5ac6-3d46-9353-57d3df136708&format=xlsx" \
    --header "Authorization: Bearer v6Z1gchfdkPe3aVDEba6854" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/cost-center"
);

const params = {
    "date_start": "2026-11-01",
    "date_end": "2026-11-30",
    "works[0]": "f6b58205-c4eb-36b2-92c0-2e839d1be4a8",
    "cost_centers[0]": "a838fb3c-5ac6-3d46-9353-57d3df136708",
    "format": "xlsx",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer v6Z1gchfdkPe3aVDEba6854",
    "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."
}
 

Request      

GET api/reports/cost-center

Headers

Authorization        

Example: Bearer v6Z1gchfdkPe3aVDEba6854

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

date_start   string     

Início do período. Must be a valid date in the format Y-m-d. Example: 2026-11-01

date_end   string     

Fim do período. Must be a valid date in the format Y-m-d. O campo value deve ser uma data posterior ou igual a date_start. Example: 2026-11-30

works   string[]  optional    

O campo value deve ser um UUID válido. The uuid of an existing record in the works table.

cost_centers   string[]  optional    

O campo value deve ser um UUID válido. The uuid of an existing record in the cost_centers table.

format   string  optional    

Só na exportação: xlsx (padrão) ou csv. Example: xlsx

Must be one of:
  • xlsx
  • csv

Cost center entries

requires authentication cost-center report

Lançamentos que formam um total do painel, paginados e em ordem de data. O centro informado inclui a subárvore, então clicar no total de um grupo lista o que veio dos filhos também.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/reports/cost-center/entries?search=vero&sort_by=date&sort_desc=1&per_page=12" \
    --header "Authorization: Bearer 8E6hD43fZd1PaVck6gabev5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_start\": \"2026-11-06\",
    \"date_end\": \"2087-03-12\",
    \"block\": \"work_cost\",
    \"cost_center_id\": \"f9bee4f1-4167-3593-a1d9-2ec06642c373\",
    \"without_cost_center\": false,
    \"type\": \"other\",
    \"per_page\": 22,
    \"search\": \"xdigiephlexuqndd\",
    \"sort_by\": \"amount\",
    \"sort_desc\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/cost-center/entries"
);

const params = {
    "search": "vero",
    "sort_by": "date",
    "sort_desc": "1",
    "per_page": "12",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer 8E6hD43fZd1PaVck6gabev5",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "date_start": "2026-11-06",
    "date_end": "2087-03-12",
    "block": "work_cost",
    "cost_center_id": "f9bee4f1-4167-3593-a1d9-2ec06642c373",
    "without_cost_center": false,
    "type": "other",
    "per_page": 22,
    "search": "xdigiephlexuqndd",
    "sort_by": "amount",
    "sort_desc": 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."
}
 

Request      

GET api/reports/cost-center/entries

Headers

Authorization        

Example: Bearer 8E6hD43fZd1PaVck6gabev5

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

search   string  optional    

Texto livre em descrição, código, obra e fornecedor/recebedor, sem distinguir caixa nem acento. O total da paginação reflete a busca. Example: vero

sort_by   string  optional    

date ou amount. Padrão: date. Example: date

Must be one of:
  • date
  • amount
sort_desc   boolean  optional    

Ordem decrescente. Padrão: 1. Example: true

per_page   integer  optional    

Itens por página, até 100. Padrão: 10. Example: 12

Body Parameters

date_start   string     

Must be a valid date in the format Y-m-d. Example: 2026-11-06

date_end   string     

Must be a valid date in the format Y-m-d. O campo value deve ser uma data posterior ou igual a date_start. Example: 2087-03-12

block   string     

Example: work_cost

Must be one of:
  • disbursement
  • work_cost
cost_center_id   string  optional    

This field is required when without_cost_center is not present. O campo value deve ser um UUID válido. The uuid of an existing record in the cost_centers table. Example: f9bee4f1-4167-3593-a1d9-2ec06642c373

without_cost_center   boolean  optional    

This field is required when cost_center_id is not present. Example: false

type   string  optional    

Example: other

Must be one of:
  • material
  • labor
  • other
per_page   integer  optional    

O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 22

search   string  optional    

O campo value não pode ser superior a 255 caracteres. Example: xdigiephlexuqndd

sort_by   string  optional    

Example: amount

Must be one of:
  • date
  • amount
sort_desc   boolean  optional    

Example: true

Export cost center panel

requires authentication cost-center report

Gera a planilha do painel com os filtros atuais. XLSX sai com três abas (um total por bloco, mais os lançamentos); CSV sai com as mesmas três coisas em seções. O arquivo é gerado em fila e chega por notificação.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/reports/cost-center/excel?date_start=2026-11-01&date_end=2026-11-30&works[]=2448bb79-e735-3794-a9fe-5e695b6d6496&cost_centers[]=9f5850c2-3c4e-33dc-8fba-ed18f03a885f&format=xlsx" \
    --header "Authorization: Bearer ve3gE1P8d6fD46Vk5Zaabhc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/cost-center/excel"
);

const params = {
    "date_start": "2026-11-01",
    "date_end": "2026-11-30",
    "works[0]": "2448bb79-e735-3794-a9fe-5e695b6d6496",
    "cost_centers[0]": "9f5850c2-3c4e-33dc-8fba-ed18f03a885f",
    "format": "xlsx",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer ve3gE1P8d6fD46Vk5Zaabhc",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (202):


{
    "message": "Relatório sendo gerado. Você será notificado quando estiver pronto.",
    "channel": "reports.{uuid}",
    "event": "excel-report.completed"
}
 

Request      

GET api/reports/cost-center/excel

Headers

Authorization        

Example: Bearer ve3gE1P8d6fD46Vk5Zaabhc

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

date_start   string     

Início do período. Must be a valid date in the format Y-m-d. Example: 2026-11-01

date_end   string     

Fim do período. Must be a valid date in the format Y-m-d. O campo value deve ser uma data posterior ou igual a date_start. Example: 2026-11-30

works   string[]  optional    

O campo value deve ser um UUID válido. The uuid of an existing record in the works table.

cost_centers   string[]  optional    

O campo value deve ser um UUID válido. The uuid of an existing record in the cost_centers table.

format   string  optional    

Só na exportação: xlsx (padrão) ou csv. Example: xlsx

Must be one of:
  • xlsx
  • csv

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=dolorem&type=entrada&description=Ipsum+est+dignissimos+rerum+voluptatem+quo+blanditiis+inventore.&categories[]=76ba4a57-340f-3837-b741-11e894ac55c3&exclude_categories[]=c7898385-c2bd-399d-b96e-9981a81dd365&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=f1a80770-b251-3795-8043-1481d5b6c47f&customers[]=1a4f8530-7744-3a3e-9938-a553e12571a2&suppliers[]=f3470f50-b682-35f8-a125-01e4f2540243&cash_session=9d1c3cf9-bcab-3712-836c-2336b6ff976a&works[]=e334f56a-4b90-3c89-bb59-01f8755f062e" \
    --header "Authorization: Bearer c4Ph1Ef6ag8Dv63eaZdkVb5" \
    --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": "dolorem",
    "type": "entrada",
    "description": "Ipsum est dignissimos rerum voluptatem quo blanditiis inventore.",
    "categories[0]": "76ba4a57-340f-3837-b741-11e894ac55c3",
    "exclude_categories[0]": "c7898385-c2bd-399d-b96e-9981a81dd365",
    "date_start": "2026-01-01",
    "date_end": "2026-12-31",
    "bank_accounts[0]": "f1a80770-b251-3795-8043-1481d5b6c47f",
    "customers[0]": "1a4f8530-7744-3a3e-9938-a553e12571a2",
    "suppliers[0]": "f3470f50-b682-35f8-a125-01e4f2540243",
    "cash_session": "9d1c3cf9-bcab-3712-836c-2336b6ff976a",
    "works[0]": "e334f56a-4b90-3c89-bb59-01f8755f062e",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer c4Ph1Ef6ag8Dv63eaZdkVb5",
    "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."
}
 

Request      

GET api/reports/cash-flow/excel

Headers

Authorization        

Example: Bearer c4Ph1Ef6ag8Dv63eaZdkVb5

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

q   string  optional    

Example: dolorem

type   string  optional    

Tipo de lançamento. Example: entrada

Must be one of:
  • entrada
  • saída
  • tarifa
  • depósito
  • saque
  • transferência
  • pagamento
  • juros
  • ajuste
  • ajuste saída
description   string  optional    

Example: Ipsum est dignissimos rerum voluptatem quo blanditiis inventore.

categories   string[]  optional    

O campo value deve ser um UUID válido. The uuid of an existing record in the transaction_categories table.

exclude_categories   string[]  optional    

O campo value deve ser um UUID válido. The uuid of an existing record in the transaction_categories table.

date_start   string  optional    

Início do período (data). O campo value deve ser uma data válida. Example: 2026-01-01

date_end   string  optional    

Fim do período (data). O campo value deve ser uma data válida. Example: 2026-12-31

bank_accounts   string[]  optional    

O campo value deve ser um UUID válido.

customers   string[]  optional    

O campo value deve ser um UUID válido.

suppliers   string[]  optional    

O campo value deve ser um UUID válido.

cash_session   string  optional    

O campo value deve ser um UUID válido. Example: 9d1c3cf9-bcab-3712-836c-2336b6ff976a

works   string[]  optional    

O campo value deve ser um UUID válido.

url   string  optional    
base64   string  optional    
aba_unica   string  optional    

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=quibusdam&type=entrada&description=Sit+totam+sed+sit+ratione+repudiandae.&categories[]=b90512f0-7e45-39ed-8718-8a8056bb08c9&exclude_categories[]=f4fee5fa-7f31-301e-a4fc-e520bac4f7bb&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=ba63188a-7e9b-3e7b-bd98-b381b1675c73&customers[]=09bc2e1b-0b6f-3185-bac6-30260d8b4dad&suppliers[]=7d53f013-5ab1-3303-bcfc-a6e24a510814&cash_session=7a4b5252-b461-3c2f-b781-a4db27e33013&works[]=7f2504fd-6dfc-3a06-9f8b-73a68ab37d40" \
    --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": "quibusdam",
    "type": "entrada",
    "description": "Sit totam sed sit ratione repudiandae.",
    "categories[0]": "b90512f0-7e45-39ed-8718-8a8056bb08c9",
    "exclude_categories[0]": "f4fee5fa-7f31-301e-a4fc-e520bac4f7bb",
    "date_start": "2026-01-01",
    "date_end": "2026-12-31",
    "bank_accounts[0]": "ba63188a-7e9b-3e7b-bd98-b381b1675c73",
    "customers[0]": "09bc2e1b-0b6f-3185-bac6-30260d8b4dad",
    "suppliers[0]": "7d53f013-5ab1-3303-bcfc-a6e24a510814",
    "cash_session": "7a4b5252-b461-3c2f-b781-a4db27e33013",
    "works[0]": "7f2504fd-6dfc-3a06-9f8b-73a68ab37d40",
};
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."
}
 

Request      

GET api/reports/cash-flow

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

q   string  optional    

Example: quibusdam

type   string  optional    

Tipo de lançamento. Example: entrada

Must be one of:
  • entrada
  • saída
  • tarifa
  • depósito
  • saque
  • transferência
  • pagamento
  • juros
  • ajuste
  • ajuste saída
description   string  optional    

Example: Sit totam sed sit ratione repudiandae.

categories   string[]  optional    

O campo value deve ser um UUID válido. The uuid of an existing record in the transaction_categories table.

exclude_categories   string[]  optional    

O campo value deve ser um UUID válido. The uuid of an existing record in the transaction_categories table.

date_start   string  optional    

Início do período (data). O campo value deve ser uma data válida. Example: 2026-01-01

date_end   string  optional    

Fim do período (data). O campo value deve ser uma data válida. Example: 2026-12-31

bank_accounts   string[]  optional    

O campo value deve ser um UUID válido.

customers   string[]  optional    

O campo value deve ser um UUID válido.

suppliers   string[]  optional    

O campo value deve ser um UUID válido.

cash_session   string  optional    

O campo value deve ser um UUID válido. Example: 7a4b5252-b461-3c2f-b781-a4db27e33013

works   string[]  optional    

O campo value deve ser um UUID válido.

url   string  optional    
base64   string  optional    
aba_unica   string  optional    

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 fvZ16P3h6Ea4ecDVbdk8ga5" \
    --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 fvZ16P3h6Ea4ecDVbdk8ga5",
    "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."
}
 

Request      

GET api/reports/accounts-payable-receivable/excel

Headers

Authorization        

Example: Bearer fvZ16P3h6Ea4ecDVbdk8ga5

Content-Type        

Example: application/json

Accept        

Example: application/json

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."
}
 

Request      

GET api/reports/accounts-payable-receivable

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

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 cZ6e183dPVEkv4gf6bD5haa" \
    --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 cZ6e183dPVEkv4gf6bD5haa",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "777c4645-75a9-3fdc-992c-c72501a27723",
            "name": "ut enim",
            "slug": null,
            "description": null,
            "abbreviation": "jya",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "405d7011-c7e4-3ef2-aa8c-c99131a95a7d",
            "name": "asperiores occaecati",
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/sectors

Headers

Authorization        

Example: Bearer cZ6e183dPVEkv4gf6bD5haa

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Search query. Example: Tecnologia

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 dfa3hkc4DEgPZ5e6v6b8V1a" \
    --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 dfa3hkc4DEgPZ5e6v6b8V1a",
    "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"
}
 

Request      

POST api/sectors

Headers

Authorization        

Example: Bearer dfa3hkc4DEgPZ5e6v6b8V1a

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

slug   string  optional    

Slug. O campo value não pode ser superior a 255 caracteres. Example: Example Slug

description   string  optional    

Descrição. Example: Example Description

abbreviation   string  optional    

Abreviação. O campo value não pode ser superior a 10 caracteres. Example: Example Abbreviation

image   object  optional    

Imagem.

path   string  optional    

Caminho da imagem. O campo value não pode ser superior a 255 caracteres. Example: Example Image path

url   string  optional    

URL da imagem. Must be a valid URL. Example: https://example.com

name   string  optional    

Nome da imagem. O campo value não pode ser superior a 255 caracteres. Example: Example Name

size   string  optional    

Tamanho da imagem. O campo value não pode ser superior a 50 caracteres. Example: Example Image size

extension   string  optional    

Extensão da imagem. O campo value não pode ser superior a 10 caracteres. Example: Example Image extension

Get sector

requires authentication sector show

Get a sector

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/sectors/18" \
    --header "Authorization: Bearer 68Vh5fdab6aec3Z1Ek4DvPg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/18"
);

const headers = {
    "Authorization": "Bearer 68Vh5fdab6aec3Z1Ek4DvPg",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "3d650da8-a949-3042-8c3b-deeb7ae48be3",
        "name": "natus provident",
        "slug": null,
        "description": "Incidunt tempora nemo velit voluptatem voluptas et et aut. Architecto sit aut ipsum sed est iusto magnam earum. Ut earum temporibus consequatur quibusdam sint. Quis dolores quod eum ut provident et.",
        "abbreviation": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/sectors/{id}

Headers

Authorization        

Example: Bearer 68Vh5fdab6aec3Z1Ek4DvPg

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 18

sector   string     

Sector ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Update sector

requires authentication sector update

Update a sector

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/sectors/2" \
    --header "Authorization: Bearer 1baZd6eVDf6843Pgahv5Eck" \
    --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/2"
);

const headers = {
    "Authorization": "Bearer 1baZd6eVDf6843Pgahv5Eck",
    "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"
}
 

Request      

PUT api/sectors/{id}

Headers

Authorization        

Example: Bearer 1baZd6eVDf6843Pgahv5Eck

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 2

sector   string     

Sector ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

name   string  optional    

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

slug   string  optional    

Slug. O campo value não pode ser superior a 255 caracteres. Example: Example Slug

description   string  optional    

Descrição. Example: Example Description

abbreviation   string  optional    

Abreviação. O campo value não pode ser superior a 10 caracteres. Example: Example Abbreviation

image   object  optional    

Imagem.

path   string  optional    

Caminho da imagem. O campo value não pode ser superior a 255 caracteres. Example: Example Image path

url   string  optional    

URL da imagem. Must be a valid URL. Example: https://example.com

name   string  optional    

Nome da imagem. O campo value não pode ser superior a 255 caracteres. Example: Example Name

size   string  optional    

Tamanho da imagem. O campo value não pode ser superior a 50 caracteres. Example: Example Image size

extension   string  optional    

Extensão da imagem. O campo value não pode ser superior a 10 caracteres. Example: Example Image extension

Delete sector

requires authentication sector delete

Delete a sector

Example request:
curl --request DELETE \
    "https://api.bs-homolog.pensou.app.br/api/sectors/20" \
    --header "Authorization: Bearer 5cbhd36VZafg81aD4Pv6Eke" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/20"
);

const headers = {
    "Authorization": "Bearer 5cbhd36VZafg81aD4Pv6Eke",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/sectors/{id}

Headers

Authorization        

Example: Bearer 5cbhd36VZafg81aD4Pv6Eke

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 20

sector   string     

Sector ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 P6efg3aVh6bv4Z8k5E1adDc" \
    --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 P6efg3aVh6bv4Z8k5E1adDc",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "b3743eb8-1ac9-3441-b238-60625851a9fc",
            "name": "Hiram Hegmann",
            "username": "trystan.ankunding",
            "email": "fstamm@example.org",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "b1007f23-e8c2-3695-af50-78bfc77a260f",
            "name": "Celia D'Amore",
            "username": "lbradtke",
            "email": "priscilla05@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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/sectors/{sector}/users

Headers

Authorization        

Example: Bearer P6efg3aVh6bv4Z8k5E1adDc

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

sector   string     

Sector UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 aZ185h6eakvVg46DPd3cfEb" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"ccb81782-0fca-3b82-bb8f-4b7976ed58da\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/attach"
);

const headers = {
    "Authorization": "Bearer aZ185h6eakvVg46DPd3cfEb",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "users": [
        "ccb81782-0fca-3b82-bb8f-4b7976ed58da"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "Users attached successfully"
}
 

Request      

POST api/sectors/{sector}/users/attach

Headers

Authorization        

Example: Bearer aZ185h6eakvVg46DPd3cfEb

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

sector   string     

Sector UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

users   string[]  optional    

UUID do usuário. The uuid of an existing record in the users table.

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 6e1EbP43ZVfkvhaD6cd5ga8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"359b1a7c-f8e7-3fd6-9ab3-6676155b1fd1\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/detach"
);

const headers = {
    "Authorization": "Bearer 6e1EbP43ZVfkvhaD6cd5ga8",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "users": [
        "359b1a7c-f8e7-3fd6-9ab3-6676155b1fd1"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "Users detached successfully"
}
 

Request      

POST api/sectors/{sector}/users/detach

Headers

Authorization        

Example: Bearer 6e1EbP43ZVfkvhaD6cd5ga8

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

sector   string     

Sector UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

users   string[]  optional    

UUID do usuário. The uuid of an existing record in the users table.

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 54v6e6DZE8Pa3b1haVkgfcd" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"37afe25e-ea66-39ff-b37b-4a78d2bd42c4\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/sync"
);

const headers = {
    "Authorization": "Bearer 54v6e6DZE8Pa3b1haVkgfcd",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "users": [
        "37afe25e-ea66-39ff-b37b-4a78d2bd42c4"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "Users synchronized successfully"
}
 

Request      

POST api/sectors/{sector}/users/sync

Headers

Authorization        

Example: Bearer 54v6e6DZE8Pa3b1haVkgfcd

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

sector   string     

Sector UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

users   string[]  optional    

UUID do usuário. The uuid of an existing record in the users table.

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 D5fkEda461v6cVgZ8Phae3b" \
    --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 D5fkEda461v6cVgZ8Phae3b",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "name": "et libero",
            "slug": "corrupti-est-est-assumenda-animi-voluptatem-sit-qui"
        },
        {
            "name": "est ea",
            "slug": "aliquid-sed-eveniet-officiis-et-odio-nihil-a"
        }
    ]
}
 

Request      

GET api/status-modules

Headers

Authorization        

Example: Bearer D5fkEda461v6cVgZ8Phae3b

Content-Type        

Example: application/json

Accept        

Example: application/json

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&sector_id=019556e7-2e9f-777c-a177-30bbf0646c32" \
    --header "Authorization: Bearer 65kPv8d3ab1Df4g6ZchVeEa" \
    --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 65kPv8d3ab1Df4g6ZchVeEa",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "24869b0e-14c4-3ae6-bcf8-215d7907c3e9",
            "slug": null,
            "name": null,
            "description": "Nicolas de Freitas",
            "abbreviation": "consequuntur",
            "color": "#d50a56",
            "text_color": "#9fc5bc",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "8bb01fbb-3ae7-3e52-b2aa-e50d390b430a",
            "slug": null,
            "name": null,
            "description": "Sr. José Torres Bonilha",
            "abbreviation": "ipsam",
            "color": "#960c72",
            "text_color": "#da68b4",
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/statuses

Headers

Authorization        

Example: Bearer 65kPv8d3ab1Df4g6ZchVeEa

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Search query. Example: Em andamento

module   string  optional    

Filter by module slug. The slug of an existing record in the status_modules table. Example: work

sector_id   string  optional    

Filter by sector UUID. The uuid of an existing record in the sectors table. Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 14a6Z6kEgcfP3aDV8bv5hed" \
    --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\": \"09031b1f-7987-33f2-938a-00b7c998b8f8\",
    \"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 14a6Z6kEgcfP3aDV8bv5hed",
    "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": "09031b1f-7987-33f2-938a-00b7c998b8f8",
    "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"
}
 

Request      

POST api/statuses

Headers

Authorization        

Example: Bearer 14a6Z6kEgcfP3aDV8bv5hed

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

slug   string  optional    

Slug. O campo value não pode ser superior a 100 caracteres. Example: Example Slug

name   string  optional    

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

description   string     

Descrição. O campo value não pode ser superior a 255 caracteres. Example: Example Description

abbreviation   string     

Abreviação. O campo value não pode ser superior a 255 caracteres. Example: Example Abbreviation

module   string     

Módulo. Example: Example Module

sector_id   string     

Setor. The uuid of an existing record in the sectors table. Example: 09031b1f-7987-33f2-938a-00b7c998b8f8

color   string  optional    

Cor. Example: Example Color

text_color   string  optional    

Cor do texto. Example: Example Text color

order   integer  optional    

Ordem. O campo value deve ser pelo menos 0. Example: 1

is_initial   boolean  optional    

Status inicial. Example: true

is_final   boolean  optional    

Status final. Example: true

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 3Egfk6a51e4VdDZ6ca8hPbv" \
    --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 3Egfk6a51e4VdDZ6ca8hPbv",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "ce1c5b29-3870-367a-b14b-ddaf2ab9c767",
        "slug": null,
        "name": null,
        "description": "Dr. Martinho Lozano Pena",
        "abbreviation": "omnis",
        "color": "#992f61",
        "text_color": "#0b09f2",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/statuses/{id}

Headers

Authorization        

Example: Bearer 3Egfk6a51e4VdDZ6ca8hPbv

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the status. Example: 1

status   string     

Status ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 Z8f6aa5bdvDgh4kV3EPec16" \
    --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\": \"8df45d5b-988c-3a81-8aa1-aa01719574b0\",
    \"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 Z8f6aa5bdvDgh4kV3EPec16",
    "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": "8df45d5b-988c-3a81-8aa1-aa01719574b0",
    "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"
}
 

Request      

PUT api/statuses/{id}

Headers

Authorization        

Example: Bearer Z8f6aa5bdvDgh4kV3EPec16

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the status. Example: 1

Status   string     

Status ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

slug   string  optional    

Slug. O campo value não pode ser superior a 100 caracteres. Example: Example Slug

name   string  optional    

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

description   string  optional    

Descrição. O campo value não pode ser superior a 255 caracteres. Example: Example Description

abbreviation   string  optional    

Abreviação. O campo value não pode ser superior a 255 caracteres. Example: Example Abbreviation

module   string  optional    

Módulo. Example: Example Module

sector_id   string  optional    

Setor. The uuid of an existing record in the sectors table. Example: 8df45d5b-988c-3a81-8aa1-aa01719574b0

color   string  optional    

Cor. Example: Example Color

text_color   string  optional    

Cor do texto. Example: Example Text color

order   integer  optional    

Ordem. O campo value deve ser pelo menos 0. Example: 1

is_initial   boolean  optional    

Status inicial. Example: true

is_final   boolean  optional    

Status final. Example: true

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 Dvb58aP3ec1fEV6ad4Z6khg" \
    --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 Dvb58aP3ec1fEV6ad4Z6khg",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/statuses/{status}

Headers

Authorization        

Example: Bearer Dvb58aP3ec1fEV6ad4Z6khg

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

status   string     

Status ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 4afd6aVkED18hPb5v3eZ6gc" \
    --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 4afd6aVkED18hPb5v3eZ6gc",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "771c8015-e3b4-33d2-94f6-825c13f0c96d",
            "quantity": 309.3971,
            "min_quantity": null,
            "max_quantity": null,
            "below_minimum": false,
            "above_maximum": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "ee6bf7c9-8b94-3a20-9ce2-fa273d5e3e49",
            "quantity": 179.731,
            "min_quantity": null,
            "max_quantity": null,
            "below_minimum": false,
            "above_maximum": false,
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/stocks/available-for-transfer

Headers

Authorization        

Example: Bearer 4afd6aVkED18hPb5v3eZ6gc

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

product_id   string     

Product UUID to search for. O campo value deve ser um UUID válido. The uuid of an existing record in the products table. Example: 019556e7-2e9f-777c-a177-30bbf0646c32

exclude_work_id   string  optional    

Work UUID to exclude from results (usually the requesting work). O campo value deve ser um UUID válido. The uuid of an existing record in the works table. Example: 019556e7-2e9f-777c-a177-30bbf0646c33

min_quantity   number  optional    

Minimum quantity available. O campo value deve ser pelo menos 0.0001. Example: 1

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 6E3Pc5evb4hkgVfaZ6d1Da8" \
    --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 6E3Pc5evb4hkgVfaZ6d1Da8",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "4f7ea0b1-06f1-381f-b2b2-545c7471578e",
            "name": "Estoque Faro e Filhos",
            "module": "work",
            "is_active": true,
            "is_main": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "99140fd3-09e3-3c51-9969-6057ce36ebaa",
            "name": "Estoque Benites Ltda.",
            "module": "work",
            "is_active": true,
            "is_main": false,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/stocks

Headers

Authorization        

Example: Bearer 6E3Pc5evb4hkgVfaZ6d1Da8

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page. O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 10

q   string  optional    

Search by stock name. O campo value não pode ser superior a 255 caracteres. Example: Main Stock

module   string  optional    

Filter by module type (e.g., work, customer). O campo value não pode ser superior a 100 caracteres. Example: work

is_active   boolean  optional    

Filter by active status. Example: true

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 cg15P36Dbd8vEakV4haeZf6" \
    --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 cg15P36Dbd8vEakV4haeZf6",
    "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": "9b36878e-77da-31e8-b2fc-c592fa710b75",
        "name": "Estoque Valdez-Delatorre",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/stocks

Headers

Authorization        

Example: Bearer cg15P36Dbd8vEakV4haeZf6

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

module   string     

módulo. O campo value não pode ser superior a 255 caracteres. Example: Example Module

id   string     

identificador. Example: Example Id

is_active   boolean  optional    

ativo. Example: true

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 e4V6ad51aPfh3EZcgb8Dk6v" \
    --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 e4V6ad51aPfh3EZcgb8Dk6v",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "200e7051-9a8c-34bf-a741-703e3bbfc194",
        "name": "Estoque Deverso Ltda.",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/stocks/main

Headers

Authorization        

Example: Bearer e4V6ad51aPfh3EZcgb8Dk6v

Content-Type        

Example: application/json

Accept        

Example: application/json

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 83a1Edkh6g6a4vPfbecV5ZD" \
    --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 83a1Edkh6g6a4vPfbecV5ZD",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "6ff8fe92-038c-33fb-b120-c7b7116922e6",
        "name": "Estoque Godói Comercial Ltda.",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/stocks/{id}

Headers

Authorization        

Example: Bearer 83a1Edkh6g6a4vPfbecV5ZD

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the stock. Example: 1

stock   string     

Stock UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 gk61Phv5aDVc3adbE4Zf6e8" \
    --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 gk61Phv5aDVc3adbE4Zf6e8",
    "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": "5f5144c0-950f-3fc9-ab1e-8f4648cfeb84",
        "name": "Estoque Correia Comercial Ltda.",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

PUT api/stocks/{id}

Headers

Authorization        

Example: Bearer gk61Phv5aDVc3adbE4Zf6e8

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the stock. Example: 1

stock   string     

Stock UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

name   string  optional    

nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

is_active   boolean  optional    

ativo. Example: true

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 akZaeEdPfhcV5g1D486v3b6" \
    --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 akZaeEdPfhcV5g1D486v3b6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/stocks/{id}

Headers

Authorization        

Example: Bearer akZaeEdPfhcV5g1D486v3b6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the stock. Example: 1

stock   string     

Stock UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 v1a3kZc8hgPD46dV5befa6E" \
    --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 v1a3kZc8hgPD46dV5befa6E",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "3e3b892c-04d2-3195-a797-66140eaf08b1",
            "quantity": 798.4635,
            "min_quantity": null,
            "max_quantity": null,
            "below_minimum": false,
            "above_maximum": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "c7efb4b9-138d-3b7a-87ec-3993068f27ae",
            "quantity": 984.5773,
            "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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/stocks/{stock}/items

Headers

Authorization        

Example: Bearer v1a3kZc8hgPD46dV5befa6E

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

stock   string     

Stock UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page. O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 10

q   string  optional    

Search by product name. O campo value não pode ser superior a 255 caracteres. Example: Cement

below_minimum   boolean  optional    

Filter items below minimum quantity. Example: true

above_maximum   boolean  optional    

Filter items above maximum quantity. Example: false

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/ad" \
    --header "Authorization: Bearer 6cE1D4hg3P8kfadb56aVvZe" \
    --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/ad"
);

const headers = {
    "Authorization": "Bearer 6cE1D4hg3P8kfadb56aVvZe",
    "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": "11b1dedc-6486-3aae-9b00-5fef217ce6d3",
        "quantity": 382.4545,
        "min_quantity": null,
        "max_quantity": null,
        "below_minimum": false,
        "above_maximum": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

PATCH api/stocks/{stock_id}/items/{id}

Headers

Authorization        

Example: Bearer 6cE1D4hg3P8kfadb56aVvZe

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

stock_id   integer     

The ID of the stock. Example: 1

id   string     

The ID of the item. Example: ad

stock   string     

Stock UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

item   string     

Stock item UUID Example: 019556e7-3a1b-888d-b288-41ccf0757d43

Body Parameters

min_quantity   number  optional    

Minimum quantity threshold for low stock alert. O campo value deve ser pelo menos 0. Example: 10

max_quantity   number  optional    

Maximum quantity threshold for over stock alert. O campo value deve ser pelo menos 0. Example: 100

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 6Ek4daPh1geV6b3vDfaZc85" \
    --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 6Ek4daPh1geV6b3vDfaZc85",
    "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
    }
}
 

Request      

GET api/stocks/{stock}/summary

Headers

Authorization        

Example: Bearer 6Ek4daPh1geV6b3vDfaZc85

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

stock   string     

Stock UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 EVhafv4ekbDP168cd6Zg3a5" \
    --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 EVhafv4ekbDP168cd6Zg3a5",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "838fc981-c98f-3651-a445-03dc525f1dfb",
            "code": "MOV-579883",
            "type": "compra",
            "type_name": "PURCHASE",
            "is_entry": true,
            "is_exit": false,
            "quantity": 37.9901,
            "previous_quantity": 573.8547,
            "new_quantity": 611.8448,
            "reason": null,
            "movement_date": "2026-10-08T05:39:26.000000Z",
            "created_at": null
        },
        {
            "id": "6faa20fe-744b-34ab-a65c-64789e240f65",
            "code": "MOV-112379",
            "type": "ajuste entrada",
            "type_name": "ADJUSTMENT_IN",
            "is_entry": true,
            "is_exit": false,
            "quantity": 25.578,
            "previous_quantity": 374.6659,
            "new_quantity": 400.2439,
            "reason": "Officiis hic quia et nam ea sint velit quaerat.",
            "movement_date": "2026-10-24T08:34:04.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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/stocks/{stock_id}/movements

Headers

Authorization        

Example: Bearer EVhafv4ekbDP168cd6Zg3a5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

stock_id   integer     

The ID of the stock. Example: 1

stock   string     

Stock UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page. O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 10

type   string  optional    

Filter by movement type (entry, consumption, transfer_in, transfer_out, adjustment_up, adjustment_down). O campo value não pode ser superior a 50 caracteres. Example: entry

product_id   string  optional    

Filter by product UUID. O campo value deve ser um UUID válido. Example: 019556e7-2e9f-777c-a177-30bbf0646c32

date_start   string  optional    

Filter movements from this date (YYYY-MM-DD). O campo value deve ser uma data válida. Example: 2024-01-01

date_end   string  optional    

Filter movements until this date (YYYY-MM-DD). O campo value deve ser uma data válida. O campo value deve ser uma data posterior ou igual a date_start. Example: 2024-12-31

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 fg1ba4EcPZD6vk86aeV35hd" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"7c89992b-8853-3356-aad9-e0a9cb22ecf7\",
    \"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 fg1ba4EcPZD6vk86aeV35hd",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "7c89992b-8853-3356-aad9-e0a9cb22ecf7",
    "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": "aa888bcf-0cc5-320f-ae75-f7e50f14827b",
        "code": "MOV-139176",
        "type": "compra",
        "type_name": "PURCHASE",
        "is_entry": true,
        "is_exit": false,
        "quantity": 86.4539,
        "previous_quantity": 390.8058,
        "new_quantity": 477.2597,
        "reason": null,
        "movement_date": "2026-11-05T17:06:22.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stocks/{stock_id}/movements

Headers

Authorization        

Example: Bearer fg1ba4EcPZD6vk86aeV35hd

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

stock_id   integer     

The ID of the stock. Example: 1

stock   string     

Stock UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

product_id   string     

produto. The uuid of an existing record in the products table. Example: 7c89992b-8853-3356-aad9-e0a9cb22ecf7

type   string     

tipo de movimentação. Example: Example Type

Must be one of:
  • compra
  • produção
  • devolução
  • consumo
  • venda
  • perda
  • vencido
  • alocação
quantity   number     

quantidade. Example: 1

reason   string  optional    

motivo. O campo value não pode ser superior a 500 caracteres. Example: Example Reason

reference_type   string  optional    

tipo de referência. O campo value não pode ser superior a 255 caracteres. Example: Example Reference type

reference_id   integer  optional    

referência. Example: 1

movement_date   string  optional    

data da movimentação. O campo value deve ser uma data válida. Example: 2024-01-01

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 186VvkP5aaEhgeD3Zf6b4cd" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"3cd92a8a-d6ea-391b-9bab-54a7adf896b8\",
    \"destination_stock_id\": \"17b65c54-837e-3207-98d0-9f632df3231f\",
    \"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 186VvkP5aaEhgeD3Zf6b4cd",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "3cd92a8a-d6ea-391b-9bab-54a7adf896b8",
    "destination_stock_id": "17b65c54-837e-3207-98d0-9f632df3231f",
    "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": "4aa6ceee-9e5d-34b5-9344-60f9131a252b",
        "code": "MOV-196934",
        "type": "consumo",
        "type_name": "CONSUMPTION",
        "is_entry": false,
        "is_exit": true,
        "quantity": 10.157,
        "previous_quantity": 234.1904,
        "new_quantity": 224.0334,
        "reason": "Sunt aut aut qui.",
        "movement_date": "2026-10-29T06:00:52.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stocks/{stock}/movements/transfer

Headers

Authorization        

Example: Bearer 186VvkP5aaEhgeD3Zf6b4cd

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

stock   string     

Source stock UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

product_id   string     

produto. The uuid of an existing record in the products table. Example: 3cd92a8a-d6ea-391b-9bab-54a7adf896b8

destination_stock_id   string     

estoque de destino. The value and stock must be different. The uuid of an existing record in the stocks table. Example: 17b65c54-837e-3207-98d0-9f632df3231f

quantity   number     

quantidade. Example: 1

reason   string  optional    

motivo. O campo value não pode ser superior a 500 caracteres. Example: Example Reason

movement_date   string  optional    

data da movimentação. O campo value deve ser uma data válida. Example: 2024-01-01

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 af6a3b8v6ch1ZdkegED54VP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"7693797f-b9f9-3aec-9970-1d086aa6b51c\",
    \"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 af6a3b8v6ch1ZdkegED54VP",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "7693797f-b9f9-3aec-9970-1d086aa6b51c",
    "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": "d9a6683a-1b6d-3855-af39-ef746669293d",
        "code": "MOV-868004",
        "type": "entrada transferência",
        "type_name": "TRANSFER_IN",
        "is_entry": true,
        "is_exit": false,
        "quantity": 66.2108,
        "previous_quantity": 10.3738,
        "new_quantity": 76.5846,
        "reason": null,
        "movement_date": "2026-11-01T04:01:40.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stocks/{stock}/movements/inventory

Headers

Authorization        

Example: Bearer af6a3b8v6ch1ZdkegED54VP

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

stock   string     

Stock UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

product_id   string     

produto. The uuid of an existing record in the products table. Example: 7693797f-b9f9-3aec-9970-1d086aa6b51c

new_quantity   number     

nova quantidade. Example: 1

reason   string  optional    

motivo. O campo value não pode ser superior a 500 caracteres. Example: Example Reason

movement_date   string  optional    

data da movimentação. O campo value deve ser uma data válida. Example: 2024-01-01

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 v36kh4faDbZ8EPdcV61gea5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"61204d8a-1e46-3bc1-be5b-92be424b5a55\",
    \"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 v36kh4faDbZ8EPdcV61gea5",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "61204d8a-1e46-3bc1-be5b-92be424b5a55",
    "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": "bd380288-27a8-3d6e-8872-6a02969447cd",
        "code": "MOV-404099",
        "type": "vencido",
        "type_name": "EXPIRED",
        "is_entry": false,
        "is_exit": true,
        "quantity": 3.0073,
        "previous_quantity": 242.8694,
        "new_quantity": 239.8621,
        "reason": "Eos ad qui sint.",
        "movement_date": "2026-10-21T14:41:11.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stock-movements/purchase

Headers

Authorization        

Example: Bearer v36kh4faDbZ8EPdcV61gea5

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

product_id   string     

produto. The uuid of an existing record in the products table. Example: 61204d8a-1e46-3bc1-be5b-92be424b5a55

quantity   number     

quantidade. O campo value deve ser pelo menos 0.0001. Example: 1

reason   string  optional    

motivo. O campo value não pode ser superior a 500 caracteres. Example: Example Reason

movement_date   string  optional    

data do movimento. O campo value deve ser uma data válida. Example: 2024-01-01

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 1b6kDedEa56afc3Ph8vg4VZ" \
    --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 1b6kDedEa56afc3Ph8vg4VZ",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "bc910eae-cffa-368d-9768-87394dedf28b",
        "code": "MOV-109275",
        "type": "ajuste entrada",
        "type_name": "ADJUSTMENT_IN",
        "is_entry": true,
        "is_exit": false,
        "quantity": 44.5977,
        "previous_quantity": 150.2536,
        "new_quantity": 194.8513,
        "reason": null,
        "movement_date": "2026-11-01T13:06:02.000000Z",
        "created_at": null
    }
}
 

Request      

GET api/stock-movements/{movement}

Headers

Authorization        

Example: Bearer 1b6kDedEa56afc3Ph8vg4VZ

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

movement   string     

Movement UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 ZD48vhE6dgeaa1fcb6P3Vk5" \
    --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 ZD48vhE6dgeaa1fcb6P3Vk5",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "e07b2990-cf80-331b-aafa-f352404e238d",
            "name": "Dr. Ketlin Santacruz",
            "email": "paloma.gomes@example.com",
            "phone": "(71) 2255-5111",
            "document": "15.444.382/0001-10",
            "type": "pj",
            "responsible": "Dr. Raissa Lourenço D'ávila",
            "image": {
                "id": null,
                "url": null
            },
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            }
        },
        {
            "id": "7c2f9fee-5708-3692-b90c-6203cad20735",
            "name": "Sabrina Juliane Santana Sobrinho",
            "email": "santiago.filipe@example.org",
            "phone": "(87) 90357-3018",
            "document": "35.469.275/0001-53",
            "type": "pj",
            "responsible": "Bruna Prado Santos Sobrinho",
            "image": {
                "id": null,
                "url": null
            },
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            }
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/suppliers

Headers

Authorization        

Example: Bearer ZD48vhE6dgeaa1fcb6P3Vk5

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Search query. Example: Supplier name

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 VPeb8h64a1f5vagEkdc6ZD3" \
    --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 VPeb8h64a1f5vagEkdc6ZD3",
    "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"
}
 

Request      

POST api/suppliers

Headers

Authorization        

Example: Bearer VPeb8h64a1f5vagEkdc6ZD3

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. Example: Example Name

email   string  optional    

E-mail. O campo value deve ser um endereço de e-mail válido. Example: user@example.com

phone   string  optional    

Telefone. Example: (11) 99999-9999

document   string     

CPF/CNPJ. Example: Example Document

type   string     

Tipo. Example: Example Type

Must be one of:
  • pf
  • pj
responsible   string  optional    

Responsável. Example: Example Responsible

image   object  optional    

Imagem.

path   string  optional    

Caminho da imagem. This field is required when image is present. Example: Example Image path

name   string  optional    

Nome da imagem. Example: Example Name

extension   string  optional    

Extensão da imagem. Example: Example Image extension

size   string  optional    

Tamanho da imagem. Example: Example Image size

address   object  optional    

Endereço.

street   string     

Rua. Example: Example Address street

number   string     

Número. Example: Example Address number

complement   string  optional    

Complemento. Example: Example Address complement

neighborhood   string     

Bairro. Example: Example Address neighborhood

city   string     

Cidade. Example: Example Address city

state   string     

Estado. Example: Example Address state

zip_code   string     

CEP. Example: Example Address zip code

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 d66Zhbc183ekfagE4v5PaDV" \
    --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 d66Zhbc183ekfagE4v5PaDV",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "68d04f89-8839-39db-9b87-571a43392dd3",
        "name": "Stephany Toledo Sales",
        "email": "hcordeiro@example.net",
        "phone": "(44) 2567-7732",
        "document": "35.524.489/0001-85",
        "type": "pj",
        "responsible": "Dr. Josué Ferraz da Rosa",
        "image": {
            "id": null,
            "url": null
        },
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        }
    }
}
 

Request      

GET api/suppliers/{id}

Headers

Authorization        

Example: Bearer d66Zhbc183ekfagE4v5PaDV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the supplier. Example: 1

supplier   string     

Supplier ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 46a6De1Zgv5V8dhfcEab3Pk" \
    --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 46a6De1Zgv5V8dhfcEab3Pk",
    "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"
}
 

Request      

PUT api/suppliers/{id}

Headers

Authorization        

Example: Bearer 46a6De1Zgv5V8dhfcEab3Pk

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the supplier. Example: 1

supplier   string     

Supplier ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

name   string  optional    

Nome. Example: Example Name

email   string  optional    

E-mail. O campo value deve ser um endereço de e-mail válido. Example: user@example.com

phone   string  optional    

Telefone. Example: (11) 99999-9999

document   string  optional    

CPF/CNPJ. Example: Example Document

type   string  optional    

Tipo. Example: Example Type

Must be one of:
  • pf
  • pj
responsible   string  optional    

Responsável. Example: Example Responsible

image   object  optional    

Imagem.

path   string  optional    

Caminho da imagem. This field is required when image is present. Example: Example Image path

name   string  optional    

Nome da imagem. Example: Example Name

extension   string  optional    

Extensão da imagem. Example: Example Image extension

size   string  optional    

Tamanho da imagem. Example: Example Image size

address   object  optional    

Endereço.

street   string  optional    

Rua. Example: Example Address street

number   string  optional    

Número. Example: Example Address number

complement   string  optional    

Complemento. Example: Example Address complement

neighborhood   string  optional    

Bairro. Example: Example Address neighborhood

city   string  optional    

Cidade. Example: Example Address city

state   string  optional    

Estado. Example: Example Address state

zip_code   string  optional    

CEP. Example: Example Address zip code

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 PEaD16e8V3vdhbf5ga46kcZ" \
    --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 PEaD16e8V3vdhbf5ga46kcZ",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/suppliers/{supplier}

Headers

Authorization        

Example: Bearer PEaD16e8V3vdhbf5ga46kcZ

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

supplier   string     

Supplier ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 V5gDaPka3bfce1Z6v86Ed4h" \
    --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 V5gDaPka3bfce1Z6v86Ed4h",
    "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"
        }
    }
}
 

Request      

GET api/system-types

Headers

Authorization        

Example: Bearer V5gDaPka3bfce1Z6v86Ed4h

Content-Type        

Example: application/json

Accept        

Example: application/json

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 E6vaaf1e5hP46D8kVdZc3bg" \
    --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 E6vaaf1e5hP46D8kVdZc3bg",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "86aff075-444a-392e-bdcd-423142f69a81",
            "name": "Srta. Verônica Aranda Filho",
            "description": "Eaque eveniet eligendi nesciunt omnis itaque. Dolor consequatur dolorem temporibus officiis exercitationem.",
            "type": "saque"
        },
        {
            "id": "321b3da4-e4a1-3cca-86f3-236626ab4d94",
            "name": "Cláudio Marinho Burgos Sobrinho",
            "description": "Dolor officiis quam molestias aliquid tenetur dolores pariatur. Veniam quam eaque rerum repellendus. Voluptas dignissimos deserunt est magnam asperiores.",
            "type": "ajuste"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/transaction-categories

Headers

Authorization        

Example: Bearer E6vaaf1e5hP46D8kVdZc3bg

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Search query. Example: Salary

type   string  optional    

Transaction type. Example: entrada

Must be one of:
  • entrada
  • saída
  • tarifa
  • depósito
  • saque
  • transferência
  • pagamento
  • juros
  • ajuste
  • ajuste saída

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/voluptate" \
    --header "Authorization: Bearer 18c635D6fevaEkhaP4VZgbd" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/transaction-categories/voluptate"
);

const headers = {
    "Authorization": "Bearer 18c635D6fevaEkhaP4VZgbd",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "80af7ca8-61b7-35d2-959b-5e281a85f63e",
        "name": "Sra. Flor Teles",
        "description": "Dolorem nam quo provident. Magnam eos et ratione eum cupiditate. Illum ut ad et eligendi. Nam itaque accusamus non velit tenetur.",
        "type": "juros"
    }
}
 

Request      

GET api/transaction-categories/{transactionCategory}

Headers

Authorization        

Example: Bearer 18c635D6fevaEkhaP4VZgbd

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: voluptate

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 hVaeDPvE8gZd41f5ckba366" \
    --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 hVaeDPvE8gZd41f5ckba366",
    "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"
}
 

Request      

POST api/transaction-categories

Headers

Authorization        

Example: Bearer hVaeDPvE8gZd41f5ckba366

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Name. Example: Example Name

description   string  optional    

Description. Example: Example Description

type   string     

Type. Example: Example Type

Must be one of:
  • entrada
  • saída
  • tarifa
  • depósito
  • saque
  • transferência
  • pagamento
  • juros
  • ajuste
  • ajuste saída

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/adipisci" \
    --header "Authorization: Bearer 5e1ZVafdEga4DP8hk36bv6c" \
    --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/adipisci"
);

const headers = {
    "Authorization": "Bearer 5e1ZVafdEga4DP8hk36bv6c",
    "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"
}
 

Request      

PUT api/transaction-categories/{transactionCategory}

Headers

Authorization        

Example: Bearer 5e1ZVafdEga4DP8hk36bv6c

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: adipisci

Body Parameters

name   string     

Name. Example: Example Name

description   string  optional    

Description. Example: Example Description

type   string     

Type. Example: Example Type

Must be one of:
  • entrada
  • saída
  • tarifa
  • depósito
  • saque
  • transferência
  • pagamento
  • juros
  • ajuste
  • ajuste saída

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/omnis" \
    --header "Authorization: Bearer kV4g8dcv3ZEDbPa6fea561h" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/transaction-categories/omnis"
);

const headers = {
    "Authorization": "Bearer kV4g8dcv3ZEDbPa6fea561h",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/transaction-categories/{transactionCategory}

Headers

Authorization        

Example: Bearer kV4g8dcv3ZEDbPa6fea561h

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: omnis

Tutoriais (administração)

Cadastro do catálogo de módulos da Central de Tutoriais

Listar módulos

requires authentication tutorials index

Lista o catálogo de módulos de tutorial

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Financeiro&is_active=1" \
    --header "Authorization: Bearer 16cZaE8VD4ePdah65b3kfvg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules"
);

const params = {
    "sort_by": "created_at",
    "sort_desc": "1",
    "page": "1",
    "per_page": "15",
    "q": "Financeiro",
    "is_active": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer 16cZaE8VD4ePdah65b3kfvg",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "bd2884d9-6bd6-3852-8977-ba63f5b3d738",
            "name": "Vero doloremque",
            "slug": "vero-doloremque-642821",
            "description": "Exercitationem aut ut id dolores.",
            "icon": null,
            "color": null,
            "sort_order": 0,
            "is_active": true,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "7d32176b-9f08-3e65-bc51-9bc5259a5c7d",
            "name": "Ducimus eos",
            "slug": "ducimus-eos-777784",
            "description": "Voluptas quis cum adipisci nam perferendis qui.",
            "icon": null,
            "color": null,
            "sort_order": 0,
            "is_active": true,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/admin/tutorial-modules

Headers

Authorization        

Example: Bearer 16cZaE8VD4ePdah65b3kfvg

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Busca por nome ou descrição. Example: Financeiro

is_active   boolean  optional    

Filtra por módulos ativos ou inativos. Example: true

Cadastrar módulo

requires authentication tutorials store

Cria um módulo no catálogo. O slug é derivado do nome quando não informado.

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules" \
    --header "Authorization: Bearer 83gk6vdDc5b1a6VZ4fhaePE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"slug\": \"Example Slug\",
    \"description\": \"Example Description\",
    \"icon\": \"Example Icon\",
    \"color\": \"Example Color\",
    \"sort_order\": 1,
    \"is_active\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules"
);

const headers = {
    "Authorization": "Bearer 83gk6vdDc5b1a6VZ4fhaePE",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "slug": "Example Slug",
    "description": "Example Description",
    "icon": "Example Icon",
    "color": "Example Color",
    "sort_order": 1,
    "is_active": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "data": {
        "id": "173d1d64-4c1d-36fe-af83-7dc2e35ef198",
        "name": "Tempora ut",
        "slug": "tempora-ut-218482",
        "description": "Quos veritatis quia voluptates alias perspiciatis.",
        "icon": null,
        "color": null,
        "sort_order": 0,
        "is_active": true,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/admin/tutorial-modules

Headers

Authorization        

Example: Bearer 83gk6vdDc5b1a6VZ4fhaePE

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

slug   string  optional    

Identificador. O campo value não pode ser superior a 255 caracteres. Example: Example Slug

description   string  optional    

Descrição. Example: Example Description

icon   string  optional    

Ícone. O campo value não pode ser superior a 64 caracteres. Example: Example Icon

color   string  optional    

Cor. Must match the regex /^#[0-9a-fA-F]{6}$/. Example: Example Color

sort_order   integer  optional    

Ordem. O campo value deve ser pelo menos 0. Example: 1

is_active   boolean  optional    

Ativo. Example: true

Visualizar módulo

requires authentication tutorials index

Detalhe de um módulo do catálogo

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32" \
    --header "Authorization: Bearer gb64V35fPE8ekd6Z1aDcvha" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32"
);

const headers = {
    "Authorization": "Bearer gb64V35fPE8ekd6Z1aDcvha",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "cf276522-b822-3a0f-bdf6-2c2495fc4b8b",
        "name": "Voluptates ut",
        "slug": "voluptates-ut-213947",
        "description": "Necessitatibus enim recusandae blanditiis omnis laboriosam voluptatem sit.",
        "icon": null,
        "color": null,
        "sort_order": 0,
        "is_active": true,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/admin/tutorial-modules/{tutorialModule}

Headers

Authorization        

Example: Bearer gb64V35fPE8ekd6Z1aDcvha

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

tutorialModule   string     

UUID do módulo Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Atualizar módulo

requires authentication tutorials update

Atualiza um módulo do catálogo

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32" \
    --header "Authorization: Bearer h6E8feaVc5134P6bZdkDavg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"slug\": \"Example Slug\",
    \"description\": \"Example Description\",
    \"icon\": \"Example Icon\",
    \"color\": \"Example Color\",
    \"sort_order\": 1,
    \"is_active\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32"
);

const headers = {
    "Authorization": "Bearer h6E8feaVc5134P6bZdkDavg",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "slug": "Example Slug",
    "description": "Example Description",
    "icon": "Example Icon",
    "color": "Example Color",
    "sort_order": 1,
    "is_active": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "daee5fb3-e6aa-34cc-ac9a-f8fecf92aa6f",
        "name": "Officia labore",
        "slug": "officia-labore-472777",
        "description": "Placeat quia non quos blanditiis.",
        "icon": null,
        "color": null,
        "sort_order": 0,
        "is_active": true,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

PUT api/admin/tutorial-modules/{tutorialModule}

Headers

Authorization        

Example: Bearer h6E8feaVc5134P6bZdkDavg

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

tutorialModule   string     

UUID do módulo Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

name   string  optional    

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

slug   string  optional    

Identificador. O campo value não pode ser superior a 255 caracteres. Example: Example Slug

description   string  optional    

Descrição. Example: Example Description

icon   string  optional    

Ícone. O campo value não pode ser superior a 64 caracteres. Example: Example Icon

color   string  optional    

Cor. Must match the regex /^#[0-9a-fA-F]{6}$/. Example: Example Color

sort_order   integer  optional    

Ordem. O campo value deve ser pelo menos 0. Example: 1

is_active   boolean  optional    

Ativo. Example: true

Remover módulo

requires authentication tutorials destroy

Remove o módulo e, junto, os tutoriais que pertenciam a ele

Example request:
curl --request DELETE \
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32" \
    --header "Authorization: Bearer eE3584caPbga6DV1hvfdZk6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32"
);

const headers = {
    "Authorization": "Bearer eE3584caPbga6DV1hvfdZk6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/admin/tutorial-modules/{tutorialModule}

Headers

Authorization        

Example: Bearer eE3584caPbga6DV1hvfdZk6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

tutorialModule   string     

UUID do módulo Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Listar tutoriais

requires authentication tutorials index

Lista os tutoriais em qualquer status, para quem administra

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/admin/tutorials?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=ordem+de+servi%C3%A7o&module_id[]=63e511d9-21d9-3a84-8742-fb13c4741d50&status=published" \
    --header "Authorization: Bearer aDecvfd18P6E6b3kha45VgZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials"
);

const params = {
    "sort_by": "created_at",
    "sort_desc": "1",
    "page": "1",
    "per_page": "15",
    "q": "ordem de serviço",
    "module_id[0]": "63e511d9-21d9-3a84-8742-fb13c4741d50",
    "status": "published",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer aDecvfd18P6E6b3kha45VgZ",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "b259d7f4-093c-3631-bf85-81b885f4df90",
            "title": "Ipsa quo aut at",
            "description": "Provident itaque tempora eaque et.",
            "cover_url": null,
            "status": "draft",
            "published_at": null,
            "sort_order": 0,
            "module": {
                "id": "a3296004-85c0-40a1-88b1-4e000e4b7d48",
                "name": "Enim quaerat",
                "slug": "enim-quaerat-142284",
                "icon": null,
                "color": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "c9cd92c0-7fd9-397e-b695-daa17779afa6",
            "title": "Inventore eum voluptatem cupiditate",
            "description": "Officiis consequatur soluta voluptatum quae nobis eos inventore.",
            "cover_url": null,
            "status": "draft",
            "published_at": null,
            "sort_order": 0,
            "module": {
                "id": "a3296004-8907-4691-87c9-a3335bafabeb",
                "name": "Architecto sit",
                "slug": "architecto-sit-755851",
                "icon": null,
                "color": null
            },
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/admin/tutorials

Headers

Authorization        

Example: Bearer aDecvfd18P6E6b3kha45VgZ

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Busca por título ou descrição. Example: ordem de serviço

module_id   string[]  optional    

O campo value deve ser um UUID válido. The uuid of an existing record in the tutorial_modules table.

sector_id   string[]  optional    
status   string  optional    

Filtra por status (draft ou published). Example: published

Must be one of:
  • draft
  • published

Cadastrar tutorial

requires authentication tutorials store

Cria um tutorial. Nasce como rascunho e só aparece na central depois de publicado.

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials" \
    --header "Authorization: Bearer aabDEdP3e5fv64Zhc1Vkg68" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"module_id\": \"68927f6c-9d06-3cf8-b096-aae1d26c36c1\",
    \"title\": \"Example Title\",
    \"description\": \"Example Description\",
    \"cover_path\": \"Example Cover path\",
    \"sort_order\": 1,
    \"sectors\": [
        \"65ce4ae8-f084-3278-8cea-ef5d17eca32d\"
    ],
    \"permissions\": [
        \"286f8488-38a1-31c4-b942-03a3ef2b7fe4\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials"
);

const headers = {
    "Authorization": "Bearer aabDEdP3e5fv64Zhc1Vkg68",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "module_id": "68927f6c-9d06-3cf8-b096-aae1d26c36c1",
    "title": "Example Title",
    "description": "Example Description",
    "cover_path": "Example Cover path",
    "sort_order": 1,
    "sectors": [
        "65ce4ae8-f084-3278-8cea-ef5d17eca32d"
    ],
    "permissions": [
        "286f8488-38a1-31c4-b942-03a3ef2b7fe4"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "data": {
        "id": "8d1913e9-214f-3c1a-ad51-c65781c18abe",
        "title": "Alias beatae officia minima",
        "description": "Quia sed harum quod esse.",
        "cover_url": null,
        "status": "draft",
        "published_at": null,
        "sort_order": 0,
        "module": {
            "id": "a3296004-93b1-4c9e-a907-f5f076386a02",
            "name": "Sed ex",
            "slug": "sed-ex-315598",
            "icon": null,
            "color": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/admin/tutorials

Headers

Authorization        

Example: Bearer aabDEdP3e5fv64Zhc1Vkg68

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

module_id   string     

Módulo. O campo value deve ser um UUID válido. The uuid of an existing record in the tutorial_modules table. Example: 68927f6c-9d06-3cf8-b096-aae1d26c36c1

title   string     

Título. O campo value não pode ser superior a 255 caracteres. Example: Example Title

description   string  optional    

Descrição. Example: Example Description

cover_path   string  optional    

Capa. Must start with one of tutorials/. Example: Example Cover path

sort_order   integer  optional    

Ordem. O campo value deve ser pelo menos 0. Example: 1

sectors   string[]  optional    

Setor. O campo value deve ser um UUID válido. The uuid of an existing record in the sectors table.

permissions   string[]  optional    

Permissão. The name of an existing record in the permissions table.

Gerar URL de upload

requires authentication tutorials store

Devolve uma URL assinada de curta validade para o cliente enviar o arquivo direto ao S3. O arquivo só é conferido depois, ao criar o item ou salvar a capa.

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials/upload-url" \
    --header "Authorization: Bearer 6dDeh1ag483aVkEcbP5vfZ6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"kind\": \"Example Kind\",
    \"filename\": \"Example Name\",
    \"extension\": \"Example Extension\",
    \"size_bytes\": 1
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials/upload-url"
);

const headers = {
    "Authorization": "Bearer 6dDeh1ag483aVkEcbP5vfZ6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "kind": "Example Kind",
    "filename": "Example Name",
    "extension": "Example Extension",
    "size_bytes": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "url": "string",
    "headers": "array",
    "path": "string",
    "expires_in": "integer"
}
 

Request      

POST api/admin/tutorials/upload-url

Headers

Authorization        

Example: Bearer 6dDeh1ag483aVkEcbP5vfZ6

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

kind   string     

Tipo de arquivo. Example: Example Kind

Must be one of:
  • pdf
  • video
  • cover
filename   string     

Nome do arquivo. O campo value não pode ser superior a 255 caracteres. Example: Example Name

extension   string     

Extensão do arquivo. Example: Example Extension

Must be one of:
size_bytes   integer     

Tamanho do arquivo. O campo value deve ser pelo menos 1. O campo value não pode ser superior a 0. Example: 1

Visualizar tutorial

requires authentication tutorials index

Detalhe do tutorial com vínculos e itens

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1" \
    --header "Authorization: Bearer f36ekEagD45Va81vZ6Phbdc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1"
);

const headers = {
    "Authorization": "Bearer f36ekEagD45Va81vZ6Phbdc",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "e4665f00-9aba-3a5b-8384-60893d7836a2",
        "title": "Occaecati molestias dolor minus",
        "description": "Quidem a nihil nostrum quis.",
        "cover_url": null,
        "status": "draft",
        "published_at": null,
        "sort_order": 0,
        "module": {
            "id": "a3296004-a03c-4eb4-921a-bc253f3e9499",
            "name": "Repudiandae et",
            "slug": "repudiandae-et-46682",
            "icon": null,
            "color": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/admin/tutorials/{id}

Headers

Authorization        

Example: Bearer f36ekEagD45Va81vZ6Phbdc

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the tutorial. Example: 1

tutorial   string     

UUID do tutorial Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Atualizar tutorial

requires authentication tutorials update

Atualiza o tutorial e os vínculos de setor e permissão

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1" \
    --header "Authorization: Bearer ZV5PEk8fa4edac36v6gbhD1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"module_id\": \"f735e997-1014-3a1a-8de7-7631ae228255\",
    \"title\": \"Example Title\",
    \"description\": \"Example Description\",
    \"cover_path\": \"Example Cover path\",
    \"sort_order\": 1,
    \"sectors\": [
        \"9e4e8227-0f65-36ae-82e0-ea791834b0e8\"
    ],
    \"permissions\": [
        \"e315efbc-b095-3736-be4b-4080eb810d7a\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1"
);

const headers = {
    "Authorization": "Bearer ZV5PEk8fa4edac36v6gbhD1",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "module_id": "f735e997-1014-3a1a-8de7-7631ae228255",
    "title": "Example Title",
    "description": "Example Description",
    "cover_path": "Example Cover path",
    "sort_order": 1,
    "sectors": [
        "9e4e8227-0f65-36ae-82e0-ea791834b0e8"
    ],
    "permissions": [
        "e315efbc-b095-3736-be4b-4080eb810d7a"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "f0497049-1a10-3318-933a-3fb971738e66",
        "title": "Eius et quo aut",
        "description": "Perferendis commodi tempora magnam rerum.",
        "cover_url": null,
        "status": "draft",
        "published_at": null,
        "sort_order": 0,
        "module": {
            "id": "a3296004-aaa1-461f-8592-a98f27ff2f8d",
            "name": "Qui sed",
            "slug": "qui-sed-726873",
            "icon": null,
            "color": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

PUT api/admin/tutorials/{id}

Headers

Authorization        

Example: Bearer ZV5PEk8fa4edac36v6gbhD1

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the tutorial. Example: 1

tutorial   string     

UUID do tutorial Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

module_id   string  optional    

Módulo. O campo value deve ser um UUID válido. The uuid of an existing record in the tutorial_modules table. Example: f735e997-1014-3a1a-8de7-7631ae228255

title   string  optional    

Título. O campo value não pode ser superior a 255 caracteres. Example: Example Title

description   string  optional    

Descrição. Example: Example Description

cover_path   string  optional    

Capa. Must start with one of tutorials/. Example: Example Cover path

sort_order   integer  optional    

Ordem. O campo value deve ser pelo menos 0. Example: 1

sectors   string[]  optional    

Setor. O campo value deve ser um UUID válido. The uuid of an existing record in the sectors table.

permissions   string[]  optional    

Permissão. The name of an existing record in the permissions table.

Remover tutorial

requires authentication tutorials destroy

Remove o tutorial, os itens e os arquivos correspondentes no S3

Example request:
curl --request DELETE \
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1" \
    --header "Authorization: Bearer PZkbv316c6eEDV5h8a4agdf" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1"
);

const headers = {
    "Authorization": "Bearer PZkbv316c6eEDV5h8a4agdf",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/admin/tutorials/{id}

Headers

Authorization        

Example: Bearer PZkbv316c6eEDV5h8a4agdf

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the tutorial. Example: 1

tutorial   string     

UUID do tutorial Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Publicar tutorial

requires authentication tutorials update

Publica o tutorial e carimba a data de publicação

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials/019556e7-2e9f-777c-a177-30bbf0646c32/publish" \
    --header "Authorization: Bearer ec6VZa5f81a6h4g3vPkEbDd" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials/019556e7-2e9f-777c-a177-30bbf0646c32/publish"
);

const headers = {
    "Authorization": "Bearer ec6VZa5f81a6h4g3vPkEbDd",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "4b875982-94f1-32c3-b123-980814619e83",
        "title": "Magni repellendus mollitia sit",
        "description": "Architecto vel animi id aliquam.",
        "cover_url": null,
        "status": "draft",
        "published_at": null,
        "sort_order": 0,
        "module": {
            "id": "a3296004-b335-4ed9-9931-310582d1381c",
            "name": "Laboriosam nesciunt",
            "slug": "laboriosam-nesciunt-463811",
            "icon": null,
            "color": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/admin/tutorials/{tutorial}/publish

Headers

Authorization        

Example: Bearer ec6VZa5f81a6h4g3vPkEbDd

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

tutorial   string     

UUID do tutorial Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Despublicar tutorial

requires authentication tutorials update

Devolve o tutorial ao rascunho e limpa a data de publicação

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials/019556e7-2e9f-777c-a177-30bbf0646c32/unpublish" \
    --header "Authorization: Bearer kbhDaZg8da34PfV1c6Ev6e5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials/019556e7-2e9f-777c-a177-30bbf0646c32/unpublish"
);

const headers = {
    "Authorization": "Bearer kbhDaZg8da34PfV1c6Ev6e5",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "5e8bfaa3-c410-390c-b841-d7d35d214d2f",
        "title": "Vitae repudiandae dolor nam",
        "description": "Voluptatem asperiores ut facere illo in enim dolore.",
        "cover_url": null,
        "status": "draft",
        "published_at": null,
        "sort_order": 0,
        "module": {
            "id": "a3296004-b8a9-4612-828a-1544057858cb",
            "name": "Perferendis labore",
            "slug": "perferendis-labore-406526",
            "icon": null,
            "color": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/admin/tutorials/{tutorial}/unpublish

Headers

Authorization        

Example: Bearer kbhDaZg8da34PfV1c6Ev6e5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

tutorial   string     

UUID do tutorial Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Adicionar item ao tutorial

requires authentication tutorials store

Cria o item a partir de um arquivo já enviado ao S3 (pdf ou video) ou de um link do YouTube/Vimeo. O arquivo é conferido aqui: existência, tamanho real e assinatura do conteúdo.

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1/items" \
    --header "Authorization: Bearer P4akZ16h56aVDgefEd3v8cb" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"Example Type\",
    \"title\": \"Example Title\",
    \"file_path\": \"Example File path\",
    \"external_url\": \"https:\\/\\/example.com\",
    \"duration_seconds\": 1,
    \"sort_order\": 1
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1/items"
);

const headers = {
    "Authorization": "Bearer P4akZ16h56aVDgefEd3v8cb",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "Example Type",
    "title": "Example Title",
    "file_path": "Example File path",
    "external_url": "https:\/\/example.com",
    "duration_seconds": 1,
    "sort_order": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "data": {
        "id": "5307ded9-e723-3604-836c-2e4bd7909f37",
        "type": "pdf",
        "title": "Sint ipsa tempora",
        "mime_type": "application/pdf",
        "size_bytes": 1428861,
        "duration_seconds": null,
        "sort_order": 0,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/admin/tutorials/{tutorial_id}/items

Headers

Authorization        

Example: Bearer P4akZ16h56aVDgefEd3v8cb

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

tutorial_id   integer     

The ID of the tutorial. Example: 1

tutorial   string     

UUID do tutorial Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

type   string     

Tipo. Example: Example Type

Must be one of:
  • pdf
  • video
  • link
title   string     

Título. O campo value não pode ser superior a 255 caracteres. Example: Example Title

file_path   string     

Caminho do arquivo. Must start with one of tutorials/. Example: Example File path

external_url   string  optional    

Link externo. Example: https://example.com

duration_seconds   integer  optional    

Duração em segundos. O campo value deve ser pelo menos 0. Example: 1

sort_order   integer  optional    

Ordem. O campo value deve ser pelo menos 0. Example: 1

Reordenar itens

requires authentication tutorials update

Grava a ordem dos itens conforme a sequência de UUIDs enviada

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials/019556e7-2e9f-777c-a177-30bbf0646c32/items/reorder" \
    --header "Authorization: Bearer aD3VhePd685kZvg6cEb14af" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        \"a24f3e13-aff3-3096-a51c-0d8f774e81d7\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials/019556e7-2e9f-777c-a177-30bbf0646c32/items/reorder"
);

const headers = {
    "Authorization": "Bearer aD3VhePd685kZvg6cEb14af",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "items": [
        "a24f3e13-aff3-3096-a51c-0d8f774e81d7"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "Itens reordenados com sucesso"
}
 

Request      

PUT api/admin/tutorials/{tutorial}/items/reorder

Headers

Authorization        

Example: Bearer aD3VhePd685kZvg6cEb14af

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

tutorial   string     

UUID do tutorial Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

items   string[]     

Item. O campo value deve ser um UUID válido. The uuid of an existing record in the tutorial_items table.

Atualizar item

requires authentication tutorials update

Atualiza o item. O tipo não muda depois de criado.

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-items/019556e7-2e9f-777c-a177-30bbf0646c32" \
    --header "Authorization: Bearer 3Ved6Eha4Z58D1Pgvakcb6f" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Example Title\",
    \"file_path\": \"Example File path\",
    \"external_url\": \"https:\\/\\/example.com\",
    \"duration_seconds\": 1,
    \"sort_order\": 1
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-items/019556e7-2e9f-777c-a177-30bbf0646c32"
);

const headers = {
    "Authorization": "Bearer 3Ved6Eha4Z58D1Pgvakcb6f",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Example Title",
    "file_path": "Example File path",
    "external_url": "https:\/\/example.com",
    "duration_seconds": 1,
    "sort_order": 1
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "0c93cee4-1dbb-3f5b-b3a4-1118316360a3",
        "type": "pdf",
        "title": "Et aut dolor",
        "mime_type": "application/pdf",
        "size_bytes": 1427481,
        "duration_seconds": null,
        "sort_order": 0,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

PUT api/admin/tutorial-items/{tutorialItem}

Headers

Authorization        

Example: Bearer 3Ved6Eha4Z58D1Pgvakcb6f

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

tutorialItem   string     

UUID do item Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

title   string  optional    

Título. O campo value não pode ser superior a 255 caracteres. Example: Example Title

file_path   string  optional    

Caminho do arquivo. Must start with one of tutorials/. Example: Example File path

external_url   string  optional    

Link externo. O campo value não pode ser superior a 2048 caracteres. Example: https://example.com

duration_seconds   integer  optional    

Duração em segundos. O campo value deve ser pelo menos 0. Example: 1

sort_order   integer  optional    

Ordem. O campo value deve ser pelo menos 0. Example: 1

Remover item

requires authentication tutorials destroy

Remove o item e apaga o arquivo correspondente no S3

Example request:
curl --request DELETE \
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-items/019556e7-2e9f-777c-a177-30bbf0646c32" \
    --header "Authorization: Bearer Pag8vDebhZ5fda6cVk316E4" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-items/019556e7-2e9f-777c-a177-30bbf0646c32"
);

const headers = {
    "Authorization": "Bearer Pag8vDebhZ5fda6cVk316E4",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/admin/tutorial-items/{tutorialItem}

Headers

Authorization        

Example: Bearer Pag8vDebhZ5fda6cVk316E4

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

tutorialItem   string     

UUID do item Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 baa638Dvhfge5k6d1cZ4VPE" \
    --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 baa638Dvhfge5k6d1cZ4VPE",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "24f20448-dacd-3dc8-8cc0-69bf28024ea5",
            "name": "Santiago Anderson Cervantes",
            "abbreviation": "Catarina Mary de Oliveira",
            "description": "Quia iure quia vel.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "a15dfc00-8261-3488-9f94-9db8508fdf84",
            "name": "Srta. Mirella Salas Barreto Filho",
            "abbreviation": "Sr. Luiz Saito Carrara Neto",
            "description": "Quos est sit vitae est vitae.",
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/units

Headers

Authorization        

Example: Bearer baa638Dvhfge5k6d1cZ4VPE

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

q   string  optional    

Example: Structure

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 Vg1hDeb5fEcaa64vP368Zkd" \
    --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 Vg1hDeb5fEcaa64vP368Zkd",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "86534254-025c-39a6-8dee-f4b8e700faf4",
        "name": "Mônica Godói",
        "abbreviation": "Marcelo Flores Marinho",
        "description": "Illo qui numquam rerum atque.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/units/{id}

Headers

Authorization        

Example: Bearer Vg1hDeb5fEcaa64vP368Zkd

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the unit. Example: 1

unit   string     

Unit UUID Example: aliquid

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 k1dV4Egbe56h3aZv8facDP6" \
    --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 k1dV4Egbe56h3aZv8facDP6",
    "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"
}
 

Request      

POST api/units

Headers

Authorization        

Example: Bearer k1dV4Egbe56h3aZv8facDP6

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome da unidade. Example: Example Name

abbreviation   string     

Abreviação. Example: Example Abbreviation

description   string  optional    

Descrição. Example: Example Description

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 bcPh54kZ6E1f8dev3aV6aDg" \
    --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 bcPh54kZ6E1f8dev3aV6aDg",
    "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"
}
 

Request      

PUT api/units/{id}

Headers

Authorization        

Example: Bearer bcPh54kZ6E1f8dev3aV6aDg

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the unit. Example: 1

unit   string     

Unit UUID Example: molestias

Body Parameters

name   string     

Nome da unidade. Example: Example Name

abbreviation   string     

Abreviação. Example: Example Abbreviation

description   string  optional    

Descrição. Example: Example Description

Delete unit

requires authentication unit delete

Delete a unit

Example request:
curl --request DELETE \
    "https://api.bs-homolog.pensou.app.br/api/units/aliquid" \
    --header "Authorization: Bearer Z1VfgE56684bcevkaDa3Phd" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/units/aliquid"
);

const headers = {
    "Authorization": "Bearer Z1VfgE56684bcevkaDa3Phd",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/units/{unit}

Headers

Authorization        

Example: Bearer Z1VfgE56684bcevkaDa3Phd

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

unit   string     

Unit UUID Example: aliquid

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&sector_id=123e4567-e89b-12d3-a456-426614174000&role=ADMIN" \
    --header "Authorization: Bearer c3ba1dgDZ4vf8hV65EakPe6" \
    --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 c3ba1dgDZ4vf8hV65EakPe6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "c702d822-14ea-3b01-8846-e6d0f273c059",
            "name": "Freida Steuber",
            "username": "bell36",
            "email": "christa86@example.com",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "6d4cf3d0-b2e8-33a5-b3e0-4e638a1c43c1",
            "name": "Lesly Kiehn",
            "username": "matilda32",
            "email": "mosciski.tressa@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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/users

Headers

Authorization        

Example: Bearer c3ba1dgDZ4vf8hV65EakPe6

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Search query by name or email. Example: John Doe

sector_id   string  optional    

Filter by sector UUID. The uuid of an existing record in the sectors table. Example: 123e4567-e89b-12d3-a456-426614174000

role   string  optional    

Filter by role name. The name of an existing record in the roles table. Example: ADMIN

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 hdk6g5Ea8e36P1aV4bfcDZv" \
    --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 hdk6g5Ea8e36P1aV4bfcDZv",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "c11981bb-164b-3f42-980a-0a52ec94e497",
        "name": "Brady Bernhard",
        "username": "flakin",
        "email": "stracke.sally@example.org",
        "certification": null,
        "crea": null,
        "last_login_at": null,
        "image": {
            "id": null,
            "url": null
        },
        "sectors": [],
        "roles": []
    }
}
 

Request      

GET api/users/{id}

Headers

Authorization        

Example: Bearer hdk6g5Ea8e36P1aV4bfcDZv

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the user. Example: 1

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 f36dE8kDPaabvcV4h1e5gZ6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"certification\": \"Example Certification\",
    \"crea\": \"Example Crea\",
    \"email\": \"user@example.com\",
    \"username\": \"grover.rohan\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"6e0e70b0-e568-3433-8116-61ba873844d8\"
    ],
    \"roles\": [
        \"689c7c5c-8a97-3e1d-9cc4-1cf3323a8c08\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users"
);

const headers = {
    "Authorization": "Bearer f36dE8kDPaabvcV4h1e5gZ6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "certification": "Example Certification",
    "crea": "Example Crea",
    "email": "user@example.com",
    "username": "grover.rohan",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "6e0e70b0-e568-3433-8116-61ba873844d8"
    ],
    "roles": [
        "689c7c5c-8a97-3e1d-9cc4-1cf3323a8c08"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "message": "string"
}
 

Request      

POST api/users

Headers

Authorization        

Example: Bearer f36dE8kDPaabvcV4h1e5gZ6

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. Example: Example Name

certification   string  optional    

Certificação. O campo value não pode ser superior a 255 caracteres. Example: Example Certification

crea   string  optional    

CREA. O campo value não pode ser superior a 255 caracteres. Example: Example Crea

email   string     

E-mail. O campo value deve ser um endereço de e-mail válido. Example: user@example.com

username   string     

Usuário. Example: grover.rohan

image   object  optional    

Imagem.

path   string  optional    

Caminho da imagem. This field is required when image is present. Example: Example Image path

name   string  optional    

Nome da imagem. Example: Example Name

extension   string  optional    

Extensão da imagem. Example: Example Image extension

size   string  optional    

Tamanho da imagem. Example: Example Image size

sectors   string[]  optional    

UUID do setor. The uuid of an existing record in the sectors table.

roles   string[]  optional    

UUID da função. The uuid of an existing record in the roles table.

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 v3kZfa61cg4PeDh86adbV5E" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"certification\": \"Example Certification\",
    \"crea\": \"Example Crea\",
    \"email\": \"user@example.com\",
    \"username\": \"jmosciski\",
    \"password\": \"password123\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"eccb1387-7cae-309d-9c37-fcddf92f2b8e\"
    ],
    \"roles\": [
        \"a20c2f16-e2b7-36c8-9917-7dd9442dc181\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users/1"
);

const headers = {
    "Authorization": "Bearer v3kZfa61cg4PeDh86adbV5E",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "certification": "Example Certification",
    "crea": "Example Crea",
    "email": "user@example.com",
    "username": "jmosciski",
    "password": "password123",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "eccb1387-7cae-309d-9c37-fcddf92f2b8e"
    ],
    "roles": [
        "a20c2f16-e2b7-36c8-9917-7dd9442dc181"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "string"
}
 

Request      

PUT api/users/{id}

Headers

Authorization        

Example: Bearer v3kZfa61cg4PeDh86adbV5E

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the user. Example: 1

Body Parameters

name   string  optional    

Nome. Example: Example Name

certification   string  optional    

Certificação. O campo value não pode ser superior a 255 caracteres. Example: Example Certification

crea   string  optional    

CREA. O campo value não pode ser superior a 255 caracteres. Example: Example Crea

email   string  optional    

E-mail. O campo value deve ser um endereço de e-mail válido. Example: user@example.com

username   string  optional    

Usuário. Example: jmosciski

password   string  optional    

Password. Example: password123

image   object  optional    

Imagem.

path   string  optional    

Caminho da imagem. This field is required when image is present. Example: Example Image path

name   string  optional    

Nome da imagem. Example: Example Name

extension   string  optional    

Extensão da imagem. Example: Example Image extension

size   string  optional    

Tamanho da imagem. Example: Example Image size

sectors   string[]  optional    

UUID do setor. The uuid of an existing record in the sectors table.

roles   string[]  optional    

UUID da função. The uuid of an existing record in the roles table.

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 eD3ckv8gbZh4Ea6PV5adf16" \
    --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 eD3ckv8gbZh4Ea6PV5adf16",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "string"
}
 

Request      

DELETE api/users/{user}

Headers

Authorization        

Example: Bearer eD3ckv8gbZh4Ea6PV5adf16

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

user   integer     

The user. Example: 1

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 645dEVPD3ga8b6cf1vhaZke" \
    --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 645dEVPD3ga8b6cf1vhaZke",
    "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"
}
 

Request      

PUT api/users/{user}/password-reset

Headers

Authorization        

Example: Bearer 645dEVPD3ga8b6cf1vhaZke

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

user   string     

User ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 3v584f61DPebEgVchda6kZa" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [
        \"cbac120b-225b-3f9d-87dc-52d1f45305d6\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users/1/permissions"
);

const headers = {
    "Authorization": "Bearer 3v584f61DPebEgVchda6kZa",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "permissions": [
        "cbac120b-225b-3f9d-87dc-52d1f45305d6"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "Permissions attached successfully"
}
 

Request      

PUT api/users/{user}/permissions

Headers

Authorization        

Example: Bearer 3v584f61DPebEgVchda6kZa

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

user   integer     

The user. Example: 1

Body Parameters

permissions   string[]  optional    

UUID da permissão. The uuid of an existing record in the permissions table.

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 D65h1Zvgda63ck8Pa4fVeEb" \
    --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 D65h1Zvgda63ck8Pa4fVeEb",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "ad",
            "display_name": "Doloribus eligendi et ad cum consequatur."
        },
        {
            "id": null,
            "name": "laboriosam",
            "display_name": "Enim sunt et quae provident culpa."
        }
    ]
}
 

Request      

GET api/users/{user}/permissions

Headers

Authorization        

Example: Bearer D65h1Zvgda63ck8Pa4fVeEb

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

user   integer     

The user. Example: 1

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 861cvdDb3PkheafVa64gZ5E" \
    --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 861cvdDb3PkheafVa64gZ5E",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "0996bad9-ed9f-3530-8895-26f8e82a2df2",
            "description": "Sr. Alexandre da Cruz",
            "work": {
                "id": null,
                "name": null
            },
            "documents": [],
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "83f7ebf2-c956-325a-a812-f8477144681d",
            "description": "Cristian Santiago Filho",
            "work": {
                "id": null,
                "name": null
            },
            "documents": [],
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/work-locations

Headers

Authorization        

Example: Bearer 861cvdDb3PkheafVa64gZ5E

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Search query. Example: Tecnologia

work   string  optional    

Work. The uuid of an existing record in the works table. Example: uuid

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 3h8eabfPEg6kadV4cDZ615v" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Example Description\",
    \"work_id\": \"c2956f09-ad3f-3832-a3d7-95497b42de42\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/work-locations"
);

const headers = {
    "Authorization": "Bearer 3h8eabfPEg6kadV4cDZ615v",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "description": "Example Description",
    "work_id": "c2956f09-ad3f-3832-a3d7-95497b42de42"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "message": "string"
}
 

Request      

POST api/work-locations

Headers

Authorization        

Example: Bearer 3h8eabfPEg6kadV4cDZ615v

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

description   string     

Descrição. O campo value não pode ser superior a 255 caracteres. Example: Example Description

work_id   string     

Obra. The uuid of an existing record in the works table. Example: c2956f09-ad3f-3832-a3d7-95497b42de42

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 cg3PvZEdf5Va4beh6aDk618" \
    --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 cg3PvZEdf5Va4beh6aDk618",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "28e3bdc5-cc4c-38e3-a2d5-e833d0ac3a55",
        "description": "Matheus Saito Sobrinho",
        "work": {
            "id": null,
            "name": null
        },
        "documents": [],
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/work-locations/{workLocation}

Headers

Authorization        

Example: Bearer cg3PvZEdf5Va4beh6aDk618

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

workLocation   string     

Work Location ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 d3D5b6v418fk6ZPhecVaagE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Example Description\",
    \"work_id\": \"acffd96a-2634-38fd-b495-0cc2063cceb5\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/work-locations/019556e7-2e9f-777c-a177-30bbf0646c32"
);

const headers = {
    "Authorization": "Bearer d3D5b6v418fk6ZPhecVaagE",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "description": "Example Description",
    "work_id": "acffd96a-2634-38fd-b495-0cc2063cceb5"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "string"
}
 

Request      

PUT api/work-locations/{workLocation}

Headers

Authorization        

Example: Bearer d3D5b6v418fk6ZPhecVaagE

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

workLocation   string     

Work ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

description   string  optional    

Descrição. O campo value não pode ser superior a 255 caracteres. Example: Example Description

work_id   string  optional    

Obra. The uuid of an existing record in the works table. Example: acffd96a-2634-38fd-b495-0cc2063cceb5

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 DdEa3f6651agbPke48VhZcv" \
    --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 DdEa3f6651agbPke48VhZcv",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/work-locations/{workLocation}

Headers

Authorization        

Example: Bearer DdEa3f6651agbPke48VhZcv

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

workLocation   string     

Work ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 d13k6Pgafbac86hV4D5veEZ" \
    --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 d13k6Pgafbac86hV4D5veEZ",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "1f7c5d5a-8e1b-3fce-a97f-c8c7e04a90c9",
            "name": "Téo Heitor Duarte Jr.",
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "documents": [],
            "locations": [],
            "product_quantity_lists_count": 0,
            "product_quantity_list_items_count": 0,
            "product_requests_count": 0,
            "product_request_items_count": 0,
            "documents_count": 0,
            "locations_documents_count": 0,
            "total_documents_count": 0,
            "daily_logs_count": 0,
            "projects_count": 0,
            "started_at": {
                "date": "1981-04-10 09:11:33.000000",
                "timezone_type": 3,
                "timezone": "America/Sao_Paulo"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "6a56c7d4-4d3c-3ca5-9f09-0da492468639",
            "name": "Srta. Dayana Maia Neto",
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "documents": [],
            "locations": [],
            "product_quantity_lists_count": 0,
            "product_quantity_list_items_count": 0,
            "product_requests_count": 0,
            "product_request_items_count": 0,
            "documents_count": 0,
            "locations_documents_count": 0,
            "total_documents_count": 0,
            "daily_logs_count": 0,
            "projects_count": 0,
            "started_at": {
                "date": "2025-06-11 19:32:21.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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/works

Headers

Authorization        

Example: Bearer d13k6Pgafbac86hV4D5veEZ

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Search query. Example: Tecnologia

customer_id   string  optional    

Filter by customer UUID. The uuid of an existing record in the customers table. Example: 019556e7-2e9f-777c-a177-30bbf0646c32

status_id   string  optional    

Filter by status UUID. The uuid of an existing record in the statuses table. Example: 019556e7-2e9f-777c-a177-30bbf0646c32

responsible_id   string  optional    

Filter by responsible user UUID. Only works if user has "work view-all" permission. The uuid of an existing record in the users table. Example: 019556e7-2e9f-777c-a177-30bbf0646c32

no_responsible   boolean  optional    

Filter works without any responsible users. Example: true

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 v4VhEkdPZf6ae85Dc1agb36" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"customer_id\": \"26670cca-25d8-323d-a1f6-42fbde27e357\",
    \"status_id\": \"95579e39-83a2-32bf-8b28-c9a065501dc3\",
    \"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 v4VhEkdPZf6ae85Dc1agb36",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "customer_id": "26670cca-25d8-323d-a1f6-42fbde27e357",
    "status_id": "95579e39-83a2-32bf-8b28-c9a065501dc3",
    "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"
}
 

Request      

POST api/works

Headers

Authorization        

Example: Bearer v4VhEkdPZf6ae85Dc1agb36

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

customer_id   string     

Cliente. The uuid of an existing record in the customers table. Example: 26670cca-25d8-323d-a1f6-42fbde27e357

status_id   string     

Status id. The uuid of an existing record in the statuses table. Example: 95579e39-83a2-32bf-8b28-c9a065501dc3

started_at   string  optional    

Início da obra. O campo value deve ser uma data válida. Example: Example Started at

address   object     

Endereço.

street   string     

Rua. Example: Example Address street

number   string     

Número. Example: Example Address number

complement   string  optional    

Complemento. Example: Example Address complement

neighborhood   string     

Bairro. Example: Example Address neighborhood

city   string     

Cidade. Example: Example Address city

state   string     

Estado. Example: Example Address state

zip_code   string     

CEP. Example: Example Address zip code

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 h45fVk3a1DaEgdZ86evb6Pc" \
    --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 h45fVk3a1DaEgdZ86evb6Pc",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": "aa309841-bbae-30a6-b69d-10867b1c2c37",
        "name": "Giovana Azevedo Jr.",
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        },
        "documents": [],
        "locations": [],
        "product_quantity_lists_count": 0,
        "product_quantity_list_items_count": 0,
        "product_requests_count": 0,
        "product_request_items_count": 0,
        "documents_count": 0,
        "locations_documents_count": 0,
        "total_documents_count": 0,
        "daily_logs_count": 0,
        "projects_count": 0,
        "started_at": {
            "date": "1998-06-27 13:06:40.000000",
            "timezone_type": 3,
            "timezone": "America/Sao_Paulo"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/works/{id}

Headers

Authorization        

Example: Bearer h45fVk3a1DaEgdZ86evb6Pc

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the work. Example: 1

work   string     

Work ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 63gP6ck1ZhvfaVEDbade485" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"customer_id\": \"1258a364-7da7-30b9-bc36-f9fe5528c63e\",
    \"status_id\": \"e574ab7f-72cd-3144-b348-d81a347b792f\",
    \"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 63gP6ck1ZhvfaVEDbade485",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "customer_id": "1258a364-7da7-30b9-bc36-f9fe5528c63e",
    "status_id": "e574ab7f-72cd-3144-b348-d81a347b792f",
    "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"
}
 

Request      

PUT api/works/{id}

Headers

Authorization        

Example: Bearer 63gP6ck1ZhvfaVEDbade485

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the work. Example: 1

work   string     

Work ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

name   string  optional    

Nome. O campo value não pode ser superior a 255 caracteres. Example: Example Name

customer_id   string  optional    

Cliente. The uuid of an existing record in the customers table. Example: 1258a364-7da7-30b9-bc36-f9fe5528c63e

status_id   string  optional    

Status id. The uuid of an existing record in the statuses table. Example: e574ab7f-72cd-3144-b348-d81a347b792f

started_at   string  optional    

Início da obra. O campo value deve ser uma data válida. Example: Example Started at

address   object  optional    

Endereço.

street   string  optional    

Rua. Example: Example Address street

number   string  optional    

Número. Example: Example Address number

complement   string  optional    

Complemento. Example: Example Address complement

neighborhood   string  optional    

Bairro. Example: Example Address neighborhood

city   string  optional    

Cidade. Example: Example Address city

state   string  optional    

Estado. Example: Example Address state

zip_code   string  optional    

CEP. Example: Example Address zip code

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 k8aP4gbdhceaD6v1V53f6EZ" \
    --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 k8aP4gbdhceaD6v1V53f6EZ",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/works/{id}

Headers

Authorization        

Example: Bearer k8aP4gbdhceaD6v1V53f6EZ

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the work. Example: 1

work   string     

Work ID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

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 d6Pk45vZh3VbDaEaf8cge16" \
    --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 d6Pk45vZh3VbDaEaf8cge16",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "4f50409a-a376-38ef-8e0f-66857a004e1c",
            "name": "Sandrine Nienow",
            "username": "prosacco.kasandra",
            "email": "desiree.effertz@example.com",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "8015d7d5-63f1-3a62-9f58-de7fc3099565",
            "name": "Prof. Irwin Lakin Sr.",
            "username": "missouri46",
            "email": "owill@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": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/works/{work}/responsibles

Headers

Authorization        

Example: Bearer d6Pk45vZh3VbDaEaf8cge16

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

work   string     

Work UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

Sort order (true for descending, false for ascending). Example: true

page   integer  optional    

Page number for pagination. O campo value deve ser pelo menos 1. Example: 1

per_page   integer  optional    

Number of items per page (max: 100). O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 15

q   string  optional    

Search by name or email. Example: John

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 bak648VePg1E6Zcva35hdfD" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"c4494fb6-61bc-3ef6-8b35-f1361ef1d9d2\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach"
);

const headers = {
    "Authorization": "Bearer bak648VePg1E6Zcva35hdfD",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "users": [
        "c4494fb6-61bc-3ef6-8b35-f1361ef1d9d2"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "Responsibles attached successfully"
}
 

Request      

POST api/works/{work}/responsibles/attach

Headers

Authorization        

Example: Bearer bak648VePg1E6Zcva35hdfD

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

work   string     

Work UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

users   string[]  optional    

UUID do usuário. The uuid of an existing record in the users table.

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 D8hbgPvEka61dc4faVeZ365" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"7777ff91-891b-3235-aec6-8ee2313dcba4\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/detach"
);

const headers = {
    "Authorization": "Bearer D8hbgPvEka61dc4faVeZ365",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "users": [
        "7777ff91-891b-3235-aec6-8ee2313dcba4"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "Responsibles detached successfully"
}
 

Request      

POST api/works/{work}/responsibles/detach

Headers

Authorization        

Example: Bearer D8hbgPvEka61dc4faVeZ365

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

work   string     

Work UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

users   string[]  optional    

UUID do usuário. The uuid of an existing record in the users table.

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 kVgDh1PZfd3a8ec4v6Ea5b6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"491d0f94-3c6e-392f-95db-98c265a94917\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/sync"
);

const headers = {
    "Authorization": "Bearer kVgDh1PZfd3a8ec4v6Ea5b6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "users": [
        "491d0f94-3c6e-392f-95db-98c265a94917"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "Responsibles synchronized successfully"
}
 

Request      

POST api/works/{work}/responsibles/sync

Headers

Authorization        

Example: Bearer kVgDh1PZfd3a8ec4v6Ea5b6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

work   string     

Work UUID Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

users   string[]  optional    

UUID do usuário. The uuid of an existing record in the users table.