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


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

Example response (200):


{
    "data": [
        {
            "id": "b5abc089-4a86-3446-9c3e-9ea22dfbd683",
            "name": "reprehenderit-6b085ba007879",
            "display_name": "Voluptate quia maxime neque sit excepturi et odio.",
            "permissions_count": null
        },
        {
            "id": "956d9435-5f19-3738-b1e4-1bca1b55a1b6",
            "name": "eaque-6b085ba00b74e",
            "display_name": "Dicta in tenetur qui aut inventore quasi id voluptates.",
            "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 c3gh5D6kEdV8evaZ4b1f6Pa

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 VgD3d56a6Pcha84ZfbE1ekv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"display_name\": \"Example Name\",
    \"permissions\": [
        \"d68a4292-1df5-309d-ac0c-983a3fbd0d15\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/acl/roles"
);

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

let body = {
    "name": "Example Name",
    "display_name": "Example Name",
    "permissions": [
        "d68a4292-1df5-309d-ac0c-983a3fbd0d15"
    ]
};

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 VgD3d56a6Pcha84ZfbE1ekv

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 Eh4aefVgZac63bkD5d81Pv6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"display_name\": \"Example Name\",
    \"permissions\": [
        \"847afbb1-7061-3d31-a162-72e9fb20811e\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/acl/roles/1"
);

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

let body = {
    "name": "Example Name",
    "display_name": "Example Name",
    "permissions": [
        "847afbb1-7061-3d31-a162-72e9fb20811e"
    ]
};

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 Eh4aefVgZac63bkD5d81Pv6

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


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

Example response (200):


{
    "data": {
        "id": "50709b42-d56e-3ea3-ae43-72c162685af6",
        "name": "ipsam-6b085ba0193fc",
        "display_name": "Odit distinctio culpa quis.",
        "permissions_count": null
    }
}
 

Request      

GET api/acl/roles/{id}

Headers

Authorization        

Example: Bearer 8gPhbav3fD4d6Za1kcV65Ee

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "ut",
            "display_name": "Eos impedit esse omnis repellendus est voluptate."
        },
        {
            "id": null,
            "name": "velit",
            "display_name": "Porro iure incidunt repellat aut labore dignissimos."
        }
    ]
}
 

Request      

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

Headers

Authorization        

Example: Bearer ZaDd8P34bv6hEa1ek5cf6gV

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

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "ipsum",
            "display_name": "Ab asperiores eum hic saepe et necessitatibus maiores."
        },
        {
            "id": null,
            "name": "aut",
            "display_name": "Voluptas et quis nemo natus quia."
        }
    ],
    "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 ahgb64fZVvPD38Eac651ekd

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

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

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


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

Example response (200):


{
    "data": {
        "id": null,
        "name": "et",
        "display_name": "In dolores et nobis et quidem repellendus illum."
    }
}
 

Request      

GET api/acl/permissions/{id}

Headers

Authorization        

Example: Bearer 3EkVhvg6fa1DaPc6eZ4d5b8

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 1V465PEcZhkga6D3vdb8afe" \
    --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 1V465PEcZhkga6D3vdb8afe",
    "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 1V465PEcZhkga6D3vdb8afe

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


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

Example response (200):


