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


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

Example response (200):


{
    "data": [
        {
            "id": "89e1a61b-7d55-3a24-b221-10a761cb9ba6",
            "name": "sequi-6abcff6bea90d",
            "display_name": "Nihil harum et et et excepturi totam modi ad.",
            "permissions_count": null
        },
        {
            "id": "ac1ef5b5-7961-30e7-af5c-d3f541bfe89d",
            "name": "perspiciatis-6abcff6beda8a",
            "display_name": "Sed laboriosam occaecati at ipsa.",
            "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 54favcPea1dg83EZhVD6b6k

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 58v46d63aV1PkfebEachgDZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"display_name\": \"Example Name\",
    \"permissions\": [
        \"e5f492fe-7fa5-317d-b860-05ec04ca32d6\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/acl/roles"
);

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

let body = {
    "name": "Example Name",
    "display_name": "Example Name",
    "permissions": [
        "e5f492fe-7fa5-317d-b860-05ec04ca32d6"
    ]
};

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 58v46d63aV1PkfebEachgDZ

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 6841PbefZahVadkv3EDg56c" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"display_name\": \"Example Name\",
    \"permissions\": [
        \"8ce01f07-e6ee-3a0f-b3ae-79ea2f3cfbf6\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/acl/roles/1"
);

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

let body = {
    "name": "Example Name",
    "display_name": "Example Name",
    "permissions": [
        "8ce01f07-e6ee-3a0f-b3ae-79ea2f3cfbf6"
    ]
};

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 6841PbefZahVadkv3EDg56c

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


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

Example response (200):


{
    "data": {
        "id": "8996f51f-eac6-3a31-9f49-59ec54e79024",
        "name": "atque-6abcff6c0588a",
        "display_name": "Molestias dolorem eius fuga pariatur deserunt.",
        "permissions_count": null
    }
}
 

Request      

GET api/acl/roles/{id}

Headers

Authorization        

Example: Bearer ehDaPc368agE5fVd614vkZb

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "ea",
            "display_name": "Consectetur autem ut eligendi ut animi quo est."
        },
        {
            "id": null,
            "name": "voluptas",
            "display_name": "Sit est quia quaerat eaque."
        }
    ]
}
 

Request      

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

Headers

Authorization        

Example: Bearer bZDk64fd8V51c6agP3vahEe

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 bdcZk4aED61aP385vh6fVeg" \
    --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 bdcZk4aED61aP385vh6fVeg",
    "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 bdcZk4aED61aP385vh6fVeg

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "hic",
            "display_name": "Nulla error in aut nulla est quo veritatis hic."
        },
        {
            "id": null,
            "name": "repudiandae",
            "display_name": "Fugiat rem et magni veniam suscipit qui quas."
        }
    ],
    "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 a3gfVPD1acbv8Z6ed645kEh

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 Pg16aehDda6k8EV45vc3fbZ" \
    --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 Pg16aehDda6k8EV45vc3fbZ",
    "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 Pg16aehDda6k8EV45vc3fbZ

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 Vh1v3Daf56c6kP4gdZea8Eb" \
    --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 Vh1v3Daf56c6kP4gdZea8Eb",
    "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 Vh1v3Daf56c6kP4gdZea8Eb

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


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

Example response (200):


{
    "data": {
        "id": null,
        "name": "architecto",
        "display_name": "Animi eum culpa atque."
    }
}
 

Request      

GET api/acl/permissions/{id}

Headers

Authorization        

Example: Bearer DE665dak1ZacvV3fPbg8he4

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 ad8k456Zf13aDh6vebgcVEP" \
    --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 ad8k456Zf13aDh6vebgcVEP",
    "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 ad8k456Zf13aDh6vebgcVEP

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


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

Example response (200):