{
    "data": [
        {
            "id": "7524d0f3-f4d5-30c3-8b1b-967e8e2a9385",
            "code": null,
            "type": "saída",
            "payment_method": "boleto",
            "amount": 4279.58,
            "due_date": "2026-12-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": "Voluptas id alias reprehenderit accusamus dolorem quo rerum quasi quaerat officia repudiandae.",
            "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": "tempore",
            "field2": 74,
            "field3": false,
            "notes": "Iusto et ratione saepe quam nemo repudiandae.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "7943ec75-304d-3ca0-a922-248ce9c77f1b",
            "code": null,
            "type": "entrada",
            "payment_method": "cheque",
            "amount": 8225.2,
            "due_date": "2026-12-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": "Eaque exercitationem dolorem sequi velit velit totam.",
            "is_recurring": null,
            "recurrence_config": null,
            "parent_id": null,
            "recurrence_order": 1,
            "total_recurrences": null,
            "children_count": 0,
            "remaining_recurrences": null,
            "has_children": false,
            "field1": "et",
            "field2": 33,
            "field3": false,
            "notes": "Enim quia ea voluptatum iure et.",
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/accounts-payable-receivable/reminders

Headers

Authorization        

Example: Bearer PZ8v5egda61ckfD4Eah6Vb3

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

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

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

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[]=ea&suppliers[]=explicabo&works[]=modi&cost_centers[]=ad&statuses[]=a+protestar&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-11-26T13%3A17%3A36&protest_date_end=2026-11-26T13%3A17%3A36&has_protest=1&has_children=1&is_recurring=1" \
    --header "Authorization: Bearer Zk5hgfd834eVbaPD1Ev6ca6" \
    --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]": "ea",
    "suppliers[0]": "explicabo",
    "works[0]": "modi",
    "cost_centers[0]": "ad",
    "statuses[0]": "a protestar",
    "payment_method": "cheque",
    "date_start": "2023-01-01",
    "date_end": "2023-12-31",
    "protest_date_start": "2026-11-26T13:17:36",
    "protest_date_end": "2026-11-26T13:17:36",
    "has_protest": "1",
    "has_children": "1",
    "is_recurring": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "12cca440-db93-3ec6-affa-f132b61b2d0a",
            "code": null,
            "type": "entrada",
            "payment_method": "cheque",
            "amount": 7333.41,
            "due_date": "2026-12-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": "Iure voluptatem non possimus aut illo vitae velit ullam facere quod.",
            "is_recurring": null,
            "recurrence_config": null,
            "parent_id": null,
            "recurrence_order": 1,
            "total_recurrences": null,
            "children_count": 0,
            "remaining_recurrences": null,
            "has_children": false,
            "field1": "quia",
            "field2": 28,
            "field3": true,
            "notes": "Expedita explicabo aperiam deleniti enim.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "20a77d75-d5e7-39b5-96f8-0163ec1a5db4",
            "code": null,
            "type": "entrada",
            "payment_method": "boleto",
            "amount": 9781.32,
            "due_date": "2026-12-09T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Aut fugiat asperiores quibusdam qui pariatur sed repudiandae beatae assumenda in.",
            "is_recurring": null,
            "recurrence_config": null,
            "parent_id": null,
            "recurrence_order": 1,
            "total_recurrences": null,
            "children_count": 0,
            "remaining_recurrences": null,
            "has_children": false,
            "field1": "est",
            "field2": 4,
            "field3": false,
            "notes": "Hic voluptatum quia reprehenderit 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/accounts-payable-receivable/protests

Headers

Authorization        

Example: Bearer Zk5hgfd834eVbaPD1Ev6ca6

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

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

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

Search query. Example: Salary

code   string  optional    

Filter by account code. Example: CPR-000123

type   string  optional    

Type. Example: entrada

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

The uuid of an existing record in the customers table.

suppliers   string[]  optional    

The uuid of an existing record in the suppliers table.

works   string[]  optional    

The uuid of an existing record in the works table.

cost_centers   string[]  optional    

The uuid of an existing record in the cost_centers table.

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

Payment method. Example: cheque

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

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

date_end   string  optional    

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

protest_date_start   string  optional    

O campo value deve ser uma data válida. Example: 2026-11-26T13:17:36

protest_date_end   string  optional    

O campo value deve ser uma data válida. Example: 2026-11-26T13:17:36

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[]=dolores&suppliers[]=culpa&works[]=quia&cost_centers[]=sunt&statuses[]=a+protestar&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-11-26T13%3A17%3A36&protest_date_end=2026-11-26T13%3A17%3A36&has_protest=1&has_children=1&is_recurring=1" \
    --header "Authorization: Bearer 18P53Z4b6vcVa6EedfhgDak" \
    --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]": "dolores",
    "suppliers[0]": "culpa",
    "works[0]": "quia",
    "cost_centers[0]": "sunt",
    "statuses[0]": "a protestar",
    "payment_method": "cheque",
    "date_start": "2023-01-01",
    "date_end": "2023-12-31",
    "protest_date_start": "2026-11-26T13:17:36",
    "protest_date_end": "2026-11-26T13:17:36",
    "has_protest": "1",
    "has_children": "1",
    "is_recurring": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "207fd9c3-4032-31ff-8d19-bbee84fa3464",
            "code": null,
            "type": "entrada",
            "payment_method": "boleto",
            "amount": 2524.74,
            "due_date": "2026-12-10T03: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": "Saepe tempora quam cumque officiis similique eum aut architecto dignissimos unde amet neque.",
            "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": "esse",
            "field2": 3,
            "field3": true,
            "notes": "Dolorum dicta non ut et. Ut eligendi a delectus.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "fd096015-01e5-3d27-9111-dfc4c7539203",
            "code": null,
            "type": "entrada",
            "payment_method": "cheque",
            "amount": 676.55,
            "due_date": "2026-12-24T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Non dolorum eum dolor quo voluptatem illum consequuntur maxime blanditiis.",
            "is_recurring": null,
            "recurrence_config": null,
            "parent_id": null,
            "recurrence_order": 1,
            "total_recurrences": null,
            "children_count": 0,
            "remaining_recurrences": null,
            "has_children": false,
            "field1": "sit",
            "field2": 60,
            "field3": true,
            "notes": "Eveniet delectus rerum magnam porro.",
            "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 18P53Z4b6vcVa6EedfhgDak

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

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

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

Search query. Example: Salary

code   string  optional    

Filter by account code. Example: CPR-000123

type   string  optional    

Type. Example: entrada

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

The uuid of an existing record in the customers table.

suppliers   string[]  optional    

The uuid of an existing record in the suppliers table.

works   string[]  optional    

The uuid of an existing record in the works table.

cost_centers   string[]  optional    

The uuid of an existing record in the cost_centers table.

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

Payment method. Example: cheque

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

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

date_end   string  optional    

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

protest_date_start   string  optional    

O campo value deve ser uma data válida. Example: 2026-11-26T13:17:36

protest_date_end   string  optional    

O campo value deve ser uma data válida. Example: 2026-11-26T13:17:36

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 1Zkh3a6fcE4eVDbv8d6gaP5" \
    --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\": \"e5a23ae2-7591-3cd9-9dc9-67ef26e85882\",
    \"customer_id\": \"c850e246-bc03-3f2c-b994-4b225a9a1fdd\",
    \"work_id\": \"b2342b99-18f5-3a7f-9ab7-8be83633b7ec\",
    \"cost_center_id\": \"8c9c83ad-5b97-3c65-9c75-e5cb26ac3039\",
    \"status\": \"Example Status\",
    \"protest_date\": \"2024-01-01\",
    \"bank_account_id\": \"801ca00e-b040-3781-a24d-7b7c017e9d80\",
    \"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 1Zkh3a6fcE4eVDbv8d6gaP5",
    "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": "e5a23ae2-7591-3cd9-9dc9-67ef26e85882",
    "customer_id": "c850e246-bc03-3f2c-b994-4b225a9a1fdd",
    "work_id": "b2342b99-18f5-3a7f-9ab7-8be83633b7ec",
    "cost_center_id": "8c9c83ad-5b97-3c65-9c75-e5cb26ac3039",
    "status": "Example Status",
    "protest_date": "2024-01-01",
    "bank_account_id": "801ca00e-b040-3781-a24d-7b7c017e9d80",
    "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 1Zkh3a6fcE4eVDbv8d6gaP5

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: e5a23ae2-7591-3cd9-9dc9-67ef26e85882

customer_id   string  optional    

Cliente. The uuid of an existing record in the customers table. Example: c850e246-bc03-3f2c-b994-4b225a9a1fdd

work_id   string  optional    

Obra. The uuid of an existing record in the works table. Example: b2342b99-18f5-3a7f-9ab7-8be83633b7ec

cost_center_id   string     

Cost center id. The uuid of an existing record in the cost_centers table. Example: 8c9c83ad-5b97-3c65-9c75-e5cb26ac3039

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: 801ca00e-b040-3781-a24d-7b7c017e9d80

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

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

let body = {
    "fiscal_document_id": "minima",
    "installment_ids": [
        "dolor"
    ],
    "payment_method": "outro",
    "work_id": "perferendis",
    "cost_center_id": "quasi"
};

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 bP58dVe6Zkghaf34c1vD6aE

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

installment_ids   string[]  optional    

The uuid of an existing record in the fiscal_document_installments table.

payment_method   string  optional    

Example: outro

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

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

cost_center_id   string  optional    

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: numquam

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

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


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

Example response (200):


{
    "data": {
        "id": "41169631-f03e-3c32-a445-cc7c6ad55aaf",
        "code": null,
        "type": "entrada",
        "payment_method": "cheque",
        "amount": 957.34,
        "due_date": "2026-12-06T03:00:00.000000Z",
        "status": null,
        "payment_date": null,
        "protest_date": null,
        "paid_amount": null,
        "interest_amount": null,
        "penalty_amount": null,
        "notary_fee_amount": null,
        "description": "Unde qui expedita animi blanditiis reprehenderit libero consequatur voluptates quo qui aut est 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": "rem",
        "field2": 28,
        "field3": true,
        "notes": "Dolorum repellat quos voluptatem ea quia ad sint.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer D3Z164cdhaafbV8k5egvP6E

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: neque

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 36vc5fk14aVa86DhgedPZbE" \
    --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\": \"91575613-5367-3d63-b703-cde063547ea3\",
    \"customer_id\": \"aa6f8896-fc6a-3a17-aa7e-be586810af6c\",
    \"work_id\": \"eee984d4-0993-3d94-82ea-2ffe6bdece5d\",
    \"cost_center_id\": \"ed36c27c-14cc-3eb7-a235-74d7fe088a4e\",
    \"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\": \"d84b55b6-a94e-3ad2-a92a-b1edc0d141e6\",
    \"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 36vc5fk14aVa86DhgedPZbE",
    "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": "91575613-5367-3d63-b703-cde063547ea3",
    "customer_id": "aa6f8896-fc6a-3a17-aa7e-be586810af6c",
    "work_id": "eee984d4-0993-3d94-82ea-2ffe6bdece5d",
    "cost_center_id": "ed36c27c-14cc-3eb7-a235-74d7fe088a4e",
    "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": "d84b55b6-a94e-3ad2-a92a-b1edc0d141e6",
    "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 36vc5fk14aVa86DhgedPZbE

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: 91575613-5367-3d63-b703-cde063547ea3

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: aa6f8896-fc6a-3a17-aa7e-be586810af6c

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: eee984d4-0993-3d94-82ea-2ffe6bdece5d

cost_center_id   string     

Cost center id. The uuid of an existing record in the cost_centers table. Example: ed36c27c-14cc-3eb7-a235-74d7fe088a4e

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: d84b55b6-a94e-3ad2-a92a-b1edc0d141e6

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: odio

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


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

Example response (200):


{
    "data": {
        "id": "d8e9bb93-5ef3-3e2c-b638-78ad5578173b",
        "name": "Ms. Eva Roob",
        "username": "brakus.antoinette",
        "email": "ritchie.celia@example.com",
        "ability": [
            {
                "action": "read",
                "subject": "Auth"
            },
            {
                "action": "listar",
                "subject": "padrão"
            }
        ],
        "roles": [],
        "preferences": [],
        "sectors": [],
        "image": {
            "id": null,
            "url": null
        }
    }
}
 

Request      

GET api/auth/user

Headers

Authorization        

Example: Bearer 6caEDP41ekZba3V5v8h6gdf

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 Z5D8E4kv3V1adcbh6fPa6ge" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"certification\": \"Example Certification\",
    \"crea\": \"Example Crea\",
    \"email\": \"user@example.com\",
    \"username\": \"erich.gutmann\",
    \"password\": \"password123\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"8e027afb-532a-3b6d-b016-158804122bc5\"
    ],
    \"roles\": [
        \"449a933c-d386-316b-ac2a-71299e8f9357\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/auth/user"
);

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

let body = {
    "name": "Example Name",
    "certification": "Example Certification",
    "crea": "Example Crea",
    "email": "user@example.com",
    "username": "erich.gutmann",
    "password": "password123",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "8e027afb-532a-3b6d-b016-158804122bc5"
    ],
    "roles": [
        "449a933c-d386-316b-ac2a-71299e8f9357"
    ]
};

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 Z5D8E4kv3V1adcbh6fPa6ge

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: erich.gutmann

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

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

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

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

let body = {
    "key": "llcauucbedyxd",
    "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 6k5c4v8VDagbeZfa13dhP6E

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

key   string     

Example: commodi

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankTransfer   string     

Example: ipsum

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 3

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/10/withdraw" \
    --header "Authorization: Bearer hkf15aP48eadZcgb6D3vV6E" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"amount\": 1,
    \"description\": \"Example Description\",
    \"transaction_date\": \"2024-01-01\",
    \"transaction_category_id\": \"Example Transaction category id\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/bank-accounts/10/withdraw"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 10

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

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


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

Example response (200):


{
    "data": {
        "id": "796a4757-fb5c-36e3-a62f-cd5efba92fb0",
        "agency": "7174",
        "account": "3044989-3",
        "type": "caixa",
        "balance": 6497.58,
        "holder_type": "pj",
        "alias": "ullam",
        "limit": 2850.73,
        "available_balance": 9348.31,
        "used_limit": 0,
        "available_limit": 2850.73,
        "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 caf4VEg531DkdebPv6Zha86

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


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

Example response (200):


{
    "data": [
        {
            "id": "0e9f5176-bafb-3608-968c-99bfde98c177",
            "agency": "2956",
            "account": "2673094-9",
            "type": "poupança",
            "balance": 3667.9,
            "holder_type": "pj",
            "alias": "possimus",
            "limit": 6400.98,
            "available_balance": 10068.88,
            "used_limit": 0,
            "available_limit": 6400.98,
            "is_default": null,
            "default_payment_method": null,
            "bank": {
                "id": null,
                "name": null,
                "code": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "178a9d83-41d9-39c3-bdb4-3ff3ae37ff5e",
            "agency": "3650",
            "account": "5302055-3",
            "type": "caixa",
            "balance": 1155.05,
            "holder_type": "pj",
            "alias": "voluptatem",
            "limit": 3169.2,
            "available_balance": 4324.25,
            "used_limit": 0,
            "available_limit": 3169.2,
            "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 DfgcahZd63b4ae5kvPVE168

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 fagakV6Z54h1Pc3bE86Dedv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"agency\": \"Example Agency\",
    \"account\": \"4022027-9\",
    \"bank_id\": \"4da98cb5-2b4a-34ec-9a46-9ba012e95155\",
    \"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 fagakV6Z54h1Pc3bE86Dedv",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "agency": "Example Agency",
    "account": "4022027-9",
    "bank_id": "4da98cb5-2b4a-34ec-9a46-9ba012e95155",
    "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 fagakV6Z54h1Pc3bE86Dedv

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

agency   string     

Agency. Example: Example Agency

account   string     

Account. Example: 4022027-9

bank_id   string     

Bank id. The uuid of an existing record in the banks table. Example: 4da98cb5-2b4a-34ec-9a46-9ba012e95155

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/15" \
    --header "Authorization: Bearer 6Vc1P3gk5ab6vheaZ8EfD4d" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"agency\": \"Example Agency\",
    \"account\": \"7100832-7\",
    \"bank_id\": \"61b0e8e1-79ac-3835-a555-c1bf8ce54b69\",
    \"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/15"
);

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

let body = {
    "agency": "Example Agency",
    "account": "7100832-7",
    "bank_id": "61b0e8e1-79ac-3835-a555-c1bf8ce54b69",
    "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 6Vc1P3gk5ab6vheaZ8EfD4d

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 15

Body Parameters

agency   string  optional    

Agency. Example: Example Agency

account   string  optional    

Account. Example: 7100832-7

bank_id   string  optional    

Bank id. The uuid of an existing record in the banks table. Example: 61b0e8e1-79ac-3835-a555-c1bf8ce54b69

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

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


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

Example response (200):


{
    "data": {
        "id": "73c895cc-3e50-37d5-87bd-3759e579ef7e",
        "agency": "7483",
        "account": "4887393-3",
        "type": "corrente",
        "balance": 9782.75,
        "holder_type": "pf",
        "alias": "iusto",
        "limit": 8078.61,
        "available_balance": 17861.36,
        "used_limit": 0,
        "available_limit": 8078.61,
        "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 Dva6hbgaE8513cfe4ZPkVd6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 20

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 4

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 9

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/19/statements" \
    --header "Authorization: Bearer ehakbEaf6gVZPD5d8c1v634" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sort_by\": \"magnam\",
    \"sort_desc\": true,
    \"page\": 42,
    \"per_page\": 17,
    \"q\": \"bibjlvailazvcwnqvtovtetqk\",
    \"type\": \"juros\",
    \"date_start\": \"2026-11-26T13:17:37\",
    \"date_end\": \"2072-07-27\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/bank-accounts/19/statements"
);

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

let body = {
    "sort_by": "magnam",
    "sort_desc": true,
    "page": 42,
    "per_page": 17,
    "q": "bibjlvailazvcwnqvtovtetqk",
    "type": "juros",
    "date_start": "2026-11-26T13:17:37",
    "date_end": "2072-07-27"
};

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 ehakbEaf6gVZPD5d8c1v634

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 19

Body Parameters

sort_by   string  optional    

Example: magnam

sort_desc   boolean  optional    

Example: true

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

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

type   string  optional    

Example: juros

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

O campo value deve ser uma data válida. Example: 2026-11-26T13:17:37

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: 2072-07-27

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 5

bankStatement   string     

Example: voluptate

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


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

Example response (200):


{
    "data": [
        {
            "id": "0074aad2-9dea-3503-829e-4b2f93e30e5c",
            "name": "Lutero Comercial Ltda.",
            "code": "721"
        },
        {
            "id": "f34ca82c-e1f1-3dee-a6f1-fcf96417bbce",
            "name": "Oliveira e Queirós",
            "code": "623"
        }
    ],
    "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 41dh5afbE8Pe6ag3vDZ6Vck

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

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

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


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

Example response (200):


{
    "data": {
        "id": "0c4dc09a-4562-383b-ad38-6e6915740bdb",
        "name": "Brito Comercial Ltda.",
        "code": "45"
    }
}
 

Request      

GET api/banks/{bank}

Headers

Authorization        

Example: Bearer k8e3bfgd5h4Z6ac16vVDaEP

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

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

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=Ut+non+est+sapiente.&categories[]=in&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=omnis&customers[]=autem&suppliers[]=rerum&works[]=voluptates&cost_centers[]=deleniti" \
    --header "Authorization: Bearer e6b58PdVDZfE6hv1a3kcga4" \
    --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": "Ut non est sapiente.",
    "categories[0]": "in",
    "date_start": "2021-01-01",
    "date_end": "2021-01-31",
    "bank_accounts[0]": "omnis",
    "customers[0]": "autem",
    "suppliers[0]": "rerum",
    "works[0]": "voluptates",
    "cost_centers[0]": "deleniti",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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: Ut non est sapiente.

categories   string[]  optional    

The uuid of an existing record in the transaction_categories table.

date_start   string  optional    

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

date_end   string  optional    

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

bank_accounts   string[]  optional    

The uuid of an existing record in the bank_accounts table.

customers   string[]  optional    

The uuid of an existing record in the customers table.

suppliers   string[]  optional    

The uuid of an existing record in the suppliers table.

works   string[]  optional    

The uuid of an existing record in the works table.

cost_centers   string[]  optional    

The uuid of an existing record in the cost_centers table.

List cash flow

requires authentication cash-flow index

List all cash flow

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/cash-flows?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Salary&cash_session=uuid&type=entrada&description=Eligendi+dolores+ea+quod+nihil.&categories[]=quam&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=impedit&customers[]=fuga&suppliers[]=maxime&works[]=dolor&cost_centers[]=voluptatem" \
    --header "Authorization: Bearer k65P1avh3Z8EDa6gVdcf4eb" \
    --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": "Eligendi dolores ea quod nihil.",
    "categories[0]": "quam",
    "date_start": "2021-01-01",
    "date_end": "2021-01-31",
    "bank_accounts[0]": "impedit",
    "customers[0]": "fuga",
    "suppliers[0]": "maxime",
    "works[0]": "dolor",
    "cost_centers[0]": "voluptatem",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "0b45d100-e7d9-39e7-90c7-2a8911bfbd8c",
            "code": "FC-50980495",
            "type": "tarifa",
            "amount": -5906.39,
            "description": "Ipsa hic enim soluta hic aliquid velit.",
            "transaction_date": "2024-08-25T03:00:00.000000Z",
            "transaction_category": {
                "id": null,
                "name": null,
                "type": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "aa980980-4984-3286-933c-07f1fa3ba0e4",
            "code": "FC-35530538",
            "type": "transferência",
            "amount": -2631.76,
            "description": "Temporibus qui eveniet a laboriosam itaque laboriosam consequatur.",
            "transaction_date": "2009-03-14T03: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 k65P1avh3Z8EDa6gVdcf4eb

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: Eligendi dolores ea quod nihil.

categories   string[]  optional    

The uuid of an existing record in the transaction_categories table.

date_start   string  optional    

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

date_end   string  optional    

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

bank_accounts   string[]  optional    

The uuid of an existing record in the bank_accounts table.

customers   string[]  optional    

The uuid of an existing record in the customers table.

suppliers   string[]  optional    

The uuid of an existing record in the suppliers table.

works   string[]  optional    

The uuid of an existing record in the works table.

cost_centers   string[]  optional    

The uuid of an existing record in the cost_centers table.

Create cash flow

requires authentication cash-flow store

Create a new cash flow

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/cash-flows" \
    --header "Authorization: Bearer vadV63ce6Z5Pbkfa1Dh4g8E" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"Example Type\",
    \"cash_session_id\": \"e790e888-deb3-3b87-a06b-2c3bf8cb396f\",
    \"transaction_category_id\": \"3cc4cfa1-3010-3692-b9f8-3da56ad83682\",
    \"bank_account_id\": \"fda218c3-414a-3ef3-8c11-1ddb22ddfb0c\",
    \"customer_id\": \"c2ac4f8e-7272-3827-9a94-646c594aa00b\",
    \"supplier_id\": \"23f0f9bb-2526-304f-86b3-38219426e4de\",
    \"work_id\": \"c68943c9-f29b-3f90-8afb-c54d1d729866\",
    \"cost_center_id\": \"3a1203cc-e9de-3e0b-8fab-e6ceedf566f5\",
    \"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 vadV63ce6Z5Pbkfa1Dh4g8E",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "Example Type",
    "cash_session_id": "e790e888-deb3-3b87-a06b-2c3bf8cb396f",
    "transaction_category_id": "3cc4cfa1-3010-3692-b9f8-3da56ad83682",
    "bank_account_id": "fda218c3-414a-3ef3-8c11-1ddb22ddfb0c",
    "customer_id": "c2ac4f8e-7272-3827-9a94-646c594aa00b",
    "supplier_id": "23f0f9bb-2526-304f-86b3-38219426e4de",
    "work_id": "c68943c9-f29b-3f90-8afb-c54d1d729866",
    "cost_center_id": "3a1203cc-e9de-3e0b-8fab-e6ceedf566f5",
    "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 vadV63ce6Z5Pbkfa1Dh4g8E

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: e790e888-deb3-3b87-a06b-2c3bf8cb396f

transaction_category_id   string  optional    

Transaction category id. The uuid of an existing record in the transaction_categories table. Example: 3cc4cfa1-3010-3692-b9f8-3da56ad83682

bank_account_id   string  optional    

Bank account id. The uuid of an existing record in the bank_accounts table. Example: fda218c3-414a-3ef3-8c11-1ddb22ddfb0c

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: c2ac4f8e-7272-3827-9a94-646c594aa00b

supplier_id   string  optional    

Supplier id. The uuid of an existing record in the suppliers table. Example: 23f0f9bb-2526-304f-86b3-38219426e4de

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: c68943c9-f29b-3f90-8afb-c54d1d729866

cost_center_id   string     

Cost center id. The uuid of an existing record in the cost_centers table. Example: 3a1203cc-e9de-3e0b-8fab-e6ceedf566f5

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

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


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

Example response (200):


{
    "data": {
        "id": "06d49504-891c-3ca5-b485-bf41cc5a8f32",
        "code": "FC-04809156",
        "type": "depósito",
        "amount": 9372.79,
        "description": "Soluta ea sed quibusdam.",
        "transaction_date": "2024-08-24T03: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 EvfakZ3c5db6ea6PV4Dh8g1

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 5

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/11" \
    --header "Authorization: Bearer 5fbPvZd3e8g1akEhD664acV" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"Example Type\",
    \"cash_session_id\": \"eb367656-53f7-36a3-a86f-2bbcd85f1c9f\",
    \"transaction_category_id\": \"6201ad79-903e-380f-b5fc-51768065c00f\",
    \"bank_account_id\": \"718ca803-98bc-3a62-921a-c289486176bc\",
    \"customer_id\": \"69090137-a983-3dcf-8ab8-9bdc520dc7ca\",
    \"supplier_id\": \"1b2624d3-e597-3257-80d4-ffd77fc8b33f\",
    \"work_id\": \"8e5a44d9-a6f9-3de0-9d2f-e1661bb6217b\",
    \"cost_center_id\": \"34dac30a-d8a2-3c86-8b08-99ab7d863ec6\",
    \"amount\": 1,
    \"description\": \"Example Description\",
    \"transaction_date\": \"2024-01-01\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-flows/11"
);

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

let body = {
    "type": "Example Type",
    "cash_session_id": "eb367656-53f7-36a3-a86f-2bbcd85f1c9f",
    "transaction_category_id": "6201ad79-903e-380f-b5fc-51768065c00f",
    "bank_account_id": "718ca803-98bc-3a62-921a-c289486176bc",
    "customer_id": "69090137-a983-3dcf-8ab8-9bdc520dc7ca",
    "supplier_id": "1b2624d3-e597-3257-80d4-ffd77fc8b33f",
    "work_id": "8e5a44d9-a6f9-3de0-9d2f-e1661bb6217b",
    "cost_center_id": "34dac30a-d8a2-3c86-8b08-99ab7d863ec6",
    "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 5fbPvZd3e8g1akEhD664acV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 11

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: eb367656-53f7-36a3-a86f-2bbcd85f1c9f

transaction_category_id   string  optional    

Transaction category id. The uuid of an existing record in the transaction_categories table. Example: 6201ad79-903e-380f-b5fc-51768065c00f

bank_account_id   string  optional    

Bank account id. The uuid of an existing record in the bank_accounts table. Example: 718ca803-98bc-3a62-921a-c289486176bc

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: 69090137-a983-3dcf-8ab8-9bdc520dc7ca

supplier_id   string  optional    

Supplier id. The uuid of an existing record in the suppliers table. Example: 1b2624d3-e597-3257-80d4-ffd77fc8b33f

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: 8e5a44d9-a6f9-3de0-9d2f-e1661bb6217b

cost_center_id   string     

Cost center id. The uuid of an existing record in the cost_centers table. Example: 34dac30a-d8a2-3c86-8b08-99ab7d863ec6

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 3

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


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

Example response (200):


{
    "data": [
        {
            "id": "463648e1-d435-339a-a2ab-bae43944429f",
            "code": null,
            "opened_by": null,
            "opened_at": "1979-09-02T15:58:10.000000Z",
            "closed_by": null,
            "closed_at": "2000-06-29T04:35:27.000000Z",
            "opening_balance": 2553.88,
            "closing_balance": 2584.05,
            "total_income": 0,
            "total_expense": 0,
            "total_balance": 0,
            "status": "Aberto",
            "hasSnapshot": false,
            "created_at": "1979-12-28T05:34:35.000000Z",
            "updated_at": "1998-08-04T07:15:08.000000Z"
        },
        {
            "id": "b2c5633b-bb4d-3e44-a59a-a0ffffe706c8",
            "code": null,
            "opened_by": null,
            "opened_at": "2009-04-03T15:36:23.000000Z",
            "closed_by": null,
            "closed_at": "2008-04-29T22:37:39.000000Z",
            "opening_balance": 2377.09,
            "closing_balance": 331.82,
            "total_income": 0,
            "total_expense": 0,
            "total_balance": 0,
            "status": "Aberto",
            "hasSnapshot": false,
            "created_at": "1971-12-05T20:12:10.000000Z",
            "updated_at": "2011-02-16T04:26:30.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 ak458ce6gVhf36baEZDdv1P

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


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

Example response (200):


{
    "data": {
        "id": "020ae477-be4e-3dd4-a209-289ab3b81d9e",
        "code": null,
        "opened_by": null,
        "opened_at": "2007-02-12T18:35:19.000000Z",
        "closed_by": null,
        "closed_at": "1994-06-19T07:12:44.000000Z",
        "opening_balance": 2289.12,
        "closing_balance": 6606.6,
        "total_income": 0,
        "total_expense": 0,
        "total_balance": 0,
        "status": "Aberto",
        "hasSnapshot": false,
        "created_at": "2013-08-02T00:08:29.000000Z",
        "updated_at": "1976-12-16T05:02:53.000000Z"
    }
}
 

Request      

POST api/cash-sessions/open

Headers

Authorization        

Example: Bearer feDVbc6aP4ZvEd681hk3g5a

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/929ba7c0-f483-3447-8828-a2620448b418" \
    --header "Authorization: Bearer 8Dkda31gvEb6Ve5cZ4fa6hP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/close/929ba7c0-f483-3447-8828-a2620448b418"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 929ba7c0-f483-3447-8828-a2620448b418

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/12ec29eb-dd69-3786-ab49-680f575e62c3/account-snapshot" \
    --header "Authorization: Bearer g86ckv5VaaE6beD4Pdh3f1Z" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/12ec29eb-dd69-3786-ab49-680f575e62c3/account-snapshot"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 12ec29eb-dd69-3786-ab49-680f575e62c3

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/9d39c1f9-2c67-346e-a715-6f5ba2e4c4cf" \
    --header "Authorization: Bearer aE86fDZPkvdgb461e3haVc5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/9d39c1f9-2c67-346e-a715-6f5ba2e4c4cf"
);

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


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

Example response (200):


{
    "data": {
        "id": "39a906ba-0211-3341-810a-a597a89bbd66",
        "code": null,
        "opened_by": null,
        "opened_at": "1998-08-13T20:28:08.000000Z",
        "closed_by": null,
        "closed_at": "2025-05-23T11:35:28.000000Z",
        "opening_balance": 3344.41,
        "closing_balance": 3839.97,
        "total_income": 0,
        "total_expense": 0,
        "total_balance": 0,
        "status": "Aberto",
        "hasSnapshot": false,
        "created_at": "2024-04-11T22:16:51.000000Z",
        "updated_at": "1972-10-29T18:33:38.000000Z"
    }
}
 

Request      

GET api/cash-sessions/{uuid}

Headers

Authorization        

Example: Bearer aE86fDZPkvdgb461e3haVc5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 9d39c1f9-2c67-346e-a715-6f5ba2e4c4cf

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/4c116b01-bc58-3c18-bc48-6d0fc40cfd24" \
    --header "Authorization: Bearer 6h6PgavcZkbEf1V3d8aD45e" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/4c116b01-bc58-3c18-bc48-6d0fc40cfd24"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 4c116b01-bc58-3c18-bc48-6d0fc40cfd24

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


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

Example response (200):


{
    "data": [
        {
            "id": "c9fc8022-1b67-36e5-9e71-f0323cea2dc8",
            "name": "modi et",
            "slug": null,
            "abbreviation": null,
            "tutorials_count": 0
        },
        {
            "id": "133d28ab-c8c7-333f-a1c5-0a3db64a7fdf",
            "name": "qui autem",
            "slug": null,
            "abbreviation": null,
            "tutorials_count": 0
        }
    ]
}
 

Request      

GET api/tutorials/sectors

Headers

Authorization        

Example: Bearer 8fea6bD5kaPghVc136E4vZd

Content-Type        

Example: application/json

Accept        

Example: application/json

Módulos da central

requires authentication No specific permission required

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

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "1e561070-7600-3c55-a7fc-66f97e260209",
            "name": "Doloremque quam",
            "slug": "doloremque-quam-346833",
            "description": "Beatae quasi pariatur eaque maxime beatae necessitatibus perferendis.",
            "icon": null,
            "color": null,
            "sort_order": 0,
            "is_active": true,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "adcf5fb3-1f89-3dda-b06d-160d7b571eaa",
            "name": "Dolor doloremque",
            "slug": "dolor-doloremque-502367",
            "description": "Deserunt dolor est quo facilis velit.",
            "icon": null,
            "color": null,
            "sort_order": 0,
            "is_active": true,
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/tutorials/modules

Headers

Authorization        

Example: Bearer eb48a6ZdkvcPE65hDf3ag1V

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sector_id   string[]  optional    

Listar tutoriais

requires authentication No specific permission required

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

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/tutorials?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=ordem+de+servi%C3%A7o&module_id[]=1d01f108-b466-3343-acff-d28ae1f0bce9" \
    --header "Authorization: Bearer VP1Ehk63568faabg4DdvceZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/tutorials"
);

const params = {
    "sort_by": "created_at",
    "sort_desc": "1",
    "page": "1",
    "per_page": "15",
    "q": "ordem de serviço",
    "module_id[0]": "1d01f108-b466-3343-acff-d28ae1f0bce9",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "b651cc64-0808-38e3-a144-4c71661e7d4d",
            "title": "Illum delectus nulla aliquam",
            "description": "Ut porro quia tempore aut vel nam aut voluptas.",
            "cover_url": null,
            "status": "draft",
            "published_at": null,
            "sort_order": 0,
            "module": {
                "id": "a351a0dd-84ad-44c4-a735-591b961c7bae",
                "name": "Natus consequatur",
                "slug": "natus-consequatur-415978",
                "icon": null,
                "color": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "0cfac550-ab0f-3760-b9ba-584c7e52ecd0",
            "title": "Ipsum quaerat eos quod",
            "description": "Minima ut laudantium a id perspiciatis.",
            "cover_url": null,
            "status": "draft",
            "published_at": null,
            "sort_order": 0,
            "module": {
                "id": "a351a0dd-8da8-4dbf-b6d3-02b01498eb00",
                "name": "Enim est",
                "slug": "enim-est-778806",
                "icon": null,
                "color": null
            },
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/tutorials

Headers

Authorization        

Example: Bearer VP1Ehk63568faabg4DdvceZ

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

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

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

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

module_id   string[]  optional    

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

sector_id   string[]  optional    

Detalhe do tutorial

requires authentication No specific permission required

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

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/tutorials/1" \
    --header "Authorization: Bearer kaVegd6f438vZDE5a1hcbP6" \
    --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 kaVegd6f438vZDE5a1hcbP6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


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

Example response (200):


{
    "data": {
        "id": "46e38829-1f1b-33f4-8c7f-78b77ea0314d",
        "title": "Ut quia est ut",
        "description": "Ea qui vero accusantium minus ratione quis sapiente.",
        "cover_url": null,
        "status": "draft",
        "published_at": null,
        "sort_order": 0,
        "module": {
            "id": "a351a0dd-9378-4285-b0c8-b162d4d12e8b",
            "name": "Excepturi et",
            "slug": "excepturi-et-228584",
            "icon": null,
            "color": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/tutorials/{id}

Headers

Authorization        

Example: Bearer kaVegd6f438vZDE5a1hcbP6

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

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 ve4a38f1VghPdE56bDa6Zkc" \
    --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\": \"08e148cb-a780-36d1-8d39-33afcc6a44e1\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/contracts"
);

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

let body = {
    "sort_by": "Example Sort by",
    "sort_desc": true,
    "page": 1,
    "per_page": 1,
    "work_id": "08e148cb-a780-36d1-8d39-33afcc6a44e1"
};

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

Example response (200):


{
    "data": [
        {
            "id": "e5104536-b802-35c3-b954-b97e847baf9a",
            "number": "396/2026",
            "started_at": "2026-11-26",
            "deadline_at": "2027-11-26",
            "work": {
                "id": "a351a0d1-1db2-497c-ad5e-2753fb8f20d5",
                "name": "Lívia Constância Pontes Jr."
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "b3597c27-493a-352b-9590-10a1ca52e1eb",
            "number": "712/2026",
            "started_at": "2026-11-26",
            "deadline_at": "2027-11-26",
            "work": {
                "id": "a351a0d1-2ad8-42f4-a1bc-5133e7cd65e3",
                "name": "Mariah Ortiz Verdugo Jr."
            },
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/contracts

Headers

Authorization        

Example: Bearer ve4a38f1VghPdE56bDa6Zkc

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: 08e148cb-a780-36d1-8d39-33afcc6a44e1

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 1ch6Zeg8Va3dkDf5bv4aEP6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"work_id\": \"1005422f-9e8b-3b22-a668-1c2b2aa830e3\",
    \"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 1ch6Zeg8Va3dkDf5bv4aEP6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "work_id": "1005422f-9e8b-3b22-a668-1c2b2aa830e3",
    "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 1ch6Zeg8Va3dkDf5bv4aEP6

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: 1005422f-9e8b-3b22-a668-1c2b2aa830e3

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

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


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

Example response (200):


{
    "data": {
        "id": "7dbe559a-127f-34cb-9c3b-2d6c0818ffc9",
        "number": "237/2026",
        "started_at": "2026-11-26",
        "deadline_at": "2027-11-26",
        "work": {
            "id": "a351a0d1-3804-4ae5-9997-05c3bcf74066",
            "name": "Tainara Ramos"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/contracts/{id}

Headers

Authorization        

Example: Bearer g1f6dakhD8aE34bVc65PvZe

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the contract. Example: 8

contract   string     

Contract UUID Example: ipsam

Update contract

requires authentication contract update

Update a work contract

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the contract. Example: 17

contract   string     

Contract UUID Example: vitae

Body Parameters

number   string  optional    

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

started_at   string  optional    

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

deadline_at   string  optional    

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

Delete contract

requires authentication contract delete

Delete a work contract

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

contract   string     

Contract UUID Example: ducimus

Cost Centers

Endpoints for cost centers

Suggest next code

requires authentication cost-center index

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

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

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

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

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

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

Example response (200):


{
    "code": "001.002"
}
 

Request      

GET api/cost-centers/next-code

Headers

Authorization        

Example: Bearer 5h4dvZPVbagE8akcf13D66e

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

parent_id   string  optional    

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

Body Parameters

parent_id   string  optional    

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

Cost center requirement

requires authentication cost-center requirement-config index

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

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

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


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

Example response (200):


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

Request      

GET api/cost-centers/requirement-config

Headers

Authorization        

Example: Bearer 1feaDb46Z8h6Egk5dP3Vcav

Content-Type        

Example: application/json

Accept        

Example: application/json

Update cost center requirement

requires authentication cost-center requirement-config update

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

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

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

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

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

Example response (200):


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

Request      

PUT api/cost-centers/requirement-config

Headers

Authorization        

Example: Bearer 5h4akEdga1f6v3ebcD8ZV6P

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

required_from   string     

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

Stock cost center

requires authentication cost-center stock-config index

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

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

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


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

Example response (200):


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

Request      

GET api/cost-centers/stock-config

Headers

Authorization        

Example: Bearer 5aEZ38cgvdbfD4heP661Vka

Content-Type        

Example: application/json

Accept        

Example: application/json

Update stock cost center

requires authentication cost-center stock-config update

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

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

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

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

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

Example response (200):


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

Request      

PUT api/cost-centers/stock-config

Headers

Authorization        

Example: Bearer 41v5VPfEkha6e3cbdZ8g6aD

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

cost_center_id   string     

UUID do centro de custo, ou nulo Example: qui

List cost centers

requires authentication cost-center index

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

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

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "8673fee5-b39f-3251-88b3-e4dc3cda7c36",
            "code": "633",
            "name": "esse incidunt",
            "level": 1,
            "path": null,
            "is_active": true,
            "selectable": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "d95c2c25-b631-362c-b684-3e5ee52d8143",
            "code": "437",
            "name": "asperiores repellendus",
            "level": 1,
            "path": null,
            "is_active": true,
            "selectable": false,
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/cost-centers

Headers

Authorization        

Example: Bearer D1ac6hgfaEk4ePv6Vd358Zb

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

q   string  optional    

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

active   boolean  optional    

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

Show cost center

requires authentication cost-center show

Detalhe de um centro de custo

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

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


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

Example response (200):


{
    "data": {
        "id": "842f8c73-ff7e-3f22-ab1a-f31f4d98dc37",
        "code": "702",
        "name": "non illo",
        "level": 1,
        "path": null,
        "is_active": true,
        "selectable": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/cost-centers/{costCenter}

Headers

Authorization        

Example: Bearer ha6bvDak15Pd38V4ecZfgE6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

costCenter   string     

Cost center UUID Example: et

Create cost center

requires authentication cost-center store

Cadastra um centro de custo

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/cost-centers" \
    --header "Authorization: Bearer Dk665bahE41a8Vf3dPgvZce" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"Example Code\",
    \"name\": \"Example Name\",
    \"parent_id\": \"3f38abda-2066-378c-b780-5ae0332a927a\",
    \"work_id\": \"2938c409-7cda-31a9-9be8-c65f0a70ca18\",
    \"is_active\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cost-centers"
);

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

let body = {
    "code": "Example Code",
    "name": "Example Name",
    "parent_id": "3f38abda-2066-378c-b780-5ae0332a927a",
    "work_id": "2938c409-7cda-31a9-9be8-c65f0a70ca18",
    "is_active": true
};

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

Example response (201):


{
    "message": "string"
}
 

Request      

POST api/cost-centers

Headers

Authorization        

Example: Bearer Dk665bahE41a8Vf3dPgvZce

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

code   string     

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

name   string     

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

parent_id   string  optional    

Centro de custo pai. The uuid of an existing record in the cost_centers table. Example: 3f38abda-2066-378c-b780-5ae0332a927a

work_id   string  optional    

Obra. The uuid of an existing record in the works table. Example: 2938c409-7cda-31a9-9be8-c65f0a70ca18

is_active   boolean  optional    

Situação. Example: true

Update cost center

requires authentication cost-center update

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

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/cost-centers/modi" \
    --header "Authorization: Bearer 5E6D6agvh8b3Pfk14cZaVed" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"Example Code\",
    \"name\": \"Example Name\",
    \"parent_id\": \"f7deedff-10f7-372b-91a5-9bd7816d477d\",
    \"work_id\": \"4c73ad01-0460-31a7-b70d-d5f5b6d45dc6\",
    \"is_active\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cost-centers/modi"
);

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

let body = {
    "code": "Example Code",
    "name": "Example Name",
    "parent_id": "f7deedff-10f7-372b-91a5-9bd7816d477d",
    "work_id": "4c73ad01-0460-31a7-b70d-d5f5b6d45dc6",
    "is_active": true
};

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

Example response (200):


{
    "message": "string"
}
 

Request      

PUT api/cost-centers/{costCenter}

Headers

Authorization        

Example: Bearer 5E6D6agvh8b3Pfk14cZaVed

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

costCenter   string     

Cost center UUID Example: modi

Body Parameters

code   string  optional    

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

name   string  optional    

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

parent_id   string  optional    

Centro de custo pai. The uuid of an existing record in the cost_centers table. Example: f7deedff-10f7-372b-91a5-9bd7816d477d

work_id   string  optional    

Obra. The uuid of an existing record in the works table. Example: 4c73ad01-0460-31a7-b70d-d5f5b6d45dc6

is_active   boolean  optional    

Situação. Example: true

Delete cost center

requires authentication cost-center delete

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

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

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


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

Example response (204):

Empty response
 

Request      

DELETE api/cost-centers/{costCenter}

Headers

Authorization        

Example: Bearer 834akhebZgV56Ec1d6fDavP

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

costCenter   string     

Cost center UUID Example: nesciunt

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


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

Example response (200):


{
    "data": [
        {
            "id": "68ca35c0-cac7-34e0-81ac-cdcae6fcca1f",
            "name": "Srta. Catarina Rezende Vila Filho",
            "email": "camilo98@example.net",
            "phone": "(89) 91553-4936",
            "document": "241.202.566-50",
            "type": "pf",
            "responsible": "Andressa Alcantara Perez",
            "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": "3d944510-6dd8-3140-8b1f-2079b4eb5d57",
            "name": "Dr. Santiago Rodrigues Filho",
            "email": "rezende.vitor@example.net",
            "phone": "(18) 92871-4757",
            "document": "910.700.225-43",
            "type": "pj",
            "responsible": "Manuel Serrano 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 6DEeaZ6485hPdcfVakbg31v

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

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

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


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

Example response (200):


{
    "data": {
        "id": "8aa14ffa-3963-307d-8443-d9c70a878223",
        "name": "Everton Rangel Marés",
        "email": "rsanches@example.org",
        "phone": "(94) 93843-8437",
        "document": "427.537.457-65",
        "type": "pj",
        "responsible": "Sr. Márcio Benites",
        "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 dfEcPe1k5b8DahV4Zv366ag

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the customer. Example: 17

customer   string     

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

Update customer

requires authentication customers update

Update a customer

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the customer. Example: 2

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

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 Ee861Zgakh4cPbVf3D5dva6" \
    --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\": \"efc50cfd-9878-3c4f-ae63-fd553dee32e5\",
    \"contract_id\": \"9060c42d-513c-3365-a524-5056807880be\",
    \"status_id\": \"8a3f769c-9f54-304b-b46c-c774d6bf0fbe\",
    \"filled_by\": \"988cf618-120c-36ed-bafa-86f15441a90c\",
    \"responsible_id\": \"5ca50429-1b3f-3e89-81aa-c36b8741478c\",
    \"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 Ee861Zgakh4cPbVf3D5dva6",
    "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": "efc50cfd-9878-3c4f-ae63-fd553dee32e5",
    "contract_id": "9060c42d-513c-3365-a524-5056807880be",
    "status_id": "8a3f769c-9f54-304b-b46c-c774d6bf0fbe",
    "filled_by": "988cf618-120c-36ed-bafa-86f15441a90c",
    "responsible_id": "5ca50429-1b3f-3e89-81aa-c36b8741478c",
    "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": "ee428e2f-ca17-3260-9357-9f4f6852ac28",
            "code": "RDO-26-11-26",
            "report_number": 1,
            "date": "2026-11-26",
            "status": {
                "id": "a351a0d1-a5dc-44fe-ae28-5fb9beee0bf0",
                "slug": null,
                "name": null,
                "abbreviation": "dolores",
                "color": "#082c29",
                "text_color": "#7bf73a"
            },
            "work": {
                "id": "a351a0d1-9cda-4a7c-990c-5ecc9279132f",
                "name": "Dr. Otávio Casanova",
                "started_at": "2006-05-13 00:49:19"
            },
            "filled_by": {
                "id": "a351a0d1-a21c-4116-b730-b1b9793f261f",
                "name": "Sadye Jones"
            },
            "contract_number": "175/2026",
            "deadline_at": "2027-11-26",
            "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": "965cd5fe-b79b-3b84-8493-5ed6ce32df46",
            "code": "RDO-26-11-26",
            "report_number": 1,
            "date": "2026-11-26",
            "status": {
                "id": "a351a0d1-afc1-49ed-9b84-34b4cb4a6bb9",
                "slug": null,
                "name": null,
                "abbreviation": "voluptatum",
                "color": "#12de69",
                "text_color": "#80e028"
            },
            "work": {
                "id": "a351a0d1-aa31-4b54-af4f-9424f73759af",
                "name": "Isaac Reis Valente Jr.",
                "started_at": "1989-12-29 21:12:55"
            },
            "filled_by": {
                "id": "a351a0d1-ae33-41ff-90e9-9a94d168d1d2",
                "name": "Kaylah Barrows V"
            },
            "contract_number": "898/2026",
            "deadline_at": "2027-11-26",
            "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 Ee861Zgakh4cPbVf3D5dva6

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: efc50cfd-9878-3c4f-ae63-fd553dee32e5

contract_id   string  optional    

Contrato. The uuid of an existing record in the contracts table. Example: 9060c42d-513c-3365-a524-5056807880be

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 8a3f769c-9f54-304b-b46c-c774d6bf0fbe

filled_by   string  optional    

Preenchido por. The uuid of an existing record in the users table. Example: 988cf618-120c-36ed-bafa-86f15441a90c

responsible_id   string  optional    

Responsável. The uuid of an existing record in the users table. Example: 5ca50429-1b3f-3e89-81aa-c36b8741478c

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

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

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


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

Example response (200):


{
    "data": {
        "id": "83ca992c-0c6c-37d4-ba29-bd7c6037207c",
        "code": "RDO-26-11-26",
        "report_number": 1,
        "date": "2026-11-26",
        "status": {
            "id": "a351a0d1-c8d0-48c5-8c32-10993eaee796",
            "slug": null,
            "name": null,
            "abbreviation": "ipsa",
            "color": "#849ac6",
            "text_color": "#f99f26"
        },
        "work": {
            "id": "a351a0d1-c274-430c-b3c0-cb6686fbfeb0",
            "name": "Dr. Danielle Burgos Grego Jr.",
            "started_at": "1983-04-08 16:29:51"
        },
        "filled_by": {
            "id": "a351a0d1-c6dd-4e3c-abe7-ecac8cdcd16d",
            "name": "Mariano Lueilwitz Jr."
        },
        "contract_number": "915/2026",
        "deadline_at": "2027-11-26",
        "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 6ZbadPVka3D5v1cfh4e68gE

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: ut

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 6e8Ed6bZ3Pfaka1g4hc5vDV" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"contract_id\": \"Example Contract id\",
    \"date\": \"2024-01-01\",
    \"status_id\": \"cfb57250-e9a8-3123-b6e6-250b387263b3\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/daily-logs"
);

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

let body = {
    "contract_id": "Example Contract id",
    "date": "2024-01-01",
    "status_id": "cfb57250-e9a8-3123-b6e6-250b387263b3"
};

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

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: cfb57250-e9a8-3123-b6e6-250b387263b3

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/tempore" \
    --header "Authorization: Bearer eEaf6V85v6k1Ddh4ab3cZPg" \
    --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\": \"70c6635f-d098-4b47-9ed8-ee9522efe6df\",
            \"quantity\": 1
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/daily-logs/tempore"
);

const headers = {
    "Authorization": "Bearer eEaf6V85v6k1Ddh4ab3cZPg",
    "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": "70c6635f-d098-4b47-9ed8-ee9522efe6df",
            "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 eEaf6V85v6k1Ddh4ab3cZPg

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: tempore

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: 70c6635f-d098-4b47-9ed8-ee9522efe6df

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: qui

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: modi

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: ad

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/sint/photos" \
    --header "Authorization: Bearer 5gkecDvhfZ1a3Eba86d6PV4" \
    --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/sint/photos"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: sint

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/temporibus/photos/quisquam" \
    --header "Authorization: Bearer 6cedhkZ3E4PgvDVa6185baf" \
    --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/temporibus/photos/quisquam"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: temporibus

id   string     

The ID of the photo. Example: quisquam

photo   string     

Photo (File) UUID Example: rerum

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: molestias

photo   string     

Photo (File) UUID Example: voluptatem

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: est

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


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

Example response (200):


{
    "data": [
        {
            "id": "a70cd72e-cdbc-34e4-a577-9450fbab98e2",
            "name": "Maiores",
            "code": "GEA",
            "description": "Cupiditate voluptatem et nulla ratione sit sunt maiores.",
            "active": true
        },
        {
            "id": "387b10df-e829-3c9e-ba52-7f7087747fb1",
            "name": "Officia",
            "code": "ELF",
            "description": "Aut et nulla saepe non sit.",
            "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 kaafVh1DbEv8dZe43P6c56g

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


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

Example response (200):


{
    "data": {
        "id": "94b21288-6d2b-3ad7-9d5b-ac97ba2349a3",
        "name": "Et",
        "code": "EXK",
        "description": "Perferendis consequatur non velit iusto.",
        "active": true
    }
}
 

Request      

GET api/disciplines/{id}

Headers

Authorization        

Example: Bearer Vc6136kE5Pvdbg4Za8Defha

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

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

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

discipline   string     

Discipline UUID Example: cupiditate

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


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

Example response (200):


{
    "data": [
        {
            "id": "e40b876d-0713-39de-a5bf-50fdd71ff6a2",
            "name": "Dr. Luísa Eduarda Toledo Filho",
            "description": "Molestiae non veniam iste at quia est unde. Aut adipisci nemo aut aut consequuntur similique. Molestias qui atque ut.",
            "module": "document"
        },
        {
            "id": "a0ead5e2-5fa3-3be8-bf6a-fe3d0c71a1d0",
            "name": "Sr. Cristiano Rangel Branco",
            "description": "Quisquam eligendi id et ad et. Commodi saepe ullam illo voluptatum occaecati. Deleniti accusantium aspernatur esse saepe perspiciatis labore tenetur.",
            "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 Dcdef435ag6V1bZkaEvhP86

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

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


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

Example response (200):


{
    "data": {
        "id": "fba42d24-8a84-3e5a-8cf7-149b2dc96d9f",
        "name": "Rogério Campos Campos Sobrinho",
        "description": "Corporis eum laudantium consectetur tenetur est. Recusandae sint quasi harum ut est. Vel sit et dolores voluptatem molestias.",
        "module": "document"
    }
}
 

Request      

GET api/document-categories/{documentCategory}

Headers

Authorization        

Example: Bearer 1dvgh8Z6Pecfa5b3Da4VEk6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: sunt

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: ut

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: autem

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[]=sint&documentable_type=nemo&customers[]=vel&suppliers[]=a" \
    --header "Authorization: Bearer 4dh8ZcPvDak56e1bVf6aEg3" \
    --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]": "sint",
    "documentable_type": "nemo",
    "customers[0]": "vel",
    "suppliers[0]": "a",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "47e363bf-0aef-3e09-8f42-c872470f262e",
            "name": "Gilberto Rafael Santana",
            "file": {
                "id": null,
                "url": null,
                "extension": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "5b46834e-37b3-30f1-a1b7-cac2cb5fbeee",
            "name": "Sr. Mário Luiz Ávila",
            "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 4dh8ZcPvDak56e1bVf6aEg3

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

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


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

Example response (200):


{
    "data": {
        "id": "78e5d5ea-5457-3d7f-bc12-1af4ed17a490",
        "name": "Carla Meireles Domingues Neto",
        "file": {
            "id": null,
            "url": null,
            "extension": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/documents/{id}

Headers

Authorization        

Example: Bearer 6hgE4ebvVa3Ddakfc5P861Z

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 kgd658DV1ech3vZf64aEPba" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"category_id\": \"b101c68c-5044-3a02-87ac-3a581b2fb7ae\",
    \"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 kgd658DV1ech3vZf64aEPba",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "category_id": "b101c68c-5044-3a02-87ac-3a581b2fb7ae",
    "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 kgd658DV1ech3vZf64aEPba

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: b101c68c-5044-3a02-87ac-3a581b2fb7ae

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/12" \
    --header "Authorization: Bearer aVv4fEb36ceD5d86ZaPkhg1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"category_id\": \"b5d859b8-b70f-3585-ae01-2edae2b23052\",
    \"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/12"
);

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

let body = {
    "name": "Example Name",
    "category_id": "b5d859b8-b70f-3585-ae01-2edae2b23052",
    "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 aVv4fEb36ceD5d86ZaPkhg1

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the document. Example: 12

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: b5d859b8-b70f-3585-ae01-2edae2b23052

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

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

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

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

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 c386h4EZP65f1aDkVvdbaeg

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: qui

renewal_status   string  optional    

Example: pending

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

Example: expired

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

epi_type_id   string  optional    

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

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 58f3a4gbEc6PeZ6kavd1VDh" \
    --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 58f3a4gbEc6PeZ6kavd1VDh",
    "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 58f3a4gbEc6PeZ6kavd1VDh

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/sit/renew" \
    --header "Authorization: Bearer 4PV5Eaa8fck6bg1vD6ehZ3d" \
    --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/sit/renew"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

EPI delivery UUID Example: sit

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/aut/ignore" \
    --header "Authorization: Bearer g38E6dcbah5afZvPVDe46k1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ignore_reason\": \"Colaborador afastado temporariamente\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-renewals/aut/ignore"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

EPI delivery UUID Example: aut

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

EPI delivery UUID Example: qui

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

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

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

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

Example response (200):


{
    "data": [
        {
            "id": "38e20bda-809f-3543-9c9c-c36a5133bba4",
            "name": "officia officia",
            "default_validity_days": 350,
            "requires_signature": true,
            "numero_ca": "13484",
            "product": null,
            "available_quantity": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "014c2685-f507-3305-a10f-395f9d94dd1b",
            "name": "ut magnam",
            "default_validity_days": 412,
            "requires_signature": true,
            "numero_ca": "34938",
            "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 4DkfEVgv3Zaba56e6h1dcP8

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: voluptates

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

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

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

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 akv684VcP6ZbhD13f5aEdge

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: et

stock_id   string  optional    

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

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

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


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

Example response (200):


{
    "data": {
        "id": "96ba4e2b-169d-38cd-a3f6-1758ad0dfca2",
        "name": "cum eveniet",
        "default_validity_days": 617,
        "requires_signature": false,
        "numero_ca": "35247",
        "product": null,
        "available_quantity": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/epi-types/{epiType}

Headers

Authorization        

Example: Bearer hg3bEfVa66kaeD5c1Z8dPv4

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: laudantium

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 aag3dEePhf1bDV8kZ65c46v" \
    --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\": \"cedf37f4-831f-324c-8494-0b26eaf044f8\",
    \"product_family_id\": \"6e2fa23a-c493-3b9d-b1c7-6316ea067245\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-types"
);

const headers = {
    "Authorization": "Bearer aag3dEePhf1bDV8kZ65c46v",
    "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": "cedf37f4-831f-324c-8494-0b26eaf044f8",
    "product_family_id": "6e2fa23a-c493-3b9d-b1c7-6316ea067245"
};

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 aag3dEePhf1bDV8kZ65c46v

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: cedf37f4-831f-324c-8494-0b26eaf044f8

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: 6e2fa23a-c493-3b9d-b1c7-6316ea067245

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 D6afP4c6bh3Zd5EgaekV1v8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"epi_type_id\": \"78667339-680e-36e9-b8da-5b7f6c5845bd\",
            \"action\": \"Example Items * action\",
            \"product_id\": \"7e44ad1c-768c-3f2a-a6d5-cbcd39b6bfe1\",
            \"product_family_id\": \"4804d305-bfb1-3a49-9e6d-95ce2dbdfc23\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-types/link-products"
);

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

let body = {
    "items": [
        {
            "epi_type_id": "78667339-680e-36e9-b8da-5b7f6c5845bd",
            "action": "Example Items * action",
            "product_id": "7e44ad1c-768c-3f2a-a6d5-cbcd39b6bfe1",
            "product_family_id": "4804d305-bfb1-3a49-9e6d-95ce2dbdfc23"
        },
        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/voluptatibus/product" \
    --header "Authorization: Bearer b6e3VP81cfkD6gaaE4dZ5hv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"action\": \"Example Action\",
    \"product_id\": \"fbf002c9-0088-3ddf-8641-3ff78e7223e3\",
    \"product_family_id\": \"7f480bea-f4fc-3dbd-8a8f-676382942f80\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-types/voluptatibus/product"
);

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

let body = {
    "action": "Example Action",
    "product_id": "fbf002c9-0088-3ddf-8641-3ff78e7223e3",
    "product_family_id": "7f480bea-f4fc-3dbd-8a8f-676382942f80"
};

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

Request      

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

Headers

Authorization        

Example: Bearer b6e3VP81cfkD6gaaE4dZ5hv

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: voluptatibus

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: fbf002c9-0088-3ddf-8641-3ff78e7223e3

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: 7f480bea-f4fc-3dbd-8a8f-676382942f80

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: est

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: soluta

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


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

Example response (200):


{
    "data": [
        {
            "id": "17104e16-263b-462c-8f49-c5b69a52a5ea",
            "name": "excepturi",
            "description": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "598ab514-8b7e-4201-882f-07ad748b9443",
            "name": "quasi",
            "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 5Ef4agbDVd8Pe136a6kvchZ

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

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


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

Example response (200):


{
    "data": {
        "id": "21a0424c-e2a3-4e6d-a8d8-14f620ac64c1",
        "name": "ut",
        "description": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/employee-roles/{employeeRole}

Headers

Authorization        

Example: Bearer 5P4cvadE6ka6Df13Zehg8bV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employeeRole   string     

Employee Role UUID Example: ut

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 4hDgdc8Z6Eak6Pa5be1Vvf3" \
    --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 4hDgdc8Z6Eak6Pa5be1Vvf3",
    "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 4hDgdc8Z6Eak6Pa5be1Vvf3

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employeeRole   string     

Employee Role UUID Example: rem

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employeeRole   string     

Employee Role UUID Example: cupiditate

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

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

let body = {
    "sort_by": "delivery_date",
    "sort_desc": true,
    "page": 37,
    "per_page": 14,
    "q": "quae",
    "employee_id": "laborum",
    "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 g3416Vkhbav8eDdEc6Pa5Zf

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

sort_by   string  optional    

Example: delivery_date

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

Example: true

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

Example: quae

employee_id   string  optional    

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "0b37fce4-c56b-464e-9068-f9702f36d9bd",
            "name": "Dr. Everton Nero Pontes Sobrinho",
            "cpf": "571.240.813-68",
            "rg": null,
            "ctps": null,
            "phone": null,
            "birthdate": "1978-08-26",
            "email": "eespinoza@example.net",
            "pis_pasep": null,
            "admission_date": "2015-03-29",
            "daily_salary": null,
            "monthly_salary": null,
            "nationality": "Madagascar",
            "place_of_birth": "Téo 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": "a351a0d2-6923-4f29-9351-09c31545c0c2",
                "name": "est"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "4f2888ab-ec3d-4eac-ad56-480710b64562",
            "name": "Thiago Vasques Neto",
            "cpf": "254.675.549-75",
            "rg": null,
            "ctps": "559891527",
            "phone": null,
            "birthdate": "1970-09-17",
            "email": null,
            "pis_pasep": null,
            "admission_date": "1977-03-14",
            "daily_salary": "117.48",
            "monthly_salary": null,
            "nationality": "Uruguai",
            "place_of_birth": "Heitor do Norte",
            "status": "active",
            "status_label": "Ativo",
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "employee_role": {
                "id": "a351a0d2-6e8c-4b67-9306-35362abc716a",
                "name": "dolores"
            },
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": "/?page=36",
        "next": null
    },
    "meta": {
        "current_page": 37,
        "from": 361,
        "last_page": 1,
        "links": [
            {
                "url": "/?page=36",
                "label": "&laquo; Anterior",
                "page": 36,
                "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": 362,
        "total": 2
    }
}
 

Request      

GET api/employees

Headers

Authorization        

Example: Bearer 3kcVh16f64veZgdPa8EDab5

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

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

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


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

Example response (200):


{
    "data": {
        "id": "9bcce1e7-9c50-4ef2-941c-1cf9347e96a4",
        "name": "Denis Cruz Gonçalves",
        "cpf": "340.064.714-22",
        "rg": null,
        "ctps": "269198966",
        "phone": null,
        "birthdate": null,
        "email": "santacruz.willian@example.org",
        "pis_pasep": null,
        "admission_date": "1971-01-30",
        "daily_salary": null,
        "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": "a351a0d2-7ac8-411e-8b8c-8e4daa6c4703",
            "name": "est"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/employees/{id}

Headers

Authorization        

Example: Bearer bvZ5DcV6Pf4gka1e6h3ad8E

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the employee. Example: 16

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 agh34b6Ed1V6ckv8eDZPa5f" \
    --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\": \"a131b812-06ef-4dd8-803a-d430e555cc02\",
    \"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 agh34b6Ed1V6ckv8eDZPa5f",
    "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": "a131b812-06ef-4dd8-803a-d430e555cc02",
    "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": "11d40bfa-c0e6-446f-9739-a06667a70a81",
        "name": "Sr. Emiliano Mascarenhas Serna Neto",
        "cpf": "222.133.735-35",
        "rg": "174283096",
        "ctps": "897449853",
        "phone": null,
        "birthdate": null,
        "email": "zpadilha@example.com",
        "pis_pasep": "93507001609",
        "admission_date": "2023-10-03",
        "daily_salary": "277.22",
        "monthly_salary": null,
        "nationality": "Tanzânia",
        "place_of_birth": "Wellington d'Oeste",
        "status": "active",
        "status_label": "Ativo",
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        },
        "employee_role": {
            "id": "a351a0d2-845b-4ad8-814d-175512ac550c",
            "name": "iure"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/employees

Headers

Authorization        

Example: Bearer agh34b6Ed1V6ckv8eDZPa5f

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: a131b812-06ef-4dd8-803a-d430e555cc02

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/13" \
    --header "Authorization: Bearer ev46aZkhbdag8PV6Ef1c53D" \
    --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\": \"c24fdc3d-b7c2-47d5-bf43-bffc0021d4b8\",
    \"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/13"
);

const headers = {
    "Authorization": "Bearer ev46aZkhbdag8PV6Ef1c53D",
    "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": "c24fdc3d-b7c2-47d5-bf43-bffc0021d4b8",
    "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 ev46aZkhbdag8PV6Ef1c53D

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the employee. Example: 13

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: c24fdc3d-b7c2-47d5-bf43-bffc0021d4b8

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 aEhvd4cbD68kV3g5Pf1ea6Z" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"dismissal_date\": \"2026-11-26\",
    \"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 aEhvd4cbD68kV3g5Pf1ea6Z",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

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

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

Example response (200):


{
    "data": {
        "id": "4477c8b9-ef84-454c-b9dc-821be3f2e9b0",
        "name": "Dr. Renan Richard Neves",
        "cpf": "682.326.572-04",
        "rg": "636695417",
        "ctps": null,
        "phone": "(75) 3893-4322",
        "birthdate": "1983-09-25",
        "email": null,
        "pis_pasep": null,
        "admission_date": "1997-06-25",
        "daily_salary": null,
        "monthly_salary": "6115.24",
        "nationality": "República Centroafricana",
        "place_of_birth": "Rangel d'Oeste",
        "status": "active",
        "status_label": "Ativo",
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        },
        "employee_role": {
            "id": "a351a0d2-9381-47a2-a62f-1b3034168c0f",
            "name": "aliquam"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/employees/{employee}/dismiss

Headers

Authorization        

Example: Bearer aEhvd4cbD68kV3g5Pf1ea6Z

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

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

Body Parameters

dismissal_date   string     

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

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

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

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

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

Example response (200):


{
    "data": {
        "id": "669e5005-54ea-4d6d-8786-944d37606668",
        "name": "Bárbara Vasques",
        "cpf": "356.777.250-61",
        "rg": "942517099",
        "ctps": "493316319",
        "phone": "(42) 94317-0625",
        "birthdate": null,
        "email": null,
        "pis_pasep": null,
        "admission_date": "1975-10-18",
        "daily_salary": "116.73",
        "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": "a351a0d2-99de-4193-b9c8-0b3289c93b2a",
            "name": "magnam"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/employees/{employee}/rehire

Headers

Authorization        

Example: Bearer 6bekgPvZfh4dV8a3caE5D61

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

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

Body Parameters

admission_date   string     

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 19

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/5/bank-account" \
    --header "Authorization: Bearer g8f5ZvEbVe4PhaDc361ad6k" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bank_id\": \"nemo\",
    \"agency\": \"kqhthoqmxfyenixggfkjmi\",
    \"account\": \"rvszwfqfituhnhersuiiqrs\",
    \"account_type\": \"corrente\",
    \"pix_key\": \"fvazxoqlbdciqmdthm\",
    \"favorite\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/5/bank-account"
);

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

let body = {
    "bank_id": "nemo",
    "agency": "kqhthoqmxfyenixggfkjmi",
    "account": "rvszwfqfituhnhersuiiqrs",
    "account_type": "corrente",
    "pix_key": "fvazxoqlbdciqmdthm",
    "favorite": true
};

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 g8f5ZvEbVe4PhaDc361ad6k

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 5

employee   string     

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

Body Parameters

bank_id   string     

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

agency   string     

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

account   string     

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

account_type   string     

Example: corrente

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

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

favorite   boolean  optional    

Example: true

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/2/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33" \
    --header "Authorization: Bearer vbge6ZP8Ecd6akh4a5fDV31" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bank_id\": \"qui\",
    \"agency\": \"ofodtqu\",
    \"account\": \"lieiiuezkkkpixunfjvhh\",
    \"account_type\": \"corrente\",
    \"pix_key\": \"bizlbqbpdg\",
    \"favorite\": false
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/2/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33"
);

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

let body = {
    "bank_id": "qui",
    "agency": "ofodtqu",
    "account": "lieiiuezkkkpixunfjvhh",
    "account_type": "corrente",
    "pix_key": "bizlbqbpdg",
    "favorite": false
};

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 vbge6ZP8Ecd6akh4a5fDV31

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 2

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

agency   string  optional    

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

account   string  optional    

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

account_type   string  optional    

Example: corrente

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

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

favorite   boolean  optional    

Example: false

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

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

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

let body = {
    "q": "id",
    "status": "expiring",
    "epi_type_id": "sunt"
};

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/employees/{employee_id}/epi-deliveries

Headers

Authorization        

Example: Bearer c6f1vbdDE64haZgP5Ve3a8k

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 16

employee   string     

Employee UUID Example: ut

Body Parameters

q   string  optional    

Example: id

status   string  optional    

Example: expiring

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: rerum

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 7

id   string     

EPI delivery UUID Example: et

employee   string     

Employee UUID Example: eum

Create employee EPI delivery

requires authentication employee-epi store

Register an EPI delivery for an employee

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/employees/15/epi-deliveries" \
    --header "Authorization: Bearer gVEf1aPd3aD458ve6hbkcZ6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"epi_type_id\": \"db1abe0c-184b-30a1-9d47-4b0388d4ae47\",
    \"delivery_date\": \"2024-01-01\",
    \"quantity\": 1,
    \"condition\": \"Example Condition\",
    \"delivered_by_employee_id\": \"ede5ec0d-c302-4529-a1b7-72d23ddfece3\",
    \"stock_id\": \"cdee2984-895a-3f2d-9897-c5b5368eeb88\",
    \"confirm_insufficient_stock\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/15/epi-deliveries"
);

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

let body = {
    "epi_type_id": "db1abe0c-184b-30a1-9d47-4b0388d4ae47",
    "delivery_date": "2024-01-01",
    "quantity": 1,
    "condition": "Example Condition",
    "delivered_by_employee_id": "ede5ec0d-c302-4529-a1b7-72d23ddfece3",
    "stock_id": "cdee2984-895a-3f2d-9897-c5b5368eeb88",
    "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 gVEf1aPd3aD458ve6hbkcZ6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 15

employee   string     

Employee UUID Example: ex

Body Parameters

epi_type_id   string     

Tipo de EPI. The uuid of an existing record in the epi_types table. Example: db1abe0c-184b-30a1-9d47-4b0388d4ae47

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: ede5ec0d-c302-4529-a1b7-72d23ddfece3

stock_id   string  optional    

Estoque. The uuid of an existing record in the stocks table. Example: cdee2984-895a-3f2d-9897-c5b5368eeb88

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/qui/epi-deliveries/kit" \
    --header "Authorization: Bearer D4k85eZ1v3EfcbPdhV66aag" \
    --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\": \"6255722f-a343-42e9-8d97-1f4ec9d8c99d\",
    \"stock_id\": \"b9f07038-e239-3555-82ad-1ed6dce5f653\",
    \"confirm_insufficient_stock\": true,
    \"items\": [
        {
            \"epi_type_id\": \"c7b95825-1be9-3d50-bed5-0694bfb03ae5\",
            \"quantity\": 1,
            \"condition\": \"Example Items * condition\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/qui/epi-deliveries/kit"
);

const headers = {
    "Authorization": "Bearer D4k85eZ1v3EfcbPdhV66aag",
    "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": "6255722f-a343-42e9-8d97-1f4ec9d8c99d",
    "stock_id": "b9f07038-e239-3555-82ad-1ed6dce5f653",
    "confirm_insufficient_stock": true,
    "items": [
        {
            "epi_type_id": "c7b95825-1be9-3d50-bed5-0694bfb03ae5",
            "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 D4k85eZ1v3EfcbPdhV66aag

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: qui

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: 6255722f-a343-42e9-8d97-1f4ec9d8c99d

stock_id   string  optional    

Estoque. The uuid of an existing record in the stocks table. Example: b9f07038-e239-3555-82ad-1ed6dce5f653

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: c7b95825-1be9-3d50-bed5-0694bfb03ae5

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: sint

id   string     

EPI delivery UUID Example: commodi

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/3/epi-deliveries/aut" \
    --header "Authorization: Bearer bka136avZ45eDVhEPc8fdg6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"epi_type_id\": \"c20df7ac-9223-372f-8f90-8402988545b8\",
    \"delivery_date\": \"2024-01-01\",
    \"quantity\": 1,
    \"condition\": \"Example Condition\",
    \"delivered_by_employee_id\": \"ca810a8c-50a2-4587-b452-752379cbe668\",
    \"stock_id\": \"40e67527-c848-3f58-a4e1-4754224f5f18\",
    \"confirm_insufficient_stock\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/3/epi-deliveries/aut"
);

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

let body = {
    "epi_type_id": "c20df7ac-9223-372f-8f90-8402988545b8",
    "delivery_date": "2024-01-01",
    "quantity": 1,
    "condition": "Example Condition",
    "delivered_by_employee_id": "ca810a8c-50a2-4587-b452-752379cbe668",
    "stock_id": "40e67527-c848-3f58-a4e1-4754224f5f18",
    "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 bka136avZ45eDVhEPc8fdg6

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

employee   string     

Employee UUID Example: sequi

Body Parameters

epi_type_id   string  optional    

Tipo de EPI. The uuid of an existing record in the epi_types table. Example: c20df7ac-9223-372f-8f90-8402988545b8

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: ca810a8c-50a2-4587-b452-752379cbe668

stock_id   string  optional    

Estoque. The uuid of an existing record in the stocks table. Example: 40e67527-c848-3f58-a4e1-4754224f5f18

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: qui

id   string     

EPI delivery UUID Example: facilis

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/20/epi-terms" \
    --header "Authorization: Bearer 8agfVhP14ekc3a6b65dEZDv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sort_by\": \"created_at\",
    \"sort_desc\": false,
    \"page\": 60,
    \"per_page\": 15,
    \"q\": \"eos\",
    \"employee_id\": \"velit\",
    \"has_term\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/20/epi-terms"
);

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

let body = {
    "sort_by": "created_at",
    "sort_desc": false,
    "page": 60,
    "per_page": 15,
    "q": "eos",
    "employee_id": "velit",
    "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 8agfVhP14ekc3a6b65dEZDv

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 20

employee   string     

Employee UUID Example: repudiandae

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

per_page   integer  optional    

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

q   string  optional    

Example: eos

employee_id   string  optional    

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

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/aspernatur/epi-terms/95628710-ad5d-3887-aa59-10a4c7ded213/upload" \
    --header "Authorization: Bearer 1aEbv8eP3ZgchfkdVD4566a" \
    --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/aspernatur/epi-terms/95628710-ad5d-3887-aa59-10a4c7ded213/upload"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: aspernatur

kitUuid   string     

Kit UUID Example: 95628710-ad5d-3887-aa59-10a4c7ded213

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/voluptatem/epi-terms/f2e9ca31-aa58-340b-8560-8a84b9e9d00b/document" \
    --header "Authorization: Bearer h54vaV31agEk6cd86fbPDeZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/voluptatem/epi-terms/f2e9ca31-aa58-340b-8560-8a84b9e9d00b/document"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: voluptatem

kitUuid   string     

Kit UUID Example: f2e9ca31-aa58-340b-8560-8a84b9e9d00b

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/c56695d3-117c-33bd-a64b-b08f98927bdc" \
    --header "Authorization: Bearer D5eabkPZ6h4vVd6Ef381gac" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/c56695d3-117c-33bd-a64b-b08f98927bdc"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: c56695d3-117c-33bd-a64b-b08f98927bdc

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/793f1c07-7de7-3843-8ef7-16c60ce0641f/info" \
    --header "Authorization: Bearer 46ehkE83ad5ZDfVgv16Pbca" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/793f1c07-7de7-3843-8ef7-16c60ce0641f/info"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 793f1c07-7de7-3843-8ef7-16c60ce0641f

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/78dc4913-8101-3f5d-ae7c-24b6d94cd5a6/download" \
    --header "Authorization: Bearer vDgk1cdE463ea8hVfPabZ56" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/78dc4913-8101-3f5d-ae7c-24b6d94cd5a6/download"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

The UUID of the file to download Example: 78dc4913-8101-3f5d-ae7c-24b6d94cd5a6

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

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

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 E4af8Zdbae1D36VP5vhg6ck" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"expedita\",
    \"document_type\": \"nfe\",
    \"supplier_id\": \"delectus\",
    \"work_id\": \"a\",
    \"products_status\": \"pending\",
    \"financial_status\": \"pending\",
    \"start_date\": \"2026-11-26T13:17:39\",
    \"end_date\": \"2094-06-19\",
    \"per_page\": 2,
    \"cost_centers\": [
        \"eum\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);

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

let body = {
    "q": "expedita",
    "document_type": "nfe",
    "supplier_id": "delectus",
    "work_id": "a",
    "products_status": "pending",
    "financial_status": "pending",
    "start_date": "2026-11-26T13:17:39",
    "end_date": "2094-06-19",
    "per_page": 2,
    "cost_centers": [
        "eum"
    ]
};

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

Example response (200):


{
    "data": [
        {
            "id": "25842c57-e0cc-3521-8411-ddf498da550d",
            "document_type": "nfe",
            "document_type_label": "NF-e",
            "service_description": null,
            "nfe_access_key": "50287234836114672584722252894003267903845535",
            "nfe_number": "950604",
            "nfe_series": "41",
            "issue_date": "2011-08-12T03:00:00.000000Z",
            "total_value": "6240.78",
            "emit": {
                "cnpj": "82347503474606",
                "name": "Kertzmann, Brekke and Dickens"
            },
            "dest": {
                "document": "49477278050513",
                "name": "Rippin, Wilderman and Krajcik"
            },
            "supplier": {
                "id": "a351a0d3-fa87-4217-9f97-2a72c6424c40",
                "name": "Dr. Sérgio Queirós",
                "document": "09.492.635/0001-28"
            },
            "financial_status": "pending",
            "products_imported_at": null,
            "created_at": null
        },
        {
            "id": "21e28d7c-af75-3ba0-afaa-3632cf5383c5",
            "document_type": "nfe",
            "document_type_label": "NF-e",
            "service_description": null,
            "nfe_access_key": "61251792453563713398007796238360374790014217",
            "nfe_number": "559546",
            "nfe_series": "39",
            "issue_date": "2005-03-12T03:00:00.000000Z",
            "total_value": "9094.78",
            "emit": {
                "cnpj": "89070338256456",
                "name": "Torphy LLC"
            },
            "dest": {
                "document": "97041603169024",
                "name": "Botsford-Gibson"
            },
            "supplier": {
                "id": "a351a0d3-fede-4dc6-8ff7-b156fd1c20c2",
                "name": "Angélica Beltrão Santana",
                "document": "01.048.962/0001-83"
            },
            "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 E4af8Zdbae1D36VP5vhg6ck

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: expedita

document_type   string  optional    

Example: nfe

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

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

work_id   string  optional    

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

products_status   string  optional    

Example: pending

Must be one of:
  • imported
  • pending
financial_status   string  optional    

Example: pending

Must be one of:
  • pending
  • partial
  • generated
start_date   string  optional    

O campo value deve ser uma data válida. Example: 2026-11-26T13:17:39

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: 2094-06-19

per_page   integer  optional    

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

cost_centers   string[]  optional    

The uuid of an existing record in the cost_centers table.

Create fiscal document

requires authentication fiscal-documents store

Registra uma NFe a partir do XML já enviado ao S3 e o vincula às obras informadas.

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents" \
    --header "Authorization: Bearer bE6gaDPV8k4hZ6e15fd3acv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"s3_file_path\": \"dicta\",
    \"original_filename\": \".xml$\\/i\",
    \"work_ids\": [
        \"nobis\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);

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

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

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

Example response (201):


{
    "data": {
        "id": "0e0ffd8d-c411-3996-96b3-b93d03155d02",
        "document_type": "nfe",
        "document_type_label": "NF-e",
        "service_description": null,
        "nfe_access_key": "10508266679817240681797291017800633866266438",
        "nfe_number": "064933",
        "nfe_series": "66",
        "issue_date": "2011-07-05T03:00:00.000000Z",
        "total_value": "8763.29",
        "emit": {
            "cnpj": "41017285706868",
            "name": "Carter-Ritchie"
        },
        "dest": {
            "document": "46901139238237",
            "name": "Marks and Sons"
        },
        "supplier": {
            "id": "a351a0d4-089a-4b75-95ba-a522dd73c358",
            "name": "Dr. Christian Mendes Colaço",
            "document": "98.773.402/0001-23"
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

POST api/fiscal-documents

Headers

Authorization        

Example: Bearer bE6gaDPV8k4hZ6e15fd3acv

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

s3_file_path   string     

Example: dicta

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

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


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

Example response (200):


{
    "data": {
        "id": "8e14653d-540f-33c5-a0fe-bcf0f4fbaa64",
        "document_type": "nfe",
        "document_type_label": "NF-e",
        "service_description": null,
        "nfe_access_key": "18049473276901330810161122758647163544011003",
        "nfe_number": "041973",
        "nfe_series": "68",
        "issue_date": "1988-03-12T03:00:00.000000Z",
        "total_value": "4728.19",
        "emit": {
            "cnpj": "64474777492452",
            "name": "Kuhic Ltd"
        },
        "dest": {
            "document": "70583757977993",
            "name": "Lang, Hermann and Harris"
        },
        "supplier": {
            "id": "a351a0d4-111d-4a14-981a-40eed3f39d28",
            "name": "César Reis Furtado",
            "document": "17.269.330/0001-80"
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

GET api/fiscal-documents/{fiscalDocument}

Headers

Authorization        

Example: Bearer DP1Zk6e34cVbgaf5Evd8h6a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: voluptatibus

Fiscal document by cost center

requires authentication fiscal-documents show

Distribui a nota por centro de custo. NF-e de produto sai do estoque: o que a vinculação dos itens lançou em cada estoque de obra (quantidade × preço do lote, o mesmo cálculo do custo apropriado do painel), o que foi para o estoque principal e o que ainda não foi integrado. NFS-e sai das parcelas, pelo centro da conta gerada. As linhas somam o total da nota; a diferença vai para other_values, que pode ser negativo quando há desconto. Linhas zeradas são omitidas.

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

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


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

Example response (200):


{
    "data": {
        "total": "5074.19",
        "source": "stock",
        "rows": [
            {
                "kind": "cost_center",
                "cost_center": {
                    "id": "uuid",
                    "code": "002.001",
                    "name": "Residencial Vila Nova"
                },
                "amount": "2100.00",
                "share": 41.39
            },
            {
                "kind": "work_without_cost_center",
                "work": {
                    "id": "uuid",
                    "name": "Reforma Centro"
                },
                "amount": "474.19",
                "share": 9.35
            },
            {
                "kind": "main_stock",
                "cost_center": {
                    "id": "uuid",
                    "code": "003.001",
                    "name": "Estoque central"
                },
                "amount": "1500.00",
                "share": 29.56
            },
            {
                "kind": "not_integrated",
                "amount": "900.00",
                "share": 17.74
            },
            {
                "kind": "other_values",
                "amount": "100.00",
                "share": 1.97
            }
        ]
    }
}
 

Request      

GET api/fiscal-documents/{fiscalDocument}/cost-centers

Headers

Authorization        

Example: Bearer EVhkDa43adZev6bf6P51c8g

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: aut

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: velit

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

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

let body = {
    "file": {
        "path": "molestiae",
        "name": "distinctio",
        "extension": "et"
    }
};

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

Example response (200):


{
    "data": {
        "id": "c34d4314-2564-39d4-b5d3-120d31fd6331",
        "document_type": "nfe",
        "document_type_label": "NF-e",
        "service_description": null,
        "nfe_access_key": "42756555610218196670791530409438998884850696",
        "nfe_number": "614780",
        "nfe_series": "86",
        "issue_date": "2007-10-20T02:00:00.000000Z",
        "total_value": "6512.26",
        "emit": {
            "cnpj": "74657097297712",
            "name": "McClure, Stark and Huel"
        },
        "dest": {
            "document": "14112940142829",
            "name": "Kris-Braun"
        },
        "supplier": {
            "id": "a351a0d4-1fae-4173-a2eb-71aafc4eebb6",
            "name": "Aaron Saito Neto",
            "document": "15.439.039/0001-87"
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer Vf6Zd1hEgec4b65Da3Pvka8

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: aliquam

Body Parameters

file   object     
path   string     

Example: molestiae

name   string     

Example: distinctio

extension   string     

Example: et

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

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


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

Example response (200):


{
    "data": {
        "id": "134bfdcc-2643-30ad-8597-94d60ab83bbd",
        "document_type": "nfe",
        "document_type_label": "NF-e",
        "service_description": null,
        "nfe_access_key": "03733451341602241965644809474676888258147644",
        "nfe_number": "102650",
        "nfe_series": "28",
        "issue_date": "2000-05-08T03:00:00.000000Z",
        "total_value": "6538.84",
        "emit": {
            "cnpj": "54317438468040",
            "name": "Nienow, Cremin and Farrell"
        },
        "dest": {
            "document": "10598873390267",
            "name": "O'Connell and Sons"
        },
        "supplier": {
            "id": "a351a0d4-2836-47d0-96e2-81592d8ff16a",
            "name": "Eunice D'ávila Vasques",
            "document": "36.982.109/0001-19"
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer cZ5fe1h83P6bgadEkv46DaV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: aspernatur

file   string     

UUID do arquivo anexado Example: tempore

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/dolor/works" \
    --header "Authorization: Bearer c6d83vaEPVa4bDfZ65gkh1e" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"work_ids\": [
        \"numquam\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents/dolor/works"
);

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

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

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

Example response (200):


{
    "data": {
        "id": "7ebbd5d1-c4f6-31a2-9daf-995ee69886e0",
        "document_type": "nfe",
        "document_type_label": "NF-e",
        "service_description": null,
        "nfe_access_key": "85169786105174255116930944848303441095883325",
        "nfe_number": "133818",
        "nfe_series": "39",
        "issue_date": "1970-12-03T03:00:00.000000Z",
        "total_value": "7959.48",
        "emit": {
            "cnpj": "37361978027581",
            "name": "Schamberger-Jacobson"
        },
        "dest": {
            "document": "57393461058293",
            "name": "Brekke, Beer and Hand"
        },
        "supplier": {
            "id": "a351a0d4-3072-4fe1-b256-49feabd92293",
            "name": "Edilson Balestero Neto",
            "document": "16.403.676/0001-66"
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer c6d83vaEPVa4bDfZ65gkh1e

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: dolor

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/exercitationem/installments" \
    --header "Authorization: Bearer dvg1Vbh6fP4acea35Dk8EZ6" \
    --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/exercitationem/installments"
);

const headers = {
    "Authorization": "Bearer dvg1Vbh6fP4acea35Dk8EZ6",
    "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": "f1f3e915-3b4c-3893-9af6-bbb7c8c71c02",
        "document_type": "nfe",
        "document_type_label": "NF-e",
        "service_description": null,
        "nfe_access_key": "08134940718329834591883920684110746467315979",
        "nfe_number": "361283",
        "nfe_series": "78",
        "issue_date": "2021-10-18T03:00:00.000000Z",
        "total_value": "6019.54",
        "emit": {
            "cnpj": "00534172110177",
            "name": "Cassin Ltd"
        },
        "dest": {
            "document": "72281042426476",
            "name": "Gibson Inc"
        },
        "supplier": {
            "id": "a351a0d4-3927-487c-a958-46d9249978eb",
            "name": "Márcio Igor Fonseca Sobrinho",
            "document": "05.404.588/0001-62"
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer dvg1Vbh6fP4acea35Dk8EZ6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: exercitationem

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 kcDha1Ve65d4gEfbP38va6Z" \
    --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\": \"b4150a73-a175-3605-a187-2fe98eb68a95\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/imports/nfe/products"
);

const headers = {
    "Authorization": "Bearer kcDha1Ve65d4gEfbP38va6Z",
    "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": "b4150a73-a175-3605-a187-2fe98eb68a95"
};

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 kcDha1Ve65d4gEfbP38va6Z

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: b4150a73-a175-3605-a187-2fe98eb68a95

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

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

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


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

Example response (200, Import details retrieved successfully):


{
    "import_id": "9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a",
    "status": "completed",
    "import_type": "nfe",
    "original_filename": "nota_fiscal_001.xml",
    "nfe_number": "123456",
    "nfe_date": "2023-12-01",
    "total_products": 15,
    "processed_products": 10,
    "progress_percentage": 66.67,
    "auto_linked_count": 4,
    "stock_launched_count": 7,
    "pending_stock_launch_count": 3,
    "imported_by": "João Silva",
    "imported_at": "2023-12-01T10:30:00.000Z",
    "supplier": {
        "id": "supplier-uuid",
        "name": "Fornecedor Ltda",
        "document": "12345678000199"
    },
    "fiscal_document": {
        "id": "fiscal-document-uuid",
        "nfe_number": "123456",
        "works": [
            {
                "id": "work-uuid",
                "name": "Hospital Bom Jesus",
                "cost_center": {
                    "id": "cost-center-uuid",
                    "code": "002.001",
                    "name": "Hospital Bom Jesus"
                }
            },
            {
                "id": "work-uuid-2",
                "name": "Reforma Centro",
                "cost_center": null
            }
        ]
    },
    "channel": "import-progress.9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a"
}
 

Request      

GET api/imports/{importId}

Headers

Authorization        

Example: Bearer gf6hae53PE8dD64acvb1kZV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: porro

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: ea

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: repellat

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: et

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

const headers = {
    "Authorization": "Bearer V51h6P63g8bfa4vkEadZcDe",
    "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 3P6cD16fa8adZbg4ehEvVk5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sort_by\": \"numquam\",
    \"sort_desc\": true,
    \"page\": 47,
    \"per_page\": 14
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/locations/states"
);

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

let body = {
    "sort_by": "numquam",
    "sort_desc": true,
    "page": 47,
    "per_page": 14
};

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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "maxime ratione",
            "abbreviation": "YB"
        },
        {
            "id": null,
            "name": "ut magni",
            "abbreviation": "ZT"
        }
    ],
    "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 3P6cD16fa8adZbg4ehEvVk5

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

sort_by   string  optional    

Example: numquam

sort_desc   boolean  optional    

Example: true

page   integer  optional    

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

per_page   integer  optional    

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

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "Kiehnport"
        },
        {
            "id": null,
            "name": "Harmonyview"
        }
    ]
}
 

Request      

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

Headers

Authorization        

Example: Bearer 6Eh3P1aD6c8Vfbgav54eZkd

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

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

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 15k6he86ZdaPvgfVaDb3c4E" \
    --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 15k6he86ZdaPvgfVaDb3c4E",
    "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 15k6he86ZdaPvgfVaDb3c4E

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

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

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=quidem&document=sit&work_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&cost_center_id=62e1e899-b8c5-3eb5-bcaf-5c34cbf585aa&bank_account_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3" \
    --header "Authorization: Bearer c65eZPfk3V8vbghd61a4DEa" \
    --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": "quidem",
    "document": "sit",
    "work_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
    "cost_center_id": "62e1e899-b8c5-3eb5-bcaf-5c34cbf585aa",
    "bank_account_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "fa1ae65e-9f5a-3d95-b2a2-1bcb0c92a077",
            "receipt_number": "REC-1587",
            "receiver_type": "custom",
            "receiver": {
                "id": null,
                "type": null,
                "label": null,
                "name": "Mckenzie Rempel V",
                "document": "029.797.656-64"
            },
            "payment": {
                "amount": 7086.13,
                "amount_in_words": "Valor por extenso de teste",
                "method": "cash",
                "description": "Voluptatem praesentium fugiat vitae assumenda adipisci."
            },
            "issuer": {
                "name": "Haley-Klein",
                "document": "96.414.321/6116-59"
            },
            "issue": {
                "date": "2026-11-11",
                "city": "Wernerburgh",
                "state": "RS"
            },
            "created_by": {
                "id": "a351a0d4-6ad0-4736-9999-64a133e92c82",
                "name": "Gardner Senger"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "79aafdcf-dae9-33cf-9a91-df55767cd295",
            "receipt_number": "REC-4069",
            "receiver_type": "custom",
            "receiver": {
                "id": null,
                "type": null,
                "label": null,
                "name": "Cristian Hettinger",
                "document": "554.518.195-79"
            },
            "payment": {
                "amount": 4684.91,
                "amount_in_words": "Valor por extenso de teste",
                "method": "pix",
                "description": "Eos ipsam nam dolore enim delectus nemo."
            },
            "issuer": {
                "name": "Rippin, Kerluke and Hills",
                "document": "09.604.363/1551-62"
            },
            "issue": {
                "date": "2026-11-19",
                "city": "West Alfordmouth",
                "state": "GO"
            },
            "created_by": {
                "id": "a351a0d4-6e08-4be4-adbc-09aa5fa46709",
                "name": "Harry Armstrong"
            },
            "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 c65eZPfk3V8vbghd61a4DEa

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
  • supplier
  • 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: quidem

document   string  optional    

Example: sit

work_id   string  optional    

Filter by work UUID. O campo value deve ser um UUID válido. The uuid of an existing record in the works table. Example: a01edd80-bf3e-40f7-8613-ccb4be5831b3

cost_center_id   string  optional    

O campo value deve ser um UUID válido. The uuid of an existing record in the cost_centers table. Example: 62e1e899-b8c5-3eb5-bcaf-5c34cbf585aa

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=accusamus&document=quia&work_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&cost_center_id=df087826-649e-37fd-804e-7531566b93f1&bank_account_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3" \
    --header "Authorization: Bearer 6Pdb1kDZa58he6VEc4fv3ag" \
    --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": "accusamus",
    "document": "quia",
    "work_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
    "cost_center_id": "df087826-649e-37fd-804e-7531566b93f1",
    "bank_account_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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
  • supplier
  • 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: accusamus

document   string  optional    

Example: quia

work_id   string  optional    

Filter by work UUID. O campo value deve ser um UUID válido. The uuid of an existing record in the works table. Example: a01edd80-bf3e-40f7-8613-ccb4be5831b3

cost_center_id   string  optional    

O campo value deve ser um UUID válido. The uuid of an existing record in the cost_centers table. Example: df087826-649e-37fd-804e-7531566b93f1

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

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

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


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

Example response (200):


{
    "data": {
        "id": "cece07b8-5152-3a9b-b318-6bd5983272d7",
        "receipt_number": "REC-4765",
        "receiver_type": "custom",
        "receiver": {
            "id": null,
            "type": null,
            "label": null,
            "name": "Rhoda Lakin",
            "document": "694.631.523-07"
        },
        "payment": {
            "amount": 916.46,
            "amount_in_words": "Valor por extenso de teste",
            "method": "cash",
            "description": "Facere nulla suscipit quibusdam dolore blanditiis eum quam."
        },
        "issuer": {
            "name": "Simonis, Fisher and Eichmann",
            "document": "05.760.076/9471-79"
        },
        "issue": {
            "date": "2026-11-09",
            "city": "West Ignacio",
            "state": "PR"
        },
        "created_by": {
            "id": "a351a0d4-81ab-4100-81b3-288bd02cf39d",
            "name": "Ebony Padberg Jr."
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/payment-receipts/{receipt}

Headers

Authorization        

Example: Bearer 658a4hce1f3gPEbdvVDa6kZ

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 P8heVZ634cfa6vgkd1b5DaE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"receiver_type\": \"Example Receiver type\",
    \"receiver_id\": \"Example Receiver id\",
    \"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\": \"ac4d1434-f750-3818-8d27-24c5e78352d8\",
    \"cost_center_id\": \"b195e346-030c-3337-8a99-4b021b01d755\",
    \"bank_account_id\": \"27e9f805-f508-3987-9cf9-51efd1632787\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payment-receipts"
);

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

let body = {
    "receiver_type": "Example Receiver type",
    "receiver_id": "Example Receiver id",
    "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": "ac4d1434-f750-3818-8d27-24c5e78352d8",
    "cost_center_id": "b195e346-030c-3337-8a99-4b021b01d755",
    "bank_account_id": "27e9f805-f508-3987-9cf9-51efd1632787"
};

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 P8heVZ634cfa6vgkd1b5DaE

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
  • supplier
  • custom
receiver_id   string  optional    

Recebedor. This field is required when receiver_type is employee or supplier. O campo value deve ser um UUID válido. Example: Example Receiver id

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: ac4d1434-f750-3818-8d27-24c5e78352d8

cost_center_id   string     

Cost center id. The uuid of an existing record in the cost_centers table. Example: b195e346-030c-3337-8a99-4b021b01d755

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: 27e9f805-f508-3987-9cf9-51efd1632787

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 aDZc6hP6feb385gkdavE14V" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"receiver_type\": \"Example Receiver type\",
    \"receiver_id\": \"Example Receiver id\",
    \"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\": \"454adf24-b806-37b8-99b4-8df4e760abdb\",
    \"cost_center_id\": \"2acfd56f-c73d-37d1-ae8d-90b936cec3fc\",
    \"bank_account_id\": \"76588b47-e5ad-3a17-87e4-16ca6692576b\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32"
);

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

let body = {
    "receiver_type": "Example Receiver type",
    "receiver_id": "Example Receiver id",
    "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": "454adf24-b806-37b8-99b4-8df4e760abdb",
    "cost_center_id": "2acfd56f-c73d-37d1-ae8d-90b936cec3fc",
    "bank_account_id": "76588b47-e5ad-3a17-87e4-16ca6692576b"
};

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 aDZc6hP6feb385gkdavE14V

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
  • supplier
  • custom
receiver_id   string  optional    

Recebedor. This field is required when receiver_type is employee or supplier. O campo value deve ser um UUID válido. Example: Example Receiver id

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: 454adf24-b806-37b8-99b4-8df4e760abdb

cost_center_id   string     

Cost center id. The uuid of an existing record in the cost_centers table. Example: 2acfd56f-c73d-37d1-ae8d-90b936cec3fc

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: 76588b47-e5ad-3a17-87e4-16ca6692576b

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

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "65dea10a-f155-3fc5-a7ee-daf09aae0441",
            "receipt_number": "REC-4150",
            "receiver_type": "custom",
            "receiver": {
                "id": null,
                "type": null,
                "label": null,
                "name": "Prof. Meggie Bechtelar",
                "document": "528.937.439-17"
            },
            "payment": {
                "amount": 1458.92,
                "amount_in_words": "Valor por extenso de teste",
                "method": "pix",
                "description": "Sit quod quod libero."
            },
            "issuer": {
                "name": "Nicolas-Zulauf",
                "document": "58.707.680/3593-95"
            },
            "issue": {
                "date": "2026-10-30",
                "city": "Port Lynn",
                "state": "RJ"
            },
            "created_by": {
                "id": "a351a0d4-9c61-4253-9e0a-1d6785431e6a",
                "name": "Autumn Greenholt"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "5314a797-78e2-3ba1-abec-cfc66bfbeaaa",
            "receipt_number": "REC-5644",
            "receiver_type": "custom",
            "receiver": {
                "id": null,
                "type": null,
                "label": null,
                "name": "Katherine Grant",
                "document": "568.075.922-00"
            },
            "payment": {
                "amount": 231.5,
                "amount_in_words": "Valor por extenso de teste",
                "method": "check",
                "description": "Suscipit reprehenderit minus fugiat omnis iusto."
            },
            "issuer": {
                "name": "Zulauf Inc",
                "document": "15.271.852/1726-23"
            },
            "issue": {
                "date": "2026-11-17",
                "city": "South Eulalia",
                "state": "PE"
            },
            "created_by": {
                "id": "a351a0d4-9ece-4f44-aa9c-42048beb8a70",
                "name": "Miss Roberta Weimann"
            },
            "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 hPa81Decd3EvgV5k6ba4Z6f

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 4

employee   string     

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

Payroll Addition Types

Cadastro dos tipos de acréscimo da folha de sexta

List addition types

requires authentication payroll build

Lista ordenada por nome, sem paginação: o cadastro é pequeno e a mesma chamada serve à tela de lista e à lista de escolha do lançamento.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/payroll-addition-types?q=omnis&active=1" \
    --header "Authorization: Bearer aV6kfP81bhecDgZd6va45E3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"aut\",
    \"active\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payroll-addition-types"
);

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

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

let body = {
    "q": "aut",
    "active": true
};

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

Example response (200):


{
    "data": [
        {
            "id": "a351a0d4-adfc-4843-ae22-b569e15bad13",
            "name": "nihil sit",
            "default_amount": "14.58",
            "includes_in_work_cost": true,
            "is_active": true,
            "in_use": false
        },
        {
            "id": "a351a0d4-aeee-452d-ac38-57f36a75720f",
            "name": "rerum rerum",
            "default_amount": "53.03",
            "includes_in_work_cost": true,
            "is_active": true,
            "in_use": false
        }
    ]
}
 

Request      

GET api/payroll-addition-types

Headers

Authorization        

Example: Bearer aV6kfP81bhecDgZd6va45E3

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

q   string  optional    

Busca por nome. Example: omnis

active   boolean  optional    

Só ativos (1) ou só inativos (0). Omitido, traz os dois. Example: 1

Body Parameters

q   string  optional    

Example: aut

active   boolean  optional    

Example: true

Create addition type

requires authentication payroll build

O nome é único. O valor padrão fica vazio quando o valor varia a cada lançamento.

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/payroll-addition-types" \
    --header "Authorization: Bearer ghf6ka1d5PVeab3Dc4Z6Ev8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"zfqzdqaxaimpmqb\",
    \"default_amount\": 42,
    \"includes_in_work_cost\": false,
    \"is_active\": false
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payroll-addition-types"
);

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

let body = {
    "name": "zfqzdqaxaimpmqb",
    "default_amount": 42,
    "includes_in_work_cost": false,
    "is_active": false
};

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

Example response (201):


{
    "data": {
        "id": "a351a0d4-b66d-4504-806c-c17e6c77025e",
        "name": "numquam impedit",
        "default_amount": "23.26",
        "includes_in_work_cost": true,
        "is_active": true,
        "in_use": false
    }
}
 

Request      

POST api/payroll-addition-types

Headers

Authorization        

Example: Bearer ghf6ka1d5PVeab3Dc4Z6Ev8

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

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

default_amount   number  optional    

O campo value deve ser pelo menos 0.01. Example: 42

includes_in_work_cost   boolean  optional    

Example: false

is_active   boolean  optional    

Example: false

Show addition type

requires authentication payroll build

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

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


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

Example response (200):


{
    "data": {
        "id": "a351a0d4-bda8-4679-bda2-d6dc0211e285",
        "name": "voluptatem dolorem",
        "default_amount": "13.83",
        "includes_in_work_cost": true,
        "is_active": true,
        "in_use": false
    }
}
 

Request      

GET api/payroll-addition-types/{payrollAdditionType}

Headers

Authorization        

Example: Bearer hcafab5vgP8Dd4V6Ze61kE3

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

payrollAdditionType   string     

UUID do tipo. Example: cupiditate

Update addition type

requires authentication payroll build

Alterar o cadastro não muda acréscimo já lançado: ele guarda a cópia do nome, do valor e da marcação de custo do momento do lançamento.

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/payroll-addition-types/et" \
    --header "Authorization: Bearer 34e815VvDE6ZacPbfkhag6d" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vuxzif\",
    \"default_amount\": 35,
    \"includes_in_work_cost\": true,
    \"is_active\": false
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payroll-addition-types/et"
);

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

let body = {
    "name": "vuxzif",
    "default_amount": 35,
    "includes_in_work_cost": true,
    "is_active": false
};

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

Example response (200):


{
    "message": "Tipo de acréscimo atualizado com sucesso."
}
 

Request      

PUT api/payroll-addition-types/{payrollAdditionType}

Headers

Authorization        

Example: Bearer 34e815VvDE6ZacPbfkhag6d

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

payrollAdditionType   string     

UUID do tipo. Example: et

Body Parameters

name   string  optional    

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

default_amount   number  optional    

O campo value deve ser pelo menos 0.01. Example: 35

includes_in_work_cost   boolean  optional    

Example: true

is_active   boolean  optional    

Example: false

Delete addition type

requires authentication payroll build

Só para tipo sem uso. Tipo já lançado em alguma folha é recusado com orientação para inativar.

Example request:
curl --request DELETE \
    "https://api.bs-homolog.pensou.app.br/api/payroll-addition-types/harum" \
    --header "Authorization: Bearer 1c8DPVvdeE6a5h3ba6fkg4Z" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payroll-addition-types/harum"
);

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


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

Example response (200):


{
    "message": "Tipo de acréscimo excluído com sucesso."
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "name": [
            "Este tipo de acréscimo já foi lançado em alguma folha e não pode ser excluído. Inative-o para parar de usá-lo."
        ]
    }
}
 

Request      

DELETE api/payroll-addition-types/{payrollAdditionType}

Headers

Authorization        

Example: Bearer 1c8DPVvdeE6a5h3ba6fkg4Z

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

payrollAdditionType   string     

UUID do tipo. Example: harum

Payroll Payments

Baixa da folha: caixa, recibo e dinheiro entregue na obra

Payments of the day

requires authentication payroll pay

Os pagamentos agendados para uma data, agrupados por favorecido, com a chave PIX ao lado e o total por pessoa. Sem date, traz o dia de hoje.

Os itens já pagos vêm na lista, marcados: quem paga precisa ver o que já saiu para não pagar duas vezes. Folha em rascunho não aparece — pagamento só depois de conferida.

A chave PIX é a gravada no item; não havendo, cai na favorita do cadastro do funcionário ou do fornecedor.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/payroll-payments/day?date=2026-11-20" \
    --header "Authorization: Bearer PhZ651DgfkeaEV4vd6ba8c3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date\": \"2026-11-26\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payroll-payments/day"
);

const params = {
    "date": "2026-11-20",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

let body = {
    "date": "2026-11-26"
};

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

Example response (200):


{
    "date": "2026-11-20",
    "totals": {
        "grand_total": "530.00",
        "pending_total": "350.00",
        "items_count": 3,
        "pending_count": 2,
        "payees_count": 2
    },
    "payees": [
        {
            "payee": {
                "type": "employee",
                "label": "Funcionário",
                "id": "uuid",
                "name": "José da Silva",
                "document": "390.533.447-05"
            },
            "pix_key": "jose.silva@email.com",
            "total": "180.00",
            "pending_total": "180.00",
            "items_count": 1,
            "pending_count": 1,
            "items": []
        }
    ]
}
 

Request      

GET api/payroll-payments/day

Headers

Authorization        

Example: Bearer PhZ651DgfkeaEV4vd6ba8c3

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

date   string  optional    

Data no formato AAAA-MM-DD. Omitida, usa hoje. Example: 2026-11-20

Body Parameters

date   string     

Must be a valid date in the format Y-m-d. Example: 2026-11-26

Settle several payroll items

requires authentication payroll pay

Baixa vários itens de uma vez. Cada item é liquidado na sua própria transação: um item sem saldo na conta não desfaz os que já foram pagos, e a resposta diz quais passaram e quais não.

Com receipt_mode: per_person sai um recibo por favorecido cobrindo todos os itens dele; com per_payment, um recibo por item.

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/payroll-payments/batch" \
    --header "Authorization: Bearer 5E3PagZ86ab6fck1evhDdV4" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bank_account_id\": \"61007eb2-23dc-3dfe-aa0f-bafffb06b4c3\",
    \"delivered\": false,
    \"delivered_by_name\": \"kahxqggmgdtwtzw\",
    \"generate_receipt\": false,
    \"receipt_mode\": \"per_payment\",
    \"receipt_description\": \"exercitationem\",
    \"issuer_name\": \"mqou\",
    \"issuer_document\": \"ynes\",
    \"city\": \"nvkznilpgmtderhbkkrmwrqjg\",
    \"state\": \"du\",
    \"items\": [
        \"98a2092d-7131-392e-97c9-e0f07975f295\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payroll-payments/batch"
);

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

let body = {
    "bank_account_id": "61007eb2-23dc-3dfe-aa0f-bafffb06b4c3",
    "delivered": false,
    "delivered_by_name": "kahxqggmgdtwtzw",
    "generate_receipt": false,
    "receipt_mode": "per_payment",
    "receipt_description": "exercitationem",
    "issuer_name": "mqou",
    "issuer_document": "ynes",
    "city": "nvkznilpgmtderhbkkrmwrqjg",
    "state": "du",
    "items": [
        "98a2092d-7131-392e-97c9-e0f07975f295"
    ]
};

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

Example response (200):


{
    "settled": [
        "uuid-1",
        "uuid-2"
    ],
    "failed": [
        {
            "item": "uuid-3",
            "reason": "Saldo insuficiente."
        }
    ]
}
 

Request      

POST api/payroll-payments/batch

Headers

Authorization        

Example: Bearer 5E3PagZ86ab6fck1evhDdV4

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

bank_account_id   string     

O campo value deve ser um UUID válido. The uuid of an existing record in the bank_accounts table. Example: 61007eb2-23dc-3dfe-aa0f-bafffb06b4c3

delivered   boolean  optional    

Example: false

delivered_by_name   string  optional    

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

generate_receipt   boolean  optional    

Example: false

receipt_mode   string  optional    

Example: per_payment

Must be one of:
  • per_payment
  • per_person
receipt_description   string  optional    

Example: exercitationem

issuer_name   string  optional    

This field is required when generate_receipt is true. O campo value não pode ser superior a 255 caracteres. Example: mqou

issuer_document   string  optional    

This field is required when generate_receipt is true. O campo value não pode ser superior a 255 caracteres. Example: ynes

city   string  optional    

This field is required when generate_receipt is true. O campo value não pode ser superior a 255 caracteres. Example: nvkznilpgmtderhbkkrmwrqjg

state   string  optional    

This field is required when generate_receipt is true. O campo value deve ser 2 caracteres. Example: du

items   string[]  optional    

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

Settle a payroll item

requires authentication payroll pay

Marca o item como pago e lança no caixa, com a obra e o centro de custo do item, debitando a conta de saída escolhida.

Com delivered, o item fica como entregue em vez de pago — é o dinheiro entregue na obra, que exige uma conta do tipo caixa e aceita o nome de quem entregou.

O recibo é opcional. Quando pedido, o caixa e o recibo nascem na mesma transação: se um falhar, nenhum dos dois fica gravado.

Sem sessão de caixa aberta, uma é aberta automaticamente — inclusive quando a do dia já foi fechada.

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/payroll-payments/laboriosam" \
    --header "Authorization: Bearer Va5a6k4ZhceD13EPvbg6fd8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bank_account_id\": \"99502c02-2c5c-3f59-9d17-9d6cbe8b6a0f\",
    \"delivered\": true,
    \"delivered_by_name\": \"tmmdyqcwt\",
    \"generate_receipt\": false,
    \"receipt_mode\": \"per_person\",
    \"receipt_description\": \"recusandae\",
    \"issuer_name\": \"tysgufivkyxwbxab\",
    \"issuer_document\": \"dztmcymkctcb\",
    \"city\": \"wbdsmrrevxxmlic\",
    \"state\": \"rx\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payroll-payments/laboriosam"
);

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

let body = {
    "bank_account_id": "99502c02-2c5c-3f59-9d17-9d6cbe8b6a0f",
    "delivered": true,
    "delivered_by_name": "tmmdyqcwt",
    "generate_receipt": false,
    "receipt_mode": "per_person",
    "receipt_description": "recusandae",
    "issuer_name": "tysgufivkyxwbxab",
    "issuer_document": "dztmcymkctcb",
    "city": "wbdsmrrevxxmlic",
    "state": "rx"
};

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

Example response (200):


{
    "data": {
        "id": "a351a0d5-28b6-4498-8473-cadc00cf0433",
        "payee": {
            "type": null,
            "label": null,
            "id": null,
            "name": "Chaya Breitenberg",
            "document": "208.126.142-92"
        },
        "work": null,
        "cost_center": null,
        "amount": "172.36",
        "additions": [],
        "total": "172.36",
        "work_cost_total": "172.36",
        "payment_method": {
            "value": "pix",
            "label": "PIX"
        },
        "pix_key": null,
        "notes": null,
        "scheduled_date": "2026-11-26",
        "status": {
            "value": "pending",
            "label": "Pendente"
        },
        "is_settled": false,
        "paid_at": null,
        "paid_by": null,
        "delivered_by_name": null
    }
}
 

Request      

POST api/payroll-payments/{item}

Headers

Authorization        

Example: Bearer Va5a6k4ZhceD13EPvbg6fd8

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

item   string     

UUID do item da folha. Example: laboriosam

Body Parameters

bank_account_id   string     

O campo value deve ser um UUID válido. The uuid of an existing record in the bank_accounts table. Example: 99502c02-2c5c-3f59-9d17-9d6cbe8b6a0f

delivered   boolean  optional    

Example: true

delivered_by_name   string  optional    

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

generate_receipt   boolean  optional    

Example: false

receipt_mode   string  optional    

Example: per_person

Must be one of:
  • per_payment
  • per_person
receipt_description   string  optional    

Example: recusandae

issuer_name   string  optional    

This field is required when generate_receipt is true. O campo value não pode ser superior a 255 caracteres. Example: tysgufivkyxwbxab

issuer_document   string  optional    

This field is required when generate_receipt is true. O campo value não pode ser superior a 255 caracteres. Example: dztmcymkctcb

city   string  optional    

This field is required when generate_receipt is true. O campo value não pode ser superior a 255 caracteres. Example: wbdsmrrevxxmlic

state   string  optional    

This field is required when generate_receipt is true. O campo value deve ser 2 caracteres. Example: rx

Payroll Sheets

Folha de sexta: montar, conferir e reabrir

List payroll sheets

requires authentication payroll index

Folhas por semana, da mais recente para a mais antiga, com os totais por forma de pagamento. A mesma semana pode ter mais de uma folha.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/payroll-sheets" \
    --header "Authorization: Bearer h6dDc1V8aePZ4E35akv6bgf" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sort_by\": \"quaerat\",
    \"sort_desc\": true,
    \"page\": 70,
    \"per_page\": 3,
    \"q\": \"quo\",
    \"status\": \"draft\",
    \"period_from\": \"2026-11-26T13:17:39\",
    \"period_to\": \"2041-10-09\",
    \"payment_date_from\": \"2026-11-26T13:17:39\",
    \"payment_date_to\": \"2115-01-24\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payroll-sheets"
);

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

let body = {
    "sort_by": "quaerat",
    "sort_desc": true,
    "page": 70,
    "per_page": 3,
    "q": "quo",
    "status": "draft",
    "period_from": "2026-11-26T13:17:39",
    "period_to": "2041-10-09",
    "payment_date_from": "2026-11-26T13:17:39",
    "payment_date_to": "2115-01-24"
};

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

Example response (200):


{
    "data": [
        {
            "id": "a351a0d4-cba2-4542-b20e-d36dec8f8eb9",
            "code": null,
            "name": "Escritório",
            "period_start": "2026-11-23",
            "period_end": "2026-11-29",
            "payment_date": "2026-11-27",
            "status": {
                "value": "draft",
                "label": "Rascunho"
            },
            "items_count": 0,
            "grand_total": "0.00",
            "by_payment_method": []
        },
        {
            "id": "a351a0d4-cede-43b9-9389-67860c9dd4de",
            "code": null,
            "name": "Escritório",
            "period_start": "2026-11-23",
            "period_end": "2026-11-29",
            "payment_date": "2026-11-27",
            "status": {
                "value": "draft",
                "label": "Rascunho"
            },
            "items_count": 0,
            "grand_total": "0.00",
            "by_payment_method": []
        }
    ],
    "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/payroll-sheets

Headers

Authorization        

Example: Bearer h6dDc1V8aePZ4E35akv6bgf

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

sort_by   string  optional    

Example: quaerat

sort_desc   boolean  optional    

Example: true

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

Example: quo

status   string  optional    

Example: draft

Must be one of:
  • draft
  • checked
  • scheduled
  • paid
period_from   string  optional    

O campo value deve ser uma data válida. Example: 2026-11-26T13:17:39

period_to   string  optional    

O campo value deve ser uma data válida. O campo value deve ser uma data posterior ou igual a period_from. Example: 2041-10-09

payment_date_from   string  optional    

O campo value deve ser uma data válida. Example: 2026-11-26T13:17:39

payment_date_to   string  optional    

O campo value deve ser uma data válida. O campo value deve ser uma data posterior ou igual a payment_date_from. Example: 2115-01-24

Create payroll sheet

requires authentication payroll build

Nasce em rascunho. O nome distingue folhas da mesma semana, como "Obras" e "Escritório".

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/payroll-sheets" \
    --header "Authorization: Bearer gbd8E5V3v64cZ6aDePhkfa1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"xkevxhmjiowv\",
    \"period_start\": \"2026-11-26T13:17:39\",
    \"period_end\": \"2071-08-28\",
    \"payment_date\": \"2026-11-26T13:17:39\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payroll-sheets"
);

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

let body = {
    "name": "xkevxhmjiowv",
    "period_start": "2026-11-26T13:17:39",
    "period_end": "2071-08-28",
    "payment_date": "2026-11-26T13:17:39"
};

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

Example response (201):


{
    "data": {
        "id": "a351a0d4-d6af-439d-8bc7-6f4b1fb222ff",
        "code": null,
        "name": "Obras",
        "period_start": "2026-11-23",
        "period_end": "2026-11-29",
        "payment_date": "2026-11-27",
        "status": {
            "value": "draft",
            "label": "Rascunho"
        },
        "accepts_item_changes": true,
        "can_reopen": false,
        "created_by": {
            "id": "a351a0d4-d72c-4e94-8790-d0113a95fad0",
            "name": "Mozell Swaniawski"
        },
        "checked_by": null,
        "checked_at": null,
        "reopened_by": null,
        "reopened_at": null,
        "items": [],
        "totals": {
            "grand_total": "0.00",
            "work_cost_total": "0.00",
            "items_count": 0,
            "by_work": [],
            "by_payment_method": []
        }
    }
}
 

Request      

POST api/payroll-sheets

Headers

Authorization        

Example: Bearer gbd8E5V3v64cZ6aDePhkfa1

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

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

period_start   string     

O campo value deve ser uma data válida. Example: 2026-11-26T13:17:39

period_end   string     

O campo value deve ser uma data válida. O campo value deve ser uma data posterior ou igual a period_start. Example: 2071-08-28

payment_date   string     

O campo value deve ser uma data válida. Example: 2026-11-26T13:17:39

Show payroll sheet

requires authentication payroll show

Folha com os itens, os acréscimos e os totais por obra e por forma de pagamento, calculados no servidor.

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

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


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

Example response (200):


{
    "data": {
        "id": "a351a0d4-de20-4874-bb3a-563f90a8f95b",
        "code": null,
        "name": "Escritório",
        "period_start": "2026-11-23",
        "period_end": "2026-11-29",
        "payment_date": "2026-11-27",
        "status": {
            "value": "draft",
            "label": "Rascunho"
        },
        "accepts_item_changes": true,
        "can_reopen": false,
        "created_by": {
            "id": "a351a0d4-dea6-4f91-9878-227ac5edd1b0",
            "name": "Dr. Andy Harber Jr."
        },
        "checked_by": null,
        "checked_at": null,
        "reopened_by": null,
        "reopened_at": null,
        "items": [],
        "totals": {
            "grand_total": "0.00",
            "work_cost_total": "0.00",
            "items_count": 0,
            "by_work": [],
            "by_payment_method": []
        }
    }
}
 

Request      

GET api/payroll-sheets/{sheet}

Headers

Authorization        

Example: Bearer Z36aP4V6vcegf81Edb5Dkha

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

sheet   string     

UUID da folha. Example: suscipit

Update payroll sheet

requires authentication payroll build

Semana, nome e data de pagamento só mudam em rascunho.

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/payroll-sheets/voluptatum" \
    --header "Authorization: Bearer 6VEcZavda3148gPhe5Dk6fb" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"ddgg\",
    \"period_start\": \"2026-11-26T13:17:39\",
    \"period_end\": \"2098-06-03\",
    \"payment_date\": \"2026-11-26T13:17:39\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payroll-sheets/voluptatum"
);

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

let body = {
    "name": "ddgg",
    "period_start": "2026-11-26T13:17:39",
    "period_end": "2098-06-03",
    "payment_date": "2026-11-26T13:17:39"
};

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

Example response (200):


{
    "message": "Folha atualizada com sucesso."
}
 

Request      

PUT api/payroll-sheets/{sheet}

Headers

Authorization        

Example: Bearer 6VEcZavda3148gPhe5Dk6fb

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

sheet   string     

UUID da folha. Example: voluptatum

Body Parameters

name   string  optional    

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

period_start   string  optional    

O campo value deve ser uma data válida. Example: 2026-11-26T13:17:39

period_end   string  optional    

O campo value deve ser uma data válida. O campo value deve ser uma data posterior ou igual a period_start. Example: 2098-06-03

payment_date   string  optional    

O campo value deve ser uma data válida. Example: 2026-11-26T13:17:39

Delete payroll sheet

requires authentication payroll build

Só em rascunho. Apagar a folha apaga os itens e os acréscimos dela.

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

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


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

Example response (200):


{
    "message": "Folha excluída com sucesso."
}
 

Request      

DELETE api/payroll-sheets/{sheet}

Headers

Authorization        

Example: Bearer EVk6g4d6D1hab8PcZe3fva5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

sheet   string     

UUID da folha. Example: assumenda

Add item to payroll sheet

requires authentication payroll build

Lança um pagamento na folha. O favorecido vem do cadastro (payee_type mais payee_id) ou digitado à mão (receiver_name, sem payee_type) — este último é o dinheiro entregue na obra para quem não está em cadastro nenhum.

O nome e o documento do favorecido de cadastro são copiados no servidor, para a folha não mudar quando o cadastro mudar. Sem amount, cai na diária do funcionário. Sem scheduled_date, herda a data de pagamento da folha.

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/payroll-sheets/voluptas/items" \
    --header "Authorization: Bearer 6PEVDfc3eg61adv58bhaZ4k" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"payee_type\": \"employee\",
    \"payee_id\": \"372426a1-c510-3330-abc1-ccf873b5a918\",
    \"receiver_name\": \"xsmvobj\",
    \"receiver_document\": \"jthdbgwusyewkziatne\",
    \"work_id\": \"a185704c-1e12-32ee-b372-f5aeebfeff5a\",
    \"cost_center_id\": \"recusandae\",
    \"amount\": 50,
    \"payment_method\": \"cash\",
    \"pix_key\": \"zbyyngmgsiqcwwohqusfi\",
    \"notes\": \"cjkpzvfqfizrovithctimqcon\",
    \"scheduled_date\": \"2026-11-26T13:17:39\",
    \"additions\": [
        {
            \"type_id\": \"612c2e2c-70ed-38a7-b479-069148c52dd8\",
            \"amount\": 75
        }
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payroll-sheets/voluptas/items"
);

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

let body = {
    "payee_type": "employee",
    "payee_id": "372426a1-c510-3330-abc1-ccf873b5a918",
    "receiver_name": "xsmvobj",
    "receiver_document": "jthdbgwusyewkziatne",
    "work_id": "a185704c-1e12-32ee-b372-f5aeebfeff5a",
    "cost_center_id": "recusandae",
    "amount": 50,
    "payment_method": "cash",
    "pix_key": "zbyyngmgsiqcwwohqusfi",
    "notes": "cjkpzvfqfizrovithctimqcon",
    "scheduled_date": "2026-11-26T13:17:39",
    "additions": [
        {
            "type_id": "612c2e2c-70ed-38a7-b479-069148c52dd8",
            "amount": 75
        }
    ]
};

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

Example response (201):


{
    "data": {
        "id": "a351a0d4-f09d-482c-ba87-ed825ef811d3",
        "payee": {
            "type": null,
            "label": null,
            "id": null,
            "name": "Reymundo Schroeder",
            "document": "954.265.970-91"
        },
        "work": null,
        "cost_center": null,
        "amount": "196.93",
        "additions": [],
        "total": "196.93",
        "work_cost_total": "196.93",
        "payment_method": {
            "value": "pix",
            "label": "PIX"
        },
        "pix_key": null,
        "notes": null,
        "scheduled_date": "2026-11-26",
        "status": {
            "value": "pending",
            "label": "Pendente"
        },
        "is_settled": false,
        "paid_at": null,
        "paid_by": null,
        "delivered_by_name": null
    }
}
 

Request      

POST api/payroll-sheets/{sheet}/items

Headers

Authorization        

Example: Bearer 6PEVDfc3eg61adv58bhaZ4k

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

sheet   string     

UUID da folha. Example: voluptas

Body Parameters

payee_type   string  optional    

Example: employee

Must be one of:
  • employee
  • supplier
payee_id   string  optional    

This field is required when payee_type is present. O campo value deve ser um UUID válido. Example: 372426a1-c510-3330-abc1-ccf873b5a918

receiver_name   string  optional    

This field is required when payee_type is not present. O campo value não pode ser superior a 255 caracteres. Example: xsmvobj

receiver_document   string  optional    

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

work_id   string  optional    

O campo value deve ser um UUID válido. The uuid of an existing record in the works table. Example: a185704c-1e12-32ee-b372-f5aeebfeff5a

cost_center_id   string     

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

amount   number     

O campo value deve ser pelo menos 0.01. Example: 50

payment_method   string     

Example: cash

Must be one of:
  • pix
  • bank_transfer
  • cash
  • check
pix_key   string  optional    

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

notes   string  optional    

O campo value não pode ser superior a 1000 caracteres. Example: cjkpzvfqfizrovithctimqcon

scheduled_date   string  optional    

O campo value deve ser uma data válida. Example: 2026-11-26T13:17:39

additions   object[]  optional    
type_id   string     

O campo value deve ser um UUID válido. The uuid of an existing record in the payroll_addition_types table. Example: 612c2e2c-70ed-38a7-b479-069148c52dd8

amount   number  optional    

O campo value deve ser pelo menos 0.01. Example: 75

Update payroll sheet item

requires authentication payroll build

Só em folha em rascunho e item ainda não pago. Mandar additions substitui a lista inteira de acréscimos do item.

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/payroll-sheets/rerum/items/voluptas" \
    --header "Authorization: Bearer dcahbP35kvga46V8EZD1fe6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"payee_type\": \"supplier\",
    \"payee_id\": \"395323fa-2735-31ad-993c-744ecef884ef\",
    \"receiver_name\": \"m\",
    \"receiver_document\": \"ypgikhkzwzmvkxcuuyvn\",
    \"work_id\": \"c4bdd437-d985-3386-a1f1-31b398d81486\",
    \"cost_center_id\": \"et\",
    \"amount\": 53,
    \"payment_method\": \"bank_transfer\",
    \"pix_key\": \"kdrrl\",
    \"notes\": \"wdukyeqdlkz\",
    \"scheduled_date\": \"2026-11-26T13:17:39\",
    \"additions\": [
        {
            \"type_id\": \"e8e080c1-84bc-34e8-a90e-15dde2bf7271\",
            \"amount\": 81
        }
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payroll-sheets/rerum/items/voluptas"
);

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

let body = {
    "payee_type": "supplier",
    "payee_id": "395323fa-2735-31ad-993c-744ecef884ef",
    "receiver_name": "m",
    "receiver_document": "ypgikhkzwzmvkxcuuyvn",
    "work_id": "c4bdd437-d985-3386-a1f1-31b398d81486",
    "cost_center_id": "et",
    "amount": 53,
    "payment_method": "bank_transfer",
    "pix_key": "kdrrl",
    "notes": "wdukyeqdlkz",
    "scheduled_date": "2026-11-26T13:17:39",
    "additions": [
        {
            "type_id": "e8e080c1-84bc-34e8-a90e-15dde2bf7271",
            "amount": 81
        }
    ]
};

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

Example response (200):


{
    "data": {
        "id": "a351a0d4-ff8a-4dbd-9ba4-f77b5a507d79",
        "payee": {
            "type": null,
            "label": null,
            "id": null,
            "name": "Mr. King Hegmann DDS",
            "document": "754.314.494-70"
        },
        "work": null,
        "cost_center": null,
        "amount": "359.63",
        "additions": [],
        "total": "359.63",
        "work_cost_total": "359.63",
        "payment_method": {
            "value": "pix",
            "label": "PIX"
        },
        "pix_key": null,
        "notes": null,
        "scheduled_date": "2026-11-26",
        "status": {
            "value": "pending",
            "label": "Pendente"
        },
        "is_settled": false,
        "paid_at": null,
        "paid_by": null,
        "delivered_by_name": null
    }
}
 

Request      

PUT api/payroll-sheets/{sheet}/items/{id}

Headers

Authorization        

Example: Bearer dcahbP35kvga46V8EZD1fe6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

sheet   string     

UUID da folha. Example: rerum

id   string     

The ID of the item. Example: voluptas

item   string     

UUID do item. Example: non

Body Parameters

payee_type   string  optional    

Example: supplier

Must be one of:
  • employee
  • supplier
payee_id   string  optional    

This field is required when payee_type is present. O campo value deve ser um UUID válido. Example: 395323fa-2735-31ad-993c-744ecef884ef

receiver_name   string  optional    

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

receiver_document   string  optional    

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

work_id   string  optional    

O campo value deve ser um UUID válido. The uuid of an existing record in the works table. Example: c4bdd437-d985-3386-a1f1-31b398d81486

cost_center_id   string     

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

amount   number  optional    

O campo value deve ser pelo menos 0.01. Example: 53

payment_method   string  optional    

Example: bank_transfer

Must be one of:
  • pix
  • bank_transfer
  • cash
  • check
pix_key   string  optional    

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

notes   string  optional    

O campo value não pode ser superior a 1000 caracteres. Example: wdukyeqdlkz

scheduled_date   string  optional    

O campo value deve ser uma data válida. Example: 2026-11-26T13:17:39

additions   object[]  optional    
type_id   string     

O campo value deve ser um UUID válido. The uuid of an existing record in the payroll_addition_types table. Example: e8e080c1-84bc-34e8-a90e-15dde2bf7271

amount   number  optional    

O campo value deve ser pelo menos 0.01. Example: 81

Delete payroll sheet item

requires authentication payroll build

Só em folha em rascunho e item ainda não pago.

Example request:
curl --request DELETE \
    "https://api.bs-homolog.pensou.app.br/api/payroll-sheets/eius/items/molestias" \
    --header "Authorization: Bearer 1aka8Dbfv4gVZE53P6d6ehc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payroll-sheets/eius/items/molestias"
);

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


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

Example response (200):


{
    "message": "Pagamento removido da folha."
}
 

Request      

DELETE api/payroll-sheets/{sheet}/items/{item}

Headers

Authorization        

Example: Bearer 1aka8Dbfv4gVZE53P6d6ehc

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

sheet   string     

UUID da folha. Example: eius

item   string     

UUID do item. Example: molestias

Check payroll sheet

requires authentication payroll check

Confere e trava a folha: a partir daí ela não aceita mais alteração de item. Registra quem conferiu e quando. Folha sem item não é conferível.

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/payroll-sheets/quia/check" \
    --header "Authorization: Bearer 8ehE6Vdb1Paa4kfDv3Zg5c6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payroll-sheets/quia/check"
);

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


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

Example response (200):


{
    "data": {
        "id": "a351a0d5-0a2b-4f7b-b6b1-f5c3b19deed0",
        "code": null,
        "name": "Escritório",
        "period_start": "2026-11-23",
        "period_end": "2026-11-29",
        "payment_date": "2026-11-27",
        "status": {
            "value": "draft",
            "label": "Rascunho"
        },
        "accepts_item_changes": true,
        "can_reopen": false,
        "created_by": {
            "id": "a351a0d5-0a9e-4579-af57-6c1802e10c48",
            "name": "Blanca Rohan"
        },
        "checked_by": null,
        "checked_at": null,
        "reopened_by": null,
        "reopened_at": null,
        "items": [],
        "totals": {
            "grand_total": "0.00",
            "work_cost_total": "0.00",
            "items_count": 0,
            "by_work": [],
            "by_payment_method": []
        }
    }
}
 

Request      

POST api/payroll-sheets/{sheet}/check

Headers

Authorization        

Example: Bearer 8ehE6Vdb1Paa4kfDv3Zg5c6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

sheet   string     

UUID da folha. Example: quia

Reopen payroll sheet

requires authentication payroll check

Volta a folha para rascunho e registra quem reabriu e quando. Recusada quando algum item já foi pago ou entregue.

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

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


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

Example response (200):


{
    "data": {
        "id": "a351a0d5-0fc2-4aac-9f4b-75301b5a2ae2",
        "code": null,
        "name": "Obras",
        "period_start": "2026-11-23",
        "period_end": "2026-11-29",
        "payment_date": "2026-11-27",
        "status": {
            "value": "draft",
            "label": "Rascunho"
        },
        "accepts_item_changes": true,
        "can_reopen": false,
        "created_by": {
            "id": "a351a0d5-1029-457d-b395-83d39a50c155",
            "name": "Wyatt Miller"
        },
        "checked_by": null,
        "checked_at": null,
        "reopened_by": null,
        "reopened_at": null,
        "items": [],
        "totals": {
            "grand_total": "0.00",
            "work_cost_total": "0.00",
            "items_count": 0,
            "by_work": [],
            "by_payment_method": []
        }
    }
}
 

Request      

POST api/payroll-sheets/{sheet}/reopen

Headers

Authorization        

Example: Bearer P8af53De1V4ZvkagbEdh66c

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

sheet   string     

UUID da folha. Example: ut

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


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

Example response (200):


{
    "data": [
        {
            "id": "d44d4f01-32f1-332d-af7a-b867555b074e",
            "name": "laboriosam",
            "display_name": "Dolore commodi illo autem similique ea."
        },
        {
            "id": "fd3c8a1b-7b28-3e8d-9348-d2de069637eb",
            "name": "consectetur",
            "display_name": "Quo impedit et dolores eius alias nobis et."
        }
    ],
    "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 k6E6dhgbceaf18D45PZVv3a

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


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

Example response (200):


{
    "data": [
        {
            "id": "fa4b30ce-e57d-3793-aa73-69c1f3dc2f41",
            "name": "nisi-quae-delectus",
            "display_name": "quis commodi maxime",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "ae66042a-2f5b-3482-b4f8-660b395b1e28",
            "name": "exercitationem-ut-ipsum",
            "display_name": "accusantium illo magni",
            "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 Z6d5bva4aPEkhfDg361c8Ve

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

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

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


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

Example response (200):


{
    "data": {
        "id": "ef924b53-c517-3971-8539-b9176fa9c874",
        "name": "fuga-esse",
        "display_name": "qui non ullam",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/permission-groups/{permissionGroup}

Headers

Authorization        

Example: Bearer 1fk6vZEg5P8dVc3Dab46hea

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

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 feP8VdZEkb1gD56a4hv3ac6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [
        \"44887e83-b870-3af6-804e-088a854373df\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);

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

let body = {
    "permissions": [
        "44887e83-b870-3af6-804e-088a854373df"
    ]
};

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

Example response (200):


{
    "data": {
        "id": "fab6c870-cb0a-38d8-85c0-e15165529bed",
        "name": "tempora-inventore",
        "display_name": "natus numquam et",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer feP8VdZEkb1gD56a4hv3ac6

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 8Z14dDk6aEg6ac3veV5Pfbh" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [
        \"78fd03e9-9446-327f-a18b-2aef883dbe8f\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);

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

let body = {
    "permissions": [
        "78fd03e9-9446-327f-a18b-2aef883dbe8f"
    ]
};

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

Example response (200):


{
    "data": {
        "id": "8f0d8074-53c1-3ec3-a872-cdf4ddbe8785",
        "name": "neque-dolorem",
        "display_name": "nostrum aspernatur temporibus",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer 8Z14dDk6aEg6ac3veV5Pfbh

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


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

Example response (200):


{
    "data": [
        {
            "id": "0abafe27-e147-3c9d-84d7-dfedac892d60",
            "name": "Sra. Malu Alves",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "84513488-8ed0-36a6-936c-96f4fa8c07fc",
            "name": "Dr. Luna Aguiar Gil Sobrinho",
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&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 6f6DehcP584gbdaE3VkZva1

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

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


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

Example response (200):


{
    "data": {
        "id": "3460decd-518e-3c7d-ba16-6ba3e3b86515",
        "name": "Violeta Gomes Valentin Jr.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-brands/{productBrand}

Headers

Authorization        

Example: Bearer aP8k6V1h4dcvgaZfDeE53b6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: repellat

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: sit

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: est

Product Families

Endpoints for product families

List product families

requires authentication product-family index

List all product families

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/product-families?is_epi=1&q=Structure" \
    --header "Authorization: Bearer VhaeP8Ek6D3bf64cZgda1v5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-families"
);

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "a39c1eef-99c0-3932-92a8-a62d538a6242",
            "name": "Dr. Emanuel Emílio Aragão Sobrinho",
            "is_epi": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "ad11959b-119e-37a3-bbaf-482789c658b1",
            "name": "Gian Bittencourt Fontes",
            "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 VhaeP8Ek6D3bf64cZgda1v5

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

is_epi   boolean  optional    

Example: true

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

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


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

Example response (200):


{
    "data": {
        "id": "4c839c59-c42e-393f-a982-15eaa1416aa1",
        "name": "Sra. Samanta Montenegro",
        "is_epi": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-families/{productFamily}

Headers

Authorization        

Example: Bearer P3edZg6kD4fc86ah5Eb1aVv

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: quod

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

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/voluptatem" \
    --header "Authorization: Bearer 4afZ6k6ae1385bVEvhDdgcP" \
    --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/voluptatem"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: voluptatem

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: consequuntur

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 6heZP54E3VfdD1gaa8ckvb6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"Example Q\",
    \"work_id\": \"a7784e93-8348-37db-b632-2d4a3a504640\",
    \"user_id\": \"e3108c10-0a49-31ab-ad3c-1d7ed9451ad8\",
    \"responsible_id\": \"476910e1-8608-328b-b19a-be693b253640\",
    \"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 6heZP54E3VfdD1gaa8ckvb6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "q": "Example Q",
    "work_id": "a7784e93-8348-37db-b632-2d4a3a504640",
    "user_id": "e3108c10-0a49-31ab-ad3c-1d7ed9451ad8",
    "responsible_id": "476910e1-8608-328b-b19a-be693b253640",
    "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": "9bea448b-835d-3689-a268-37f3f70e959d",
            "name": "Porro minus nostrum quia.",
            "description": null,
            "work": {
                "id": "a351a0d5-b6ca-4384-96fa-04fea5bdd4f6",
                "name": "Aline Godói Sobrinho"
            },
            "user": {
                "id": "a351a0d5-b999-4a40-9b97-f3c944b83e48",
                "name": "Prof. Otilia Konopelski"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "7f6c3c16-7c1a-3e98-9609-9ac117081315",
            "name": "Molestiae aspernatur pariatur consequatur.",
            "description": null,
            "work": {
                "id": "a351a0d5-bd5a-49da-b6b0-c77820f3c290",
                "name": "Leonardo Campos Quintana"
            },
            "user": {
                "id": "a351a0d5-c065-42f3-b710-41d66b71679a",
                "name": "Ms. Summer Hagenes PhD"
            },
            "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 6heZP54E3VfdD1gaa8ckvb6

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: a7784e93-8348-37db-b632-2d4a3a504640

user_id   string  optional    

Usuário. The uuid of an existing record in the users table. Example: e3108c10-0a49-31ab-ad3c-1d7ed9451ad8

responsible_id   string  optional    

Responsável. The uuid of an existing record in the users table. Example: 476910e1-8608-328b-b19a-be693b253640

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

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


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

Example response (200):


{
    "data": {
        "id": "fca638a9-537a-38d1-be12-b2ce48cc6f69",
        "name": "Quisquam quidem dicta.",
        "description": "Voluptates voluptates alias eos omnis suscipit id. Debitis ullam quia ut nam et maiores quis consequatur. Qui vitae eaque enim expedita ullam fuga ea. Rerum est atque voluptatem sapiente placeat.",
        "work": {
            "id": "a351a0d5-c7eb-490e-b80b-0148f748495d",
            "name": "Srta. Márcia Poliana Alves Filho"
        },
        "user": {
            "id": "a351a0d5-cb69-4b97-b4b6-fc8859437590",
            "name": "Johnson O'Reilly III"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer b6hk8c53af6dgVvP4Z1aDeE

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: nulla

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

const headers = {
    "Authorization": "Bearer keE536DZVfgPhd684a1abvc",
    "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": "59c13999-a769-3afe-b29e-60f7d3b81925",
            "product": {
                "id": "a351a0d5-e171-4c97-824b-eae75dba22ee",
                "name": "Cristiana Santiago Filho",
                "code": "PRD-162529",
                "unit": {
                    "id": "a351a0d5-df73-44e2-908d-57da813b61f3",
                    "name": "Dr. Adriano Carrara Filho",
                    "abbreviation": "Giovane Rangel Neto"
                }
            },
            "quantity": 805.0489,
            "observation": "Beatae totam non reiciendis exercitationem perferendis.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "104f45d7-3f66-3422-b5a7-901015ddae8f",
            "product": {
                "id": "a351a0d5-f4a9-444a-be82-301653e0ef95",
                "name": "Srta. Noa Rico Torres Filho",
                "code": "PRD-261666",
                "unit": {
                    "id": "a351a0d5-f320-4b38-8954-a9a91d3021f5",
                    "name": "Dirce Késia Aragão Neto",
                    "abbreviation": "Pérola Valdez Pereira Sobrinho"
                }
            },
            "quantity": 689.7267,
            "observation": "Itaque ut iusto delectus in accusantium.",
            "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 keE536DZVfgPhd684a1abvc

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: voluptatum

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 6vE6gh1PaDe4bkd5Z8afcV3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"bf8dda10-0d58-3c37-a43b-ae7c3bc54a02\",
    \"items\": [
        {
            \"product_id\": \"f87bf058-857a-387c-956b-62386a32dcb0\",
            \"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 6vE6gh1PaDe4bkd5Z8afcV3",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "bf8dda10-0d58-3c37-a43b-ae7c3bc54a02",
    "items": [
        {
            "product_id": "f87bf058-857a-387c-956b-62386a32dcb0",
            "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 6vE6gh1PaDe4bkd5Z8afcV3

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: bf8dda10-0d58-3c37-a43b-ae7c3bc54a02

items   object[]  optional    

Itens.

product_id   string     

Produto. The uuid of an existing record in the products table. Example: f87bf058-857a-387c-956b-62386a32dcb0

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/minus" \
    --header "Authorization: Bearer 5D184kha6dVaPcv6fbEZ3ge" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"items\": [
        {
            \"id\": \"30930432-61c9-3020-b18f-11df593f32dd\",
            \"product_id\": \"82acacc0-a2fd-3f8b-963e-e3fef14c3037\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/minus"
);

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

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "items": [
        {
            "id": "30930432-61c9-3020-b18f-11df593f32dd",
            "product_id": "82acacc0-a2fd-3f8b-963e-e3fef14c3037",
            "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 5D184kha6dVaPcv6fbEZ3ge

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: minus

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: 30930432-61c9-3020-b18f-11df593f32dd

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 82acacc0-a2fd-3f8b-963e-e3fef14c3037

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: natus

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/ullam/items" \
    --header "Authorization: Bearer abfE4Vg6Ded36acZ15vhP8k" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"product_id\": \"0b82d0a0-daaa-3c15-8e52-858aa20c8d9d\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/ullam/items"
);

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

let body = {
    "items": [
        {
            "product_id": "0b82d0a0-daaa-3c15-8e52-858aa20c8d9d",
            "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 abfE4Vg6Ded36acZ15vhP8k

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: ullam

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: 0b82d0a0-daaa-3c15-8e52-858aa20c8d9d

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/non" \
    --header "Authorization: Bearer 5P3g8Zf6vekachEbVaD6d41" \
    --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/non"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: non

item   string     

Product Quantity List Item UUID Example: qui

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/quam/items" \
    --header "Authorization: Bearer 8E1Zk6aPg3edf54ac6VbDhv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        \"93e3e68d-2d93-3217-b8a2-a0d690d2c823\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/quam/items"
);

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

let body = {
    "items": [
        "93e3e68d-2d93-3217-b8a2-a0d690d2c823"
    ]
};

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: quam

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/molestiae/sync-items" \
    --header "Authorization: Bearer P6a8haDg3ckd5f61ZvE4bVe" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"id\": \"6aa2c9aa-30fd-3375-905e-bd6e1c7727ba\",
            \"product_id\": \"3db46946-3c2d-3923-bdca-1fe950d91d03\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/molestiae/sync-items"
);

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

let body = {
    "items": [
        {
            "id": "6aa2c9aa-30fd-3375-905e-bd6e1c7727ba",
            "product_id": "3db46946-3c2d-3923-bdca-1fe950d91d03",
            "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 P6a8haDg3ckd5f61ZvE4bVe

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: molestiae

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: 6aa2c9aa-30fd-3375-905e-bd6e1c7727ba

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 3db46946-3c2d-3923-bdca-1fe950d91d03

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/magnam/fulfill" \
    --header "Authorization: Bearer af1bvd5c8e4gDEP3Zhk6a6V" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"fulfillment_type\": \"Example Fulfillment type\",
    \"stock_id\": \"2c7c6074-80ab-3212-8f17-e9092985d074\",
    \"quantity\": 1,
    \"source_stock_id\": \"06ae3a48-5512-3efc-87ac-e173897404b7\",
    \"reason\": \"Example Reason\",
    \"origins\": [
        {
            \"supplier_product_id\": \"254a448b-571f-316a-b179-06ae279743f8\",
            \"quantity\": 1
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/items/magnam/fulfill"
);

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

let body = {
    "fulfillment_type": "Example Fulfillment type",
    "stock_id": "2c7c6074-80ab-3212-8f17-e9092985d074",
    "quantity": 1,
    "source_stock_id": "06ae3a48-5512-3efc-87ac-e173897404b7",
    "reason": "Example Reason",
    "origins": [
        {
            "supplier_product_id": "254a448b-571f-316a-b179-06ae279743f8",
            "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 af1bvd5c8e4gDEP3Zhk6a6V

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

item   string     

Product Request Item UUID Example: magnam

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: 2c7c6074-80ab-3212-8f17-e9092985d074

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: 06ae3a48-5512-3efc-87ac-e173897404b7

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: 254a448b-571f-316a-b179-06ae279743f8

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

const headers = {
    "Authorization": "Bearer g6613v4kVEaafPhdDbeZc85",
    "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": "1514267e-78f0-3922-bb63-0ebdab39dbfc",
            "quantity": 67.1858,
            "fulfilled_at": "2026-10-30T11:52:13.000000Z",
            "created_at": null
        },
        {
            "id": "1c22131a-c936-3fdf-92cf-1548d2f7441f",
            "quantity": 3.1542,
            "fulfilled_at": "2026-11-22T19:27:28.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 g6613v4kVEaafPhdDbeZc85

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

item   string     

Product Request Item UUID Example: laudantium

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

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


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

Example response (200):


{
    "data": {
        "id": "16da4823-5aa7-3523-b717-c540966f6f0a",
        "product": {
            "id": "a351a0d9-ad4e-43fb-99c0-9b7fb62945c5",
            "name": "Artur Edilson Delgado",
            "code": "PRD-939870",
            "unit": {
                "id": "a351a0d9-aba2-451d-8d07-c864c8053395",
                "name": "Walter Pereira",
                "abbreviation": "Dr. Gabrielly Matos Delgado"
            }
        },
        "quantity": 916.1091,
        "quantity_fulfilled": 0,
        "quantity_pending": 916.1091,
        "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 d1h6DacVav5gPkZ3feb84E6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: adipisci

item   string     

Product Request Item UUID Example: praesentium

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/quam/pending-items" \
    --header "Authorization: Bearer 85fevP6DE3g61ahkcbZa4dV" \
    --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/quam/pending-items"
);

const headers = {
    "Authorization": "Bearer 85fevP6DE3g61ahkcbZa4dV",
    "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": "b8f4ee1f-a7fb-3b76-9cb9-67869bc330d2",
            "product": {
                "id": "a351a0d9-cfcb-4a18-8556-d79a781162cf",
                "name": "Sra. Isabelly Deverso Aranda",
                "code": "PRD-573050",
                "unit": {
                    "id": "a351a0d9-ce4f-4615-91c1-07b7fcbd2418",
                    "name": "Daniele Vieira",
                    "abbreviation": "Sr. Thiago Matias da Silva"
                }
            },
            "quantity": 804.1057,
            "quantity_fulfilled": 0,
            "quantity_pending": 804.1057,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "01088f18-4275-3fe9-be9e-2c2db6b3e341",
            "product": {
                "id": "a351a0d9-e260-43d8-a9f5-f4ae37785744",
                "name": "Estela Karen Abreu Sobrinho",
                "code": "PRD-348702",
                "unit": {
                    "id": "a351a0d9-e11f-46c6-832a-f884338d2457",
                    "name": "Srta. Thalia Elis Rosa Neto",
                    "abbreviation": "Dr. Samuel Valência Galindo"
                }
            },
            "quantity": 69.6872,
            "quantity_fulfilled": 0,
            "quantity_pending": 69.6872,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": null,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/product-requests/{productRequest}/pending-items

Headers

Authorization        

Example: Bearer 85fevP6DE3g61ahkcbZa4dV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: quam

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "11534fcc-fb45-3b2b-90ac-371bb31f3fa8",
            "product": {
                "id": "a351a0d9-fb42-4062-b6d8-2f5e2a326a68",
                "name": "Demian Dener das Neves",
                "code": "PRD-526320",
                "unit": {
                    "id": "a351a0d9-f9d9-48c9-8338-8a7ea2f6b650",
                    "name": "Cristiano Santos Santiago",
                    "abbreviation": "Sr. Saulo Burgos Fernandes"
                }
            },
            "quantity": 704.3995,
            "quantity_fulfilled": 0,
            "quantity_pending": 704.3995,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "893372ac-906d-3daa-91b4-5c8464d7ccf4",
            "product": {
                "id": "a351a0da-0f8a-41d1-89a3-75cc5aef6b02",
                "name": "Késia Fernandes",
                "code": "PRD-078486",
                "unit": {
                    "id": "a351a0da-0cbf-40e7-9030-15cda79d8c7e",
                    "name": "Dr. Hosana Fabiana Leon Jr.",
                    "abbreviation": "Théo Alan Pedrosa"
                }
            },
            "quantity": 236.7259,
            "quantity_fulfilled": 0,
            "quantity_pending": 236.7259,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "Voluptas culpa maxime saepe veritatis sed aliquam.",
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

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

Headers

Authorization        

Example: Bearer aav65VPkb1d84feEg6h3DZc

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: minus

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 Z61V8vc4fgDhaakb35edE6P" \
    --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\": \"fefee1aa-4d3e-3027-b887-e09c402ba844\",
    \"work_location_id\": \"52a2e9ac-61fd-30d7-aa1b-f7315ce078fa\",
    \"user_id\": \"dd3c1f74-5532-3bb1-861e-c193dd8c5c6b\",
    \"status_id\": \"5bcad6d2-c974-316d-b8ce-1797814668f1\",
    \"priority\": \"Example Priority\",
    \"needed_at_from\": \"Example Needed at from\",
    \"needed_at_to\": \"Example Needed at to\",
    \"responsible_id\": \"c1e47146-2896-3340-b047-14cb8c8cdabe\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests"
);

const headers = {
    "Authorization": "Bearer Z61V8vc4fgDhaakb35edE6P",
    "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": "fefee1aa-4d3e-3027-b887-e09c402ba844",
    "work_location_id": "52a2e9ac-61fd-30d7-aa1b-f7315ce078fa",
    "user_id": "dd3c1f74-5532-3bb1-861e-c193dd8c5c6b",
    "status_id": "5bcad6d2-c974-316d-b8ce-1797814668f1",
    "priority": "Example Priority",
    "needed_at_from": "Example Needed at from",
    "needed_at_to": "Example Needed at to",
    "responsible_id": "c1e47146-2896-3340-b047-14cb8c8cdabe"
};

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

Example response (200):


{
    "data": [
        {
            "id": "b5645928-8a51-32f2-9c11-9b2ece8e0d0e",
            "code": null,
            "name": "Pariatur sed eaque.",
            "description": "Quo enim sit hic voluptate iste. Vero quidem dolor deserunt veniam aut est et. Natus illo aspernatur enim dolores vero totam rerum. Dolor numquam nihil ullam laboriosam et earum ut modi.",
            "work": {
                "id": "a351a0d7-5a06-42e2-b58d-6ab2cedec62b",
                "name": "Dr. Eduarda Galindo Valentin Jr."
            },
            "user": {
                "id": "a351a0d7-5cfc-44a7-aa77-c3bfc549b880",
                "name": "Dr. Cielo Halvorson PhD"
            },
            "status": {
                "id": "a351a0d7-5eec-4a48-af92-8967d068e6e5",
                "slug": null,
                "name": null,
                "description": "Luísa Zaragoça Rodrigues Jr.",
                "abbreviation": "cupiditate",
                "color": "#6da79b",
                "text_color": "#a93470"
            },
            "priority": "medium",
            "priority_label": "Média",
            "needed_at": "2026-12-21",
            "approved_at": null,
            "rejection_reason": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "bb3095cf-155d-38c9-8fcb-ba52aa967076",
            "code": null,
            "name": "In voluptatem.",
            "description": null,
            "work": {
                "id": "a351a0d7-6347-4a96-baa4-d4efe8eb8073",
                "name": "Samuel José Paes"
            },
            "user": {
                "id": "a351a0d7-662d-4f40-a511-4fdc2ee16420",
                "name": "Mrs. Layla Bogan II"
            },
            "status": {
                "id": "a351a0d7-684c-4ca1-ac86-c7032936b139",
                "slug": null,
                "name": null,
                "description": "Srta. Helena Ramires Cervantes",
                "abbreviation": "mollitia",
                "color": "#6d47fd",
                "text_color": "#c00155"
            },
            "priority": "urgent",
            "priority_label": "Urgente",
            "needed_at": "2026-12-13",
            "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 Z61V8vc4fgDhaakb35edE6P

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: fefee1aa-4d3e-3027-b887-e09c402ba844

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: 52a2e9ac-61fd-30d7-aa1b-f7315ce078fa

user_id   string  optional    

Usuário. The uuid of an existing record in the users table. Example: dd3c1f74-5532-3bb1-861e-c193dd8c5c6b

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 5bcad6d2-c974-316d-b8ce-1797814668f1

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: c1e47146-2896-3340-b047-14cb8c8cdabe

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

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


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

Example response (200):


{
    "data": {
        "id": "f4e1c57d-45b1-3447-a2cd-3bb58ecd1936",
        "code": null,
        "name": "Quas in ut.",
        "description": null,
        "work": {
            "id": "a351a0d7-726a-4cbf-b12a-4a6645d2a5db",
            "name": "Tatiana Delgado da Cruz"
        },
        "user": {
            "id": "a351a0d7-754b-4eed-ac18-b8cc2e1eb0d9",
            "name": "Sonya Dickinson"
        },
        "status": {
            "id": "a351a0d7-7751-497d-a91b-a9be21f79ab7",
            "slug": null,
            "name": null,
            "description": "Carolina Verdara Azevedo",
            "abbreviation": "rem",
            "color": "#450a90",
            "text_color": "#257e4a"
        },
        "priority": "medium",
        "priority_label": "Média",
        "needed_at": "2026-12-11",
        "approved_at": null,
        "rejection_reason": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-requests/{productRequest}

Headers

Authorization        

Example: Bearer k3EZDaf6Veg186c4dbv5aPh

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: voluptates

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

const headers = {
    "Authorization": "Bearer E1vVgckZ8D6ah4a5Pfb63de",
    "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": "85aab447-b94d-36d4-9dc9-5d11f7c90214",
            "product": {
                "id": "a351a0d7-9ed4-4821-9a01-6be19b836b02",
                "name": "Isis Lorena Valdez Neto",
                "code": "PRD-985967",
                "unit": {
                    "id": "a351a0d7-9d74-4d5a-935f-959f884cff5e",
                    "name": "Hosana Pacheco Aguiar",
                    "abbreviation": "Dr. Lidiane Domingues"
                }
            },
            "quantity": 521.6001,
            "quantity_fulfilled": 0,
            "quantity_pending": 521.6001,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "14ea49f1-eeea-3f0f-adbd-52c223d7c1bb",
            "product": {
                "id": "a351a0d7-b2f0-4888-8933-5fe95229c774",
                "name": "Srta. Emanuelly Giovana da Silva",
                "code": "PRD-448380",
                "unit": {
                    "id": "a351a0d7-b1c0-43e4-8e8e-48a434974d90",
                    "name": "Eduarda Gonçalves Jr.",
                    "abbreviation": "Diana Sandra Aguiar Filho"
                }
            },
            "quantity": 680.3378,
            "quantity_fulfilled": 0,
            "quantity_pending": 680.3378,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "A sed enim doloribus nesciunt quibusdam eaque aspernatur.",
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&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 E1vVgckZ8D6ah4a5Pfb63de

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: autem

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 kef6d3Zva5PaE6DVc841bhg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"c58b5500-f117-345a-8512-ecd825ace008\",
    \"work_location_id\": \"1ae3ffdf-326d-3890-9cf3-11e26f4b7002\",
    \"status_id\": \"feced8b3-10f4-3f2e-ade4-e7a3a87e60f0\",
    \"priority\": \"Example Priority\",
    \"needed_at\": \"Example Needed at\",
    \"items\": [
        {
            \"product_id\": \"2560fa8c-48e4-3bdf-a6a4-779a7ee973ad\",
            \"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 kef6d3Zva5PaE6DVc841bhg",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "c58b5500-f117-345a-8512-ecd825ace008",
    "work_location_id": "1ae3ffdf-326d-3890-9cf3-11e26f4b7002",
    "status_id": "feced8b3-10f4-3f2e-ade4-e7a3a87e60f0",
    "priority": "Example Priority",
    "needed_at": "Example Needed at",
    "items": [
        {
            "product_id": "2560fa8c-48e4-3bdf-a6a4-779a7ee973ad",
            "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 kef6d3Zva5PaE6DVc841bhg

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: c58b5500-f117-345a-8512-ecd825ace008

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: 1ae3ffdf-326d-3890-9cf3-11e26f4b7002

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: feced8b3-10f4-3f2e-ade4-e7a3a87e60f0

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: 2560fa8c-48e4-3bdf-a6a4-779a7ee973ad

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/quia" \
    --header "Authorization: Bearer 5efDEh43Pc1da6Z6kV8gvba" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"442cdcd9-5758-3604-b3c0-ef4f99854cd7\",
    \"work_location_id\": \"158229c1-fcc9-3453-aeae-a34da6d9900a\",
    \"status_id\": \"3d938b14-2594-333c-8257-d02540acfa3a\",
    \"priority\": \"Example Priority\",
    \"needed_at\": \"Example Needed at\",
    \"items\": [
        {
            \"id\": \"55df8455-f2f2-3559-a651-ee9a6a545b90\",
            \"product_id\": \"a3628707-59e0-33b8-8b50-9c055a80e1b9\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/quia"
);

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

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "442cdcd9-5758-3604-b3c0-ef4f99854cd7",
    "work_location_id": "158229c1-fcc9-3453-aeae-a34da6d9900a",
    "status_id": "3d938b14-2594-333c-8257-d02540acfa3a",
    "priority": "Example Priority",
    "needed_at": "Example Needed at",
    "items": [
        {
            "id": "55df8455-f2f2-3559-a651-ee9a6a545b90",
            "product_id": "a3628707-59e0-33b8-8b50-9c055a80e1b9",
            "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 5efDEh43Pc1da6Z6kV8gvba

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: quia

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: 442cdcd9-5758-3604-b3c0-ef4f99854cd7

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: 158229c1-fcc9-3453-aeae-a34da6d9900a

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 3d938b14-2594-333c-8257-d02540acfa3a

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: 55df8455-f2f2-3559-a651-ee9a6a545b90

product_id   string     

Produto. The uuid of an existing record in the products table. Example: a3628707-59e0-33b8-8b50-9c055a80e1b9

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: illo

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: assumenda

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: eaque

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/consequatur/items" \
    --header "Authorization: Bearer 6Eh6k1aa53gb4dVD8cZefPv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"product_id\": \"f912a452-233f-30f4-a884-fbab0f066d56\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/consequatur/items"
);

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

let body = {
    "items": [
        {
            "product_id": "f912a452-233f-30f4-a884-fbab0f066d56",
            "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 6Eh6k1aa53gb4dVD8cZefPv

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: consequatur

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: f912a452-233f-30f4-a884-fbab0f066d56

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/ut" \
    --header "Authorization: Bearer eDkEg61d83ab54fcvh6aZPV" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"quantity\": 1,
    \"observation\": \"Example Observation\",
    \"status_id\": \"04b69d6f-1a59-3032-af02-8ad69d55f217\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/items/ut"
);

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

let body = {
    "quantity": 1,
    "observation": "Example Observation",
    "status_id": "04b69d6f-1a59-3032-af02-8ad69d55f217"
};

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 eDkEg61d83ab54fcvh6aZPV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: ut

item   string     

Product Request Item UUID Example: consectetur

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: 04b69d6f-1a59-3032-af02-8ad69d55f217

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/similique/items" \
    --header "Authorization: Bearer bg3DE8d5v4kcaePZ6aVh16f" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        \"a03f085a-c14c-301d-932e-96329c6b84de\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/similique/items"
);

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

let body = {
    "items": [
        "a03f085a-c14c-301d-932e-96329c6b84de"
    ]
};

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 bg3DE8d5v4kcaePZ6aVh16f

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: similique

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/est/sync-items" \
    --header "Authorization: Bearer ge8Pvh6fZdEakc41b3DaV56" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"id\": \"6838ab0c-c534-3795-8c91-128c5cb377db\",
            \"product_id\": \"9894e5b3-61bf-3086-b8c6-3a231eb430a4\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/est/sync-items"
);

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

let body = {
    "items": [
        {
            "id": "6838ab0c-c534-3795-8c91-128c5cb377db",
            "product_id": "9894e5b3-61bf-3086-b8c6-3a231eb430a4",
            "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 ge8Pvh6fZdEakc41b3DaV56

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: est

Body Parameters

items   object[]     

Itens.

id   string  optional    

ID do Item. The uuid of an existing record in the product_request_items table. Example: 6838ab0c-c534-3795-8c91-128c5cb377db

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 9894e5b3-61bf-3086-b8c6-3a231eb430a4

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


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

Example response (200):


{
    "data": [
        {
            "id": "27ad18cc-5675-3d53-917a-c66181e06db9",
            "name": "Bianca Galindo",
            "code": "PRD-075779",
            "stock": 59618062,
            "product_family": {
                "id": "a351a0d5-57c4-4db4-9f41-2ef4c22c3d6c",
                "name": "Sr. Danilo Guilherme Soto Filho"
            },
            "product_brand": {
                "id": "a351a0d5-5944-4e5d-9ccc-2cd5af9cbd00",
                "name": "Srta. Talita Martines Sobrinho"
            },
            "unit": {
                "id": "a351a0d5-5b01-4b54-830e-7eaf25ca3dae",
                "name": "Srta. Naomi Toledo",
                "abbreviation": "Kléber Tamoio"
            },
            "image": {
                "id": null,
                "url": null
            },
            "epi_type": null,
            "description": "Expedita eos eum est nemo.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "cf06c2cc-2bab-37bd-a30e-e30296fc5bc0",
            "name": "Dr. Sarah Valentina Fernandes",
            "code": "PRD-570060",
            "stock": 76306,
            "product_family": {
                "id": "a351a0d5-5e6b-44f9-b552-e0a8e731fcdc",
                "name": "Sérgio Jimenes Neto"
            },
            "product_brand": {
                "id": "a351a0d5-5fd6-4664-b4a0-ec7ba323db2f",
                "name": "Adriele Alessandra Flores Sobrinho"
            },
            "unit": {
                "id": "a351a0d5-614f-4523-888d-75d0aef06714",
                "name": "Noa Flores",
                "abbreviation": "Sr. Martinho Benites Sobrinho"
            },
            "image": {
                "id": null,
                "url": null
            },
            "epi_type": null,
            "description": "Velit rerum sed odit libero sunt facere totam.",
            "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 g3VcZbD6kv1a4hEfd8aP6e5

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


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

Example response (200):


{
    "data": {
        "id": "b24c6572-5c9e-374f-931d-c1ff61b97968",
        "name": "Dr. Elaine Salas",
        "code": "PRD-621299",
        "stock": 2923,
        "product_family": {
            "id": "a351a0d5-69d3-42bd-b3c9-9c631d4bde1b",
            "name": "Cezar Flores"
        },
        "product_brand": {
            "id": "a351a0d5-6bb2-49cc-a398-b6a9231d6260",
            "name": "Sr. Carlos Ramos"
        },
        "unit": {
            "id": "a351a0d5-6d79-4250-a6d7-61e617d1d4bf",
            "name": "Srta. Adriana Uchoa Verdugo Neto",
            "abbreviation": "Talita da Cruz Perez"
        },
        "image": {
            "id": null,
            "url": null
        },
        "epi_type": null,
        "description": "Qui consequuntur commodi sed iste.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/products/{id}

Headers

Authorization        

Example: Bearer VD6a3e84bac5dPv6gZEhkf1

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: est

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 e3Va4Pa1vE6ZkcbDg5dhf68" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"product_family_id\": \"5e3a2b94-2f3e-3b2a-b159-0c4a4c0f571a\",
    \"product_brand_id\": \"14ad760b-fd97-381d-95d9-0b2dcf10bf69\",
    \"unit_id\": \"488211c9-a97b-3086-9746-559b0da8d814\",
    \"description\": \"Example Description\",
    \"stock\": 1
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/products"
);

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

let body = {
    "name": "Example Name",
    "product_family_id": "5e3a2b94-2f3e-3b2a-b159-0c4a4c0f571a",
    "product_brand_id": "14ad760b-fd97-381d-95d9-0b2dcf10bf69",
    "unit_id": "488211c9-a97b-3086-9746-559b0da8d814",
    "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 e3Va4Pa1vE6ZkcbDg5dhf68

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: 5e3a2b94-2f3e-3b2a-b159-0c4a4c0f571a

product_brand_id   string     

Marca do Produto. The uuid of an existing record in the product_brands table. Example: 14ad760b-fd97-381d-95d9-0b2dcf10bf69

unit_id   string     

Unidade. The uuid of an existing record in the units table. Example: 488211c9-a97b-3086-9746-559b0da8d814

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 8g4d6hvPV3kefa6cZ1D5Eba" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"product_family_id\": \"9a8c0f4f-dda5-3bed-bcd4-0081728fecb5\",
    \"product_brand_id\": \"c53ebef8-e1db-357f-b184-7e5ca2690a75\",
    \"unit_id\": \"eb781659-1e58-3721-861a-604fd57c13d7\",
    \"stock\": 1,
    \"description\": \"Example Description\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/products/1"
);

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

let body = {
    "name": "Example Name",
    "product_family_id": "9a8c0f4f-dda5-3bed-bcd4-0081728fecb5",
    "product_brand_id": "c53ebef8-e1db-357f-b184-7e5ca2690a75",
    "unit_id": "eb781659-1e58-3721-861a-604fd57c13d7",
    "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 8g4d6hvPV3kefa6cZ1D5Eba

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

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: 9a8c0f4f-dda5-3bed-bcd4-0081728fecb5

product_brand_id   string  optional    

Marca do Produto. The uuid of an existing record in the product_brands table. Example: c53ebef8-e1db-357f-b184-7e5ca2690a75

unit_id   string  optional    

Unidade. The uuid of an existing record in the units table. Example: eb781659-1e58-3721-861a-604fd57c13d7

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: rerum

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/183a3fd4-c4f5-3262-820f-cc6f6682b536/versions" \
    --header "Authorization: Bearer 81cZ63egbdaE465PfakDVvh" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"notes\": \"Example Notes\",
    \"responsible_user_id\": \"db1b6e6a-140e-33f8-9aa2-cf0f1bdfade6\",
    \"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/183a3fd4-c4f5-3262-820f-cc6f6682b536/versions"
);

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

let body = {
    "notes": "Example Notes",
    "responsible_user_id": "db1b6e6a-140e-33f8-9aa2-cf0f1bdfade6",
    "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 81cZ63egbdaE465PfakDVvh

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

projectUuid   string     

Project UUID Example: 183a3fd4-c4f5-3262-820f-cc6f6682b536

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: db1b6e6a-140e-33f8-9aa2-cf0f1bdfade6

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/5f0e41e9-4ec0-3cba-8ca5-bcd41eee3b12/versions" \
    --header "Authorization: Bearer V34Pachfvk6da1b8Eg6D5Ze" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/projects/5f0e41e9-4ec0-3cba-8ca5-bcd41eee3b12/versions"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

projectUuid   string     

Project UUID Example: 5f0e41e9-4ec0-3cba-8ca5-bcd41eee3b12

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/a80a582c-aa59-3595-ad2f-e077255c5f5f" \
    --header "Authorization: Bearer E684Zgd3keVabD1c56Pfahv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/a80a582c-aa59-3595-ad2f-e077255c5f5f"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: a80a582c-aa59-3595-ad2f-e077255c5f5f

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/63d54a2f-ad9d-3f11-b710-92c544e70cc2/download" \
    --header "Authorization: Bearer a5PE4d1kbhafeZV68vD36cg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/63d54a2f-ad9d-3f11-b710-92c544e70cc2/download"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: 63d54a2f-ad9d-3f11-b710-92c544e70cc2

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/320962dc-369f-3f28-a458-c16e0b726a99/restore" \
    --header "Authorization: Bearer dc3DhEVkeg4a61fa856bPZv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/320962dc-369f-3f28-a458-c16e0b726a99/restore"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: 320962dc-369f-3f28-a458-c16e0b726a99

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/6bbb3da3-d416-3bb6-aad4-c29c57c5d275" \
    --header "Authorization: Bearer 563DkavbgdZf8PcVa64h1eE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/6bbb3da3-d416-3bb6-aad4-c29c57c5d275"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: 6bbb3da3-d416-3bb6-aad4-c29c57c5d275

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=07a639ca-a4b1-3a49-96ba-24c05661609b&work_id=37876633-2f82-3719-ba6d-3ca0673fa04b&status_id=34a09a84-d493-3375-8996-113e5fd3aee2&responsible_id=86797f82-da33-38af-afe7-3a24d25e11cc" \
    --header "Authorization: Bearer VZ6fcv4akd13h6aPegE5bD8" \
    --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": "07a639ca-a4b1-3a49-96ba-24c05661609b",
    "work_id": "37876633-2f82-3719-ba6d-3ca0673fa04b",
    "status_id": "34a09a84-d493-3375-8996-113e5fd3aee2",
    "responsible_id": "86797f82-da33-38af-afe7-3a24d25e11cc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "e79dbeb0-3304-31dd-9850-f7be27244a78",
            "name": "Nihil culpa et",
            "description": "Expedita id iste ex et modi.",
            "current_version": 1,
            "file": {
                "path": "projects/d76af7d8-6c1a-3375-95b7-80dc381ab9cd.pdf",
                "size": "3221187",
                "extension": "pdf"
            },
            "discipline": {
                "id": "a351a0da-1b29-4ceb-97b6-7d38344c8305",
                "name": "Dignissimos",
                "code": "ZSD"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "c0571b74-f59f-342e-8c69-155281feebf2",
            "name": "Voluptatem eligendi ea",
            "description": "Et dolor qui quo accusamus tenetur praesentium.",
            "current_version": 1,
            "file": {
                "path": "projects/35b411c6-27d9-3042-9b8c-cf3ce3338bb0.pdf",
                "size": "4732433",
                "extension": "pdf"
            },
            "discipline": {
                "id": "a351a0da-20c3-4a18-8c9d-ebbac67e992a",
                "name": "Aut",
                "code": "CLW"
            },
            "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 VZ6fcv4akd13h6aPegE5bD8

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: 07a639ca-a4b1-3a49-96ba-24c05661609b

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: 37876633-2f82-3719-ba6d-3ca0673fa04b

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: 34a09a84-d493-3375-8996-113e5fd3aee2

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: 86797f82-da33-38af-afe7-3a24d25e11cc

Show project

requires authentication project show

Show a project

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

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


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

Example response (200):


{
    "data": {
        "id": "0e7b6bd4-aa79-3e77-a64b-70ff043e9cbc",
        "name": "Nobis illum neque",
        "description": "Molestias sunt maxime soluta laudantium.",
        "current_version": 1,
        "file": {
            "path": "projects/51a5efe8-bebe-3aa6-b652-5a93e4abdf47.pdf",
            "size": "716574",
            "extension": "pdf"
        },
        "discipline": {
            "id": "a351a0da-28ee-41f9-9d37-f941029a2643",
            "name": "Suscipit",
            "code": "CNK"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/projects/{id}

Headers

Authorization        

Example: Bearer 86f5v4adbceVg1kD6EhZP3a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the project. Example: 17

project   string     

Project UUID Example: ut

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 3g86ZVPvbaehd1k54aE6fDc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"discipline_id\": \"7f98c5c5-c700-3969-9d57-28cfd2272a48\",
    \"work_id\": \"2a8afb94-bc91-364a-93b1-53025c234d5d\",
    \"responsible_user_id\": \"086a0caa-cdf0-3dbe-9d98-293da41bfd3d\",
    \"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 3g86ZVPvbaehd1k54aE6fDc",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "discipline_id": "7f98c5c5-c700-3969-9d57-28cfd2272a48",
    "work_id": "2a8afb94-bc91-364a-93b1-53025c234d5d",
    "responsible_user_id": "086a0caa-cdf0-3dbe-9d98-293da41bfd3d",
    "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 3g86ZVPvbaehd1k54aE6fDc

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: 7f98c5c5-c700-3969-9d57-28cfd2272a48

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: 2a8afb94-bc91-364a-93b1-53025c234d5d

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: 086a0caa-cdf0-3dbe-9d98-293da41bfd3d

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/3" \
    --header "Authorization: Bearer v68fg3bEVaah1Zc4eP65Ddk" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"discipline_id\": \"5d2ef72e-561e-3fd6-b3ed-a17b93d1a624\",
    \"work_id\": \"e634fa54-4341-36d8-be8d-c851870cfe01\",
    \"responsible_user_id\": \"00828a4c-f0a7-3145-9c1a-027981b7af69\",
    \"status_id\": \"981edb7e-e986-3dd8-93aa-72c7d17bd7e2\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/projects/3"
);

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

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "discipline_id": "5d2ef72e-561e-3fd6-b3ed-a17b93d1a624",
    "work_id": "e634fa54-4341-36d8-be8d-c851870cfe01",
    "responsible_user_id": "00828a4c-f0a7-3145-9c1a-027981b7af69",
    "status_id": "981edb7e-e986-3dd8-93aa-72c7d17bd7e2"
};

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 v68fg3bEVaah1Zc4eP65Ddk

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the project. Example: 3

project   string     

Project UUID Example: excepturi

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: 5d2ef72e-561e-3fd6-b3ed-a17b93d1a624

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: e634fa54-4341-36d8-be8d-c851870cfe01

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: 00828a4c-f0a7-3145-9c1a-027981b7af69

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: 981edb7e-e986-3dd8-93aa-72c7d17bd7e2

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

project   string     

Project UUID Example: ab

Reports

Endpoints for reports

Generate RDO PDF

requires authentication daily-log show

Dispatches async PDF generation. Frontend receives notification via Pusher when ready.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/reports/daily-log" \
    --header "Authorization: Bearer vcgPZa16k5eaEDbVh6d43f8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"daily_log\": \"accusantium\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/daily-log"
);

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

let body = {
    "daily_log": "accusantium"
};

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 vcgPZa16k5eaEDbVh6d43f8

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

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 vPh85Egc46bZ1kaDfV36ade" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"employee\": \"commodi\",
    \"kit_uuid\": \"b40bcf94-8188-3b64-a2f4-7a513c0c0c2e\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/epi-term"
);

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

let body = {
    "employee": "commodi",
    "kit_uuid": "b40bcf94-8188-3b64-a2f4-7a513c0c0c2e"
};

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 vPh85Egc46bZ1kaDfV36ade

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

employee   string     

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

kit_uuid   string     

O campo value deve ser um UUID válido. Example: b40bcf94-8188-3b64-a2f4-7a513c0c0c2e

Generate payroll sheets PDF

requires authentication No specific permission required

Gera o PDF das folhas cuja data de pagamento cai no período, com os itens por pessoa e obra e os subtotais por obra e por forma de pagamento. Folha ainda em rascunho sai marcada como não conferida. A geração é assíncrona: o front é avisado por Pusher quando fica pronto.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/reports/payroll-sheet" \
    --header "Authorization: Bearer 6f6Vg458abZ3akhdevcP1DE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"start\": \"2026-11-26\",
    \"end\": \"2107-11-18\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/payroll-sheet"
);

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

let body = {
    "start": "2026-11-26",
    "end": "2107-11-18"
};

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

Example response (202):


{
    "message": "PDF da folha sendo gerado. Você será notificado quando estiver pronto.",
    "channel": "reports.uuid",
    "event": "pdf-report.completed"
}
 

Request      

GET api/reports/payroll-sheet

Headers

Authorization        

Example: Bearer 6f6Vg458abZ3akhdevcP1DE

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

start   string     

Must be a valid date in the format Y-m-d. Example: 2026-11-26

end   string     

Must be a valid date in the format Y-m-d. O campo value deve ser uma data posterior ou igual a start. Example: 2107-11-18

Generate day payments Excel

requires authentication payroll pay

Gera a planilha de "Pagamentos do dia": uma linha por item, com favorecido, documento, chave PIX, obra, centro de custo, folha, forma, valor (diária mais acréscimos) e situação. Sem date, usa o dia de hoje. A geração é assíncrona: o front é avisado por Pusher quando fica pronta.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/reports/payroll-day/excel" \
    --header "Authorization: Bearer bP6h1ea6ak85EdVfvcZ3g4D" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date\": \"2026-11-26\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/payroll-day/excel"
);

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

let body = {
    "date": "2026-11-26"
};

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

Example response (202):


{
    "message": "Planilha sendo gerada. Você será notificado quando estiver pronta.",
    "channel": "reports.uuid",
    "event": "excel-report.completed"
}
 

Request      

GET api/reports/payroll-day/excel

Headers

Authorization        

Example: Bearer bP6h1ea6ak85EdVfvcZ3g4D

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

date   string     

Must be a valid date in the format Y-m-d. Example: 2026-11-26

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 ha6kb813Zv6Df5VgaEd4cPe" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"employee\": \"rerum\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/employee-sheet"
);

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

let body = {
    "employee": "rerum"
};

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 ha6kb813Zv6Df5VgaEd4cPe

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

employee   string     

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

Cost center panel

requires authentication cost-center report

Totais por centro de custo no período, somados pela árvore. Devolve dois blocos declarados e separados: desembolso (fecha com o caixa e o banco) e custo apropriado por obra. Os dois não se somam — material comprado num mês e entregue em outro aparece em cada bloco no seu momento.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/reports/cost-center?date_start=2026-11-01&date_end=2026-11-30&works[]=a4a5b137-d390-3bc0-b853-4d78d25f8bf1&cost_centers[]=d4159869-06f1-3913-875b-ffdcb61dca94&format=xlsx" \
    --header "Authorization: Bearer a66vkf4da1ZPE5Veg3b8chD" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/cost-center"
);

const params = {
    "date_start": "2026-11-01",
    "date_end": "2026-11-30",
    "works[0]": "a4a5b137-d390-3bc0-b853-4d78d25f8bf1",
    "cost_centers[0]": "d4159869-06f1-3913-875b-ffdcb61dca94",
    "format": "xlsx",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/reports/cost-center

Headers

Authorization        

Example: Bearer a66vkf4da1ZPE5Veg3b8chD

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

date_start   string     

Início do período. Must be a valid date in the format Y-m-d. Example: 2026-11-01

date_end   string     

Fim do período. Must be a valid date in the format Y-m-d. O campo value deve ser uma data posterior ou igual a date_start. Example: 2026-11-30

works   string[]  optional    

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

cost_centers   string[]  optional    

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

format   string  optional    

Só na exportação: xlsx (padrão) ou csv. Example: xlsx

Must be one of:
  • xlsx
  • csv

Cost center entries

requires authentication cost-center report

Lançamentos que formam um total do painel, paginados e em ordem de data. O centro informado inclui a subárvore, então clicar no total de um grupo lista o que veio dos filhos também.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/reports/cost-center/entries?search=commodi&sort_by=date&sort_desc=1&per_page=16" \
    --header "Authorization: Bearer aZd1hVf4D3g6v6Pbe8a5cEk" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_start\": \"2026-11-26\",
    \"date_end\": \"2090-01-05\",
    \"block\": \"work_cost\",
    \"cost_center_id\": \"e63a2019-793b-362e-9cfc-c03ce2317ba1\",
    \"without_cost_center\": false,
    \"type\": \"labor\",
    \"per_page\": 9,
    \"search\": \"zhwblidtaiilftobua\",
    \"sort_by\": \"amount\",
    \"sort_desc\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/cost-center/entries"
);

const params = {
    "search": "commodi",
    "sort_by": "date",
    "sort_desc": "1",
    "per_page": "16",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

let body = {
    "date_start": "2026-11-26",
    "date_end": "2090-01-05",
    "block": "work_cost",
    "cost_center_id": "e63a2019-793b-362e-9cfc-c03ce2317ba1",
    "without_cost_center": false,
    "type": "labor",
    "per_page": 9,
    "search": "zhwblidtaiilftobua",
    "sort_by": "amount",
    "sort_desc": true
};

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/reports/cost-center/entries

Headers

Authorization        

Example: Bearer aZd1hVf4D3g6v6Pbe8a5cEk

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

search   string  optional    

Texto livre em descrição, código, obra e fornecedor/recebedor, sem distinguir caixa nem acento. O total da paginação reflete a busca. Example: commodi

sort_by   string  optional    

date ou amount. Padrão: date. Example: date

Must be one of:
  • date
  • amount
sort_desc   boolean  optional    

Ordem decrescente. Padrão: 1. Example: true

per_page   integer  optional    

Itens por página, até 100. Padrão: 10. Example: 16

Body Parameters

date_start   string     

Must be a valid date in the format Y-m-d. Example: 2026-11-26

date_end   string     

Must be a valid date in the format Y-m-d. O campo value deve ser uma data posterior ou igual a date_start. Example: 2090-01-05

block   string     

Example: work_cost

Must be one of:
  • disbursement
  • work_cost
cost_center_id   string  optional    

This field is required when without_cost_center is not present. O campo value deve ser um UUID válido. The uuid of an existing record in the cost_centers table. Example: e63a2019-793b-362e-9cfc-c03ce2317ba1

without_cost_center   boolean  optional    

This field is required when cost_center_id is not present. Example: false

type   string  optional    

Example: labor

Must be one of:
  • material
  • labor
  • other
per_page   integer  optional    

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

search   string  optional    

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

sort_by   string  optional    

Example: amount

Must be one of:
  • date
  • amount
sort_desc   boolean  optional    

Example: true

Export cost center panel

requires authentication cost-center report

Gera a planilha do painel com os filtros atuais. XLSX sai com três abas (um total por bloco, mais os lançamentos); CSV sai com as mesmas três coisas em seções. O arquivo é gerado em fila e chega por notificação.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/reports/cost-center/excel?date_start=2026-11-01&date_end=2026-11-30&works[]=9dbc3e83-96be-3952-8735-43aaf35537b1&cost_centers[]=3d75dd7d-2bbd-369d-8127-d530fe063510&format=xlsx" \
    --header "Authorization: Bearer eVv184fE3DkaaPZdch6b5g6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/cost-center/excel"
);

const params = {
    "date_start": "2026-11-01",
    "date_end": "2026-11-30",
    "works[0]": "9dbc3e83-96be-3952-8735-43aaf35537b1",
    "cost_centers[0]": "3d75dd7d-2bbd-369d-8127-d530fe063510",
    "format": "xlsx",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (202):


{
    "message": "Relatório sendo gerado. Você será notificado quando estiver pronto.",
    "channel": "reports.{uuid}",
    "event": "excel-report.completed"
}
 

Request      

GET api/reports/cost-center/excel

Headers

Authorization        

Example: Bearer eVv184fE3DkaaPZdch6b5g6

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

date_start   string     

Início do período. Must be a valid date in the format Y-m-d. Example: 2026-11-01

date_end   string     

Fim do período. Must be a valid date in the format Y-m-d. O campo value deve ser uma data posterior ou igual a date_start. Example: 2026-11-30

works   string[]  optional    

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

cost_centers   string[]  optional    

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

format   string  optional    

Só na exportação: xlsx (padrão) ou csv. Example: xlsx

Must be one of:
  • xlsx
  • csv

Export Cash Flow to Excel

requires authentication No specific permission required

Dispatches async Excel generation. Frontend receives notification via Pusher when ready.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/reports/cash-flow/excel?q=iste&type=entrada&description=Fugiat+exercitationem+enim+nulla+omnis+magni+consequuntur.&categories[]=55627a62-9cae-39bb-90ff-78842ad6970d&exclude_categories[]=ed677033-271f-33e2-816e-60e358a16ca2&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=1d89ab63-6928-3c26-ae62-63fb6a415524&customers[]=83c6063f-f6c3-30b4-93c0-d064bb5aec45&suppliers[]=35bd4f13-f466-38a0-8589-b12ca940247a&cash_session=55d08b37-1573-310e-82a6-85b28677810e&works[]=de0bd77e-e2ab-3a19-8091-cf2fa4b7ea74" \
    --header "Authorization: Bearer f5VbveaZcgE641d8aDP36kh" \
    --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": "iste",
    "type": "entrada",
    "description": "Fugiat exercitationem enim nulla omnis magni consequuntur.",
    "categories[0]": "55627a62-9cae-39bb-90ff-78842ad6970d",
    "exclude_categories[0]": "ed677033-271f-33e2-816e-60e358a16ca2",
    "date_start": "2026-01-01",
    "date_end": "2026-12-31",
    "bank_accounts[0]": "1d89ab63-6928-3c26-ae62-63fb6a415524",
    "customers[0]": "83c6063f-f6c3-30b4-93c0-d064bb5aec45",
    "suppliers[0]": "35bd4f13-f466-38a0-8589-b12ca940247a",
    "cash_session": "55d08b37-1573-310e-82a6-85b28677810e",
    "works[0]": "de0bd77e-e2ab-3a19-8091-cf2fa4b7ea74",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

q   string  optional    

Example: iste

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: Fugiat exercitationem enim nulla omnis magni consequuntur.

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: 55d08b37-1573-310e-82a6-85b28677810e

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=earum&type=entrada&description=Consequatur+et+in+debitis+illum+quisquam+et.&categories[]=fe9f5c00-376d-3b4d-b093-14f9d0fe1327&exclude_categories[]=83b387f2-0e5d-3f8d-b24e-7a74dd8feab6&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=433596bc-2f99-3f61-9454-266f30511af1&customers[]=ef1b7432-9dd4-3fec-aa93-06cc50fdaf8a&suppliers[]=a29dbc02-1e77-3202-a89e-aac28d448466&cash_session=6d4080bf-2c93-3c3d-9c77-5c339719804a&works[]=25f8224b-dcc1-33f8-b06b-e3692b17a48a" \
    --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": "earum",
    "type": "entrada",
    "description": "Consequatur et in debitis illum quisquam et.",
    "categories[0]": "fe9f5c00-376d-3b4d-b093-14f9d0fe1327",
    "exclude_categories[0]": "83b387f2-0e5d-3f8d-b24e-7a74dd8feab6",
    "date_start": "2026-01-01",
    "date_end": "2026-12-31",
    "bank_accounts[0]": "433596bc-2f99-3f61-9454-266f30511af1",
    "customers[0]": "ef1b7432-9dd4-3fec-aa93-06cc50fdaf8a",
    "suppliers[0]": "a29dbc02-1e77-3202-a89e-aac28d448466",
    "cash_session": "6d4080bf-2c93-3c3d-9c77-5c339719804a",
    "works[0]": "25f8224b-dcc1-33f8-b06b-e3692b17a48a",
};
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: earum

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: Consequatur et in debitis illum quisquam et.

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: 6d4080bf-2c93-3c3d-9c77-5c339719804a

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "d60667d5-8d7f-3ae3-9fd1-1cb50e18f3d9",
            "name": "nulla et",
            "slug": null,
            "description": "Omnis laboriosam impedit nostrum eum amet. Quod enim eius ut ad quia adipisci cupiditate. Qui consequatur blanditiis eaque veniam. Enim autem a ipsa distinctio.",
            "abbreviation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "df33d01f-7e05-32ef-aca8-f0c586d804b9",
            "name": "pariatur ut",
            "slug": null,
            "description": "Aut voluptatem natus neque perspiciatis nulla eum molestias. Eum quidem ea dolorem quis alias qui provident. Adipisci reiciendis et illum molestias voluptatem.",
            "abbreviation": "lzq",
            "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 PZ5e46D8kdaEhgvV1a6bfc3

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

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

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


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

Example response (200):


{
    "data": {
        "id": "535e8906-d949-3e13-bad2-6635f5a2a6f7",
        "name": "ut sit",
        "slug": null,
        "description": null,
        "abbreviation": "pnw",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/sectors/{id}

Headers

Authorization        

Example: Bearer 4aDPZEV31ck56hbagd68vef

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 11

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 8

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 8

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


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

Example response (200):


{
    "data": [
        {
            "id": "3daa8810-c386-38e5-aaf7-76155b654031",
            "name": "Berenice Sawayn",
            "username": "uorn",
            "email": "berge.laila@example.net",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "9e88a637-0416-3db4-8bdc-e3eb70e1dbac",
            "name": "Karolann Glover",
            "username": "altenwerth.esta",
            "email": "elenor28@example.net",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/sectors/{sector}/users

Headers

Authorization        

Example: Bearer gv6Vab8PE4afk1h5e3cDd6Z

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 ZEV61d653eDvcaa8hfk4bPg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"721eb940-729e-36a1-9f68-552f790d30ed\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/attach"
);

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

let body = {
    "users": [
        "721eb940-729e-36a1-9f68-552f790d30ed"
    ]
};

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 ZEV61d653eDvcaa8hfk4bPg

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 dPVfh3k5g41EebvaDc6a68Z" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"f09aad12-0fef-34e3-9f30-f312ea5ecd77\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/detach"
);

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

let body = {
    "users": [
        "f09aad12-0fef-34e3-9f30-f312ea5ecd77"
    ]
};

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 dPVfh3k5g41EebvaDc6a68Z

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 5PD3decvE1V8ab4hfZk6g6a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"f49e4f6c-553d-357d-b0ad-de04ea223152\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/sync"
);

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

let body = {
    "users": [
        "f49e4f6c-553d-357d-b0ad-de04ea223152"
    ]
};

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 5PD3decvE1V8ab4hfZk6g6a

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


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

Example response (200):


{
    "data": [
        {
            "name": "voluptatibus laborum",
            "slug": "magnam-minima-est-suscipit-non-nostrum"
        },
        {
            "name": "facilis ut",
            "slug": "earum-dolorem-consequuntur-in-quidem-iste"
        }
    ]
}
 

Request      

GET api/status-modules

Headers

Authorization        

Example: Bearer fPVdv6c8ehgE345b16DaZak

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


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

Example response (200):


{
    "data": [
        {
            "id": "77d01942-dccf-3a2f-bd4d-d5182b7f7487",
            "slug": null,
            "name": null,
            "description": "Sr. Cristóvão Maicon de Aguiar",
            "abbreviation": "dolorem",
            "color": "#6f29ac",
            "text_color": "#61d7a9",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "632fce92-f289-30a4-aba7-af86c3018693",
            "slug": null,
            "name": null,
            "description": "Vanessa Zamana Galhardo",
            "abbreviation": "facilis",
            "color": "#6866cc",
            "text_color": "#9e3523",
            "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 614dhcaf8ebagEZv3Vk5PD6

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 c686ae4PDkE1Vbdva5Zhf3g" \
    --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\": \"8b15225a-9f9f-392a-b4bc-dd75f5f62517\",
    \"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 c686ae4PDkE1Vbdva5Zhf3g",
    "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": "8b15225a-9f9f-392a-b4bc-dd75f5f62517",
    "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 c686ae4PDkE1Vbdva5Zhf3g

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: 8b15225a-9f9f-392a-b4bc-dd75f5f62517

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


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

Example response (200):


{
    "data": {
        "id": "dde24b85-c3c1-3544-94df-d39176a80dd5",
        "slug": null,
        "name": null,
        "description": "Aurora Quintana Filho",
        "abbreviation": "et",
        "color": "#e70498",
        "text_color": "#98ee3c",
        "module": {
            "name": "Solicitação de Produtos",
            "slug": "product_request"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/statuses/{id}

Headers

Authorization        

Example: Bearer V8e3456b1ZPc6gadEDvahkf

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 6vdk18agZ6ecPb4hD5Ef3aV" \
    --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\": \"22adb7c1-b3e0-3846-83c0-2222a47ae297\",
    \"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 6vdk18agZ6ecPb4hD5Ef3aV",
    "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": "22adb7c1-b3e0-3846-83c0-2222a47ae297",
    "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 6vdk18agZ6ecPb4hD5Ef3aV

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: 22adb7c1-b3e0-3846-83c0-2222a47ae297

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "b509b7af-4b8c-3702-8c71-bb15376ca321",
            "quantity": 876.6684,
            "min_quantity": null,
            "max_quantity": null,
            "below_minimum": false,
            "above_maximum": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "0c80b685-51c5-3125-ad68-7d3978823bf5",
            "quantity": 659.6211,
            "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 5kePd4Zh6a6gvVfb3Ea1c8D

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


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

Example response (200):


{
    "data": [
        {
            "id": "9087bb6f-d779-3a74-b765-57ac66812d26",
            "name": "Estoque Quintana Comercial Ltda.",
            "module": "work",
            "is_active": true,
            "is_main": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "50270299-4957-3fbe-a17c-aedac32fd38e",
            "name": "Estoque Galindo e D'ávila",
            "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 b14Ddk86PahgE6eaVcvZ5f3

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 h6gEv3eaZ86cfd4DP51Vkab" \
    --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 h6gEv3eaZ86cfd4DP51Vkab",
    "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": "68f80a95-cbac-3783-b076-bf1cf6705535",
        "name": "Estoque Barros e Souza e Associados",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/stocks

Headers

Authorization        

Example: Bearer h6gEv3eaZ86cfd4DP51Vkab

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


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

Example response (200):


{
    "data": {
        "id": "a80ae1c8-c95d-33c5-8fa4-8fe65630b6cd",
        "name": "Estoque Amaral Comercial Ltda.",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/stocks/main

Headers

Authorization        

Example: Bearer hbZaVgd4kcafE56ePv8D613

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


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

Example response (200):


{
    "data": {
        "id": "1c2964d4-7d10-3285-bdce-41835002ff25",
        "name": "Estoque Neves e Jimenes S.A.",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/stocks/{id}

Headers

Authorization        

Example: Bearer fh6c1dbZ86D4EP5a3vagkeV

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 Dbkgv8Vd3aaP4Zc6Ef5eh16" \
    --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 Dbkgv8Vd3aaP4Zc6Ef5eh16",
    "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": "b82ac35c-a41b-36c6-b34c-1961e8fc85c5",
        "name": "Estoque Sanches e Associados",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

PUT api/stocks/{id}

Headers

Authorization        

Example: Bearer Dbkgv8Vd3aaP4Zc6Ef5eh16

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "03b0174d-e559-3e6b-8194-43ad6b1d8d04",
            "quantity": 461.6318,
            "min_quantity": null,
            "max_quantity": null,
            "below_minimum": false,
            "above_maximum": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "c5fe33fd-5052-36b3-b15c-75292cf19390",
            "quantity": 733.5689,
            "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 3kZ6ab14Dcfhav8gdePEV65

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

const headers = {
    "Authorization": "Bearer bD3kEaPc54eZhd6v186agVf",
    "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": "bf28f96c-5243-3e37-8afa-f08e386bdba9",
        "quantity": 45.3862,
        "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 bD3kEaPc54eZhd6v186agVf

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

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "c0615148-8eb0-30d5-b075-0514ecd7e35a",
            "code": "MOV-330436",
            "type": "devolução",
            "type_name": "RETURN",
            "is_entry": true,
            "is_exit": false,
            "quantity": 6.1281,
            "previous_quantity": 435.6484,
            "new_quantity": 441.7765,
            "reason": "Eaque sequi rerum ut autem.",
            "movement_date": "2026-11-26T12:57:09.000000Z",
            "created_at": null
        },
        {
            "id": "088dc71e-79e8-3287-85e6-c7ac29ca3452",
            "code": "MOV-415823",
            "type": "produção",
            "type_name": "PRODUCTION",
            "is_entry": true,
            "is_exit": false,
            "quantity": 47.0076,
            "previous_quantity": 432.3628,
            "new_quantity": 479.3704,
            "reason": null,
            "movement_date": "2026-11-04T14:54:46.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 VhDe8avd51bg43fEZac66Pk

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 5V3Za4a68dcEe1bvfkhDP6g" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"98eaefa6-bd6b-30e6-ac95-a27e8a7db6a2\",
    \"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 5V3Za4a68dcEe1bvfkhDP6g",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "98eaefa6-bd6b-30e6-ac95-a27e8a7db6a2",
    "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": "a4378dc4-ee9f-3c33-9df1-1bdd0ecf2007",
        "code": "MOV-074845",
        "type": "ajuste entrada",
        "type_name": "ADJUSTMENT_IN",
        "is_entry": true,
        "is_exit": false,
        "quantity": 47.7889,
        "previous_quantity": 696.4348,
        "new_quantity": 744.2237,
        "reason": null,
        "movement_date": "2026-11-03T11:44:09.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stocks/{stock_id}/movements

Headers

Authorization        

Example: Bearer 5V3Za4a68dcEe1bvfkhDP6g

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: 98eaefa6-bd6b-30e6-ac95-a27e8a7db6a2

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 6k5daePf3c48vDgZb16EVha" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"f154ff59-dfdc-3fb8-85b3-22b7bf5b8b3e\",
    \"destination_stock_id\": \"4c5421de-907e-3b97-a73d-25f7d2b7b280\",
    \"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 6k5daePf3c48vDgZb16EVha",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "f154ff59-dfdc-3fb8-85b3-22b7bf5b8b3e",
    "destination_stock_id": "4c5421de-907e-3b97-a73d-25f7d2b7b280",
    "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": "09d6aa3d-11e4-3590-81a0-b52124aa857b",
        "code": "MOV-528322",
        "type": "perda",
        "type_name": "LOSS",
        "is_entry": false,
        "is_exit": true,
        "quantity": 44.6475,
        "previous_quantity": 848.0144,
        "new_quantity": 803.3669,
        "reason": null,
        "movement_date": "2026-11-13T18:47:03.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stocks/{stock}/movements/transfer

Headers

Authorization        

Example: Bearer 6k5daePf3c48vDgZb16EVha

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: f154ff59-dfdc-3fb8-85b3-22b7bf5b8b3e

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: 4c5421de-907e-3b97-a73d-25f7d2b7b280

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 hvDVd6Zc6P54e8E1kbafg3a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"a9c9a758-3a32-3349-83f3-f5564a91d2b9\",
    \"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 hvDVd6Zc6P54e8E1kbafg3a",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "a9c9a758-3a32-3349-83f3-f5564a91d2b9",
    "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": "9ba5a8ad-21ea-31f3-8bbc-64e518c591d9",
        "code": "MOV-829411",
        "type": "ajuste saída",
        "type_name": "ADJUSTMENT_OUT",
        "is_entry": false,
        "is_exit": true,
        "quantity": 37.1507,
        "previous_quantity": 17.146,
        "new_quantity": 0,
        "reason": "Voluptatem qui distinctio possimus voluptatem suscipit rerum quia.",
        "movement_date": "2026-10-28T10:11:48.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stocks/{stock}/movements/inventory

Headers

Authorization        

Example: Bearer hvDVd6Zc6P54e8E1kbafg3a

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: a9c9a758-3a32-3349-83f3-f5564a91d2b9

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 P6VZevdba6afg3c8154DkhE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"100300da-d667-3487-b90e-bf1ad6c29007\",
    \"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 P6VZevdba6afg3c8154DkhE",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "100300da-d667-3487-b90e-bf1ad6c29007",
    "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": "b3c4057a-e966-3374-bffa-91d9c6e2bcfc",
        "code": "MOV-349564",
        "type": "perda",
        "type_name": "LOSS",
        "is_entry": false,
        "is_exit": true,
        "quantity": 30.3213,
        "previous_quantity": 519.1168,
        "new_quantity": 488.7955,
        "reason": null,
        "movement_date": "2026-11-21T13:07:34.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stock-movements/purchase

Headers

Authorization        

Example: Bearer P6VZevdba6afg3c8154DkhE

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: 100300da-d667-3487-b90e-bf1ad6c29007

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


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

Example response (200):


{
    "data": {
        "id": "10c9f9a8-a58f-3d95-b04c-34bd46968ca6",
        "code": "MOV-354852",
        "type": "perda",
        "type_name": "LOSS",
        "is_entry": false,
        "is_exit": true,
        "quantity": 58.3693,
        "previous_quantity": 473.0099,
        "new_quantity": 414.6406,
        "reason": null,
        "movement_date": "2026-11-19T06:01:49.000000Z",
        "created_at": null
    }
}
 

Request      

GET api/stock-movements/{movement}

Headers

Authorization        

Example: Bearer aPbachZe1v6Ef3Vdgk4D685

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


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

Example response (200):


{
    "data": [
        {
            "id": "688556f0-94f1-3c66-8da3-0c8abe67d812",
            "name": "Sr. Aaron Ítalo Zamana Neto",
            "email": "flavio.bonilha@example.org",
            "phone": "(55) 4716-2347",
            "document": "30.676.825/0001-91",
            "type": "pj",
            "responsible": "Dr. Aaron Flávio Mascarenhas Jr.",
            "image": {
                "id": null,
                "url": null
            },
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            }
        },
        {
            "id": "7b43c961-4ee3-35b9-8493-a1aac51a1f38",
            "name": "Théo Evandro Rivera Jr.",
            "email": "ornela99@example.com",
            "phone": "(67) 4264-1855",
            "document": "17.410.972/0001-57",
            "type": "pj",
            "responsible": "Suzana Sofia Assunção",
            "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 d3fb8ZP64V5aevg1ackhE6D

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 84e6hgkZVcDbavPEdfa1365" \
    --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 84e6hgkZVcDbavPEdfa1365",
    "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 84e6hgkZVcDbavPEdfa1365

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


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

Example response (200):


{
    "data": {
        "id": "cfce25d6-08a5-3595-98b7-ca12827a8e04",
        "name": "Gabrielle Galhardo Rocha Sobrinho",
        "email": "pablo29@example.org",
        "phone": "(15) 3002-4668",
        "document": "55.022.450/0001-77",
        "type": "pf",
        "responsible": "Srta. Angélica Yasmin Camacho Neto",
        "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 4Dac8aP16hEfVd5Zk3beg6v

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

supplier   string     

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

List supplier bank accounts

requires authentication suppliers show

Contas e chaves PIX do fornecedor, com a favorita primeiro.

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "a351a0dc-c9fa-4c7f-a3b7-b4b12d4e99f9",
            "bank": null,
            "agency": null,
            "account": null,
            "account_type": null,
            "pix_key": "balistreri.sonia@hotmail.com",
            "favorite": false
        },
        {
            "id": "a351a0dc-cd7c-4b42-b04e-259700ed5ab3",
            "bank": null,
            "agency": null,
            "account": null,
            "account_type": null,
            "pix_key": "deion.aufderhar@gleichner.net",
            "favorite": false
        }
    ]
}
 

Request      

GET api/suppliers/{supplier_id}/bank-account

Headers

Authorization        

Example: Bearer c3P1dav8DZ6kea5fhg4bEV6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

supplier_id   integer     

The ID of the supplier. Example: 1

supplier   string     

UUID do fornecedor. Example: aspernatur

Add supplier bank account

requires authentication suppliers update

Agência e conta são opcionais: o prestador costuma ter só a chave PIX. Marcar como favorita desmarca as outras.

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/suppliers/1/bank-account" \
    --header "Authorization: Bearer Dcd5v6861f3ZaVgEPehb4ak" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bank_id\": \"a25cc4cf-5f03-3eed-aee3-0838b855d001\",
    \"agency\": \"syddbznzltpxg\",
    \"account\": \"ssftxcywdxurncvwfwlgimjkg\",
    \"account_type\": \"bknsaxikpvoromdvnrommm\",
    \"pix_key\": \"sanqdokehxwhkyurt\",
    \"favorite\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/suppliers/1/bank-account"
);

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

let body = {
    "bank_id": "a25cc4cf-5f03-3eed-aee3-0838b855d001",
    "agency": "syddbznzltpxg",
    "account": "ssftxcywdxurncvwfwlgimjkg",
    "account_type": "bknsaxikpvoromdvnrommm",
    "pix_key": "sanqdokehxwhkyurt",
    "favorite": true
};

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

Example response (201):


{
    "data": {
        "id": "a351a0dc-d673-4289-aca7-8f1735de71e3",
        "bank": null,
        "agency": null,
        "account": null,
        "account_type": null,
        "pix_key": "armando.leannon@hotmail.com",
        "favorite": false
    }
}
 

Request      

POST api/suppliers/{supplier_id}/bank-account

Headers

Authorization        

Example: Bearer Dcd5v6861f3ZaVgEPehb4ak

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

supplier_id   integer     

The ID of the supplier. Example: 1

supplier   string     

UUID do fornecedor. Example: sit

Body Parameters

bank_id   string  optional    

O campo value deve ser um UUID válido. The uuid of an existing record in the banks table. Example: a25cc4cf-5f03-3eed-aee3-0838b855d001

agency   string  optional    

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

account   string  optional    

This field is required when pix_key is not present. O campo value não pode ser superior a 255 caracteres. Example: ssftxcywdxurncvwfwlgimjkg

account_type   string  optional    

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

pix_key   string  optional    

This field is required when account is not present. O campo value não pode ser superior a 255 caracteres. Example: sanqdokehxwhkyurt

favorite   boolean  optional    

Example: true

Update supplier bank account

requires authentication suppliers update

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/suppliers/1/bank-account/eos" \
    --header "Authorization: Bearer bZ15aDgkve6P48hEfa3Vc6d" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bank_id\": \"dec4a5f9-7232-3dc9-b0e0-48b7b2aa0521\",
    \"agency\": \"sfukzumlssblpx\",
    \"account\": \"flkhrchbvhtz\",
    \"account_type\": \"jdjskkdfjkrwgm\",
    \"pix_key\": \"fcpjxmdt\",
    \"favorite\": false
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/suppliers/1/bank-account/eos"
);

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

let body = {
    "bank_id": "dec4a5f9-7232-3dc9-b0e0-48b7b2aa0521",
    "agency": "sfukzumlssblpx",
    "account": "flkhrchbvhtz",
    "account_type": "jdjskkdfjkrwgm",
    "pix_key": "fcpjxmdt",
    "favorite": false
};

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

Example response (200):


{
    "data": {
        "id": "a351a0dc-e053-46a9-89a6-95a7c4f7cd3c",
        "bank": null,
        "agency": null,
        "account": null,
        "account_type": null,
        "pix_key": "florine21@gmail.com",
        "favorite": false
    }
}
 

Request      

PUT api/suppliers/{supplier_id}/bank-account/{bankAccount}

Headers

Authorization        

Example: Bearer bZ15aDgkve6P48hEfa3Vc6d

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

supplier_id   integer     

The ID of the supplier. Example: 1

bankAccount   string     

UUID da conta. Example: eos

supplier   string     

UUID do fornecedor. Example: dolor

Body Parameters

bank_id   string  optional    

O campo value deve ser um UUID válido. The uuid of an existing record in the banks table. Example: dec4a5f9-7232-3dc9-b0e0-48b7b2aa0521

agency   string  optional    

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

account   string  optional    

This field is required when pix_key is not present. O campo value não pode ser superior a 255 caracteres. Example: flkhrchbvhtz

account_type   string  optional    

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

pix_key   string  optional    

This field is required when account is not present. O campo value não pode ser superior a 255 caracteres. Example: fcpjxmdt

favorite   boolean  optional    

Example: false

Delete supplier bank account

requires authentication suppliers update

Example request:
curl --request DELETE \
    "https://api.bs-homolog.pensou.app.br/api/suppliers/ab/bank-account/quos" \
    --header "Authorization: Bearer bZa8avV1hfP3ck6645EDdeg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/suppliers/ab/bank-account/quos"
);

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


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

Example response (200):


{
    "message": "Conta removida com sucesso."
}
 

Request      

DELETE api/suppliers/{supplier}/bank-account/{bankAccount}

Headers

Authorization        

Example: Bearer bZa8avV1hfP3ck6645EDdeg

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

supplier   string     

UUID do fornecedor. Example: ab

bankAccount   string     

UUID da conta. Example: quos

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "24b128c2-5031-3d03-a3bf-4316cf3f4d1f",
            "name": "Jonas de Freitas Lourenço",
            "description": "Perspiciatis in aut laudantium saepe ut reiciendis. Officiis sunt rerum quo rerum veritatis itaque illo quidem. Et sed sit omnis.",
            "type": "ajuste saída"
        },
        {
            "id": "df3bfacc-8a59-3a14-b816-c7c78c83c22a",
            "name": "Eliane Bezerra Valência",
            "description": "Sint aperiam alias beatae. Sit rerum soluta esse dolores aspernatur autem. Consectetur laboriosam voluptates quibusdam tenetur sint.",
            "type": "tarifa"
        }
    ],
    "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 aa8edhvcg34k5P6Ef6D1VbZ

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

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


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

Example response (200):


{
    "data": {
        "id": "8f9f2ecf-4986-3d3f-9167-a5eded4e9b76",
        "name": "Márcia Valentin Neto",
        "description": "Veritatis delectus sint sed eum. Quos aut rerum eos eos. Voluptatem molestiae ex quo dolor nemo ut omnis.",
        "type": "pagamento"
    }
}
 

Request      

GET api/transaction-categories/{transactionCategory}

Headers

Authorization        

Example: Bearer gkVZ4eh6dv8c3651EPfabDa

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: nemo

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 6583P6ZkDbdfa4vEgVhae1c" \
    --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 6583P6ZkDbdfa4vEgVhae1c",
    "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 6583P6ZkDbdfa4vEgVhae1c

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: nihil

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: ad

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


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

Example response (200):


{
    "data": [
        {
            "id": "2c637021-8e46-3227-a794-aeca001c6e6f",
            "name": "Adipisci a",
            "slug": "adipisci-a-599513",
            "description": "Eos tempore ut magnam voluptatem.",
            "icon": null,
            "color": null,
            "sort_order": 0,
            "is_active": true,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "946e1fe3-867c-3006-96f7-50b79d04e888",
            "name": "Et autem",
            "slug": "et-autem-312643",
            "description": "Iusto eligendi commodi sapiente et voluptas repellat.",
            "icon": null,
            "color": null,
            "sort_order": 0,
            "is_active": true,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/admin/tutorial-modules

Headers

Authorization        

Example: Bearer 6avZfacV4g1dbEDe5386kPh

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 PgEk36a45c8DhfVZdva6eb1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"slug\": \"Example Slug\",
    \"description\": \"Example Description\",
    \"icon\": \"Example Icon\",
    \"color\": \"Example Color\",
    \"sort_order\": 1,
    \"is_active\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules"
);

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

let body = {
    "name": "Example Name",
    "slug": "Example Slug",
    "description": "Example Description",
    "icon": "Example Icon",
    "color": "Example Color",
    "sort_order": 1,
    "is_active": true
};

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

Example response (201):


{
    "data": {
        "id": "95cf2b78-7540-3769-9c77-0764602d5ba3",
        "name": "Numquam qui",
        "slug": "numquam-qui-35954",
        "description": "Aut quia neque in.",
        "icon": null,
        "color": null,
        "sort_order": 0,
        "is_active": true,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/admin/tutorial-modules

Headers

Authorization        

Example: Bearer PgEk36a45c8DhfVZdva6eb1

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

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

slug   string  optional    

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

description   string  optional    

Descrição. Example: Example Description

icon   string  optional    

Ícone. O campo value não pode ser superior a 64 caracteres. Example: Example Icon

color   string  optional    

Cor. Must match the regex /^#[0-9a-fA-F]{6}$/. Example: Example Color

sort_order   integer  optional    

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

is_active   boolean  optional    

Ativo. Example: true

Visualizar módulo

requires authentication tutorials index

Detalhe de um módulo do catálogo

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32" \
    --header "Authorization: Bearer 1865kdgEb6PZ4Vhe3acvDaf" \
    --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 1865kdgEb6PZ4Vhe3acvDaf",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


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

Example response (200):


{
    "data": {
        "id": "8153bc08-4fd3-368b-8bf7-d3766e55841e",
        "name": "Quas earum",
        "slug": "quas-earum-392920",
        "description": "Sed voluptas distinctio consequatur ut aut et saepe.",
        "icon": null,
        "color": null,
        "sort_order": 0,
        "is_active": true,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/admin/tutorial-modules/{tutorialModule}

Headers

Authorization        

Example: Bearer 1865kdgEb6PZ4Vhe3acvDaf

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 kcZEevfa66V43Dhgabd51P8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"slug\": \"Example Slug\",
    \"description\": \"Example Description\",
    \"icon\": \"Example Icon\",
    \"color\": \"Example Color\",
    \"sort_order\": 1,
    \"is_active\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32"
);

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

let body = {
    "name": "Example Name",
    "slug": "Example Slug",
    "description": "Example Description",
    "icon": "Example Icon",
    "color": "Example Color",
    "sort_order": 1,
    "is_active": true
};

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

Example response (200):


{
    "data": {
        "id": "47954430-6365-3278-b264-0e2459ab83b5",
        "name": "Vero inventore",
        "slug": "vero-inventore-228651",
        "description": "Exercitationem repellat est consequatur sed dolores nemo.",
        "icon": null,
        "color": null,
        "sort_order": 0,
        "is_active": true,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

PUT api/admin/tutorial-modules/{tutorialModule}

Headers

Authorization        

Example: Bearer kcZEevfa66V43Dhgabd51P8

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

tutorialModule   string     

UUID do módulo Example: 019556e7-2e9f-777c-a177-30bbf0646c32

Body Parameters

name   string  optional    

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

slug   string  optional    

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

description   string  optional    

Descrição. Example: Example Description

icon   string  optional    

Ícone. O campo value não pode ser superior a 64 caracteres. Example: Example Icon

color   string  optional    

Cor. Must match the regex /^#[0-9a-fA-F]{6}$/. Example: Example Color

sort_order   integer  optional    

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

is_active   boolean  optional    

Ativo. Example: true

Remover módulo

requires authentication tutorials destroy

Remove o módulo e, junto, os tutoriais que pertenciam a ele

Example request:
curl --request DELETE \
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorial-modules/019556e7-2e9f-777c-a177-30bbf0646c32" \
    --header "Authorization: Bearer va461d6gVeb3fch8ZkDEaP5" \
    --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 va461d6gVeb3fch8ZkDEaP5",
    "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 va461d6gVeb3fch8ZkDEaP5

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[]=90b04036-f4e6-3449-99e5-c154cee0b64f&status=published" \
    --header "Authorization: Bearer v8caEVe34fgka66hbZDd1P5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials"
);

const params = {
    "sort_by": "created_at",
    "sort_desc": "1",
    "page": "1",
    "per_page": "15",
    "q": "ordem de serviço",
    "module_id[0]": "90b04036-f4e6-3449-99e5-c154cee0b64f",
    "status": "published",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "b2d1ec3c-4d13-3efe-a04a-58aa4af0b527",
            "title": "Inventore qui dolores non",
            "description": "Et et cupiditate et atque.",
            "cover_url": null,
            "status": "draft",
            "published_at": null,
            "sort_order": 0,
            "module": {
                "id": "a351a0dd-235e-4e93-8364-5257072ca035",
                "name": "Cupiditate minima",
                "slug": "cupiditate-minima-386918",
                "icon": null,
                "color": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "f06bbde4-5930-3f8b-ad59-48cfbd901247",
            "title": "Magnam dolores numquam et",
            "description": "Eum omnis sed earum natus.",
            "cover_url": null,
            "status": "draft",
            "published_at": null,
            "sort_order": 0,
            "module": {
                "id": "a351a0dd-2792-45a6-8718-113d65edda4f",
                "name": "Eos voluptatum",
                "slug": "eos-voluptatum-823901",
                "icon": null,
                "color": null
            },
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/admin/tutorials

Headers

Authorization        

Example: Bearer v8caEVe34fgka66hbZDd1P5

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

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

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

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

module_id   string[]  optional    

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

sector_id   string[]  optional    
status   string  optional    

Filtra por status (draft ou published). Example: published

Must be one of:
  • draft
  • published

Cadastrar tutorial

requires authentication tutorials store

Cria um tutorial. Nasce como rascunho e só aparece na central depois de publicado.

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials" \
    --header "Authorization: Bearer 1badeacEkPD538Zf6h6v4Vg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"module_id\": \"44fb2e11-196c-3753-a74d-5601dff98c4f\",
    \"title\": \"Example Title\",
    \"description\": \"Example Description\",
    \"cover_path\": \"Example Cover path\",
    \"sort_order\": 1,
    \"sectors\": [
        \"28258410-c8df-3994-adb2-1878371f6f22\"
    ],
    \"permissions\": [
        \"44770118-d690-313f-b2ba-afcc28e331da\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials"
);

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

let body = {
    "module_id": "44fb2e11-196c-3753-a74d-5601dff98c4f",
    "title": "Example Title",
    "description": "Example Description",
    "cover_path": "Example Cover path",
    "sort_order": 1,
    "sectors": [
        "28258410-c8df-3994-adb2-1878371f6f22"
    ],
    "permissions": [
        "44770118-d690-313f-b2ba-afcc28e331da"
    ]
};

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

Example response (201):


{
    "data": {
        "id": "b7511946-b957-3ba0-8c79-42e3b9fe0145",
        "title": "Sint saepe asperiores sed",
        "description": "Earum recusandae qui neque dolorem odit a autem.",
        "cover_url": null,
        "status": "draft",
        "published_at": null,
        "sort_order": 0,
        "module": {
            "id": "a351a0dd-314e-48c8-87d8-17c6e77dff14",
            "name": "Quisquam doloremque",
            "slug": "quisquam-doloremque-400007",
            "icon": null,
            "color": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/admin/tutorials

Headers

Authorization        

Example: Bearer 1badeacEkPD538Zf6h6v4Vg

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: 44fb2e11-196c-3753-a74d-5601dff98c4f

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

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


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

Example response (200):


{
    "data": {
        "id": "fe498060-9a3c-3438-9b6a-6100c063a8fb",
        "title": "Similique repellat quasi eveniet",
        "description": "Cupiditate consequatur iure aliquam enim.",
        "cover_url": null,
        "status": "draft",
        "published_at": null,
        "sort_order": 0,
        "module": {
            "id": "a351a0dd-3bb1-453e-a2ed-ca403d48ffa2",
            "name": "Ex rerum",
            "slug": "ex-rerum-398590",
            "icon": null,
            "color": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/admin/tutorials/{id}

Headers

Authorization        

Example: Bearer PkcVa1bda56hvDEg364Z8fe

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 f8Vba4Dcav3g1ed65EZP6kh" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"module_id\": \"93bb5743-faa6-33cd-b25d-3221fcee13f2\",
    \"title\": \"Example Title\",
    \"description\": \"Example Description\",
    \"cover_path\": \"Example Cover path\",
    \"sort_order\": 1,
    \"sectors\": [
        \"3b2f0192-f7b3-3a46-be45-bf9928e43d59\"
    ],
    \"permissions\": [
        \"d363184b-d579-3bd8-8ede-ed8f78d359f5\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/admin/tutorials/1"
);

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

let body = {
    "module_id": "93bb5743-faa6-33cd-b25d-3221fcee13f2",
    "title": "Example Title",
    "description": "Example Description",
    "cover_path": "Example Cover path",
    "sort_order": 1,
    "sectors": [
        "3b2f0192-f7b3-3a46-be45-bf9928e43d59"
    ],
    "permissions": [
        "d363184b-d579-3bd8-8ede-ed8f78d359f5"
    ]
};

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

Example response (200):


{
    "data": {
        "id": "471a5dba-9e91-38ed-afb6-2652ccd2b3f7",
        "title": "Quod mollitia eveniet rerum",
        "description": "Saepe labore vel aperiam voluptatem consequuntur quo alias.",
        "cover_url": null,
        "status": "draft",
        "published_at": null,
        "sort_order": 0,
        "module": {
            "id": "a351a0dd-44a9-4ebc-9a10-6714f046a841",
            "name": "Reprehenderit ducimus",
            "slug": "reprehenderit-ducimus-702023",
            "icon": null,
            "color": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

PUT api/admin/tutorials/{id}

Headers

Authorization        

Example: Bearer f8Vba4Dcav3g1ed65EZP6kh

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: 93bb5743-faa6-33cd-b25d-3221fcee13f2

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

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


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

Example response (200):


{
    "data": {
        "id": "8dabee70-efb1-3718-ae41-d2f267ee6c6e",
        "title": "Corrupti natus autem sunt",
        "description": "Ducimus nulla molestiae quaerat nihil qui alias qui.",
        "cover_url": null,
        "status": "draft",
        "published_at": null,
        "sort_order": 0,
        "module": {
            "id": "a351a0dd-4d2f-45d8-a6a3-cdfea2d75054",
            "name": "Eum amet",
            "slug": "eum-amet-974190",
            "icon": null,
            "color": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/admin/tutorials/{tutorial}/publish

Headers

Authorization        

Example: Bearer ePhED58vcV3g4fk6a16dZba

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


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

Example response (200):


{
    "data": {
        "id": "9a4fefa7-e28e-36bd-bdfb-03b737786071",
        "title": "Aperiam tenetur nam enim",
        "description": "Iure nobis aut velit cum earum hic.",
        "cover_url": null,
        "status": "draft",
        "published_at": null,
        "sort_order": 0,
        "module": {
            "id": "a351a0dd-520a-476c-ba1a-371a4097ea6d",
            "name": "Quia et",
            "slug": "quia-et-502665",
            "icon": null,
            "color": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/admin/tutorials/{tutorial}/unpublish

Headers

Authorization        

Example: Bearer V3d6vaZ5E1keDbcg68aPf4h

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 aVg4Ze6bfha1kvP3dcDE856" \
    --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 aVg4Ze6bfha1kvP3dcDE856",
    "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": "55e15155-3a19-351a-9da7-1179f687f876",
        "type": "pdf",
        "title": "Possimus quaerat ea",
        "mime_type": "application/pdf",
        "size_bytes": 745827,
        "duration_seconds": null,
        "sort_order": 0,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/admin/tutorials/{tutorial_id}/items

Headers

Authorization        

Example: Bearer aVg4Ze6bfha1kvP3dcDE856

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 Pf3V6ab1hZ5agv6e4kDEc8d" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        \"33875d7a-aaa0-3ccc-a15e-4e6028094b94\"
    ]
}"
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 Pf3V6ab1hZ5agv6e4kDEc8d",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "items": [
        "33875d7a-aaa0-3ccc-a15e-4e6028094b94"
    ]
};

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 Pf3V6ab1hZ5agv6e4kDEc8d

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 86DkaPb64vafV5Eg1c3eZdh" \
    --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 86DkaPb64vafV5Eg1c3eZdh",
    "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": "1d52abe3-07c9-3446-b8fe-238e4925086b",
        "type": "pdf",
        "title": "Et ab cumque",
        "mime_type": "application/pdf",
        "size_bytes": 3876950,
        "duration_seconds": null,
        "sort_order": 0,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

PUT api/admin/tutorial-items/{tutorialItem}

Headers

Authorization        

Example: Bearer 86DkaPb64vafV5Eg1c3eZdh

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "7aaee972-2b31-3155-aa6f-3cdb7a257b29",
            "name": "Dr. Daniele de Arruda Matos",
            "abbreviation": "Dr. Lidiane Caroline Santacruz Sobrinho",
            "description": "Cum minus ut eligendi.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "5d0fd185-3757-3690-b31b-78ca422ec39e",
            "name": "Thales Sandoval Maia Neto",
            "abbreviation": "Sr. George Vasques Amaral",
            "description": "Atque alias odit fugit amet.",
            "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 a5bPZEcg6d8kV4vDa31fe6h

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


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

Example response (200):


{
    "data": {
        "id": "b6e76eb7-12be-3729-a7e5-e4bfabc1895f",
        "name": "Paulina Assunção Beltrão Neto",
        "abbreviation": "Leandro Martines Sobrinho",
        "description": "Enim omnis natus et qui.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/units/{id}

Headers

Authorization        

Example: Bearer Z5abdv81fahDkVPEge463c6

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

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

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 36vP1fchDkd584EZbgaeV6a" \
    --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 36vP1fchDkd584EZbgaeV6a",
    "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 36vP1fchDkd584EZbgaeV6a

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

unit   string     

Unit UUID Example: aut

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


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

Example response (200):


{
    "data": [
        {
            "id": "76faebc3-67ed-311f-8bd6-0c3ebe070c71",
            "name": "Nathan Heathcote",
            "username": "xthiel",
            "email": "tnicolas@example.net",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "99fe7caf-2176-3523-8ef0-daaeab35d023",
            "name": "Brady Schimmel",
            "username": "santa.prosacco",
            "email": "katlyn76@example.com",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/users

Headers

Authorization        

Example: Bearer 1c86fEZgDke4d65aabhV3Pv

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


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

Example response (200):


{
    "data": {
        "id": "3fdb5092-2c67-3f2f-9839-ccbfcdb98ecf",
        "name": "Dr. Stacey Pacocha DVM",
        "username": "rippin.otis",
        "email": "roberts.neil@example.com",
        "certification": null,
        "crea": null,
        "last_login_at": null,
        "image": {
            "id": null,
            "url": null
        },
        "sectors": [],
        "roles": []
    }
}
 

Request      

GET api/users/{id}

Headers

Authorization        

Example: Bearer 46VvDE6gk1fca8d3aZehP5b

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 k86gvebPdEaVhc143fDZ65a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"certification\": \"Example Certification\",
    \"crea\": \"Example Crea\",
    \"email\": \"user@example.com\",
    \"username\": \"ashlee.kreiger\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"66afb11b-7b18-3c90-88bf-bdf784621424\"
    ],
    \"roles\": [
        \"70c03dbc-d51a-35c9-8608-9f5c0cd6ecd7\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users"
);

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

let body = {
    "name": "Example Name",
    "certification": "Example Certification",
    "crea": "Example Crea",
    "email": "user@example.com",
    "username": "ashlee.kreiger",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "66afb11b-7b18-3c90-88bf-bdf784621424"
    ],
    "roles": [
        "70c03dbc-d51a-35c9-8608-9f5c0cd6ecd7"
    ]
};

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 k86gvebPdEaVhc143fDZ65a

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: ashlee.kreiger

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 dD5ae8V6fhv4Z6E1bPc3gka" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"certification\": \"Example Certification\",
    \"crea\": \"Example Crea\",
    \"email\": \"user@example.com\",
    \"username\": \"amari.fisher\",
    \"password\": \"password123\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"19a5a758-1e5a-3081-bc92-5f834fe1cd6a\"
    ],
    \"roles\": [
        \"1f12235d-c43e-3867-aa3d-ebe72a1fb768\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users/1"
);

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

let body = {
    "name": "Example Name",
    "certification": "Example Certification",
    "crea": "Example Crea",
    "email": "user@example.com",
    "username": "amari.fisher",
    "password": "password123",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "19a5a758-1e5a-3081-bc92-5f834fe1cd6a"
    ],
    "roles": [
        "1f12235d-c43e-3867-aa3d-ebe72a1fb768"
    ]
};

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 dD5ae8V6fhv4Z6E1bPc3gka

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: amari.fisher

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

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

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 kav6DeVcE318b6agf5ZdP4h" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [
        \"e79c6960-4b68-35d9-844a-a80b836a37d1\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users/1/permissions"
);

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

let body = {
    "permissions": [
        "e79c6960-4b68-35d9-844a-a80b836a37d1"
    ]
};

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 kav6DeVcE318b6agf5ZdP4h

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "totam",
            "display_name": "Iure quod eum ea temporibus dolorum molestiae qui."
        },
        {
            "id": null,
            "name": "perferendis",
            "display_name": "Minima et error tenetur."
        }
    ]
}
 

Request      

GET api/users/{user}/permissions

Headers

Authorization        

Example: Bearer 1vf4Pab6g3D6eZEcahV58dk

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


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

Example response (200):


{
    "data": [
        {
            "id": "93db25fd-61e2-3853-a56f-f0a111159cad",
            "description": "Jean Rivera",
            "work": {
                "id": null,
                "name": null
            },
            "documents": [],
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "bd49708d-eeac-3c4e-aff7-12ea9f097bb8",
            "description": "Fernando Lira Jr.",
            "work": {
                "id": null,
                "name": null
            },
            "documents": [],
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&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 P4a6EgcbDa1V6k5e38fvdhZ

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 84v65dbf1aEkePc3ZgVha6D" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Example Description\",
    \"work_id\": \"38f8efdb-d215-386a-b02a-b5f150280c69\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/work-locations"
);

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

let body = {
    "description": "Example Description",
    "work_id": "38f8efdb-d215-386a-b02a-b5f150280c69"
};

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 84v65dbf1aEkePc3ZgVha6D

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: 38f8efdb-d215-386a-b02a-b5f150280c69

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


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

Example response (200):


{
    "data": {
        "id": "262b05e2-e251-3738-8f9f-197f04d3d6d0",
        "description": "Bianca Martines Santana",
        "work": {
            "id": null,
            "name": null
        },
        "documents": [],
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/work-locations/{workLocation}

Headers

Authorization        

Example: Bearer vg8Vhf6D4dE3aac1P6k5beZ

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 Zk6E1cVaD4bvae5Pfdgh836" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Example Description\",
    \"work_id\": \"9b593349-7698-337d-93ec-cf2a9e42a132\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/work-locations/019556e7-2e9f-777c-a177-30bbf0646c32"
);

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

let body = {
    "description": "Example Description",
    "work_id": "9b593349-7698-337d-93ec-cf2a9e42a132"
};

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 Zk6E1cVaD4bvae5Pfdgh836

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: 9b593349-7698-337d-93ec-cf2a9e42a132

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "0dc1ad3e-82dd-3427-9ad0-59420cbe43a7",
            "name": "Srta. Alícia Estrada Chaves Sobrinho",
            "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-02-04 22:19:30.000000",
                "timezone_type": 3,
                "timezone": "America/Sao_Paulo"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "3f4574c5-48cd-3d0c-9f45-8b9b0b08b773",
            "name": "Maísa Marques",
            "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": "2007-02-28 10:02: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 h5c8ak4e1vafDEdb3VPgZ66

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 DZdf4aV1g6ka58hc3Eev6Pb" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"customer_id\": \"86a7f413-307b-394d-bd2f-839c1e2ce8dd\",
    \"status_id\": \"f4c38f71-8eaf-37af-a931-1ab77ec77a04\",
    \"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 DZdf4aV1g6ka58hc3Eev6Pb",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "customer_id": "86a7f413-307b-394d-bd2f-839c1e2ce8dd",
    "status_id": "f4c38f71-8eaf-37af-a931-1ab77ec77a04",
    "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 DZdf4aV1g6ka58hc3Eev6Pb

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: 86a7f413-307b-394d-bd2f-839c1e2ce8dd

status_id   string     

Status id. The uuid of an existing record in the statuses table. Example: f4c38f71-8eaf-37af-a931-1ab77ec77a04

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


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

Example response (200):


{
    "data": {
        "id": "4c4d7f7d-9853-3e38-a029-31f1d9a61de4",
        "name": "Carla Serra",
        "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-09-10 16:45:23.000000",
            "timezone_type": 3,
            "timezone": "America/Sao_Paulo"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/works/{id}

Headers

Authorization        

Example: Bearer cb5v4dkDaZg3Va6Ee68P1fh

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 4VeDvdgc5hEP1k368aZfab6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"customer_id\": \"b64e64af-2442-33ed-885c-d95ffd41f7bb\",
    \"status_id\": \"58e3bae2-ddc1-34c8-b07a-642658d4de63\",
    \"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 4VeDvdgc5hEP1k368aZfab6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "customer_id": "b64e64af-2442-33ed-885c-d95ffd41f7bb",
    "status_id": "58e3bae2-ddc1-34c8-b07a-642658d4de63",
    "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 4VeDvdgc5hEP1k368aZfab6

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: b64e64af-2442-33ed-885c-d95ffd41f7bb

status_id   string  optional    

Status id. The uuid of an existing record in the statuses table. Example: 58e3bae2-ddc1-34c8-b07a-642658d4de63

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "8b3ad4e3-ea4f-39d3-93dc-39ce764320f7",
            "name": "Jefferey Prohaska",
            "username": "sanford.manuel",
            "email": "pharvey@example.net",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "96042031-e79b-3b37-9cf9-ae82e5819f7f",
            "name": "Emelie Kutch",
            "username": "devon33",
            "email": "gertrude30@example.org",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&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 hcED356vkbe4a168aZgdPfV

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 DvVEb6fh4aPc31586degZak" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"8df7a782-5a50-3d26-8f66-8a99c5032eee\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach"
);

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

let body = {
    "users": [
        "8df7a782-5a50-3d26-8f66-8a99c5032eee"
    ]
};

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 DvVEb6fh4aPc31586degZak

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 6abZe5dv6Vha43DPfcEgk18" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"0eef5830-576a-3f63-bf22-dba79d36f0af\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/detach"
);

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

let body = {
    "users": [
        "0eef5830-576a-3f63-bf22-dba79d36f0af"
    ]
};

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

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 fD8V64bka6g53deZhP1vcEa" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"91dc0d11-f9a4-3354-aac0-98f894373b4b\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/sync"
);

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

let body = {
    "users": [
        "91dc0d11-f9a4-3354-aac0-98f894373b4b"
    ]
};

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 fD8V64bka6g53deZhP1vcEa

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.