{
    "data": [
        {
            "id": "eef608ea-58e9-3223-a85f-d1c95b4f1733",
            "code": null,
            "type": "entrada",
            "payment_method": "cheque",
            "amount": 6516.21,
            "due_date": "2026-10-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": "Reiciendis fugit tenetur minus doloremque sed amet quas numquam laborum.",
            "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": "dolores",
            "field2": 30,
            "field3": false,
            "notes": "Occaecati et vero et in.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "6ba6463f-930f-3226-b5c6-fc905db79905",
            "code": null,
            "type": "entrada",
            "payment_method": "cheque",
            "amount": 8229.71,
            "due_date": "2026-10-28T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Autem quis consequatur aspernatur error velit 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": "qui",
            "field2": 17,
            "field3": true,
            "notes": "Amet qui inventore ratione quae laudantium.",
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/accounts-payable-receivable/reminders

Headers

Authorization        

Example: Bearer Pgfchk3eE6ad6Z154DVab8v

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

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

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 kEZ66a3aec8f41VgDdbv5Ph" \
    --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 kEZ66a3aec8f41VgDdbv5Ph",
    "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 kEZ66a3aec8f41VgDdbv5Ph

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[]=eum&suppliers[]=tenetur&works[]=sapiente&statuses[]=a+protestar&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-09-30T09%3A24%3A12&protest_date_end=2026-09-30T09%3A24%3A12&has_protest=1&has_children=1&is_recurring=1" \
    --header "Authorization: Bearer gh8D1vE34d66PVaabfkc5Ze" \
    --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]": "eum",
    "suppliers[0]": "tenetur",
    "works[0]": "sapiente",
    "statuses[0]": "a protestar",
    "payment_method": "cheque",
    "date_start": "2023-01-01",
    "date_end": "2023-12-31",
    "protest_date_start": "2026-09-30T09:24:12",
    "protest_date_end": "2026-09-30T09:24:12",
    "has_protest": "1",
    "has_children": "1",
    "is_recurring": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "ba2e101c-8785-38fe-8264-c9e746d5407b",
            "code": null,
            "type": "entrada",
            "payment_method": "cheque",
            "amount": 447.86,
            "due_date": "2026-10-26T03: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": "Quaerat tenetur error qui rem occaecati beatae est.",
            "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": "nihil",
            "field2": 41,
            "field3": true,
            "notes": "Dignissimos omnis nam facere ipsa beatae est.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "73ac0e13-891b-3d05-a39c-a965a533c317",
            "code": null,
            "type": "saída",
            "payment_method": "cheque",
            "amount": 2356.62,
            "due_date": "2026-10-22T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Nesciunt non accusamus ut reprehenderit autem magnam velit repellat qui quibusdam sunt quae beatae.",
            "is_recurring": null,
            "recurrence_config": null,
            "parent_id": null,
            "recurrence_order": 1,
            "total_recurrences": null,
            "children_count": 0,
            "remaining_recurrences": null,
            "has_children": false,
            "field1": "vel",
            "field2": 56,
            "field3": true,
            "notes": "Ea aspernatur perferendis aliquid.",
            "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 gh8D1vE34d66PVaabfkc5Ze

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.

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-09-30T09:24:12

protest_date_end   string  optional    

O campo value deve ser uma data válida. Example: 2026-09-30T09:24:12

has_protest   boolean  optional    

Example: true

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[]=temporibus&suppliers[]=a&works[]=in&statuses[]=recebido&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-09-30T09%3A24%3A12&protest_date_end=2026-09-30T09%3A24%3A12&has_protest=1&has_children=1&is_recurring=1" \
    --header "Authorization: Bearer a8eVE3451Zg6h6dvfacbDkP" \
    --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]": "temporibus",
    "suppliers[0]": "a",
    "works[0]": "in",
    "statuses[0]": "recebido",
    "payment_method": "cheque",
    "date_start": "2023-01-01",
    "date_end": "2023-12-31",
    "protest_date_start": "2026-09-30T09:24:12",
    "protest_date_end": "2026-09-30T09:24:12",
    "has_protest": "1",
    "has_children": "1",
    "is_recurring": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "0eec4881-a989-3f51-b6a4-369bc7907d83",
            "code": null,
            "type": "saída",
            "payment_method": "boleto",
            "amount": 5714.94,
            "due_date": "2026-10-07T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Odit vitae voluptas odio sit fugiat assumenda ipsa accusamus ad.",
            "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": "culpa",
            "field2": 75,
            "field3": true,
            "notes": "Quos amet dolor sequi officiis hic vitae.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "c03c76ed-4f48-39f1-8418-5e7ed58eca14",
            "code": null,
            "type": "entrada",
            "payment_method": "cheque",
            "amount": 9396.9,
            "due_date": "2026-10-19T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Corporis laborum repellat odio impedit quis est porro et consequatur voluptatem maxime.",
            "is_recurring": null,
            "recurrence_config": null,
            "parent_id": null,
            "recurrence_order": 1,
            "total_recurrences": null,
            "children_count": 0,
            "remaining_recurrences": null,
            "has_children": false,
            "field1": "mollitia",
            "field2": 35,
            "field3": true,
            "notes": "Ipsum rerum voluptatem repellat aut error.",
            "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 a8eVE3451Zg6h6dvfacbDkP

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.

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-09-30T09:24:12

protest_date_end   string  optional    

O campo value deve ser uma data válida. Example: 2026-09-30T09:24:12

has_protest   boolean  optional    

Example: true

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 1EVe8ckZ3dgf5PDva6ahb46" \
    --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\": \"66a0478c-b460-3963-b41c-6a9bd3fb5cae\",
    \"customer_id\": \"9c049a0c-833b-3fb4-89bf-41ce7736047a\",
    \"work_id\": \"0c453b7d-9440-38c7-bc3b-84f9fe5087c4\",
    \"status\": \"Example Status\",
    \"protest_date\": \"2024-01-01\",
    \"bank_account_id\": \"6824aca1-30c2-3994-b0e1-80d8e41052b3\",
    \"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 1EVe8ckZ3dgf5PDva6ahb46",
    "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": "66a0478c-b460-3963-b41c-6a9bd3fb5cae",
    "customer_id": "9c049a0c-833b-3fb4-89bf-41ce7736047a",
    "work_id": "0c453b7d-9440-38c7-bc3b-84f9fe5087c4",
    "status": "Example Status",
    "protest_date": "2024-01-01",
    "bank_account_id": "6824aca1-30c2-3994-b0e1-80d8e41052b3",
    "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 1EVe8ckZ3dgf5PDva6ahb46

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: 66a0478c-b460-3963-b41c-6a9bd3fb5cae

customer_id   string  optional    

Cliente. The uuid of an existing record in the customers table. Example: 9c049a0c-833b-3fb4-89bf-41ce7736047a

work_id   string  optional    

Obra. The uuid of an existing record in the works table. Example: 0c453b7d-9440-38c7-bc3b-84f9fe5087c4

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: 6824aca1-30c2-3994-b0e1-80d8e41052b3

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 E3cVZag1aef5v8khdP6bD46" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"fiscal_document_id\": \"ducimus\",
    \"installment_ids\": [
        \"quia\"
    ],
    \"payment_method\": \"cartao\",
    \"work_id\": \"velit\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/import-nfe"
);

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

let body = {
    "fiscal_document_id": "ducimus",
    "installment_ids": [
        "quia"
    ],
    "payment_method": "cartao",
    "work_id": "velit"
};

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 E3cVZag1aef5v8khdP6bD46

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: ducimus

installment_ids   string[]  optional    

The uuid of an existing record in the fiscal_document_installments table.

payment_method   string  optional    

Example: cartao

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: consectetur

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

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


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

Example response (200):


{
    "data": {
        "id": "39cbcfd7-9a93-3be2-baa2-bab8e1b35cb0",
        "code": null,
        "type": "entrada",
        "payment_method": "cheque",
        "amount": 9081.54,
        "due_date": "2026-10-12T03:00:00.000000Z",
        "status": null,
        "payment_date": null,
        "protest_date": null,
        "paid_amount": null,
        "interest_amount": null,
        "penalty_amount": null,
        "notary_fee_amount": null,
        "description": "Aspernatur hic dignissimos doloribus aut saepe aut maxime.",
        "is_recurring": null,
        "recurrence_config": null,
        "parent_id": null,
        "recurrence_order": 1,
        "total_recurrences": null,
        "children_count": 0,
        "remaining_recurrences": null,
        "has_children": false,
        "field1": "qui",
        "field2": 6,
        "field3": false,
        "notes": "Nihil aut quasi officiis facilis dicta sint eos.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer 4gVef8dDEabhZaPc6kv3615

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: ut

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/amet" \
    --header "Authorization: Bearer v6EgVDbaP4aZc51hd36fke8" \
    --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\": \"fec2aac3-4cc5-3a92-91e4-4f4980f462c6\",
    \"customer_id\": \"7e6cfe05-6bea-3440-8afb-22e8ca326fd1\",
    \"work_id\": \"81ba58c2-d255-33c4-8132-2880d4a865a9\",
    \"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\": \"a85dc4ad-bd3c-375f-bebb-f45ca8274601\",
    \"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/amet"
);

const headers = {
    "Authorization": "Bearer v6EgVDbaP4aZc51hd36fke8",
    "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": "fec2aac3-4cc5-3a92-91e4-4f4980f462c6",
    "customer_id": "7e6cfe05-6bea-3440-8afb-22e8ca326fd1",
    "work_id": "81ba58c2-d255-33c4-8132-2880d4a865a9",
    "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": "a85dc4ad-bd3c-375f-bebb-f45ca8274601",
    "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 v6EgVDbaP4aZc51hd36fke8

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: amet

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: fec2aac3-4cc5-3a92-91e4-4f4980f462c6

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: 7e6cfe05-6bea-3440-8afb-22e8ca326fd1

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: 81ba58c2-d255-33c4-8132-2880d4a865a9

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: a85dc4ad-bd3c-375f-bebb-f45ca8274601

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: consequuntur

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

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

let body = {
    "email": "trisha.wisozk@example.com",
    "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: trisha.wisozk@example.com

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


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

Example response (200):


{
    "data": {
        "id": "e1f19c7b-4ecb-3f62-b053-0a7201b1de15",
        "name": "Orion Mueller V",
        "username": "jaleel.senger",
        "email": "onie80@example.org",
        "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 kdhVEf5a6gZ16D4bPv8c3ea

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 v1beaakV8dPfZED6435gh6c" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"certification\": \"Example Certification\",
    \"crea\": \"Example Crea\",
    \"email\": \"user@example.com\",
    \"username\": \"vbuckridge\",
    \"password\": \"password123\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"1716ffd2-3458-3fd7-ae8d-345c148f6c20\"
    ],
    \"roles\": [
        \"1a9c245e-4755-3b0e-b1a4-223056184ab9\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/auth/user"
);

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

let body = {
    "name": "Example Name",
    "certification": "Example Certification",
    "crea": "Example Crea",
    "email": "user@example.com",
    "username": "vbuckridge",
    "password": "password123",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "1716ffd2-3458-3fd7-ae8d-345c148f6c20"
    ],
    "roles": [
        "1a9c245e-4755-3b0e-b1a4-223056184ab9"
    ]
};

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 v1beaakV8dPfZED6435gh6c

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: vbuckridge

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 65fck4ebZPEda683V1ghvaD" \
    --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 65fck4ebZPEda683V1ghvaD",
    "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 65fck4ebZPEda683V1ghvaD

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 g6f4haeE68DPa3Zv15cVkdb" \
    --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 g6f4haeE68DPa3Zv15cVkdb",
    "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 g6f4haeE68DPa3Zv15cVkdb

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

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

let body = {
    "key": "ynfdzsrx",
    "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 k6aDhVdPZef3Eagv1685b4c

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: ynfdzsrx

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

key   string     

Example: harum

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 d3Zk6vfeEa4aVPh51gcb86D" \
    --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 d3Zk6vfeEa4aVPh51gcb86D",
    "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 d3Zk6vfeEa4aVPh51gcb86D

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 fadEc46e6Ph1kvZgba5D8V3" \
    --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 fadEc46e6Ph1kvZgba5D8V3",
    "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 fadEc46e6Ph1kvZgba5D8V3

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankTransfer   string     

Example: quos

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 2

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/11/withdraw" \
    --header "Authorization: Bearer h6a4de3Va1vZbDgP568kfEc" \
    --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/11/withdraw"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 11

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 a14avh3E66ekfbVZdcP5gD8" \
    --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 a14avh3E66ekfbVZdcP5gD8",
    "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 a14avh3E66ekfbVZdcP5gD8

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


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

Example response (200):


{
    "data": {
        "id": "0fe2ed1a-fc0d-36be-a2b1-48effce7005d",
        "agency": "1719",
        "account": "3900978-0",
        "type": "caixa",
        "balance": 849.57,
        "holder_type": "pj",
        "alias": "quod",
        "limit": 3685.79,
        "available_balance": 4535.36,
        "used_limit": 0,
        "available_limit": 3685.79,
        "is_default": null,
        "default_payment_method": null,
        "bank": {
            "id": null,
            "name": null,
            "code": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Example response (404):


{
    "message": "string"
}
 

Request      

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

Headers

Authorization        

Example: Bearer kahfD6g5Zvb1dE6Pac4e8V3

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


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

Example response (200):


{
    "data": [
        {
            "id": "63fc719d-4ec4-3277-af68-f7ed1af8dd26",
            "agency": "9908",
            "account": "2626656-2",
            "type": "corrente",
            "balance": 5231.39,
            "holder_type": "pf",
            "alias": "qui",
            "limit": 1655.77,
            "available_balance": 6887.16,
            "used_limit": 0,
            "available_limit": 1655.77,
            "is_default": null,
            "default_payment_method": null,
            "bank": {
                "id": null,
                "name": null,
                "code": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "b4ab2a2b-b1f6-39a5-b492-e44a5b0aa198",
            "agency": "6026",
            "account": "8060719-2",
            "type": "corrente",
            "balance": 2218.46,
            "holder_type": "pf",
            "alias": "ad",
            "limit": 8682.64,
            "available_balance": 10901.099999999999,
            "used_limit": 0,
            "available_limit": 8682.64,
            "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 4ke5b836dhV1DfaaPcZvgE6

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 PdaEgb356e1a4vZ6fVD8hkc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"agency\": \"Example Agency\",
    \"account\": \"6739699-5\",
    \"bank_id\": \"c5049be4-5c2b-303c-b19e-c8b5f99b2224\",
    \"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 PdaEgb356e1a4vZ6fVD8hkc",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "agency": "Example Agency",
    "account": "6739699-5",
    "bank_id": "c5049be4-5c2b-303c-b19e-c8b5f99b2224",
    "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 PdaEgb356e1a4vZ6fVD8hkc

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

agency   string     

Agency. Example: Example Agency

account   string     

Account. Example: 6739699-5

bank_id   string     

Bank id. The uuid of an existing record in the banks table. Example: c5049be4-5c2b-303c-b19e-c8b5f99b2224

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/5" \
    --header "Authorization: Bearer agD14VZE8ak6vb65h3fPdce" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"agency\": \"Example Agency\",
    \"account\": \"2503586-2\",
    \"bank_id\": \"ddd77d5e-d986-3e42-bb63-aab7cc1723e7\",
    \"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/5"
);

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

let body = {
    "agency": "Example Agency",
    "account": "2503586-2",
    "bank_id": "ddd77d5e-d986-3e42-bb63-aab7cc1723e7",
    "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 agD14VZE8ak6vb65h3fPdce

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 5

Body Parameters

agency   string  optional    

Agency. Example: Example Agency

account   string  optional    

Account. Example: 2503586-2

bank_id   string  optional    

Bank id. The uuid of an existing record in the banks table. Example: ddd77d5e-d986-3e42-bb63-aab7cc1723e7

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/12" \
    --header "Authorization: Bearer h8E5dP16ckagfa63bDV4evZ" \
    --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 h8E5dP16ckagfa63bDV4evZ",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


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

Example response (200):


{
    "data": {
        "id": "41123be9-3c45-38af-8c70-4bca6b980c6d",
        "agency": "7478",
        "account": "0318291-0",
        "type": "poupança",
        "balance": 1830.17,
        "holder_type": "pf",
        "alias": "harum",
        "limit": 4794.9,
        "available_balance": 6625.07,
        "used_limit": 0,
        "available_limit": 4794.9,
        "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 h8E5dP16ckagfa63bDV4evZ

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 12

Delete bank account

requires authentication bank-account delete

Delete a bank account

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 2

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/11/statements/summary" \
    --header "Authorization: Bearer 8f1Eckh3DaZ4bde6V5vgP6a" \
    --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/11/statements/summary"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 11

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/2/statements" \
    --header "Authorization: Bearer 63D4acdgaEf15Vve8h6kbPZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sort_by\": \"voluptatem\",
    \"sort_desc\": false,
    \"page\": 72,
    \"per_page\": 2,
    \"q\": \"twwmfoyqwtepo\",
    \"type\": \"depósito\",
    \"date_start\": \"2026-09-30T09:24:12\",
    \"date_end\": \"2114-01-11\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/bank-accounts/2/statements"
);

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

let body = {
    "sort_by": "voluptatem",
    "sort_desc": false,
    "page": 72,
    "per_page": 2,
    "q": "twwmfoyqwtepo",
    "type": "depósito",
    "date_start": "2026-09-30T09:24:12",
    "date_end": "2114-01-11"
};

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 63D4acdgaEf15Vve8h6kbPZ

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 2

Body Parameters

sort_by   string  optional    

Example: voluptatem

sort_desc   boolean  optional    

Example: false

page   integer  optional    

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

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: twwmfoyqwtepo

type   string  optional    

Example: depósito

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-09-30T09:24:12

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: 2114-01-11

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 15

bankStatement   string     

Example: aliquam

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


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

Example response (200):


{
    "data": [
        {
            "id": "53d56483-2754-3215-aa83-bd6e52a0db4d",
            "name": "Jimenes e Associados",
            "code": "136"
        },
        {
            "id": "3b020c4c-f434-3501-a581-8a5acb2999ff",
            "name": "Carvalho-Fontes",
            "code": "727"
        }
    ],
    "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 5gcV1aeDv4dkEP86a6h3Zfb

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 ga4d1k3D5Ech8VfvbPeZ66a" \
    --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 ga4d1k3D5Ech8VfvbPeZ66a",
    "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 ga4d1k3D5Ech8VfvbPeZ66a

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

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


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

Example response (200):


{
    "data": {
        "id": "8726d76d-766b-30aa-b889-672e7dd3a91a",
        "name": "de Freitas e de Aguiar e Filhos",
        "code": "594"
    }
}
 

Request      

GET api/banks/{bank}

Headers

Authorization        

Example: Bearer a1ehEZ5d36b8Vkg6Pcv4aDf

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 vV61ghbaEkef3Z54Pc6Dad8" \
    --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 vV61ghbaEkef3Z54Pc6Dad8",
    "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 vV61ghbaEkef3Z54Pc6Dad8

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 ZVb6ak543Eda1vefc8Pgh6D" \
    --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 ZVb6ak543Eda1vefc8Pgh6D",
    "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 ZVb6ak543Eda1vefc8Pgh6D

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+voluptatem+non+quia+aliquid+quos+cumque+sunt.&categories[]=illo&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=rerum&customers[]=vel&suppliers[]=enim&works[]=dolores" \
    --header "Authorization: Bearer h1E46DbadcV8v56ake3ZgPf" \
    --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 voluptatem non quia aliquid quos cumque sunt.",
    "categories[0]": "illo",
    "date_start": "2021-01-01",
    "date_end": "2021-01-31",
    "bank_accounts[0]": "rerum",
    "customers[0]": "vel",
    "suppliers[0]": "enim",
    "works[0]": "dolores",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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 voluptatem non quia aliquid quos cumque sunt.

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.

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=Sit+consequatur+quasi+suscipit+mollitia+animi+culpa.&categories[]=eveniet&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=asperiores&customers[]=non&suppliers[]=fugit&works[]=porro" \
    --header "Authorization: Bearer ced6PVk6Dg1fZ4Eah3bva58" \
    --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": "Sit consequatur quasi suscipit mollitia animi culpa.",
    "categories[0]": "eveniet",
    "date_start": "2021-01-01",
    "date_end": "2021-01-31",
    "bank_accounts[0]": "asperiores",
    "customers[0]": "non",
    "suppliers[0]": "fugit",
    "works[0]": "porro",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "3eb464df-5f67-3746-8b95-af0653bd6c25",
            "code": "FC-01381914",
            "type": "pagamento",
            "amount": -1567.52,
            "description": "Enim quas veritatis a dolorem illo vitae.",
            "transaction_date": "1994-12-17T02:00:00.000000Z",
            "transaction_category": {
                "id": null,
                "name": null,
                "type": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "307f15a0-2ea0-33e5-a81f-75a0f9b614f2",
            "code": "FC-15726588",
            "type": "ajuste",
            "amount": 661.07,
            "description": "Aliquam delectus debitis libero dolores expedita at.",
            "transaction_date": "1978-06-13T03: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 ced6PVk6Dg1fZ4Eah3bva58

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: Sit consequatur quasi suscipit mollitia animi culpa.

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.

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 6aVEPghdfZ168cD5bveka43" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"Example Type\",
    \"cash_session_id\": \"51047f13-c526-3572-9abb-c2757b100b40\",
    \"transaction_category_id\": \"a4f2d9eb-3aee-3f56-963f-8bf01548a238\",
    \"bank_account_id\": \"69be55ba-de06-35c2-9078-06a469b9f90e\",
    \"customer_id\": \"096f004f-3bcb-3481-9a51-891fd656485b\",
    \"supplier_id\": \"dc98ed2a-4b61-35db-815f-225b5ddb3bd0\",
    \"work_id\": \"9fdc8d19-e15c-3f55-93bd-6d8f4d87e66a\",
    \"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 6aVEPghdfZ168cD5bveka43",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "Example Type",
    "cash_session_id": "51047f13-c526-3572-9abb-c2757b100b40",
    "transaction_category_id": "a4f2d9eb-3aee-3f56-963f-8bf01548a238",
    "bank_account_id": "69be55ba-de06-35c2-9078-06a469b9f90e",
    "customer_id": "096f004f-3bcb-3481-9a51-891fd656485b",
    "supplier_id": "dc98ed2a-4b61-35db-815f-225b5ddb3bd0",
    "work_id": "9fdc8d19-e15c-3f55-93bd-6d8f4d87e66a",
    "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 6aVEPghdfZ168cD5bveka43

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: 51047f13-c526-3572-9abb-c2757b100b40

transaction_category_id   string  optional    

Transaction category id. The uuid of an existing record in the transaction_categories table. Example: a4f2d9eb-3aee-3f56-963f-8bf01548a238

bank_account_id   string  optional    

Bank account id. The uuid of an existing record in the bank_accounts table. Example: 69be55ba-de06-35c2-9078-06a469b9f90e

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: 096f004f-3bcb-3481-9a51-891fd656485b

supplier_id   string  optional    

Supplier id. The uuid of an existing record in the suppliers table. Example: dc98ed2a-4b61-35db-815f-225b5ddb3bd0

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: 9fdc8d19-e15c-3f55-93bd-6d8f4d87e66a

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/14" \
    --header "Authorization: Bearer g1eaZakc6Ef6PV58Dd4h3vb" \
    --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 g1eaZakc6Ef6PV58Dd4h3vb",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


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

Example response (200):


{
    "data": {
        "id": "f21030d6-8591-3284-9f49-3afcd03ff32c",
        "code": "FC-86913572",
        "type": "pagamento",
        "amount": -504.3,
        "description": "Et facere est laborum facilis aliquid quibusdam facilis.",
        "transaction_date": "2023-11-06T03: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 g1eaZakc6Ef6PV58Dd4h3vb

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 14

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/7" \
    --header "Authorization: Bearer 58P3Vbfa4DZda6hgEv16cke" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"Example Type\",
    \"cash_session_id\": \"bca2a2e8-8fa5-367c-b6d9-0ebece5e6123\",
    \"transaction_category_id\": \"63da73f8-42a1-3d95-a50e-7adaae9e56cd\",
    \"bank_account_id\": \"b4f6a646-a384-3795-9953-c80e0ffcce68\",
    \"customer_id\": \"54465825-8ec9-3677-9429-b2c97ee5ba8a\",
    \"supplier_id\": \"405265c2-3665-35da-8099-74afe9393f77\",
    \"work_id\": \"44a78c51-fd58-31e4-baca-95608cc5150b\",
    \"amount\": 1,
    \"description\": \"Example Description\",
    \"transaction_date\": \"2024-01-01\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-flows/7"
);

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

let body = {
    "type": "Example Type",
    "cash_session_id": "bca2a2e8-8fa5-367c-b6d9-0ebece5e6123",
    "transaction_category_id": "63da73f8-42a1-3d95-a50e-7adaae9e56cd",
    "bank_account_id": "b4f6a646-a384-3795-9953-c80e0ffcce68",
    "customer_id": "54465825-8ec9-3677-9429-b2c97ee5ba8a",
    "supplier_id": "405265c2-3665-35da-8099-74afe9393f77",
    "work_id": "44a78c51-fd58-31e4-baca-95608cc5150b",
    "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 58P3Vbfa4DZda6hgEv16cke

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 7

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: bca2a2e8-8fa5-367c-b6d9-0ebece5e6123

transaction_category_id   string  optional    

Transaction category id. The uuid of an existing record in the transaction_categories table. Example: 63da73f8-42a1-3d95-a50e-7adaae9e56cd

bank_account_id   string  optional    

Bank account id. The uuid of an existing record in the bank_accounts table. Example: b4f6a646-a384-3795-9953-c80e0ffcce68

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: 54465825-8ec9-3677-9429-b2c97ee5ba8a

supplier_id   string  optional    

Supplier id. The uuid of an existing record in the suppliers table. Example: 405265c2-3665-35da-8099-74afe9393f77

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: 44a78c51-fd58-31e4-baca-95608cc5150b

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 19

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


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

Example response (200):


{
    "data": [
        {
            "id": "2bf37f41-ce9f-3c92-bb79-64aa20362e61",
            "code": null,
            "opened_by": null,
            "opened_at": "1973-02-16T22:58:16.000000Z",
            "closed_by": null,
            "closed_at": "1980-11-24T21:42:02.000000Z",
            "opening_balance": 8175.06,
            "closing_balance": 4450.27,
            "total_income": 0,
            "total_expense": 0,
            "total_balance": 0,
            "status": "Fechado",
            "hasSnapshot": false,
            "created_at": "2019-03-22T08:39:29.000000Z",
            "updated_at": "1977-02-24T18:57:49.000000Z"
        },
        {
            "id": "c03ea1dc-8c35-3af0-81cb-9acfc58841d7",
            "code": null,
            "opened_by": null,
            "opened_at": "1970-05-25T06:43:56.000000Z",
            "closed_by": null,
            "closed_at": "2016-07-03T07:48:48.000000Z",
            "opening_balance": 9385.09,
            "closing_balance": 3152.43,
            "total_income": 0,
            "total_expense": 0,
            "total_balance": 0,
            "status": "Fechado",
            "hasSnapshot": false,
            "created_at": "1976-02-27T05:37:05.000000Z",
            "updated_at": "2000-03-21T06:30:56.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 kd6cZh5bf18DvEeVa6aPg34

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


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

Example response (200):


{
    "data": {
        "id": "d92eff2a-5605-3880-ac47-1743f03cb53e",
        "code": null,
        "opened_by": null,
        "opened_at": "2003-03-13T05:51:15.000000Z",
        "closed_by": null,
        "closed_at": "1984-01-06T05:06:24.000000Z",
        "opening_balance": 5962.23,
        "closing_balance": 4485.89,
        "total_income": 0,
        "total_expense": 0,
        "total_balance": 0,
        "status": "Fechado",
        "hasSnapshot": false,
        "created_at": "2023-03-03T12:32:32.000000Z",
        "updated_at": "2023-09-26T08:43:29.000000Z"
    }
}
 

Request      

POST api/cash-sessions/open

Headers

Authorization        

Example: Bearer 61V45eafbEva3khDdg6ZcP8

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/9b4bc1d1-28eb-3df2-803d-5f97c461460d" \
    --header "Authorization: Bearer adh8k6VgaD4fZ5bEePv361c" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/close/9b4bc1d1-28eb-3df2-803d-5f97c461460d"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 9b4bc1d1-28eb-3df2-803d-5f97c461460d

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/f855f8e5-441a-3ab5-8a32-1e122b64519a/account-snapshot" \
    --header "Authorization: Bearer v1Daf46a8d35eVbEhcgPkZ6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/f855f8e5-441a-3ab5-8a32-1e122b64519a/account-snapshot"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: f855f8e5-441a-3ab5-8a32-1e122b64519a

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/6898a7dd-2489-3882-b4e0-110dc19d1ec8" \
    --header "Authorization: Bearer 5dfe46aEVk6hv8cbPDgZ31a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/6898a7dd-2489-3882-b4e0-110dc19d1ec8"
);

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


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

Example response (200):


{
    "data": {
        "id": "998ab1a0-37ad-3816-bf5e-84cc803748df",
        "code": null,
        "opened_by": null,
        "opened_at": "2019-08-19T19:44:14.000000Z",
        "closed_by": null,
        "closed_at": "2023-01-06T23:37:35.000000Z",
        "opening_balance": 6625.13,
        "closing_balance": 7596.13,
        "total_income": 0,
        "total_expense": 0,
        "total_balance": 0,
        "status": "Aberto",
        "hasSnapshot": false,
        "created_at": "1983-07-06T07:04:48.000000Z",
        "updated_at": "1978-10-18T21:05:09.000000Z"
    }
}
 

Request      

GET api/cash-sessions/{uuid}

Headers

Authorization        

Example: Bearer 5dfe46aEVk6hv8cbPDgZ31a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 6898a7dd-2489-3882-b4e0-110dc19d1ec8

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/6ff43314-3a47-3809-ac1f-42b1ddc4c7fb" \
    --header "Authorization: Bearer 5Vda1g63bD8c4eEhPZkfva6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/6ff43314-3a47-3809-ac1f-42b1ddc4c7fb"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 6ff43314-3a47-3809-ac1f-42b1ddc4c7fb

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


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

Example response (200):


{
    "data": [
        {
            "id": "73ea3686-86a5-336e-8fd1-bf99ecb49e6a",
            "name": "rem incidunt",
            "slug": null,
            "abbreviation": null,
            "tutorials_count": 0
        },
        {
            "id": "7103101a-863f-37f8-b0ad-3c8eb064f2ca",
            "name": "quo sed",
            "slug": null,
            "abbreviation": "fiu",
            "tutorials_count": 0
        }
    ]
}
 

Request      

GET api/tutorials/sectors

Headers

Authorization        

Example: Bearer kafabVc61dheEDvg8Z46P35

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?sector_id=117c45e0-48c3-3c89-abdd-9db4c1855a08" \
    --header "Authorization: Bearer 8V31bZadhE4DPae65cfkg6v" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/tutorials/modules"
);

const params = {
    "sector_id": "117c45e0-48c3-3c89-abdd-9db4c1855a08",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "9ce4114a-e0cf-3d7c-91df-6798dd662078",
            "name": "Aperiam illo",
            "slug": "aperiam-illo-542934",
            "description": "Quas et delectus error laboriosam sit est.",
            "sort_order": 0,
            "is_active": true,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "be442e76-ffdc-34b8-aaf8-91e300a682de",
            "name": "In quia",
            "slug": "in-quia-272279",
            "description": "Et id unde qui cum.",
            "sort_order": 0,
            "is_active": true,
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/tutorials/modules

Headers

Authorization        

Example: Bearer 8V31bZadhE4DPae65cfkg6v

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sector_id   string  optional    

Filtra os módulos pelos tutoriais de um setor, ou "geral" para o material sem setor marcado. O campo value deve ser um UUID válido. The uuid of an existing record in the sectors table. Example: 117c45e0-48c3-3c89-abdd-9db4c1855a08

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=d743594a-ac0c-3dce-8966-bcbc0e0d9073&sector_id=c8504eca-3f92-377d-8e83-fbf09d778c7c" \
    --header "Authorization: Bearer EgkcDb1he836ZfPa5ad46vV" \
    --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": "d743594a-ac0c-3dce-8966-bcbc0e0d9073",
    "sector_id": "c8504eca-3f92-377d-8e83-fbf09d778c7c",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "fa89ec81-9f07-303a-b29e-5011724ad3d9",
            "title": "Eum aliquid quibusdam ea",
            "description": "Modi tenetur recusandae qui.",
            "status": "draft",
            "published_at": null,
            "sort_order": 0,
            "module": {
                "id": "a2dea34b-bde8-4af5-a857-155413419ff0",
                "name": "Eaque est",
                "slug": "eaque-est-50723"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "ad3d72f0-e6d8-39ba-85a1-f5e1aceafffd",
            "title": "Officiis velit accusamus ut",
            "description": "Ipsum reiciendis quibusdam quod magnam sed velit dolor enim.",
            "status": "draft",
            "published_at": null,
            "sort_order": 0,
            "module": {
                "id": "a2dea34b-c044-41b3-b132-b94c4fa3946f",
                "name": "Veniam et",
                "slug": "veniam-et-454154"
            },
            "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 EgkcDb1he836ZfPa5ad46vV

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    

Filtra pelo UUID do módulo. O campo value deve ser um UUID válido. The uuid of an existing record in the tutorial_modules table. Example: d743594a-ac0c-3dce-8966-bcbc0e0d9073

sector_id   string  optional    

Filtra pelo UUID do setor, ou "geral" para o material sem setor marcado. O campo value deve ser um UUID válido. The uuid of an existing record in the sectors table. Example: c8504eca-3f92-377d-8e83-fbf09d778c7c

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


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

Example response (200):


{
    "data": {
        "id": "3cea1930-3a97-3aed-8d10-874da585c21c",
        "title": "Autem quis exercitationem dolorum",
        "description": "Sit sint earum est sint quo maiores dolorem sint.",
        "status": "draft",
        "published_at": null,
        "sort_order": 0,
        "module": {
            "id": "a2dea34b-c6a4-4454-b5d7-bc537922107f",
            "name": "Natus sed",
            "slug": "natus-sed-801428"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/tutorials/{id}

Headers

Authorization        

Example: Bearer Z6Vkbc6af1gP5dEvhaDe438

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 5D61aavhbed4E8kg3P6VZfc" \
    --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 5D61aavhbed4E8kg3P6VZfc",
    "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 5D61aavhbed4E8kg3P6VZfc

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 D635acfk8dEehPVv1gbZ64a" \
    --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\": \"b6b00806-776b-3917-8e1a-8e1718d2fd54\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/contracts"
);

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

let body = {
    "sort_by": "Example Sort by",
    "sort_desc": true,
    "page": 1,
    "per_page": 1,
    "work_id": "b6b00806-776b-3917-8e1a-8e1718d2fd54"
};

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

Example response (200):


{
    "data": [
        {
            "id": "9ad58039-12de-3c87-bc13-50ccd7cb071a",
            "number": "124/2026",
            "started_at": "2026-09-30",
            "deadline_at": "2027-09-30",
            "work": {
                "id": "a2dea33f-e740-4a82-bc54-df481895390b",
                "name": "Abgail Laís Grego Sobrinho"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "2876284a-7271-3444-8f7a-d066563906c5",
            "number": "477/2026",
            "started_at": "2026-09-30",
            "deadline_at": "2027-09-30",
            "work": {
                "id": "a2dea340-1081-4732-b247-2c5f199299b3",
                "name": "Sra. Nicole Vila"
            },
            "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 D635acfk8dEehPVv1gbZ64a

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: b6b00806-776b-3917-8e1a-8e1718d2fd54

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 f1vegEh8a6Dk3Vcd6PaZb45" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"work_id\": \"7696db5d-f64a-380b-bb96-414feff2aa37\",
    \"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 f1vegEh8a6Dk3Vcd6PaZb45",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "work_id": "7696db5d-f64a-380b-bb96-414feff2aa37",
    "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 f1vegEh8a6Dk3Vcd6PaZb45

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: 7696db5d-f64a-380b-bb96-414feff2aa37

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

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


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

Example response (200):


{
    "data": {
        "id": "854a5578-358c-3fef-be64-477c5b408de1",
        "number": "406/2026",
        "started_at": "2026-09-30",
        "deadline_at": "2027-09-30",
        "work": {
            "id": "a2dea340-23a2-4275-a1d0-a277f022edae",
            "name": "Sr. Nelson Vale"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/contracts/{id}

Headers

Authorization        

Example: Bearer gaZv846aDbPkhfedc531V6E

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the contract. Example: 15

contract   string     

Contract UUID Example: delectus

Update contract

requires authentication contract update

Update a work contract

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/contracts/6" \
    --header "Authorization: Bearer fac5hba68gedV34ZDE6v1kP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"number\": \"Example Number\",
    \"started_at\": \"Example Started at\",
    \"deadline_at\": \"Example Deadline at\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/contracts/6"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the contract. Example: 6

contract   string     

Contract UUID Example: quisquam

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

contract   string     

Contract UUID Example: assumenda

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


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

Example response (200):


{
    "data": [
        {
            "id": "e0787afb-8eca-3c57-96fe-585e3d75cd57",
            "name": "Sra. Patrícia Lara Aranda Filho",
            "email": "yprado@example.net",
            "phone": "(79) 92985-4173",
            "document": "929.531.775-07",
            "type": "pf",
            "responsible": "Srta. Eduarda Pacheco Sobrinho",
            "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": "671f61bb-be6d-30ac-9010-be33796445d5",
            "name": "Sr. Wilson Maximiano Vale Filho",
            "email": "ferreira.luna@example.com",
            "phone": "(42) 2218-2167",
            "document": "125.315.058-30",
            "type": "pf",
            "responsible": "Mateus Santana 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
        }
    ],
    "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 cbD1eVd8aahg536PEZk6vf4

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 PEa4fdcZD6ka6b813v5Vghe" \
    --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 PEa4fdcZD6ka6b813v5Vghe",
    "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 PEa4fdcZD6ka6b813v5Vghe

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

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


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

Example response (200):


{
    "data": {
        "id": "5dd8ed12-728b-3f15-946d-f8be67b8e319",
        "name": "Dayana Rayane Brito Filho",
        "email": "reis.walter@example.org",
        "phone": "(63) 4545-4271",
        "document": "395.163.196-10",
        "type": "pj",
        "responsible": "Norma Ávila",
        "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 Dfgh3P5d4vbZV168a6ecaEk

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the customer. Example: 13

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the customer. Example: 6

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 cafebE5a8hV6v46PgZ3D1kd" \
    --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 cafebE5a8hV6v46PgZ3D1kd",
    "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 cafebE5a8hV6v46PgZ3D1kd

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 cdD4Zak6Ve35vh8afgb6E1P" \
    --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\": \"f5742b43-d9cf-33ee-a58f-59f751a92761\",
    \"contract_id\": \"3434de4d-286f-372d-93a5-5116047f33ca\",
    \"status_id\": \"4a348004-e2e7-3454-b2c9-98242a2a9789\",
    \"filled_by\": \"2508a37e-ffe3-38ac-a81b-4173e0235cbe\",
    \"responsible_id\": \"c139d341-a3c6-3aa0-b1a9-b8db7d0c493b\",
    \"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 cdD4Zak6Ve35vh8afgb6E1P",
    "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": "f5742b43-d9cf-33ee-a58f-59f751a92761",
    "contract_id": "3434de4d-286f-372d-93a5-5116047f33ca",
    "status_id": "4a348004-e2e7-3454-b2c9-98242a2a9789",
    "filled_by": "2508a37e-ffe3-38ac-a81b-4173e0235cbe",
    "responsible_id": "c139d341-a3c6-3aa0-b1a9-b8db7d0c493b",
    "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": "46213a93-e698-3c42-a49f-6b382eb7ae2f",
            "code": "RDO-30-09-26",
            "report_number": 1,
            "date": "2026-09-30",
            "status": {
                "id": "a2dea340-71ae-456e-a2bd-30149bb9745f",
                "slug": null,
                "name": null,
                "abbreviation": "et",
                "color": "#42625c",
                "text_color": "#cb8370"
            },
            "work": {
                "id": "a2dea340-666f-48a2-93b0-5109051affe6",
                "name": "Sra. Léia Lara de Oliveira",
                "started_at": "1993-12-30 22:19:46"
            },
            "filled_by": {
                "id": "a2dea340-6c11-4725-95c6-a7c65c0b7bd8",
                "name": "Dr. Herta Fay IV"
            },
            "contract_number": "888/2026",
            "deadline_at": "2027-09-30",
            "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": "e6629380-6b73-3367-b13a-08b832a068f5",
            "code": "RDO-30-09-26",
            "report_number": 1,
            "date": "2026-09-30",
            "status": {
                "id": "a2dea340-7baa-45a4-b0e0-e84b6275193c",
                "slug": null,
                "name": null,
                "abbreviation": "reiciendis",
                "color": "#c6ba0a",
                "text_color": "#96b859"
            },
            "work": {
                "id": "a2dea340-761a-4d87-ae0d-a3f497f4ca5f",
                "name": "Sr. Yuri Barros de Arruda Neto",
                "started_at": "2020-11-12 09:51:20"
            },
            "filled_by": {
                "id": "a2dea340-7a20-4278-a34a-5692d72d9a9a",
                "name": "Lucie Nitzsche"
            },
            "contract_number": "848/2026",
            "deadline_at": "2027-09-30",
            "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 cdD4Zak6Ve35vh8afgb6E1P

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: f5742b43-d9cf-33ee-a58f-59f751a92761

contract_id   string  optional    

Contrato. The uuid of an existing record in the contracts table. Example: 3434de4d-286f-372d-93a5-5116047f33ca

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 4a348004-e2e7-3454-b2c9-98242a2a9789

filled_by   string  optional    

Preenchido por. The uuid of an existing record in the users table. Example: 2508a37e-ffe3-38ac-a81b-4173e0235cbe

responsible_id   string  optional    

Responsável. The uuid of an existing record in the users table. Example: c139d341-a3c6-3aa0-b1a9-b8db7d0c493b

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 vEaZPDcbkh35fad4ge866V1" \
    --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 vEaZPDcbkh35fad4ge866V1",
    "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 vEaZPDcbkh35fad4ge866V1

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

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


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

Example response (200):


{
    "data": {
        "id": "5e3a0377-24fa-35e5-92c5-b2ef4cb1c0cf",
        "code": "RDO-30-09-26",
        "report_number": 1,
        "date": "2026-09-30",
        "status": {
            "id": "a2dea340-8d0d-4afa-8cae-b4898a1d0d54",
            "slug": null,
            "name": null,
            "abbreviation": "dicta",
            "color": "#24c32a",
            "text_color": "#2d8353"
        },
        "work": {
            "id": "a2dea340-87e0-4d11-ab8e-db701b3cd989",
            "name": "Joaquin Maurício Abreu",
            "started_at": "2012-06-16 19:39:43"
        },
        "filled_by": {
            "id": "a2dea340-8b99-4388-b631-e7037366dc04",
            "name": "Mrs. Joy Lehner IV"
        },
        "contract_number": "548/2026",
        "deadline_at": "2027-09-30",
        "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 aD1b68va3EhVP564cekgdZf

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: culpa

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 6dgh86EfDc514kVvaebPaZ3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"contract_id\": \"Example Contract id\",
    \"date\": \"2024-01-01\",
    \"status_id\": \"679c9e44-7551-3364-ae45-edc043c5eace\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/daily-logs"
);

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

let body = {
    "contract_id": "Example Contract id",
    "date": "2024-01-01",
    "status_id": "679c9e44-7551-3364-ae45-edc043c5eace"
};

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 6dgh86EfDc514kVvaebPaZ3

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: 679c9e44-7551-3364-ae45-edc043c5eace

Update daily log

requires authentication daily-log update

Update a draft RDO: weather, team, activities, occurrences and next-day forecast

Example request:
curl --request PATCH \
    "https://api.bs-homolog.pensou.app.br/api/daily-logs/voluptate" \
    --header "Authorization: Bearer 5vaZ8bdfgahVD316PEkec46" \
    --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\": \"37cd1f18-db3a-4e84-b47a-00497fce6f13\",
            \"quantity\": 1
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/daily-logs/voluptate"
);

const headers = {
    "Authorization": "Bearer 5vaZ8bdfgahVD316PEkec46",
    "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": "37cd1f18-db3a-4e84-b47a-00497fce6f13",
            "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 5vaZ8bdfgahVD316PEkec46

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: voluptate

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: 37cd1f18-db3a-4e84-b47a-00497fce6f13

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: quos

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/eum/signed-document" \
    --header "Authorization: Bearer a8Z6vkh3Pf1bec45a6VEdgD" \
    --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/eum/signed-document"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: eum

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: consectetur

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: corporis

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/eum/photos/voluptas" \
    --header "Authorization: Bearer adc6P35ekgV8Dv14bZ6ahEf" \
    --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/eum/photos/voluptas"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: eum

id   string     

The ID of the photo. Example: voluptas

photo   string     

Photo (File) UUID Example: eum

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: aut

photo   string     

Photo (File) UUID Example: perspiciatis

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: aut

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


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

Example response (200):


{
    "data": [
        {
            "id": "bbe26154-d881-3922-8558-0994b70fb7f9",
            "name": "Qui",
            "code": "YFE",
            "description": "Impedit amet saepe neque eligendi.",
            "active": true
        },
        {
            "id": "360d2725-d744-3381-bc51-3cfaef01f440",
            "name": "Praesentium",
            "code": "WBI",
            "description": "Laboriosam quis id placeat ex nihil consequatur nisi.",
            "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 a5DfahZP6V63kcbevd4gE18

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


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

Example response (200):


{
    "data": {
        "id": "526038d1-d2b0-3b80-a133-3d596d7d7d91",
        "name": "Tempore",
        "code": "JWT",
        "description": "Sit distinctio cupiditate id ipsum.",
        "active": true
    }
}
 

Request      

GET api/disciplines/{id}

Headers

Authorization        

Example: Bearer 1ZaE3k6vc8a6he5PbVgfDd4

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: modi

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 veVEgb368PD5a6ad4hkZ1cf" \
    --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 veVEgb368PD5a6ad4hkZ1cf",
    "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 veVEgb368PD5a6ad4hkZ1cf

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 68Va1d6DbhcvfeEg4Z3aP5k" \
    --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 68Va1d6DbhcvfeEg4Z3aP5k",
    "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 68Va1d6DbhcvfeEg4Z3aP5k

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: cupiditate

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

discipline   string     

Discipline UUID Example: doloribus

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


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

Example response (200):


{
    "data": [
        {
            "id": "148e4db0-6345-3589-8006-dc24bb577ec8",
            "name": "Ronaldo Sepúlveda Maldonado Jr.",
            "description": "Modi quasi ut recusandae. Impedit officia autem illo explicabo vel officiis provident. Deleniti et aspernatur doloremque ut vero et.",
            "module": "document"
        },
        {
            "id": "18a1fa3c-f6ef-39ff-af02-17f902c4c78b",
            "name": "Srta. Luna Juliana Aragão",
            "description": "In distinctio reprehenderit molestiae qui nobis saepe temporibus. Quam cumque quo corrupti explicabo similique quae soluta.",
            "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 hZdDa6abcP8kEgV164vf3e5

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

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


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

Example response (200):


{
    "data": {
        "id": "07318d61-ac9c-3dff-8387-6608afa8989b",
        "name": "Débora Correia Leon",
        "description": "Nemo sed ea ut molestiae. Voluptatum sequi fuga eum repellat voluptas. Dicta qui animi inventore omnis sunt nemo.",
        "module": "document"
    }
}
 

Request      

GET api/document-categories/{documentCategory}

Headers

Authorization        

Example: Bearer 864VDfc531vkbea6EdPhagZ

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: iste

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

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/nam" \
    --header "Authorization: Bearer 6v5VdkPDZaE8gfbeah13c64" \
    --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/nam"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: nam

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: quis

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[]=harum&documentable_type=earum&customers[]=ea&suppliers[]=ipsam" \
    --header "Authorization: Bearer daD4PVkcZ5e8g16af3hv6bE" \
    --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]": "harum",
    "documentable_type": "earum",
    "customers[0]": "ea",
    "suppliers[0]": "ipsam",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "14a83c4f-2cb2-3c27-ac89-19f803adeff3",
            "name": "Mia Grego Ferraz",
            "file": {
                "id": null,
                "url": null,
                "extension": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "711216ec-da30-3a11-b302-ac40a70c67ba",
            "name": "Dr. Emanuel D'ávila Neto",
            "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 daD4PVkcZ5e8g16af3hv6bE

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: earum

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

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


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

Example response (200):


{
    "data": {
        "id": "a0d3ba06-80fb-35ef-bf2d-24c0b0f67bb4",
        "name": "Dr. Luana Verônica Sandoval Filho",
        "file": {
            "id": null,
            "url": null,
            "extension": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/documents/{id}

Headers

Authorization        

Example: Bearer 8hafd16DgeavP5k3c4ZbE6V

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the document. Example: 18

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 16gDfaE4a3PVkc5hb6Zd8ev" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"category_id\": \"ed89f4ee-efc0-359a-9df1-2093a8571ab0\",
    \"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 16gDfaE4a3PVkc5hb6Zd8ev",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "category_id": "ed89f4ee-efc0-359a-9df1-2093a8571ab0",
    "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 16gDfaE4a3PVkc5hb6Zd8ev

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: ed89f4ee-efc0-359a-9df1-2093a8571ab0

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/7" \
    --header "Authorization: Bearer ed86cPZE6Dg1khvf3ba4V5a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"category_id\": \"94e3c1d5-7a9c-32ae-a0ea-f0bbd34cfc2b\",
    \"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/7"
);

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

let body = {
    "name": "Example Name",
    "category_id": "94e3c1d5-7a9c-32ae-a0ea-f0bbd34cfc2b",
    "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 ed86cPZE6Dg1khvf3ba4V5a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the document. Example: 7

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: 94e3c1d5-7a9c-32ae-a0ea-f0bbd34cfc2b

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 a6Zk6VPabDE538gdfe1vh4c" \
    --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 a6Zk6VPabDE538gdfe1vh4c",
    "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 a6Zk6VPabDE538gdfe1vh4c

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

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

let body = {
    "q": "rerum",
    "renewal_status": "pending",
    "urgency": "expires_7_days",
    "employee_id": "qui",
    "epi_type_id": "aut"
};

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 VZDE16dehgkaacP68bv354f

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: rerum

renewal_status   string  optional    

Example: pending

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

Example: expires_7_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: qui

epi_type_id   string  optional    

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

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

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

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

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

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

Request      

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

Headers

Authorization        

Example: Bearer EcgdDaa6bv3ef568VkPZ14h

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

EPI delivery UUID Example: nobis

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: true

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/debitis/ignore" \
    --header "Authorization: Bearer 45adaZVh668eE3vgkcPD1fb" \
    --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/debitis/ignore"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

EPI delivery UUID Example: debitis

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

EPI delivery UUID Example: et

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

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

let body = {
    "q": "quia",
    "stock_id": "ut"
};

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

Example response (200):


{
    "data": [
        {
            "id": "8f61bbda-b323-3af4-ac71-9dd076727ea3",
            "name": "est itaque",
            "default_validity_days": 529,
            "requires_signature": true,
            "numero_ca": "46835",
            "product": null,
            "available_quantity": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "a6fbeee6-aabd-38ad-92e9-9bfb32e3a5d8",
            "name": "quo et",
            "default_validity_days": 440,
            "requires_signature": false,
            "numero_ca": "17339",
            "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 ed5EZbDaPc6Vvk1ag34hf68

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: quia

stock_id   string  optional    

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

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

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

let body = {
    "q": "impedit",
    "stock_id": "quasi"
};

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 fE6dc8aavDV4e5Pk3Z61bhg

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: impedit

stock_id   string  optional    

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

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

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


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

Example response (200):


{
    "data": {
        "id": "0489d209-9328-3cff-a208-f5911f2c63ff",
        "name": "tenetur expedita",
        "default_validity_days": 491,
        "requires_signature": false,
        "numero_ca": "35422",
        "product": null,
        "available_quantity": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/epi-types/{epiType}

Headers

Authorization        

Example: Bearer vcePa358hag1Z6D4Ekd6Vfb

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: sit

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 cPa8eZbE3vhVd5a614gfDk6" \
    --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\": \"81388573-15d2-35ca-b8b5-8a782ba64cfa\",
    \"product_family_id\": \"3c08bdec-09fe-3414-b437-e858df405858\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-types"
);

const headers = {
    "Authorization": "Bearer cPa8eZbE3vhVd5a614gfDk6",
    "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": "81388573-15d2-35ca-b8b5-8a782ba64cfa",
    "product_family_id": "3c08bdec-09fe-3414-b437-e858df405858"
};

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 cPa8eZbE3vhVd5a614gfDk6

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: 81388573-15d2-35ca-b8b5-8a782ba64cfa

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: 3c08bdec-09fe-3414-b437-e858df405858

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 6dPZ3ca4ak8hvE1fDb6Ve5g" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"epi_type_id\": \"df474a1d-edd1-318f-856a-c1fdda09f1a2\",
            \"action\": \"Example Items * action\",
            \"product_id\": \"a1cec110-33ae-329f-8243-404708a1d943\",
            \"product_family_id\": \"f7a8eee8-4574-3948-9fe7-b8ccb30f4999\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-types/link-products"
);

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

let body = {
    "items": [
        {
            "epi_type_id": "df474a1d-edd1-318f-856a-c1fdda09f1a2",
            "action": "Example Items * action",
            "product_id": "a1cec110-33ae-329f-8243-404708a1d943",
            "product_family_id": "f7a8eee8-4574-3948-9fe7-b8ccb30f4999"
        },
        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/ad/product" \
    --header "Authorization: Bearer 663cE84dZV5befav1kghDPa" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"action\": \"Example Action\",
    \"product_id\": \"7d7bf6b0-b832-3870-8dcd-c8938c137c6b\",
    \"product_family_id\": \"635fb9ed-8c86-3d38-b189-6c196b4aaa2c\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-types/ad/product"
);

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

let body = {
    "action": "Example Action",
    "product_id": "7d7bf6b0-b832-3870-8dcd-c8938c137c6b",
    "product_family_id": "635fb9ed-8c86-3d38-b189-6c196b4aaa2c"
};

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

Request      

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

Headers

Authorization        

Example: Bearer 663cE84dZV5befav1kghDPa

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: ad

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: 7d7bf6b0-b832-3870-8dcd-c8938c137c6b

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: 635fb9ed-8c86-3d38-b189-6c196b4aaa2c

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/labore" \
    --header "Authorization: Bearer 618Ze6k5PfVEc3Dgaad4hvb" \
    --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/labore"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: labore

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: rerum

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


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

Example response (200):


{
    "data": [
        {
            "id": "e84dffa5-7bd5-4b84-8dba-c3b6b3792ec0",
            "name": "delectus",
            "description": "Omnis perspiciatis earum odio impedit.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "32073c17-ca62-4a00-ad5e-4f9e8a06e365",
            "name": "maiores",
            "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 hbdP3f4566a1gV8ZEvaDkec

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

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


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

Example response (200):


{
    "data": {
        "id": "a1be4bc2-9a71-4fa4-80c7-125b06a3a532",
        "name": "tempora",
        "description": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/employee-roles/{employeeRole}

Headers

Authorization        

Example: Bearer P8hbVa4D35vEcfkZ1a6g6de

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employeeRole   string     

Employee Role UUID Example: assumenda

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 68bZ6Pk4fcVadv5DaE31geh" \
    --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 68bZ6Pk4fcVadv5DaE31geh",
    "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 68bZ6Pk4fcVadv5DaE31geh

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employeeRole   string     

Employee Role UUID Example: ut

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employeeRole   string     

Employee Role UUID Example: beatae

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

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

let body = {
    "sort_by": "created_at",
    "sort_desc": false,
    "page": 52,
    "per_page": 24,
    "q": "corrupti",
    "employee_id": "omnis",
    "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 Pfk1a6dVa6Eg5bvZ4eD8ch3

Content-Type        

Example: application/json

Accept        

Example: application/json

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: 52

per_page   integer  optional    

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

q   string  optional    

Example: corrupti

employee_id   string  optional    

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

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[]=qui&admission_date_from=2026-01-01&admission_date_to=2026-12-31" \
    --header "Authorization: Bearer 6ZEeac4afbhkD1g36V5v8Pd" \
    --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]": "qui",
    "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 6ZEeac4afbhkD1g36V5v8Pd",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


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

Example response (200):


{
    "data": [
        {
            "id": "22ce2b0f-3aa4-4787-8170-069aac9ce33f",
            "name": "Sra. Cíntia Mary Serna Neto",
            "cpf": "844.456.650-32",
            "rg": null,
            "ctps": null,
            "phone": null,
            "birthdate": "2000-04-23",
            "email": "ferreira.leonardo@example.com",
            "pis_pasep": null,
            "admission_date": "1998-06-06",
            "daily_salary": "406.35",
            "monthly_salary": "3795.23",
            "nationality": "Gana",
            "place_of_birth": "Porto Alan",
            "status": "active",
            "status_label": "Ativo",
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "employee_role": {
                "id": "a2dea341-0b35-4204-b4d1-765a8266ed0c",
                "name": "aut"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "c66d8706-3c13-419b-bde1-6101934c3997",
            "name": "Nelson Rivera Neto",
            "cpf": "522.271.666-20",
            "rg": "392540617",
            "ctps": "518623322",
            "phone": "(21) 4271-8083",
            "birthdate": "2015-11-03",
            "email": null,
            "pis_pasep": "51508652033",
            "admission_date": "2022-09-24",
            "daily_salary": "442.24",
            "monthly_salary": null,
            "nationality": null,
            "place_of_birth": null,
            "status": "active",
            "status_label": "Ativo",
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "employee_role": {
                "id": "a2dea341-0f68-48c1-b274-e8ad14f06536",
                "name": "nesciunt"
            },
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": "/?page=51",
        "next": null
    },
    "meta": {
        "current_page": 52,
        "from": 511,
        "last_page": 1,
        "links": [
            {
                "url": "/?page=51",
                "label": "&laquo; Anterior",
                "page": 51,
                "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": 512,
        "total": 2
    }
}
 

Request      

GET api/employees

Headers

Authorization        

Example: Bearer 6ZEeac4afbhkD1g36V5v8Pd

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[]=excepturi&admission_date_from=2026-01-01&admission_date_to=2026-12-31" \
    --header "Authorization: Bearer v4k8cEaeDZfVd6Ph5a1bg63" \
    --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]": "excepturi",
    "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 v4k8cEaeDZfVd6Ph5a1bg63",
    "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 v4k8cEaeDZfVd6Ph5a1bg63

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

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


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

Example response (200):


{
    "data": {
        "id": "b8e82e63-0b1b-4f7b-88e6-d63bb641c737",
        "name": "Suelen Vieira",
        "cpf": "426.615.947-91",
        "rg": null,
        "ctps": "832095512",
        "phone": "(14) 2498-6432",
        "birthdate": null,
        "email": null,
        "pis_pasep": "92112101481",
        "admission_date": "2023-11-07",
        "daily_salary": null,
        "monthly_salary": "8621.38",
        "nationality": null,
        "place_of_birth": "Porto Filipe",
        "status": "active",
        "status_label": "Ativo",
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        },
        "employee_role": {
            "id": "a2dea341-20d2-4180-ac77-50fc0c200d67",
            "name": "provident"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/employees/{id}

Headers

Authorization        

Example: Bearer 6gVP64dakh1bf35EvDaec8Z

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the employee. Example: 7

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 b6Pkfg15vZ4dEaV6aeh83Dc" \
    --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\": \"5d7269fa-6b5a-4d9f-942e-40577ca8d403\",
    \"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 b6Pkfg15vZ4dEaV6aeh83Dc",
    "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": "5d7269fa-6b5a-4d9f-942e-40577ca8d403",
    "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": "3d459b70-d0f6-4098-841a-e12309462bf2",
        "name": "Sr. Paulo Nicolas Mendes Filho",
        "cpf": "208.852.255-39",
        "rg": "426509151",
        "ctps": "184150617",
        "phone": null,
        "birthdate": "1986-01-27",
        "email": "helena68@example.net",
        "pis_pasep": "21191923466",
        "admission_date": "2018-04-30",
        "daily_salary": null,
        "monthly_salary": "3995.23",
        "nationality": null,
        "place_of_birth": "Vila Karina",
        "status": "active",
        "status_label": "Ativo",
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        },
        "employee_role": {
            "id": "a2dea341-2ad4-4dfa-bb0b-1d714f3eebf6",
            "name": "quisquam"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/employees

Headers

Authorization        

Example: Bearer b6Pkfg15vZ4dEaV6aeh83Dc

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: 5d7269fa-6b5a-4d9f-942e-40577ca8d403

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/2" \
    --header "Authorization: Bearer 86V1f43hk6ebgaZE5cDPavd" \
    --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\": \"943fac18-8212-4e29-b2b4-160b9da87e83\",
    \"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/2"
);

const headers = {
    "Authorization": "Bearer 86V1f43hk6ebgaZE5cDPavd",
    "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": "943fac18-8212-4e29-b2b4-160b9da87e83",
    "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 86V1f43hk6ebgaZE5cDPavd

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the employee. Example: 2

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: 943fac18-8212-4e29-b2b4-160b9da87e83

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 3cE8adZD645VbkfhPegva61" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"dismissal_date\": \"2026-09-30\",
    \"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 3cE8adZD645VbkfhPegva61",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "dismissal_date": "2026-09-30",
    "dismissal_reason": "resignation"
};

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

Example response (200):


{
    "data": {
        "id": "fcd6ee4f-ef4a-4467-b376-9405146f105d",
        "name": "Sr. André Vega",
        "cpf": "830.776.924-66",
        "rg": "975142110",
        "ctps": null,
        "phone": "(21) 3539-2306",
        "birthdate": null,
        "email": null,
        "pis_pasep": "87743762271",
        "admission_date": "1995-12-05",
        "daily_salary": "90.84",
        "monthly_salary": null,
        "nationality": null,
        "place_of_birth": null,
        "status": "active",
        "status_label": "Ativo",
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        },
        "employee_role": {
            "id": "a2dea341-3c55-4005-a8bb-13c6a895811d",
            "name": "velit"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/employees/{employee}/dismiss

Headers

Authorization        

Example: Bearer 3cE8adZD645VbkfhPegva61

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-09-30

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 Eg1adcah8keb6D5VZ4v63fP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"admission_date\": \"2026-09-30\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32/rehire"
);

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

let body = {
    "admission_date": "2026-09-30"
};

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

Example response (200):


{
    "data": {
        "id": "dda1d8fc-64b5-4e16-9e33-4d1a9e2cee55",
        "name": "Franco Evandro Aragão",
        "cpf": "690.047.428-23",
        "rg": "636268303",
        "ctps": "584493956",
        "phone": null,
        "birthdate": null,
        "email": null,
        "pis_pasep": null,
        "admission_date": "2023-10-17",
        "daily_salary": "245.25",
        "monthly_salary": "3400.48",
        "nationality": null,
        "place_of_birth": "Denise do Sul",
        "status": "active",
        "status_label": "Ativo",
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        },
        "employee_role": {
            "id": "a2dea341-42e5-420f-88e8-04ecd13563c3",
            "name": "quod"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/employees/{employee}/rehire

Headers

Authorization        

Example: Bearer Eg1adcah8keb6D5VZ4v63fP

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-09-30

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 7

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/2/bank-account" \
    --header "Authorization: Bearer aePVc85Zv3k6gbhD14da6Ef" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bank_id\": \"illum\",
    \"agency\": \"shqvbloayinqcjgkv\",
    \"account\": \"xkflxxrqfqyrnxcaaelm\",
    \"account_type\": \"poupança\",
    \"pix_key\": \"fxnkrdyjppstjinvnndspgu\",
    \"favorite\": false
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/2/bank-account"
);

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

let body = {
    "bank_id": "illum",
    "agency": "shqvbloayinqcjgkv",
    "account": "xkflxxrqfqyrnxcaaelm",
    "account_type": "poupança",
    "pix_key": "fxnkrdyjppstjinvnndspgu",
    "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 aePVc85Zv3k6gbhD14da6Ef

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 2

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: illum

agency   string     

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

account   string     

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

account_type   string     

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: fxnkrdyjppstjinvnndspgu

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

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

let body = {
    "bank_id": "consectetur",
    "agency": "wumrrrvhzkcuz",
    "account": "mnekvmsdqdzuewjkyvtnylctn",
    "account_type": "poupança",
    "pix_key": "btexlktuchficxqxsmlknc",
    "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 e4vD86a61Efckgb35aVdZhP

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 11

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: consectetur

agency   string  optional    

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

account   string  optional    

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

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: btexlktuchficxqxsmlknc

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 Zehgb35cfEa18VvDk6a6dP4" \
    --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 Zehgb35cfEa18VvDk6a6dP4",
    "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 Zehgb35cfEa18VvDk6a6dP4

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/4/epi-deliveries" \
    --header "Authorization: Bearer ef6dvPb8E3Zhg46Vk1Daca5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"et\",
    \"status\": \"expired\",
    \"epi_type_id\": \"architecto\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/4/epi-deliveries"
);

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

let body = {
    "q": "et",
    "status": "expired",
    "epi_type_id": "architecto"
};

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 ef6dvPb8E3Zhg46Vk1Daca5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 4

employee   string     

Employee UUID Example: quas

Body Parameters

q   string  optional    

Example: et

status   string  optional    

Example: expired

Must be one of:
  • valid
  • expiring
  • expired
epi_type_id   string  optional    

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

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/ut/epi-deliveries/pending-renewals-count" \
    --header "Authorization: Bearer 6kgdvDc6V8ZhP3fa5a1E4eb" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/ut/epi-deliveries/pending-renewals-count"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: ut

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 3

id   string     

EPI delivery UUID Example: totam

employee   string     

Employee UUID Example: fugit

Create employee EPI delivery

requires authentication employee-epi store

Register an EPI delivery for an employee

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/employees/1/epi-deliveries" \
    --header "Authorization: Bearer P6v1EfagcbD8a4k36eZhV5d" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"epi_type_id\": \"8616caa2-03e1-3751-8d22-419ffa173d3c\",
    \"delivery_date\": \"2024-01-01\",
    \"quantity\": 1,
    \"condition\": \"Example Condition\",
    \"delivered_by_employee_id\": \"38d51b1a-138f-4556-8c66-7c0eba36b5fb\",
    \"stock_id\": \"c9ba5675-0bf9-3f56-8892-7dfde3a6546d\",
    \"confirm_insufficient_stock\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/1/epi-deliveries"
);

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

let body = {
    "epi_type_id": "8616caa2-03e1-3751-8d22-419ffa173d3c",
    "delivery_date": "2024-01-01",
    "quantity": 1,
    "condition": "Example Condition",
    "delivered_by_employee_id": "38d51b1a-138f-4556-8c66-7c0eba36b5fb",
    "stock_id": "c9ba5675-0bf9-3f56-8892-7dfde3a6546d",
    "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 P6v1EfagcbD8a4k36eZhV5d

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: est

Body Parameters

epi_type_id   string     

Tipo de EPI. The uuid of an existing record in the epi_types table. Example: 8616caa2-03e1-3751-8d22-419ffa173d3c

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: 38d51b1a-138f-4556-8c66-7c0eba36b5fb

stock_id   string  optional    

Estoque. The uuid of an existing record in the stocks table. Example: c9ba5675-0bf9-3f56-8892-7dfde3a6546d

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/et/epi-deliveries/kit" \
    --header "Authorization: Bearer aD6vk6dc4Zh58b3EP1fagVe" \
    --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\": \"b744c6a9-f0ab-4e66-adae-98a974657422\",
    \"stock_id\": \"36d6b186-032a-309f-8246-dac8974699f2\",
    \"confirm_insufficient_stock\": true,
    \"items\": [
        {
            \"epi_type_id\": \"384b9676-922f-3324-95bc-3d5f57afb9ac\",
            \"quantity\": 1,
            \"condition\": \"Example Items * condition\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/et/epi-deliveries/kit"
);

const headers = {
    "Authorization": "Bearer aD6vk6dc4Zh58b3EP1fagVe",
    "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": "b744c6a9-f0ab-4e66-adae-98a974657422",
    "stock_id": "36d6b186-032a-309f-8246-dac8974699f2",
    "confirm_insufficient_stock": true,
    "items": [
        {
            "epi_type_id": "384b9676-922f-3324-95bc-3d5f57afb9ac",
            "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 aD6vk6dc4Zh58b3EP1fagVe

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: et

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: b744c6a9-f0ab-4e66-adae-98a974657422

stock_id   string  optional    

Estoque. The uuid of an existing record in the stocks table. Example: 36d6b186-032a-309f-8246-dac8974699f2

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: 384b9676-922f-3324-95bc-3d5f57afb9ac

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/saepe/epi-deliveries/quo/promote-to-kit" \
    --header "Authorization: Bearer 8fhEbed3Dv6kc61aPVZ54ga" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/saepe/epi-deliveries/quo/promote-to-kit"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: saepe

id   string     

EPI delivery UUID Example: quo

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/repudiandae" \
    --header "Authorization: Bearer 351aE8v6DdP6fbZckeV4ahg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"epi_type_id\": \"79836239-46be-301c-bf89-0415b3711327\",
    \"delivery_date\": \"2024-01-01\",
    \"quantity\": 1,
    \"condition\": \"Example Condition\",
    \"delivered_by_employee_id\": \"8ce48976-8445-4d0a-8fba-c0530253fcd9\",
    \"stock_id\": \"4c4032f1-68cb-36cd-843a-f418e6c5fb4b\",
    \"confirm_insufficient_stock\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/16/epi-deliveries/repudiandae"
);

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

let body = {
    "epi_type_id": "79836239-46be-301c-bf89-0415b3711327",
    "delivery_date": "2024-01-01",
    "quantity": 1,
    "condition": "Example Condition",
    "delivered_by_employee_id": "8ce48976-8445-4d0a-8fba-c0530253fcd9",
    "stock_id": "4c4032f1-68cb-36cd-843a-f418e6c5fb4b",
    "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 351aE8v6DdP6fbZckeV4ahg

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: repudiandae

employee   string     

Employee UUID Example: reprehenderit

Body Parameters

epi_type_id   string  optional    

Tipo de EPI. The uuid of an existing record in the epi_types table. Example: 79836239-46be-301c-bf89-0415b3711327

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: 8ce48976-8445-4d0a-8fba-c0530253fcd9

stock_id   string  optional    

Estoque. The uuid of an existing record in the stocks table. Example: 4c4032f1-68cb-36cd-843a-f418e6c5fb4b

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: ipsam

id   string     

EPI delivery UUID Example: consectetur

List employee EPI terms

requires authentication employee-epi index

List initial EPI kit terms for an employee

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/employees/4/epi-terms" \
    --header "Authorization: Bearer vDgdZVfP651a4E63khbcae8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sort_by\": \"delivery_date\",
    \"sort_desc\": false,
    \"page\": 49,
    \"per_page\": 6,
    \"q\": \"unde\",
    \"employee_id\": \"ut\",
    \"has_term\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/4/epi-terms"
);

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

let body = {
    "sort_by": "delivery_date",
    "sort_desc": false,
    "page": 49,
    "per_page": 6,
    "q": "unde",
    "employee_id": "ut",
    "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 vDgdZVfP651a4E63khbcae8

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 4

employee   string     

Employee UUID Example: possimus

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: 49

per_page   integer  optional    

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

q   string  optional    

Example: unde

employee_id   string  optional    

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

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/ut/epi-terms/45b8e5a6-4d12-37aa-8ec5-927b09f4fdb2/upload" \
    --header "Authorization: Bearer g5b48h6da3VZckDeEfv6aP1" \
    --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/ut/epi-terms/45b8e5a6-4d12-37aa-8ec5-927b09f4fdb2/upload"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: ut

kitUuid   string     

Kit UUID Example: 45b8e5a6-4d12-37aa-8ec5-927b09f4fdb2

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/sit/epi-terms/91b4c7b1-1680-3cd3-a6b2-4b6759b3903e/document" \
    --header "Authorization: Bearer cv5PZ1E8h64fa6ebdkDg3Va" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/sit/epi-terms/91b4c7b1-1680-3cd3-a6b2-4b6759b3903e/document"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: sit

kitUuid   string     

Kit UUID Example: 91b4c7b1-1680-3cd3-a6b2-4b6759b3903e

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/de770d9d-b756-34da-bc78-186cc79ac23c" \
    --header "Authorization: Bearer 8P4g665vbkdD3aeaVcZ1Efh" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/de770d9d-b756-34da-bc78-186cc79ac23c"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: de770d9d-b756-34da-bc78-186cc79ac23c

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/da01ff1f-db16-3434-aed9-ab46a7c854a3/info" \
    --header "Authorization: Bearer Peag6ka4cfbEdZ5h6v3V81D" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/da01ff1f-db16-3434-aed9-ab46a7c854a3/info"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: da01ff1f-db16-3434-aed9-ab46a7c854a3

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/4999e7ef-b6c2-32be-a8e2-4c51586e49d6/download" \
    --header "Authorization: Bearer 8vhZ3eaa6kd1PbEfgDV645c" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/4999e7ef-b6c2-32be-a8e2-4c51586e49d6/download"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

The UUID of the file to download Example: 4999e7ef-b6c2-32be-a8e2-4c51586e49d6

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 vE68aZ3cke16agDbV5Pfhd4" \
    --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 vE68aZ3cke16agDbV5Pfhd4",
    "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 vE68aZ3cke16agDbV5Pfhd4

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 ZV5gk63PeafavE684dcbD1h" \
    --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 ZV5gk63PeafavE684dcbD1h",
    "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 ZV5gk63PeafavE684dcbD1h

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 dVgE8c1564ZfavD3ek6abPh" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"nostrum\",
    \"document_type\": \"nfse\",
    \"supplier_id\": \"eum\",
    \"work_id\": \"qui\",
    \"start_date\": \"2026-09-30T09:24:14\",
    \"end_date\": \"2050-01-05\",
    \"per_page\": 4
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);

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

let body = {
    "q": "nostrum",
    "document_type": "nfse",
    "supplier_id": "eum",
    "work_id": "qui",
    "start_date": "2026-09-30T09:24:14",
    "end_date": "2050-01-05",
    "per_page": 4
};

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

Example response (200):


{
    "data": [
        {
            "id": "e220a30b-afc1-3741-bf74-66a5c4bb6f08",
            "document_type": "nfe",
            "document_type_label": "NF-e",
            "service_description": null,
            "nfe_access_key": "98378472765064585849983565623953362649611433",
            "nfe_number": "653526",
            "nfe_series": "11",
            "issue_date": "1975-09-02T03:00:00.000000Z",
            "total_value": "9121.00",
            "emit": {
                "cnpj": "90806919781677",
                "name": "Ullrich-Fay"
            },
            "dest": {
                "document": "66371613881418",
                "name": "Botsford, Jakubowski and Block"
            },
            "supplier": {
                "id": "a2dea342-a831-41b3-8d6d-d366a2d75e92",
                "name": "Noel Filipe da Silva",
                "document": "52.018.498/0001-13"
            },
            "financial_status": "pending",
            "products_imported_at": null,
            "created_at": null
        },
        {
            "id": "6cf7ec56-f1c1-3f34-b923-e9c5688ccf77",
            "document_type": "nfe",
            "document_type_label": "NF-e",
            "service_description": null,
            "nfe_access_key": "93941739987847575682347230318717013579849043",
            "nfe_number": "063419",
            "nfe_series": "05",
            "issue_date": "2016-10-26T02:00:00.000000Z",
            "total_value": "8192.27",
            "emit": {
                "cnpj": "20583921023777",
                "name": "Lemke-Hoppe"
            },
            "dest": {
                "document": "20111212464056",
                "name": "West, Boyer and Kirlin"
            },
            "supplier": {
                "id": "a2dea342-ae3e-4081-8210-bf67515def24",
                "name": "Sr. Márcio Maldonado Cruz Jr.",
                "document": "12.749.752/0001-39"
            },
            "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 dVgE8c1564ZfavD3ek6abPh

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: nostrum

document_type   string  optional    

Example: nfse

Must be one of:
  • nfe
  • nfse
supplier_id   string  optional    

The uuid of an existing record in the suppliers table. Example: eum

work_id   string  optional    

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

start_date   string  optional    

O campo value deve ser uma data válida. Example: 2026-09-30T09:24:14

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: 2050-01-05

per_page   integer  optional    

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

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 e1bd8D6fkh5a6aE4g3ZVPvc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"s3_file_path\": \"ut\",
    \"original_filename\": \".xml$\\/i\",
    \"work_ids\": [
        \"deleniti\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);

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

let body = {
    "s3_file_path": "ut",
    "original_filename": ".xml$\/i",
    "work_ids": [
        "deleniti"
    ]
};

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

Example response (201):


{
    "data": {
        "id": "45f497ff-4dbb-338c-ac8b-e218d2586650",
        "document_type": "nfe",
        "document_type_label": "NF-e",
        "service_description": null,
        "nfe_access_key": "90906362897715858088144502625884392442763148",
        "nfe_number": "313796",
        "nfe_series": "90",
        "issue_date": "2000-12-10T02:00:00.000000Z",
        "total_value": "4855.48",
        "emit": {
            "cnpj": "04440122391222",
            "name": "Beer, Grant and Bahringer"
        },
        "dest": {
            "document": "09067765749661",
            "name": "Hessel Ltd"
        },
        "supplier": {
            "id": "a2dea342-bcaf-449e-b377-163624e36365",
            "name": "Talita Estrada",
            "document": "07.484.285/0001-22"
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

POST api/fiscal-documents

Headers

Authorization        

Example: Bearer e1bd8D6fkh5a6aE4g3ZVPvc

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

s3_file_path   string     

Example: ut

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

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


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

Example response (200):


{
    "data": {
        "id": "e044ba7e-99d1-334e-8983-b43ef2de5bec",
        "document_type": "nfe",
        "document_type_label": "NF-e",
        "service_description": null,
        "nfe_access_key": "02598285223031948344940549447757186031372854",
        "nfe_number": "065342",
        "nfe_series": "82",
        "issue_date": "1986-12-28T02:00:00.000000Z",
        "total_value": "3496.91",
        "emit": {
            "cnpj": "02450820574381",
            "name": "Shields Ltd"
        },
        "dest": {
            "document": "25376371753208",
            "name": "Treutel-Toy"
        },
        "supplier": {
            "id": "a2dea342-c5d4-4722-923b-dc2fbb84d799",
            "name": "Eloah Valente Sobrinho",
            "document": "69.728.047/0001-72"
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

GET api/fiscal-documents/{fiscalDocument}

Headers

Authorization        

Example: Bearer E46DV65beh8ackvag3PfZ1d

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: numquam

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: qui

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/omnis/files" \
    --header "Authorization: Bearer ha866dbV3kPec5EgZvaD14f" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"file\": {
        \"path\": \"quae\",
        \"name\": \"cumque\",
        \"extension\": \"vel\"
    }
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents/omnis/files"
);

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

let body = {
    "file": {
        "path": "quae",
        "name": "cumque",
        "extension": "vel"
    }
};

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

Example response (200):


{
    "data": {
        "id": "2da9be1c-e9ec-30e8-8818-99022f94d078",
        "document_type": "nfe",
        "document_type_label": "NF-e",
        "service_description": null,
        "nfe_access_key": "36350371986390104654629258965461199805170488",
        "nfe_number": "027788",
        "nfe_series": "85",
        "issue_date": "1999-02-15T02:00:00.000000Z",
        "total_value": "600.25",
        "emit": {
            "cnpj": "94166268873544",
            "name": "Blanda, Durgan and Runolfsdottir"
        },
        "dest": {
            "document": "89640399018518",
            "name": "Mayert Inc"
        },
        "supplier": {
            "id": "a2dea342-d186-4007-9d96-33fc3e38d8da",
            "name": "Alessandro Teles Delgado Sobrinho",
            "document": "74.636.941/0001-52"
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

POST api/fiscal-documents/{fiscalDocument}/files

Headers

Authorization        

Example: Bearer ha866dbV3kPec5EgZvaD14f

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: omnis

Body Parameters

file   object     
path   string     

Example: quae

name   string     

Example: cumque

extension   string     

Example: vel

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/unde/files/accusantium" \
    --header "Authorization: Bearer 1cafaEhZ5668gde3kvVP4Db" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents/unde/files/accusantium"
);

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


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

Example response (200):


{
    "data": {
        "id": "f5568a9e-476c-313a-98bc-e7fbb7c540d7",
        "document_type": "nfe",
        "document_type_label": "NF-e",
        "service_description": null,
        "nfe_access_key": "51023845129985233746134785256384093978376510",
        "nfe_number": "255678",
        "nfe_series": "78",
        "issue_date": "2010-01-20T02:00:00.000000Z",
        "total_value": "2725.24",
        "emit": {
            "cnpj": "78899622520563",
            "name": "Gaylord-Okuneva"
        },
        "dest": {
            "document": "57110193692696",
            "name": "Rempel-Gulgowski"
        },
        "supplier": {
            "id": "a2dea342-da03-452c-a87b-b16d55622e2c",
            "name": "Thales Andres Santacruz Filho",
            "document": "00.453.965/0001-30"
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

DELETE api/fiscal-documents/{fiscalDocument}/files/{file}

Headers

Authorization        

Example: Bearer 1cafaEhZ5668gde3kvVP4Db

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: unde

file   string     

UUID do arquivo anexado Example: accusantium

Sync works

requires authentication fiscal-documents update

Sincroniza o vínculo documental da nota fiscal com N obras.

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents/est/works" \
    --header "Authorization: Bearer egf4PdV3kbE6aavDZhc5186" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"work_ids\": [
        \"doloremque\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents/est/works"
);

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

let body = {
    "work_ids": [
        "doloremque"
    ]
};

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

Example response (200):


{
    "data": {
        "id": "544bcc34-ada3-3870-87c3-3318cb76337a",
        "document_type": "nfe",
        "document_type_label": "NF-e",
        "service_description": null,
        "nfe_access_key": "27672571872530411896459949408006401797143551",
        "nfe_number": "058255",
        "nfe_series": "63",
        "issue_date": "2005-10-20T02:00:00.000000Z",
        "total_value": "2415.45",
        "emit": {
            "cnpj": "70480655853861",
            "name": "Rolfson-Bogisich"
        },
        "dest": {
            "document": "23840314479054",
            "name": "Gulgowski Inc"
        },
        "supplier": {
            "id": "a2dea342-e1dc-4869-8ed8-319564d37256",
            "name": "Sr. David das Dores",
            "document": "38.758.968/0001-54"
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

PUT api/fiscal-documents/{fiscalDocument}/works

Headers

Authorization        

Example: Bearer egf4PdV3kbE6aavDZhc5186

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: est

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/autem/installments" \
    --header "Authorization: Bearer 4agcf16Pda6ekZVDvb8E3h5" \
    --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/autem/installments"
);

const headers = {
    "Authorization": "Bearer 4agcf16Pda6ekZVDvb8E3h5",
    "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": "2f27a0f7-3ff9-3039-a39d-6c587fbc55af",
        "document_type": "nfe",
        "document_type_label": "NF-e",
        "service_description": null,
        "nfe_access_key": "50424530992259755591736101372341725672679367",
        "nfe_number": "598762",
        "nfe_series": "46",
        "issue_date": "2017-05-14T03:00:00.000000Z",
        "total_value": "7676.21",
        "emit": {
            "cnpj": "45384789758647",
            "name": "Reinger Inc"
        },
        "dest": {
            "document": "42650637064684",
            "name": "Parker Inc"
        },
        "supplier": {
            "id": "a2dea342-ea6b-4044-855e-a8120192da0f",
            "name": "Dr. Yuri Santacruz",
            "document": "74.967.166/0001-18"
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

POST api/fiscal-documents/{fiscalDocument}/installments

Headers

Authorization        

Example: Bearer 4agcf16Pda6ekZVDvb8E3h5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: autem

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 PZg4h5k3ad6va1b6VfeDc8E" \
    --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\": \"19a87860-4cdf-355e-9ab1-ea335c9c32b9\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/imports/nfe/products"
);

const headers = {
    "Authorization": "Bearer PZg4h5k3ad6va1b6VfeDc8E",
    "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": "19a87860-4cdf-355e-9ab1-ea335c9c32b9"
};

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 PZg4h5k3ad6va1b6VfeDc8E

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: 19a87860-4cdf-355e-9ab1-ea335c9c32b9

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 gVvce5dDPfEk6bha486aZ31" \
    --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 gVvce5dDPfEk6bha486aZ31",
    "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 gVvce5dDPfEk6bha486aZ31

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

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


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

Example response (200, Import details retrieved successfully):


{
    "import_id": "9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a",
    "status": "completed",
    "import_type": "nfe",
    "original_filename": "nota_fiscal_001.xml",
    "nfe_number": "123456",
    "nfe_date": "2023-12-01",
    "total_products": 15,
    "processed_products": 10,
    "progress_percentage": 66.67,
    "auto_linked_count": 4,
    "stock_launched_count": 7,
    "pending_stock_launch_count": 3,
    "imported_by": "João Silva",
    "imported_at": "2023-12-01T10:30:00.000Z",
    "supplier": {
        "id": "supplier-uuid",
        "name": "Fornecedor Ltda",
        "document": "12345678000199"
    },
    "channel": "import-progress.9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a"
}
 

Request      

GET api/imports/{importId}

Headers

Authorization        

Example: Bearer D86e6Pfda3Evkcg54h1ZabV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: optio

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: temporibus

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/officiis/products?sort_by=created_at&sort_desc=1&page=1&per_page=15&status=pending&q=Produto+ABC" \
    --header "Authorization: Bearer fE81v346edcagZDbP56hVak" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/imports/officiis/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 fE81v346edcagZDbP56hVak",
    "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 fE81v346edcagZDbP56hVak

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: officiis

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: explicabo

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/qui/products/link" \
    --header "Authorization: Bearer ZvfehVa8kE6g31bP4D6d5ac" \
    --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/qui/products/link"
);

const headers = {
    "Authorization": "Bearer ZvfehVa8kE6g31bP4D6d5ac",
    "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 b5P86v1a6VZfagehEc4dk3D" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sort_by\": \"omnis\",
    \"sort_desc\": false,
    \"page\": 23,
    \"per_page\": 23
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/locations/states"
);

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

let body = {
    "sort_by": "omnis",
    "sort_desc": false,
    "page": 23,
    "per_page": 23
};

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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "eius soluta",
            "abbreviation": "XC"
        },
        {
            "id": null,
            "name": "illum sint",
            "abbreviation": "IP"
        }
    ],
    "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 b5P86v1a6VZfagehEc4dk3D

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

sort_by   string  optional    

Example: omnis

sort_desc   boolean  optional    

Example: false

page   integer  optional    

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

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "West Antoinettemouth"
        },
        {
            "id": null,
            "name": "Port Kayliemouth"
        }
    ]
}
 

Request      

GET api/locations/states/{state}/cities

Headers

Authorization        

Example: Bearer aVD4h6v6aZPkebc81dEf5g3

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 fgkbP66a13e8da5vDEZ4hcV" \
    --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 fgkbP66a13e8da5vDEZ4hcV",
    "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 fgkbP66a13e8da5vDEZ4hcV

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

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 veP56Zd1gD6cEVfa4hab83k" \
    --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 veP56Zd1gD6cEVfa4hab83k",
    "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 veP56Zd1gD6cEVfa4hab83k

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 P3Zad6fE4eVbgcDv16akh85" \
    --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 P3Zad6fE4eVbgcDv16akh85",
    "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 P3Zad6fE4eVbgcDv16akh85

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 f6PD1ZE86hb54Ve3vkadgca" \
    --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 f6PD1ZE86hb54Ve3vkadgca",
    "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 f6PD1ZE86hb54Ve3vkadgca

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=ut&document=incidunt&work_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&bank_account_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3" \
    --header "Authorization: Bearer PchfEvaZ1gb56Da348kedV6" \
    --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": "ut",
    "document": "incidunt",
    "work_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
    "bank_account_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "3408123f-e6a0-3607-8d6f-ee2f729b6daa",
            "receipt_number": "REC-3103",
            "receiver_type": "custom",
            "receiver": {
                "id": null,
                "name": "Devon Nolan",
                "document": "725.411.795-52"
            },
            "payment": {
                "amount": 9849.56,
                "amount_in_words": "Valor por extenso de teste",
                "method": "bank_transfer",
                "description": "Et qui dolores omnis nemo fuga harum amet."
            },
            "issuer": {
                "name": "Ullrich Ltd",
                "document": "86.681.060/1504-79"
            },
            "issue": {
                "date": "2026-09-17",
                "city": "Lake Estachester",
                "state": "BA"
            },
            "created_by": {
                "id": "a2dea343-1709-4b77-b9f5-7fd1cddbd9ba",
                "name": "Dr. Brad Feil"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "0bfa013f-219b-3eb9-aa0d-d894eb72ec69",
            "receipt_number": "REC-4711",
            "receiver_type": "employee",
            "receiver": {
                "id": null,
                "name": "Dr. Delmer Hahn III",
                "document": "402.717.507-89"
            },
            "payment": {
                "amount": 6733.69,
                "amount_in_words": "Valor por extenso de teste",
                "method": "pix",
                "description": "Quo fuga alias voluptatem et et omnis in."
            },
            "issuer": {
                "name": "McKenzie Ltd",
                "document": "13.300.629/3337-60"
            },
            "issue": {
                "date": "2026-09-01",
                "city": "Davismouth",
                "state": "GO"
            },
            "created_by": {
                "id": "a2dea343-1b31-4654-b344-55df158518b6",
                "name": "Ludwig Beer"
            },
            "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 PchfEvaZ1gb56Da348kedV6

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: ut

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

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=voluptas&document=blanditiis&work_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&bank_account_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3" \
    --header "Authorization: Bearer kbVv6hfa68P1edZED3a45gc" \
    --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": "voluptas",
    "document": "blanditiis",
    "work_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
    "bank_account_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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: voluptas

document   string  optional    

Example: blanditiis

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

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 a8Zhef41PaE6vd3bVckD56g" \
    --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 a8Zhef41PaE6vd3bVckD56g",
    "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 a8Zhef41PaE6vd3bVckD56g

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 1ahg6cPZ53afDV6kdeE48vb" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"methods\": [
        {
            \"method\": \"pix\",
            \"eligible\": false
        }
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payment-receipts/cash-flow-config"
);

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

let body = {
    "methods": [
        {
            "method": "pix",
            "eligible": false
        }
    ]
};

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

Request      

PUT api/payment-receipts/cash-flow-config

Headers

Authorization        

Example: Bearer 1ahg6cPZ53afDV6kdeE48vb

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: pix

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

Example: false

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


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

Example response (200):


{
    "data": {
        "id": "86890125-3952-36b1-b795-35e52ec0fd10",
        "receipt_number": "REC-1831",
        "receiver_type": "custom",
        "receiver": {
            "id": null,
            "name": "Prof. Herminio Robel DDS",
            "document": "212.095.149-63"
        },
        "payment": {
            "amount": 6553.85,
            "amount_in_words": "Valor por extenso de teste",
            "method": "check",
            "description": "Quia doloribus ullam mollitia magni esse vitae et."
        },
        "issuer": {
            "name": "Robel, Dare and Olson",
            "document": "89.057.472/7243-41"
        },
        "issue": {
            "date": "2026-09-19",
            "city": "West Yoshikoton",
            "state": "CE"
        },
        "created_by": {
            "id": "a2dea343-3433-490d-8caa-45ee5583e464",
            "name": "Reginald Kohler"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/payment-receipts/{receipt}

Headers

Authorization        

Example: Bearer 8aE64k16aD5hZbdgeVP3vfc

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 Dh1b586eavkPfEg3c46aVZd" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"receiver_type\": \"Example Receiver type\",
    \"employee_id\": \"97cd730e-1788-486a-8eff-245c31b93873\",
    \"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\": \"4a328586-098e-3940-8a0f-453b3f2f17f3\",
    \"bank_account_id\": \"8a3d3633-8f09-3e8b-9651-c7839c00da6a\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payment-receipts"
);

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

let body = {
    "receiver_type": "Example Receiver type",
    "employee_id": "97cd730e-1788-486a-8eff-245c31b93873",
    "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": "4a328586-098e-3940-8a0f-453b3f2f17f3",
    "bank_account_id": "8a3d3633-8f09-3e8b-9651-c7839c00da6a"
};

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 Dh1b586eavkPfEg3c46aVZd

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: 97cd730e-1788-486a-8eff-245c31b93873

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: 4a328586-098e-3940-8a0f-453b3f2f17f3

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: 8a3d3633-8f09-3e8b-9651-c7839c00da6a

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 d1Vhvk8egacbf645EZ36aPD" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"receiver_type\": \"Example Receiver type\",
    \"employee_id\": \"28eb5725-7af4-4e1d-86cb-e5ee61755d05\",
    \"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\": \"6abdbfff-3e90-33ae-987d-f1db767d3ecd\",
    \"bank_account_id\": \"2405bb27-ffb1-3b2e-b47d-510e88d7dbbd\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32"
);

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

let body = {
    "receiver_type": "Example Receiver type",
    "employee_id": "28eb5725-7af4-4e1d-86cb-e5ee61755d05",
    "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": "6abdbfff-3e90-33ae-987d-f1db767d3ecd",
    "bank_account_id": "2405bb27-ffb1-3b2e-b47d-510e88d7dbbd"
};

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 d1Vhvk8egacbf645EZ36aPD

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: 28eb5725-7af4-4e1d-86cb-e5ee61755d05

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: 6abdbfff-3e90-33ae-987d-f1db767d3ecd

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: 2405bb27-ffb1-3b2e-b47d-510e88d7dbbd

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 bvghaeV6346PcD8kZ5f1aEd" \
    --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 bvghaeV6346PcD8kZ5f1aEd",
    "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 bvghaeV6346PcD8kZ5f1aEd

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "8a605c82-744c-3226-9099-727ffaf35a8c",
            "receipt_number": "REC-0550",
            "receiver_type": "employee",
            "receiver": {
                "id": null,
                "name": "Hattie Cartwright",
                "document": "858.723.272-86"
            },
            "payment": {
                "amount": 5677.5,
                "amount_in_words": "Valor por extenso de teste",
                "method": "pix",
                "description": "Ad iure accusantium quo cumque."
            },
            "issuer": {
                "name": "Jerde PLC",
                "document": "74.944.811/7863-29"
            },
            "issue": {
                "date": "2026-09-19",
                "city": "Lake Moniquetown",
                "state": "SP"
            },
            "created_by": {
                "id": "a2dea343-654d-4f6c-b5f7-506e09227f8e",
                "name": "Nyah Shields Sr."
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "f2d05388-6e8b-3e85-b6dd-30f869577b61",
            "receipt_number": "REC-4991",
            "receiver_type": "employee",
            "receiver": {
                "id": null,
                "name": "Miss Lempi Moen",
                "document": "005.238.097-84"
            },
            "payment": {
                "amount": 4445.74,
                "amount_in_words": "Valor por extenso de teste",
                "method": "cash",
                "description": "Animi dolores laboriosam quos iusto distinctio."
            },
            "issuer": {
                "name": "Leannon-Weimann",
                "document": "51.975.568/7048-14"
            },
            "issue": {
                "date": "2026-09-27",
                "city": "Webertown",
                "state": "RJ"
            },
            "created_by": {
                "id": "a2dea343-67f1-4328-9822-582302c2c46b",
                "name": "Noelia Boehm"
            },
            "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 Ea4vbecZkD6P6hVf5d138ga

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 1

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


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

Example response (200):


{
    "data": [
        {
            "id": "573170dc-4a61-3b0b-8ee2-d2f54b8e26aa",
            "name": "fuga",
            "display_name": "Et fugiat amet consequatur id."
        },
        {
            "id": "97a545e1-3b28-3705-9d86-a603953b56df",
            "name": "quae",
            "display_name": "Ullam animi facilis qui in assumenda porro."
        }
    ],
    "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 hPefk45cgZaVdav368b16DE

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


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

Example response (200):


{
    "data": [
        {
            "id": "28297d92-bc48-3660-ae97-e3f65dff662a",
            "name": "omnis-nam-ducimus",
            "display_name": "repudiandae ducimus aut",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "a2e37ae6-81d4-3ae7-9811-875d7b8597cc",
            "name": "perferendis-quo-excepturi",
            "display_name": "asperiores blanditiis rerum",
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&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 386eaPa4E6cVZbvD1fkhg5d

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 kcd6gfZ35aDP86EbVav41eh" \
    --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 kcd6gfZ35aDP86EbVav41eh",
    "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 kcd6gfZ35aDP86EbVav41eh

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 vgdh46EVD16aPc3bkfaZe85" \
    --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 vgdh46EVD16aPc3bkfaZe85",
    "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 vgdh46EVD16aPc3bkfaZe85

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


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

Example response (200):


{
    "data": {
        "id": "687541a1-5707-39ae-82a2-9ac677e2e1f1",
        "name": "ut-eos",
        "display_name": "eius quia sequi",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/permission-groups/{permissionGroup}

Headers

Authorization        

Example: Bearer 4ak5db3P1D6efgvZhcaVE86

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 bd6c4fE68DahV35ekvagP1Z" \
    --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 bd6c4fE68DahV35ekvagP1Z",
    "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 bd6c4fE68DahV35ekvagP1Z

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 5vePha4aZ1fg866DcEbk3dV" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [
        \"6ceda80a-1f34-3899-b828-e6354886404a\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);

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

let body = {
    "permissions": [
        "6ceda80a-1f34-3899-b828-e6354886404a"
    ]
};

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

Example response (200):


{
    "data": {
        "id": "f292878d-b788-31d2-93a4-a9d362c4805b",
        "name": "ratione-earum",
        "display_name": "nostrum suscipit qui",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/permission-groups/{permissionGroup}/permissions

Headers

Authorization        

Example: Bearer 5vePha4aZ1fg866DcEbk3dV

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 Dvf5e1aZ6bE4kPa86cVg3hd" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [
        \"fab3e4ba-5a5e-3dd2-abf0-124c7899615a\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);

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

let body = {
    "permissions": [
        "fab3e4ba-5a5e-3dd2-abf0-124c7899615a"
    ]
};

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

Example response (200):


{
    "data": {
        "id": "cad270b0-112e-36ac-a68b-10960352cf2c",
        "name": "culpa-a",
        "display_name": "animi amet veniam",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

DELETE api/permission-groups/{permissionGroup}/permissions

Headers

Authorization        

Example: Bearer Dvf5e1aZ6bE4kPa86cVg3hd

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


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

Example response (200):


{
    "data": [
        {
            "id": "74cd2cb7-94f1-3291-a659-f2996f672dd1",
            "name": "Estêvão Escobar Zamana",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "dec3c296-31a9-3b23-91c9-3f3c19561cb3",
            "name": "Nathalia Ávila Domingues",
            "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 cb65ghav6kaZde81DVfPE43

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

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


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

Example response (200):


{
    "data": {
        "id": "da6c3712-4a07-3d64-8b9f-df31037e072a",
        "name": "Srta. Agatha Cortês Santana Sobrinho",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-brands/{productBrand}

Headers

Authorization        

Example: Bearer Z36abPE1feD6V8hdg5cak4v

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: mollitia

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 ghav3DP1ZfV6ba8Eeck654d" \
    --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 ghav3DP1ZfV6ba8Eeck654d",
    "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 ghav3DP1ZfV6ba8Eeck654d

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: quaerat

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: autem

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


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

Example response (200):


{
    "data": [
        {
            "id": "6d49f825-55de-3ef2-8966-9d71ae2e6508",
            "name": "Sr. Willian Fontes Neto",
            "is_epi": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "f11a7cbf-64f6-3cd4-b72c-32a8258a0fe1",
            "name": "Christopher Arruda",
            "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 hZ438PEa6fbV1kDeg6d5avc

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

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


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

Example response (200):


{
    "data": {
        "id": "a28bc25b-1713-32ba-91f5-e513d8820bad",
        "name": "Augusto Murilo Velasques Neto",
        "is_epi": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-families/{productFamily}

Headers

Authorization        

Example: Bearer gE6a43e6fPvcd5bha8Z1kVD

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: impedit

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 hPVb68a6Zgekfvd15aE4D3c" \
    --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 hPVb68a6Zgekfvd15aE4D3c",
    "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 hPVb68a6Zgekfvd15aE4D3c

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/quidem" \
    --header "Authorization: Bearer 646dPeVbcfghk8Ea5Za3vD1" \
    --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/quidem"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: quidem

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: quia

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 D8acgE5VZah46fvdke16bP3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"Example Q\",
    \"work_id\": \"56ceaae0-1bdc-3f09-93d2-7d1f0a668b7c\",
    \"user_id\": \"964b39b7-20fb-3e20-87b0-d896d0547917\",
    \"responsible_id\": \"6df813a4-8fc4-3d7e-b7cc-f7e851585175\",
    \"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 D8acgE5VZah46fvdke16bP3",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "q": "Example Q",
    "work_id": "56ceaae0-1bdc-3f09-93d2-7d1f0a668b7c",
    "user_id": "964b39b7-20fb-3e20-87b0-d896d0547917",
    "responsible_id": "6df813a4-8fc4-3d7e-b7cc-f7e851585175",
    "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": "de67655a-60f8-395a-9faa-0bbb0095eefb",
            "name": "Eum expedita recusandae perferendis.",
            "description": null,
            "work": {
                "id": "a2dea343-ebb5-464f-94b4-54c172703018",
                "name": "Anita Ornela Maldonado"
            },
            "user": {
                "id": "a2dea343-f06d-406f-9433-600ff2ecd321",
                "name": "Florine Predovic"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "affbb8ae-39cd-3419-8127-0af8f7a02317",
            "name": "Omnis doloribus officiis.",
            "description": "Totam laboriosam quo occaecati sed eum blanditiis praesentium. Voluptatibus aut et voluptatem aut. Excepturi assumenda recusandae aspernatur alias ut architecto. Praesentium animi quidem id sint nihil omnis ut.",
            "work": {
                "id": "a2dea343-f3c6-48b2-8414-add8602bd10d",
                "name": "Dr. Michael Mascarenhas"
            },
            "user": {
                "id": "a2dea343-f57a-445d-b909-a64c9ba8dc0b",
                "name": "Jeanne Bosco"
            },
            "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 D8acgE5VZah46fvdke16bP3

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: 56ceaae0-1bdc-3f09-93d2-7d1f0a668b7c

user_id   string  optional    

Usuário. The uuid of an existing record in the users table. Example: 964b39b7-20fb-3e20-87b0-d896d0547917

responsible_id   string  optional    

Responsável. The uuid of an existing record in the users table. Example: 6df813a4-8fc4-3d7e-b7cc-f7e851585175

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

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


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

Example response (200):


{
    "data": {
        "id": "18a84c23-aa49-357f-b9ff-6d4b1c090b68",
        "name": "Ullam tempore est repellendus iure.",
        "description": null,
        "work": {
            "id": "a2dea343-f9ec-4bea-9af0-3bfda663ea05",
            "name": "Noelí Mirella Bezerra"
        },
        "user": {
            "id": "a2dea343-fbb0-499b-a114-5d6e8385d4a9",
            "name": "Ms. Emmalee Luettgen III"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-quantity-lists/{productQuantityList}

Headers

Authorization        

Example: Bearer dfD83cavk66VgE54Zha1Peb

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: ut

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/quia/items" \
    --header "Authorization: Bearer ef6cZa4gh681D5b3vVadPEk" \
    --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/quia/items"
);

const headers = {
    "Authorization": "Bearer ef6cZa4gh681D5b3vVadPEk",
    "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": "71800394-0000-3eed-b316-0fc4c9b13b40",
            "product": {
                "id": "a2dea344-0f4f-48c1-812e-d37b1730cde5",
                "name": "Dirce Emília Paes Filho",
                "code": "PRD-141259",
                "unit": {
                    "id": "a2dea344-0ddb-4003-ad24-672c5511cdf6",
                    "name": "Melinda Azevedo Duarte Jr.",
                    "abbreviation": "Srta. Aparecida Queirós"
                }
            },
            "quantity": 296.4619,
            "observation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "4ae93a21-84c9-3880-bb9f-fd9649faca48",
            "product": {
                "id": "a2dea344-1dbc-48c2-a738-7ec5fd3e69eb",
                "name": "Srta. Juliane Corona Filho",
                "code": "PRD-649192",
                "unit": {
                    "id": "a2dea344-1cf6-443a-8d34-d25c3ec7a6f4",
                    "name": "Dr. Samuel Feliciano Filho",
                    "abbreviation": "Gustavo Emílio Saito"
                }
            },
            "quantity": 445.1874,
            "observation": "Voluptas et fugit sunt nihil sit nostrum recusandae dolores.",
            "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 ef6cZa4gh681D5b3vVadPEk

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: quia

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 cbE5ea4gvkfZ86d3D6haV1P" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"0be2a5ce-f52d-3fad-bbc8-89c2c7a75f85\",
    \"items\": [
        {
            \"product_id\": \"ca5c6608-d690-3a25-be0e-6af4c65452b7\",
            \"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 cbE5ea4gvkfZ86d3D6haV1P",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "0be2a5ce-f52d-3fad-bbc8-89c2c7a75f85",
    "items": [
        {
            "product_id": "ca5c6608-d690-3a25-be0e-6af4c65452b7",
            "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 cbE5ea4gvkfZ86d3D6haV1P

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: 0be2a5ce-f52d-3fad-bbc8-89c2c7a75f85

items   object[]  optional    

Itens.

product_id   string     

Produto. The uuid of an existing record in the products table. Example: ca5c6608-d690-3a25-be0e-6af4c65452b7

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/quo" \
    --header "Authorization: Bearer 6bev6g1E485daPckZDf3ahV" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"items\": [
        {
            \"id\": \"301ee7a6-c85d-3a63-97ec-beeeeabc4776\",
            \"product_id\": \"820f15f8-ac48-317b-9a55-112d1a1074ad\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/quo"
);

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

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "items": [
        {
            "id": "301ee7a6-c85d-3a63-97ec-beeeeabc4776",
            "product_id": "820f15f8-ac48-317b-9a55-112d1a1074ad",
            "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 6bev6g1E485daPckZDf3ahV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: quo

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: 301ee7a6-c85d-3a63-97ec-beeeeabc4776

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 820f15f8-ac48-317b-9a55-112d1a1074ad

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: quod

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/ex/items" \
    --header "Authorization: Bearer k6EVP618ad5gvbf4Dae3hcZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"product_id\": \"a78d03f1-c864-3705-9460-1df9170c4a0c\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/ex/items"
);

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

let body = {
    "items": [
        {
            "product_id": "a78d03f1-c864-3705-9460-1df9170c4a0c",
            "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 k6EVP618ad5gvbf4Dae3hcZ

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: ex

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: a78d03f1-c864-3705-9460-1df9170c4a0c

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/dicta" \
    --header "Authorization: Bearer 6f5b3e46DEgaav1dP8hkZcV" \
    --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/dicta"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: dicta

item   string     

Product Quantity List Item UUID Example: unde

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/eum/items" \
    --header "Authorization: Bearer e8Dacfg65436kEZdvh1PbaV" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        \"3dc932e8-4f20-3ec0-acd8-fb25341a3654\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/eum/items"
);

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

let body = {
    "items": [
        "3dc932e8-4f20-3ec0-acd8-fb25341a3654"
    ]
};

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 e8Dacfg65436kEZdvh1PbaV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: eum

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/at/sync-items" \
    --header "Authorization: Bearer DE4cbfvV8P6k5d63a1Zgeha" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"id\": \"d42b13ed-84c4-33c2-84e1-44bddc3b7e5d\",
            \"product_id\": \"3078f795-58cf-3953-8f0d-da4bfc904ce5\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/at/sync-items"
);

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

let body = {
    "items": [
        {
            "id": "d42b13ed-84c4-33c2-84e1-44bddc3b7e5d",
            "product_id": "3078f795-58cf-3953-8f0d-da4bfc904ce5",
            "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 DE4cbfvV8P6k5d63a1Zgeha

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: at

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: d42b13ed-84c4-33c2-84e1-44bddc3b7e5d

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 3078f795-58cf-3953-8f0d-da4bfc904ce5

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/quisquam/fulfill" \
    --header "Authorization: Bearer 6a4gPeh56dbVDkcaEfv31Z8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"fulfillment_type\": \"Example Fulfillment type\",
    \"stock_id\": \"ea20655c-0adb-31b0-b927-ede05992f9b4\",
    \"quantity\": 1,
    \"source_stock_id\": \"a4b31c03-8f97-3f77-9a73-0ab0eda91c88\",
    \"reason\": \"Example Reason\",
    \"origins\": [
        {
            \"supplier_product_id\": \"fcb65483-61ba-35fb-a6f5-1c8445af5304\",
            \"quantity\": 1
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/items/quisquam/fulfill"
);

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

let body = {
    "fulfillment_type": "Example Fulfillment type",
    "stock_id": "ea20655c-0adb-31b0-b927-ede05992f9b4",
    "quantity": 1,
    "source_stock_id": "a4b31c03-8f97-3f77-9a73-0ab0eda91c88",
    "reason": "Example Reason",
    "origins": [
        {
            "supplier_product_id": "fcb65483-61ba-35fb-a6f5-1c8445af5304",
            "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 6a4gPeh56dbVDkcaEfv31Z8

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

item   string     

Product Request Item UUID Example: quisquam

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: ea20655c-0adb-31b0-b927-ede05992f9b4

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: a4b31c03-8f97-3f77-9a73-0ab0eda91c88

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: fcb65483-61ba-35fb-a6f5-1c8445af5304

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/consequuntur/fulfillments" \
    --header "Authorization: Bearer cbk3e14V65ED8vadgfZPah6" \
    --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/consequuntur/fulfillments"
);

const headers = {
    "Authorization": "Bearer cbk3e14V65ED8vadgfZPah6",
    "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": "5bde1675-0f29-3151-8eb2-30a3b5a51db8",
            "quantity": 91.8227,
            "fulfilled_at": "2026-09-04T11:32:29.000000Z",
            "created_at": null
        },
        {
            "id": "9b85b530-1c08-33d3-a06d-2502e747aa44",
            "quantity": 88.6151,
            "fulfilled_at": "2026-09-19T01:25:08.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 cbk3e14V65ED8vadgfZPah6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

item   string     

Product Request Item UUID Example: consequuntur

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

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


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

Example response (200):


{
    "data": {
        "id": "6951e9d1-5c29-3721-bc08-ffae8d1a7cf0",
        "product": {
            "id": "a2dea348-4557-40bf-a6c2-d355c5712fd2",
            "name": "Eliane Cervantes Corona Filho",
            "code": "PRD-521652",
            "unit": {
                "id": "a2dea348-435d-42cd-be4c-c6b78e1bc7d0",
                "name": "Dr. Fabiana Noelí Sanches Jr.",
                "abbreviation": "Poliana Amaral Reis"
            }
        },
        "quantity": 333.781,
        "quantity_fulfilled": 0,
        "quantity_pending": 333.781,
        "is_fulfilled": false,
        "is_partially_fulfilled": false,
        "observation": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-requests/items/{id}

Headers

Authorization        

Example: Bearer 85Db1hfadgVaZcPevE36k64

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: odit

item   string     

Product Request Item UUID Example: et

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/iste/pending-items" \
    --header "Authorization: Bearer aVac1fd5k84E6Ze3v6DbghP" \
    --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/iste/pending-items"
);

const headers = {
    "Authorization": "Bearer aVac1fd5k84E6Ze3v6DbghP",
    "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": "f3828955-f376-36b4-beb7-918c9b0ef02f",
            "product": {
                "id": "a2dea348-5d78-469c-81c5-0af8b48fcdde",
                "name": "Sra. Suelen Luísa Fontes Sobrinho",
                "code": "PRD-329763",
                "unit": {
                    "id": "a2dea348-5c07-4f8d-a1a8-5132e55576b8",
                    "name": "Simon Ramires Maldonado",
                    "abbreviation": "Marcos Reis"
                }
            },
            "quantity": 283.6368,
            "quantity_fulfilled": 0,
            "quantity_pending": 283.6368,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "0d59a80b-ba3c-34fa-bb64-bd70084aa26a",
            "product": {
                "id": "a2dea348-6f41-4f34-936f-1bdb4d135c6f",
                "name": "Alessandro Colaço Zamana",
                "code": "PRD-836432",
                "unit": {
                    "id": "a2dea348-6e4b-4f07-9c45-a12a491466cf",
                    "name": "Marília Campos",
                    "abbreviation": "Dr. Benício Cezar Vieira"
                }
            },
            "quantity": 374.0886,
            "quantity_fulfilled": 0,
            "quantity_pending": 374.0886,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "Placeat numquam officia et autem unde excepturi eum.",
            "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 aVac1fd5k84E6Ze3v6DbghP

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: iste

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "8036f829-7e3e-3a2a-b1cd-d16259b0d763",
            "product": {
                "id": "a2dea348-8435-4730-8f64-362d2bbc2e3d",
                "name": "Josefina Lira",
                "code": "PRD-021476",
                "unit": {
                    "id": "a2dea348-82e7-4a8f-9c29-37e3661f5713",
                    "name": "Dr. Fábio Rezende Tamoio",
                    "abbreviation": "Srta. Regiane Cervantes"
                }
            },
            "quantity": 636.0271,
            "quantity_fulfilled": 0,
            "quantity_pending": 636.0271,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "0da0128c-bb7d-37f4-b56e-5a543474fc80",
            "product": {
                "id": "a2dea348-9719-4ef7-8b7b-828377325d26",
                "name": "Sra. Noelí Janaina Aragão",
                "code": "PRD-242847",
                "unit": {
                    "id": "a2dea348-9591-450f-9fbc-13c55ec6193a",
                    "name": "Dr. Daniel Prado",
                    "abbreviation": "Sr. Ziraldo Pontes"
                }
            },
            "quantity": 307.5143,
            "quantity_fulfilled": 0,
            "quantity_pending": 307.5143,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": null,
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/product-requests/pending-by-product/{product}

Headers

Authorization        

Example: Bearer ghaZ6Ev1k8cVa5eb64fdPD3

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: at

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 36a648gDZ5keb1hafdEPvVc" \
    --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\": \"6257f20c-587f-3112-81c0-52a315eab03a\",
    \"work_location_id\": \"47c0ff38-43cb-3e80-aa84-a2b5afe1ae1f\",
    \"user_id\": \"a94a8244-6c34-3df7-a5bf-02d7b9bde4d3\",
    \"status_id\": \"38655c72-c30d-3582-aba9-0ade3330afef\",
    \"priority\": \"Example Priority\",
    \"needed_at_from\": \"Example Needed at from\",
    \"needed_at_to\": \"Example Needed at to\",
    \"responsible_id\": \"24a76a1c-b2ec-38e8-b3b9-ef9a83405f2a\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests"
);

const headers = {
    "Authorization": "Bearer 36a648gDZ5keb1hafdEPvVc",
    "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": "6257f20c-587f-3112-81c0-52a315eab03a",
    "work_location_id": "47c0ff38-43cb-3e80-aa84-a2b5afe1ae1f",
    "user_id": "a94a8244-6c34-3df7-a5bf-02d7b9bde4d3",
    "status_id": "38655c72-c30d-3582-aba9-0ade3330afef",
    "priority": "Example Priority",
    "needed_at_from": "Example Needed at from",
    "needed_at_to": "Example Needed at to",
    "responsible_id": "24a76a1c-b2ec-38e8-b3b9-ef9a83405f2a"
};

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

Example response (200):


{
    "data": [
        {
            "id": "259c2cb5-fe89-3142-87e0-eea39faedaf5",
            "code": null,
            "name": "Nisi et enim ab.",
            "description": null,
            "work": {
                "id": "a2dea345-5f7a-4779-b3df-1e3ed9fab58a",
                "name": "Malena Fernandes Furtado Neto"
            },
            "user": {
                "id": "a2dea345-62d3-4ad3-9651-13d06c254d45",
                "name": "Dr. Ayana Volkman I"
            },
            "status": {
                "id": "a2dea345-64f6-4e54-a3f6-121ea78d50e0",
                "slug": null,
                "name": null,
                "description": "Srta. Tatiana Oliveira Rivera Jr.",
                "abbreviation": "aperiam",
                "color": "#6d1cde",
                "text_color": "#9c4183"
            },
            "priority": "low",
            "priority_label": "Baixa",
            "needed_at": "2026-10-27",
            "approved_at": null,
            "rejection_reason": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "4c9a0b18-2668-3b35-8564-5e30025953d1",
            "code": null,
            "name": "Tempora fuga sed eius.",
            "description": "Odio suscipit quaerat sit omnis minus delectus corrupti velit. Dicta voluptatem nemo culpa et laborum fugiat et ipsum. Qui fugiat et dicta quis.",
            "work": {
                "id": "a2dea345-69b3-42bb-90fc-70595be0766c",
                "name": "Noel de Freitas Neto"
            },
            "user": {
                "id": "a2dea345-6d2d-4df9-8952-e348ff0fd069",
                "name": "Jacquelyn Renner"
            },
            "status": {
                "id": "a2dea345-6f4b-47fe-a9f1-4286adc9a0c7",
                "slug": null,
                "name": null,
                "description": "Dr. Mário Teles Lozano",
                "abbreviation": "ut",
                "color": "#48f531",
                "text_color": "#6fcde2"
            },
            "priority": "urgent",
            "priority_label": "Urgente",
            "needed_at": "2026-10-08",
            "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 36a648gDZ5keb1hafdEPvVc

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: 6257f20c-587f-3112-81c0-52a315eab03a

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: 47c0ff38-43cb-3e80-aa84-a2b5afe1ae1f

user_id   string  optional    

Usuário. The uuid of an existing record in the users table. Example: a94a8244-6c34-3df7-a5bf-02d7b9bde4d3

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 38655c72-c30d-3582-aba9-0ade3330afef

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: 24a76a1c-b2ec-38e8-b3b9-ef9a83405f2a

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

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


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

Example response (200):


{
    "data": {
        "id": "785e4e5d-8b0c-3554-a01b-97911f10d97b",
        "code": null,
        "name": "Qui est ipsam.",
        "description": null,
        "work": {
            "id": "a2dea345-7855-4b00-a840-242731c2db22",
            "name": "Andréia Paulina Bezerra Sobrinho"
        },
        "user": {
            "id": "a2dea345-7b21-46fe-ab20-da01805c2807",
            "name": "Dr. Gina Ullrich Sr."
        },
        "status": {
            "id": "a2dea345-7ce3-4f0b-9ff8-120b18db3148",
            "slug": null,
            "name": null,
            "description": "Sra. Ariane Beatriz Matias Sobrinho",
            "abbreviation": "quae",
            "color": "#fed039",
            "text_color": "#3b830a"
        },
        "priority": "medium",
        "priority_label": "Média",
        "needed_at": "2026-10-25",
        "approved_at": null,
        "rejection_reason": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-requests/{productRequest}

Headers

Authorization        

Example: Bearer DZ3fehaa5Ek6VPvd16b8c4g

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: dolores

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/esse/items" \
    --header "Authorization: Bearer 1EPdkg5DV8v6fbha6a34Zec" \
    --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/esse/items"
);

const headers = {
    "Authorization": "Bearer 1EPdkg5DV8v6fbha6a34Zec",
    "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": "5c2192fe-4441-3e8c-bca1-be3a2f309aff",
            "product": {
                "id": "a2dea345-9826-480e-93ed-f0e732fb2a46",
                "name": "Dr. Márcio Marcelo Vasques Neto",
                "code": "PRD-212730",
                "unit": {
                    "id": "a2dea345-970f-4ab9-a879-c22df2fd8a87",
                    "name": "Dr. Elis Gomes Rivera",
                    "abbreviation": "Márcia Lidiane Souza"
                }
            },
            "quantity": 516.4596,
            "quantity_fulfilled": 0,
            "quantity_pending": 516.4596,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "Qui similique sed magni quam consequatur adipisci fugiat.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "bd40534f-b208-3aad-8bda-0707506d7836",
            "product": {
                "id": "a2dea345-a91e-4bac-88b9-218c9c6f2f5b",
                "name": "Srta. Luana Gonçalves",
                "code": "PRD-376244",
                "unit": {
                    "id": "a2dea345-a7fc-4d6e-b844-c077474dad7e",
                    "name": "Laís Natália Santos Jr.",
                    "abbreviation": "Marta Colaço"
                }
            },
            "quantity": 923.582,
            "quantity_fulfilled": 0,
            "quantity_pending": 923.582,
            "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}/items

Headers

Authorization        

Example: Bearer 1EPdkg5DV8v6fbha6a34Zec

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: esse

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 eP36DZb65h8fgkdcv14aVEa" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"a229335c-fd77-33ed-9f48-64f0e844594d\",
    \"work_location_id\": \"d222e9d4-99be-370c-804e-6c1bb4b86d48\",
    \"status_id\": \"161a7186-e90f-32be-8ce1-d81b5effeca3\",
    \"priority\": \"Example Priority\",
    \"needed_at\": \"Example Needed at\",
    \"items\": [
        {
            \"product_id\": \"3e72acdb-aeaf-3fa2-89af-01a56d7033b6\",
            \"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 eP36DZb65h8fgkdcv14aVEa",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "a229335c-fd77-33ed-9f48-64f0e844594d",
    "work_location_id": "d222e9d4-99be-370c-804e-6c1bb4b86d48",
    "status_id": "161a7186-e90f-32be-8ce1-d81b5effeca3",
    "priority": "Example Priority",
    "needed_at": "Example Needed at",
    "items": [
        {
            "product_id": "3e72acdb-aeaf-3fa2-89af-01a56d7033b6",
            "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 eP36DZb65h8fgkdcv14aVEa

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: a229335c-fd77-33ed-9f48-64f0e844594d

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: d222e9d4-99be-370c-804e-6c1bb4b86d48

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 161a7186-e90f-32be-8ce1-d81b5effeca3

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: 3e72acdb-aeaf-3fa2-89af-01a56d7033b6

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/sequi" \
    --header "Authorization: Bearer a4h63vZgDPkVE6bfa8e15dc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"53e68963-1ac1-3df1-ab36-7b89f8ae483c\",
    \"work_location_id\": \"ca6e9053-ab1e-3b5b-9c97-235a88cbcb78\",
    \"status_id\": \"4cdaae92-ffbd-397d-b75b-c0eb7f865355\",
    \"priority\": \"Example Priority\",
    \"needed_at\": \"Example Needed at\",
    \"items\": [
        {
            \"id\": \"4e9f3deb-5472-3c95-af51-cd45055fed9c\",
            \"product_id\": \"31d8d7c5-d04b-3606-8895-ebde62ecb49a\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/sequi"
);

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

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "53e68963-1ac1-3df1-ab36-7b89f8ae483c",
    "work_location_id": "ca6e9053-ab1e-3b5b-9c97-235a88cbcb78",
    "status_id": "4cdaae92-ffbd-397d-b75b-c0eb7f865355",
    "priority": "Example Priority",
    "needed_at": "Example Needed at",
    "items": [
        {
            "id": "4e9f3deb-5472-3c95-af51-cd45055fed9c",
            "product_id": "31d8d7c5-d04b-3606-8895-ebde62ecb49a",
            "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 a4h63vZgDPkVE6bfa8e15dc

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: sequi

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: 53e68963-1ac1-3df1-ab36-7b89f8ae483c

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: ca6e9053-ab1e-3b5b-9c97-235a88cbcb78

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 4cdaae92-ffbd-397d-b75b-c0eb7f865355

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: 4e9f3deb-5472-3c95-af51-cd45055fed9c

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 31d8d7c5-d04b-3606-8895-ebde62ecb49a

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: placeat

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: consequatur

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/asperiores/reject" \
    --header "Authorization: Bearer Pavk68a1V564hZgde3cbEDf" \
    --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/asperiores/reject"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: asperiores

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/expedita/items" \
    --header "Authorization: Bearer a3vceaZ6fP81VEkgd546hDb" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"product_id\": \"ca3515a5-5de8-3166-a040-ed52e03e0b7d\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/expedita/items"
);

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

let body = {
    "items": [
        {
            "product_id": "ca3515a5-5de8-3166-a040-ed52e03e0b7d",
            "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 a3vceaZ6fP81VEkgd546hDb

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: expedita

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: ca3515a5-5de8-3166-a040-ed52e03e0b7d

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/nostrum" \
    --header "Authorization: Bearer 8hdD4vakebfEg6acV31P56Z" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"quantity\": 1,
    \"observation\": \"Example Observation\",
    \"status_id\": \"887fbeb4-28a3-3410-a44a-40d5db5779e3\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/items/nostrum"
);

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

let body = {
    "quantity": 1,
    "observation": "Example Observation",
    "status_id": "887fbeb4-28a3-3410-a44a-40d5db5779e3"
};

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 8hdD4vakebfEg6acV31P56Z

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: nostrum

item   string     

Product Request Item UUID Example: incidunt

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: 887fbeb4-28a3-3410-a44a-40d5db5779e3

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/et/items" \
    --header "Authorization: Bearer ZbeEh6caaVf6g48k5D1Pvd3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        \"e557cf7e-ac83-317b-8d06-be0175dd9b21\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/et/items"
);

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

let body = {
    "items": [
        "e557cf7e-ac83-317b-8d06-be0175dd9b21"
    ]
};

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 ZbeEh6caaVf6g48k5D1Pvd3

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: et

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/dolorum/sync-items" \
    --header "Authorization: Bearer a346d5h1aEg6vkZfDP8ceVb" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"id\": \"6d737077-3aca-3e20-bbfc-e0d4316975da\",
            \"product_id\": \"be5c2047-b69e-3b30-81e6-8dee053d808b\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/dolorum/sync-items"
);

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

let body = {
    "items": [
        {
            "id": "6d737077-3aca-3e20-bbfc-e0d4316975da",
            "product_id": "be5c2047-b69e-3b30-81e6-8dee053d808b",
            "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 a346d5h1aEg6vkZfDP8ceVb

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: dolorum

Body Parameters

items   object[]     

Itens.

id   string  optional    

ID do Item. The uuid of an existing record in the product_request_items table. Example: 6d737077-3aca-3e20-bbfc-e0d4316975da

product_id   string     

Produto. The uuid of an existing record in the products table. Example: be5c2047-b69e-3b30-81e6-8dee053d808b

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


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

Example response (200):


{
    "data": [
        {
            "id": "9f33ed5e-1543-332e-a7ac-6eb984989fb5",
            "name": "Sr. Aaron Cristian Aranda Neto",
            "code": "PRD-321391",
            "stock": 320174,
            "product_family": {
                "id": "a2dea343-9645-4c50-b017-c5228227e399",
                "name": "Dr. Abgail Lourenço"
            },
            "product_brand": {
                "id": "a2dea343-9816-4616-b63d-dfd1edc3e197",
                "name": "Srta. Sophie Sara Amaral"
            },
            "unit": {
                "id": "a2dea343-99b2-447e-9a3d-a267e2498e3c",
                "name": "Joyce Salas Vega",
                "abbreviation": "Lidiane Jimenes Batista Filho"
            },
            "image": {
                "id": null,
                "url": null
            },
            "epi_type": null,
            "description": "Ut asperiores deserunt deserunt reiciendis eos quis est.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "0b4cf7ee-a04c-31bd-90dd-16cad4bd7c93",
            "name": "Diana Pereira Matias Neto",
            "code": "PRD-339937",
            "stock": 81,
            "product_family": {
                "id": "a2dea343-9d50-4096-a06d-93a12d3e1b0e",
                "name": "Daniella Medina Burgos"
            },
            "product_brand": {
                "id": "a2dea343-9efd-4803-9b03-88261e5ea562",
                "name": "Sr. Cezar Cervantes Neto"
            },
            "unit": {
                "id": "a2dea343-a0d2-4cd3-aa51-e5120bc605e6",
                "name": "Sr. Isaac Cortês",
                "abbreviation": "Sr. Kevin Ortega Filho"
            },
            "image": {
                "id": null,
                "url": null
            },
            "epi_type": null,
            "description": "Omnis officiis ullam sunt eaque eum.",
            "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 h6fDPe5abZkcdEvaV483g16

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


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

Example response (200):


{
    "data": {
        "id": "fecbc7a4-8bf7-3972-a763-ce3ff045efb0",
        "name": "Jefferson Diogo Fonseca",
        "code": "PRD-911758",
        "stock": 80211,
        "product_family": {
            "id": "a2dea343-af3c-4082-8410-b2fcc7ce219f",
            "name": "Srta. Elisa Barreto"
        },
        "product_brand": {
            "id": "a2dea343-b0c4-41db-8e01-f25cc7cd02d0",
            "name": "Sra. Tessália Mascarenhas"
        },
        "unit": {
            "id": "a2dea343-b25f-4b5e-9143-eab996ecaaae",
            "name": "Cecília Salas",
            "abbreviation": "Aaron Escobar"
        },
        "image": {
            "id": null,
            "url": null
        },
        "epi_type": null,
        "description": "Maxime ad occaecati perspiciatis est dolores nulla.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/products/{id}

Headers

Authorization        

Example: Bearer ehZPd4b6fk86EV1Dagac5v3

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: commodi

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: et

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 ed6vaab3Phc41g5ZVE6kf8D" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"product_family_id\": \"879fe41c-b00a-3a97-9da2-ac7ecedca69f\",
    \"product_brand_id\": \"3416f6f9-498b-3dd3-9183-f5ffc1b6bd6b\",
    \"unit_id\": \"a1987fce-f026-3749-9598-c1fecbf9b126\",
    \"description\": \"Example Description\",
    \"stock\": 1
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/products"
);

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

let body = {
    "name": "Example Name",
    "product_family_id": "879fe41c-b00a-3a97-9da2-ac7ecedca69f",
    "product_brand_id": "3416f6f9-498b-3dd3-9183-f5ffc1b6bd6b",
    "unit_id": "a1987fce-f026-3749-9598-c1fecbf9b126",
    "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 ed6vaab3Phc41g5ZVE6kf8D

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: 879fe41c-b00a-3a97-9da2-ac7ecedca69f

product_brand_id   string     

Marca do Produto. The uuid of an existing record in the product_brands table. Example: 3416f6f9-498b-3dd3-9183-f5ffc1b6bd6b

unit_id   string     

Unidade. The uuid of an existing record in the units table. Example: a1987fce-f026-3749-9598-c1fecbf9b126

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 Pd1Z3feV6kaD6a4vhgcb5E8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"product_family_id\": \"623c1848-f51c-3047-9c55-728852c582bb\",
    \"product_brand_id\": \"91a18f5b-99a7-3ecb-bd94-8ed9eb3bceb2\",
    \"unit_id\": \"628da6a4-02e2-33ee-a3d4-363fba6e4513\",
    \"stock\": 1,
    \"description\": \"Example Description\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/products/1"
);

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

let body = {
    "name": "Example Name",
    "product_family_id": "623c1848-f51c-3047-9c55-728852c582bb",
    "product_brand_id": "91a18f5b-99a7-3ecb-bd94-8ed9eb3bceb2",
    "unit_id": "628da6a4-02e2-33ee-a3d4-363fba6e4513",
    "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 Pd1Z3feV6kaD6a4vhgcb5E8

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: ea

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: 623c1848-f51c-3047-9c55-728852c582bb

product_brand_id   string  optional    

Marca do Produto. The uuid of an existing record in the product_brands table. Example: 91a18f5b-99a7-3ecb-bd94-8ed9eb3bceb2

unit_id   string  optional    

Unidade. The uuid of an existing record in the units table. Example: 628da6a4-02e2-33ee-a3d4-363fba6e4513

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: dolor

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/1b0021cf-7204-3038-b4f0-9581b903cf53/versions" \
    --header "Authorization: Bearer eZckbgPv6V68Dd1fh4a53Ea" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"notes\": \"Example Notes\",
    \"responsible_user_id\": \"e49b39a4-b779-3a44-8327-f10794c314d1\",
    \"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/1b0021cf-7204-3038-b4f0-9581b903cf53/versions"
);

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

let body = {
    "notes": "Example Notes",
    "responsible_user_id": "e49b39a4-b779-3a44-8327-f10794c314d1",
    "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 eZckbgPv6V68Dd1fh4a53Ea

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

projectUuid   string     

Project UUID Example: 1b0021cf-7204-3038-b4f0-9581b903cf53

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: e49b39a4-b779-3a44-8327-f10794c314d1

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/1398480e-52dd-3496-aebe-eae1b7227a8a/versions" \
    --header "Authorization: Bearer 1fedv6D6Z8E4abga5cVkP3h" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/projects/1398480e-52dd-3496-aebe-eae1b7227a8a/versions"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

projectUuid   string     

Project UUID Example: 1398480e-52dd-3496-aebe-eae1b7227a8a

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/0f83386f-49da-360e-a4af-8ccfe857a17b" \
    --header "Authorization: Bearer vPa3e4EZk65Dbfd6g8chV1a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/0f83386f-49da-360e-a4af-8ccfe857a17b"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: 0f83386f-49da-360e-a4af-8ccfe857a17b

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/4031917d-b53e-395c-a599-d8fb8c299928/download" \
    --header "Authorization: Bearer a15gbvD6k3Vfh6dEa4P8ceZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/4031917d-b53e-395c-a599-d8fb8c299928/download"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: 4031917d-b53e-395c-a599-d8fb8c299928

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/7fc3c0db-ffc6-3fde-96a1-e68ea3068f5c/restore" \
    --header "Authorization: Bearer Davke5dg4616aZE8fPhVb3c" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/7fc3c0db-ffc6-3fde-96a1-e68ea3068f5c/restore"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: 7fc3c0db-ffc6-3fde-96a1-e68ea3068f5c

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/822682a2-5784-389d-8d69-6d905a3d199c" \
    --header "Authorization: Bearer beadav46DP3Z6g1f8hVc5kE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/822682a2-5784-389d-8d69-6d905a3d199c"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: 822682a2-5784-389d-8d69-6d905a3d199c

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=e72f6f98-4778-30d1-a1ea-e3d2892cd977&work_id=f5a5daa7-e0e1-36e8-9a6a-cf478321f4b0&status_id=0ae51f63-6692-371b-b209-d5c2d12e4e8e&responsible_id=771f2495-9df0-307a-a26b-113ff06f4eef" \
    --header "Authorization: Bearer fa64hPgbdv3Ea58c61DVkeZ" \
    --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": "e72f6f98-4778-30d1-a1ea-e3d2892cd977",
    "work_id": "f5a5daa7-e0e1-36e8-9a6a-cf478321f4b0",
    "status_id": "0ae51f63-6692-371b-b209-d5c2d12e4e8e",
    "responsible_id": "771f2495-9df0-307a-a26b-113ff06f4eef",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "c904d921-e224-3f1e-8ce6-ecea1e8b2eb6",
            "name": "Inventore esse corrupti",
            "description": "Sint asperiores soluta harum quo praesentium corrupti.",
            "current_version": 1,
            "file": {
                "path": "projects/6e43dba6-fb4c-3f1c-af63-27b3e2f7c56c.pdf",
                "size": "3857082",
                "extension": "pdf"
            },
            "discipline": {
                "id": "a2dea348-a91a-44a0-a4bc-44e1cd40bcba",
                "name": "Dolores",
                "code": "RYK"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "880b1344-a085-37f2-8292-99af1cff31ec",
            "name": "Cum quasi totam",
            "description": "Qui eum dolorem aut suscipit nam sit alias.",
            "current_version": 1,
            "file": {
                "path": "projects/e197b15f-50f2-3973-ade4-c761c491d70d.pdf",
                "size": "3660763",
                "extension": "pdf"
            },
            "discipline": {
                "id": "a2dea348-ad4d-4c70-8329-1e6cc1c9555a",
                "name": "Nostrum",
                "code": "HXJ"
            },
            "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 fa64hPgbdv3Ea58c61DVkeZ

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: e72f6f98-4778-30d1-a1ea-e3d2892cd977

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: f5a5daa7-e0e1-36e8-9a6a-cf478321f4b0

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: 0ae51f63-6692-371b-b209-d5c2d12e4e8e

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: 771f2495-9df0-307a-a26b-113ff06f4eef

Show project

requires authentication project show

Show a project

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

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


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

Example response (200):


{
    "data": {
        "id": "cd50c4cd-a13f-35d1-b101-8cf5ace37c8d",
        "name": "Soluta voluptatem sunt",
        "description": "Officia ut ab consequatur.",
        "current_version": 1,
        "file": {
            "path": "projects/8a155f0d-bc0e-3229-8c91-e84c0b9000cb.pdf",
            "size": "3015075",
            "extension": "pdf"
        },
        "discipline": {
            "id": "a2dea348-b674-48a5-ae8e-bc585ec9c501",
            "name": "Dolore",
            "code": "GIW"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/projects/{id}

Headers

Authorization        

Example: Bearer 4dvE6ae8h36PZkbVDfa5cg1

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the project. Example: 12

project   string     

Project UUID Example: impedit

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 e13Pvh6dV6aaEfc8bgk5DZ4" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"discipline_id\": \"18464960-b11f-3d4b-937b-b1cc63dc50a6\",
    \"work_id\": \"e0e0caca-4d44-358e-aa25-817a17dd4e10\",
    \"responsible_user_id\": \"04c67914-0d94-3ea3-b774-db40e4e01cf3\",
    \"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 e13Pvh6dV6aaEfc8bgk5DZ4",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "discipline_id": "18464960-b11f-3d4b-937b-b1cc63dc50a6",
    "work_id": "e0e0caca-4d44-358e-aa25-817a17dd4e10",
    "responsible_user_id": "04c67914-0d94-3ea3-b774-db40e4e01cf3",
    "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 e13Pvh6dV6aaEfc8bgk5DZ4

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: 18464960-b11f-3d4b-937b-b1cc63dc50a6

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: e0e0caca-4d44-358e-aa25-817a17dd4e10

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: 04c67914-0d94-3ea3-b774-db40e4e01cf3

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/16" \
    --header "Authorization: Bearer 5EZ6chVfPav3dbaeD48gk16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"discipline_id\": \"1d317641-8047-3543-9332-5fe913f1d101\",
    \"work_id\": \"c47b7627-ae43-34c6-a406-933549b0bf92\",
    \"responsible_user_id\": \"cfb80c5b-22ed-3b51-88fc-dab24f796ffb\",
    \"status_id\": \"3ee74c97-26b6-3227-b2b4-5454fcb048af\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/projects/16"
);

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

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "discipline_id": "1d317641-8047-3543-9332-5fe913f1d101",
    "work_id": "c47b7627-ae43-34c6-a406-933549b0bf92",
    "responsible_user_id": "cfb80c5b-22ed-3b51-88fc-dab24f796ffb",
    "status_id": "3ee74c97-26b6-3227-b2b4-5454fcb048af"
};

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 5EZ6chVfPav3dbaeD48gk16

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the project. Example: 16

project   string     

Project UUID Example: vero

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: 1d317641-8047-3543-9332-5fe913f1d101

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: c47b7627-ae43-34c6-a406-933549b0bf92

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: cfb80c5b-22ed-3b51-88fc-dab24f796ffb

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: 3ee74c97-26b6-3227-b2b4-5454fcb048af

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

project   string     

Project UUID Example: consequatur

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 g48Pkv156e3cadEbhaZVfD6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"daily_log\": \"quia\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/daily-log"
);

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

let body = {
    "daily_log": "quia"
};

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 g48Pkv156e3cadEbhaZVfD6

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: quia

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 k6gDa13fEdaVZbh8Pv45ce6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"employee\": \"quo\",
    \"kit_uuid\": \"6e2d8e4a-c295-32d2-8fea-4f3aed3c5b37\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/epi-term"
);

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

let body = {
    "employee": "quo",
    "kit_uuid": "6e2d8e4a-c295-32d2-8fea-4f3aed3c5b37"
};

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 k6gDa13fEdaVZbh8Pv45ce6

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

employee   string     

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

kit_uuid   string     

O campo value deve ser um UUID válido. Example: 6e2d8e4a-c295-32d2-8fea-4f3aed3c5b37

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 6becDaE3dPZg1h84V5kvf6a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"employee\": \"beatae\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/employee-sheet"
);

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

let body = {
    "employee": "beatae"
};

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 6becDaE3dPZg1h84V5kvf6a

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

employee   string     

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

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=sint&type=entrada&description=Asperiores+tempora+non+minus+totam.&categories[]=d0aa9359-6253-3f0e-82c4-c39fb8060919&exclude_categories[]=203c85d1-2bb6-35f6-b531-5ae942de7ad9&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=dcdf1630-f6ff-3394-b022-dc44c8c2c7c1&customers[]=d93482a2-5377-39e0-a590-4acc24d94587&suppliers[]=3ec3aee5-b6ee-3d9e-92d2-535d9f486fb9&cash_session=9f1a3ca6-d205-32d8-8972-1d0f2ffb8cf1&works[]=88baabaf-a05c-3c12-89fb-990cea0fb4d4" \
    --header "Authorization: Bearer Dfvk8bEZ5g43Pcaad61he6V" \
    --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": "sint",
    "type": "entrada",
    "description": "Asperiores tempora non minus totam.",
    "categories[0]": "d0aa9359-6253-3f0e-82c4-c39fb8060919",
    "exclude_categories[0]": "203c85d1-2bb6-35f6-b531-5ae942de7ad9",
    "date_start": "2026-01-01",
    "date_end": "2026-12-31",
    "bank_accounts[0]": "dcdf1630-f6ff-3394-b022-dc44c8c2c7c1",
    "customers[0]": "d93482a2-5377-39e0-a590-4acc24d94587",
    "suppliers[0]": "3ec3aee5-b6ee-3d9e-92d2-535d9f486fb9",
    "cash_session": "9f1a3ca6-d205-32d8-8972-1d0f2ffb8cf1",
    "works[0]": "88baabaf-a05c-3c12-89fb-990cea0fb4d4",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

q   string  optional    

Example: sint

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: Asperiores tempora non minus totam.

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: 9f1a3ca6-d205-32d8-8972-1d0f2ffb8cf1

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=accusantium&type=entrada&description=Laborum+velit+ea+maxime+nihil+aut+quas+autem.&categories[]=6ea82359-4662-3fc8-9642-0d60e48b250e&exclude_categories[]=17781483-aabd-33bd-bb07-3a39fbfdd48f&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=4754dfdb-7e99-3217-8f3c-141a9e20cf65&customers[]=b948c700-c94a-3bf9-b2d7-797277a80b97&suppliers[]=33a13177-59cc-33b5-a3bf-88b1cd5c5f97&cash_session=96363c8a-bece-3245-9b21-8068f3a15e00&works[]=87fb4638-cf8e-3ba9-a9c8-4011b4365283" \
    --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": "accusantium",
    "type": "entrada",
    "description": "Laborum velit ea maxime nihil aut quas autem.",
    "categories[0]": "6ea82359-4662-3fc8-9642-0d60e48b250e",
    "exclude_categories[0]": "17781483-aabd-33bd-bb07-3a39fbfdd48f",
    "date_start": "2026-01-01",
    "date_end": "2026-12-31",
    "bank_accounts[0]": "4754dfdb-7e99-3217-8f3c-141a9e20cf65",
    "customers[0]": "b948c700-c94a-3bf9-b2d7-797277a80b97",
    "suppliers[0]": "33a13177-59cc-33b5-a3bf-88b1cd5c5f97",
    "cash_session": "96363c8a-bece-3245-9b21-8068f3a15e00",
    "works[0]": "87fb4638-cf8e-3ba9-a9c8-4011b4365283",
};
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: accusantium

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: Laborum velit ea maxime nihil aut quas autem.

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: 96363c8a-bece-3245-9b21-8068f3a15e00

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 68V14D65cfbvagEZa3dePkh" \
    --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 68V14D65cfbvagEZa3dePkh",
    "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 68V14D65cfbvagEZa3dePkh

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


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

Example response (200):


{
    "data": [
        {
            "id": "461e5750-80a3-3256-83e1-aaabf9fc99b7",
            "name": "cumque corporis",
            "slug": null,
            "description": null,
            "abbreviation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "787ef549-858c-3e4b-9ef7-fd4f6eb2dcf0",
            "name": "nesciunt delectus",
            "slug": null,
            "description": "Omnis nihil autem totam eos quis totam. Est corporis accusamus iure vel debitis commodi quo. Voluptatem numquam et qui ut odit aspernatur repellat. Eveniet excepturi rerum magni facilis id mollitia.",
            "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 bE13fgaP5adck686e4DVhZv

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 D6cVvedg3E6abP5kfaZh481" \
    --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 D6cVvedg3E6abP5kfaZh481",
    "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 D6cVvedg3E6abP5kfaZh481

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

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


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

Example response (200):


{
    "data": {
        "id": "da02d422-caf8-33a2-89a4-9feecce64752",
        "name": "labore aut",
        "slug": null,
        "description": "Perspiciatis ea earum nihil dignissimos ut provident in. Ducimus et dolorem amet accusantium sit rem. Vel sequi sit similique omnis.",
        "abbreviation": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/sectors/{id}

Headers

Authorization        

Example: Bearer e64bhdcgDfEakav3V8156ZP

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 15

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 5

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 6

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


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

Example response (200):


{
    "data": [
        {
            "id": "cc64f1e0-632a-37f3-a56d-2ad8ecf51970",
            "name": "Tobin Murray",
            "username": "orval.veum",
            "email": "mozell.gorczany@example.org",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "27da8525-d971-37a7-b127-2a7bb145fa58",
            "name": "Lori Ziemann",
            "username": "joey.kutch",
            "email": "jazmyn54@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/sectors/{sector}/users

Headers

Authorization        

Example: Bearer ZPd3Ev6V61Dabacgf4kh85e

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 D8efcE64ghaVvkdPba651Z3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"93c724a6-b69d-3380-be20-76f3c3994b14\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/attach"
);

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

let body = {
    "users": [
        "93c724a6-b69d-3380-be20-76f3c3994b14"
    ]
};

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 D8efcE64ghaVvkdPba651Z3

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 1kZ6hDPadf86VeavE54c3gb" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"12591769-411a-3ecf-a15d-710b58b9d6a9\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/detach"
);

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

let body = {
    "users": [
        "12591769-411a-3ecf-a15d-710b58b9d6a9"
    ]
};

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 1kZ6hDPadf86VeavE54c3gb

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 6Evbhe6a5PfZ1a38Dd4ckgV" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"51c8933c-d4ed-327a-a7e3-af8e3daf457c\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/sync"
);

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

let body = {
    "users": [
        "51c8933c-d4ed-327a-a7e3-af8e3daf457c"
    ]
};

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 6Evbhe6a5PfZ1a38Dd4ckgV

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


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

Example response (200):


{
    "data": [
        {
            "name": "error et",
            "slug": "perspiciatis-repellat-voluptates-laudantium-nobis-quisquam-quaerat"
        },
        {
            "name": "ut quo",
            "slug": "sunt-dolorem-non-et-rerum-autem-ipsa-dolores"
        }
    ]
}
 

Request      

GET api/status-modules

Headers

Authorization        

Example: Bearer ekb5Df3PhVE61Zva684cgad

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


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

Example response (200):


{
    "data": [
        {
            "id": "f98f239f-c910-3078-bda2-3c7751d57442",
            "slug": null,
            "name": null,
            "description": "Dr. Rodolfo Salas Franco",
            "abbreviation": "quod",
            "color": "#3bf0e7",
            "text_color": "#b0c092",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "4163142b-0072-3592-8a06-657d1f38adc1",
            "slug": null,
            "name": null,
            "description": "Sr. Manuel Fonseca Marinho",
            "abbreviation": "reprehenderit",
            "color": "#401a74",
            "text_color": "#713aaf",
            "module": {
                "name": "Solicitação de Produtos",
                "slug": "product_request"
            },
            "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 fa1ePcV3av6845gEbD6kZhd

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 kvbg6Ph1E4f6aZaD35cd8Ve" \
    --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\": \"5f7a71e0-257a-3909-b945-1d7fde85015a\",
    \"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 kvbg6Ph1E4f6aZaD35cd8Ve",
    "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": "5f7a71e0-257a-3909-b945-1d7fde85015a",
    "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 kvbg6Ph1E4f6aZaD35cd8Ve

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: 5f7a71e0-257a-3909-b945-1d7fde85015a

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


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

Example response (200):


{
    "data": {
        "id": "b87242f7-5acf-3633-84cd-2153368faea8",
        "slug": null,
        "name": null,
        "description": "Davi D'ávila Roque",
        "abbreviation": "nostrum",
        "color": "#2abe26",
        "text_color": "#f04adb",
        "module": {
            "name": "Obras",
            "slug": "work"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/statuses/{id}

Headers

Authorization        

Example: Bearer PgfhVD41vkb6ZeEa8d3a5c6

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 g6Zd46aEcfhav8VeDP53k1b" \
    --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\": \"5da23327-3b55-3c21-b60d-52d549b494f7\",
    \"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 g6Zd46aEcfhav8VeDP53k1b",
    "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": "5da23327-3b55-3c21-b60d-52d549b494f7",
    "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 g6Zd46aEcfhav8VeDP53k1b

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: 5da23327-3b55-3c21-b60d-52d549b494f7

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 eD8ac14fab6Z5hkvVE3gd6P" \
    --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 eD8ac14fab6Z5hkvVE3gd6P",
    "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 eD8ac14fab6Z5hkvVE3gd6P

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


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

Example response (200):


{
    "data": [
        {
            "id": "9edee71b-bff8-34ea-bd78-dc5294e2b939",
            "quantity": 163.8418,
            "min_quantity": null,
            "max_quantity": null,
            "below_minimum": false,
            "above_maximum": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "eb2d4618-0839-3a8d-8a5b-c6b001e5b959",
            "quantity": 910.5089,
            "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 avEe8Df3Va5c1gdk46h6bPZ

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


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

Example response (200):


{
    "data": [
        {
            "id": "6ac2603b-a009-3e53-a196-091981de8ec7",
            "name": "Estoque Aguiar S.A.",
            "module": "work",
            "is_active": true,
            "is_main": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "e16b8ea9-468d-391d-a19b-94eb2fb3d365",
            "name": "Estoque Vasques e de Aguiar S.A.",
            "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 ZEd4b8DgPhV6vea3k51acf6

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 fvecbZah83kEdag616P5D4V" \
    --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 fvecbZah83kEdag616P5D4V",
    "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": "97997eac-5997-30ce-b8c6-92f3217fb788",
        "name": "Estoque Reis e Flores",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/stocks

Headers

Authorization        

Example: Bearer fvecbZah83kEdag616P5D4V

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


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

Example response (200):


{
    "data": {
        "id": "7a05b010-d4e5-3e80-80ce-cdcbca0c9746",
        "name": "Estoque Lourenço-Vasques",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/stocks/main

Headers

Authorization        

Example: Bearer d5Pb6aEV41kfZgc3ea8vDh6

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


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

Example response (200):


{
    "data": {
        "id": "e852bf03-1d64-3e8b-99b4-10dc7326bc89",
        "name": "Estoque Medina e Batista e Filhos",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/stocks/{id}

Headers

Authorization        

Example: Bearer Vaf1he6a48kd35PD6cbZEvg

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 46DP3akaZe8dh6V1gE5fvbc" \
    --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 46DP3akaZe8dh6V1gE5fvbc",
    "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": "d96f3857-9ed8-3958-bea3-5d0db40c33b0",
        "name": "Estoque Bittencourt S.A.",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

PUT api/stocks/{id}

Headers

Authorization        

Example: Bearer 46DP3akaZe8dh6V1gE5fvbc

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 hg48V1aDve63Pfb5a6dkEcZ" \
    --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 hg48V1aDve63Pfb5a6dkEcZ",
    "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 hg48V1aDve63Pfb5a6dkEcZ

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


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

Example response (200):


{
    "data": [
        {
            "id": "8fd1a04c-4ce2-3a37-adbd-df367ba684a1",
            "quantity": 684.4032,
            "min_quantity": null,
            "max_quantity": null,
            "below_minimum": false,
            "above_maximum": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "9097295d-10ce-3405-92e0-000fd0ead361",
            "quantity": 102.7095,
            "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 daZ3fg64eaPb6hE5kDV1cv8

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

const headers = {
    "Authorization": "Bearer cE4v5kZhbV6a3e18dPagf6D",
    "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": "dd33a743-9db3-3c28-a0e5-4f612f8b0525",
        "quantity": 51.1984,
        "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 cE4v5kZhbV6a3e18dPagf6D

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: tenetur

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 Dha15gEvc64f6Pa83VedbkZ" \
    --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 Dha15gEvc64f6Pa83VedbkZ",
    "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 Dha15gEvc64f6Pa83VedbkZ

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


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

Example response (200):


{
    "data": [
        {
            "id": "b15d243e-fa6d-3514-9b11-ea6e2aa256f9",
            "code": "MOV-417336",
            "type": "consumo",
            "type_name": "CONSUMPTION",
            "is_entry": false,
            "is_exit": true,
            "quantity": 52.9469,
            "previous_quantity": 493.8584,
            "new_quantity": 440.9115,
            "reason": "Voluptatem in qui voluptatem architecto ipsum.",
            "movement_date": "2026-09-23T06:04:05.000000Z",
            "created_at": null
        },
        {
            "id": "27d7f5c6-22d1-351c-bf27-ed392fb5ef5f",
            "code": "MOV-657040",
            "type": "vencido",
            "type_name": "EXPIRED",
            "is_entry": false,
            "is_exit": true,
            "quantity": 78.9889,
            "previous_quantity": 901.5298,
            "new_quantity": 822.5409,
            "reason": "Rerum quae nostrum magnam ut.",
            "movement_date": "2026-09-16T09:18:50.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 hv6b6k81Z4dgaf5cVaEP3De

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 83g66bDdhaf1vea5kcV4PZE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"701b9da1-cd4e-3fdf-82f0-0ae3fc841a6a\",
    \"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 83g66bDdhaf1vea5kcV4PZE",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "701b9da1-cd4e-3fdf-82f0-0ae3fc841a6a",
    "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": "3a5db810-2160-3690-8ee8-3c6b5739dff0",
        "code": "MOV-342097",
        "type": "vencido",
        "type_name": "EXPIRED",
        "is_entry": false,
        "is_exit": true,
        "quantity": 17.8384,
        "previous_quantity": 782.1999,
        "new_quantity": 764.3615,
        "reason": null,
        "movement_date": "2026-09-06T13:40:35.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stocks/{stock_id}/movements

Headers

Authorization        

Example: Bearer 83g66bDdhaf1vea5kcV4PZE

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: 701b9da1-cd4e-3fdf-82f0-0ae3fc841a6a

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 evZa668PDbV134agE5dhfkc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"e1cd1f1d-9a04-3a76-b814-d3d93ae4eab7\",
    \"destination_stock_id\": \"99515387-2f28-35c4-acdd-49de519081ca\",
    \"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 evZa668PDbV134agE5dhfkc",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "e1cd1f1d-9a04-3a76-b814-d3d93ae4eab7",
    "destination_stock_id": "99515387-2f28-35c4-acdd-49de519081ca",
    "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": "e9c89f6e-da4b-3889-96e9-22247fabfcef",
        "code": "MOV-953661",
        "type": "ajuste entrada",
        "type_name": "ADJUSTMENT_IN",
        "is_entry": true,
        "is_exit": false,
        "quantity": 37.5708,
        "previous_quantity": 370.5388,
        "new_quantity": 408.1096,
        "reason": "Iste consequatur voluptates est dolores.",
        "movement_date": "2026-09-30T03:56:03.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stocks/{stock}/movements/transfer

Headers

Authorization        

Example: Bearer evZa668PDbV134agE5dhfkc

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: e1cd1f1d-9a04-3a76-b814-d3d93ae4eab7

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: 99515387-2f28-35c4-acdd-49de519081ca

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 dfE5h6bkVa3vge8Dc4aP61Z" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"ac9932e6-dce8-33d8-a392-1c6ebeea6366\",
    \"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 dfE5h6bkVa3vge8Dc4aP61Z",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "ac9932e6-dce8-33d8-a392-1c6ebeea6366",
    "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": "8ba6872d-8f9b-3c73-9ae5-feaed1c92d5a",
        "code": "MOV-822721",
        "type": "compra",
        "type_name": "PURCHASE",
        "is_entry": true,
        "is_exit": false,
        "quantity": 28.5617,
        "previous_quantity": 488.7248,
        "new_quantity": 517.2865,
        "reason": null,
        "movement_date": "2026-09-28T16:57:06.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stocks/{stock}/movements/inventory

Headers

Authorization        

Example: Bearer dfE5h6bkVa3vge8Dc4aP61Z

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: ac9932e6-dce8-33d8-a392-1c6ebeea6366

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 14cavgeafbdV5Z366E8PkhD" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"1557a7af-7d75-3851-b116-167f619ecf9c\",
    \"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 14cavgeafbdV5Z366E8PkhD",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "1557a7af-7d75-3851-b116-167f619ecf9c",
    "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": "5a00a116-1ac6-34fc-9676-363a32482db4",
        "code": "MOV-492285",
        "type": "perda",
        "type_name": "LOSS",
        "is_entry": false,
        "is_exit": true,
        "quantity": 80.9066,
        "previous_quantity": 419.9695,
        "new_quantity": 339.0629,
        "reason": null,
        "movement_date": "2026-09-02T00:49:19.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stock-movements/purchase

Headers

Authorization        

Example: Bearer 14cavgeafbdV5Z366E8PkhD

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: 1557a7af-7d75-3851-b116-167f619ecf9c

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


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

Example response (200):


{
    "data": {
        "id": "d5e346b0-bc2a-3e7c-a3a8-2041a3a3d790",
        "code": "MOV-084104",
        "type": "venda",
        "type_name": "SALE",
        "is_entry": false,
        "is_exit": true,
        "quantity": 23.3122,
        "previous_quantity": 192.5918,
        "new_quantity": 169.2796,
        "reason": "Voluptatem consequatur sapiente eum quidem alias.",
        "movement_date": "2026-09-26T07:10:18.000000Z",
        "created_at": null
    }
}
 

Request      

GET api/stock-movements/{movement}

Headers

Authorization        

Example: Bearer bdPfEkv658DZ4aehVc36g1a

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


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

Example response (200):


{
    "data": [
        {
            "id": "1d58dfea-76e6-38d8-8e07-862281224ae0",
            "name": "Hosana Esteves Salgado",
            "email": "tdavila@example.net",
            "phone": "(15) 4304-0897",
            "document": "18.300.804/0001-71",
            "type": "pj",
            "responsible": "Leandro Rezende Gonçalves Neto",
            "image": {
                "id": null,
                "url": null
            },
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            }
        },
        {
            "id": "74905dab-08cf-3660-b0d7-6b041de29b9c",
            "name": "Sra. Emanuelly das Dores Pedrosa Neto",
            "email": "tiago.valente@example.com",
            "phone": "(22) 3221-9032",
            "document": "77.972.709/0001-83",
            "type": "pf",
            "responsible": "Juliano Maldonado Casanova",
            "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 P6bvg3fZ65aekVd4ahcD1E8

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 Z1e6cDPa3fhV8E6bv4dag5k" \
    --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 Z1e6cDPa3fhV8E6bv4dag5k",
    "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 Z1e6cDPa3fhV8E6bv4dag5k

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


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

Example response (200):


{
    "data": {
        "id": "31c93ba4-2748-350e-88d2-d29dc28d25ef",
        "name": "Sra. Sandra Bruna Roque Neto",
        "email": "pietra15@example.org",
        "phone": "(79) 94882-8288",
        "document": "88.423.323/0001-39",
        "type": "pj",
        "responsible": "Sra. Noemi Paes",
        "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 edDE6kb5VvZc38aa4Ph1fg6

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

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 hV5D41a3Pc6kE68fedvgbZa" \
    --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 hV5D41a3Pc6kE68fedvgbZa",
    "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 hV5D41a3Pc6kE68fedvgbZa

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 fPbv4k6516cEZg8aDeh3dVa" \
    --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 fPbv4k6516cEZg8aDeh3dVa",
    "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 fPbv4k6516cEZg8aDeh3dVa

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


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

Example response (200):


{
    "data": [
        {
            "id": "420c8706-4570-3ed5-a510-3e65973b5b4e",
            "name": "Sr. Isaac Bruno Vasques Neto",
            "description": "Nobis beatae magnam illo sunt. Quod quis necessitatibus omnis animi. Veniam nam et vero eos at dolores. Cupiditate natus nulla possimus voluptatibus incidunt.",
            "type": "transferência"
        },
        {
            "id": "32733128-8ad0-34e3-a065-48f937986209",
            "name": "Dr. Heitor Brito Filho",
            "description": "Blanditiis quidem illo in fugit numquam culpa tenetur. Molestias quibusdam ut nisi amet. Adipisci ea consequatur aut aut.",
            "type": "saída"
        }
    ],
    "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 g36kaaP84E1vVecf5bhdDZ6

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

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


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

Example response (200):


{
    "data": {
        "id": "e8a46c79-9f60-3648-a447-648dec6fc9ca",
        "name": "Sr. William Corona Neto",
        "description": "Quas odio aut facere hic sunt. Reprehenderit iusto quisquam iste. Qui dolores sapiente neque nesciunt impedit sint. Explicabo atque unde error sunt hic autem.",
        "type": "pagamento"
    }
}
 

Request      

GET api/transaction-categories/{transactionCategory}

Headers

Authorization        

Example: Bearer cak66VdfZDEa1P8vb4he3g5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: porro

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 E1Vhfv3eg4c865kPD6aadbZ" \
    --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 E1Vhfv3eg4c865kPD6aadbZ",
    "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 E1Vhfv3eg4c865kPD6aadbZ

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/nemo" \
    --header "Authorization: Bearer 6a53c186kVEh4aPbdevgZfD" \
    --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/nemo"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: nemo

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: provident

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


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

Example response (200):


{
    "data": [
        {
            "id": "9df2eef1-d96b-3258-ba9e-90dca3030ef1",
            "name": "Id dicta",
            "slug": "id-dicta-399133",
            "description": "Voluptas amet optio libero voluptas esse molestiae aliquid.",
            "sort_order": 0,
            "is_active": true,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "caf2d9c2-92cd-3ac1-9dcd-801fa330815a",
            "name": "Error architecto",
            "slug": "error-architecto-192342",
            "description": "Laborum a omnis ut qui.",
            "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 5fbDvg4Z6PV3hadaE1ec8k6

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 akegZ6baV6851D3vhdcEP4f" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"slug\": \"Example Slug\",
    \"description\": \"Example Description\",
    \"sort_order\": 1,
    \"is_active\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules"
);

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

let body = {
    "name": "Example Name",
    "slug": "Example Slug",
    "description": "Example Description",
    "sort_order": 1,
    "is_active": true
};

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

Example response (201):


{
    "data": {
        "id": "e80d5c02-2d9f-3244-8e15-e2790bb8f628",
        "name": "Illo est",
        "slug": "illo-est-315990",
        "description": "Veritatis harum iste placeat velit.",
        "sort_order": 0,
        "is_active": true,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/admin/tutorial-modules

Headers

Authorization        

Example: Bearer akegZ6baV6851D3vhdcEP4f

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

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


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

Example response (200):


{
    "data": {
        "id": "3f0b0108-82f4-32fa-bc8b-a61ab33e42f8",
        "name": "Quo nesciunt",
        "slug": "quo-nesciunt-666150",
        "description": "Sed ut nobis odit nihil sapiente.",
        "sort_order": 0,
        "is_active": true,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/admin/tutorial-modules/{tutorialModule}

Headers

Authorization        

Example: Bearer 5VdbkfP8Zh1ec6v46EagDa3

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 V5fv4Pd86hgckb6DZaE31ae" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"slug\": \"Example Slug\",
    \"description\": \"Example Description\",
    \"sort_order\": 1,
    \"is_active\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32"
);

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

let body = {
    "name": "Example Name",
    "slug": "Example Slug",
    "description": "Example Description",
    "sort_order": 1,
    "is_active": true
};

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

Example response (200):


{
    "data": {
        "id": "dca51da1-4d2d-3a25-a941-a1a984d75bf9",
        "name": "Aspernatur at",
        "slug": "aspernatur-at-122118",
        "description": "Quo consequatur at dolorum aut.",
        "sort_order": 0,
        "is_active": true,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

PUT api/admin/tutorial-modules/{tutorialModule}

Headers

Authorization        

Example: Bearer V5fv4Pd86hgckb6DZaE31ae

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

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 dk4aEPvV63fZDag56he18cb" \
    --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 dk4aEPvV63fZDag56he18cb",
    "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 dk4aEPvV63fZDag56he18cb

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=93513532-2f13-3b5e-974f-baf4c773a599&sector_id=153db209-2f67-3190-9922-df50a6411af6&status=published" \
    --header "Authorization: Bearer 1g8DVZa64kE5cdP63hbavef" \
    --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": "93513532-2f13-3b5e-974f-baf4c773a599",
    "sector_id": "153db209-2f67-3190-9922-df50a6411af6",
    "status": "published",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "16c8cc9c-43bb-3cc2-b360-ffa22dbd593a",
            "title": "Est esse dolor ipsum",
            "description": "Aut nisi vero vero deserunt laboriosam.",
            "status": "draft",
            "published_at": null,
            "sort_order": 0,
            "module": {
                "id": "a2dea34b-551b-4794-ac55-bf7fa8131ea4",
                "name": "Minus voluptatibus",
                "slug": "minus-voluptatibus-458098"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "0df32024-0e90-327f-9a68-1d6e42d7e0cb",
            "title": "Quas voluptate vel voluptatem",
            "description": "In quas earum dolor quis quia beatae odit.",
            "status": "draft",
            "published_at": null,
            "sort_order": 0,
            "module": {
                "id": "a2dea34b-5883-4ab3-81e1-b8d03557042c",
                "name": "Quam architecto",
                "slug": "quam-architecto-276825"
            },
            "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 1g8DVZa64kE5cdP63hbavef

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    

Filtra pelo UUID do módulo. O campo value deve ser um UUID válido. The uuid of an existing record in the tutorial_modules table. Example: 93513532-2f13-3b5e-974f-baf4c773a599

sector_id   string  optional    

Filtra pelo UUID do setor vinculado. O campo value deve ser um UUID válido. The uuid of an existing record in the sectors table. Example: 153db209-2f67-3190-9922-df50a6411af6

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 Ekga1a8vV6ZfhDe46cdP35b" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"module_id\": \"e415929b-e5fb-33bf-a41b-11508a6f1554\",
    \"title\": \"Example Title\",
    \"description\": \"Example Description\",
    \"cover_path\": \"Example Cover path\",
    \"sort_order\": 1,
    \"sectors\": [
        \"ec24ba60-0d9d-3f7b-944e-64e2c519b196\"
    ],
    \"permissions\": [
        \"08ebff3e-b7c0-3a2a-bed3-c851a5f0a3b7\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials"
);

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

let body = {
    "module_id": "e415929b-e5fb-33bf-a41b-11508a6f1554",
    "title": "Example Title",
    "description": "Example Description",
    "cover_path": "Example Cover path",
    "sort_order": 1,
    "sectors": [
        "ec24ba60-0d9d-3f7b-944e-64e2c519b196"
    ],
    "permissions": [
        "08ebff3e-b7c0-3a2a-bed3-c851a5f0a3b7"
    ]
};

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

Example response (201):


{
    "data": {
        "id": "238a0eb5-0537-3462-919e-e1961dd1c6d0",
        "title": "Omnis qui fugit eos",
        "description": "Delectus delectus quo possimus eius quisquam aperiam ipsam.",
        "status": "draft",
        "published_at": null,
        "sort_order": 0,
        "module": {
            "id": "a2dea34b-60ee-4fee-860a-caa0947e1654",
            "name": "Voluptatem dolores",
            "slug": "voluptatem-dolores-365878"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/admin/tutorials

Headers

Authorization        

Example: Bearer Ekga1a8vV6ZfhDe46cdP35b

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: e415929b-e5fb-33bf-a41b-11508a6f1554

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 Zeav1k356d48PDEVhcgab6f" \
    --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 Zeav1k356d48PDEVhcgab6f",
    "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 Zeav1k356d48PDEVhcgab6f

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


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

Example response (200):


{
    "data": {
        "id": "25ad1d70-ff54-3eb5-b0b2-ffe285e6136f",
        "title": "Voluptatem molestias dolorum explicabo",
        "description": "Dolor architecto corrupti omnis qui.",
        "status": "draft",
        "published_at": null,
        "sort_order": 0,
        "module": {
            "id": "a2dea34b-70d6-4b43-83af-0facf71b04a2",
            "name": "Non et",
            "slug": "non-et-652730"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/admin/tutorials/{id}

Headers

Authorization        

Example: Bearer hV68ecaZda15vf3P4bkEgD6

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 cv6Dfb6Vag13h4EdP5e8kaZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"module_id\": \"08a13032-a328-3e04-b373-7889ba72dc48\",
    \"title\": \"Example Title\",
    \"description\": \"Example Description\",
    \"cover_path\": \"Example Cover path\",
    \"sort_order\": 1,
    \"sectors\": [
        \"4ccdfda2-644d-3345-9ee4-a7ef875e119d\"
    ],
    \"permissions\": [
        \"166ea104-3f25-3a5b-b13d-6a2701320340\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1"
);

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

let body = {
    "module_id": "08a13032-a328-3e04-b373-7889ba72dc48",
    "title": "Example Title",
    "description": "Example Description",
    "cover_path": "Example Cover path",
    "sort_order": 1,
    "sectors": [
        "4ccdfda2-644d-3345-9ee4-a7ef875e119d"
    ],
    "permissions": [
        "166ea104-3f25-3a5b-b13d-6a2701320340"
    ]
};

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

Example response (200):


{
    "data": {
        "id": "018b3076-01f6-3baf-9c70-7b2729cb0b47",
        "title": "Reprehenderit rem ab voluptatum",
        "description": "Accusamus numquam nostrum alias vero voluptatem.",
        "status": "draft",
        "published_at": null,
        "sort_order": 0,
        "module": {
            "id": "a2dea34b-7889-46df-b916-60594c757573",
            "name": "Officiis qui",
            "slug": "officiis-qui-308720"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

PUT api/admin/tutorials/{id}

Headers

Authorization        

Example: Bearer cv6Dfb6Vag13h4EdP5e8kaZ

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: 08a13032-a328-3e04-b373-7889ba72dc48

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 aED8afV6Z41b6cvhedkg35P" \
    --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 aED8afV6Z41b6cvhedkg35P",
    "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 aED8afV6Z41b6cvhedkg35P

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


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

Example response (200):


{
    "data": {
        "id": "e7872b5c-9928-3fb7-a8dc-59b5b17319cd",
        "title": "Excepturi cum sunt voluptatibus",
        "description": "Velit sed id quis et ipsam et tenetur.",
        "status": "draft",
        "published_at": null,
        "sort_order": 0,
        "module": {
            "id": "a2dea34b-7ff4-4bfe-99e9-f97267fa8b31",
            "name": "Delectus tempore",
            "slug": "delectus-tempore-604085"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/admin/tutorials/{tutorial}/publish

Headers

Authorization        

Example: Bearer 4eda3Z6ha1bP5Dg68cfVkvE

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


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

Example response (200):


{
    "data": {
        "id": "e3bf5897-8b06-37d0-8790-996adeb3ebe3",
        "title": "Distinctio nostrum ut itaque",
        "description": "Nesciunt non atque quidem est.",
        "status": "draft",
        "published_at": null,
        "sort_order": 0,
        "module": {
            "id": "a2dea34b-84e8-4013-ae82-7380744942a3",
            "name": "Ducimus nobis",
            "slug": "ducimus-nobis-923878"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/admin/tutorials/{tutorial}/unpublish

Headers

Authorization        

Example: Bearer k14a8Ev6Vfhg6Da3dPcZe5b

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 6a85Dha1P4VcebfvZd6Ekg3" \
    --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 6a85Dha1P4VcebfvZd6Ekg3",
    "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": "4ff5e9bf-f3bc-3055-93ee-2ffbfc86574a",
        "type": "pdf",
        "title": "Quas cum est",
        "mime_type": "application/pdf",
        "size_bytes": 1474429,
        "duration_seconds": null,
        "sort_order": 0,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/admin/tutorials/{tutorial_id}/items

Headers

Authorization        

Example: Bearer 6a85Dha1P4VcebfvZd6Ekg3

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 d6kV8DefE4hPbga5136Zacv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        \"84cf29b6-7060-3749-866e-0c766a3be8cb\"
    ]
}"
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 d6kV8DefE4hPbga5136Zacv",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "items": [
        "84cf29b6-7060-3749-866e-0c766a3be8cb"
    ]
};

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 d6kV8DefE4hPbga5136Zacv

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 k81aVfgEhbDPZc3dev6654a" \
    --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 k81aVfgEhbDPZc3dev6654a",
    "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": "fc76dc3f-f052-37f1-bdf1-39eb1b484685",
        "type": "pdf",
        "title": "Sunt delectus aut",
        "mime_type": "application/pdf",
        "size_bytes": 202749,
        "duration_seconds": null,
        "sort_order": 0,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

PUT api/admin/tutorial-items/{tutorialItem}

Headers

Authorization        

Example: Bearer k81aVfgEhbDPZc3dev6654a

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 dfaDg6Pkv5Z4a1E6eV83chb" \
    --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 dfaDg6Pkv5Z4a1E6eV83chb",
    "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 dfaDg6Pkv5Z4a1E6eV83chb

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


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

Example response (200):


{
    "data": [
        {
            "id": "5db2c8df-be65-3fae-9263-5cbd5cbe5c97",
            "name": "Dr. Pablo de Oliveira Vale Neto",
            "abbreviation": "Regiane Guerra",
            "description": "Vero quidem et a veritatis.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "a6f754da-65f4-3b76-8c14-cd9c86e94b07",
            "name": "Joyce de Aguiar Verdara Filho",
            "abbreviation": "Sr. Sebastião Teobaldo Galhardo Sobrinho",
            "description": "Quibusdam qui ea nobis 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/units

Headers

Authorization        

Example: Bearer Eb1fdac6ae4hDvZ385gVP6k

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


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

Example response (200):


{
    "data": {
        "id": "72bc1027-2cd8-3175-abe0-0f54559b40a1",
        "name": "Anita Brito Jr.",
        "abbreviation": "Raysa Azevedo",
        "description": "Qui dolorem sit a a qui.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/units/{id}

Headers

Authorization        

Example: Bearer kvPch3edV1gba56D8af6ZE4

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: rem

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 Dvb64EchZagk351V8a6fPde" \
    --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 Dvb64EchZagk351V8a6fPde",
    "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 Dvb64EchZagk351V8a6fPde

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 DbdaaeZE16f3c45gk6v8hPV" \
    --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 DbdaaeZE16f3c45gk6v8hPV",
    "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 DbdaaeZE16f3c45gk6v8hPV

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: recusandae

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

unit   string     

Unit UUID Example: error

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


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

Example response (200):


{
    "data": [
        {
            "id": "9435eb97-7c1c-3dd2-bb09-ea397b3792dd",
            "name": "Dr. Berry Stokes I",
            "username": "ydach",
            "email": "raquel.labadie@example.org",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "c3e4c01e-e999-3b85-84e7-dbfc93924cf8",
            "name": "Zetta Monahan I",
            "username": "goldner.elsie",
            "email": "swift.frieda@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/users

Headers

Authorization        

Example: Bearer EhZbg1VvkD4685f36eadacP

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


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

Example response (200):


{
    "data": {
        "id": "07a54a17-3e8f-332a-9f09-8a09e5616152",
        "name": "Jayda Gleason",
        "username": "ocie.schuppe",
        "email": "gislason.reynold@example.net",
        "certification": null,
        "crea": null,
        "last_login_at": null,
        "image": {
            "id": null,
            "url": null
        },
        "sectors": [],
        "roles": []
    }
}
 

Request      

GET api/users/{id}

Headers

Authorization        

Example: Bearer 6ab14Dc5Eh38Zgkf6eaPVvd

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 agb6e54PDkdcZa3E8fh6v1V" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"certification\": \"Example Certification\",
    \"crea\": \"Example Crea\",
    \"email\": \"user@example.com\",
    \"username\": \"ubaumbach\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"2e0cc09b-defc-3c6b-bbfd-fe92a28d1e80\"
    ],
    \"roles\": [
        \"24004d29-106e-3a34-949c-a6faaa13821f\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users"
);

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

let body = {
    "name": "Example Name",
    "certification": "Example Certification",
    "crea": "Example Crea",
    "email": "user@example.com",
    "username": "ubaumbach",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "2e0cc09b-defc-3c6b-bbfd-fe92a28d1e80"
    ],
    "roles": [
        "24004d29-106e-3a34-949c-a6faaa13821f"
    ]
};

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 agb6e54PDkdcZa3E8fh6v1V

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: ubaumbach

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 aV16kfZ68cbPhgv4DE53eda" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"certification\": \"Example Certification\",
    \"crea\": \"Example Crea\",
    \"email\": \"user@example.com\",
    \"username\": \"fidel42\",
    \"password\": \"password123\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"015f1c18-3778-3f65-a484-734508a9096b\"
    ],
    \"roles\": [
        \"ce63ff1f-b763-3e00-8901-e00e21d60c0b\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users/1"
);

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

let body = {
    "name": "Example Name",
    "certification": "Example Certification",
    "crea": "Example Crea",
    "email": "user@example.com",
    "username": "fidel42",
    "password": "password123",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "015f1c18-3778-3f65-a484-734508a9096b"
    ],
    "roles": [
        "ce63ff1f-b763-3e00-8901-e00e21d60c0b"
    ]
};

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 aV16kfZ68cbPhgv4DE53eda

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: fidel42

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 d1ga43V6kZf6aEeP58vhbDc" \
    --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 d1ga43V6kZf6aEeP58vhbDc",
    "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 d1ga43V6kZf6aEeP58vhbDc

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 hfD1d3ZP8v6gVbacek6aE54" \
    --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 hfD1d3ZP8v6gVbacek6aE54",
    "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 hfD1d3ZP8v6gVbacek6aE54

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 h6f6P1k4aecVZbvgEa58D3d" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [
        \"e66947c1-d967-3069-b33b-d6ace569fe11\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users/1/permissions"
);

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

let body = {
    "permissions": [
        "e66947c1-d967-3069-b33b-d6ace569fe11"
    ]
};

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 h6f6P1k4aecVZbvgEa58D3d

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "consequuntur",
            "display_name": "Voluptas vitae tempore sit et dicta."
        },
        {
            "id": null,
            "name": "laudantium",
            "display_name": "Veniam sequi repellat incidunt nemo ut."
        }
    ]
}
 

Request      

GET api/users/{user}/permissions

Headers

Authorization        

Example: Bearer 8c4vPb5efV1Zg6hD3adk6aE

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


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

Example response (200):


{
    "data": [
        {
            "id": "349c1889-124c-3749-954d-4041dd42a855",
            "description": "Dr. Luciana Delatorre",
            "work": {
                "id": null,
                "name": null
            },
            "documents": [],
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "e16ee397-94c2-3821-ad30-ae98ca873246",
            "description": "Srta. Manoela Ferreira Neto",
            "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 Dcv6kZ43EV5d1abg6P8fahe

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 aebDgcE1Z8a643Pf6k5hVvd" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Example Description\",
    \"work_id\": \"abd2c31a-a3b0-39d7-af8a-147818f256a9\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/work-locations"
);

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

let body = {
    "description": "Example Description",
    "work_id": "abd2c31a-a3b0-39d7-af8a-147818f256a9"
};

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 aebDgcE1Z8a643Pf6k5hVvd

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: abd2c31a-a3b0-39d7-af8a-147818f256a9

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


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

Example response (200):


{
    "data": {
        "id": "1b4081b2-1e3a-37ff-8ed2-b7e5e0385d05",
        "description": "Enzo Batista Jr.",
        "work": {
            "id": null,
            "name": null
        },
        "documents": [],
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/work-locations/{workLocation}

Headers

Authorization        

Example: Bearer 4a1ePEV6k3ac8hfd5v6ZDgb

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 8vZ36cEf5kD16gdPeaVb4ah" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Example Description\",
    \"work_id\": \"028f6e86-69b1-3baf-9811-97dee2044d21\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/work-locations/019556e7-2e9f-777c-a177-30bbf0646c32"
);

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

let body = {
    "description": "Example Description",
    "work_id": "028f6e86-69b1-3baf-9811-97dee2044d21"
};

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 8vZ36cEf5kD16gdPeaVb4ah

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: 028f6e86-69b1-3baf-9811-97dee2044d21

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 56vZb16hDaEkge4fc83aVdP" \
    --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 56vZb16hDaEkge4fc83aVdP",
    "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 56vZb16hDaEkge4fc83aVdP

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


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

Example response (200):


{
    "data": [
        {
            "id": "ad3aa91f-dbf9-388b-8dff-eda5214d1e59",
            "name": "Reinaldo Queirós",
            "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": "1994-07-25 16:04:41.000000",
                "timezone_type": 3,
                "timezone": "America/Sao_Paulo"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "36811985-2076-3db4-b590-1d459f2d79b2",
            "name": "Sr. Davi Gustavo Gonçalves",
            "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": "2026-01-26 07:30:14.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 1fgch8VPbd6aeE34Zk6vaD5

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 6a34bZ8chvaeEkDf61dVgP5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"customer_id\": \"fb67512d-d436-3f3d-b620-34857527f1cf\",
    \"status_id\": \"ff3b72c8-7ab3-3626-bbd9-5fc78b1c5ebd\",
    \"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 6a34bZ8chvaeEkDf61dVgP5",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "customer_id": "fb67512d-d436-3f3d-b620-34857527f1cf",
    "status_id": "ff3b72c8-7ab3-3626-bbd9-5fc78b1c5ebd",
    "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 6a34bZ8chvaeEkDf61dVgP5

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: fb67512d-d436-3f3d-b620-34857527f1cf

status_id   string     

Status id. The uuid of an existing record in the statuses table. Example: ff3b72c8-7ab3-3626-bbd9-5fc78b1c5ebd

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


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

Example response (200):


{
    "data": {
        "id": "d2d987b8-4c25-3b79-8ce5-1e97ac5929c3",
        "name": "Valéria Reis 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": "2006-06-19 13:52:23.000000",
            "timezone_type": 3,
            "timezone": "America/Sao_Paulo"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/works/{id}

Headers

Authorization        

Example: Bearer 1d8acbZ5Vgk6EfvD3Pea4h6

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 1va4dhE6k8fVgZcD356eaPb" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"customer_id\": \"cb65a1cc-4c69-37b5-9cb5-ace5e5fac52e\",
    \"status_id\": \"6bbfc258-5fb8-3cf8-a421-7d8f0d2114f4\",
    \"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 1va4dhE6k8fVgZcD356eaPb",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "customer_id": "cb65a1cc-4c69-37b5-9cb5-ace5e5fac52e",
    "status_id": "6bbfc258-5fb8-3cf8-a421-7d8f0d2114f4",
    "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 1va4dhE6k8fVgZcD356eaPb

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: cb65a1cc-4c69-37b5-9cb5-ace5e5fac52e

status_id   string  optional    

Status id. The uuid of an existing record in the statuses table. Example: 6bbfc258-5fb8-3cf8-a421-7d8f0d2114f4

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "b505a777-e20d-3384-a2be-33bff75a2b11",
            "name": "Prof. Mortimer Stokes III",
            "username": "glockman",
            "email": "gibson.kyla@example.org",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "8cd9cdfa-7dac-32eb-b691-62942cf9a251",
            "name": "Cleve Pollich",
            "username": "joanne.carter",
            "email": "morton81@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/works/{work}/responsibles

Headers

Authorization        

Example: Bearer ZkvEb5d6ag134hfV68PaceD

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 V1vEaa6e4fbkZ5D3cd6gPh8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"97271b57-9c0f-3f86-9002-3f4ea70f16f1\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach"
);

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

let body = {
    "users": [
        "97271b57-9c0f-3f86-9002-3f4ea70f16f1"
    ]
};

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 V1vEaa6e4fbkZ5D3cd6gPh8

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 h6gVD3fa56cd84aP1kbeEZv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"ed65332c-2779-3296-aa2d-d9ba72cac836\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/detach"
);

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

let body = {
    "users": [
        "ed65332c-2779-3296-aa2d-d9ba72cac836"
    ]
};

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 h6gVD3fa56cd84aP1kbeEZv

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 vhe3c5ZVEkP4afagb618d6D" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"b96767c0-6f96-3290-b6f5-0899c3532a5e\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/sync"
);

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

let body = {
    "users": [
        "b96767c0-6f96-3290-b6f5-0899c3532a5e"
    ]
};

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 vhe3c5ZVEkP4afagb618d6D

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.